diff options
author | Manuel Lauss <mano@roarinelk.homelinux.net> | 2008-10-21 02:59:14 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2008-10-27 12:18:27 -0400 |
commit | f591eb1e6896e26675e91a319cc93f3800dbaad4 (patch) | |
tree | c3f925431a393b59e5fc9bee2ea77ac596ae19cc /arch/mips/alchemy/common/platform.c | |
parent | fa36b04386422951a7c73f9210403d1a2eaffe92 (diff) |
MIPS: Alchemy: Wire up SD controller on DB/PB1200 boards.
Add au1xmmc platform data for PB1200/DB1200 boards and wire up the 2 SD
controllers for them.
Signed-off-by: Manuel Lauss <mano@roarinelk.homelinux.net>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/alchemy/common/platform.c')
-rw-r--r-- | arch/mips/alchemy/common/platform.c | 98 |
1 files changed, 74 insertions, 24 deletions
diff --git a/arch/mips/alchemy/common/platform.c b/arch/mips/alchemy/common/platform.c index dc8a67efac28..5c76c6448e04 100644 --- a/arch/mips/alchemy/common/platform.c +++ b/arch/mips/alchemy/common/platform.c | |||
@@ -17,6 +17,8 @@ | |||
17 | #include <linux/init.h> | 17 | #include <linux/init.h> |
18 | 18 | ||
19 | #include <asm/mach-au1x00/au1xxx.h> | 19 | #include <asm/mach-au1x00/au1xxx.h> |
20 | #include <asm/mach-au1x00/au1xxx_dbdma.h> | ||
21 | #include <asm/mach-au1x00/au1100_mmc.h> | ||
20 | 22 | ||
21 | #define PORT(_base, _irq) \ | 23 | #define PORT(_base, _irq) \ |
22 | { \ | 24 | { \ |
@@ -163,24 +165,6 @@ static struct resource au1xxx_usb_gdt_resources[] = { | |||
163 | }, | 165 | }, |
164 | }; | 166 | }; |
165 | 167 | ||
166 | static struct resource au1xxx_mmc_resources[] = { | ||
167 | [0] = { | ||
168 | .start = SD0_PHYS_ADDR, | ||
169 | .end = SD0_PHYS_ADDR + 0x7ffff, | ||
170 | .flags = IORESOURCE_MEM, | ||
171 | }, | ||
172 | [1] = { | ||
173 | .start = SD1_PHYS_ADDR, | ||
174 | .end = SD1_PHYS_ADDR + 0x7ffff, | ||
175 | .flags = IORESOURCE_MEM, | ||
176 | }, | ||
177 | [2] = { | ||
178 | .start = AU1200_SD_INT, | ||
179 | .end = AU1200_SD_INT, | ||
180 | .flags = IORESOURCE_IRQ, | ||
181 | } | ||
182 | }; | ||
183 | |||
184 | static u64 udc_dmamask = DMA_32BIT_MASK; | 168 | static u64 udc_dmamask = DMA_32BIT_MASK; |
185 | 169 | ||
186 | static struct platform_device au1xxx_usb_gdt_device = { | 170 | static struct platform_device au1xxx_usb_gdt_device = { |
@@ -249,16 +233,79 @@ static struct platform_device au1200_lcd_device = { | |||
249 | 233 | ||
250 | static u64 au1xxx_mmc_dmamask = DMA_32BIT_MASK; | 234 | static u64 au1xxx_mmc_dmamask = DMA_32BIT_MASK; |
251 | 235 | ||
252 | static struct platform_device au1xxx_mmc_device = { | 236 | extern struct au1xmmc_platform_data au1xmmc_platdata[2]; |
237 | |||
238 | static struct resource au1200_mmc0_resources[] = { | ||
239 | [0] = { | ||
240 | .start = SD0_PHYS_ADDR, | ||
241 | .end = SD0_PHYS_ADDR + 0x7ffff, | ||
242 | .flags = IORESOURCE_MEM, | ||
243 | }, | ||
244 | [1] = { | ||
245 | .start = AU1200_SD_INT, | ||
246 | .end = AU1200_SD_INT, | ||
247 | .flags = IORESOURCE_IRQ, | ||
248 | }, | ||
249 | [2] = { | ||
250 | .start = DSCR_CMD0_SDMS_TX0, | ||
251 | .end = DSCR_CMD0_SDMS_TX0, | ||
252 | .flags = IORESOURCE_DMA, | ||
253 | }, | ||
254 | [3] = { | ||
255 | .start = DSCR_CMD0_SDMS_RX0, | ||
256 | .end = DSCR_CMD0_SDMS_RX0, | ||
257 | .flags = IORESOURCE_DMA, | ||
258 | } | ||
259 | }; | ||
260 | |||
261 | static struct platform_device au1200_mmc0_device = { | ||
253 | .name = "au1xxx-mmc", | 262 | .name = "au1xxx-mmc", |
254 | .id = 0, | 263 | .id = 0, |
255 | .dev = { | 264 | .dev = { |
256 | .dma_mask = &au1xxx_mmc_dmamask, | 265 | .dma_mask = &au1xxx_mmc_dmamask, |
257 | .coherent_dma_mask = DMA_32BIT_MASK, | 266 | .coherent_dma_mask = DMA_32BIT_MASK, |
267 | .platform_data = &au1xmmc_platdata[0], | ||
258 | }, | 268 | }, |
259 | .num_resources = ARRAY_SIZE(au1xxx_mmc_resources), | 269 | .num_resources = ARRAY_SIZE(au1200_mmc0_resources), |
260 | .resource = au1xxx_mmc_resources, | 270 | .resource = au1200_mmc0_resources, |
261 | }; | 271 | }; |
272 | |||
273 | #ifndef CONFIG_MIPS_DB1200 | ||
274 | static struct resource au1200_mmc1_resources[] = { | ||
275 | [0] = { | ||
276 | .start = SD1_PHYS_ADDR, | ||
277 | .end = SD1_PHYS_ADDR + 0x7ffff, | ||
278 | .flags = IORESOURCE_MEM, | ||
279 | }, | ||
280 | [1] = { | ||
281 | .start = AU1200_SD_INT, | ||
282 | .end = AU1200_SD_INT, | ||
283 | .flags = IORESOURCE_IRQ, | ||
284 | }, | ||
285 | [2] = { | ||
286 | .start = DSCR_CMD0_SDMS_TX1, | ||
287 | .end = DSCR_CMD0_SDMS_TX1, | ||
288 | .flags = IORESOURCE_DMA, | ||
289 | }, | ||
290 | [3] = { | ||
291 | .start = DSCR_CMD0_SDMS_RX1, | ||
292 | .end = DSCR_CMD0_SDMS_RX1, | ||
293 | .flags = IORESOURCE_DMA, | ||
294 | } | ||
295 | }; | ||
296 | |||
297 | static struct platform_device au1200_mmc1_device = { | ||
298 | .name = "au1xxx-mmc", | ||
299 | .id = 1, | ||
300 | .dev = { | ||
301 | .dma_mask = &au1xxx_mmc_dmamask, | ||
302 | .coherent_dma_mask = DMA_32BIT_MASK, | ||
303 | .platform_data = &au1xmmc_platdata[1], | ||
304 | }, | ||
305 | .num_resources = ARRAY_SIZE(au1200_mmc1_resources), | ||
306 | .resource = au1200_mmc1_resources, | ||
307 | }; | ||
308 | #endif /* #ifndef CONFIG_MIPS_DB1200 */ | ||
262 | #endif /* #ifdef CONFIG_SOC_AU1200 */ | 309 | #endif /* #ifdef CONFIG_SOC_AU1200 */ |
263 | 310 | ||
264 | static struct platform_device au1x00_pcmcia_device = { | 311 | static struct platform_device au1x00_pcmcia_device = { |
@@ -296,7 +343,10 @@ static struct platform_device *au1xxx_platform_devices[] __initdata = { | |||
296 | &au1xxx_usb_gdt_device, | 343 | &au1xxx_usb_gdt_device, |
297 | &au1xxx_usb_otg_device, | 344 | &au1xxx_usb_otg_device, |
298 | &au1200_lcd_device, | 345 | &au1200_lcd_device, |
299 | &au1xxx_mmc_device, | 346 | &au1200_mmc0_device, |
347 | #ifndef CONFIG_MIPS_DB1200 | ||
348 | &au1200_mmc1_device, | ||
349 | #endif | ||
300 | #endif | 350 | #endif |
301 | #ifdef SMBUS_PSC_BASE | 351 | #ifdef SMBUS_PSC_BASE |
302 | &pbdb_smbus_device, | 352 | &pbdb_smbus_device, |