diff options
author | Nicolas Pitre <nico@cam.org> | 2009-02-14 03:15:55 -0500 |
---|---|---|
committer | Nicolas Pitre <nico@cam.org> | 2009-02-26 20:22:26 -0500 |
commit | 8235ee009cd839265f5dc2dace2758471a823e68 (patch) | |
tree | 922072825553b5059f6532d1eaeb2308835d6a39 /arch/arm/mach-kirkwood/common.c | |
parent | 75bb6b9aab3255f440ef4e72a31978d1681105d6 (diff) |
[ARM] Kirkwood: SDIO driver registration for DB6281 and RD6281
Signed-off-by: Nicolas Pitre <nico@marvell.com>
Diffstat (limited to 'arch/arm/mach-kirkwood/common.c')
-rw-r--r-- | arch/arm/mach-kirkwood/common.c | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/arch/arm/mach-kirkwood/common.c b/arch/arm/mach-kirkwood/common.c index b3404b7775b3..e5076aae1c6b 100644 --- a/arch/arm/mach-kirkwood/common.c +++ b/arch/arm/mach-kirkwood/common.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <mach/kirkwood.h> | 24 | #include <mach/kirkwood.h> |
25 | #include <plat/cache-feroceon-l2.h> | 25 | #include <plat/cache-feroceon-l2.h> |
26 | #include <plat/ehci-orion.h> | 26 | #include <plat/ehci-orion.h> |
27 | #include <plat/mvsdio.h> | ||
27 | #include <plat/mv_xor.h> | 28 | #include <plat/mv_xor.h> |
28 | #include <plat/orion_nand.h> | 29 | #include <plat/orion_nand.h> |
29 | #include <plat/time.h> | 30 | #include <plat/time.h> |
@@ -296,6 +297,50 @@ void __init kirkwood_sata_init(struct mv_sata_platform_data *sata_data) | |||
296 | 297 | ||
297 | 298 | ||
298 | /***************************************************************************** | 299 | /***************************************************************************** |
300 | * SD/SDIO/MMC | ||
301 | ****************************************************************************/ | ||
302 | static struct resource mvsdio_resources[] = { | ||
303 | [0] = { | ||
304 | .start = SDIO_PHYS_BASE, | ||
305 | .end = SDIO_PHYS_BASE + SZ_1K - 1, | ||
306 | .flags = IORESOURCE_MEM, | ||
307 | }, | ||
308 | [1] = { | ||
309 | .start = IRQ_KIRKWOOD_SDIO, | ||
310 | .end = IRQ_KIRKWOOD_SDIO, | ||
311 | .flags = IORESOURCE_IRQ, | ||
312 | }, | ||
313 | }; | ||
314 | |||
315 | static u64 mvsdio_dmamask = 0xffffffffUL; | ||
316 | |||
317 | static struct platform_device kirkwood_sdio = { | ||
318 | .name = "mvsdio", | ||
319 | .id = -1, | ||
320 | .dev = { | ||
321 | .dma_mask = &mvsdio_dmamask, | ||
322 | .coherent_dma_mask = 0xffffffff, | ||
323 | }, | ||
324 | .num_resources = ARRAY_SIZE(mvsdio_resources), | ||
325 | .resource = mvsdio_resources, | ||
326 | }; | ||
327 | |||
328 | void __init kirkwood_sdio_init(struct mvsdio_platform_data *mvsdio_data) | ||
329 | { | ||
330 | u32 dev, rev; | ||
331 | |||
332 | kirkwood_pcie_id(&dev, &rev); | ||
333 | if (rev == 0) /* catch all Kirkwood Z0's */ | ||
334 | mvsdio_data->clock = 100000000; | ||
335 | else | ||
336 | mvsdio_data->clock = 200000000; | ||
337 | mvsdio_data->dram = &kirkwood_mbus_dram_info; | ||
338 | kirkwood_sdio.dev.platform_data = mvsdio_data; | ||
339 | platform_device_register(&kirkwood_sdio); | ||
340 | } | ||
341 | |||
342 | |||
343 | /***************************************************************************** | ||
299 | * SPI | 344 | * SPI |
300 | ****************************************************************************/ | 345 | ****************************************************************************/ |
301 | static struct orion_spi_info kirkwood_spi_plat_data = { | 346 | static struct orion_spi_info kirkwood_spi_plat_data = { |