aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-dove/common.c
diff options
context:
space:
mode:
authorSaeed Bishara <saeed@marvell.com>2010-05-06 09:12:06 -0400
committerNicolas Pitre <nico@fluxnic.net>2010-07-16 22:01:59 -0400
commit16bc90af15da228f396b3dcd1f461663b0dde6a3 (patch)
tree638711eeb7e0dd2d599edd140b7ae24a3b85f84f /arch/arm/mach-dove/common.c
parentffd58bd2e45168de21d257d26ee32843b286d3b3 (diff)
[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.c61
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)
752 platform_device_register(&dove_xor11_channel); 752 platform_device_register(&dove_xor11_channel);
753} 753}
754 754
755/*****************************************************************************
756 * SDIO
757 ****************************************************************************/
758static u64 sdio_dmamask = DMA_BIT_MASK(32);
759
760static struct resource dove_sdio0_resources[] = {
761 {
762 .start = DOVE_SDIO0_PHYS_BASE,
763 .end = DOVE_SDIO0_PHYS_BASE + 0xff,
764 .flags = IORESOURCE_MEM,
765 }, {
766 .start = IRQ_DOVE_SDIO0,
767 .end = IRQ_DOVE_SDIO0,
768 .flags = IORESOURCE_IRQ,
769 },
770};
771
772static struct platform_device dove_sdio0 = {
773 .name = "sdhci-mv",
774 .id = 0,
775 .dev = {
776 .dma_mask = &sdio_dmamask,
777 .coherent_dma_mask = DMA_BIT_MASK(32),
778 },
779 .resource = dove_sdio0_resources,
780 .num_resources = ARRAY_SIZE(dove_sdio0_resources),
781};
782
783void __init dove_sdio0_init(void)
784{
785 platform_device_register(&dove_sdio0);
786}
787
788static struct resource dove_sdio1_resources[] = {
789 {
790 .start = DOVE_SDIO1_PHYS_BASE,
791 .end = DOVE_SDIO1_PHYS_BASE + 0xff,
792 .flags = IORESOURCE_MEM,
793 }, {
794 .start = IRQ_DOVE_SDIO1,
795 .end = IRQ_DOVE_SDIO1,
796 .flags = IORESOURCE_IRQ,
797 },
798};
799
800static struct platform_device dove_sdio1 = {
801 .name = "sdhci-mv",
802 .id = 1,
803 .dev = {
804 .dma_mask = &sdio_dmamask,
805 .coherent_dma_mask = DMA_BIT_MASK(32),
806 },
807 .resource = dove_sdio1_resources,
808 .num_resources = ARRAY_SIZE(dove_sdio1_resources),
809};
810
811void __init dove_sdio1_init(void)
812{
813 platform_device_register(&dove_sdio1);
814}
815
755void __init dove_init(void) 816void __init dove_init(void)
756{ 817{
757 int tclk; 818 int tclk;