diff mbox

[2/6] mmc: sh_mobile_sdhi: remove obsolete irq_by_name registration

Message ID 1459934734-3613-3-git-send-email-wsa@the-dreams.de
State New
Headers show

Commit Message

Wolfram Sang April 6, 2016, 9:25 a.m. UTC
From: Wolfram Sang <wsa+renesas@sang-engineering.com>

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

Comments

Ulf Hansson April 18, 2016, 8:21 a.m. UTC | #1
On 6 April 2016 at 11:25, Wolfram Sang <wsa@the-dreams.de> wrote:
> From: Wolfram Sang <wsa+renesas@sang-engineering.com>
>
> 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. A number of sh boards
> included the now deleted include file without needing it. Remove that,
> too.
>
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> ---
>  arch/sh/boards/board-sh7757lcr.c     |  1 -
>  arch/sh/boards/mach-ap325rxa/setup.c |  1 -
>  arch/sh/boards/mach-ecovec24/setup.c |  1 -
>  arch/sh/boards/mach-kfr2r09/setup.c  |  1 -
>  arch/sh/boards/mach-migor/setup.c    |  1 -
>  arch/sh/boards/mach-se/7724/setup.c  |  1 -
>  drivers/mmc/host/sh_mobile_sdhi.c    | 57 +++++-------------------------------
>  include/linux/mmc/sh_mobile_sdhi.h   | 10 -------
>  8 files changed, 8 insertions(+), 65 deletions(-)
>  delete mode 100644 include/linux/mmc/sh_mobile_sdhi.h

Hi Wolfram,

I need and ack from the Superh arch maintainer to apply this one.

It seems like you didn't include them on "to/cc" list, perhaps repost!?

Kind regards
Uffe

