[kernel] merge r13139 to 8.09
[openwrt/svn-archive/archive.git] / target / linux / generic-2.6 / patches-2.6.26 / 924-gpiommc_2.6.26_fix.patch
1 --- a/drivers/mmc/host/gpiommc.c
2 +++ b/drivers/mmc/host/gpiommc.c
3 @@ -8,11 +8,13 @@
4 * Licensed under the GNU/GPL. See COPYING for details.
5 */
6
7 -#include <linux/mmc/gpiommc.h>
8 #include <linux/platform_device.h>
9 #include <linux/list.h>
10 #include <linux/mutex.h>
11 +#include <linux/mmc/gpiommc.h>
12 +#include <linux/mmc/host.h>
13 #include <linux/spi/spi_gpio.h>
14 +#include <linux/spi/mmc_spi.h>
15 #include <linux/configfs.h>
16 #include <linux/gpio.h>
17 #include <asm/atomic.h>
18 @@ -25,6 +27,7 @@ struct gpiommc_device {
19 struct platform_device *pdev;
20 struct platform_device *spi_pdev;
21 struct spi_board_info boardinfo;
22 + struct mmc_spi_platform_data mmc_spi_data;
23 };
24
25
26 @@ -46,6 +49,7 @@ static int gpiommc_boardinfo_setup(struc
27 bi->max_speed_hz = pdata->max_bus_speed;
28 bi->bus_num = master->bus_num;
29 bi->mode = pdata->mode;
30 + bi->platform_data = &d->mmc_spi_data;
31
32 return 0;
33 }
34 @@ -75,6 +79,7 @@ static int gpiommc_probe(struct platform
35 if (!d)
36 goto error;
37 d->pdev = pdev;
38 + d->mmc_spi_data.ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34;
39
40 /* Create the SPI-GPIO device */
41 d->spi_pdev = platform_device_alloc(SPI_GPIO_PLATDEV_NAME,