Skip to content

Commit

Permalink
ARM: amba: nomadik: use common amba device initializers
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Russell King committed Jan 26, 2012
1 parent 6db2a45 commit 53d68af
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 20 deletions.
17 changes: 4 additions & 13 deletions arch/arm/mach-nomadik/board-nhk8815.c
Original file line number Diff line number Diff line change
Expand Up @@ -185,20 +185,11 @@ static void __init nhk8815_onenand_init(void)
#endif
}

#define __MEM_4K_RESOURCE(x) \
.res = {.start = (x), .end = (x) + SZ_4K - 1, .flags = IORESOURCE_MEM}
static AMBA_APB_DEVICE(uart0, "uart0", 0, NOMADIK_UART0_BASE,
{ IRQ_UART0 }, NULL);

static struct amba_device uart0_device = {
.dev = { .init_name = "uart0" },
__MEM_4K_RESOURCE(NOMADIK_UART0_BASE),
.irq = {IRQ_UART0},
};

static struct amba_device uart1_device = {
.dev = { .init_name = "uart1" },
__MEM_4K_RESOURCE(NOMADIK_UART1_BASE),
.irq = {IRQ_UART1},
};
static AMBA_APB_DEVICE(uart1, "uart1", 0, NOMADIK_UART1_BASE,
{ IRQ_UART1 }, NULL);

static struct amba_device *amba_devs[] __initdata = {
&uart0_device,
Expand Down
9 changes: 2 additions & 7 deletions arch/arm/mach-nomadik/cpu-8815.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,7 @@ static struct platform_device cpu8815_platform_gpio[] = {
GPIO_DEVICE(3),
};

static struct amba_device cpu8815_amba_rng = {
.dev = {
.init_name = "rng",
},
__MEM_4K_RESOURCE(NOMADIK_RNG_BASE),
};
static AMBA_APB_DEVICE(cpu8815_amba_rng, "rng", 0, NOMADIK_RNG_BASE, { }, NULL);

static struct platform_device *platform_devs[] __initdata = {
cpu8815_platform_gpio + 0,
Expand All @@ -112,7 +107,7 @@ static struct platform_device *platform_devs[] __initdata = {
};

static struct amba_device *amba_devs[] __initdata = {
&cpu8815_amba_rng
&cpu8815_amba_rng_device
};

static int __init cpu8815_init(void)
Expand Down

0 comments on commit 53d68af

Please sign in to comment.