>
> diff --git a/arch/sh/boards/board-sh7757lcr.c b/arch/sh/boards/board-sh7757lcr.c
> index 324599bfad1420..0104c8199c48fe 100644
> --- a/arch/sh/boards/board-sh7757lcr.c
> +++ b/arch/sh/boards/board-sh7757lcr.c
> @@ -20,7 +20,6 @@
>  #include <linux/mfd/tmio.h>
>  #include <linux/mmc/host.h>
>  #include <linux/mmc/sh_mmcif.h>
> -#include <linux/mmc/sh_mobile_sdhi.h>
>  #include <linux/sh_eth.h>
>  #include <linux/sh_intc.h>
>  #include <linux/usb/renesas_usbhs.h>
> diff --git a/arch/sh/boards/mach-ap325rxa/setup.c b/arch/sh/boards/mach-ap325rxa/setup.c
> index 62c3b81300ed28..de8393cb7313bc 100644
> --- a/arch/sh/boards/mach-ap325rxa/setup.c
> +++ b/arch/sh/boards/mach-ap325rxa/setup.c
> @@ -15,7 +15,6 @@
>  #include <linux/interrupt.h>
>  #include <linux/platform_device.h>
>  #include <linux/mmc/host.h>
> -#include <linux/mmc/sh_mobile_sdhi.h>
>  #include <linux/mtd/physmap.h>
>  #include <linux/mtd/sh_flctl.h>
>  #include <linux/mfd/tmio.h>
> diff --git a/arch/sh/boards/mach-ecovec24/setup.c b/arch/sh/boards/mach-ecovec24/setup.c
> index a9c0c07386fddd..6d612792f6b8ec 100644
> --- a/arch/sh/boards/mach-ecovec24/setup.c
> +++ b/arch/sh/boards/mach-ecovec24/setup.c
> @@ -13,7 +13,6 @@
>  #include <linux/platform_device.h>
>  #include <linux/mmc/host.h>
>  #include <linux/mmc/sh_mmcif.h>
> -#include <linux/mmc/sh_mobile_sdhi.h>
>  #include <linux/mtd/physmap.h>
>  #include <linux/mfd/tmio.h>
>  #include <linux/gpio.h>
> diff --git a/arch/sh/boards/mach-kfr2r09/setup.c b/arch/sh/boards/mach-kfr2r09/setup.c
> index 6bd9230e64e300..5deb2d82f19f78 100644
> --- a/arch/sh/boards/mach-kfr2r09/setup.c
> +++ b/arch/sh/boards/mach-kfr2r09/setup.c
> @@ -11,7 +11,6 @@
>  #include <linux/platform_device.h>
>  #include <linux/interrupt.h>
>  #include <linux/mmc/host.h>
> -#include <linux/mmc/sh_mobile_sdhi.h>
>  #include <linux/mfd/tmio.h>
>  #include <linux/mtd/physmap.h>
>  #include <linux/mtd/onenand.h>
> diff --git a/arch/sh/boards/mach-migor/setup.c b/arch/sh/boards/mach-migor/setup.c
> index 7a04da3efce402..5de60a77eaa1ab 100644
> --- a/arch/sh/boards/mach-migor/setup.c
> +++ b/arch/sh/boards/mach-migor/setup.c
> @@ -13,7 +13,6 @@
>  #include <linux/input.h>
>  #include <linux/input/sh_keysc.h>
>  #include <linux/mmc/host.h>
> -#include <linux/mmc/sh_mobile_sdhi.h>
>  #include <linux/mtd/physmap.h>
>  #include <linux/mfd/tmio.h>
>  #include <linux/mtd/nand.h>
> diff --git a/arch/sh/boards/mach-se/7724/setup.c b/arch/sh/boards/mach-se/7724/setup.c
> index e0e1df136642cd..f1fecd395679ae 100644
> --- a/arch/sh/boards/mach-se/7724/setup.c
> +++ b/arch/sh/boards/mach-se/7724/setup.c
> @@ -15,7 +15,6 @@
>  #include <linux/interrupt.h>
>  #include <linux/platform_device.h>
>  #include <linux/mmc/host.h>
> -#include <linux/mmc/sh_mobile_sdhi.h>
>  #include <linux/mfd/tmio.h>
>  #include <linux/mtd/physmap.h>
>  #include <linux/delay.h>
> diff --git a/drivers/mmc/host/sh_mobile_sdhi.c b/drivers/mmc/host/sh_mobile_sdhi.c
> index 9beee48d2e280d..51d8dbd5b06a3e 100644
> --- a/drivers/mmc/host/sh_mobile_sdhi.c
> +++ b/drivers/mmc/host/sh_mobile_sdhi.c
> @@ -28,7 +28,6 @@
>  #include <linux/of_device.h>
>  #include <linux/platform_device.h>
>  #include <linux/mmc/host.h>
> -#include <linux/mmc/sh_mobile_sdhi.h>
>  #include <linux/mfd/tmio.h>
>  #include <linux/sh_dma.h>
>  #include <linux/delay.h>
> @@ -315,7 +314,6 @@ static int sh_mobile_sdhi_probe(struct platform_device *pdev)
>         struct tmio_mmc_host *host;
>         struct resource *res;
>         int irq, ret, i = 0;
> -       bool multiplexed_isr = true;
>         struct tmio_mmc_dma *dma_priv;
>
>         res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> @@ -405,62 +403,23 @@ static int sh_mobile_sdhi_probe(struct platform_device *pdev)
>         if (ret < 0)
>                 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);
>                 if (ret)
>                         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;
>                 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",
>                  mmc_hostname(host->mmc), (unsigned long)
>                  (platform_get_resource(pdev, IORESOURCE_MEM, 0)->start),
> diff --git a/include/linux/mmc/sh_mobile_sdhi.h b/include/linux/mmc/sh_mobile_sdhi.h
> deleted file mode 100644
> index 95d6f0314a7ded..00000000000000
> --- a/include/linux/mmc/sh_mobile_sdhi.h
> +++ /dev/null
> @@ -1,10 +0,0 @@
> -#ifndef LINUX_MMC_SH_MOBILE_SDHI_H
> -#define LINUX_MMC_SH_MOBILE_SDHI_H
> -
> -#include <linux/types.h>
> -
> -#define SH_MOBILE_SDHI_IRQ_CARD_DETECT "card_detect"
> -#define SH_MOBILE_SDHI_IRQ_SDCARD      "sdcard"
> -#define SH_MOBILE_SDHI_IRQ_SDIO                "sdio"
> -
> -#endif /* LINUX_MMC_SH_MOBILE_SDHI_H */
> --
> 2.7.0
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Wolfram Sang April 19, 2016, 9:37 a.m. UTC | #2
On Mon, Apr 18, 2016 at 10:21:41AM +0200, Ulf Hansson wrote:
> On 6 April 2016 at 11:25, Wolfram Sang <wsa@the-dreams.de> wrote:
> > From: Wolfram Sang <wsa+renesas@sang-engineering.com>
> >
> > 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. A number of sh boards
> > included the now deleted include file without needing it. Remove that,
> > too.
> >
> > Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> > ---
> >  arch/sh/boards/board-sh7757lcr.c     |  1 -
> >  arch/sh/boards/mach-ap325rxa/setup.c |  1 -
> >  arch/sh/boards/mach-ecovec24/setup.c |  1 -
> >  arch/sh/boards/mach-kfr2r09/setup.c  |  1 -
> >  arch/sh/boards/mach-migor/setup.c    |  1 -
> >  arch/sh/boards/mach-se/7724/setup.c  |  1 -
> >  drivers/mmc/host/sh_mobile_sdhi.c    | 57 +++++-------------------------------
> >  include/linux/mmc/sh_mobile_sdhi.h   | 10 -------
> >  8 files changed, 8 insertions(+), 65 deletions(-)
> >  delete mode 100644 include/linux/mmc/sh_mobile_sdhi.h
> 
> Hi Wolfram,
> 
> I need and ack from the Superh arch maintainer to apply this one.
> 
> It seems like you didn't include them on "to/cc" list, perhaps repost!?

I hoped adding the sh-list will be enough. Adding them to this mail
explicitly now, maybe this will do?

@SH-maintainers: some SH board files include a file with platform_data
they are not really using. Since I want to remove the platform_data
file, I remove inclusion of this file. That's all to it. Build bot was
happy, too.

Thanks,

   Wolfram

