Commit 2f64ccd9 authored by Russell King's avatar Russell King

ARM: amba: integrator: use common amba device initializers

Tested-by: default avatarWill Deacon <will.deacon@arm.com>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent 9199340b
...@@ -35,67 +35,23 @@ ...@@ -35,67 +35,23 @@
static struct amba_pl010_data integrator_uart_data; static struct amba_pl010_data integrator_uart_data;
static struct amba_device rtc_device = { #define INTEGRATOR_RTC_IRQ { IRQ_RTCINT }
.dev = { #define INTEGRATOR_UART0_IRQ { IRQ_UARTINT0 }
.init_name = "mb:15", #define INTEGRATOR_UART1_IRQ { IRQ_UARTINT1 }
}, #define KMI0_IRQ { IRQ_KMIINT0 }
.res = { #define KMI1_IRQ { IRQ_KMIINT1 }
.start = INTEGRATOR_RTC_BASE,
.end = INTEGRATOR_RTC_BASE + SZ_4K - 1,
.flags = IORESOURCE_MEM,
},
.irq = { IRQ_RTCINT },
};
static struct amba_device uart0_device = { static AMBA_APB_DEVICE(rtc, "mb:15", 0,
.dev = { INTEGRATOR_RTC_BASE, INTEGRATOR_RTC_IRQ, NULL);
.init_name = "mb:16",
.platform_data = &integrator_uart_data,
},
.res = {
.start = INTEGRATOR_UART0_BASE,
.end = INTEGRATOR_UART0_BASE + SZ_4K - 1,
.flags = IORESOURCE_MEM,
},
.irq = { IRQ_UARTINT0 },
};
static struct amba_device uart1_device = { static AMBA_APB_DEVICE(uart0, "mb:16", 0,
.dev = { INTEGRATOR_UART0_BASE, INTEGRATOR_UART0_IRQ, &integrator_uart_data);
.init_name = "mb:17",
.platform_data = &integrator_uart_data,
},
.res = {
.start = INTEGRATOR_UART1_BASE,
.end = INTEGRATOR_UART1_BASE + SZ_4K - 1,
.flags = IORESOURCE_MEM,
},
.irq = { IRQ_UARTINT1 },
};
static struct amba_device kmi0_device = { static AMBA_APB_DEVICE(uart1, "mb:17", 0,
.dev = { INTEGRATOR_UART1_BASE, INTEGRATOR_UART1_IRQ, &integrator_uart_data);
.init_name = "mb:18",
},
.res = {
.start = KMI0_BASE,
.end = KMI0_BASE + SZ_4K - 1,
.flags = IORESOURCE_MEM,
},
.irq = { IRQ_KMIINT0 },
};
static struct amba_device kmi1_device = { static AMBA_APB_DEVICE(kmi0, "mb:18", 0, KMI0_BASE, KMI0_IRQ, NULL);
.dev = { static AMBA_APB_DEVICE(kmi1, "mb:19", 0, KMI1_BASE, KMI1_IRQ, NULL);
.init_name = "mb:19",
},
.res = {
.start = KMI1_BASE,
.end = KMI1_BASE + SZ_4K - 1,
.flags = IORESOURCE_MEM,
},
.irq = { IRQ_KMIINT1 },
};
static struct amba_device *amba_devs[] __initdata = { static struct amba_device *amba_devs[] __initdata = {
&rtc_device, &rtc_device,
......
...@@ -347,32 +347,14 @@ static struct mmci_platform_data mmc_data = { ...@@ -347,32 +347,14 @@ static struct mmci_platform_data mmc_data = {
.gpio_cd = -1, .gpio_cd = -1,
}; };
static struct amba_device mmc_device = { #define INTEGRATOR_CP_MMC_IRQS { IRQ_CP_MMCIINT0, IRQ_CP_MMCIINT1 }
.dev = { #define INTEGRATOR_CP_AACI_IRQS { IRQ_CP_AACIINT }
.init_name = "mb:1c",
.platform_data = &mmc_data,
},
.res = {
.start = INTEGRATOR_CP_MMC_BASE,
.end = INTEGRATOR_CP_MMC_BASE + SZ_4K - 1,
.flags = IORESOURCE_MEM,
},
.irq = { IRQ_CP_MMCIINT0, IRQ_CP_MMCIINT1 },
.periphid = 0,
};
static struct amba_device aaci_device = { static AMBA_APB_DEVICE(mmc, "mb:1c", 0, INTEGRATOR_CP_MMC_BASE,
.dev = { INTEGRATOR_CP_MMC_IRQS, &mmc_data);
.init_name = "mb:1d",
}, static AMBA_APB_DEVICE(aaci, "mb:1d", 0, INTEGRATOR_CP_AACI_BASE,
.res = { INTEGRATOR_CP_AACI_IRQS, NULL);
.start = INTEGRATOR_CP_AACI_BASE,
.end = INTEGRATOR_CP_AACI_BASE + SZ_4K - 1,
.flags = IORESOURCE_MEM,
},
.irq = { IRQ_CP_AACIINT },
.periphid = 0,
};
/* /*
...@@ -425,21 +407,8 @@ static struct clcd_board clcd_data = { ...@@ -425,21 +407,8 @@ static struct clcd_board clcd_data = {
.remove = versatile_clcd_remove_dma, .remove = versatile_clcd_remove_dma,
}; };
static struct amba_device clcd_device = { static AMBA_AHB_DEVICE(clcd, "mb:c0", 0, INTCP_PA_CLCD_BASE,
.dev = { { IRQ_CP_CLCDCINT }, &clcd_data);
.init_name = "mb:c0",
.coherent_dma_mask = ~0,
.platform_data = &clcd_data,
},
.res = {
.start = INTCP_PA_CLCD_BASE,
.end = INTCP_PA_CLCD_BASE + SZ_4K - 1,
.flags = IORESOURCE_MEM,
},
.dma_mask = ~0,
.irq = { IRQ_CP_CLCDCINT },
.periphid = 0,
};
static struct amba_device *amba_devs[] __initdata = { static struct amba_device *amba_devs[] __initdata = {
&mmc_device, &mmc_device,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment