From 3bf96889976168827eade6788f26391de051e872 Mon Sep 17 00:00:00 2001 From: Russell King Date: Sun, 18 Dec 2011 11:42:44 +0000 Subject: ARM: amba: u300: get rid of NO_IRQ initializers Acked-by: Linus Walleij Signed-off-by: Russell King --- arch/arm/mach-u300/core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'arch/arm/mach-u300') diff --git a/arch/arm/mach-u300/core.c b/arch/arm/mach-u300/core.c index b4c6926a700c..ed9296796461 100644 --- a/arch/arm/mach-u300/core.c +++ b/arch/arm/mach-u300/core.c @@ -105,7 +105,7 @@ static struct amba_device uart0_device = { .end = U300_UART0_BASE + SZ_4K - 1, .flags = IORESOURCE_MEM, }, - .irq = { IRQ_U300_UART0, NO_IRQ }, + .irq = { IRQ_U300_UART0 }, }; /* The U335 have an additional UART1 on the APP CPU */ @@ -129,7 +129,7 @@ static struct amba_device uart1_device = { .end = U300_UART1_BASE + SZ_4K - 1, .flags = IORESOURCE_MEM, }, - .irq = { IRQ_U300_UART1, NO_IRQ }, + .irq = { IRQ_U300_UART1 }, }; #endif @@ -160,7 +160,7 @@ static struct amba_device pl022_device = { .end = U300_SPI_BASE + SZ_4K - 1, .flags = IORESOURCE_MEM, }, - .irq = {IRQ_U300_SPI, NO_IRQ }, + .irq = {IRQ_U300_SPI }, /* * This device has a DMA channel but the Linux driver does not use * it currently. -- cgit v1.2.3-55-g7522 From 6db2a457ddae7663a845fdb7aae84c6601f5c1b4 Mon Sep 17 00:00:00 2001 From: Russell King Date: Sun, 18 Dec 2011 15:26:38 +0000 Subject: ARM: amba: u300: use common amba device initializers Acked-by: Linus Walleij Signed-off-by: Russell King --- arch/arm/mach-u300/core.c | 85 +++++++++-------------------------------------- 1 file changed, 16 insertions(+), 69 deletions(-) (limited to 'arch/arm/mach-u300') diff --git a/arch/arm/mach-u300/core.c b/arch/arm/mach-u300/core.c index ed9296796461..b9865605da09 100644 --- a/arch/arm/mach-u300/core.c +++ b/arch/arm/mach-u300/core.c @@ -94,19 +94,9 @@ static struct amba_pl011_data uart0_plat_data = { #endif }; -static struct amba_device uart0_device = { - .dev = { - .coherent_dma_mask = ~0, - .init_name = "uart0", /* Slow device at 0x3000 offset */ - .platform_data = &uart0_plat_data, - }, - .res = { - .start = U300_UART0_BASE, - .end = U300_UART0_BASE + SZ_4K - 1, - .flags = IORESOURCE_MEM, - }, - .irq = { IRQ_U300_UART0 }, -}; +/* Slow device at 0x3000 offset */ +static AMBA_APB_DEVICE(uart0, "uart0", 0, U300_UART0_BASE, + { IRQ_U300_UART0 }, &uart0_plat_data); /* The U335 have an additional UART1 on the APP CPU */ #ifdef CONFIG_MACH_U300_BS335 @@ -118,71 +108,28 @@ static struct amba_pl011_data uart1_plat_data = { #endif }; -static struct amba_device uart1_device = { - .dev = { - .coherent_dma_mask = ~0, - .init_name = "uart1", /* Fast device at 0x7000 offset */ - .platform_data = &uart1_plat_data, - }, - .res = { - .start = U300_UART1_BASE, - .end = U300_UART1_BASE + SZ_4K - 1, - .flags = IORESOURCE_MEM, - }, - .irq = { IRQ_U300_UART1 }, -}; +/* Fast device at 0x7000 offset */ +static AMBA_APB_DEVICE(uart1, "uart1", 0, U300_UART1_BASE, + { IRQ_U300_UART1 }, &uart1_plat_data); #endif -static struct amba_device pl172_device = { - .dev = { - .init_name = "pl172", /* AHB device at 0x4000 offset */ - .platform_data = NULL, - }, - .res = { - .start = U300_EMIF_CFG_BASE, - .end = U300_EMIF_CFG_BASE + SZ_4K - 1, - .flags = IORESOURCE_MEM, - }, -}; +/* AHB device at 0x4000 offset */ +static AMBA_APB_DEVICE(pl172, "pl172", 0, U300_EMIF_CFG_BASE, { }, NULL); /* * Everything within this next ifdef deals with external devices connected to * the APP SPI bus. */ -static struct amba_device pl022_device = { - .dev = { - .coherent_dma_mask = ~0, - .init_name = "pl022", /* Fast device at 0x6000 offset */ - }, - .res = { - .start = U300_SPI_BASE, - .end = U300_SPI_BASE + SZ_4K - 1, - .flags = IORESOURCE_MEM, - }, - .irq = {IRQ_U300_SPI }, - /* - * This device has a DMA channel but the Linux driver does not use - * it currently. - */ -}; +/* Fast device at 0x6000 offset */ +static AMBA_APB_DEVICE(pl022, "pl022", 0, U300_SPI_BASE, + { IRQ_U300_SPI }, NULL); -static struct amba_device mmcsd_device = { - .dev = { - .init_name = "mmci", /* Fast device at 0x1000 offset */ - .platform_data = NULL, /* Added later */ - }, - .res = { - .start = U300_MMCSD_BASE, - .end = U300_MMCSD_BASE + SZ_4K - 1, - .flags = IORESOURCE_MEM, - }, - .irq = {IRQ_U300_MMCSD_MCIINTR0, IRQ_U300_MMCSD_MCIINTR1 }, - /* - * This device has a DMA channel but the Linux driver does not use - * it currently. - */ -}; +/* Fast device at 0x1000 offset */ +#define U300_MMCSD_IRQS { IRQ_U300_MMCSD_MCIINTR0, IRQ_U300_MMCSD_MCIINTR1 } + +static AMBA_APB_DEVICE(mmcsd, "mmci", 0, U300_MMCSD_BASE, + U300_MMCSD_IRQS, NULL); /* * The order of device declaration may be important, since some devices -- cgit v1.2.3-55-g7522