> 
> Kind regards
> Uffe
> 
> >
> > diff --git a/arch/sh/boards/board-sh7757lcr.c b/arch/sh/boards/board-sh7757lcr.c
> > index 324599bfad1420..0104c8199c48fe 100644
> > --- a/arch/sh/boards/board-sh7757lcr.c
> > +++ b/arch/sh/boards/board-sh7757lcr.c
> > @@ -20,7 +20,6 @@
> >  #include <linux/mfd/tmio.h>
> >  #include <linux/mmc/host.h>
> >  #include <linux/mmc/sh_mmcif.h>
> > -#include <linux/mmc/sh_mobile_sdhi.h>
> >  #include <linux/sh_eth.h>
> >  #include <linux/sh_intc.h>
> >  #include <linux/usb/renesas_usbhs.h>
> > diff --git a/arch/sh/boards/mach-ap325rxa/setup.c b/arch/sh/boards/mach-ap325rxa/setup.c
> > index 62c3b81300ed28..de8393cb7313bc 100644
> > --- a/arch/sh/boards/mach-ap325rxa/setup.c
> > +++ b/arch/sh/boards/mach-ap325rxa/setup.c
> > @@ -15,7 +15,6 @@
> >  #include <linux/interrupt.h>
> >  #include <linux/platform_device.h>
> >  #include <linux/mmc/host.h>
> > -#include <linux/mmc/sh_mobile_sdhi.h>
> >  #include <linux/mtd/physmap.h>
> >  #include <linux/mtd/sh_flctl.h>
> >  #include <linux/mfd/tmio.h>
> > diff --git a/arch/sh/boards/mach-ecovec24/setup.c b/arch/sh/boards/mach-ecovec24/setup.c
> > index a9c0c07386fddd..6d612792f6b8ec 100644
> > --- a/arch/sh/boards/mach-ecovec24/setup.c
> > +++ b/arch/sh/boards/mach-ecovec24/setup.c
> > @@ -13,7 +13,6 @@
> >  #include <linux/platform_device.h>
> >  #include <linux/mmc/host.h>
> >  #include <linux/mmc/sh_mmcif.h>
> > -#include <linux/mmc/sh_mobile_sdhi.h>
> >  #include <linux/mtd/physmap.h>
> >  #include <linux/mfd/tmio.h>
> >  #include <linux/gpio.h>
> > diff --git a/arch/sh/boards/mach-kfr2r09/setup.c b/arch/sh/boards/mach-kfr2r09/setup.c
> > index 6bd9230e64e300..5deb2d82f19f78 100644
> > --- a/arch/sh/boards/mach-kfr2r09/setup.c
> > +++ b/arch/sh/boards/mach-kfr2r09/setup.c
> > @@ -11,7 +11,6 @@
> >  #include <linux/platform_device.h>
> >  #include <linux/interrupt.h>
> >  #include <linux/mmc/host.h>
> > -#include <linux/mmc/sh_mobile_sdhi.h>
> >  #include <linux/mfd/tmio.h>
> >  #include <linux/mtd/physmap.h>
> >  #include <linux/mtd/onenand.h>
> > diff --git a/arch/sh/boards/mach-migor/setup.c b/arch/sh/boards/mach-migor/setup.c
> > index 7a04da3efce402..5de60a77eaa1ab 100644
> > --- a/arch/sh/boards/mach-migor/setup.c
> > +++ b/arch/sh/boards/mach-migor/setup.c
> > @@ -13,7 +13,6 @@
> >  #include <linux/input.h>
> >  #include <linux/input/sh_keysc.h>
> >  #include <linux/mmc/host.h>
> > -#include <linux/mmc/sh_mobile_sdhi.h>
> >  #include <linux/mtd/physmap.h>
> >  #include <linux/mfd/tmio.h>
> >  #include <linux/mtd/nand.h>
> > diff --git a/arch/sh/boards/mach-se/7724/setup.c b/arch/sh/boards/mach-se/7724/setup.c
> > index e0e1df136642cd..f1fecd395679ae 100644
> > --- a/arch/sh/boards/mach-se/7724/setup.c
> > +++ b/arch/sh/boards/mach-se/7724/setup.c
> > @@ -15,7 +15,6 @@
> >  #include <linux/interrupt.h>
> >  #include <linux/platform_device.h>
> >  #include <linux/mmc/host.h>
> > -#include <linux/mmc/sh_mobile_sdhi.h>
> >  #include <linux/mfd/tmio.h>
> >  #include <linux/mtd/physmap.h>
> >  #include <linux/delay.h>
> > diff --git a/drivers/mmc/host/sh_mobile_sdhi.c b/drivers/mmc/host/sh_mobile_sdhi.c
> > index 9beee48d2e280d..51d8dbd5b06a3e 100644
> > --- a/drivers/mmc/host/sh_mobile_sdhi.c
> > +++ b/drivers/mmc/host/sh_mobile_sdhi.c
> > @@ -28,7 +28,6 @@
> >  #include <linux/of_device.h>
> >  #include <linux/platform_device.h>
> >  #include <linux/mmc/host.h>
> > -#include <linux/mmc/sh_mobile_sdhi.h>
> >  #include <linux/mfd/tmio.h>
> >  #include <linux/sh_dma.h>
> >  #include <linux/delay.h>
> > @@ -315,7 +314,6 @@ static int sh_mobile_sdhi_probe(struct platform_device *pdev)
> >         struct tmio_mmc_host *host;
> >         struct resource *res;
> >         int irq, ret, i = 0;
> > -       bool multiplexed_isr = true;
> >         struct tmio_mmc_dma *dma_priv;
> >
> >         res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> > @@ -405,62 +403,23 @@ static int sh_mobile_sdhi_probe(struct platform_device *pdev)
> >         if (ret < 0)
> >                 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);
> >                 if (ret)
> >                         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;
> >                 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",
> >                  mmc_hostname(host->mmc), (unsigned long)
> >                  (platform_get_resource(pdev, IORESOURCE_MEM, 0)->start),
> > diff --git a/include/linux/mmc/sh_mobile_sdhi.h b/include/linux/mmc/sh_mobile_sdhi.h
> > deleted file mode 100644
> > index 95d6f0314a7ded..00000000000000
> > --- a/include/linux/mmc/sh_mobile_sdhi.h
> > +++ /dev/null
> > @@ -1,10 +0,0 @@
> > -#ifndef LINUX_MMC_SH_MOBILE_SDHI_H
> > -#define LINUX_MMC_SH_MOBILE_SDHI_H
> > -
> > -#include <linux/types.h>
> > -
> > -#define SH_MOBILE_SDHI_IRQ_CARD_DETECT "card_detect"
> > -#define SH_MOBILE_SDHI_IRQ_SDCARD      "sdcard"
> > -#define SH_MOBILE_SDHI_IRQ_SDIO                "sdio"
> > -
> > -#endif /* LINUX_MMC_SH_MOBILE_SDHI_H */
> > --
> > 2.7.0
> >
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
Wolfram Sang April 26, 2016, 3:47 p.m. UTC | #3
> I need and ack from the Superh arch maintainer to apply this one.
> 
> It seems like you didn't include them on "to/cc" list, perhaps repost!?

