|
@@ -28,7 +28,6 @@
|
|
#include <linux/of_device.h>
|
|
#include <linux/of_device.h>
|
|
#include <linux/platform_device.h>
|
|
#include <linux/platform_device.h>
|
|
#include <linux/mmc/host.h>
|
|
#include <linux/mmc/host.h>
|
|
-#include <linux/mmc/sh_mobile_sdhi.h>
|
|
|
|
#include <linux/mfd/tmio.h>
|
|
#include <linux/mfd/tmio.h>
|
|
#include <linux/sh_dma.h>
|
|
#include <linux/sh_dma.h>
|
|
#include <linux/delay.h>
|
|
#include <linux/delay.h>
|
|
@@ -316,7 +315,6 @@ static int sh_mobile_sdhi_probe(struct platform_device *pdev)
|
|
struct tmio_mmc_host *host;
|
|
struct tmio_mmc_host *host;
|
|
struct resource *res;
|
|
struct resource *res;
|
|
int irq, ret, i = 0;
|
|
int irq, ret, i = 0;
|
|
- bool multiplexed_isr = true;
|
|
|
|
struct tmio_mmc_dma *dma_priv;
|
|
struct tmio_mmc_dma *dma_priv;
|
|
|
|
|
|
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
|
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
|
@@ -408,62 +406,23 @@ static int sh_mobile_sdhi_probe(struct platform_device *pdev)
|
|
if (ret < 0)
|
|
if (ret < 0)
|
|
goto efree;
|
|
goto efree;
|
|
|
|
|
|
- /*
|
|
|
|
- * Allow one or more specific (named) ISRs or
|
|
|
|
- * one or more multiplexed (un-named) ISRs.
|
|
|
|
- */
|
|
|
|
-
|
|
|
|
- irq = platform_get_irq_byname(pdev, SH_MOBILE_SDHI_IRQ_CARD_DETECT);
|
|
|
|
- if (irq >= 0) {
|
|
|
|
- multiplexed_isr = false;
|
|
|
|
- ret = devm_request_irq(&pdev->dev, irq, tmio_mmc_card_detect_irq, 0,
|
|
|
|
|
|
+ while (1) {
|
|
|
|
+ irq = platform_get_irq(pdev, i);
|
|
|
|
+ if (irq < 0)
|
|
|
|
+ break;
|
|
|
|
+ i++;
|
|
|
|
+ ret = devm_request_irq(&pdev->dev, irq, tmio_mmc_irq, 0,
|
|
dev_name(&pdev->dev), host);
|
|
dev_name(&pdev->dev), host);
|
|
if (ret)
|
|
if (ret)
|
|
goto eirq;
|
|
goto eirq;
|
|
}
|
|
}
|
|
|
|
|
|
- irq = platform_get_irq_byname(pdev, SH_MOBILE_SDHI_IRQ_SDIO);
|
|
|
|
- if (irq >= 0) {
|
|
|
|
- multiplexed_isr = false;
|
|
|
|
- ret = devm_request_irq(&pdev->dev, irq, tmio_mmc_sdio_irq, 0,
|
|
|
|
- dev_name(&pdev->dev), host);
|
|
|
|
- if (ret)
|
|
|
|
- goto eirq;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- irq = platform_get_irq_byname(pdev, SH_MOBILE_SDHI_IRQ_SDCARD);
|
|
|
|
- if (irq >= 0) {
|
|
|
|
- multiplexed_isr = false;
|
|
|
|
- ret = devm_request_irq(&pdev->dev, irq, tmio_mmc_sdcard_irq, 0,
|
|
|
|
- dev_name(&pdev->dev), host);
|
|
|
|
- if (ret)
|
|
|
|
- goto eirq;
|
|
|
|
- } else if (!multiplexed_isr) {
|
|
|
|
- dev_err(&pdev->dev,
|
|
|
|
- "Principal SD-card IRQ is missing among named interrupts\n");
|
|
|
|
|
|
+ /* There must be at least one IRQ source */
|
|
|
|
+ if (!i) {
|
|
ret = irq;
|
|
ret = irq;
|
|
goto eirq;
|
|
goto eirq;
|
|
}
|
|
}
|
|
|
|
|
|
- if (multiplexed_isr) {
|
|
|
|
- while (1) {
|
|
|
|
- irq = platform_get_irq(pdev, i);
|
|
|
|
- if (irq < 0)
|
|
|
|
- break;
|
|
|
|
- i++;
|
|
|
|
- ret = devm_request_irq(&pdev->dev, irq, tmio_mmc_irq, 0,
|
|
|
|
- dev_name(&pdev->dev), host);
|
|
|
|
- if (ret)
|
|
|
|
- goto eirq;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- /* There must be at least one IRQ source */
|
|
|
|
- if (!i) {
|
|
|
|
- ret = irq;
|
|
|
|
- goto eirq;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
dev_info(&pdev->dev, "%s base at 0x%08lx max clock rate %u MHz\n",
|
|
dev_info(&pdev->dev, "%s base at 0x%08lx max clock rate %u MHz\n",
|
|
mmc_hostname(host->mmc), (unsigned long)
|
|
mmc_hostname(host->mmc), (unsigned long)
|
|
(platform_get_resource(pdev, IORESOURCE_MEM, 0)->start),
|
|
(platform_get_resource(pdev, IORESOURCE_MEM, 0)->start),
|