diff options
author | Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> | 2011-02-25 02:40:27 -0500 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2011-03-10 22:36:29 -0500 |
commit | 65f63eab38626a79f8a54d13686680a1ea898f72 (patch) | |
tree | 021fad5aaa55b9dc685f5dcc78a4d25e26ec3597 /arch/sh | |
parent | 8ac53ed537a4a32d81279d37476bfaeb2aff15ab (diff) |
sh: add platform_device of tmio_mmc and sh_mmcif to sh7757lcr
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh')
-rw-r--r-- | arch/sh/boards/board-sh7757lcr.c | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/arch/sh/boards/board-sh7757lcr.c b/arch/sh/boards/board-sh7757lcr.c index be5f5cf62bd8..80e502c86625 100644 --- a/arch/sh/boards/board-sh7757lcr.c +++ b/arch/sh/boards/board-sh7757lcr.c | |||
@@ -15,6 +15,9 @@ | |||
15 | #include <linux/spi/spi.h> | 15 | #include <linux/spi/spi.h> |
16 | #include <linux/spi/flash.h> | 16 | #include <linux/spi/flash.h> |
17 | #include <linux/io.h> | 17 | #include <linux/io.h> |
18 | #include <linux/mmc/host.h> | ||
19 | #include <linux/mmc/sh_mmcif.h> | ||
20 | #include <linux/mfd/sh_mobile_sdhi.h> | ||
18 | #include <cpu/sh7757.h> | 21 | #include <cpu/sh7757.h> |
19 | #include <asm/sh_eth.h> | 22 | #include <asm/sh_eth.h> |
20 | #include <asm/heartbeat.h> | 23 | #include <asm/heartbeat.h> |
@@ -98,10 +101,80 @@ static struct platform_device sh7757_eth1_device = { | |||
98 | }, | 101 | }, |
99 | }; | 102 | }; |
100 | 103 | ||
104 | /* SH_MMCIF */ | ||
105 | static struct resource sh_mmcif_resources[] = { | ||
106 | [0] = { | ||
107 | .start = 0xffcb0000, | ||
108 | .end = 0xffcb00ff, | ||
109 | .flags = IORESOURCE_MEM, | ||
110 | }, | ||
111 | [1] = { | ||
112 | .start = 211, | ||
113 | .flags = IORESOURCE_IRQ, | ||
114 | }, | ||
115 | [2] = { | ||
116 | .start = 212, | ||
117 | .flags = IORESOURCE_IRQ, | ||
118 | }, | ||
119 | }; | ||
120 | |||
121 | static struct sh_mmcif_dma sh7757lcr_mmcif_dma = { | ||
122 | .chan_priv_tx = SHDMA_SLAVE_MMCIF_TX, | ||
123 | .chan_priv_rx = SHDMA_SLAVE_MMCIF_RX, | ||
124 | }; | ||
125 | |||
126 | static struct sh_mmcif_plat_data sh_mmcif_plat = { | ||
127 | .dma = &sh7757lcr_mmcif_dma, | ||
128 | .sup_pclk = 0x0f, | ||
129 | .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA, | ||
130 | .ocr = MMC_VDD_32_33 | MMC_VDD_33_34, | ||
131 | }; | ||
132 | |||
133 | static struct platform_device sh_mmcif_device = { | ||
134 | .name = "sh_mmcif", | ||
135 | .id = 0, | ||
136 | .dev = { | ||
137 | .platform_data = &sh_mmcif_plat, | ||
138 | }, | ||
139 | .num_resources = ARRAY_SIZE(sh_mmcif_resources), | ||
140 | .resource = sh_mmcif_resources, | ||
141 | }; | ||
142 | |||
143 | /* SDHI0 */ | ||
144 | static struct sh_mobile_sdhi_info sdhi_info = { | ||
145 | .dma_slave_tx = SHDMA_SLAVE_SDHI_TX, | ||
146 | .dma_slave_rx = SHDMA_SLAVE_SDHI_RX, | ||
147 | .tmio_caps = MMC_CAP_SD_HIGHSPEED, | ||
148 | }; | ||
149 | |||
150 | static struct resource sdhi_resources[] = { | ||
151 | [0] = { | ||
152 | .start = 0xffe50000, | ||
153 | .end = 0xffe501ff, | ||
154 | .flags = IORESOURCE_MEM, | ||
155 | }, | ||
156 | [1] = { | ||
157 | .start = 20, | ||
158 | .flags = IORESOURCE_IRQ, | ||
159 | }, | ||
160 | }; | ||
161 | |||
162 | static struct platform_device sdhi_device = { | ||
163 | .name = "sh_mobile_sdhi", | ||
164 | .num_resources = ARRAY_SIZE(sdhi_resources), | ||
165 | .resource = sdhi_resources, | ||
166 | .id = 0, | ||
167 | .dev = { | ||
168 | .platform_data = &sdhi_info, | ||
169 | }, | ||
170 | }; | ||
171 | |||
101 | static struct platform_device *sh7757lcr_devices[] __initdata = { | 172 | static struct platform_device *sh7757lcr_devices[] __initdata = { |
102 | &heartbeat_device, | 173 | &heartbeat_device, |
103 | &sh7757_eth0_device, | 174 | &sh7757_eth0_device, |
104 | &sh7757_eth1_device, | 175 | &sh7757_eth1_device, |
176 | &sh_mmcif_device, | ||
177 | &sdhi_device, | ||
105 | }; | 178 | }; |
106 | 179 | ||
107 | static struct flash_platform_data spi_flash_data = { | 180 | static struct flash_platform_data spi_flash_data = { |