diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-12-18 10:26:38 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2012-01-26 14:59:29 -0500 |
commit | 6db2a457ddae7663a845fdb7aae84c6601f5c1b4 (patch) | |
tree | 02bfa98f27cf458637b6b360e1adcbfa99ed6baf /arch/arm/mach-u300 | |
parent | e78b68ae76e54a7cbe09a696a9e595d40b1e3b62 (diff) |
ARM: amba: u300: use common amba device initializers
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-u300')
-rw-r--r-- | arch/arm/mach-u300/core.c | 85 |
1 files changed, 16 insertions, 69 deletions
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 = { | |||
94 | #endif | 94 | #endif |
95 | }; | 95 | }; |
96 | 96 | ||
97 | static struct amba_device uart0_device = { | 97 | /* Slow device at 0x3000 offset */ |
98 | .dev = { | 98 | static AMBA_APB_DEVICE(uart0, "uart0", 0, U300_UART0_BASE, |
99 | .coherent_dma_mask = ~0, | 99 | { IRQ_U300_UART0 }, &uart0_plat_data); |
100 | .init_name = "uart0", /* Slow device at 0x3000 offset */ | ||
101 | .platform_data = &uart0_plat_data, | ||
102 | }, | ||
103 | .res = { | ||
104 | .start = U300_UART0_BASE, | ||
105 | .end = U300_UART0_BASE + SZ_4K - 1, | ||
106 | .flags = IORESOURCE_MEM, | ||
107 | }, | ||
108 | .irq = { IRQ_U300_UART0 }, | ||
109 | }; | ||
110 | 100 | ||
111 | /* The U335 have an additional UART1 on the APP CPU */ | 101 | /* The U335 have an additional UART1 on the APP CPU */ |
112 | #ifdef CONFIG_MACH_U300_BS335 | 102 | #ifdef CONFIG_MACH_U300_BS335 |
@@ -118,71 +108,28 @@ static struct amba_pl011_data uart1_plat_data = { | |||
118 | #endif | 108 | #endif |
119 | }; | 109 | }; |
120 | 110 | ||
121 | static struct amba_device uart1_device = { | 111 | /* Fast device at 0x7000 offset */ |
122 | .dev = { | 112 | static AMBA_APB_DEVICE(uart1, "uart1", 0, U300_UART1_BASE, |
123 | .coherent_dma_mask = ~0, | 113 | { IRQ_U300_UART1 }, &uart1_plat_data); |
124 | .init_name = "uart1", /* Fast device at 0x7000 offset */ | ||
125 | .platform_data = &uart1_plat_data, | ||
126 | }, | ||
127 | .res = { | ||
128 | .start = U300_UART1_BASE, | ||
129 | .end = U300_UART1_BASE + SZ_4K - 1, | ||
130 | .flags = IORESOURCE_MEM, | ||
131 | }, | ||
132 | .irq = { IRQ_U300_UART1 }, | ||
133 | }; | ||
134 | #endif | 114 | #endif |
135 | 115 | ||
136 | static struct amba_device pl172_device = { | 116 | /* AHB device at 0x4000 offset */ |
137 | .dev = { | 117 | static AMBA_APB_DEVICE(pl172, "pl172", 0, U300_EMIF_CFG_BASE, { }, NULL); |
138 | .init_name = "pl172", /* AHB device at 0x4000 offset */ | ||
139 | .platform_data = NULL, | ||
140 | }, | ||
141 | .res = { | ||
142 | .start = U300_EMIF_CFG_BASE, | ||
143 | .end = U300_EMIF_CFG_BASE + SZ_4K - 1, | ||
144 | .flags = IORESOURCE_MEM, | ||
145 | }, | ||
146 | }; | ||
147 | 118 | ||
148 | 119 | ||
149 | /* | 120 | /* |
150 | * Everything within this next ifdef deals with external devices connected to | 121 | * Everything within this next ifdef deals with external devices connected to |
151 | * the APP SPI bus. | 122 | * the APP SPI bus. |
152 | */ | 123 | */ |
153 | static struct amba_device pl022_device = { | 124 | /* Fast device at 0x6000 offset */ |
154 | .dev = { | 125 | static AMBA_APB_DEVICE(pl022, "pl022", 0, U300_SPI_BASE, |
155 | .coherent_dma_mask = ~0, | 126 | { IRQ_U300_SPI }, NULL); |
156 | .init_name = "pl022", /* Fast device at 0x6000 offset */ | ||
157 | }, | ||
158 | .res = { | ||
159 | .start = U300_SPI_BASE, | ||
160 | .end = U300_SPI_BASE + SZ_4K - 1, | ||
161 | .flags = IORESOURCE_MEM, | ||
162 | }, | ||
163 | .irq = {IRQ_U300_SPI }, | ||
164 | /* | ||
165 | * This device has a DMA channel but the Linux driver does not use | ||
166 | * it currently. | ||
167 | */ | ||
168 | }; | ||
169 | 127 | ||
170 | static struct amba_device mmcsd_device = { | 128 | /* Fast device at 0x1000 offset */ |
171 | .dev = { | 129 | #define U300_MMCSD_IRQS { IRQ_U300_MMCSD_MCIINTR0, IRQ_U300_MMCSD_MCIINTR1 } |
172 | .init_name = "mmci", /* Fast device at 0x1000 offset */ | 130 | |
173 | .platform_data = NULL, /* Added later */ | 131 | static AMBA_APB_DEVICE(mmcsd, "mmci", 0, U300_MMCSD_BASE, |
174 | }, | 132 | U300_MMCSD_IRQS, NULL); |
175 | .res = { | ||
176 | .start = U300_MMCSD_BASE, | ||
177 | .end = U300_MMCSD_BASE + SZ_4K - 1, | ||
178 | .flags = IORESOURCE_MEM, | ||
179 | }, | ||
180 | .irq = {IRQ_U300_MMCSD_MCIINTR0, IRQ_U300_MMCSD_MCIINTR1 }, | ||
181 | /* | ||
182 | * This device has a DMA channel but the Linux driver does not use | ||
183 | * it currently. | ||
184 | */ | ||
185 | }; | ||
186 | 133 | ||
187 | /* | 134 | /* |
188 | * The order of device declaration may be important, since some devices | 135 | * The order of device declaration may be important, since some devices |