diff options
author | Saeed Bishara <saeed@marvell.com> | 2010-05-06 09:12:06 -0400 |
---|---|---|
committer | Nicolas Pitre <nico@fluxnic.net> | 2010-07-16 22:01:59 -0400 |
commit | 16bc90af15da228f396b3dcd1f461663b0dde6a3 (patch) | |
tree | 638711eeb7e0dd2d599edd140b7ae24a3b85f84f /arch | |
parent | ffd58bd2e45168de21d257d26ee32843b286d3b3 (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')
-rw-r--r-- | arch/arm/mach-dove/common.c | 61 | ||||
-rw-r--r-- | arch/arm/mach-dove/common.h | 2 | ||||
-rw-r--r-- | arch/arm/mach-dove/dove-db-setup.c | 2 |
3 files changed, 65 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 | ****************************************************************************/ | ||
758 | static u64 sdio_dmamask = DMA_BIT_MASK(32); | ||
759 | |||
760 | static 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 | |||
772 | static 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 | |||
783 | void __init dove_sdio0_init(void) | ||
784 | { | ||
785 | platform_device_register(&dove_sdio0); | ||
786 | } | ||
787 | |||
788 | static 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 | |||
800 | static 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 | |||
811 | void __init dove_sdio1_init(void) | ||
812 | { | ||
813 | platform_device_register(&dove_sdio1); | ||
814 | } | ||
815 | |||
755 | void __init dove_init(void) | 816 | void __init dove_init(void) |
756 | { | 817 | { |
757 | int tclk; | 818 | int tclk; |
diff --git a/arch/arm/mach-dove/common.h b/arch/arm/mach-dove/common.h index b29e8937de4f..a51517c3fe76 100644 --- a/arch/arm/mach-dove/common.h +++ b/arch/arm/mach-dove/common.h | |||
@@ -36,5 +36,7 @@ void dove_uart3_init(void); | |||
36 | void dove_spi0_init(void); | 36 | void dove_spi0_init(void); |
37 | void dove_spi1_init(void); | 37 | void dove_spi1_init(void); |
38 | void dove_i2c_init(void); | 38 | void dove_i2c_init(void); |
39 | void dove_sdio0_init(void); | ||
40 | void dove_sdio1_init(void); | ||
39 | 41 | ||
40 | #endif | 42 | #endif |
diff --git a/arch/arm/mach-dove/dove-db-setup.c b/arch/arm/mach-dove/dove-db-setup.c index f2971b745224..bef70460fbc6 100644 --- a/arch/arm/mach-dove/dove-db-setup.c +++ b/arch/arm/mach-dove/dove-db-setup.c | |||
@@ -82,6 +82,8 @@ static void __init dove_db_init(void) | |||
82 | dove_ehci0_init(); | 82 | dove_ehci0_init(); |
83 | dove_ehci1_init(); | 83 | dove_ehci1_init(); |
84 | dove_sata_init(&dove_db_sata_data); | 84 | dove_sata_init(&dove_db_sata_data); |
85 | dove_sdio0_init(); | ||
86 | dove_sdio1_init(); | ||
85 | dove_spi0_init(); | 87 | dove_spi0_init(); |
86 | dove_spi1_init(); | 88 | dove_spi1_init(); |
87 | dove_uart0_init(); | 89 | dove_uart0_init(); |