diff options
author | Paul Walmsley <paul@pwsan.com> | 2012-09-23 17:28:27 -0600 |
---|---|---|
committer | Paul Walmsley <paul@pwsan.com> | 2012-09-23 17:28:27 -0600 |
commit | 4848d460a7d4b2b5b22afda16b713cb753affa12 (patch) | |
tree | 81c62d710d73123a59a9b383964ba4fff7e65953 /arch/arm/mach-omap1/devices.c | |
parent | 665d92fa85b5cb4c0a3f36524ac6cc8f9e3d9c2d (diff) | |
download | blackbird-op-linux-4848d460a7d4b2b5b22afda16b713cb753affa12.tar.gz blackbird-op-linux-4848d460a7d4b2b5b22afda16b713cb753affa12.zip |
ARM: OMAP: split OMAP1, OMAP2+ RNG device registration
Move the OMAP1-specific RNG device creation off to mach-omap1/devices.c,
and create a omap_device-backed registration function for OMAP2+ devices
in mach-omap2/devices.c.
As a nice side-benefit, we can also get rid of
arch/arm/plat-omap/devices.c, thanks to some recent changes from Tony.
One change from the previous behavior is that the RNG devices are now
registered unconditionally. This should allow the RNG drivers to be
loaded as modules, even if the original kernel was not built that way.
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Diffstat (limited to 'arch/arm/mach-omap1/devices.c')
-rw-r--r-- | arch/arm/mach-omap1/devices.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/arch/arm/mach-omap1/devices.c b/arch/arm/mach-omap1/devices.c index 05fdbd992c77..23a0b116b078 100644 --- a/arch/arm/mach-omap1/devices.c +++ b/arch/arm/mach-omap1/devices.c @@ -357,6 +357,30 @@ static inline void omap_init_uwire(void) {} #endif +#define OMAP1_RNG_BASE 0xfffe5000 + +static struct resource omap1_rng_resources[] = { + { + .start = OMAP1_RNG_BASE, + .end = OMAP1_RNG_BASE + 0x4f, + .flags = IORESOURCE_MEM, + }, +}; + +static struct platform_device omap1_rng_device = { + .name = "omap_rng", + .id = -1, + .num_resources = ARRAY_SIZE(omap1_rng_resources), + .resource = omap1_rng_resources, +}; + +static void omap1_init_rng(void) +{ + (void) platform_device_register(&omap1_rng_device); +} + +/*-------------------------------------------------------------------------*/ + /* * This gets called after board-specific INIT_MACHINE, and initializes most * on-chip peripherals accessible on this board (except for few like USB): @@ -395,6 +419,7 @@ static int __init omap1_init_devices(void) omap_init_spi100k(); omap_init_sti(); omap_init_uwire(); + omap1_init_rng(); return 0; } |