diff mbox

[1/2] irqchip/renesas-intc-irqpin: Remove obsolete platform data support

Message ID 1444215094-27159-2-git-send-email-geert+renesas@glider.be (mailing list archive)
State Superseded
Delegated to: Geert Uytterhoeven
Headers show

Commit Message

Geert Uytterhoeven Oct. 7, 2015, 10:51 a.m. UTC
Since commit 4baadb9e05c68962 ("ARM: shmobile: r8a7778: remove obsolete
setup code"), all Renesas SoCs with a renesas-intc-irqpin module are
only supported in generic DT-only ARM multi-platform builds.  The driver
doesn't need to use platform data anymore, hence remove platform data
configuration.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Commit 4baadb9e05c68962 is now in arm-soc/for-next.
---
 drivers/irqchip/irq-renesas-intc-irqpin.c          | 38 +++++++---------------
 .../linux/platform_data/irq-renesas-intc-irqpin.h  | 29 -----------------
 2 files changed, 12 insertions(+), 55 deletions(-)
 delete mode 100644 include/linux/platform_data/irq-renesas-intc-irqpin.h

Comments

kernel test robot Oct. 7, 2015, 6:51 p.m. UTC | #1
Hi Geert,

[auto build test ERROR on v4.3-rc4 -- if it's inappropriate base, please ignore]

config: arm-bockw_defconfig (attached as .config)
reproduce:
        wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=arm 

All errors (new ones prefixed by >>):

>> arch/arm/mach-shmobile/setup-r8a7778.c:26:57: fatal error: linux/platform_data/irq-renesas-intc-irqpin.h: No such file or directory
    #include <linux/platform_data/irq-renesas-intc-irqpin.h>
                                                            ^
   compilation terminated.

vim +26 arch/arm/mach-shmobile/setup-r8a7778.c

ccb7cc74 Kuninori Morimoto 2013-03-21  10   * the Free Software Foundation; version 2 of the License.
ccb7cc74 Kuninori Morimoto 2013-03-21  11   *
ccb7cc74 Kuninori Morimoto 2013-03-21  12   * This program is distributed in the hope that it will be useful,
ccb7cc74 Kuninori Morimoto 2013-03-21  13   * but WITHOUT ANY WARRANTY; without even the implied warranty of
ccb7cc74 Kuninori Morimoto 2013-03-21  14   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
ccb7cc74 Kuninori Morimoto 2013-03-21  15   * GNU General Public License for more details.
ccb7cc74 Kuninori Morimoto 2013-03-21  16   */
ccb7cc74 Kuninori Morimoto 2013-03-21  17  
43cbec85 Ulrich Hecht      2015-02-16  18  #include <linux/clk/shmobile.h>
ccb7cc74 Kuninori Morimoto 2013-03-21  19  #include <linux/kernel.h>
ccb7cc74 Kuninori Morimoto 2013-03-21  20  #include <linux/io.h>
ccb7cc74 Kuninori Morimoto 2013-03-21  21  #include <linux/irqchip/arm-gic.h>
ccb7cc74 Kuninori Morimoto 2013-03-21  22  #include <linux/of.h>
ccb7cc74 Kuninori Morimoto 2013-03-21  23  #include <linux/of_platform.h>
338c4991 Max Filippov      2013-08-25  24  #include <linux/platform_data/dma-rcar-hpbdma.h>
39ca2283 Kuninori Morimoto 2013-04-17  25  #include <linux/platform_data/gpio-rcar.h>
3a42fa20 Kuninori Morimoto 2013-04-01 @26  #include <linux/platform_data/irq-renesas-intc-irqpin.h>
ccb7cc74 Kuninori Morimoto 2013-03-21  27  #include <linux/platform_device.h>
ccb7cc74 Kuninori Morimoto 2013-03-21  28  #include <linux/irqchip.h>
db331fc8 Kuninori Morimoto 2013-03-21  29  #include <linux/serial_sci.h>
ccb7cc74 Kuninori Morimoto 2013-03-21  30  #include <linux/sh_timer.h>
02474a41 Sergei Shtylyov   2013-06-09  31  #include <linux/pm_runtime.h>
02474a41 Sergei Shtylyov   2013-06-09  32  #include <linux/usb/phy.h>
02474a41 Sergei Shtylyov   2013-06-09  33  #include <linux/usb/hcd.h>
02474a41 Sergei Shtylyov   2013-06-09  34  #include <linux/usb/ehci_pdriver.h>

:::::: The code at line 26 was first introduced by commit
:::::: 3a42fa20aba327857a5454aeecf54f38d4212a66 ARM: shmobile: r8a7778: add r8a7778_init_irq_extpin()

:::::: TO: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
:::::: CC: Simon Horman <horms+renesas@verge.net.au>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
Geert Uytterhoeven Oct. 7, 2015, 9:42 p.m. UTC | #2
On Wed, Oct 7, 2015 at 8:51 PM, kbuild test robot <lkp@intel.com> wrote:
> [auto build test ERROR on v4.3-rc4 -- if it's inappropriate base, please ignore]
>
> config: arm-bockw_defconfig (attached as .config)
> reproduce:
>         wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
>         chmod +x ~/bin/make.cross
>         # save the attached .config to linux build tree
>         make.cross ARCH=arm
>
> All errors (new ones prefixed by >>):
>
>>> arch/arm/mach-shmobile/setup-r8a7778.c:26:57: fatal error: linux/platform_data/irq-renesas-intc-irqpin.h: No such file or directory
>     #include <linux/platform_data/irq-renesas-intc-irqpin.h>
>                                                             ^

Please ignore. Legacy (non-DT) r8a7778/bockw support has been removed
in arm-soc/for-next.

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
Thomas Gleixner Oct. 9, 2015, 12:19 p.m. UTC | #3
On Wed, 7 Oct 2015, Geert Uytterhoeven wrote:
> On Wed, Oct 7, 2015 at 8:51 PM, kbuild test robot <lkp@intel.com> wrote:
> > [auto build test ERROR on v4.3-rc4 -- if it's inappropriate base, please ignore]
> >
> > config: arm-bockw_defconfig (attached as .config)
> > reproduce:
> >         wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
> >         chmod +x ~/bin/make.cross
> >         # save the attached .config to linux build tree
> >         make.cross ARCH=arm
> >
> > All errors (new ones prefixed by >>):
> >
> >>> arch/arm/mach-shmobile/setup-r8a7778.c:26:57: fatal error: linux/platform_data/irq-renesas-intc-irqpin.h: No such file or directory
> >     #include <linux/platform_data/irq-renesas-intc-irqpin.h>
> >                                                             ^
> 
> Please ignore. Legacy (non-DT) r8a7778/bockw support has been removed
> in arm-soc/for-next.

That creates a cross tree merge dependency. Bah!

I have

  26c21dd9885a: irqchip/renesas-intc-irqpin: r8a7778 IRLM setup support

in tip irq/core pending. That should not conflict with that one. So I
suggest, that the arm-soc tree carries that cleanup with my

Reviewed-by: Thomas Gleixner <tglx@linutronix.de>

If you have more changes coming up for irqchip/renesas-intc-irqpin we
probably need to take them through arm-soc as well.

Thanks,

	tglx
--
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
Simon Horman Oct. 12, 2015, 12:27 a.m. UTC | #4
On Fri, Oct 09, 2015 at 02:19:51PM +0200, Thomas Gleixner wrote:
> On Wed, 7 Oct 2015, Geert Uytterhoeven wrote:
> > On Wed, Oct 7, 2015 at 8:51 PM, kbuild test robot <lkp@intel.com> wrote:
> > > [auto build test ERROR on v4.3-rc4 -- if it's inappropriate base, please ignore]
> > >
> > > config: arm-bockw_defconfig (attached as .config)
> > > reproduce:
> > >         wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
> > >         chmod +x ~/bin/make.cross
> > >         # save the attached .config to linux build tree
> > >         make.cross ARCH=arm
> > >
> > > All errors (new ones prefixed by >>):
> > >
> > >>> arch/arm/mach-shmobile/setup-r8a7778.c:26:57: fatal error: linux/platform_data/irq-renesas-intc-irqpin.h: No such file or directory
> > >     #include <linux/platform_data/irq-renesas-intc-irqpin.h>
> > >                                                             ^
> > 
> > Please ignore. Legacy (non-DT) r8a7778/bockw support has been removed
> > in arm-soc/for-next.
> 
> That creates a cross tree merge dependency. Bah!
> 
> I have
> 
>   26c21dd9885a: irqchip/renesas-intc-irqpin: r8a7778 IRLM setup support
> 
> in tip irq/core pending. That should not conflict with that one. So I
> suggest, that the arm-soc tree carries that cleanup with my
> 
> Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
> 
> If you have more changes coming up for irqchip/renesas-intc-irqpin we
> probably need to take them through arm-soc as well.

I'm happy to take "[PATCH 1/2] irqchip/renesas-intc-irqpin: Remove obsolete
platform data support" into the renesas tree with Thomas's ack and forward
it to arm-soc for v4.4. Though I will need to finalise doing so in
the next few days. I would also be happy to see these patches
re-posted once the removal of Legacy (non-DT) r8a7778/bockw support has
hit next.

Geert, is that your preferred course of action for this patch?
And what about "[PATCH 2/2] irqchip/renesas-intc-irqpin: Remove
intc_irqpin_priv.number_of_irq"?
--
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
Thomas Gleixner Oct. 12, 2015, 6:52 a.m. UTC | #5
On Mon, 12 Oct 2015, Simon Horman wrote:
> On Fri, Oct 09, 2015 at 02:19:51PM +0200, Thomas Gleixner wrote:
> > On Wed, 7 Oct 2015, Geert Uytterhoeven wrote:
> > > On Wed, Oct 7, 2015 at 8:51 PM, kbuild test robot <lkp@intel.com> wrote:
> > > > [auto build test ERROR on v4.3-rc4 -- if it's inappropriate base, please ignore]
> > > >
> > > > config: arm-bockw_defconfig (attached as .config)
> > > > reproduce:
> > > >         wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
> > > >         chmod +x ~/bin/make.cross
> > > >         # save the attached .config to linux build tree
> > > >         make.cross ARCH=arm
> > > >
> > > > All errors (new ones prefixed by >>):
> > > >
> > > >>> arch/arm/mach-shmobile/setup-r8a7778.c:26:57: fatal error: linux/platform_data/irq-renesas-intc-irqpin.h: No such file or directory
> > > >     #include <linux/platform_data/irq-renesas-intc-irqpin.h>
> > > >                                                             ^
> > > 
> > > Please ignore. Legacy (non-DT) r8a7778/bockw support has been removed
> > > in arm-soc/for-next.
> > 
> > That creates a cross tree merge dependency. Bah!
> > 
> > I have
> > 
> >   26c21dd9885a: irqchip/renesas-intc-irqpin: r8a7778 IRLM setup support
> > 
> > in tip irq/core pending. That should not conflict with that one. So I
> > suggest, that the arm-soc tree carries that cleanup with my
> > 
> > Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
> > 
> > If you have more changes coming up for irqchip/renesas-intc-irqpin we
> > probably need to take them through arm-soc as well.
> 
> I'm happy to take "[PATCH 1/2] irqchip/renesas-intc-irqpin: Remove obsolete
> platform data support" into the renesas tree with Thomas's ack and forward
> it to arm-soc for v4.4. Though I will need to finalise doing so in
> the next few days. I would also be happy to see these patches
> re-posted once the removal of Legacy (non-DT) r8a7778/bockw support has
> hit next.
> 
> Geert, is that your preferred course of action for this patch?
> And what about "[PATCH 2/2] irqchip/renesas-intc-irqpin: Remove
> intc_irqpin_priv.number_of_irq"?

If you want to take it now: Acked-by-me

There is also a new one against irqchip/renesas-intc-irqpin from Paul
Gortmaker, you probably want to pick that up as well.

Thanks,

	tglx

--
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
Geert Uytterhoeven Oct. 12, 2015, 7:09 a.m. UTC | #6
Hi Thomas,

[CC arnd]

On Mon, Oct 12, 2015 at 8:52 AM, Thomas Gleixner <tglx@linutronix.de> wrote:
> On Mon, 12 Oct 2015, Simon Horman wrote:
>> On Fri, Oct 09, 2015 at 02:19:51PM +0200, Thomas Gleixner wrote:
>> > On Wed, 7 Oct 2015, Geert Uytterhoeven wrote:
>> > > On Wed, Oct 7, 2015 at 8:51 PM, kbuild test robot <lkp@intel.com> wrote:
>> > > > [auto build test ERROR on v4.3-rc4 -- if it's inappropriate base, please ignore]
>> > > >
>> > > > config: arm-bockw_defconfig (attached as .config)
>> > > > reproduce:
>> > > >         wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
>> > > >         chmod +x ~/bin/make.cross
>> > > >         # save the attached .config to linux build tree
>> > > >         make.cross ARCH=arm
>> > > >
>> > > > All errors (new ones prefixed by >>):
>> > > >
>> > > >>> arch/arm/mach-shmobile/setup-r8a7778.c:26:57: fatal error: linux/platform_data/irq-renesas-intc-irqpin.h: No such file or directory
>> > > >     #include <linux/platform_data/irq-renesas-intc-irqpin.h>
>> > > >                                                             ^
>> > >
>> > > Please ignore. Legacy (non-DT) r8a7778/bockw support has been removed
>> > > in arm-soc/for-next.
>> >
>> > That creates a cross tree merge dependency. Bah!
>> >
>> > I have
>> >
>> >   26c21dd9885a: irqchip/renesas-intc-irqpin: r8a7778 IRLM setup support
>> >
>> > in tip irq/core pending. That should not conflict with that one. So I
>> > suggest, that the arm-soc tree carries that cleanup with my
>> >
>> > Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
>> >
>> > If you have more changes coming up for irqchip/renesas-intc-irqpin we
>> > probably need to take them through arm-soc as well.
>>
>> I'm happy to take "[PATCH 1/2] irqchip/renesas-intc-irqpin: Remove obsolete
>> platform data support" into the renesas tree with Thomas's ack and forward
>> it to arm-soc for v4.4. Though I will need to finalise doing so in
>> the next few days. I would also be happy to see these patches
>> re-posted once the removal of Legacy (non-DT) r8a7778/bockw support has
>> hit next.
>>
>> Geert, is that your preferred course of action for this patch?
>> And what about "[PATCH 2/2] irqchip/renesas-intc-irqpin: Remove
>> intc_irqpin_priv.number_of_irq"?
>
> If you want to take it now: Acked-by-me
>
> There is also a new one against irqchip/renesas-intc-irqpin from Paul
> Gortmaker, you probably want to pick that up as well.

Thanks for pointing me to those patches, which I had missed.
I think we need a MAINTAINERS entry pointing to linux-sh for those.

But exactly that's why I prefer these removal patches to go through the
subsystem maintainer's tree. This is not about removal of drivers (they
are under active maintenance, and being improved regularly), but about
removing legacy platform support. Handling the platform data removal in
arm-soc opens too many opportunities for merge conflicts.

In fact Arnd was a bit surprised I was waiting on him pulling the legacy
platform removal in arm-soc before sending out the platform device/data
removal patches...

Thanks!

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 --git a/drivers/irqchip/irq-renesas-intc-irqpin.c b/drivers/irqchip/irq-renesas-intc-irqpin.c
index 9525335723f6..75285ba0edee 100644
--- a/drivers/irqchip/irq-renesas-intc-irqpin.c
+++ b/drivers/irqchip/irq-renesas-intc-irqpin.c
@@ -31,7 +31,6 @@ 
 #include <linux/slab.h>
 #include <linux/module.h>
 #include <linux/of_device.h>
-#include <linux/platform_data/irq-renesas-intc-irqpin.h>
 #include <linux/pm_runtime.h>
 
 #define INTC_IRQPIN_MAX 8 /* maximum 8 interrupts per driver instance */
@@ -75,7 +74,7 @@  struct intc_irqpin_irq {
 struct intc_irqpin_priv {
 	struct intc_irqpin_iomem iomem[INTC_IRQPIN_REG_NR];
 	struct intc_irqpin_irq irq[INTC_IRQPIN_MAX];
-	struct renesas_intc_irqpin_config config;
+	unsigned int sense_bitfield_width;
 	unsigned int number_of_irqs;
 	struct platform_device *pdev;
 	struct irq_chip irq_chip;
@@ -171,7 +170,7 @@  static void intc_irqpin_mask_unmask_prio(struct intc_irqpin_priv *p,
 static int intc_irqpin_set_sense(struct intc_irqpin_priv *p, int irq, int value)
 {
 	/* The SENSE register is assumed to be 32-bit. */
-	int bitfield_width = p->config.sense_bitfield_width;
+	int bitfield_width = p->sense_bitfield_width;
 	int shift = 32 - (irq + 1) * bitfield_width;
 
 	dev_dbg(&p->pdev->dev, "sense irq = %d, mode = %d\n", irq, value);
@@ -376,7 +375,6 @@  MODULE_DEVICE_TABLE(of, intc_irqpin_dt_ids);
 static int intc_irqpin_probe(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
-	struct renesas_intc_irqpin_config *pdata = dev->platform_data;
 	const struct of_device_id *of_id;
 	struct intc_irqpin_priv *p;
 	struct intc_irqpin_iomem *i;
@@ -386,6 +384,7 @@  static int intc_irqpin_probe(struct platform_device *pdev)
 	void (*enable_fn)(struct irq_data *d);
 	void (*disable_fn)(struct irq_data *d);
 	const char *name = dev_name(dev);
+	bool control_parent;
 	int ref_irq;
 	int ret;
 	int k;
@@ -397,16 +396,11 @@  static int intc_irqpin_probe(struct platform_device *pdev)
 	}
 
 	/* deal with driver instance configuration */
-	if (pdata) {
-		memcpy(&p->config, pdata, sizeof(*pdata));
-	} else {
-		of_property_read_u32(dev->of_node, "sense-bitfield-width",
-				     &p->config.sense_bitfield_width);
-		p->config.control_parent = of_property_read_bool(dev->of_node,
-								 "control-parent");
-	}
-	if (!p->config.sense_bitfield_width)
-		p->config.sense_bitfield_width = 4; /* default to 4 bits */
+	of_property_read_u32(dev->of_node, "sense-bitfield-width",
+			     &p->sense_bitfield_width);
+	control_parent = of_property_read_bool(dev->of_node, "control-parent");
+	if (!p->sense_bitfield_width)
+		p->sense_bitfield_width = 4; /* default to 4 bits */
 
 	p->pdev = pdev;
 	platform_set_drvdata(pdev, p);
@@ -513,7 +507,7 @@  static int intc_irqpin_probe(struct platform_device *pdev)
 	}
 
 	/* use more severe masking method if requested */
-	if (p->config.control_parent) {
+	if (control_parent) {
 		enable_fn = intc_irqpin_irq_enable_force;
 		disable_fn = intc_irqpin_irq_disable_force;
 	} else if (!p->shared_irqs) {
@@ -532,10 +526,9 @@  static int intc_irqpin_probe(struct platform_device *pdev)
 	irq_chip->irq_set_wake = intc_irqpin_irq_set_wake;
 	irq_chip->flags	= IRQCHIP_MASK_ON_SUSPEND;
 
-	p->irq_domain = irq_domain_add_simple(dev->of_node,
-					      p->number_of_irqs,
-					      p->config.irq_base,
-					      &intc_irqpin_irq_domain_ops, p);
+	p->irq_domain = irq_domain_add_simple(dev->of_node, p->number_of_irqs,
+					      0, &intc_irqpin_irq_domain_ops,
+					      p);
 	if (!p->irq_domain) {
 		ret = -ENXIO;
 		dev_err(dev, "cannot initialize irq domain\n");
@@ -570,13 +563,6 @@  static int intc_irqpin_probe(struct platform_device *pdev)
 
 	dev_info(dev, "driving %d irqs\n", p->number_of_irqs);
 
-	/* warn in case of mismatch if irq base is specified */
-	if (p->config.irq_base) {
-		if (p->config.irq_base != p->irq[0].domain_irq)
-			dev_warn(dev, "irq base mismatch (%d/%d)\n",
-				 p->config.irq_base, p->irq[0].domain_irq);
-	}
-
 	return 0;
 
 err1:
diff --git a/include/linux/platform_data/irq-renesas-intc-irqpin.h b/include/linux/platform_data/irq-renesas-intc-irqpin.h
deleted file mode 100644
index e4cb911066a6..000000000000
--- a/include/linux/platform_data/irq-renesas-intc-irqpin.h
+++ /dev/null
@@ -1,29 +0,0 @@ 
-/*
- * Renesas INTC External IRQ Pin Driver
- *
- *  Copyright (C) 2013 Magnus Damm
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-
-#ifndef __IRQ_RENESAS_INTC_IRQPIN_H__
-#define __IRQ_RENESAS_INTC_IRQPIN_H__
-
-struct renesas_intc_irqpin_config {
-	unsigned int sense_bitfield_width;
-	unsigned int irq_base;
-	bool control_parent;
-};
-
-#endif /* __IRQ_RENESAS_INTC_IRQPIN_H__ */