diff options
author | Juha Kuikka <juha.kuikka@elektrobit.com> | 2010-08-26 15:40:47 -0400 |
---|---|---|
committer | Kevin Hilman <khilman@deeprootsystems.com> | 2010-09-24 10:40:26 -0400 |
commit | b8241aef7eb54c6e5126b3aa309c2cf0f343c52d (patch) | |
tree | d73869c0d4f34fdbee0625c941f4580d30b73110 /arch | |
parent | 051a6687336d3310abc85991db7a8917ecc603fc (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')
-rw-r--r-- | arch/arm/mach-davinci/devices-da8xx.c | 39 | ||||
-rw-r--r-- | arch/arm/mach-davinci/include/mach/da8xx.h | 1 |
2 files changed, 40 insertions, 0 deletions
diff --git a/arch/arm/mach-davinci/devices-da8xx.c b/arch/arm/mach-davinci/devices-da8xx.c index 52bc7b1c6ca3..caeb7f4a3a6d 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 | ||
571 | static 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 | |||
594 | static 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 | |||
601 | int __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 | |||
569 | static struct resource da8xx_rtc_resources[] = { | 608 | static struct resource da8xx_rtc_resources[] = { |
570 | { | 609 | { |
571 | .start = DA8XX_RTC_BASE, | 610 | .start = DA8XX_RTC_BASE, |
diff --git a/arch/arm/mach-davinci/include/mach/da8xx.h b/arch/arm/mach-davinci/include/mach/da8xx.h index 504f2f62066c..4247b3f53b33 100644 --- a/arch/arm/mach-davinci/include/mach/da8xx.h +++ b/arch/arm/mach-davinci/include/mach/da8xx.h | |||
@@ -76,6 +76,7 @@ int da8xx_register_usb11(struct da8xx_ohci_root_hub *pdata); | |||
76 | int da8xx_register_emac(void); | 76 | int da8xx_register_emac(void); |
77 | int da8xx_register_lcdc(struct da8xx_lcdc_platform_data *pdata); | 77 | int da8xx_register_lcdc(struct da8xx_lcdc_platform_data *pdata); |
78 | int da8xx_register_mmcsd0(struct davinci_mmc_config *config); | 78 | int da8xx_register_mmcsd0(struct davinci_mmc_config *config); |
79 | int da850_register_mmcsd1(struct davinci_mmc_config *config); | ||
79 | void __init da8xx_register_mcasp(int id, struct snd_platform_data *pdata); | 80 | void __init da8xx_register_mcasp(int id, struct snd_platform_data *pdata); |
80 | int da8xx_register_rtc(void); | 81 | int da8xx_register_rtc(void); |
81 | int da850_register_cpufreq(char *async_clk); | 82 | int da850_register_cpufreq(char *async_clk); |