linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Wolfram Sang <wsa@the-dreams.de>
To: Ulf Hansson <ulf.hansson@linaro.org>,
	Rich Felker <dalias@libc.org>,
	Yoshinori Sato <ysato@users.sourceforge.jp>
Cc: linux-mmc <linux-mmc@vger.kernel.org>,
	linux-renesas-soc@vger.kernel.org,
	Linux-sh list <linux-sh@vger.kernel.org>,
	Simon Horman <horms@verge.net.au>,
	Kuninori Morimoto <kuninori.morimoto.gx@gmail.com>
Subject: Re: [PATCH 2/6] mmc: sh_mobile_sdhi: remove obsolete irq_by_name registration
Date: Tue, 19 Apr 2016 09:37:13 +0000	[thread overview]
Message-ID: <20160419093713.GC1521@katana> (raw)
In-Reply-To: <CAPDyKFqixO2EGxdx4ERy=DSTR+KBunrYyfR26+AYN0k5_dVHiw@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 9618 bytes --]

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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2016-04-19  9:37 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-06  9:25 [PATCH 0/6] mmc: tmio/sdhi: clean up cruft Wolfram Sang
2016-04-06  9:25 ` [PATCH 1/6] mmc: sh_mobile_sdhi: don't use array for DT configs Wolfram Sang
2016-04-06  9:56   ` Geert Uytterhoeven
2016-04-06 10:27     ` Wolfram Sang
2016-04-06  9:25 ` [PATCH 2/6] mmc: sh_mobile_sdhi: remove obsolete irq_by_name registration Wolfram Sang
2016-04-18  8:21   ` Ulf Hansson
2016-04-19  9:37     ` Wolfram Sang [this message]
2016-04-27 22:54       ` Rich Felker
2016-04-28  3:59         ` Yoshinori Sato
2016-04-28  6:19         ` Wolfram Sang
2016-04-28  8:03         ` Geert Uytterhoeven
2016-04-26 15:47     ` Wolfram Sang
2016-04-06  9:25 ` [PATCH 3/6] mmc: tmio: remove now unneeded seperate irq handlers Wolfram Sang
2016-04-06  9:25 ` [PATCH 4/6] mmc: tmio: simplify irq handler Wolfram Sang
2016-04-06  9:25 ` [PATCH 5/6] mmc: tmio: merge distributed include files Wolfram Sang
2016-04-06  9:34   ` [PATCH v2 " Wolfram Sang
2016-04-06  9:25 ` [PATCH 6/6] mmc: sh_mobile_sdhi: simplify code for voltage switching Wolfram Sang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160419093713.GC1521@katana \
    --to=wsa@the-dreams.de \
    --cc=dalias@libc.org \
    --cc=horms@verge.net.au \
    --cc=kuninori.morimoto.gx@gmail.com \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=ulf.hansson@linaro.org \
    --cc=ysato@users.sourceforge.jp \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).