aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-davinci/devices-da8xx.c
diff options
context:
space:
mode:
authorJuha Kuikka <juha.kuikka@elektrobit.com>2010-08-26 15:40:47 -0400
committerKevin Hilman <khilman@deeprootsystems.com>2010-09-24 10:40:26 -0400
commitb8241aef7eb54c6e5126b3aa309c2cf0f343c52d (patch)
treed73869c0d4f34fdbee0625c941f4580d30b73110 /arch/arm/mach-davinci/devices-da8xx.c
parent051a6687336d3310abc85991db7a8917ecc603fc (diff)
DA850: Add MMCSD1 resources, platform device and convenience registration function
Add resources, platform device and convenience registration function for DA850's second MMC/SD controller (MMCSD1). Signed-off-by: Juha Kuikka <juha.kuikka@elektrobit.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Diffstat (limited to 'arch/arm/mach-davinci/devices-da8xx.c')
-rw-r--r--arch/arm/mach-davinci/devices-da8xx.c39
1 files changed, 39 insertions, 0 deletions
diff --git a/arch/arm/mach-davinci/devices-da8xx.c b/arch/arm/mach-davinci/devices-da8xx.c
index 52bc7b1c6ca..caeb7f4a3a6 100644
--- a/arch/arm/mach-davinci/devices-da8xx.c
+++ b/arch/arm/mach-davinci/devices-da8xx.c
@@ -24,6 +24,7 @@
24#include "clock.h" 24#include "clock.h"
25 25
26#define DA8XX_TPCC_BASE 0x01c00000 26#define DA8XX_TPCC_BASE 0x01c00000
27#define DA850_MMCSD1_BASE 0x01e1b000
27#define DA850_TPCC1_BASE 0x01e30000 28#define DA850_TPCC1_BASE 0x01e30000
28#define DA8XX_TPTC0_BASE 0x01c08000 29#define DA8XX_TPTC0_BASE 0x01c08000
29#define DA8XX_TPTC1_BASE 0x01c08400 30#define DA8XX_TPTC1_BASE 0x01c08400
@@ -566,6 +567,44 @@ int __init da8xx_register_mmcsd0(struct davinci_mmc_config *config)
566 return platform_device_register(&da8xx_mmcsd0_device); 567 return platform_device_register(&da8xx_mmcsd0_device);
567} 568}
568 569
570#ifdef CONFIG_ARCH_DAVINCI_DA850
571static struct resource da850_mmcsd1_resources[] = {
572 { /* registers */
573 .start = DA850_MMCSD1_BASE,
574 .end = DA850_MMCSD1_BASE + SZ_4K - 1,
575 .flags = IORESOURCE_MEM,
576 },
577 { /* interrupt */
578 .start = IRQ_DA850_MMCSDINT0_1,
579 .end = IRQ_DA850_MMCSDINT0_1,
580 .flags = IORESOURCE_IRQ,
581 },
582 { /* DMA RX */
583 .start = EDMA_CTLR_CHAN(1, 28),
584 .end = EDMA_CTLR_CHAN(1, 28),
585 .flags = IORESOURCE_DMA,
586 },
587 { /* DMA TX */
588 .start = EDMA_CTLR_CHAN(1, 29),
589 .end = EDMA_CTLR_CHAN(1, 29),
590 .flags = IORESOURCE_DMA,
591 },
592};
593
594static struct platform_device da850_mmcsd1_device = {
595 .name = "davinci_mmc",
596 .id = 1,
597 .num_resources = ARRAY_SIZE(da850_mmcsd1_resources),
598 .resource = da850_mmcsd1_resources,
599};
600
601int __init da850_register_mmcsd1(struct davinci_mmc_config *config)
602{
603 da850_mmcsd1_device.dev.platform_data = config;
604 return platform_device_register(&da850_mmcsd1_device);
605}
606#endif
607
569static struct resource da8xx_rtc_resources[] = { 608static struct resource da8xx_rtc_resources[] = {
570 { 609 {
571 .start = DA8XX_RTC_BASE, 610 .start = DA8XX_RTC_BASE,