diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2012-04-09 16:57:09 -0400 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2012-06-10 12:45:29 -0400 |
commit | 171af7dcb8812f173f0a5a4ab79a88598586d394 (patch) | |
tree | f88033b11637fb434ca0cc7a09ffe352094f5a8b /arch/arm/mach-nomadik/board-nhk8815.c | |
parent | d088f671e413ec1a58ebf9adc288ca93346f9b8e (diff) |
ARM: nomadik: register the MMC/SD device
This registers the MMC device for the Nomadik so we can access
MMC/SD cards, which is pretty nice.
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'arch/arm/mach-nomadik/board-nhk8815.c')
-rw-r--r-- | arch/arm/mach-nomadik/board-nhk8815.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/arch/arm/mach-nomadik/board-nhk8815.c b/arch/arm/mach-nomadik/board-nhk8815.c index 029a741fd9f2..f4535a7dadf5 100644 --- a/arch/arm/mach-nomadik/board-nhk8815.c +++ b/arch/arm/mach-nomadik/board-nhk8815.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/init.h> | 14 | #include <linux/init.h> |
15 | #include <linux/platform_device.h> | 15 | #include <linux/platform_device.h> |
16 | #include <linux/amba/bus.h> | 16 | #include <linux/amba/bus.h> |
17 | #include <linux/amba/mmci.h> | ||
17 | #include <linux/interrupt.h> | 18 | #include <linux/interrupt.h> |
18 | #include <linux/gpio.h> | 19 | #include <linux/gpio.h> |
19 | #include <linux/mtd/mtd.h> | 20 | #include <linux/mtd/mtd.h> |
@@ -186,6 +187,29 @@ static void __init nhk8815_onenand_init(void) | |||
186 | #endif | 187 | #endif |
187 | } | 188 | } |
188 | 189 | ||
190 | static struct mmci_platform_data mmcsd_plat_data = { | ||
191 | .ocr_mask = MMC_VDD_29_30, | ||
192 | .f_max = 48000000, | ||
193 | .gpio_wp = -1, | ||
194 | .gpio_cd = 111, | ||
195 | .cd_invert = true, | ||
196 | .capabilities = MMC_CAP_MMC_HIGHSPEED | | ||
197 | MMC_CAP_SD_HIGHSPEED | MMC_CAP_4_BIT_DATA, | ||
198 | }; | ||
199 | |||
200 | static int __init nhk8815_mmcsd_init(void) | ||
201 | { | ||
202 | int ret; | ||
203 | |||
204 | ret = gpio_request(112, "card detect bias"); | ||
205 | if (ret) | ||
206 | return ret; | ||
207 | gpio_direction_output(112, 0); | ||
208 | amba_apb_device_add(NULL, "mmci", NOMADIK_SDI_BASE, SZ_4K, IRQ_SDMMC, 0, &mmcsd_plat_data, 0x10180180); | ||
209 | return 0; | ||
210 | } | ||
211 | module_init(nhk8815_mmcsd_init); | ||
212 | |||
189 | static struct resource nhk8815_eth_resources[] = { | 213 | static struct resource nhk8815_eth_resources[] = { |
190 | { | 214 | { |
191 | .name = "smc91x-regs", | 215 | .name = "smc91x-regs", |