diff mbox

[4/4] DA8xx: Add MMCSD1 resources, platform device and convenience registration function

Message ID C681C76E0D5F1E4BB01DE79E0A80EEC70287E7C2@usrdes03.ebgroup.elektrobit.com (mailing list archive)
State Superseded, archived
Headers show

Commit Message

Juha.Kuikka@elektrobit.com Aug. 16, 2010, 8:06 p.m. UTC
None
diff mbox

Patch

diff --git a/arch/arm/mach-davinci/devices-da8xx.c
b/arch/arm/mach-davinci/devices-da8xx.c
old mode 100644
new mode 100755
index 52bc7b1..9e1a8be
--- a/arch/arm/mach-davinci/devices-da8xx.c
+++ b/arch/arm/mach-davinci/devices-da8xx.c
@@ -566,6 +566,42 @@  int __init da8xx_register_mmcsd0(struct
davinci_mmc_config *config)
        return platform_device_register(&da8xx_mmcsd0_device);
 }

+static struct resource da8xx_mmcsd1_resources[] = {
+       {               /* registers */
+               .start  = DA8XX_MMCSD1_BASE,
+               .end    = DA8XX_MMCSD1_BASE + SZ_4K - 1,
+               .flags  = IORESOURCE_MEM,
+       },
+       {               /* interrupt */
+               .start  = IRQ_DA850_MMCSDINT0_1,
+               .end    = IRQ_DA850_MMCSDINT0_1,
+               .flags  = IORESOURCE_IRQ,
+       },
+       {               /* DMA RX */
+               .start  = EDMA_CTLR_CHAN(1, 28),
+               .end    = EDMA_CTLR_CHAN(1, 28),
+               .flags  = IORESOURCE_DMA,
+       },
+       {               /* DMA TX */
+               .start  = EDMA_CTLR_CHAN(1, 29),
+               .end    = EDMA_CTLR_CHAN(1, 29),
+               .flags  = IORESOURCE_DMA,
+       },
+};
+
+static struct platform_device da8xx_mmcsd1_device = {
+       .name           = "davinci_mmc",
+       .id             = 1,
+       .num_resources  = ARRAY_SIZE(da8xx_mmcsd1_resources),
+       .resource       = da8xx_mmcsd1_resources,
+};
+
+int __init da8xx_register_mmcsd1(struct davinci_mmc_config *config)
+{
+       da8xx_mmcsd1_device.dev.platform_data = config;
+       return platform_device_register(&da8xx_mmcsd1_device);
+}
+
 static struct resource da8xx_rtc_resources[] = {
        {