diff options
Diffstat (limited to 'drivers/mmc/host')
-rw-r--r-- | drivers/mmc/host/Makefile | 3 | ||||
-rw-r--r-- | drivers/mmc/host/at91_mci.c | 4 | ||||
-rw-r--r-- | drivers/mmc/host/mmc_spi.c | 4 | ||||
-rw-r--r-- | drivers/mmc/host/of_mmc_spi.c | 149 | ||||
-rw-r--r-- | drivers/mmc/host/pxamci.c | 2 | ||||
-rw-r--r-- | drivers/mmc/host/ricoh_mmc.c | 17 | ||||
-rw-r--r-- | drivers/mmc/host/sdhci-pci.c | 2 | ||||
-rw-r--r-- | drivers/mmc/host/sdhci.c | 17 | ||||
-rw-r--r-- | drivers/mmc/host/sdhci.h | 2 | ||||
-rw-r--r-- | drivers/mmc/host/sdricoh_cs.c | 4 | ||||
-rw-r--r-- | drivers/mmc/host/tmio_mmc.c | 3 |
11 files changed, 187 insertions, 20 deletions
diff --git a/drivers/mmc/host/Makefile b/drivers/mmc/host/Makefile index c794cc5ce442..f4853288bbb1 100644 --- a/drivers/mmc/host/Makefile +++ b/drivers/mmc/host/Makefile | |||
@@ -19,6 +19,9 @@ obj-$(CONFIG_MMC_AT91) += at91_mci.o | |||
19 | obj-$(CONFIG_MMC_ATMELMCI) += atmel-mci.o | 19 | obj-$(CONFIG_MMC_ATMELMCI) += atmel-mci.o |
20 | obj-$(CONFIG_MMC_TIFM_SD) += tifm_sd.o | 20 | obj-$(CONFIG_MMC_TIFM_SD) += tifm_sd.o |
21 | obj-$(CONFIG_MMC_SPI) += mmc_spi.o | 21 | obj-$(CONFIG_MMC_SPI) += mmc_spi.o |
22 | ifeq ($(CONFIG_OF),y) | ||
23 | obj-$(CONFIG_MMC_SPI) += of_mmc_spi.o | ||
24 | endif | ||
22 | obj-$(CONFIG_MMC_S3C) += s3cmci.o | 25 | obj-$(CONFIG_MMC_S3C) += s3cmci.o |
23 | obj-$(CONFIG_MMC_SDRICOH_CS) += sdricoh_cs.o | 26 | obj-$(CONFIG_MMC_SDRICOH_CS) += sdricoh_cs.o |
24 | obj-$(CONFIG_MMC_TMIO) += tmio_mmc.o | 27 | obj-$(CONFIG_MMC_TMIO) += tmio_mmc.o |
diff --git a/drivers/mmc/host/at91_mci.c b/drivers/mmc/host/at91_mci.c index 1f8b5b36222c..e556d42cc45a 100644 --- a/drivers/mmc/host/at91_mci.c +++ b/drivers/mmc/host/at91_mci.c | |||
@@ -1088,6 +1088,8 @@ static int __init at91_mci_probe(struct platform_device *pdev) | |||
1088 | goto fail0; | 1088 | goto fail0; |
1089 | } | 1089 | } |
1090 | 1090 | ||
1091 | setup_timer(&host->timer, at91_timeout_timer, (unsigned long)host); | ||
1092 | |||
1091 | platform_set_drvdata(pdev, mmc); | 1093 | platform_set_drvdata(pdev, mmc); |
1092 | 1094 | ||
1093 | /* | 1095 | /* |
@@ -1101,8 +1103,6 @@ static int __init at91_mci_probe(struct platform_device *pdev) | |||
1101 | 1103 | ||
1102 | mmc_add_host(mmc); | 1104 | mmc_add_host(mmc); |
1103 | 1105 | ||
1104 | setup_timer(&host->timer, at91_timeout_timer, (unsigned long)host); | ||
1105 | |||
1106 | /* | 1106 | /* |
1107 | * monitor card insertion/removal if we can | 1107 | * monitor card insertion/removal if we can |
1108 | */ | 1108 | */ |
diff --git a/drivers/mmc/host/mmc_spi.c b/drivers/mmc/host/mmc_spi.c index ad00e1632317..87e211df68ac 100644 --- a/drivers/mmc/host/mmc_spi.c +++ b/drivers/mmc/host/mmc_spi.c | |||
@@ -1285,7 +1285,7 @@ static int mmc_spi_probe(struct spi_device *spi) | |||
1285 | /* Platform data is used to hook up things like card sensing | 1285 | /* Platform data is used to hook up things like card sensing |
1286 | * and power switching gpios. | 1286 | * and power switching gpios. |
1287 | */ | 1287 | */ |
1288 | host->pdata = spi->dev.platform_data; | 1288 | host->pdata = mmc_spi_get_pdata(spi); |
1289 | if (host->pdata) | 1289 | if (host->pdata) |
1290 | mmc->ocr_avail = host->pdata->ocr_mask; | 1290 | mmc->ocr_avail = host->pdata->ocr_mask; |
1291 | if (!mmc->ocr_avail) { | 1291 | if (!mmc->ocr_avail) { |
@@ -1368,6 +1368,7 @@ fail_glue_init: | |||
1368 | 1368 | ||
1369 | fail_nobuf1: | 1369 | fail_nobuf1: |
1370 | mmc_free_host(mmc); | 1370 | mmc_free_host(mmc); |
1371 | mmc_spi_put_pdata(spi); | ||
1371 | dev_set_drvdata(&spi->dev, NULL); | 1372 | dev_set_drvdata(&spi->dev, NULL); |
1372 | 1373 | ||
1373 | nomem: | 1374 | nomem: |
@@ -1402,6 +1403,7 @@ static int __devexit mmc_spi_remove(struct spi_device *spi) | |||
1402 | 1403 | ||
1403 | spi->max_speed_hz = mmc->f_max; | 1404 | spi->max_speed_hz = mmc->f_max; |
1404 | mmc_free_host(mmc); | 1405 | mmc_free_host(mmc); |
1406 | mmc_spi_put_pdata(spi); | ||
1405 | dev_set_drvdata(&spi->dev, NULL); | 1407 | dev_set_drvdata(&spi->dev, NULL); |
1406 | } | 1408 | } |
1407 | return 0; | 1409 | return 0; |
diff --git a/drivers/mmc/host/of_mmc_spi.c b/drivers/mmc/host/of_mmc_spi.c new file mode 100644 index 000000000000..fb2921f8099d --- /dev/null +++ b/drivers/mmc/host/of_mmc_spi.c | |||
@@ -0,0 +1,149 @@ | |||
1 | /* | ||
2 | * OpenFirmware bindings for the MMC-over-SPI driver | ||
3 | * | ||
4 | * Copyright (c) MontaVista Software, Inc. 2008. | ||
5 | * | ||
6 | * Author: Anton Vorontsov <avorontsov@ru.mvista.com> | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License as published by the | ||
10 | * Free Software Foundation; either version 2 of the License, or (at your | ||
11 | * option) any later version. | ||
12 | */ | ||
13 | |||
14 | #include <linux/kernel.h> | ||
15 | #include <linux/module.h> | ||
16 | #include <linux/device.h> | ||
17 | #include <linux/gpio.h> | ||
18 | #include <linux/of.h> | ||
19 | #include <linux/of_gpio.h> | ||
20 | #include <linux/spi/spi.h> | ||
21 | #include <linux/spi/mmc_spi.h> | ||
22 | #include <linux/mmc/core.h> | ||
23 | #include <linux/mmc/host.h> | ||
24 | |||
25 | enum { | ||
26 | CD_GPIO = 0, | ||
27 | WP_GPIO, | ||
28 | NUM_GPIOS, | ||
29 | }; | ||
30 | |||
31 | struct of_mmc_spi { | ||
32 | int gpios[NUM_GPIOS]; | ||
33 | bool alow_gpios[NUM_GPIOS]; | ||
34 | struct mmc_spi_platform_data pdata; | ||
35 | }; | ||
36 | |||
37 | static struct of_mmc_spi *to_of_mmc_spi(struct device *dev) | ||
38 | { | ||
39 | return container_of(dev->platform_data, struct of_mmc_spi, pdata); | ||
40 | } | ||
41 | |||
42 | static int of_mmc_spi_read_gpio(struct device *dev, int gpio_num) | ||
43 | { | ||
44 | struct of_mmc_spi *oms = to_of_mmc_spi(dev); | ||
45 | bool active_low = oms->alow_gpios[gpio_num]; | ||
46 | bool value = gpio_get_value(oms->gpios[gpio_num]); | ||
47 | |||
48 | return active_low ^ value; | ||
49 | } | ||
50 | |||
51 | static int of_mmc_spi_get_cd(struct device *dev) | ||
52 | { | ||
53 | return of_mmc_spi_read_gpio(dev, CD_GPIO); | ||
54 | } | ||
55 | |||
56 | static int of_mmc_spi_get_ro(struct device *dev) | ||
57 | { | ||
58 | return of_mmc_spi_read_gpio(dev, WP_GPIO); | ||
59 | } | ||
60 | |||
61 | struct mmc_spi_platform_data *mmc_spi_get_pdata(struct spi_device *spi) | ||
62 | { | ||
63 | struct device *dev = &spi->dev; | ||
64 | struct device_node *np = dev_archdata_get_node(&dev->archdata); | ||
65 | struct of_mmc_spi *oms; | ||
66 | const u32 *voltage_ranges; | ||
67 | int num_ranges; | ||
68 | int i; | ||
69 | int ret = -EINVAL; | ||
70 | |||
71 | if (dev->platform_data || !np) | ||
72 | return dev->platform_data; | ||
73 | |||
74 | oms = kzalloc(sizeof(*oms), GFP_KERNEL); | ||
75 | if (!oms) | ||
76 | return NULL; | ||
77 | |||
78 | voltage_ranges = of_get_property(np, "voltage-ranges", &num_ranges); | ||
79 | num_ranges = num_ranges / sizeof(*voltage_ranges) / 2; | ||
80 | if (!voltage_ranges || !num_ranges) { | ||
81 | dev_err(dev, "OF: voltage-ranges unspecified\n"); | ||
82 | goto err_ocr; | ||
83 | } | ||
84 | |||
85 | for (i = 0; i < num_ranges; i++) { | ||
86 | const int j = i * 2; | ||
87 | u32 mask; | ||
88 | |||
89 | mask = mmc_vddrange_to_ocrmask(voltage_ranges[j], | ||
90 | voltage_ranges[j + 1]); | ||
91 | if (!mask) { | ||
92 | ret = -EINVAL; | ||
93 | dev_err(dev, "OF: voltage-range #%d is invalid\n", i); | ||
94 | goto err_ocr; | ||
95 | } | ||
96 | oms->pdata.ocr_mask |= mask; | ||
97 | } | ||
98 | |||
99 | for (i = 0; i < ARRAY_SIZE(oms->gpios); i++) { | ||
100 | enum of_gpio_flags gpio_flags; | ||
101 | |||
102 | oms->gpios[i] = of_get_gpio_flags(np, i, &gpio_flags); | ||
103 | if (!gpio_is_valid(oms->gpios[i])) | ||
104 | continue; | ||
105 | |||
106 | ret = gpio_request(oms->gpios[i], dev->bus_id); | ||
107 | if (ret < 0) { | ||
108 | oms->gpios[i] = -EINVAL; | ||
109 | continue; | ||
110 | } | ||
111 | |||
112 | if (gpio_flags & OF_GPIO_ACTIVE_LOW) | ||
113 | oms->alow_gpios[i] = true; | ||
114 | } | ||
115 | |||
116 | if (gpio_is_valid(oms->gpios[CD_GPIO])) | ||
117 | oms->pdata.get_cd = of_mmc_spi_get_cd; | ||
118 | if (gpio_is_valid(oms->gpios[WP_GPIO])) | ||
119 | oms->pdata.get_ro = of_mmc_spi_get_ro; | ||
120 | |||
121 | /* We don't support interrupts yet, let's poll. */ | ||
122 | oms->pdata.caps |= MMC_CAP_NEEDS_POLL; | ||
123 | |||
124 | dev->platform_data = &oms->pdata; | ||
125 | return dev->platform_data; | ||
126 | err_ocr: | ||
127 | kfree(oms); | ||
128 | return NULL; | ||
129 | } | ||
130 | EXPORT_SYMBOL(mmc_spi_get_pdata); | ||
131 | |||
132 | void mmc_spi_put_pdata(struct spi_device *spi) | ||
133 | { | ||
134 | struct device *dev = &spi->dev; | ||
135 | struct device_node *np = dev_archdata_get_node(&dev->archdata); | ||
136 | struct of_mmc_spi *oms = to_of_mmc_spi(dev); | ||
137 | int i; | ||
138 | |||
139 | if (!dev->platform_data || !np) | ||
140 | return; | ||
141 | |||
142 | for (i = 0; i < ARRAY_SIZE(oms->gpios); i++) { | ||
143 | if (gpio_is_valid(oms->gpios[i])) | ||
144 | gpio_free(oms->gpios[i]); | ||
145 | } | ||
146 | kfree(oms); | ||
147 | dev->platform_data = NULL; | ||
148 | } | ||
149 | EXPORT_SYMBOL(mmc_spi_put_pdata); | ||
diff --git a/drivers/mmc/host/pxamci.c b/drivers/mmc/host/pxamci.c index f88cc7406354..3c5483b75da4 100644 --- a/drivers/mmc/host/pxamci.c +++ b/drivers/mmc/host/pxamci.c | |||
@@ -283,7 +283,7 @@ static int pxamci_data_done(struct pxamci_host *host, unsigned int stat) | |||
283 | return 0; | 283 | return 0; |
284 | 284 | ||
285 | DCSR(host->dma) = 0; | 285 | DCSR(host->dma) = 0; |
286 | dma_unmap_sg(mmc_dev(host->mmc), data->sg, host->dma_len, | 286 | dma_unmap_sg(mmc_dev(host->mmc), data->sg, data->sg_len, |
287 | host->dma_dir); | 287 | host->dma_dir); |
288 | 288 | ||
289 | if (stat & STAT_READ_TIME_OUT) | 289 | if (stat & STAT_READ_TIME_OUT) |
diff --git a/drivers/mmc/host/ricoh_mmc.c b/drivers/mmc/host/ricoh_mmc.c index a16d7609e4ee..be9e7b32b34e 100644 --- a/drivers/mmc/host/ricoh_mmc.c +++ b/drivers/mmc/host/ricoh_mmc.c | |||
@@ -11,9 +11,10 @@ | |||
11 | 11 | ||
12 | /* | 12 | /* |
13 | * This is a conceptually ridiculous driver, but it is required by the way | 13 | * This is a conceptually ridiculous driver, but it is required by the way |
14 | * the Ricoh multi-function R5C832 works. This chip implements firewire | 14 | * the Ricoh multi-function chips (R5CXXX) work. These chips implement |
15 | * and four different memory card controllers. Two of those controllers are | 15 | * the four main memory card controllers (SD, MMC, MS, xD) and one or both |
16 | * an SDHCI controller and a proprietary MMC controller. The linux SDHCI | 16 | * of cardbus or firewire. It happens that they implement SD and MMC |
17 | * support as separate controllers (and PCI functions). The linux SDHCI | ||
17 | * driver supports MMC cards but the chip detects MMC cards in hardware | 18 | * driver supports MMC cards but the chip detects MMC cards in hardware |
18 | * and directs them to the MMC controller - so the SDHCI driver never sees | 19 | * and directs them to the MMC controller - so the SDHCI driver never sees |
19 | * them. To get around this, we must disable the useless MMC controller. | 20 | * them. To get around this, we must disable the useless MMC controller. |
@@ -21,8 +22,10 @@ | |||
21 | * a detection event occurs immediately, even if the MMC card is already | 22 | * a detection event occurs immediately, even if the MMC card is already |
22 | * in the reader. | 23 | * in the reader. |
23 | * | 24 | * |
24 | * The relevant registers live on the firewire function, so this is unavoidably | 25 | * It seems to be the case that the relevant PCI registers to deactivate the |
25 | * ugly. Such is life. | 26 | * MMC controller live on PCI function 0, which might be the cardbus controller |
27 | * or the firewire controller, depending on the particular chip in question. As | ||
28 | * such, it makes what this driver has to do unavoidably ugly. Such is life. | ||
26 | */ | 29 | */ |
27 | 30 | ||
28 | #include <linux/pci.h> | 31 | #include <linux/pci.h> |
@@ -143,6 +146,7 @@ static int __devinit ricoh_mmc_probe(struct pci_dev *pdev, | |||
143 | pci_get_device(PCI_VENDOR_ID_RICOH, | 146 | pci_get_device(PCI_VENDOR_ID_RICOH, |
144 | PCI_DEVICE_ID_RICOH_RL5C476, fw_dev))) { | 147 | PCI_DEVICE_ID_RICOH_RL5C476, fw_dev))) { |
145 | if (PCI_SLOT(pdev->devfn) == PCI_SLOT(fw_dev->devfn) && | 148 | if (PCI_SLOT(pdev->devfn) == PCI_SLOT(fw_dev->devfn) && |
149 | PCI_FUNC(fw_dev->devfn) == 0 && | ||
146 | pdev->bus == fw_dev->bus) { | 150 | pdev->bus == fw_dev->bus) { |
147 | if (ricoh_mmc_disable(fw_dev) != 0) | 151 | if (ricoh_mmc_disable(fw_dev) != 0) |
148 | return -ENODEV; | 152 | return -ENODEV; |
@@ -160,6 +164,7 @@ static int __devinit ricoh_mmc_probe(struct pci_dev *pdev, | |||
160 | (fw_dev = pci_get_device(PCI_VENDOR_ID_RICOH, | 164 | (fw_dev = pci_get_device(PCI_VENDOR_ID_RICOH, |
161 | PCI_DEVICE_ID_RICOH_R5C832, fw_dev))) { | 165 | PCI_DEVICE_ID_RICOH_R5C832, fw_dev))) { |
162 | if (PCI_SLOT(pdev->devfn) == PCI_SLOT(fw_dev->devfn) && | 166 | if (PCI_SLOT(pdev->devfn) == PCI_SLOT(fw_dev->devfn) && |
167 | PCI_FUNC(fw_dev->devfn) == 0 && | ||
163 | pdev->bus == fw_dev->bus) { | 168 | pdev->bus == fw_dev->bus) { |
164 | if (ricoh_mmc_disable(fw_dev) != 0) | 169 | if (ricoh_mmc_disable(fw_dev) != 0) |
165 | return -ENODEV; | 170 | return -ENODEV; |
@@ -172,7 +177,7 @@ static int __devinit ricoh_mmc_probe(struct pci_dev *pdev, | |||
172 | 177 | ||
173 | if (!ctrlfound) { | 178 | if (!ctrlfound) { |
174 | printk(KERN_WARNING DRIVER_NAME | 179 | printk(KERN_WARNING DRIVER_NAME |
175 | ": Main firewire function not found. Cannot disable controller.\n"); | 180 | ": Main Ricoh function not found. Cannot disable controller.\n"); |
176 | return -ENODEV; | 181 | return -ENODEV; |
177 | } | 182 | } |
178 | 183 | ||
diff --git a/drivers/mmc/host/sdhci-pci.c b/drivers/mmc/host/sdhci-pci.c index 9bd7026b0021..f07255cb17ee 100644 --- a/drivers/mmc/host/sdhci-pci.c +++ b/drivers/mmc/host/sdhci-pci.c | |||
@@ -545,7 +545,7 @@ static struct sdhci_pci_slot * __devinit sdhci_pci_probe_slot( | |||
545 | } | 545 | } |
546 | 546 | ||
547 | addr = pci_resource_start(pdev, bar); | 547 | addr = pci_resource_start(pdev, bar); |
548 | host->ioaddr = ioremap_nocache(addr, pci_resource_len(pdev, bar)); | 548 | host->ioaddr = pci_ioremap_bar(pdev, bar); |
549 | if (!host->ioaddr) { | 549 | if (!host->ioaddr) { |
550 | dev_err(&pdev->dev, "failed to remap registers\n"); | 550 | dev_err(&pdev->dev, "failed to remap registers\n"); |
551 | goto release; | 551 | goto release; |
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 4d010a984bed..6b2d1f99af67 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c | |||
@@ -30,6 +30,11 @@ | |||
30 | #define DBG(f, x...) \ | 30 | #define DBG(f, x...) \ |
31 | pr_debug(DRIVER_NAME " [%s()]: " f, __func__,## x) | 31 | pr_debug(DRIVER_NAME " [%s()]: " f, __func__,## x) |
32 | 32 | ||
33 | #if defined(CONFIG_LEDS_CLASS) || (defined(CONFIG_LEDS_CLASS_MODULE) && \ | ||
34 | defined(CONFIG_MMC_SDHCI_MODULE)) | ||
35 | #define SDHCI_USE_LEDS_CLASS | ||
36 | #endif | ||
37 | |||
33 | static unsigned int debug_quirks = 0; | 38 | static unsigned int debug_quirks = 0; |
34 | 39 | ||
35 | static void sdhci_prepare_data(struct sdhci_host *, struct mmc_data *); | 40 | static void sdhci_prepare_data(struct sdhci_host *, struct mmc_data *); |
@@ -149,7 +154,7 @@ static void sdhci_deactivate_led(struct sdhci_host *host) | |||
149 | writeb(ctrl, host->ioaddr + SDHCI_HOST_CONTROL); | 154 | writeb(ctrl, host->ioaddr + SDHCI_HOST_CONTROL); |
150 | } | 155 | } |
151 | 156 | ||
152 | #ifdef CONFIG_LEDS_CLASS | 157 | #ifdef SDHCI_USE_LEDS_CLASS |
153 | static void sdhci_led_control(struct led_classdev *led, | 158 | static void sdhci_led_control(struct led_classdev *led, |
154 | enum led_brightness brightness) | 159 | enum led_brightness brightness) |
155 | { | 160 | { |
@@ -994,7 +999,7 @@ static void sdhci_request(struct mmc_host *mmc, struct mmc_request *mrq) | |||
994 | 999 | ||
995 | WARN_ON(host->mrq != NULL); | 1000 | WARN_ON(host->mrq != NULL); |
996 | 1001 | ||
997 | #ifndef CONFIG_LEDS_CLASS | 1002 | #ifndef SDHCI_USE_LEDS_CLASS |
998 | sdhci_activate_led(host); | 1003 | sdhci_activate_led(host); |
999 | #endif | 1004 | #endif |
1000 | 1005 | ||
@@ -1201,7 +1206,7 @@ static void sdhci_tasklet_finish(unsigned long param) | |||
1201 | host->cmd = NULL; | 1206 | host->cmd = NULL; |
1202 | host->data = NULL; | 1207 | host->data = NULL; |
1203 | 1208 | ||
1204 | #ifndef CONFIG_LEDS_CLASS | 1209 | #ifndef SDHCI_USE_LEDS_CLASS |
1205 | sdhci_deactivate_led(host); | 1210 | sdhci_deactivate_led(host); |
1206 | #endif | 1211 | #endif |
1207 | 1212 | ||
@@ -1717,7 +1722,7 @@ int sdhci_add_host(struct sdhci_host *host) | |||
1717 | sdhci_dumpregs(host); | 1722 | sdhci_dumpregs(host); |
1718 | #endif | 1723 | #endif |
1719 | 1724 | ||
1720 | #ifdef CONFIG_LEDS_CLASS | 1725 | #ifdef SDHCI_USE_LEDS_CLASS |
1721 | host->led.name = mmc_hostname(mmc); | 1726 | host->led.name = mmc_hostname(mmc); |
1722 | host->led.brightness = LED_OFF; | 1727 | host->led.brightness = LED_OFF; |
1723 | host->led.default_trigger = mmc_hostname(mmc); | 1728 | host->led.default_trigger = mmc_hostname(mmc); |
@@ -1739,7 +1744,7 @@ int sdhci_add_host(struct sdhci_host *host) | |||
1739 | 1744 | ||
1740 | return 0; | 1745 | return 0; |
1741 | 1746 | ||
1742 | #ifdef CONFIG_LEDS_CLASS | 1747 | #ifdef SDHCI_USE_LEDS_CLASS |
1743 | reset: | 1748 | reset: |
1744 | sdhci_reset(host, SDHCI_RESET_ALL); | 1749 | sdhci_reset(host, SDHCI_RESET_ALL); |
1745 | free_irq(host->irq, host); | 1750 | free_irq(host->irq, host); |
@@ -1775,7 +1780,7 @@ void sdhci_remove_host(struct sdhci_host *host, int dead) | |||
1775 | 1780 | ||
1776 | mmc_remove_host(host->mmc); | 1781 | mmc_remove_host(host->mmc); |
1777 | 1782 | ||
1778 | #ifdef CONFIG_LEDS_CLASS | 1783 | #ifdef SDHCI_USE_LEDS_CLASS |
1779 | led_classdev_unregister(&host->led); | 1784 | led_classdev_unregister(&host->led); |
1780 | #endif | 1785 | #endif |
1781 | 1786 | ||
diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h index 31f4b1528e76..3efba2363941 100644 --- a/drivers/mmc/host/sdhci.h +++ b/drivers/mmc/host/sdhci.h | |||
@@ -220,7 +220,7 @@ struct sdhci_host { | |||
220 | struct mmc_host *mmc; /* MMC structure */ | 220 | struct mmc_host *mmc; /* MMC structure */ |
221 | u64 dma_mask; /* custom DMA mask */ | 221 | u64 dma_mask; /* custom DMA mask */ |
222 | 222 | ||
223 | #ifdef CONFIG_LEDS_CLASS | 223 | #if defined(CONFIG_LEDS_CLASS) || defined(CONFIG_LEDS_CLASS_MODULE) |
224 | struct led_classdev led; /* LED control */ | 224 | struct led_classdev led; /* LED control */ |
225 | #endif | 225 | #endif |
226 | 226 | ||
diff --git a/drivers/mmc/host/sdricoh_cs.c b/drivers/mmc/host/sdricoh_cs.c index 1df44d966bdb..cb41e9c3ac07 100644 --- a/drivers/mmc/host/sdricoh_cs.c +++ b/drivers/mmc/host/sdricoh_cs.c | |||
@@ -82,6 +82,8 @@ static struct pcmcia_device_id pcmcia_ids[] = { | |||
82 | /* vendor and device strings followed by their crc32 hashes */ | 82 | /* vendor and device strings followed by their crc32 hashes */ |
83 | PCMCIA_DEVICE_PROD_ID12("RICOH", "Bay1Controller", 0xd9f522ed, | 83 | PCMCIA_DEVICE_PROD_ID12("RICOH", "Bay1Controller", 0xd9f522ed, |
84 | 0xc3901202), | 84 | 0xc3901202), |
85 | PCMCIA_DEVICE_PROD_ID12("RICOH", "Bay Controller", 0xd9f522ed, | ||
86 | 0xace80909), | ||
85 | PCMCIA_DEVICE_NULL, | 87 | PCMCIA_DEVICE_NULL, |
86 | }; | 88 | }; |
87 | 89 | ||
@@ -463,7 +465,7 @@ static int sdricoh_init_mmc(struct pci_dev *pci_dev, | |||
463 | 465 | ||
464 | err: | 466 | err: |
465 | if (iobase) | 467 | if (iobase) |
466 | iounmap(iobase); | 468 | pci_iounmap(pci_dev, iobase); |
467 | if (mmc) | 469 | if (mmc) |
468 | mmc_free_host(mmc); | 470 | mmc_free_host(mmc); |
469 | 471 | ||
diff --git a/drivers/mmc/host/tmio_mmc.c b/drivers/mmc/host/tmio_mmc.c index 95430b81ec11..6a7a61904833 100644 --- a/drivers/mmc/host/tmio_mmc.c +++ b/drivers/mmc/host/tmio_mmc.c | |||
@@ -224,7 +224,7 @@ static inline void tmio_mmc_data_irq(struct tmio_mmc_host *host) | |||
224 | { | 224 | { |
225 | void __iomem *ctl = host->ctl; | 225 | void __iomem *ctl = host->ctl; |
226 | struct mmc_data *data = host->data; | 226 | struct mmc_data *data = host->data; |
227 | struct mmc_command *stop = data->stop; | 227 | struct mmc_command *stop; |
228 | 228 | ||
229 | host->data = NULL; | 229 | host->data = NULL; |
230 | 230 | ||
@@ -232,6 +232,7 @@ static inline void tmio_mmc_data_irq(struct tmio_mmc_host *host) | |||
232 | pr_debug("Spurious data end IRQ\n"); | 232 | pr_debug("Spurious data end IRQ\n"); |
233 | return; | 233 | return; |
234 | } | 234 | } |
235 | stop = data->stop; | ||
235 | 236 | ||
236 | /* FIXME - return correct transfer count on errors */ | 237 | /* FIXME - return correct transfer count on errors */ |
237 | if (!data->error) | 238 | if (!data->error) |