summaryrefslogtreecommitdiffstats
path: root/drivers/mmc
diff options
context:
space:
mode:
authorWolfram Sang <wsa+renesas@sang-engineering.com>2016-04-26 11:55:23 -0400
committerUlf Hansson <ulf.hansson@linaro.org>2016-05-02 04:33:38 -0400
commitadcbc949046366edb46e44f72ac9197c32675cfd (patch)
tree950ea82da4d8c0e1685e587d811454c9aa032480 /drivers/mmc
parent13bbd8af65895c524c27850495fadf23449f9f3d (diff)
mmc: sh_mobile_sdhi: remove obsolete irq_by_name registration
There is no user left in the kernel, so this code can be removed. (Legacy, non-DT sh_mobile boards have been removed a while ago.) The diff looks more complicated than it is: The if-block for multiplexed isr is now the main code path, the rest is removed. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/host/sh_mobile_sdhi.c57
1 files changed, 8 insertions, 49 deletions
diff --git a/drivers/mmc/host/sh_mobile_sdhi.c b/drivers/mmc/host/sh_mobile_sdhi.c
index ec6f4b6199b4..9c9bbb25892a 100644
--- a/drivers/mmc/host/sh_mobile_sdhi.c
+++ b/drivers/mmc/host/sh_mobile_sdhi.c
@@ -28,7 +28,6 @@
28#include <linux/of_device.h> 28#include <linux/of_device.h>
29#include <linux/platform_device.h> 29#include <linux/platform_device.h>
30#include <linux/mmc/host.h> 30#include <linux/mmc/host.h>
31#include <linux/mmc/sh_mobile_sdhi.h>
32#include <linux/mfd/tmio.h> 31#include <linux/mfd/tmio.h>
33#include <linux/sh_dma.h> 32#include <linux/sh_dma.h>
34#include <linux/delay.h> 33#include <linux/delay.h>
@@ -316,7 +315,6 @@ static int sh_mobile_sdhi_probe(struct platform_device *pdev)
316 struct tmio_mmc_host *host; 315 struct tmio_mmc_host *host;
317 struct resource *res; 316 struct resource *res;
318 int irq, ret, i = 0; 317 int irq, ret, i = 0;
319 bool multiplexed_isr = true;
320 struct tmio_mmc_dma *dma_priv; 318 struct tmio_mmc_dma *dma_priv;
321 319
322 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 320 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
@@ -408,62 +406,23 @@ static int sh_mobile_sdhi_probe(struct platform_device *pdev)
408 if (ret < 0) 406 if (ret < 0)
409 goto efree; 407 goto efree;
410 408
411 /* 409 while (1) {
412 * Allow one or more specific (named) ISRs or 410 irq = platform_get_irq(pdev, i);
413 * one or more multiplexed (un-named) ISRs. 411 if (irq < 0)
414 */ 412 break;
415 413 i++;
416 irq = platform_get_irq_byname(pdev, SH_MOBILE_SDHI_IRQ_CARD_DETECT); 414 ret = devm_request_irq(&pdev->dev, irq, tmio_mmc_irq, 0,
417 if (irq >= 0) {
418 multiplexed_isr = false;
419 ret = devm_request_irq(&pdev->dev, irq, tmio_mmc_card_detect_irq, 0,
420 dev_name(&pdev->dev), host); 415 dev_name(&pdev->dev), host);
421 if (ret) 416 if (ret)
422 goto eirq; 417 goto eirq;
423 } 418 }
424 419
425 irq = platform_get_irq_byname(pdev, SH_MOBILE_SDHI_IRQ_SDIO); 420 /* There must be at least one IRQ source */
426 if (irq >= 0) { 421 if (!i) {
427 multiplexed_isr = false;
428 ret = devm_request_irq(&pdev->dev, irq, tmio_mmc_sdio_irq, 0,
429 dev_name(&pdev->dev), host);
430 if (ret)
431 goto eirq;
432 }
433
434 irq = platform_get_irq_byname(pdev, SH_MOBILE_SDHI_IRQ_SDCARD);
435 if (irq >= 0) {
436 multiplexed_isr = false;
437 ret = devm_request_irq(&pdev->dev, irq, tmio_mmc_sdcard_irq, 0,
438 dev_name(&pdev->dev), host);
439 if (ret)
440 goto eirq;
441 } else if (!multiplexed_isr) {
442 dev_err(&pdev->dev,
443 "Principal SD-card IRQ is missing among named interrupts\n");
444 ret = irq; 422 ret = irq;
445 goto eirq; 423 goto eirq;
446 } 424 }
447 425
448 if (multiplexed_isr) {
449 while (1) {
450 irq = platform_get_irq(pdev, i);
451 if (irq < 0)
452 break;
453 i++;
454 ret = devm_request_irq(&pdev->dev, irq, tmio_mmc_irq, 0,
455 dev_name(&pdev->dev), host);
456 if (ret)
457 goto eirq;
458 }
459
460 /* There must be at least one IRQ source */
461 if (!i) {
462 ret = irq;
463 goto eirq;
464 }
465 }
466
467 dev_info(&pdev->dev, "%s base at 0x%08lx max clock rate %u MHz\n", 426 dev_info(&pdev->dev, "%s base at 0x%08lx max clock rate %u MHz\n",
468 mmc_hostname(host->mmc), (unsigned long) 427 mmc_hostname(host->mmc), (unsigned long)
469 (platform_get_resource(pdev, IORESOURCE_MEM, 0)->start), 428 (platform_get_resource(pdev, IORESOURCE_MEM, 0)->start),