aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-omap2/common.c')
-rw-r--r--arch/arm/mach-omap2/common.c106
1 files changed, 73 insertions, 33 deletions
diff --git a/arch/arm/mach-omap2/common.c b/arch/arm/mach-omap2/common.c
index 3f20cbb9967b..aaf421178c91 100644
--- a/arch/arm/mach-omap2/common.c
+++ b/arch/arm/mach-omap2/common.c
@@ -17,7 +17,7 @@
17#include <linux/clk.h> 17#include <linux/clk.h>
18#include <linux/io.h> 18#include <linux/io.h>
19 19
20#include <plat/common.h> 20#include "common.h"
21#include <plat/board.h> 21#include <plat/board.h>
22#include <plat/mux.h> 22#include <plat/mux.h>
23 23
@@ -45,17 +45,22 @@ static void __init __omap2_set_globals(struct omap_globals *omap2_globals)
45static struct omap_globals omap242x_globals = { 45static struct omap_globals omap242x_globals = {
46 .class = OMAP242X_CLASS, 46 .class = OMAP242X_CLASS,
47 .tap = OMAP2_L4_IO_ADDRESS(0x48014000), 47 .tap = OMAP2_L4_IO_ADDRESS(0x48014000),
48 .sdrc = OMAP2420_SDRC_BASE, 48 .sdrc = OMAP2_L3_IO_ADDRESS(OMAP2420_SDRC_BASE),
49 .sms = OMAP2420_SMS_BASE, 49 .sms = OMAP2_L3_IO_ADDRESS(OMAP2420_SMS_BASE),
50 .ctrl = OMAP242X_CTRL_BASE, 50 .ctrl = OMAP2_L4_IO_ADDRESS(OMAP242X_CTRL_BASE),
51 .prm = OMAP2420_PRM_BASE, 51 .prm = OMAP2_L4_IO_ADDRESS(OMAP2420_PRM_BASE),
52 .cm = OMAP2420_CM_BASE, 52 .cm = OMAP2_L4_IO_ADDRESS(OMAP2420_CM_BASE),
53}; 53};
54 54
55void __init omap2_set_globals_242x(void) 55void __init omap2_set_globals_242x(void)
56{ 56{
57 __omap2_set_globals(&omap242x_globals); 57 __omap2_set_globals(&omap242x_globals);
58} 58}
59
60void __init omap242x_map_io(void)
61{
62 omap242x_map_common_io();
63}
59#endif 64#endif
60 65
61#if defined(CONFIG_SOC_OMAP2430) 66#if defined(CONFIG_SOC_OMAP2430)
@@ -63,17 +68,22 @@ void __init omap2_set_globals_242x(void)
63static struct omap_globals omap243x_globals = { 68static struct omap_globals omap243x_globals = {
64 .class = OMAP243X_CLASS, 69 .class = OMAP243X_CLASS,
65 .tap = OMAP2_L4_IO_ADDRESS(0x4900a000), 70 .tap = OMAP2_L4_IO_ADDRESS(0x4900a000),
66 .sdrc = OMAP243X_SDRC_BASE, 71 .sdrc = OMAP2_L3_IO_ADDRESS(OMAP243X_SDRC_BASE),
67 .sms = OMAP243X_SMS_BASE, 72 .sms = OMAP2_L3_IO_ADDRESS(OMAP243X_SMS_BASE),
68 .ctrl = OMAP243X_CTRL_BASE, 73 .ctrl = OMAP2_L4_IO_ADDRESS(OMAP243X_CTRL_BASE),
69 .prm = OMAP2430_PRM_BASE, 74 .prm = OMAP2_L4_IO_ADDRESS(OMAP2430_PRM_BASE),
70 .cm = OMAP2430_CM_BASE, 75 .cm = OMAP2_L4_IO_ADDRESS(OMAP2430_CM_BASE),
71}; 76};
72 77
73void __init omap2_set_globals_243x(void) 78void __init omap2_set_globals_243x(void)
74{ 79{
75 __omap2_set_globals(&omap243x_globals); 80 __omap2_set_globals(&omap243x_globals);
76} 81}
82
83void __init omap243x_map_io(void)
84{
85 omap243x_map_common_io();
86}
77#endif 87#endif
78 88
79#if defined(CONFIG_ARCH_OMAP3) 89#if defined(CONFIG_ARCH_OMAP3)
@@ -81,11 +91,11 @@ void __init omap2_set_globals_243x(void)
81static struct omap_globals omap3_globals = { 91static struct omap_globals omap3_globals = {
82 .class = OMAP343X_CLASS, 92 .class = OMAP343X_CLASS,
83 .tap = OMAP2_L4_IO_ADDRESS(0x4830A000), 93 .tap = OMAP2_L4_IO_ADDRESS(0x4830A000),
84 .sdrc = OMAP343X_SDRC_BASE, 94 .sdrc = OMAP2_L3_IO_ADDRESS(OMAP343X_SDRC_BASE),
85 .sms = OMAP343X_SMS_BASE, 95 .sms = OMAP2_L3_IO_ADDRESS(OMAP343X_SMS_BASE),
86 .ctrl = OMAP343X_CTRL_BASE, 96 .ctrl = OMAP2_L4_IO_ADDRESS(OMAP343X_CTRL_BASE),
87 .prm = OMAP3430_PRM_BASE, 97 .prm = OMAP2_L4_IO_ADDRESS(OMAP3430_PRM_BASE),
88 .cm = OMAP3430_CM_BASE, 98 .cm = OMAP2_L4_IO_ADDRESS(OMAP3430_CM_BASE),
89}; 99};
90 100
91void __init omap2_set_globals_3xxx(void) 101void __init omap2_set_globals_3xxx(void)
@@ -95,29 +105,54 @@ void __init omap2_set_globals_3xxx(void)
95 105
96void __init omap3_map_io(void) 106void __init omap3_map_io(void)
97{ 107{
98 omap2_set_globals_3xxx();
99 omap34xx_map_common_io(); 108 omap34xx_map_common_io();
100} 109}
101 110
102/* 111/*
103 * Adjust TAP register base such that omap3_check_revision accesses the correct 112 * Adjust TAP register base such that omap3_check_revision accesses the correct
104 * TI816X register for checking device ID (it adds 0x204 to tap base while 113 * TI81XX register for checking device ID (it adds 0x204 to tap base while
105 * TI816X DEVICE ID register is at offset 0x600 from control base). 114 * TI81XX DEVICE ID register is at offset 0x600 from control base).
106 */ 115 */
107#define TI816X_TAP_BASE (TI816X_CTRL_BASE + \ 116#define TI81XX_TAP_BASE (TI81XX_CTRL_BASE + \
108 TI816X_CONTROL_DEVICE_ID - 0x204) 117 TI81XX_CONTROL_DEVICE_ID - 0x204)
109 118
110static struct omap_globals ti816x_globals = { 119static struct omap_globals ti81xx_globals = {
111 .class = OMAP343X_CLASS, 120 .class = OMAP343X_CLASS,
112 .tap = OMAP2_L4_IO_ADDRESS(TI816X_TAP_BASE), 121 .tap = OMAP2_L4_IO_ADDRESS(TI81XX_TAP_BASE),
113 .ctrl = TI816X_CTRL_BASE, 122 .ctrl = OMAP2_L4_IO_ADDRESS(TI81XX_CTRL_BASE),
114 .prm = TI816X_PRCM_BASE, 123 .prm = OMAP2_L4_IO_ADDRESS(TI81XX_PRCM_BASE),
115 .cm = TI816X_PRCM_BASE, 124 .cm = OMAP2_L4_IO_ADDRESS(TI81XX_PRCM_BASE),
116}; 125};
117 126
118void __init omap2_set_globals_ti816x(void) 127void __init omap2_set_globals_ti81xx(void)
119{ 128{
120 __omap2_set_globals(&ti816x_globals); 129 __omap2_set_globals(&ti81xx_globals);
130}
131
132void __init ti81xx_map_io(void)
133{
134 omapti81xx_map_common_io();
135}
136
137#define AM33XX_TAP_BASE (AM33XX_CTRL_BASE + \
138 TI81XX_CONTROL_DEVICE_ID - 0x204)
139
140static struct omap_globals am33xx_globals = {
141 .class = AM335X_CLASS,
142 .tap = AM33XX_L4_WK_IO_ADDRESS(AM33XX_TAP_BASE),
143 .ctrl = AM33XX_L4_WK_IO_ADDRESS(AM33XX_CTRL_BASE),
144 .prm = AM33XX_L4_WK_IO_ADDRESS(AM33XX_PRCM_BASE),
145 .cm = AM33XX_L4_WK_IO_ADDRESS(AM33XX_PRCM_BASE),
146};
147
148void __init omap2_set_globals_am33xx(void)
149{
150 __omap2_set_globals(&am33xx_globals);
151}
152
153void __init am33xx_map_io(void)
154{
155 omapam33xx_map_common_io();
121} 156}
122#endif 157#endif
123 158
@@ -125,11 +160,11 @@ void __init omap2_set_globals_ti816x(void)
125static struct omap_globals omap4_globals = { 160static struct omap_globals omap4_globals = {
126 .class = OMAP443X_CLASS, 161 .class = OMAP443X_CLASS,
127 .tap = OMAP2_L4_IO_ADDRESS(OMAP443X_SCM_BASE), 162 .tap = OMAP2_L4_IO_ADDRESS(OMAP443X_SCM_BASE),
128 .ctrl = OMAP443X_SCM_BASE, 163 .ctrl = OMAP2_L4_IO_ADDRESS(OMAP443X_SCM_BASE),
129 .ctrl_pad = OMAP443X_CTRL_BASE, 164 .ctrl_pad = OMAP2_L4_IO_ADDRESS(OMAP443X_CTRL_BASE),
130 .prm = OMAP4430_PRM_BASE, 165 .prm = OMAP2_L4_IO_ADDRESS(OMAP4430_PRM_BASE),
131 .cm = OMAP4430_CM_BASE, 166 .cm = OMAP2_L4_IO_ADDRESS(OMAP4430_CM_BASE),
132 .cm2 = OMAP4430_CM2_BASE, 167 .cm2 = OMAP2_L4_IO_ADDRESS(OMAP4430_CM2_BASE),
133}; 168};
134 169
135void __init omap2_set_globals_443x(void) 170void __init omap2_set_globals_443x(void)
@@ -138,5 +173,10 @@ void __init omap2_set_globals_443x(void)
138 omap2_set_globals_control(&omap4_globals); 173 omap2_set_globals_control(&omap4_globals);
139 omap2_set_globals_prcm(&omap4_globals); 174 omap2_set_globals_prcm(&omap4_globals);
140} 175}
176
177void __init omap4_map_io(void)
178{
179 omap44xx_map_common_io();
180}
141#endif 181#endif
142 182