Nothing happened...

So, I'll repost the series without the removal of the include file and
not touching SH boards. It will be your realm only then.

I'll repost the SH relevant parts as a seperate patch to the SH list, so
this can have then its own timeframe.
Rich Felker April 27, 2016, 10:54 p.m. UTC | #4
On Tue, Apr 19, 2016 at 11:37:13AM +0200, Wolfram Sang wrote:
> On Mon, Apr 18, 2016 at 10:21:41AM +0200, Ulf Hansson wrote:
> > On 6 April 2016 at 11:25, Wolfram Sang <wsa@the-dreams.de> wrote:
> > > From: Wolfram Sang <wsa+renesas@sang-engineering.com>
> > >
> > > 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. A number of sh boards
> > > included the now deleted include file without needing it. Remove that,
> > > too.
> > >
> > > Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> > > ---
> > >  arch/sh/boards/board-sh7757lcr.c     |  1 -
> > >  arch/sh/boards/mach-ap325rxa/setup.c |  1 -
> > >  arch/sh/boards/mach-ecovec24/setup.c |  1 -
> > >  arch/sh/boards/mach-kfr2r09/setup.c  |  1 -
> > >  arch/sh/boards/mach-migor/setup.c    |  1 -
> > >  arch/sh/boards/mach-se/7724/setup.c  |  1 -
> > >  drivers/mmc/host/sh_mobile_sdhi.c    | 57 +++++-------------------------------
> > >  include/linux/mmc/sh_mobile_sdhi.h   | 10 -------
> > >  8 files changed, 8 insertions(+), 65 deletions(-)
> > >  delete mode 100644 include/linux/mmc/sh_mobile_sdhi.h
> > 
> > Hi Wolfram,
> > 
> > I need and ack from the Superh arch maintainer to apply this one.
> > 
> > It seems like you didn't include them on "to/cc" list, perhaps repost!?
> 
> I hoped adding the sh-list will be enough. Adding them to this mail
> explicitly now, maybe this will do?
> 
> @SH-maintainers: some SH board files include a file with platform_data
> they are not really using. Since I want to remove the platform_data
> file, I remove inclusion of this file. That's all to it. Build bot was
> happy, too.

Hi! Sorry I didn't notice this before. I saw sh_mobile in the subject
lines and guessed it was not making changes in arch/sh.

I don't have any of the affected boards to test, but as long as
they're not actually using the include file you're removing, I don't
see any harm. It's my intent to remove all of these board files full
of platform devices as soon as we get working device tree bindings for
everything, anyway. So,

Acked-by: Rich Felker <dalias@libc.org>

Sato-san, do you have any objections?

Rich


