diff options
author | Magnus Damm <damm@opensource.se> | 2011-05-06 07:02:33 -0400 |
---|---|---|
committer | Chris Ball <cjb@laptop.org> | 2011-05-24 23:53:52 -0400 |
commit | 8e7bfdb37ac001c95d2c768932b57de1019409cd (patch) | |
tree | 8b91c25442de01ce415563ae60ee30eb8d7e6e3c /drivers/mmc/host/tmio_mmc_pio.c | |
parent | df3ef2d3c92c0a562ebde3699af7d12401fddf60 (diff) |
mmc: tmio/sdhi: break out interrupt request/free
Move request_irq()/free_irq() from the shared code
in tmio_mmc.c into the SDHI/tmio specific portion
in sh_mobile_sdhi.c and tmio_mmc_pio.c.
This is ground work to allow us to adjust the SDHI
code with IRQ flags and number of interupt sources.
Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers/mmc/host/tmio_mmc_pio.c')
-rw-r--r-- | drivers/mmc/host/tmio_mmc_pio.c | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/drivers/mmc/host/tmio_mmc_pio.c b/drivers/mmc/host/tmio_mmc_pio.c index ea6ade31bcc7..af5d4f6d2233 100644 --- a/drivers/mmc/host/tmio_mmc_pio.c +++ b/drivers/mmc/host/tmio_mmc_pio.c | |||
@@ -564,7 +564,7 @@ out: | |||
564 | spin_unlock(&host->lock); | 564 | spin_unlock(&host->lock); |
565 | } | 565 | } |
566 | 566 | ||
567 | static irqreturn_t tmio_mmc_irq(int irq, void *devid) | 567 | irqreturn_t tmio_mmc_irq(int irq, void *devid) |
568 | { | 568 | { |
569 | struct tmio_mmc_host *host = devid; | 569 | struct tmio_mmc_host *host = devid; |
570 | struct tmio_mmc_data *pdata = host->pdata; | 570 | struct tmio_mmc_data *pdata = host->pdata; |
@@ -659,6 +659,7 @@ static irqreturn_t tmio_mmc_irq(int irq, void *devid) | |||
659 | out: | 659 | out: |
660 | return IRQ_HANDLED; | 660 | return IRQ_HANDLED; |
661 | } | 661 | } |
662 | EXPORT_SYMBOL(tmio_mmc_irq); | ||
662 | 663 | ||
663 | static int tmio_mmc_start_data(struct tmio_mmc_host *host, | 664 | static int tmio_mmc_start_data(struct tmio_mmc_host *host, |
664 | struct mmc_data *data) | 665 | struct mmc_data *data) |
@@ -893,21 +894,10 @@ int __devinit tmio_mmc_host_probe(struct tmio_mmc_host **host, | |||
893 | tmio_mmc_clk_stop(_host); | 894 | tmio_mmc_clk_stop(_host); |
894 | tmio_mmc_reset(_host); | 895 | tmio_mmc_reset(_host); |
895 | 896 | ||
896 | ret = platform_get_irq(pdev, 0); | ||
897 | if (ret < 0) | ||
898 | goto pm_suspend; | ||
899 | |||
900 | _host->irq = ret; | ||
901 | |||
902 | tmio_mmc_disable_mmc_irqs(_host, TMIO_MASK_ALL); | 897 | tmio_mmc_disable_mmc_irqs(_host, TMIO_MASK_ALL); |
903 | if (pdata->flags & TMIO_MMC_SDIO_IRQ) | 898 | if (pdata->flags & TMIO_MMC_SDIO_IRQ) |
904 | tmio_mmc_enable_sdio_irq(mmc, 0); | 899 | tmio_mmc_enable_sdio_irq(mmc, 0); |
905 | 900 | ||
906 | ret = request_irq(_host->irq, tmio_mmc_irq, IRQF_DISABLED | | ||
907 | IRQF_TRIGGER_FALLING, dev_name(&pdev->dev), _host); | ||
908 | if (ret) | ||
909 | goto pm_suspend; | ||
910 | |||
911 | spin_lock_init(&_host->lock); | 901 | spin_lock_init(&_host->lock); |
912 | 902 | ||
913 | /* Init delayed work for request timeouts */ | 903 | /* Init delayed work for request timeouts */ |
@@ -933,8 +923,6 @@ int __devinit tmio_mmc_host_probe(struct tmio_mmc_host **host, | |||
933 | 923 | ||
934 | return 0; | 924 | return 0; |
935 | 925 | ||
936 | pm_suspend: | ||
937 | pm_runtime_suspend(&pdev->dev); | ||
938 | pm_disable: | 926 | pm_disable: |
939 | pm_runtime_disable(&pdev->dev); | 927 | pm_runtime_disable(&pdev->dev); |
940 | iounmap(_host->ctl); | 928 | iounmap(_host->ctl); |
@@ -952,7 +940,6 @@ void tmio_mmc_host_remove(struct tmio_mmc_host *host) | |||
952 | mmc_remove_host(host->mmc); | 940 | mmc_remove_host(host->mmc); |
953 | cancel_delayed_work_sync(&host->delayed_reset_work); | 941 | cancel_delayed_work_sync(&host->delayed_reset_work); |
954 | tmio_mmc_release_dma(host); | 942 | tmio_mmc_release_dma(host); |
955 | free_irq(host->irq, host); | ||
956 | iounmap(host->ctl); | 943 | iounmap(host->ctl); |
957 | mmc_free_host(host->mmc); | 944 | mmc_free_host(host->mmc); |
958 | 945 | ||