diff options
| author | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-12-18 10:28:51 -0500 |
|---|---|---|
| committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2012-01-26 14:59:29 -0500 |
| commit | 53d68af1c201cae4a43113c255484c41fa151b39 (patch) | |
| tree | 882624180108446705958f6362d864bf530deb36 | |
| parent | 6db2a457ddae7663a845fdb7aae84c6601f5c1b4 (diff) | |
ARM: amba: nomadik: use common amba device initializers
Acked-by: Alessandro Rubini <rubini@unipv.it>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
| -rw-r--r-- | arch/arm/mach-nomadik/board-nhk8815.c | 17 | ||||
| -rw-r--r-- | arch/arm/mach-nomadik/cpu-8815.c | 9 |
2 files changed, 6 insertions, 20 deletions
diff --git a/arch/arm/mach-nomadik/board-nhk8815.c b/arch/arm/mach-nomadik/board-nhk8815.c index 721e51cae6f7..f6f74adbe8c4 100644 --- a/arch/arm/mach-nomadik/board-nhk8815.c +++ b/arch/arm/mach-nomadik/board-nhk8815.c | |||
| @@ -185,20 +185,11 @@ static void __init nhk8815_onenand_init(void) | |||
| 185 | #endif | 185 | #endif |
| 186 | } | 186 | } |
| 187 | 187 | ||
| 188 | #define __MEM_4K_RESOURCE(x) \ | 188 | static AMBA_APB_DEVICE(uart0, "uart0", 0, NOMADIK_UART0_BASE, |
| 189 | .res = {.start = (x), .end = (x) + SZ_4K - 1, .flags = IORESOURCE_MEM} | 189 | { IRQ_UART0 }, NULL); |
| 190 | 190 | ||
| 191 | static struct amba_device uart0_device = { | 191 | static AMBA_APB_DEVICE(uart1, "uart1", 0, NOMADIK_UART1_BASE, |
| 192 | .dev = { .init_name = "uart0" }, | 192 | { IRQ_UART1 }, NULL); |
| 193 | __MEM_4K_RESOURCE(NOMADIK_UART0_BASE), | ||
| 194 | .irq = {IRQ_UART0}, | ||
| 195 | }; | ||
| 196 | |||
| 197 | static struct amba_device uart1_device = { | ||
| 198 | .dev = { .init_name = "uart1" }, | ||
| 199 | __MEM_4K_RESOURCE(NOMADIK_UART1_BASE), | ||
| 200 | .irq = {IRQ_UART1}, | ||
| 201 | }; | ||
| 202 | 193 | ||
| 203 | static struct amba_device *amba_devs[] __initdata = { | 194 | static struct amba_device *amba_devs[] __initdata = { |
| 204 | &uart0_device, | 195 | &uart0_device, |
diff --git a/arch/arm/mach-nomadik/cpu-8815.c b/arch/arm/mach-nomadik/cpu-8815.c index 65df7b4fdd3e..27f43a46985e 100644 --- a/arch/arm/mach-nomadik/cpu-8815.c +++ b/arch/arm/mach-nomadik/cpu-8815.c | |||
| @@ -97,12 +97,7 @@ static struct platform_device cpu8815_platform_gpio[] = { | |||
| 97 | GPIO_DEVICE(3), | 97 | GPIO_DEVICE(3), |
| 98 | }; | 98 | }; |
| 99 | 99 | ||
| 100 | static struct amba_device cpu8815_amba_rng = { | 100 | static AMBA_APB_DEVICE(cpu8815_amba_rng, "rng", 0, NOMADIK_RNG_BASE, { }, NULL); |
| 101 | .dev = { | ||
| 102 | .init_name = "rng", | ||
| 103 | }, | ||
| 104 | __MEM_4K_RESOURCE(NOMADIK_RNG_BASE), | ||
| 105 | }; | ||
| 106 | 101 | ||
| 107 | static struct platform_device *platform_devs[] __initdata = { | 102 | static struct platform_device *platform_devs[] __initdata = { |
| 108 | cpu8815_platform_gpio + 0, | 103 | cpu8815_platform_gpio + 0, |
| @@ -112,7 +107,7 @@ static struct platform_device *platform_devs[] __initdata = { | |||
| 112 | }; | 107 | }; |
| 113 | 108 | ||
| 114 | static struct amba_device *amba_devs[] __initdata = { | 109 | static struct amba_device *amba_devs[] __initdata = { |
| 115 | &cpu8815_amba_rng | 110 | &cpu8815_amba_rng_device |
| 116 | }; | 111 | }; |
| 117 | 112 | ||
| 118 | static int __init cpu8815_init(void) | 113 | static int __init cpu8815_init(void) |