> > > diff --git a/arch/sh/boards/board-sh7757lcr.c b/arch/sh/boards/board-sh7757lcr.c
> > > index 324599bfad1420..0104c8199c48fe 100644
> > > --- a/arch/sh/boards/board-sh7757lcr.c
> > > +++ b/arch/sh/boards/board-sh7757lcr.c
> > > @@ -20,7 +20,6 @@
> > >  #include <linux/mfd/tmio.h>
> > >  #include <linux/mmc/host.h>
> > >  #include <linux/mmc/sh_mmcif.h>
> > > -#include <linux/mmc/sh_mobile_sdhi.h>
> > >  #include <linux/sh_eth.h>
> > >  #include <linux/sh_intc.h>
> > >  #include <linux/usb/renesas_usbhs.h>
> > > diff --git a/arch/sh/boards/mach-ap325rxa/setup.c b/arch/sh/boards/mach-ap325rxa/setup.c
> > > index 62c3b81300ed28..de8393cb7313bc 100644
> > > --- a/arch/sh/boards/mach-ap325rxa/setup.c
> > > +++ b/arch/sh/boards/mach-ap325rxa/setup.c
> > > @@ -15,7 +15,6 @@
> > >  #include <linux/interrupt.h>
> > >  #include <linux/platform_device.h>
> > >  #include <linux/mmc/host.h>
> > > -#include <linux/mmc/sh_mobile_sdhi.h>
> > >  #include <linux/mtd/physmap.h>
> > >  #include <linux/mtd/sh_flctl.h>
> > >  #include <linux/mfd/tmio.h>
> > > diff --git a/arch/sh/boards/mach-ecovec24/setup.c b/arch/sh/boards/mach-ecovec24/setup.c
> > > index a9c0c07386fddd..6d612792f6b8ec 100644
> > > --- a/arch/sh/boards/mach-ecovec24/setup.c
> > > +++ b/arch/sh/boards/mach-ecovec24/setup.c
> > > @@ -13,7 +13,6 @@
> > >  #include <linux/platform_device.h>
> > >  #include <linux/mmc/host.h>
> > >  #include <linux/mmc/sh_mmcif.h>
> > > -#include <linux/mmc/sh_mobile_sdhi.h>
> > >  #include <linux/mtd/physmap.h>
> > >  #include <linux/mfd/tmio.h>
> > >  #include <linux/gpio.h>
> > > diff --git a/arch/sh/boards/mach-kfr2r09/setup.c b/arch/sh/boards/mach-kfr2r09/setup.c
> > > index 6bd9230e64e300..5deb2d82f19f78 100644
> > > --- a/arch/sh/boards/mach-kfr2r09/setup.c
> > > +++ b/arch/sh/boards/mach-kfr2r09/setup.c
> > > @@ -11,7 +11,6 @@
> > >  #include <linux/platform_device.h>
> > >  #include <linux/interrupt.h>
> > >  #include <linux/mmc/host.h>
> > > -#include <linux/mmc/sh_mobile_sdhi.h>
> > >  #include <linux/mfd/tmio.h>
> > >  #include <linux/mtd/physmap.h>
> > >  #include <linux/mtd/onenand.h>
> > > diff --git a/arch/sh/boards/mach-migor/setup.c b/arch/sh/boards/mach-migor/setup.c
> > > index 7a04da3efce402..5de60a77eaa1ab 100644
> > > --- a/arch/sh/boards/mach-migor/setup.c
> > > +++ b/arch/sh/boards/mach-migor/setup.c
> > > @@ -13,7 +13,6 @@
> > >  #include <linux/input.h>
> > >  #include <linux/input/sh_keysc.h>
> > >  #include <linux/mmc/host.h>
> > > -#include <linux/mmc/sh_mobile_sdhi.h>
> > >  #include <linux/mtd/physmap.h>
> > >  #include <linux/mfd/tmio.h>
> > >  #include <linux/mtd/nand.h>
> > > diff --git a/arch/sh/boards/mach-se/7724/setup.c b/arch/sh/boards/mach-se/7724/setup.c
> > > index e0e1df136642cd..f1fecd395679ae 100644
> > > --- a/arch/sh/boards/mach-se/7724/setup.c
> > > +++ b/arch/sh/boards/mach-se/7724/setup.c
> > > @@ -15,7 +15,6 @@
> > >  #include <linux/interrupt.h>
> > >  #include <linux/platform_device.h>
> > >  #include <linux/mmc/host.h>
> > > -#include <linux/mmc/sh_mobile_sdhi.h>
> > >  #include <linux/mfd/tmio.h>
> > >  #include <linux/mtd/physmap.h>
> > >  #include <linux/delay.h>
> > > diff --git a/drivers/mmc/host/sh_mobile_sdhi.c b/drivers/mmc/host/sh_mobile_sdhi.c
> > > index 9beee48d2e280d..51d8dbd5b06a3e 100644
> > > --- a/drivers/mmc/host/sh_mobile_sdhi.c
> > > +++ b/drivers/mmc/host/sh_mobile_sdhi.c
> > > @@ -28,7 +28,6 @@
> > >  #include <linux/of_device.h>
> > >  #include <linux/platform_device.h>
> > >  #include <linux/mmc/host.h>
> > > -#include <linux/mmc/sh_mobile_sdhi.h>
> > >  #include <linux/mfd/tmio.h>
> > >  #include <linux/sh_dma.h>
> > >  #include <linux/delay.h>
> > > @@ -315,7 +314,6 @@ static int sh_mobile_sdhi_probe(struct platform_device *pdev)
> > >         struct tmio_mmc_host *host;
> > >         struct resource *res;
> > >         int irq, ret, i = 0;
> > > -       bool multiplexed_isr = true;
> > >         struct tmio_mmc_dma *dma_priv;
> > >
> > >         res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> > > @@ -405,62 +403,23 @@ static int sh_mobile_sdhi_probe(struct platform_device *pdev)
> > >         if (ret < 0)
> > >                 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);
> > >                 if (ret)
> > >                         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;
> > >                 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",
> > >                  mmc_hostname(host->mmc), (unsigned long)
> > >                  (platform_get_resource(pdev, IORESOURCE_MEM, 0)->start),
> > > diff --git a/include/linux/mmc/sh_mobile_sdhi.h b/include/linux/mmc/sh_mobile_sdhi.h
> > > deleted file mode 100644
> > > index 95d6f0314a7ded..00000000000000
> > > --- a/include/linux/mmc/sh_mobile_sdhi.h
> > > +++ /dev/null
> > > @@ -1,10 +0,0 @@
> > > -#ifndef LINUX_MMC_SH_MOBILE_SDHI_H
> > > -#define LINUX_MMC_SH_MOBILE_SDHI_H
> > > -
> > > -#include <linux/types.h>
> > > -
> > > -#define SH_MOBILE_SDHI_IRQ_CARD_DETECT "card_detect"
> > > -#define SH_MOBILE_SDHI_IRQ_SDCARD      "sdcard"
> > > -#define SH_MOBILE_SDHI_IRQ_SDIO                "sdio"
> > > -
> > > -#endif /* LINUX_MMC_SH_MOBILE_SDHI_H */
> > > --
> > > 2.7.0
> > >
> > > --
> > > To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
> > > the body of a message to majordomo@vger.kernel.org
> > > More majordomo info at  http://vger.kernel.org/majordomo-info.html


--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Yoshinori Sato April 28, 2016, 3:59 a.m. UTC | #5
On Thu, 28 Apr 2016 07:54:57 +0900,
Rich Felker wrote:
> 
> On Tue, Apr 19, 2016 at 11:37:13AM +0200, Wolfram Sang wrote:
> > On Mon, Apr 18, 2016 at 10:21:41AM +0200, Ulf Hansson wrote:
> > > On 6 April 2016 at 11:25, Wolfram Sang <wsa@the-dreams.de> wrote:
> > > > From: Wolfram Sang <wsa+renesas@sang-engineering.com>
> > > >
> > > > 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. A number of sh boards
> > > > included the now deleted include file without needing it. Remove that,
> > > > too.
> > > >
> > > > Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> > > > ---
> > > >  arch/sh/boards/board-sh7757lcr.c     |  1 -
> > > >  arch/sh/boards/mach-ap325rxa/setup.c |  1 -
> > > >  arch/sh/boards/mach-ecovec24/setup.c |  1 -
> > > >  arch/sh/boards/mach-kfr2r09/setup.c  |  1 -
> > > >  arch/sh/boards/mach-migor/setup.c    |  1 -
> > > >  arch/sh/boards/mach-se/7724/setup.c  |  1 -
> > > >  drivers/mmc/host/sh_mobile_sdhi.c    | 57 +++++-------------------------------
> > > >  include/linux/mmc/sh_mobile_sdhi.h   | 10 -------
> > > >  8 files changed, 8 insertions(+), 65 deletions(-)
> > > >  delete mode 100644 include/linux/mmc/sh_mobile_sdhi.h
> > > 
> > > Hi Wolfram,
> > > 
> > > I need and ack from the Superh arch maintainer to apply this one.
> > > 
> > > It seems like you didn't include them on "to/cc" list, perhaps repost!?
> > 
> > I hoped adding the sh-list will be enough. Adding them to this mail
> > explicitly now, maybe this will do?
> > 
> > @SH-maintainers: some SH board files include a file with platform_data
> > they are not really using. Since I want to remove the platform_data
> > file, I remove inclusion of this file. That's all to it. Build bot was
> > happy, too.
> 
> Hi! Sorry I didn't notice this before. I saw sh_mobile in the subject
> lines and guessed it was not making changes in arch/sh.
> 
> I don't have any of the affected boards to test, but as long as
> they're not actually using the include file you're removing, I don't
> see any harm. It's my intent to remove all of these board files full
> of platform devices as soon as we get working device tree bindings for
> everything, anyway. So,
> 
> Acked-by: Rich Felker <dalias@libc.org>
> 
> Sato-san, do you have any objections?

