diff options
Diffstat (limited to 'arch/arm/plat-omap/devices.c')
-rw-r--r-- | arch/arm/plat-omap/devices.c | 68 |
1 files changed, 34 insertions, 34 deletions
diff --git a/arch/arm/plat-omap/devices.c b/arch/arm/plat-omap/devices.c index f86617869b38..30b5db73017a 100644 --- a/arch/arm/plat-omap/devices.c +++ b/arch/arm/plat-omap/devices.c | |||
@@ -242,6 +242,39 @@ fail: | |||
242 | 242 | ||
243 | /*-------------------------------------------------------------------------*/ | 243 | /*-------------------------------------------------------------------------*/ |
244 | 244 | ||
245 | #if defined(CONFIG_HW_RANDOM_OMAP) || defined(CONFIG_HW_RANDOM_OMAP_MODULE) | ||
246 | |||
247 | #ifdef CONFIG_ARCH_OMAP24XX | ||
248 | #define OMAP_RNG_BASE 0x480A0000 | ||
249 | #else | ||
250 | #define OMAP_RNG_BASE 0xfffe5000 | ||
251 | #endif | ||
252 | |||
253 | static struct resource rng_resources[] = { | ||
254 | { | ||
255 | .start = OMAP_RNG_BASE, | ||
256 | .end = OMAP_RNG_BASE + 0x4f, | ||
257 | .flags = IORESOURCE_MEM, | ||
258 | }, | ||
259 | }; | ||
260 | |||
261 | static struct platform_device omap_rng_device = { | ||
262 | .name = "omap_rng", | ||
263 | .id = -1, | ||
264 | .num_resources = ARRAY_SIZE(rng_resources), | ||
265 | .resource = rng_resources, | ||
266 | }; | ||
267 | |||
268 | static void omap_init_rng(void) | ||
269 | { | ||
270 | (void) platform_device_register(&omap_rng_device); | ||
271 | } | ||
272 | #else | ||
273 | static inline void omap_init_rng(void) {} | ||
274 | #endif | ||
275 | |||
276 | /*-------------------------------------------------------------------------*/ | ||
277 | |||
245 | /* Numbering for the SPI-capable controllers when used for SPI: | 278 | /* Numbering for the SPI-capable controllers when used for SPI: |
246 | * spi = 1 | 279 | * spi = 1 |
247 | * uwire = 2 | 280 | * uwire = 2 |
@@ -324,39 +357,6 @@ static void omap_init_wdt(void) | |||
324 | static inline void omap_init_wdt(void) {} | 357 | static inline void omap_init_wdt(void) {} |
325 | #endif | 358 | #endif |
326 | 359 | ||
327 | /*-------------------------------------------------------------------------*/ | ||
328 | |||
329 | #if defined(CONFIG_HW_RANDOM_OMAP) || defined(CONFIG_HW_RANDOM_OMAP_MODULE) | ||
330 | |||
331 | #ifdef CONFIG_ARCH_OMAP24XX | ||
332 | #define OMAP_RNG_BASE 0x480A0000 | ||
333 | #else | ||
334 | #define OMAP_RNG_BASE 0xfffe5000 | ||
335 | #endif | ||
336 | |||
337 | static struct resource rng_resources[] = { | ||
338 | { | ||
339 | .start = OMAP_RNG_BASE, | ||
340 | .end = OMAP_RNG_BASE + 0x4f, | ||
341 | .flags = IORESOURCE_MEM, | ||
342 | }, | ||
343 | }; | ||
344 | |||
345 | static struct platform_device omap_rng_device = { | ||
346 | .name = "omap_rng", | ||
347 | .id = -1, | ||
348 | .num_resources = ARRAY_SIZE(rng_resources), | ||
349 | .resource = rng_resources, | ||
350 | }; | ||
351 | |||
352 | static void omap_init_rng(void) | ||
353 | { | ||
354 | (void) platform_device_register(&omap_rng_device); | ||
355 | } | ||
356 | #else | ||
357 | static inline void omap_init_rng(void) {} | ||
358 | #endif | ||
359 | |||
360 | /* | 360 | /* |
361 | * This gets called after board-specific INIT_MACHINE, and initializes most | 361 | * This gets called after board-specific INIT_MACHINE, and initializes most |
362 | * on-chip peripherals accessible on this board (except for few like USB): | 362 | * on-chip peripherals accessible on this board (except for few like USB): |
@@ -384,9 +384,9 @@ static int __init omap_init_devices(void) | |||
384 | */ | 384 | */ |
385 | omap_init_dsp(); | 385 | omap_init_dsp(); |
386 | omap_init_kp(); | 386 | omap_init_kp(); |
387 | omap_init_rng(); | ||
387 | omap_init_uwire(); | 388 | omap_init_uwire(); |
388 | omap_init_wdt(); | 389 | omap_init_wdt(); |
389 | omap_init_rng(); | ||
390 | return 0; | 390 | return 0; |
391 | } | 391 | } |
392 | arch_initcall(omap_init_devices); | 392 | arch_initcall(omap_init_devices); |