diff options
author | Saeed Bishara <saeed@marvell.com> | 2010-05-06 17:12:06 +0400 |
---|---|---|
committer | Nicolas Pitre <nico@fluxnic.net> | 2010-07-17 06:01:59 +0400 |
commit | 16bc90af15da228f396b3dcd1f461663b0dde6a3 (patch) | |
tree | 638711eeb7e0dd2d599edd140b7ae24a3b85f84f /arch/arm/mach-dove/common.c | |
parent | ffd58bd2e45168de21d257d26ee32843b286d3b3 (diff) | |
download | linux-16bc90af15da228f396b3dcd1f461663b0dde6a3.tar.xz |
[ARM] Dove: platform device registration for the sdio interfaces
Signed-off-by: Saeed Bishara <saeed@marvell.com>
Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
Diffstat (limited to 'arch/arm/mach-dove/common.c')
-rw-r--r-- | arch/arm/mach-dove/common.c | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/arch/arm/mach-dove/common.c b/arch/arm/mach-dove/common.c index 5da2cf402c81..f7a12586a1f5 100644 --- a/arch/arm/mach-dove/common.c +++ b/arch/arm/mach-dove/common.c @@ -752,6 +752,67 @@ void __init dove_xor1_init(void) platform_device_register(&dove_xor11_channel); } +/***************************************************************************** + * SDIO + ****************************************************************************/ +static u64 sdio_dmamask = DMA_BIT_MASK(32); + +static struct resource dove_sdio0_resources[] = { + { + .start = DOVE_SDIO0_PHYS_BASE, + .end = DOVE_SDIO0_PHYS_BASE + 0xff, + .flags = IORESOURCE_MEM, + }, { + .start = IRQ_DOVE_SDIO0, + .end = IRQ_DOVE_SDIO0, + .flags = IORESOURCE_IRQ, + }, +}; + +static struct platform_device dove_sdio0 = { + .name = "sdhci-mv", + .id = 0, + .dev = { + .dma_mask = &sdio_dmamask, + .coherent_dma_mask = DMA_BIT_MASK(32), + }, + .resource = dove_sdio0_resources, + .num_resources = ARRAY_SIZE(dove_sdio0_resources), +}; + +void __init dove_sdio0_init(void) +{ + platform_device_register(&dove_sdio0); +} + +static struct resource dove_sdio1_resources[] = { + { + .start = DOVE_SDIO1_PHYS_BASE, + .end = DOVE_SDIO1_PHYS_BASE + 0xff, + .flags = IORESOURCE_MEM, + }, { + .start = IRQ_DOVE_SDIO1, + .end = IRQ_DOVE_SDIO1, + .flags = IORESOURCE_IRQ, + }, +}; + +static struct platform_device dove_sdio1 = { + .name = "sdhci-mv", + .id = 1, + .dev = { + .dma_mask = &sdio_dmamask, + .coherent_dma_mask = DMA_BIT_MASK(32), + }, + .resource = dove_sdio1_resources, + .num_resources = ARRAY_SIZE(dove_sdio1_resources), +}; + +void __init dove_sdio1_init(void) +{ + platform_device_register(&dove_sdio1); +} + void __init dove_init(void) { int tclk; |