I have no objection. It looks standard style.

> Rich
> 
> 
> > > > diff --git a/arch/sh/boards/board-sh7757lcr.c b/arch/sh/boards/board-sh7757lcr.c
> > > > index 324599bfad1420..0104c8199c48fe 100644
> > > > --- a/arch/sh/boards/board-sh7757lcr.c
> > > > +++ b/arch/sh/boards/board-sh7757lcr.c
> > > > @@ -20,7 +20,6 @@
> > > >  #include <linux/mfd/tmio.h>
> > > >  #include <linux/mmc/host.h>
> > > >  #include <linux/mmc/sh_mmcif.h>
> > > > -#include <linux/mmc/sh_mobile_sdhi.h>
> > > >  #include <linux/sh_eth.h>
> > > >  #include <linux/sh_intc.h>
> > > >  #include <linux/usb/renesas_usbhs.h>
> > > > diff --git a/arch/sh/boards/mach-ap325rxa/setup.c b/arch/sh/boards/mach-ap325rxa/setup.c
> > > > index 62c3b81300ed28..de8393cb7313bc 100644
> > > > --- a/arch/sh/boards/mach-ap325rxa/setup.c
> > > > +++ b/arch/sh/boards/mach-ap325rxa/setup.c
> > > > @@ -15,7 +15,6 @@
> > > >  #include <linux/interrupt.h>
> > > >  #include <linux/platform_device.h>
> > > >  #include <linux/mmc/host.h>
> > > > -#include <linux/mmc/sh_mobile_sdhi.h>
> > > >  #include <linux/mtd/physmap.h>
> > > >  #include <linux/mtd/sh_flctl.h>
> > > >  #include <linux/mfd/tmio.h>
> > > > diff --git a/arch/sh/boards/mach-ecovec24/setup.c b/arch/sh/boards/mach-ecovec24/setup.c
> > > > index a9c0c07386fddd..6d612792f6b8ec 100644
> > > > --- a/arch/sh/boards/mach-ecovec24/setup.c
> > > > +++ b/arch/sh/boards/mach-ecovec24/setup.c
> > > > @@ -13,7 +13,6 @@
> > > >  #include <linux/platform_device.h>
> > > >  #include <linux/mmc/host.h>
> > > >  #include <linux/mmc/sh_mmcif.h>
> > > > -#include <linux/mmc/sh_mobile_sdhi.h>
> > > >  #include <linux/mtd/physmap.h>
> > > >  #include <linux/mfd/tmio.h>
> > > >  #include <linux/gpio.h>
> > > > diff --git a/arch/sh/boards/mach-kfr2r09/setup.c b/arch/sh/boards/mach-kfr2r09/setup.c
> > > > index 6bd9230e64e300..5deb2d82f19f78 100644
> > > > --- a/arch/sh/boards/mach-kfr2r09/setup.c
> > > > +++ b/arch/sh/boards/mach-kfr2r09/setup.c
> > > > @@ -11,7 +11,6 @@
> > > >  #include <linux/platform_device.h>
> > > >  #include <linux/interrupt.h>
> > > >  #include <linux/mmc/host.h>
> > > > -#include <linux/mmc/sh_mobile_sdhi.h>
> > > >  #include <linux/mfd/tmio.h>
> > > >  #include <linux/mtd/physmap.h>
> > > >  #include <linux/mtd/onenand.h>
> > > > diff --git a/arch/sh/boards/mach-migor/setup.c b/arch/sh/boards/mach-migor/setup.c
> > > > index 7a04da3efce402..5de60a77eaa1ab 100644
> > > > --- a/arch/sh/boards/mach-migor/setup.c
> > > > +++ b/arch/sh/boards/mach-migor/setup.c
> > > > @@ -13,7 +13,6 @@
> > > >  #include <linux/input.h>
> > > >  #include <linux/input/sh_keysc.h>
> > > >  #include <linux/mmc/host.h>
> > > > -#include <linux/mmc/sh_mobile_sdhi.h>
> > > >  #include <linux/mtd/physmap.h>
> > > >  #include <linux/mfd/tmio.h>
> > > >  #include <linux/mtd/nand.h>
> > > > diff --git a/arch/sh/boards/mach-se/7724/setup.c b/arch/sh/boards/mach-se/7724/setup.c
> > > > index e0e1df136642cd..f1fecd395679ae 100644
> > > > --- a/arch/sh/boards/mach-se/7724/setup.c
> > > > +++ b/arch/sh/boards/mach-se/7724/setup.c
> > > > @@ -15,7 +15,6 @@
> > > >  #include <linux/interrupt.h>
> > > >  #include <linux/platform_device.h>
> > > >  #include <linux/mmc/host.h>
> > > > -#include <linux/mmc/sh_mobile_sdhi.h>
> > > >  #include <linux/mfd/tmio.h>
> > > >  #include <linux/mtd/physmap.h>
> > > >  #include <linux/delay.h>
> > > > diff --git a/drivers/mmc/host/sh_mobile_sdhi.c b/drivers/mmc/host/sh_mobile_sdhi.c
> > > > index 9beee48d2e280d..51d8dbd5b06a3e 100644
> > > > --- a/drivers/mmc/host/sh_mobile_sdhi.c
> > > > +++ b/drivers/mmc/host/sh_mobile_sdhi.c
> > > > @@ -28,7 +28,6 @@
> > > >  #include <linux/of_device.h>
> > > >  #include <linux/platform_device.h>
> > > >  #include <linux/mmc/host.h>
> > > > -#include <linux/mmc/sh_mobile_sdhi.h>
> > > >  #include <linux/mfd/tmio.h>
> > > >  #include <linux/sh_dma.h>
> > > >  #include <linux/delay.h>
> > > > @@ -315,7 +314,6 @@ static int sh_mobile_sdhi_probe(struct platform_device *pdev)
> > > >         struct tmio_mmc_host *host;
> > > >         struct resource *res;
> > > >         int irq, ret, i = 0;
> > > > -       bool multiplexed_isr = true;
> > > >         struct tmio_mmc_dma *dma_priv;
> > > >
> > > >         res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> > > > @@ -405,62 +403,23 @@ static int sh_mobile_sdhi_probe(struct platform_device *pdev)
> > > >         if (ret < 0)
> > > >                 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);
> > > >                 if (ret)
> > > >                         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;
> > > >                 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",
> > > >                  mmc_hostname(host->mmc), (unsigned long)
> > > >                  (platform_get_resource(pdev, IORESOURCE_MEM, 0)->start),
> > > > diff --git a/include/linux/mmc/sh_mobile_sdhi.h b/include/linux/mmc/sh_mobile_sdhi.h
> > > > deleted file mode 100644
> > > > index 95d6f0314a7ded..00000000000000
> > > > --- a/include/linux/mmc/sh_mobile_sdhi.h
> > > > +++ /dev/null
> > > > @@ -1,10 +0,0 @@
> > > > -#ifndef LINUX_MMC_SH_MOBILE_SDHI_H
> > > > -#define LINUX_MMC_SH_MOBILE_SDHI_H
> > > > -
> > > > -#include <linux/types.h>
> > > > -
> > > > -#define SH_MOBILE_SDHI_IRQ_CARD_DETECT "card_detect"
> > > > -#define SH_MOBILE_SDHI_IRQ_SDCARD      "sdcard"
> > > > -#define SH_MOBILE_SDHI_IRQ_SDIO                "sdio"
> > > > -
> > > > -#endif /* LINUX_MMC_SH_MOBILE_SDHI_H */
> > > > --
> > > > 2.7.0
> > > >
> > > > --
> > > > To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
> > > > the body of a message to majordomo@vger.kernel.org
> > > > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
>
Wolfram Sang April 28, 2016, 6:19 a.m. UTC | #6
> I don't have any of the affected boards to test, but as long as
> they're not actually using the include file you're removing, I don't
> see any harm. It's my intent to remove all of these board files full
> of platform devices as soon as we get working device tree bindings for
> everything, anyway. So,
> 
> Acked-by: Rich Felker <dalias@libc.org>

