aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/at91_mci.c2
-rw-r--r--drivers/mmc/au1xmmc.c2
-rw-r--r--drivers/mmc/mmci.c4
-rw-r--r--drivers/mmc/omap.c45
-rw-r--r--drivers/mmc/sdhci.c2
-rw-r--r--drivers/mmc/wbsd.c2
6 files changed, 27 insertions, 30 deletions
diff --git a/drivers/mmc/at91_mci.c b/drivers/mmc/at91_mci.c
index 075a2a07924e..6b7638b84290 100644
--- a/drivers/mmc/at91_mci.c
+++ b/drivers/mmc/at91_mci.c
@@ -850,7 +850,7 @@ static int at91_mci_probe(struct platform_device *pdev)
850 /* 850 /*
851 * Allocate the MCI interrupt 851 * Allocate the MCI interrupt
852 */ 852 */
853 ret = request_irq(AT91_ID_MCI, at91_mci_irq, SA_SHIRQ, DRIVER_NAME, host); 853 ret = request_irq(AT91_ID_MCI, at91_mci_irq, IRQF_SHARED, DRIVER_NAME, host);
854 if (ret) { 854 if (ret) {
855 printk(KERN_ERR "Failed to request MCI interrupt\n"); 855 printk(KERN_ERR "Failed to request MCI interrupt\n");
856 clk_disable(mci_clk); 856 clk_disable(mci_clk);
diff --git a/drivers/mmc/au1xmmc.c b/drivers/mmc/au1xmmc.c
index 41069908f4a7..fb606165af3b 100644
--- a/drivers/mmc/au1xmmc.c
+++ b/drivers/mmc/au1xmmc.c
@@ -886,7 +886,7 @@ static int __devinit au1xmmc_probe(struct platform_device *pdev)
886 int i, ret = 0; 886 int i, ret = 0;
887 887
888 /* THe interrupt is shared among all controllers */ 888 /* THe interrupt is shared among all controllers */
889 ret = request_irq(AU1100_SD_IRQ, au1xmmc_irq, SA_INTERRUPT, "MMC", 0); 889 ret = request_irq(AU1100_SD_IRQ, au1xmmc_irq, IRQF_DISABLED, "MMC", 0);
890 890
891 if (ret) { 891 if (ret) {
892 printk(DRIVER_NAME "ERROR: Couldn't get int %d: %d\n", 892 printk(DRIVER_NAME "ERROR: Couldn't get int %d: %d\n",
diff --git a/drivers/mmc/mmci.c b/drivers/mmc/mmci.c
index 9dfb34a857e3..1886562abdd4 100644
--- a/drivers/mmc/mmci.c
+++ b/drivers/mmc/mmci.c
@@ -531,11 +531,11 @@ static int mmci_probe(struct amba_device *dev, void *id)
531 writel(0, host->base + MMCIMASK1); 531 writel(0, host->base + MMCIMASK1);
532 writel(0xfff, host->base + MMCICLEAR); 532 writel(0xfff, host->base + MMCICLEAR);
533 533
534 ret = request_irq(dev->irq[0], mmci_irq, SA_SHIRQ, DRIVER_NAME " (cmd)", host); 534 ret = request_irq(dev->irq[0], mmci_irq, IRQF_SHARED, DRIVER_NAME " (cmd)", host);
535 if (ret) 535 if (ret)
536 goto unmap; 536 goto unmap;
537 537
538 ret = request_irq(dev->irq[1], mmci_pio_irq, SA_SHIRQ, DRIVER_NAME " (pio)", host); 538 ret = request_irq(dev->irq[1], mmci_pio_irq, IRQF_SHARED, DRIVER_NAME " (pio)", host);
539 if (ret) 539 if (ret)
540 goto irq0_free; 540 goto irq0_free;
541 541
diff --git a/drivers/mmc/omap.c b/drivers/mmc/omap.c
index 7a4840ec53b7..ddf06b32c159 100644
--- a/drivers/mmc/omap.c
+++ b/drivers/mmc/omap.c
@@ -60,6 +60,7 @@ struct mmc_omap_host {
60 unsigned char id; /* 16xx chips have 2 MMC blocks */ 60 unsigned char id; /* 16xx chips have 2 MMC blocks */
61 struct clk * iclk; 61 struct clk * iclk;
62 struct clk * fclk; 62 struct clk * fclk;
63 struct resource *res;
63 void __iomem *base; 64 void __iomem *base;
64 int irq; 65 int irq;
65 unsigned char bus_mode; 66 unsigned char bus_mode;
@@ -339,8 +340,6 @@ static void
339mmc_omap_xfer_data(struct mmc_omap_host *host, int write) 340mmc_omap_xfer_data(struct mmc_omap_host *host, int write)
340{ 341{
341 int n; 342 int n;
342 void __iomem *reg;
343 u16 *p;
344 343
345 if (host->buffer_bytes_left == 0) { 344 if (host->buffer_bytes_left == 0) {
346 host->sg_idx++; 345 host->sg_idx++;
@@ -657,12 +656,12 @@ static void mmc_omap_dma_cb(int lch, u16 ch_status, void *data)
657 struct mmc_data *mmcdat = host->data; 656 struct mmc_data *mmcdat = host->data;
658 657
659 if (unlikely(host->dma_ch < 0)) { 658 if (unlikely(host->dma_ch < 0)) {
660 dev_err(mmc_dev(host->mmc), "DMA callback while DMA not 659 dev_err(mmc_dev(host->mmc),
661 enabled\n"); 660 "DMA callback while DMA not enabled\n");
662 return; 661 return;
663 } 662 }
664 /* FIXME: We really should do something to _handle_ the errors */ 663 /* FIXME: We really should do something to _handle_ the errors */
665 if (ch_status & OMAP_DMA_TOUT_IRQ) { 664 if (ch_status & OMAP1_DMA_TOUT_IRQ) {
666 dev_err(mmc_dev(host->mmc),"DMA timeout\n"); 665 dev_err(mmc_dev(host->mmc),"DMA timeout\n");
667 return; 666 return;
668 } 667 }
@@ -972,20 +971,20 @@ static int __init mmc_omap_probe(struct platform_device *pdev)
972 struct omap_mmc_conf *minfo = pdev->dev.platform_data; 971 struct omap_mmc_conf *minfo = pdev->dev.platform_data;
973 struct mmc_host *mmc; 972 struct mmc_host *mmc;
974 struct mmc_omap_host *host = NULL; 973 struct mmc_omap_host *host = NULL;
974 struct resource *r;
975 int ret = 0; 975 int ret = 0;
976 int irq;
976 977
977 if (platform_get_resource(pdev, IORESOURCE_MEM, 0) || 978 r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
978 platform_get_irq(pdev, IORESOURCE_IRQ, 0)) { 979 irq = platform_get_irq(pdev, 0);
979 dev_err(&pdev->dev, "mmc_omap_probe: invalid resource type\n"); 980 if (!r || irq < 0)
980 return -ENODEV; 981 return -ENXIO;
981 }
982 982
983 if (!request_mem_region(pdev->resource[0].start, 983 r = request_mem_region(pdev->resource[0].start,
984 pdev->resource[0].end - pdev->resource[0].start + 1, 984 pdev->resource[0].end - pdev->resource[0].start + 1,
985 pdev->name)) { 985 pdev->name);
986 dev_dbg(&pdev->dev, "request_mem_region failed\n"); 986 if (!r)
987 return -EBUSY; 987 return -EBUSY;
988 }
989 988
990 mmc = mmc_alloc_host(sizeof(struct mmc_omap_host), &pdev->dev); 989 mmc = mmc_alloc_host(sizeof(struct mmc_omap_host), &pdev->dev);
991 if (!mmc) { 990 if (!mmc) {
@@ -1002,6 +1001,8 @@ static int __init mmc_omap_probe(struct platform_device *pdev)
1002 host->dma_timer.data = (unsigned long) host; 1001 host->dma_timer.data = (unsigned long) host;
1003 1002
1004 host->id = pdev->id; 1003 host->id = pdev->id;
1004 host->res = r;
1005 host->irq = irq;
1005 1006
1006 if (cpu_is_omap24xx()) { 1007 if (cpu_is_omap24xx()) {
1007 host->iclk = clk_get(&pdev->dev, "mmc_ick"); 1008 host->iclk = clk_get(&pdev->dev, "mmc_ick");
@@ -1031,13 +1032,9 @@ static int __init mmc_omap_probe(struct platform_device *pdev)
1031 host->dma_ch = -1; 1032 host->dma_ch = -1;
1032 1033
1033 host->irq = pdev->resource[1].start; 1034 host->irq = pdev->resource[1].start;
1034 host->base = ioremap(pdev->res.start, SZ_4K); 1035 host->base = (void __iomem*)IO_ADDRESS(r->start);
1035 if (!host->base) {
1036 ret = -ENOMEM;
1037 goto out;
1038 }
1039 1036
1040 if (minfo->wire4) 1037 if (minfo->wire4)
1041 mmc->caps |= MMC_CAP_4_BIT_DATA; 1038 mmc->caps |= MMC_CAP_4_BIT_DATA;
1042 1039
1043 mmc->ops = &mmc_omap_ops; 1040 mmc->ops = &mmc_omap_ops;
@@ -1056,8 +1053,8 @@ static int __init mmc_omap_probe(struct platform_device *pdev)
1056 1053
1057 if (host->power_pin >= 0) { 1054 if (host->power_pin >= 0) {
1058 if ((ret = omap_request_gpio(host->power_pin)) != 0) { 1055 if ((ret = omap_request_gpio(host->power_pin)) != 0) {
1059 dev_err(mmc_dev(host->mmc), "Unable to get GPIO 1056 dev_err(mmc_dev(host->mmc),
1060 pin for MMC power\n"); 1057 "Unable to get GPIO pin for MMC power\n");
1061 goto out; 1058 goto out;
1062 } 1059 }
1063 omap_set_gpio_direction(host->power_pin, 0); 1060 omap_set_gpio_direction(host->power_pin, 0);
@@ -1085,7 +1082,7 @@ static int __init mmc_omap_probe(struct platform_device *pdev)
1085 1082
1086 omap_set_gpio_direction(host->switch_pin, 1); 1083 omap_set_gpio_direction(host->switch_pin, 1);
1087 ret = request_irq(OMAP_GPIO_IRQ(host->switch_pin), 1084 ret = request_irq(OMAP_GPIO_IRQ(host->switch_pin),
1088 mmc_omap_switch_irq, SA_TRIGGER_RISING, DRIVER_NAME, host); 1085 mmc_omap_switch_irq, IRQF_TRIGGER_RISING, DRIVER_NAME, host);
1089 if (ret) { 1086 if (ret) {
1090 dev_warn(mmc_dev(host->mmc), "Unable to get IRQ for MMC cover switch\n"); 1087 dev_warn(mmc_dev(host->mmc), "Unable to get IRQ for MMC cover switch\n");
1091 omap_free_gpio(host->switch_pin); 1088 omap_free_gpio(host->switch_pin);
@@ -1099,7 +1096,7 @@ static int __init mmc_omap_probe(struct platform_device *pdev)
1099 device_remove_file(&pdev->dev, &dev_attr_cover_switch); 1096 device_remove_file(&pdev->dev, &dev_attr_cover_switch);
1100 } 1097 }
1101 if (ret) { 1098 if (ret) {
1102 dev_wan(mmc_dev(host->mmc), "Unable to create sysfs attributes\n"); 1099 dev_warn(mmc_dev(host->mmc), "Unable to create sysfs attributes\n");
1103 free_irq(OMAP_GPIO_IRQ(host->switch_pin), host); 1100 free_irq(OMAP_GPIO_IRQ(host->switch_pin), host);
1104 omap_free_gpio(host->switch_pin); 1101 omap_free_gpio(host->switch_pin);
1105 host->switch_pin = -1; 1102 host->switch_pin = -1;
diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c
index 60a40cb0a49a..893319108ba4 100644
--- a/drivers/mmc/sdhci.c
+++ b/drivers/mmc/sdhci.c
@@ -1314,7 +1314,7 @@ static int __devinit sdhci_probe_slot(struct pci_dev *pdev, int slot)
1314 1314
1315 setup_timer(&host->timer, sdhci_timeout_timer, (long)host); 1315 setup_timer(&host->timer, sdhci_timeout_timer, (long)host);
1316 1316
1317 ret = request_irq(host->irq, sdhci_irq, SA_SHIRQ, 1317 ret = request_irq(host->irq, sdhci_irq, IRQF_SHARED,
1318 host->slot_descr, host); 1318 host->slot_descr, host);
1319 if (ret) 1319 if (ret)
1320 goto untasklet; 1320 goto untasklet;
diff --git a/drivers/mmc/wbsd.c b/drivers/mmc/wbsd.c
index 3fcd86c08ebd..8a30ef3ae419 100644
--- a/drivers/mmc/wbsd.c
+++ b/drivers/mmc/wbsd.c
@@ -1553,7 +1553,7 @@ static int __devinit wbsd_request_irq(struct wbsd_host *host, int irq)
1553 * Allocate interrupt. 1553 * Allocate interrupt.
1554 */ 1554 */
1555 1555
1556 ret = request_irq(irq, wbsd_irq, SA_SHIRQ, DRIVER_NAME, host); 1556 ret = request_irq(irq, wbsd_irq, IRQF_SHARED, DRIVER_NAME, host);
1557 if (ret) 1557 if (ret)
1558 return ret; 1558 return ret;
1559 1559