* [PATCH 0/3] sh-pfc: Don't include mach/*.h headers were not required @ 2013-07-24 13:09 Laurent Pinchart 2013-07-24 13:09 ` [PATCH 1/3] sh-pfc: Remove unneeded mach/<soc>.h includes Laurent Pinchart ` (3 more replies) 0 siblings, 4 replies; 6+ messages in thread From: Laurent Pinchart @ 2013-07-24 13:09 UTC (permalink / raw) To: linux-arm-kernel Hello, The (long) road to multiplatform kernels requires getting rid of mach/*.h headers in device drivers. This patch set removes some of the included mach headers from the sh-pfc driver. The only remaining one is mach/irqs.h, to get the irq_pin() macro. This will require more work, see [1] for a discussion of the issue. The patches are based on v3.11-rc2. Linus, do you usually pick pinctrl patches from the list, or should I send you a pull request ? [1] http://www.mail-archive.com/linux-kernel@vger.kernel.org/msg473450.html Laurent Pinchart (3): sh-pfc: Remove unneeded mach/<soc>.h includes sh-pfc: sh7372: Replace <mach/irqs.h> with <linux/sh_intc.h> sh-pfc: sh73a0: Remove EXT_IRQ16L and EXT_IRQ16H macros drivers/pinctrl/sh-pfc/pfc-r8a73a4.c | 1 - drivers/pinctrl/sh-pfc/pfc-r8a7740.c | 1 - drivers/pinctrl/sh-pfc/pfc-sh7372.c | 4 +-- drivers/pinctrl/sh-pfc/pfc-sh73a0.c | 68 +++++++++++++++++------------------- 4 files changed, 33 insertions(+), 41 deletions(-) -- Regards, Laurent Pinchart ^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/3] sh-pfc: Remove unneeded mach/<soc>.h includes 2013-07-24 13:09 [PATCH 0/3] sh-pfc: Don't include mach/*.h headers were not required Laurent Pinchart @ 2013-07-24 13:09 ` Laurent Pinchart 2013-07-24 13:09 ` [PATCH 2/3] sh-pfc: sh7372: Replace <mach/irqs.h> with <linux/sh_intc.h> Laurent Pinchart ` (2 subsequent siblings) 3 siblings, 0 replies; 6+ messages in thread From: Laurent Pinchart @ 2013-07-24 13:09 UTC (permalink / raw) To: linux-arm-kernel The SoC-specific mach/<soc>.h headers are included needlesly. Don't include them. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> --- drivers/pinctrl/sh-pfc/pfc-r8a73a4.c | 1 - drivers/pinctrl/sh-pfc/pfc-r8a7740.c | 1 - drivers/pinctrl/sh-pfc/pfc-sh7372.c | 1 - 3 files changed, 3 deletions(-) diff --git a/drivers/pinctrl/sh-pfc/pfc-r8a73a4.c b/drivers/pinctrl/sh-pfc/pfc-r8a73a4.c index 82bf6ab..2b9c0b3 100644 --- a/drivers/pinctrl/sh-pfc/pfc-r8a73a4.c +++ b/drivers/pinctrl/sh-pfc/pfc-r8a73a4.c @@ -21,7 +21,6 @@ #include <linux/kernel.h> #include <linux/pinctrl/pinconf-generic.h> #include <mach/irqs.h> -#include <mach/r8a73a4.h> #include "core.h" #include "sh_pfc.h" diff --git a/drivers/pinctrl/sh-pfc/pfc-r8a7740.c b/drivers/pinctrl/sh-pfc/pfc-r8a7740.c index f6ea47c..6a7d382 100644 --- a/drivers/pinctrl/sh-pfc/pfc-r8a7740.c +++ b/drivers/pinctrl/sh-pfc/pfc-r8a7740.c @@ -22,7 +22,6 @@ #include <linux/kernel.h> #include <linux/pinctrl/pinconf-generic.h> -#include <mach/r8a7740.h> #include <mach/irqs.h> #include "core.h" diff --git a/drivers/pinctrl/sh-pfc/pfc-sh7372.c b/drivers/pinctrl/sh-pfc/pfc-sh7372.c index 6dfb187..1528693 100644 --- a/drivers/pinctrl/sh-pfc/pfc-sh7372.c +++ b/drivers/pinctrl/sh-pfc/pfc-sh7372.c @@ -25,7 +25,6 @@ #include <linux/pinctrl/pinconf-generic.h> #include <mach/irqs.h> -#include <mach/sh7372.h> #include "core.h" #include "sh_pfc.h" -- 1.8.1.5 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/3] sh-pfc: sh7372: Replace <mach/irqs.h> with <linux/sh_intc.h> 2013-07-24 13:09 [PATCH 0/3] sh-pfc: Don't include mach/*.h headers were not required Laurent Pinchart 2013-07-24 13:09 ` [PATCH 1/3] sh-pfc: Remove unneeded mach/<soc>.h includes Laurent Pinchart @ 2013-07-24 13:09 ` Laurent Pinchart 2013-07-24 13:09 ` [PATCH 3/3] sh-pfc: sh73a0: Remove EXT_IRQ16L and EXT_IRQ16H macros Laurent Pinchart 2013-07-24 14:44 ` [PATCH 0/3] sh-pfc: Don't include mach/*.h headers were not required Magnus Damm 3 siblings, 0 replies; 6+ messages in thread From: Laurent Pinchart @ 2013-07-24 13:09 UTC (permalink / raw) To: linux-arm-kernel The mach/irqs.h header is included only to get the evt2irq macro definition. The macro is defined in linux/sh_intc.h, include it directly instead of the mach-specific header. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> --- drivers/pinctrl/sh-pfc/pfc-sh7372.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/pinctrl/sh-pfc/pfc-sh7372.c b/drivers/pinctrl/sh-pfc/pfc-sh7372.c index 1528693..5a0b445 100644 --- a/drivers/pinctrl/sh-pfc/pfc-sh7372.c +++ b/drivers/pinctrl/sh-pfc/pfc-sh7372.c @@ -23,8 +23,7 @@ #include <linux/io.h> #include <linux/kernel.h> #include <linux/pinctrl/pinconf-generic.h> - -#include <mach/irqs.h> +#include <linux/sh_intc.h> #include "core.h" #include "sh_pfc.h" -- 1.8.1.5 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 3/3] sh-pfc: sh73a0: Remove EXT_IRQ16L and EXT_IRQ16H macros 2013-07-24 13:09 [PATCH 0/3] sh-pfc: Don't include mach/*.h headers were not required Laurent Pinchart 2013-07-24 13:09 ` [PATCH 1/3] sh-pfc: Remove unneeded mach/<soc>.h includes Laurent Pinchart 2013-07-24 13:09 ` [PATCH 2/3] sh-pfc: sh7372: Replace <mach/irqs.h> with <linux/sh_intc.h> Laurent Pinchart @ 2013-07-24 13:09 ` Laurent Pinchart 2013-07-24 14:44 ` [PATCH 0/3] sh-pfc: Don't include mach/*.h headers were not required Magnus Damm 3 siblings, 0 replies; 6+ messages in thread From: Laurent Pinchart @ 2013-07-24 13:09 UTC (permalink / raw) To: linux-arm-kernel The macros expand to irq_pin() calls and where most probably introduced from a copy&paste of the sh7372 PFC data. Replace them with irq_pin(). Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> --- drivers/pinctrl/sh-pfc/pfc-sh73a0.c | 68 +++++++++++++++++-------------------- 1 file changed, 32 insertions(+), 36 deletions(-) diff --git a/drivers/pinctrl/sh-pfc/pfc-sh73a0.c b/drivers/pinctrl/sh-pfc/pfc-sh73a0.c index 7956df5..d2e8168 100644 --- a/drivers/pinctrl/sh-pfc/pfc-sh73a0.c +++ b/drivers/pinctrl/sh-pfc/pfc-sh73a0.c @@ -3674,43 +3674,39 @@ static const struct pinmux_data_reg pinmux_data_regs[] = { { }, }; -/* External IRQ pins mapped at IRQPIN_BASE */ -#define EXT_IRQ16L(n) irq_pin(n) -#define EXT_IRQ16H(n) irq_pin(n) - static const struct pinmux_irq pinmux_irqs[] = { - PINMUX_IRQ(EXT_IRQ16H(19), 9), - PINMUX_IRQ(EXT_IRQ16L(1), 10), - PINMUX_IRQ(EXT_IRQ16L(0), 11), - PINMUX_IRQ(EXT_IRQ16H(18), 13), - PINMUX_IRQ(EXT_IRQ16H(20), 14), - PINMUX_IRQ(EXT_IRQ16H(21), 15), - PINMUX_IRQ(EXT_IRQ16H(31), 26), - PINMUX_IRQ(EXT_IRQ16H(30), 27), - PINMUX_IRQ(EXT_IRQ16H(29), 28), - PINMUX_IRQ(EXT_IRQ16H(22), 40), - PINMUX_IRQ(EXT_IRQ16H(23), 53), - PINMUX_IRQ(EXT_IRQ16L(10), 54), - PINMUX_IRQ(EXT_IRQ16L(9), 56), - PINMUX_IRQ(EXT_IRQ16H(26), 115), - PINMUX_IRQ(EXT_IRQ16H(27), 116), - PINMUX_IRQ(EXT_IRQ16H(28), 117), - PINMUX_IRQ(EXT_IRQ16H(24), 118), - PINMUX_IRQ(EXT_IRQ16L(6), 147), - PINMUX_IRQ(EXT_IRQ16L(2), 149), - PINMUX_IRQ(EXT_IRQ16L(7), 150), - PINMUX_IRQ(EXT_IRQ16L(12), 156), - PINMUX_IRQ(EXT_IRQ16L(4), 159), - PINMUX_IRQ(EXT_IRQ16H(25), 164), - PINMUX_IRQ(EXT_IRQ16L(8), 223), - PINMUX_IRQ(EXT_IRQ16L(3), 224), - PINMUX_IRQ(EXT_IRQ16L(5), 227), - PINMUX_IRQ(EXT_IRQ16H(17), 234), - PINMUX_IRQ(EXT_IRQ16L(11), 238), - PINMUX_IRQ(EXT_IRQ16L(13), 239), - PINMUX_IRQ(EXT_IRQ16H(16), 249), - PINMUX_IRQ(EXT_IRQ16L(14), 251), - PINMUX_IRQ(EXT_IRQ16L(9), 308), + PINMUX_IRQ(irq_pin(19), 9), + PINMUX_IRQ(irq_pin(1), 10), + PINMUX_IRQ(irq_pin(0), 11), + PINMUX_IRQ(irq_pin(18), 13), + PINMUX_IRQ(irq_pin(20), 14), + PINMUX_IRQ(irq_pin(21), 15), + PINMUX_IRQ(irq_pin(31), 26), + PINMUX_IRQ(irq_pin(30), 27), + PINMUX_IRQ(irq_pin(29), 28), + PINMUX_IRQ(irq_pin(22), 40), + PINMUX_IRQ(irq_pin(23), 53), + PINMUX_IRQ(irq_pin(10), 54), + PINMUX_IRQ(irq_pin(9), 56), + PINMUX_IRQ(irq_pin(26), 115), + PINMUX_IRQ(irq_pin(27), 116), + PINMUX_IRQ(irq_pin(28), 117), + PINMUX_IRQ(irq_pin(24), 118), + PINMUX_IRQ(irq_pin(6), 147), + PINMUX_IRQ(irq_pin(2), 149), + PINMUX_IRQ(irq_pin(7), 150), + PINMUX_IRQ(irq_pin(12), 156), + PINMUX_IRQ(irq_pin(4), 159), + PINMUX_IRQ(irq_pin(25), 164), + PINMUX_IRQ(irq_pin(8), 223), + PINMUX_IRQ(irq_pin(3), 224), + PINMUX_IRQ(irq_pin(5), 227), + PINMUX_IRQ(irq_pin(17), 234), + PINMUX_IRQ(irq_pin(11), 238), + PINMUX_IRQ(irq_pin(13), 239), + PINMUX_IRQ(irq_pin(16), 249), + PINMUX_IRQ(irq_pin(14), 251), + PINMUX_IRQ(irq_pin(9), 308), }; /* ----------------------------------------------------------------------------- -- 1.8.1.5 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 0/3] sh-pfc: Don't include mach/*.h headers were not required 2013-07-24 13:09 [PATCH 0/3] sh-pfc: Don't include mach/*.h headers were not required Laurent Pinchart ` (2 preceding siblings ...) 2013-07-24 13:09 ` [PATCH 3/3] sh-pfc: sh73a0: Remove EXT_IRQ16L and EXT_IRQ16H macros Laurent Pinchart @ 2013-07-24 14:44 ` Magnus Damm 2013-07-24 14:49 ` Laurent Pinchart 3 siblings, 1 reply; 6+ messages in thread From: Magnus Damm @ 2013-07-24 14:44 UTC (permalink / raw) To: linux-arm-kernel Hi Laurent, On Wed, Jul 24, 2013 at 10:09 PM, Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> wrote: > Hello, > > The (long) road to multiplatform kernels requires getting rid of mach/*.h > headers in device drivers. This patch set removes some of the included mach > headers from the sh-pfc driver. The only remaining one is mach/irqs.h, to get > the irq_pin() macro. This will require more work, see [1] for a discussion of > the issue. That's a blocker for some of the SoCs, right? I suppose the ones using a separate GPIO controller are OK as-is? > The patches are based on v3.11-rc2. Linus, do you usually pick pinctrl patches > from the list, or should I send you a pull request ? > > [1] http://www.mail-archive.com/linux-kernel@vger.kernel.org/msg473450.html > > Laurent Pinchart (3): > sh-pfc: Remove unneeded mach/<soc>.h includes > sh-pfc: sh7372: Replace <mach/irqs.h> with <linux/sh_intc.h> > sh-pfc: sh73a0: Remove EXT_IRQ16L and EXT_IRQ16H macros These are fine with me. Thanks for your help! Acked-by: Magnus Damm <damm@opensource.se> ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 0/3] sh-pfc: Don't include mach/*.h headers were not required 2013-07-24 14:44 ` [PATCH 0/3] sh-pfc: Don't include mach/*.h headers were not required Magnus Damm @ 2013-07-24 14:49 ` Laurent Pinchart 0 siblings, 0 replies; 6+ messages in thread From: Laurent Pinchart @ 2013-07-24 14:49 UTC (permalink / raw) To: linux-arm-kernel Hi Magnus, On Wednesday 24 July 2013 23:44:05 Magnus Damm wrote: > On Wed, Jul 24, 2013 at 10:09 PM, Laurent Pinchart wrote: > > Hello, > > > > The (long) road to multiplatform kernels requires getting rid of mach/*.h > > headers in device drivers. This patch set removes some of the included > > mach headers from the sh-pfc driver. The only remaining one is > > mach/irqs.h, to get the irq_pin() macro. This will require more work, see > > [1] for a discussion of the issue. > > That's a blocker for some of the SoCs, right? I suppose the ones using a > separate GPIO controller are OK as-is? Yes. It's a multiplatform blocker for r8a73a4, r8a7740 and sh73a0. SoCs using a separate GPIO controller are fine (although the same problem might pop up for future SoCs with a separate GPIO controller if the GPIO IRQs are handled by a device separate from the GPIO controller). > > The patches are based on v3.11-rc2. Linus, do you usually pick pinctrl > > patches from the list, or should I send you a pull request ? > > > > [1] > > http://www.mail-archive.com/linux-kernel@vger.kernel.org/msg473450.html > > > > Laurent Pinchart (3): > > sh-pfc: Remove unneeded mach/<soc>.h includes > > sh-pfc: sh7372: Replace <mach/irqs.h> with <linux/sh_intc.h> > > sh-pfc: sh73a0: Remove EXT_IRQ16L and EXT_IRQ16H macros > > These are fine with me. Thanks for your help! > > Acked-by: Magnus Damm <damm@opensource.se> Thank you. -- Regards, Laurent Pinchart ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-07-24 14:49 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2013-07-24 13:09 [PATCH 0/3] sh-pfc: Don't include mach/*.h headers were not required Laurent Pinchart 2013-07-24 13:09 ` [PATCH 1/3] sh-pfc: Remove unneeded mach/<soc>.h includes Laurent Pinchart 2013-07-24 13:09 ` [PATCH 2/3] sh-pfc: sh7372: Replace <mach/irqs.h> with <linux/sh_intc.h> Laurent Pinchart 2013-07-24 13:09 ` [PATCH 3/3] sh-pfc: sh73a0: Remove EXT_IRQ16L and EXT_IRQ16H macros Laurent Pinchart 2013-07-24 14:44 ` [PATCH 0/3] sh-pfc: Don't include mach/*.h headers were not required Magnus Damm 2013-07-24 14:49 ` Laurent Pinchart
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).