Merge tag 'v3.3.7' into 3.3/master
[zen-stable.git] / arch / arm / mach-u300 / mmc.c
blob05abd6ad9fabbf2a00daf4aaff273884e71caa2d
1 /*
3 * arch/arm/mach-u300/mmc.c
6 * Copyright (C) 2009 ST-Ericsson SA
7 * License terms: GNU General Public License (GPL) version 2
9 * Author: Linus Walleij <linus.walleij@stericsson.com>
10 * Author: Johan Lundin
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/dmaengine.h>
17 #include <linux/amba/mmci.h>
18 #include <linux/slab.h>
19 #include <mach/coh901318.h>
20 #include <mach/dma_channels.h>
22 #include "u300-gpio.h"
23 #include "mmc.h"
25 static struct mmci_platform_data mmc0_plat_data = {
27 * Do not set ocr_mask or voltage translation function,
28 * we have a regulator we can control instead.
30 /* Nominally 2.85V on our platform */
31 .f_max = 24000000,
32 .gpio_wp = -1,
33 .gpio_cd = U300_GPIO_PIN_MMC_CD,
34 .cd_invert = true,
35 .capabilities = MMC_CAP_MMC_HIGHSPEED |
36 MMC_CAP_SD_HIGHSPEED | MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA,
37 #ifdef CONFIG_COH901318
38 .dma_filter = coh901318_filter_id,
39 .dma_rx_param = (void *) U300_DMA_MMCSD_RX_TX,
40 /* Don't specify a TX channel, this RX channel is bidirectional */
41 #endif
44 int __devinit mmc_init(struct amba_device *adev)
46 struct device *mmcsd_device = &adev->dev;
47 int ret = 0;
49 mmcsd_device->platform_data = &mmc0_plat_data;
51 return ret;