3 * arch/arm/mach-u300/mmc.c
6 * Copyright (C) 2009 ST-Ericsson AB
7 * License terms: GNU General Public License (GPL) version 2
9 * Author: Linus Walleij <linus.walleij@stericsson.com>
10 * Author: Johan Lundin <johan.lundin@stericsson.com>
11 * Author: Jonas Aaberg <jonas.aberg@stericsson.com>
13 #include <linux/device.h>
14 #include <linux/amba/bus.h>
15 #include <linux/mmc/host.h>
16 #include <linux/gpio.h>
17 #include <linux/amba/mmci.h>
18 #include <linux/slab.h>
23 static struct mmci_platform_data mmc0_plat_data = {
25 * Do not set ocr_mask or voltage translation function,
26 * we have a regulator we can control instead.
28 /* Nominally 2.85V on our platform */
31 .gpio_cd = U300_GPIO_PIN_MMC_CD,
33 .capabilities = MMC_CAP_MMC_HIGHSPEED |
34 MMC_CAP_SD_HIGHSPEED | MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA,
37 int __devinit mmc_init(struct amba_device *adev)
39 struct device *mmcsd_device = &adev->dev;
43 mmcsd_device->platform_data = &mmc0_plat_data;
46 * Setup padmuxing for MMC. Since this must always be
47 * compiled into the kernel, pmx is never released.
49 pmx = pmx_get(mmcsd_device, U300_APP_PMX_MMC_SETTING);
52 pr_warning("Could not get padmux handle\n");
54 ret = pmx_activate(mmcsd_device, pmx);
55 if (IS_ERR_VALUE(ret))
56 pr_warning("Could not activate padmuxing\n");