pinctrl: add a driver for the U300 pinmux
[deliverable/linux.git] / arch / arm / mach-u300 / mmc.c
CommitLineData
bb3cee2b
LW
1/*
2 *
3 * arch/arm/mach-u300/mmc.c
4 *
5 *
ec8f1253 6 * Copyright (C) 2009 ST-Ericsson SA
bb3cee2b
LW
7 * License terms: GNU General Public License (GPL) version 2
8 *
9 * Author: Linus Walleij <linus.walleij@stericsson.com>
ec8f1253 10 * Author: Johan Lundin
bb3cee2b
LW
11 * Author: Jonas Aaberg <jonas.aberg@stericsson.com>
12 */
13#include <linux/device.h>
14#include <linux/amba/bus.h>
15#include <linux/mmc/host.h>
bb3cee2b 16#include <linux/gpio.h>
ec8f1253 17#include <linux/dmaengine.h>
6ef297f8 18#include <linux/amba/mmci.h>
5a0e3ad6 19#include <linux/slab.h>
ec8f1253
LW
20#include <mach/coh901318.h>
21#include <mach/dma_channels.h>
bb3cee2b 22
bb3cee2b
LW
23#include "mmc.h"
24
1a721859
LW
25static struct mmci_platform_data mmc0_plat_data = {
26 /*
27 * Do not set ocr_mask or voltage translation function,
28 * we have a regulator we can control instead.
29 */
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,
ec8f1253
LW
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
bb3cee2b
LW
42};
43
bb3cee2b
LW
44int __devinit mmc_init(struct amba_device *adev)
45{
bb3cee2b
LW
46 struct device *mmcsd_device = &adev->dev;
47 int ret = 0;
48
1a721859 49 mmcsd_device->platform_data = &mmc0_plat_data;
bb3cee2b 50
bb3cee2b
LW
51 return ret;
52}
This page took 0.14124 seconds and 5 git commands to generate.