Thanks! Ulf already applied a version with the SH specific bits factored
out. I'll send out a seperate patch for this right now. To make things
easier for all, I assume your acks will extend to this new patch as well.

Thanks again...
Geert Uytterhoeven April 28, 2016, 8:03 a.m. UTC | #7
Hi Rich,

On Thu, Apr 28, 2016 at 12:54 AM, Rich Felker <dalias@libc.org> wrote:
> Hi! Sorry I didn't notice this before. I saw sh_mobile in the subject
> lines and guessed it was not making changes in arch/sh.

Yeah, it's confusing that "SH-Mobile" was used for both SH (only) and
ARM (+SH ;-) SoCs.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff looks more complicated than it is: The if-block for multiplexed isr
is now the main code path, the rest is removed. A number of sh boards
included the now deleted include file without needing it. Remove that,
too.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
 arch/sh/boards/board-sh7757lcr.c     |  1 -
 arch/sh/boards/mach-ap325rxa/setup.c |  1 -
 arch/sh/boards/mach-ecovec24/setup.c |  1 -
 arch/sh/boards/mach-kfr2r09/setup.c  |  1 -
 arch/sh/boards/mach-migor/setup.c    |  1 -
 arch/sh/boards/mach-se/7724/setup.c  |  1 -
 drivers/mmc/host/sh_mobile_sdhi.c    | 57 +++++-------------------------------
 include/linux/mmc/sh_mobile_sdhi.h   | 10 -------
 8 files changed, 8 insertions(+), 65 deletions(-)
 delete mode 100644 include/linux/mmc/sh_mobile_sdhi.h

diff --git a/arch/sh/boards/board-sh7757lcr.c b/arch/sh/boards/board-sh7757lcr.c
index 324599bfad1420..0104c8199c48fe 100644
--- a/arch/sh/boards/board-sh7757lcr.c
+++ b/arch/sh/boards/board-sh7757lcr.c
@@ -20,7 +20,6 @@ 
 #include <linux/mfd/tmio.h>
 #include <linux/mmc/host.h>
 #include <linux/mmc/sh_mmcif.h>
-#include <linux/mmc/sh_mobile_sdhi.h>
 #include <linux/sh_eth.h>
 #include <linux/sh_intc.h>
 #include <linux/usb/renesas_usbhs.h>
