diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2012-04-23 02:53:40 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rjw@sisk.pl> | 2012-05-12 16:34:17 -0400 |
commit | cc2512bc67104efdd913fe655171667cd1ce942a (patch) | |
tree | 7ef90c2e20bc454e66df48f16b31e4165ea4ff87 | |
parent | 601df61657d4f762a99b155b695379fcc18f36e7 (diff) |
ARM: mach-shmobile: kzm9g: add MMCIF support
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Simon Horman <horms@verge.net.au>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
-rw-r--r-- | arch/arm/mach-shmobile/board-kzm9g.c | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/arch/arm/mach-shmobile/board-kzm9g.c b/arch/arm/mach-shmobile/board-kzm9g.c index 545d6337ea20..57c391a7550c 100644 --- a/arch/arm/mach-shmobile/board-kzm9g.c +++ b/arch/arm/mach-shmobile/board-kzm9g.c | |||
@@ -22,6 +22,8 @@ | |||
22 | #include <linux/io.h> | 22 | #include <linux/io.h> |
23 | #include <linux/irq.h> | 23 | #include <linux/irq.h> |
24 | #include <linux/i2c.h> | 24 | #include <linux/i2c.h> |
25 | #include <linux/mmc/host.h> | ||
26 | #include <linux/mmc/sh_mmcif.h> | ||
25 | #include <linux/platform_device.h> | 27 | #include <linux/platform_device.h> |
26 | #include <linux/smsc911x.h> | 28 | #include <linux/smsc911x.h> |
27 | #include <linux/usb/r8a66597.h> | 29 | #include <linux/usb/r8a66597.h> |
@@ -147,6 +149,40 @@ static struct platform_device lcdc_device = { | |||
147 | }, | 149 | }, |
148 | }; | 150 | }; |
149 | 151 | ||
152 | /* MMCIF */ | ||
153 | static struct resource sh_mmcif_resources[] = { | ||
154 | [0] = { | ||
155 | .name = "MMCIF", | ||
156 | .start = 0xe6bd0000, | ||
157 | .end = 0xe6bd00ff, | ||
158 | .flags = IORESOURCE_MEM, | ||
159 | }, | ||
160 | [1] = { | ||
161 | .start = gic_spi(141), | ||
162 | .flags = IORESOURCE_IRQ, | ||
163 | }, | ||
164 | [2] = { | ||
165 | .start = gic_spi(140), | ||
166 | .flags = IORESOURCE_IRQ, | ||
167 | }, | ||
168 | }; | ||
169 | |||
170 | static struct sh_mmcif_plat_data sh_mmcif_platdata = { | ||
171 | .ocr = MMC_VDD_165_195, | ||
172 | .caps = MMC_CAP_8_BIT_DATA | MMC_CAP_NONREMOVABLE, | ||
173 | }; | ||
174 | |||
175 | static struct platform_device mmc_device = { | ||
176 | .name = "sh_mmcif", | ||
177 | .dev = { | ||
178 | .dma_mask = NULL, | ||
179 | .coherent_dma_mask = 0xffffffff, | ||
180 | .platform_data = &sh_mmcif_platdata, | ||
181 | }, | ||
182 | .num_resources = ARRAY_SIZE(sh_mmcif_resources), | ||
183 | .resource = sh_mmcif_resources, | ||
184 | }; | ||
185 | |||
150 | static struct i2c_board_info i2c1_devices[] = { | 186 | static struct i2c_board_info i2c1_devices[] = { |
151 | { | 187 | { |
152 | I2C_BOARD_INFO("st1232-ts", 0x55), | 188 | I2C_BOARD_INFO("st1232-ts", 0x55), |
@@ -158,6 +194,7 @@ static struct platform_device *kzm_devices[] __initdata = { | |||
158 | &smsc_device, | 194 | &smsc_device, |
159 | &usb_host_device, | 195 | &usb_host_device, |
160 | &lcdc_device, | 196 | &lcdc_device, |
197 | &mmc_device, | ||
161 | }; | 198 | }; |
162 | 199 | ||
163 | /* | 200 | /* |
@@ -267,6 +304,18 @@ static void __init kzm_init(void) | |||
267 | gpio_request(GPIO_PORT223, NULL); /* IRQ8 */ | 304 | gpio_request(GPIO_PORT223, NULL); /* IRQ8 */ |
268 | gpio_direction_input(GPIO_PORT223); | 305 | gpio_direction_input(GPIO_PORT223); |
269 | 306 | ||
307 | /* enable MMCIF */ | ||
308 | gpio_request(GPIO_FN_MMCCLK0, NULL); | ||
309 | gpio_request(GPIO_FN_MMCCMD0_PU, NULL); | ||
310 | gpio_request(GPIO_FN_MMCD0_0_PU, NULL); | ||
311 | gpio_request(GPIO_FN_MMCD0_1_PU, NULL); | ||
312 | gpio_request(GPIO_FN_MMCD0_2_PU, NULL); | ||
313 | gpio_request(GPIO_FN_MMCD0_3_PU, NULL); | ||
314 | gpio_request(GPIO_FN_MMCD0_4_PU, NULL); | ||
315 | gpio_request(GPIO_FN_MMCD0_5_PU, NULL); | ||
316 | gpio_request(GPIO_FN_MMCD0_6_PU, NULL); | ||
317 | gpio_request(GPIO_FN_MMCD0_7_PU, NULL); | ||
318 | |||
270 | #ifdef CONFIG_CACHE_L2X0 | 319 | #ifdef CONFIG_CACHE_L2X0 |
271 | /* Early BRESP enable, Shared attribute override enable, 64K*8way */ | 320 | /* Early BRESP enable, Shared attribute override enable, 64K*8way */ |
272 | l2x0_init(IOMEM(0xf0100000), 0x40460000, 0x82000fff); | 321 | l2x0_init(IOMEM(0xf0100000), 0x40460000, 0x82000fff); |