diff options
-rw-r--r-- | arch/arm/mach-omap1/devices.c | 44 | ||||
-rw-r--r-- | arch/arm/plat-omap/devices.c | 45 |
2 files changed, 44 insertions, 45 deletions
diff --git a/arch/arm/mach-omap1/devices.c b/arch/arm/mach-omap1/devices.c index 51387a447cce..b853f6110a44 100644 --- a/arch/arm/mach-omap1/devices.c +++ b/arch/arm/mach-omap1/devices.c | |||
@@ -258,6 +258,49 @@ void __init omap1_camera_init(void *info) | |||
258 | 258 | ||
259 | static inline void omap_init_sti(void) {} | 259 | static inline void omap_init_sti(void) {} |
260 | 260 | ||
261 | /* Numbering for the SPI-capable controllers when used for SPI: | ||
262 | * spi = 1 | ||
263 | * uwire = 2 | ||
264 | * mmc1..2 = 3..4 | ||
265 | * mcbsp1..3 = 5..7 | ||
266 | */ | ||
267 | |||
268 | #if defined(CONFIG_SPI_OMAP_UWIRE) || defined(CONFIG_SPI_OMAP_UWIRE_MODULE) | ||
269 | |||
270 | #define OMAP_UWIRE_BASE 0xfffb3000 | ||
271 | |||
272 | static struct resource uwire_resources[] = { | ||
273 | { | ||
274 | .start = OMAP_UWIRE_BASE, | ||
275 | .end = OMAP_UWIRE_BASE + 0x20, | ||
276 | .flags = IORESOURCE_MEM, | ||
277 | }, | ||
278 | }; | ||
279 | |||
280 | static struct platform_device omap_uwire_device = { | ||
281 | .name = "omap_uwire", | ||
282 | .id = -1, | ||
283 | .num_resources = ARRAY_SIZE(uwire_resources), | ||
284 | .resource = uwire_resources, | ||
285 | }; | ||
286 | |||
287 | static void omap_init_uwire(void) | ||
288 | { | ||
289 | /* FIXME define and use a boot tag; not all boards will be hooking | ||
290 | * up devices to the microwire controller, and multi-board configs | ||
291 | * mean that CONFIG_SPI_OMAP_UWIRE may be configured anyway... | ||
292 | */ | ||
293 | |||
294 | /* board-specific code must configure chipselects (only a few | ||
295 | * are normally used) and SCLK/SDI/SDO (each has two choices). | ||
296 | */ | ||
297 | (void) platform_device_register(&omap_uwire_device); | ||
298 | } | ||
299 | #else | ||
300 | static inline void omap_init_uwire(void) {} | ||
301 | #endif | ||
302 | |||
303 | |||
261 | /* | 304 | /* |
262 | * This gets called after board-specific INIT_MACHINE, and initializes most | 305 | * This gets called after board-specific INIT_MACHINE, and initializes most |
263 | * on-chip peripherals accessible on this board (except for few like USB): | 306 | * on-chip peripherals accessible on this board (except for few like USB): |
@@ -295,6 +338,7 @@ static int __init omap1_init_devices(void) | |||
295 | omap_init_rtc(); | 338 | omap_init_rtc(); |
296 | omap_init_spi100k(); | 339 | omap_init_spi100k(); |
297 | omap_init_sti(); | 340 | omap_init_sti(); |
341 | omap_init_uwire(); | ||
298 | 342 | ||
299 | return 0; | 343 | return 0; |
300 | } | 344 | } |
diff --git a/arch/arm/plat-omap/devices.c b/arch/arm/plat-omap/devices.c index 09b07d252892..16c9ebed8b66 100644 --- a/arch/arm/plat-omap/devices.c +++ b/arch/arm/plat-omap/devices.c | |||
@@ -109,50 +109,6 @@ static void omap_init_rng(void) | |||
109 | static inline void omap_init_rng(void) {} | 109 | static inline void omap_init_rng(void) {} |
110 | #endif | 110 | #endif |
111 | 111 | ||
112 | /*-------------------------------------------------------------------------*/ | ||
113 | |||
114 | /* Numbering for the SPI-capable controllers when used for SPI: | ||
115 | * spi = 1 | ||
116 | * uwire = 2 | ||
117 | * mmc1..2 = 3..4 | ||
118 | * mcbsp1..3 = 5..7 | ||
119 | */ | ||
120 | |||
121 | #if defined(CONFIG_SPI_OMAP_UWIRE) || defined(CONFIG_SPI_OMAP_UWIRE_MODULE) | ||
122 | |||
123 | #define OMAP_UWIRE_BASE 0xfffb3000 | ||
124 | |||
125 | static struct resource uwire_resources[] = { | ||
126 | { | ||
127 | .start = OMAP_UWIRE_BASE, | ||
128 | .end = OMAP_UWIRE_BASE + 0x20, | ||
129 | .flags = IORESOURCE_MEM, | ||
130 | }, | ||
131 | }; | ||
132 | |||
133 | static struct platform_device omap_uwire_device = { | ||
134 | .name = "omap_uwire", | ||
135 | .id = -1, | ||
136 | .num_resources = ARRAY_SIZE(uwire_resources), | ||
137 | .resource = uwire_resources, | ||
138 | }; | ||
139 | |||
140 | static void omap_init_uwire(void) | ||
141 | { | ||
142 | /* FIXME define and use a boot tag; not all boards will be hooking | ||
143 | * up devices to the microwire controller, and multi-board configs | ||
144 | * mean that CONFIG_SPI_OMAP_UWIRE may be configured anyway... | ||
145 | */ | ||
146 | |||
147 | /* board-specific code must configure chipselects (only a few | ||
148 | * are normally used) and SCLK/SDI/SDO (each has two choices). | ||
149 | */ | ||
150 | (void) platform_device_register(&omap_uwire_device); | ||
151 | } | ||
152 | #else | ||
153 | static inline void omap_init_uwire(void) {} | ||
154 | #endif | ||
155 | |||
156 | #if defined(CONFIG_TIDSPBRIDGE) || defined(CONFIG_TIDSPBRIDGE_MODULE) | 112 | #if defined(CONFIG_TIDSPBRIDGE) || defined(CONFIG_TIDSPBRIDGE_MODULE) |
157 | 113 | ||
158 | static phys_addr_t omap_dsp_phys_mempool_base; | 114 | static phys_addr_t omap_dsp_phys_mempool_base; |
@@ -208,7 +164,6 @@ static int __init omap_init_devices(void) | |||
208 | * in alphabetical order so they're easier to sort through. | 164 | * in alphabetical order so they're easier to sort through. |
209 | */ | 165 | */ |
210 | omap_init_rng(); | 166 | omap_init_rng(); |
211 | omap_init_uwire(); | ||
212 | return 0; | 167 | return 0; |
213 | } | 168 | } |
214 | arch_initcall(omap_init_devices); | 169 | arch_initcall(omap_init_devices); |