diff --git a/arch/sh/boards/mach-ap325rxa/setup.c b/arch/sh/boards/mach-ap325rxa/setup.c
index 62c3b81300ed28..de8393cb7313bc 100644
--- a/arch/sh/boards/mach-ap325rxa/setup.c
+++ b/arch/sh/boards/mach-ap325rxa/setup.c
@@ -15,7 +15,6 @@ 
 #include <linux/interrupt.h>
 #include <linux/platform_device.h>
 #include <linux/mmc/host.h>
-#include <linux/mmc/sh_mobile_sdhi.h>
 #include <linux/mtd/physmap.h>
 #include <linux/mtd/sh_flctl.h>
 #include <linux/mfd/tmio.h>
diff --git a/arch/sh/boards/mach-ecovec24/setup.c b/arch/sh/boards/mach-ecovec24/setup.c
index a9c0c07386fddd..6d612792f6b8ec 100644
--- a/arch/sh/boards/mach-ecovec24/setup.c
+++ b/arch/sh/boards/mach-ecovec24/setup.c
@@ -13,7 +13,6 @@ 
 #include <linux/platform_device.h>
 #include <linux/mmc/host.h>
 #include <linux/mmc/sh_mmcif.h>
-#include <linux/mmc/sh_mobile_sdhi.h>
 #include <linux/mtd/physmap.h>
 #include <linux/mfd/tmio.h>
 #include <linux/gpio.h>
diff --git a/arch/sh/boards/mach-kfr2r09/setup.c b/arch/sh/boards/mach-kfr2r09/setup.c
index 6bd9230e64e300..5deb2d82f19f78 100644
--- a/arch/sh/boards/mach-kfr2r09/setup.c
+++ b/arch/sh/boards/mach-kfr2r09/setup.c
@@ -11,7 +11,6 @@ 
 #include <linux/platform_device.h>
 #include <linux/interrupt.h>
 #include <linux/mmc/host.h>
-#include <linux/mmc/sh_mobile_sdhi.h>
 #include <linux/mfd/tmio.h>
 #include <linux/mtd/physmap.h>
 #include <linux/mtd/onenand.h>
diff --git a/arch/sh/boards/mach-migor/setup.c b/arch/sh/boards/mach-migor/setup.c
index 7a04da3efce402..5de60a77eaa1ab 100644
--- a/arch/sh/boards/mach-migor/setup.c
+++ b/arch/sh/boards/mach-migor/setup.c
@@ -13,7 +13,6 @@ 
 #include <linux/input.h>
 #include <linux/input/sh_keysc.h>
 #include <linux/mmc/host.h>
-#include <linux/mmc/sh_mobile_sdhi.h>
 #include <linux/mtd/physmap.h>
 #include <linux/mfd/tmio.h>
 #include <linux/mtd/nand.h>
diff --git a/arch/sh/boards/mach-se/7724/setup.c b/arch/sh/boards/mach-se/7724/setup.c
index e0e1df136642cd..f1fecd395679ae 100644
--- a/arch/sh/boards/mach-se/7724/setup.c
+++ b/arch/sh/boards/mach-se/7724/setup.c
@@ -15,7 +15,6 @@ 
 #include <linux/interrupt.h>
 #include <linux/platform_device.h>
 #include <linux/mmc/host.h>
-#include <linux/mmc/sh_mobile_sdhi.h>
 #include <linux/mfd/tmio.h>
 #include <linux/mtd/physmap.h>
 #include <linux/delay.h>
diff --git a/drivers/mmc/host/sh_mobile_sdhi.c b/drivers/mmc/host/sh_mobile_sdhi.c
index 9beee48d2e280d..51d8dbd5b06a3e 100644
--- a/drivers/mmc/host/sh_mobile_sdhi.c
+++ b/drivers/mmc/host/sh_mobile_sdhi.c
@@ -28,7 +28,6 @@ 
 #include <linux/of_device.h>
 #include <linux/platform_device.h>
 #include <linux/mmc/host.h>
-#include <linux/mmc/sh_mobile_sdhi.h>
 #include <linux/mfd/tmio.h>
 #include <linux/sh_dma.h>
 #include <linux/delay.h>
@@ -315,7 +314,6 @@  static int sh_mobile_sdhi_probe(struct platform_device *pdev)
 	struct tmio_mmc_host *host;
 	struct resource *res;
 	int irq, ret, i = 0;
-	bool multiplexed_isr = true;
 	struct tmio_mmc_dma *dma_priv;
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
@@ -405,62 +403,23 @@  static int sh_mobile_sdhi_probe(struct platform_device *pdev)
 	if (ret < 0)
 		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);
 		if (ret)
 			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;
 		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",
 		 mmc_hostname(host->mmc), (unsigned long)
 		 (platform_get_resource(pdev, IORESOURCE_MEM, 0)->start),
diff --git a/include/linux/mmc/sh_mobile_sdhi.h b/include/linux/mmc/sh_mobile_sdhi.h
deleted file mode 100644
index 95d6f0314a7ded..00000000000000
--- a/include/linux/mmc/sh_mobile_sdhi.h
+++ /dev/null
@@ -1,10 +0,0 @@ 
-#ifndef LINUX_MMC_SH_MOBILE_SDHI_H
-#define LINUX_MMC_SH_MOBILE_SDHI_H
-
-#include <linux/types.h>
-
-#define SH_MOBILE_SDHI_IRQ_CARD_DETECT	"card_detect"
-#define SH_MOBILE_SDHI_IRQ_SDCARD	"sdcard"
-#define SH_MOBILE_SDHI_IRQ_SDIO		"sdio"
-
-#endif /* LINUX_MMC_SH_MOBILE_SDHI_H */