Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 53d68af1 authored by Russell King's avatar Russell King
Browse files

ARM: amba: nomadik: use common amba device initializers

parent 6db2a457
Loading
Loading
Loading
Loading
+4 −13
Original line number Diff line number Diff line
@@ -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,
+2 −7
Original line number Diff line number Diff line
@@ -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,
@@ -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)