summaryrefslogtreecommitdiff
path: root/arch/arm/mach-nomadik/board-nhk8815.c
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2012-01-09 11:40:02 (GMT)
committerLinus Walleij <linus.walleij@linaro.org>2012-06-10 16:41:26 (GMT)
commit7c77852d2f22cebd5ca7c4ded4c47284e67ed9b5 (patch)
tree63cd85f73b96ab2c412eace9b98450c0bd44da53 /arch/arm/mach-nomadik/board-nhk8815.c
parent056c78d3a28ab7c8438b42f4d0915030ca8f51b9 (diff)
downloadlinux-fsl-qoriq-7c77852d2f22cebd5ca7c4ded4c47284e67ed9b5.tar.xz
ARM: nomadik: register AMBA devices dynamically
This makes AMBA devices on the Nomadik main CPU die register dynamically, and refactor the registration of the RNG to use this. Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'arch/arm/mach-nomadik/board-nhk8815.c')
-rw-r--r--arch/arm/mach-nomadik/board-nhk8815.c17
1 files changed, 2 insertions, 15 deletions
diff --git a/arch/arm/mach-nomadik/board-nhk8815.c b/arch/arm/mach-nomadik/board-nhk8815.c
index 2e8d3e1..43b844e 100644
--- a/arch/arm/mach-nomadik/board-nhk8815.c
+++ b/arch/arm/mach-nomadik/board-nhk8815.c
@@ -185,17 +185,6 @@ static void __init nhk8815_onenand_init(void)
#endif
}
-static AMBA_APB_DEVICE(uart0, "uart0", 0, NOMADIK_UART0_BASE,
- { IRQ_UART0 }, NULL);
-
-static AMBA_APB_DEVICE(uart1, "uart1", 0, NOMADIK_UART1_BASE,
- { IRQ_UART1 }, NULL);
-
-static struct amba_device *amba_devs[] __initdata = {
- &uart0_device,
- &uart1_device,
-};
-
static struct resource nhk8815_eth_resources[] = {
{
.name = "smc91x-regs",
@@ -255,15 +244,13 @@ static struct sys_timer nomadik_timer = {
static void __init nhk8815_platform_init(void)
{
- int i;
-
cpu8815_platform_init();
nhk8815_onenand_init();
platform_add_devices(nhk8815_platform_devices,
ARRAY_SIZE(nhk8815_platform_devices));
- for (i = 0; i < ARRAY_SIZE(amba_devs); i++)
- amba_device_register(amba_devs[i], &iomem_resource);
+ amba_apb_device_add(NULL, "uart0", NOMADIK_UART0_BASE, SZ_4K, IRQ_UART0, 0, NULL, 0);
+ amba_apb_device_add(NULL, "uart1", NOMADIK_UART1_BASE, SZ_4K, IRQ_UART1, 0, NULL, 0);
}
MACHINE_START(NOMADIK, "NHK8815")