* [PATCH 0/2] Legacy SH_INTC cleanup
@ 2014-08-20 13:39 ` Geert Uytterhoeven
0 siblings, 0 replies; 12+ messages in thread
From: Geert Uytterhoeven @ 2014-08-20 13:39 UTC (permalink / raw)
To: Simon Horman, Magnus Damm
Cc: Andrew Morton, linux-sh, linux-kernel, Geert Uytterhoeven
Hi Simon, Magnus,
This series cleans up some of the legacy SH_INTC support, which is only used
on 32-bit SuperH and early ARM SH-Mobile (sh7372/sh73a).
There are no dependencies between the two patches.
The first one is destined for your sh-drivers-for-v3.18 branch, while the
second one is meant for your cleanup-for-v3.18 branch.
Geert Uytterhoeven (2):
sh: intc: Confine SH_INTC to platforms that need it
ARM: shmobile: Move legacy INTC definitions from irqs.h to intc.h
arch/arm/mach-shmobile/Kconfig | 2 ++
arch/arm/mach-shmobile/board-kzm9g.c | 1 +
arch/arm/mach-shmobile/board-mackerel.c | 1 +
arch/arm/mach-shmobile/intc.h | 6 ++++++
arch/arm/mach-shmobile/irqs.h | 6 ------
arch/arm/mach-shmobile/setup-sh7372.c | 1 +
arch/arm/mach-shmobile/setup-sh73a0.c | 1 +
arch/sh/Kconfig | 3 +++
drivers/sh/Makefile | 3 +--
drivers/sh/intc/Kconfig | 6 +++++-
10 files changed, 21 insertions(+), 9 deletions(-)
--
1.9.1
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
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 0/2] Legacy SH_INTC cleanup
@ 2014-08-20 13:39 ` Geert Uytterhoeven
0 siblings, 0 replies; 12+ messages in thread
From: Geert Uytterhoeven @ 2014-08-20 13:39 UTC (permalink / raw)
To: Simon Horman, Magnus Damm
Cc: Andrew Morton, linux-sh, linux-kernel, Geert Uytterhoeven
Hi Simon, Magnus,
This series cleans up some of the legacy SH_INTC support, which is only used
on 32-bit SuperH and early ARM SH-Mobile (sh7372/sh73a).
There are no dependencies between the two patches.
The first one is destined for your sh-drivers-for-v3.18 branch, while the
second one is meant for your cleanup-for-v3.18 branch.
Geert Uytterhoeven (2):
sh: intc: Confine SH_INTC to platforms that need it
ARM: shmobile: Move legacy INTC definitions from irqs.h to intc.h
arch/arm/mach-shmobile/Kconfig | 2 ++
arch/arm/mach-shmobile/board-kzm9g.c | 1 +
arch/arm/mach-shmobile/board-mackerel.c | 1 +
arch/arm/mach-shmobile/intc.h | 6 ++++++
arch/arm/mach-shmobile/irqs.h | 6 ------
arch/arm/mach-shmobile/setup-sh7372.c | 1 +
arch/arm/mach-shmobile/setup-sh73a0.c | 1 +
arch/sh/Kconfig | 3 +++
drivers/sh/Makefile | 3 +--
drivers/sh/intc/Kconfig | 6 +++++-
10 files changed, 21 insertions(+), 9 deletions(-)
--
1.9.1
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
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 1/2] sh: intc: Confine SH_INTC to platforms that need it
2014-08-20 13:39 ` Geert Uytterhoeven
@ 2014-08-20 13:39 ` Geert Uytterhoeven
-1 siblings, 0 replies; 12+ messages in thread
From: Geert Uytterhoeven @ 2014-08-20 13:39 UTC (permalink / raw)
To: Simon Horman, Magnus Damm
Cc: Andrew Morton, linux-sh, linux-kernel, Geert Uytterhoeven
Currently the sh-intc driver is compiled on all SuperH and
non-multiplatform SH-Mobile platforms, while it's only used on a limited
number of platforms:
- SuperH: SH2(A), SH3(A), SH4(A)(L) (all but SH5)
- ARM: sh7372, sh73a0
Drop the "default y" on SH_INTC, make all CPU platforms that use it
select it, and protect all sub-options by "if SH_INTC" to fix this.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
arch/arm/mach-shmobile/Kconfig | 2 ++
arch/sh/Kconfig | 3 +++
drivers/sh/Makefile | 3 +--
drivers/sh/intc/Kconfig | 6 +++++-
4 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig
index 5814754c1240..dae4c73a5f00 100644
--- a/arch/arm/mach-shmobile/Kconfig
+++ b/arch/arm/mach-shmobile/Kconfig
@@ -71,6 +71,7 @@ config ARCH_SH7372
select ARM_CPU_SUSPEND if PM || CPU_IDLE
select CPU_V7
select SH_CLK_CPG
+ select SH_INTC
select SYS_SUPPORTS_SH_CMT
select SYS_SUPPORTS_SH_TMU
@@ -81,6 +82,7 @@ config ARCH_SH73A0
select CPU_V7
select I2C
select SH_CLK_CPG
+ select SH_INTC
select RENESAS_INTC_IRQPIN
select SYS_SUPPORTS_SH_CMT
select SYS_SUPPORTS_SH_TMU
diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig
index 453fa5c09550..b319846ad97f 100644
--- a/arch/sh/Kconfig
+++ b/arch/sh/Kconfig
@@ -172,6 +172,7 @@ menu "System type"
#
config CPU_SH2
bool
+ select SH_INTC
config CPU_SH2A
bool
@@ -182,6 +183,7 @@ config CPU_SH3
bool
select CPU_HAS_INTEVT
select CPU_HAS_SR_RB
+ select SH_INTC
select SYS_SUPPORTS_SH_TMU
config CPU_SH4
@@ -189,6 +191,7 @@ config CPU_SH4
select CPU_HAS_INTEVT
select CPU_HAS_SR_RB
select CPU_HAS_FPU if !CPU_SH4AL_DSP
+ select SH_INTC
select SYS_SUPPORTS_SH_TMU
select SYS_SUPPORTS_HUGETLBFS if MMU
diff --git a/drivers/sh/Makefile b/drivers/sh/Makefile
index 788ed9b59b4e..114203f32843 100644
--- a/drivers/sh/Makefile
+++ b/drivers/sh/Makefile
@@ -1,8 +1,7 @@
#
# Makefile for the SuperH specific drivers.
#
-obj-$(CONFIG_SUPERH) += intc/
-obj-$(CONFIG_ARCH_SHMOBILE_LEGACY) += intc/
+obj-$(CONFIG_SH_INTC) += intc/
ifneq ($(CONFIG_COMMON_CLK),y)
obj-$(CONFIG_HAVE_CLK) += clk/
endif
diff --git a/drivers/sh/intc/Kconfig b/drivers/sh/intc/Kconfig
index 60228fae943f..6a1b05ddc8c9 100644
--- a/drivers/sh/intc/Kconfig
+++ b/drivers/sh/intc/Kconfig
@@ -1,7 +1,9 @@
config SH_INTC
- def_bool y
+ bool
select IRQ_DOMAIN
+if SH_INTC
+
comment "Interrupt controller options"
config INTC_USERIMASK
@@ -37,3 +39,5 @@ config INTC_MAPPING_DEBUG
between system IRQs and the per-controller id tables.
If in doubt, say N.
+
+endif
--
1.9.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 1/2] sh: intc: Confine SH_INTC to platforms that need it
@ 2014-08-20 13:39 ` Geert Uytterhoeven
0 siblings, 0 replies; 12+ messages in thread
From: Geert Uytterhoeven @ 2014-08-20 13:39 UTC (permalink / raw)
To: Simon Horman, Magnus Damm
Cc: Andrew Morton, linux-sh, linux-kernel, Geert Uytterhoeven
Currently the sh-intc driver is compiled on all SuperH and
non-multiplatform SH-Mobile platforms, while it's only used on a limited
number of platforms:
- SuperH: SH2(A), SH3(A), SH4(A)(L) (all but SH5)
- ARM: sh7372, sh73a0
Drop the "default y" on SH_INTC, make all CPU platforms that use it
select it, and protect all sub-options by "if SH_INTC" to fix this.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
arch/arm/mach-shmobile/Kconfig | 2 ++
arch/sh/Kconfig | 3 +++
drivers/sh/Makefile | 3 +--
drivers/sh/intc/Kconfig | 6 +++++-
4 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig
index 5814754c1240..dae4c73a5f00 100644
--- a/arch/arm/mach-shmobile/Kconfig
+++ b/arch/arm/mach-shmobile/Kconfig
@@ -71,6 +71,7 @@ config ARCH_SH7372
select ARM_CPU_SUSPEND if PM || CPU_IDLE
select CPU_V7
select SH_CLK_CPG
+ select SH_INTC
select SYS_SUPPORTS_SH_CMT
select SYS_SUPPORTS_SH_TMU
@@ -81,6 +82,7 @@ config ARCH_SH73A0
select CPU_V7
select I2C
select SH_CLK_CPG
+ select SH_INTC
select RENESAS_INTC_IRQPIN
select SYS_SUPPORTS_SH_CMT
select SYS_SUPPORTS_SH_TMU
diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig
index 453fa5c09550..b319846ad97f 100644
--- a/arch/sh/Kconfig
+++ b/arch/sh/Kconfig
@@ -172,6 +172,7 @@ menu "System type"
#
config CPU_SH2
bool
+ select SH_INTC
config CPU_SH2A
bool
@@ -182,6 +183,7 @@ config CPU_SH3
bool
select CPU_HAS_INTEVT
select CPU_HAS_SR_RB
+ select SH_INTC
select SYS_SUPPORTS_SH_TMU
config CPU_SH4
@@ -189,6 +191,7 @@ config CPU_SH4
select CPU_HAS_INTEVT
select CPU_HAS_SR_RB
select CPU_HAS_FPU if !CPU_SH4AL_DSP
+ select SH_INTC
select SYS_SUPPORTS_SH_TMU
select SYS_SUPPORTS_HUGETLBFS if MMU
diff --git a/drivers/sh/Makefile b/drivers/sh/Makefile
index 788ed9b59b4e..114203f32843 100644
--- a/drivers/sh/Makefile
+++ b/drivers/sh/Makefile
@@ -1,8 +1,7 @@
#
# Makefile for the SuperH specific drivers.
#
-obj-$(CONFIG_SUPERH) += intc/
-obj-$(CONFIG_ARCH_SHMOBILE_LEGACY) += intc/
+obj-$(CONFIG_SH_INTC) += intc/
ifneq ($(CONFIG_COMMON_CLK),y)
obj-$(CONFIG_HAVE_CLK) += clk/
endif
diff --git a/drivers/sh/intc/Kconfig b/drivers/sh/intc/Kconfig
index 60228fae943f..6a1b05ddc8c9 100644
--- a/drivers/sh/intc/Kconfig
+++ b/drivers/sh/intc/Kconfig
@@ -1,7 +1,9 @@
config SH_INTC
- def_bool y
+ bool
select IRQ_DOMAIN
+if SH_INTC
+
comment "Interrupt controller options"
config INTC_USERIMASK
@@ -37,3 +39,5 @@ config INTC_MAPPING_DEBUG
between system IRQs and the per-controller id tables.
If in doubt, say N.
+
+endif
--
1.9.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 2/2] ARM: shmobile: Move legacy INTC definitions from irqs.h to intc.h
2014-08-20 13:39 ` Geert Uytterhoeven
@ 2014-08-20 13:39 ` Geert Uytterhoeven
-1 siblings, 0 replies; 12+ messages in thread
From: Geert Uytterhoeven @ 2014-08-20 13:39 UTC (permalink / raw)
To: Simon Horman, Magnus Damm
Cc: Andrew Morton, linux-sh, linux-kernel, Geert Uytterhoeven
Move all definitions for legacy INTC from the common "irqs.h" to the
INTC-specific "intc.h".
Include "intc.h" in sh7372/sh73a0 CPU and board files where needed.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
arch/arm/mach-shmobile/board-kzm9g.c | 1 +
arch/arm/mach-shmobile/board-mackerel.c | 1 +
arch/arm/mach-shmobile/intc.h | 6 ++++++
arch/arm/mach-shmobile/irqs.h | 6 ------
arch/arm/mach-shmobile/setup-sh7372.c | 1 +
arch/arm/mach-shmobile/setup-sh73a0.c | 1 +
6 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/arch/arm/mach-shmobile/board-kzm9g.c b/arch/arm/mach-shmobile/board-kzm9g.c
index 36593cb20e57..77e36fa0b142 100644
--- a/arch/arm/mach-shmobile/board-kzm9g.c
+++ b/arch/arm/mach-shmobile/board-kzm9g.c
@@ -50,6 +50,7 @@
#include <video/sh_mobile_lcdc.h>
#include "common.h"
+#include "intc.h"
#include "irqs.h"
#include "sh73a0.h"
diff --git a/arch/arm/mach-shmobile/board-mackerel.c b/arch/arm/mach-shmobile/board-mackerel.c
index 79f448e93abb..b7c4261492b0 100644
--- a/arch/arm/mach-shmobile/board-mackerel.c
+++ b/arch/arm/mach-shmobile/board-mackerel.c
@@ -63,6 +63,7 @@
#include <asm/mach-types.h>
#include "common.h"
+#include "intc.h"
#include "irqs.h"
#include "pm-rmobile.h"
#include "sh-gpio.h"
diff --git a/arch/arm/mach-shmobile/intc.h b/arch/arm/mach-shmobile/intc.h
index a5603c76cfe0..0313cf798c32 100644
--- a/arch/arm/mach-shmobile/intc.h
+++ b/arch/arm/mach-shmobile/intc.h
@@ -1,5 +1,6 @@
#ifndef __ASM_MACH_INTC_H
#define __ASM_MACH_INTC_H
+
#include <linux/sh_intc.h>
#define INTC_IRQ_PINS_ENUM_16L(p) \
@@ -287,4 +288,9 @@ static struct intc_desc p ## _desc __initdata = { \
p ## _sense_registers, NULL), \
}
+/* INTCS */
+#define INTCS_VECT_BASE 0x3400
+#define INTCS_VECT(n, vect) INTC_VECT((n), INTCS_VECT_BASE + (vect))
+#define intcs_evt2irq(evt) evt2irq(INTCS_VECT_BASE + (evt))
+
#endif /* __ASM_MACH_INTC_H */
diff --git a/arch/arm/mach-shmobile/irqs.h b/arch/arm/mach-shmobile/irqs.h
index 8e28223f1b3c..3070f6d887eb 100644
--- a/arch/arm/mach-shmobile/irqs.h
+++ b/arch/arm/mach-shmobile/irqs.h
@@ -1,18 +1,12 @@
#ifndef __SHMOBILE_IRQS_H
#define __SHMOBILE_IRQS_H
-#include <linux/sh_intc.h>
#include "include/mach/irqs.h"
/* GIC */
#define gic_spi(nr) ((nr) + 32)
#define gic_iid(nr) (nr) /* ICCIAR / interrupt ID */
-/* INTCS */
-#define INTCS_VECT_BASE 0x3400
-#define INTCS_VECT(n, vect) INTC_VECT((n), INTCS_VECT_BASE + (vect))
-#define intcs_evt2irq(evt) evt2irq(INTCS_VECT_BASE + (evt))
-
/* GPIO IRQ */
#define _GPIO_IRQ_BASE 2500
#define GPIO_IRQ_BASE(x) (_GPIO_IRQ_BASE + (32 * x))
diff --git a/arch/arm/mach-shmobile/setup-sh7372.c b/arch/arm/mach-shmobile/setup-sh7372.c
index 3731eccccef4..eaf5d1332c4b 100644
--- a/arch/arm/mach-shmobile/setup-sh7372.c
+++ b/arch/arm/mach-shmobile/setup-sh7372.c
@@ -41,6 +41,7 @@
#include "common.h"
#include "dma-register.h"
+#include "intc.h"
#include "irqs.h"
#include "pm-rmobile.h"
#include "sh7372.h"
diff --git a/arch/arm/mach-shmobile/setup-sh73a0.c b/arch/arm/mach-shmobile/setup-sh73a0.c
index e7a0296b81b1..4c7022830e30 100644
--- a/arch/arm/mach-shmobile/setup-sh73a0.c
+++ b/arch/arm/mach-shmobile/setup-sh73a0.c
@@ -40,6 +40,7 @@
#include "common.h"
#include "dma-register.h"
+#include "intc.h"
#include "irqs.h"
#include "sh73a0.h"
--
1.9.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 2/2] ARM: shmobile: Move legacy INTC definitions from irqs.h to intc.h
@ 2014-08-20 13:39 ` Geert Uytterhoeven
0 siblings, 0 replies; 12+ messages in thread
From: Geert Uytterhoeven @ 2014-08-20 13:39 UTC (permalink / raw)
To: Simon Horman, Magnus Damm
Cc: Andrew Morton, linux-sh, linux-kernel, Geert Uytterhoeven
Move all definitions for legacy INTC from the common "irqs.h" to the
INTC-specific "intc.h".
Include "intc.h" in sh7372/sh73a0 CPU and board files where needed.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
arch/arm/mach-shmobile/board-kzm9g.c | 1 +
arch/arm/mach-shmobile/board-mackerel.c | 1 +
arch/arm/mach-shmobile/intc.h | 6 ++++++
arch/arm/mach-shmobile/irqs.h | 6 ------
arch/arm/mach-shmobile/setup-sh7372.c | 1 +
arch/arm/mach-shmobile/setup-sh73a0.c | 1 +
6 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/arch/arm/mach-shmobile/board-kzm9g.c b/arch/arm/mach-shmobile/board-kzm9g.c
index 36593cb20e57..77e36fa0b142 100644
--- a/arch/arm/mach-shmobile/board-kzm9g.c
+++ b/arch/arm/mach-shmobile/board-kzm9g.c
@@ -50,6 +50,7 @@
#include <video/sh_mobile_lcdc.h>
#include "common.h"
+#include "intc.h"
#include "irqs.h"
#include "sh73a0.h"
diff --git a/arch/arm/mach-shmobile/board-mackerel.c b/arch/arm/mach-shmobile/board-mackerel.c
index 79f448e93abb..b7c4261492b0 100644
--- a/arch/arm/mach-shmobile/board-mackerel.c
+++ b/arch/arm/mach-shmobile/board-mackerel.c
@@ -63,6 +63,7 @@
#include <asm/mach-types.h>
#include "common.h"
+#include "intc.h"
#include "irqs.h"
#include "pm-rmobile.h"
#include "sh-gpio.h"
diff --git a/arch/arm/mach-shmobile/intc.h b/arch/arm/mach-shmobile/intc.h
index a5603c76cfe0..0313cf798c32 100644
--- a/arch/arm/mach-shmobile/intc.h
+++ b/arch/arm/mach-shmobile/intc.h
@@ -1,5 +1,6 @@
#ifndef __ASM_MACH_INTC_H
#define __ASM_MACH_INTC_H
+
#include <linux/sh_intc.h>
#define INTC_IRQ_PINS_ENUM_16L(p) \
@@ -287,4 +288,9 @@ static struct intc_desc p ## _desc __initdata = { \
p ## _sense_registers, NULL), \
}
+/* INTCS */
+#define INTCS_VECT_BASE 0x3400
+#define INTCS_VECT(n, vect) INTC_VECT((n), INTCS_VECT_BASE + (vect))
+#define intcs_evt2irq(evt) evt2irq(INTCS_VECT_BASE + (evt))
+
#endif /* __ASM_MACH_INTC_H */
diff --git a/arch/arm/mach-shmobile/irqs.h b/arch/arm/mach-shmobile/irqs.h
index 8e28223f1b3c..3070f6d887eb 100644
--- a/arch/arm/mach-shmobile/irqs.h
+++ b/arch/arm/mach-shmobile/irqs.h
@@ -1,18 +1,12 @@
#ifndef __SHMOBILE_IRQS_H
#define __SHMOBILE_IRQS_H
-#include <linux/sh_intc.h>
#include "include/mach/irqs.h"
/* GIC */
#define gic_spi(nr) ((nr) + 32)
#define gic_iid(nr) (nr) /* ICCIAR / interrupt ID */
-/* INTCS */
-#define INTCS_VECT_BASE 0x3400
-#define INTCS_VECT(n, vect) INTC_VECT((n), INTCS_VECT_BASE + (vect))
-#define intcs_evt2irq(evt) evt2irq(INTCS_VECT_BASE + (evt))
-
/* GPIO IRQ */
#define _GPIO_IRQ_BASE 2500
#define GPIO_IRQ_BASE(x) (_GPIO_IRQ_BASE + (32 * x))
diff --git a/arch/arm/mach-shmobile/setup-sh7372.c b/arch/arm/mach-shmobile/setup-sh7372.c
index 3731eccccef4..eaf5d1332c4b 100644
--- a/arch/arm/mach-shmobile/setup-sh7372.c
+++ b/arch/arm/mach-shmobile/setup-sh7372.c
@@ -41,6 +41,7 @@
#include "common.h"
#include "dma-register.h"
+#include "intc.h"
#include "irqs.h"
#include "pm-rmobile.h"
#include "sh7372.h"
diff --git a/arch/arm/mach-shmobile/setup-sh73a0.c b/arch/arm/mach-shmobile/setup-sh73a0.c
index e7a0296b81b1..4c7022830e30 100644
--- a/arch/arm/mach-shmobile/setup-sh73a0.c
+++ b/arch/arm/mach-shmobile/setup-sh73a0.c
@@ -40,6 +40,7 @@
#include "common.h"
#include "dma-register.h"
+#include "intc.h"
#include "irqs.h"
#include "sh73a0.h"
--
1.9.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH 0/2] Legacy SH_INTC cleanup
2014-08-20 13:39 ` Geert Uytterhoeven
@ 2014-08-20 14:45 ` Magnus Damm
-1 siblings, 0 replies; 12+ messages in thread
From: Magnus Damm @ 2014-08-20 14:45 UTC (permalink / raw)
To: Geert Uytterhoeven; +Cc: Simon Horman, Andrew Morton, SH-Linux, linux-kernel
Hi Geert,
On Wed, Aug 20, 2014 at 10:39 PM, Geert Uytterhoeven
<geert+renesas@glider.be> wrote:
> Hi Simon, Magnus,
>
> This series cleans up some of the legacy SH_INTC support, which is only used
> on 32-bit SuperH and early ARM SH-Mobile (sh7372/sh73a).
>
> There are no dependencies between the two patches.
> The first one is destined for your sh-drivers-for-v3.18 branch, while the
> second one is meant for your cleanup-for-v3.18 branch.
>
> Geert Uytterhoeven (2):
> sh: intc: Confine SH_INTC to platforms that need it
> ARM: shmobile: Move legacy INTC definitions from irqs.h to intc.h
Thanks, looking great!
Acked-by: Magnus Damm <damm+renesas@opensource.se>
Cheers,
/ magnus
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 0/2] Legacy SH_INTC cleanup
@ 2014-08-20 14:45 ` Magnus Damm
0 siblings, 0 replies; 12+ messages in thread
From: Magnus Damm @ 2014-08-20 14:45 UTC (permalink / raw)
To: Geert Uytterhoeven; +Cc: Simon Horman, Andrew Morton, SH-Linux, linux-kernel
Hi Geert,
On Wed, Aug 20, 2014 at 10:39 PM, Geert Uytterhoeven
<geert+renesas@glider.be> wrote:
> Hi Simon, Magnus,
>
> This series cleans up some of the legacy SH_INTC support, which is only used
> on 32-bit SuperH and early ARM SH-Mobile (sh7372/sh73a).
>
> There are no dependencies between the two patches.
> The first one is destined for your sh-drivers-for-v3.18 branch, while the
> second one is meant for your cleanup-for-v3.18 branch.
>
> Geert Uytterhoeven (2):
> sh: intc: Confine SH_INTC to platforms that need it
> ARM: shmobile: Move legacy INTC definitions from irqs.h to intc.h
Thanks, looking great!
Acked-by: Magnus Damm <damm+renesas@opensource.se>
Cheers,
/ magnus
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 2/2] ARM: shmobile: Move legacy INTC definitions from irqs.h to intc.h
2014-08-20 13:39 ` Geert Uytterhoeven
@ 2014-08-22 3:24 ` Simon Horman
-1 siblings, 0 replies; 12+ messages in thread
From: Simon Horman @ 2014-08-22 3:24 UTC (permalink / raw)
To: Geert Uytterhoeven; +Cc: Magnus Damm, Andrew Morton, linux-sh, linux-kernel
On Wed, Aug 20, 2014 at 03:39:23PM +0200, Geert Uytterhoeven wrote:
> Move all definitions for legacy INTC from the common "irqs.h" to the
> INTC-specific "intc.h".
> Include "intc.h" in sh7372/sh73a0 CPU and board files where needed.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Thanks, I have queued this up with Magnus's Ack after removing
the whitespace change noted below.
> ---
> arch/arm/mach-shmobile/board-kzm9g.c | 1 +
> arch/arm/mach-shmobile/board-mackerel.c | 1 +
> arch/arm/mach-shmobile/intc.h | 6 ++++++
> arch/arm/mach-shmobile/irqs.h | 6 ------
> arch/arm/mach-shmobile/setup-sh7372.c | 1 +
> arch/arm/mach-shmobile/setup-sh73a0.c | 1 +
> 6 files changed, 10 insertions(+), 6 deletions(-)
>
> diff --git a/arch/arm/mach-shmobile/board-kzm9g.c b/arch/arm/mach-shmobile/board-kzm9g.c
> index 36593cb20e57..77e36fa0b142 100644
> --- a/arch/arm/mach-shmobile/board-kzm9g.c
> +++ b/arch/arm/mach-shmobile/board-kzm9g.c
> @@ -50,6 +50,7 @@
> #include <video/sh_mobile_lcdc.h>
>
> #include "common.h"
> +#include "intc.h"
> #include "irqs.h"
> #include "sh73a0.h"
>
> diff --git a/arch/arm/mach-shmobile/board-mackerel.c b/arch/arm/mach-shmobile/board-mackerel.c
> index 79f448e93abb..b7c4261492b0 100644
> --- a/arch/arm/mach-shmobile/board-mackerel.c
> +++ b/arch/arm/mach-shmobile/board-mackerel.c
> @@ -63,6 +63,7 @@
> #include <asm/mach-types.h>
>
> #include "common.h"
> +#include "intc.h"
> #include "irqs.h"
> #include "pm-rmobile.h"
> #include "sh-gpio.h"
> diff --git a/arch/arm/mach-shmobile/intc.h b/arch/arm/mach-shmobile/intc.h
> index a5603c76cfe0..0313cf798c32 100644
> --- a/arch/arm/mach-shmobile/intc.h
> +++ b/arch/arm/mach-shmobile/intc.h
> @@ -1,5 +1,6 @@
> #ifndef __ASM_MACH_INTC_H
> #define __ASM_MACH_INTC_H
> +
> #include <linux/sh_intc.h>
>
> #define INTC_IRQ_PINS_ENUM_16L(p) \
I have removed the above hunk as it seems unrelated to the rest of the patch.
> @@ -287,4 +288,9 @@ static struct intc_desc p ## _desc __initdata = { \
> p ## _sense_registers, NULL), \
> }
>
> +/* INTCS */
> +#define INTCS_VECT_BASE 0x3400
> +#define INTCS_VECT(n, vect) INTC_VECT((n), INTCS_VECT_BASE + (vect))
> +#define intcs_evt2irq(evt) evt2irq(INTCS_VECT_BASE + (evt))
> +
> #endif /* __ASM_MACH_INTC_H */
> diff --git a/arch/arm/mach-shmobile/irqs.h b/arch/arm/mach-shmobile/irqs.h
> index 8e28223f1b3c..3070f6d887eb 100644
> --- a/arch/arm/mach-shmobile/irqs.h
> +++ b/arch/arm/mach-shmobile/irqs.h
> @@ -1,18 +1,12 @@
> #ifndef __SHMOBILE_IRQS_H
> #define __SHMOBILE_IRQS_H
>
> -#include <linux/sh_intc.h>
> #include "include/mach/irqs.h"
>
> /* GIC */
> #define gic_spi(nr) ((nr) + 32)
> #define gic_iid(nr) (nr) /* ICCIAR / interrupt ID */
>
> -/* INTCS */
> -#define INTCS_VECT_BASE 0x3400
> -#define INTCS_VECT(n, vect) INTC_VECT((n), INTCS_VECT_BASE + (vect))
> -#define intcs_evt2irq(evt) evt2irq(INTCS_VECT_BASE + (evt))
> -
> /* GPIO IRQ */
> #define _GPIO_IRQ_BASE 2500
> #define GPIO_IRQ_BASE(x) (_GPIO_IRQ_BASE + (32 * x))
> diff --git a/arch/arm/mach-shmobile/setup-sh7372.c b/arch/arm/mach-shmobile/setup-sh7372.c
> index 3731eccccef4..eaf5d1332c4b 100644
> --- a/arch/arm/mach-shmobile/setup-sh7372.c
> +++ b/arch/arm/mach-shmobile/setup-sh7372.c
> @@ -41,6 +41,7 @@
>
> #include "common.h"
> #include "dma-register.h"
> +#include "intc.h"
> #include "irqs.h"
> #include "pm-rmobile.h"
> #include "sh7372.h"
> diff --git a/arch/arm/mach-shmobile/setup-sh73a0.c b/arch/arm/mach-shmobile/setup-sh73a0.c
> index e7a0296b81b1..4c7022830e30 100644
> --- a/arch/arm/mach-shmobile/setup-sh73a0.c
> +++ b/arch/arm/mach-shmobile/setup-sh73a0.c
> @@ -40,6 +40,7 @@
>
> #include "common.h"
> #include "dma-register.h"
> +#include "intc.h"
> #include "irqs.h"
> #include "sh73a0.h"
>
> --
> 1.9.1
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 2/2] ARM: shmobile: Move legacy INTC definitions from irqs.h to intc.h
@ 2014-08-22 3:24 ` Simon Horman
0 siblings, 0 replies; 12+ messages in thread
From: Simon Horman @ 2014-08-22 3:24 UTC (permalink / raw)
To: Geert Uytterhoeven; +Cc: Magnus Damm, Andrew Morton, linux-sh, linux-kernel
On Wed, Aug 20, 2014 at 03:39:23PM +0200, Geert Uytterhoeven wrote:
> Move all definitions for legacy INTC from the common "irqs.h" to the
> INTC-specific "intc.h".
> Include "intc.h" in sh7372/sh73a0 CPU and board files where needed.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Thanks, I have queued this up with Magnus's Ack after removing
the whitespace change noted below.
> ---
> arch/arm/mach-shmobile/board-kzm9g.c | 1 +
> arch/arm/mach-shmobile/board-mackerel.c | 1 +
> arch/arm/mach-shmobile/intc.h | 6 ++++++
> arch/arm/mach-shmobile/irqs.h | 6 ------
> arch/arm/mach-shmobile/setup-sh7372.c | 1 +
> arch/arm/mach-shmobile/setup-sh73a0.c | 1 +
> 6 files changed, 10 insertions(+), 6 deletions(-)
>
> diff --git a/arch/arm/mach-shmobile/board-kzm9g.c b/arch/arm/mach-shmobile/board-kzm9g.c
> index 36593cb20e57..77e36fa0b142 100644
> --- a/arch/arm/mach-shmobile/board-kzm9g.c
> +++ b/arch/arm/mach-shmobile/board-kzm9g.c
> @@ -50,6 +50,7 @@
> #include <video/sh_mobile_lcdc.h>
>
> #include "common.h"
> +#include "intc.h"
> #include "irqs.h"
> #include "sh73a0.h"
>
> diff --git a/arch/arm/mach-shmobile/board-mackerel.c b/arch/arm/mach-shmobile/board-mackerel.c
> index 79f448e93abb..b7c4261492b0 100644
> --- a/arch/arm/mach-shmobile/board-mackerel.c
> +++ b/arch/arm/mach-shmobile/board-mackerel.c
> @@ -63,6 +63,7 @@
> #include <asm/mach-types.h>
>
> #include "common.h"
> +#include "intc.h"
> #include "irqs.h"
> #include "pm-rmobile.h"
> #include "sh-gpio.h"
> diff --git a/arch/arm/mach-shmobile/intc.h b/arch/arm/mach-shmobile/intc.h
> index a5603c76cfe0..0313cf798c32 100644
> --- a/arch/arm/mach-shmobile/intc.h
> +++ b/arch/arm/mach-shmobile/intc.h
> @@ -1,5 +1,6 @@
> #ifndef __ASM_MACH_INTC_H
> #define __ASM_MACH_INTC_H
> +
> #include <linux/sh_intc.h>
>
> #define INTC_IRQ_PINS_ENUM_16L(p) \
I have removed the above hunk as it seems unrelated to the rest of the patch.
> @@ -287,4 +288,9 @@ static struct intc_desc p ## _desc __initdata = { \
> p ## _sense_registers, NULL), \
> }
>
> +/* INTCS */
> +#define INTCS_VECT_BASE 0x3400
> +#define INTCS_VECT(n, vect) INTC_VECT((n), INTCS_VECT_BASE + (vect))
> +#define intcs_evt2irq(evt) evt2irq(INTCS_VECT_BASE + (evt))
> +
> #endif /* __ASM_MACH_INTC_H */
> diff --git a/arch/arm/mach-shmobile/irqs.h b/arch/arm/mach-shmobile/irqs.h
> index 8e28223f1b3c..3070f6d887eb 100644
> --- a/arch/arm/mach-shmobile/irqs.h
> +++ b/arch/arm/mach-shmobile/irqs.h
> @@ -1,18 +1,12 @@
> #ifndef __SHMOBILE_IRQS_H
> #define __SHMOBILE_IRQS_H
>
> -#include <linux/sh_intc.h>
> #include "include/mach/irqs.h"
>
> /* GIC */
> #define gic_spi(nr) ((nr) + 32)
> #define gic_iid(nr) (nr) /* ICCIAR / interrupt ID */
>
> -/* INTCS */
> -#define INTCS_VECT_BASE 0x3400
> -#define INTCS_VECT(n, vect) INTC_VECT((n), INTCS_VECT_BASE + (vect))
> -#define intcs_evt2irq(evt) evt2irq(INTCS_VECT_BASE + (evt))
> -
> /* GPIO IRQ */
> #define _GPIO_IRQ_BASE 2500
> #define GPIO_IRQ_BASE(x) (_GPIO_IRQ_BASE + (32 * x))
> diff --git a/arch/arm/mach-shmobile/setup-sh7372.c b/arch/arm/mach-shmobile/setup-sh7372.c
> index 3731eccccef4..eaf5d1332c4b 100644
> --- a/arch/arm/mach-shmobile/setup-sh7372.c
> +++ b/arch/arm/mach-shmobile/setup-sh7372.c
> @@ -41,6 +41,7 @@
>
> #include "common.h"
> #include "dma-register.h"
> +#include "intc.h"
> #include "irqs.h"
> #include "pm-rmobile.h"
> #include "sh7372.h"
> diff --git a/arch/arm/mach-shmobile/setup-sh73a0.c b/arch/arm/mach-shmobile/setup-sh73a0.c
> index e7a0296b81b1..4c7022830e30 100644
> --- a/arch/arm/mach-shmobile/setup-sh73a0.c
> +++ b/arch/arm/mach-shmobile/setup-sh73a0.c
> @@ -40,6 +40,7 @@
>
> #include "common.h"
> #include "dma-register.h"
> +#include "intc.h"
> #include "irqs.h"
> #include "sh73a0.h"
>
> --
> 1.9.1
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 1/2] sh: intc: Confine SH_INTC to platforms that need it
2014-08-20 13:39 ` Geert Uytterhoeven
@ 2014-08-22 3:28 ` Simon Horman
-1 siblings, 0 replies; 12+ messages in thread
From: Simon Horman @ 2014-08-22 3:28 UTC (permalink / raw)
To: Geert Uytterhoeven; +Cc: Magnus Damm, Andrew Morton, linux-sh, linux-kernel
On Wed, Aug 20, 2014 at 03:39:22PM +0200, Geert Uytterhoeven wrote:
> Currently the sh-intc driver is compiled on all SuperH and
> non-multiplatform SH-Mobile platforms, while it's only used on a limited
> number of platforms:
> - SuperH: SH2(A), SH3(A), SH4(A)(L) (all but SH5)
> - ARM: sh7372, sh73a0
>
> Drop the "default y" on SH_INTC, make all CPU platforms that use it
> select it, and protect all sub-options by "if SH_INTC" to fix this.
Thanks, I have queued this up with Magnus's Ack.
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
> arch/arm/mach-shmobile/Kconfig | 2 ++
> arch/sh/Kconfig | 3 +++
> drivers/sh/Makefile | 3 +--
> drivers/sh/intc/Kconfig | 6 +++++-
> 4 files changed, 11 insertions(+), 3 deletions(-)
>
> diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig
> index 5814754c1240..dae4c73a5f00 100644
> --- a/arch/arm/mach-shmobile/Kconfig
> +++ b/arch/arm/mach-shmobile/Kconfig
> @@ -71,6 +71,7 @@ config ARCH_SH7372
> select ARM_CPU_SUSPEND if PM || CPU_IDLE
> select CPU_V7
> select SH_CLK_CPG
> + select SH_INTC
> select SYS_SUPPORTS_SH_CMT
> select SYS_SUPPORTS_SH_TMU
>
> @@ -81,6 +82,7 @@ config ARCH_SH73A0
> select CPU_V7
> select I2C
> select SH_CLK_CPG
> + select SH_INTC
> select RENESAS_INTC_IRQPIN
> select SYS_SUPPORTS_SH_CMT
> select SYS_SUPPORTS_SH_TMU
> diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig
> index 453fa5c09550..b319846ad97f 100644
> --- a/arch/sh/Kconfig
> +++ b/arch/sh/Kconfig
> @@ -172,6 +172,7 @@ menu "System type"
> #
> config CPU_SH2
> bool
> + select SH_INTC
>
> config CPU_SH2A
> bool
> @@ -182,6 +183,7 @@ config CPU_SH3
> bool
> select CPU_HAS_INTEVT
> select CPU_HAS_SR_RB
> + select SH_INTC
> select SYS_SUPPORTS_SH_TMU
>
> config CPU_SH4
> @@ -189,6 +191,7 @@ config CPU_SH4
> select CPU_HAS_INTEVT
> select CPU_HAS_SR_RB
> select CPU_HAS_FPU if !CPU_SH4AL_DSP
> + select SH_INTC
> select SYS_SUPPORTS_SH_TMU
> select SYS_SUPPORTS_HUGETLBFS if MMU
>
> diff --git a/drivers/sh/Makefile b/drivers/sh/Makefile
> index 788ed9b59b4e..114203f32843 100644
> --- a/drivers/sh/Makefile
> +++ b/drivers/sh/Makefile
> @@ -1,8 +1,7 @@
> #
> # Makefile for the SuperH specific drivers.
> #
> -obj-$(CONFIG_SUPERH) += intc/
> -obj-$(CONFIG_ARCH_SHMOBILE_LEGACY) += intc/
> +obj-$(CONFIG_SH_INTC) += intc/
> ifneq ($(CONFIG_COMMON_CLK),y)
> obj-$(CONFIG_HAVE_CLK) += clk/
> endif
> diff --git a/drivers/sh/intc/Kconfig b/drivers/sh/intc/Kconfig
> index 60228fae943f..6a1b05ddc8c9 100644
> --- a/drivers/sh/intc/Kconfig
> +++ b/drivers/sh/intc/Kconfig
> @@ -1,7 +1,9 @@
> config SH_INTC
> - def_bool y
> + bool
> select IRQ_DOMAIN
>
> +if SH_INTC
> +
> comment "Interrupt controller options"
>
> config INTC_USERIMASK
> @@ -37,3 +39,5 @@ config INTC_MAPPING_DEBUG
> between system IRQs and the per-controller id tables.
>
> If in doubt, say N.
> +
> +endif
> --
> 1.9.1
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 1/2] sh: intc: Confine SH_INTC to platforms that need it
@ 2014-08-22 3:28 ` Simon Horman
0 siblings, 0 replies; 12+ messages in thread
From: Simon Horman @ 2014-08-22 3:28 UTC (permalink / raw)
To: Geert Uytterhoeven; +Cc: Magnus Damm, Andrew Morton, linux-sh, linux-kernel
On Wed, Aug 20, 2014 at 03:39:22PM +0200, Geert Uytterhoeven wrote:
> Currently the sh-intc driver is compiled on all SuperH and
> non-multiplatform SH-Mobile platforms, while it's only used on a limited
> number of platforms:
> - SuperH: SH2(A), SH3(A), SH4(A)(L) (all but SH5)
> - ARM: sh7372, sh73a0
>
> Drop the "default y" on SH_INTC, make all CPU platforms that use it
> select it, and protect all sub-options by "if SH_INTC" to fix this.
Thanks, I have queued this up with Magnus's Ack.
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
> arch/arm/mach-shmobile/Kconfig | 2 ++
> arch/sh/Kconfig | 3 +++
> drivers/sh/Makefile | 3 +--
> drivers/sh/intc/Kconfig | 6 +++++-
> 4 files changed, 11 insertions(+), 3 deletions(-)
>
> diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig
> index 5814754c1240..dae4c73a5f00 100644
> --- a/arch/arm/mach-shmobile/Kconfig
> +++ b/arch/arm/mach-shmobile/Kconfig
> @@ -71,6 +71,7 @@ config ARCH_SH7372
> select ARM_CPU_SUSPEND if PM || CPU_IDLE
> select CPU_V7
> select SH_CLK_CPG
> + select SH_INTC
> select SYS_SUPPORTS_SH_CMT
> select SYS_SUPPORTS_SH_TMU
>
> @@ -81,6 +82,7 @@ config ARCH_SH73A0
> select CPU_V7
> select I2C
> select SH_CLK_CPG
> + select SH_INTC
> select RENESAS_INTC_IRQPIN
> select SYS_SUPPORTS_SH_CMT
> select SYS_SUPPORTS_SH_TMU
> diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig
> index 453fa5c09550..b319846ad97f 100644
> --- a/arch/sh/Kconfig
> +++ b/arch/sh/Kconfig
> @@ -172,6 +172,7 @@ menu "System type"
> #
> config CPU_SH2
> bool
> + select SH_INTC
>
> config CPU_SH2A
> bool
> @@ -182,6 +183,7 @@ config CPU_SH3
> bool
> select CPU_HAS_INTEVT
> select CPU_HAS_SR_RB
> + select SH_INTC
> select SYS_SUPPORTS_SH_TMU
>
> config CPU_SH4
> @@ -189,6 +191,7 @@ config CPU_SH4
> select CPU_HAS_INTEVT
> select CPU_HAS_SR_RB
> select CPU_HAS_FPU if !CPU_SH4AL_DSP
> + select SH_INTC
> select SYS_SUPPORTS_SH_TMU
> select SYS_SUPPORTS_HUGETLBFS if MMU
>
> diff --git a/drivers/sh/Makefile b/drivers/sh/Makefile
> index 788ed9b59b4e..114203f32843 100644
> --- a/drivers/sh/Makefile
> +++ b/drivers/sh/Makefile
> @@ -1,8 +1,7 @@
> #
> # Makefile for the SuperH specific drivers.
> #
> -obj-$(CONFIG_SUPERH) += intc/
> -obj-$(CONFIG_ARCH_SHMOBILE_LEGACY) += intc/
> +obj-$(CONFIG_SH_INTC) += intc/
> ifneq ($(CONFIG_COMMON_CLK),y)
> obj-$(CONFIG_HAVE_CLK) += clk/
> endif
> diff --git a/drivers/sh/intc/Kconfig b/drivers/sh/intc/Kconfig
> index 60228fae943f..6a1b05ddc8c9 100644
> --- a/drivers/sh/intc/Kconfig
> +++ b/drivers/sh/intc/Kconfig
> @@ -1,7 +1,9 @@
> config SH_INTC
> - def_bool y
> + bool
> select IRQ_DOMAIN
>
> +if SH_INTC
> +
> comment "Interrupt controller options"
>
> config INTC_USERIMASK
> @@ -37,3 +39,5 @@ config INTC_MAPPING_DEBUG
> between system IRQs and the per-controller id tables.
>
> If in doubt, say N.
> +
> +endif
> --
> 1.9.1
>
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2014-08-22 3:28 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-20 13:39 [PATCH 0/2] Legacy SH_INTC cleanup Geert Uytterhoeven
2014-08-20 13:39 ` Geert Uytterhoeven
2014-08-20 13:39 ` [PATCH 1/2] sh: intc: Confine SH_INTC to platforms that need it Geert Uytterhoeven
2014-08-20 13:39 ` Geert Uytterhoeven
2014-08-22 3:28 ` Simon Horman
2014-08-22 3:28 ` Simon Horman
2014-08-20 13:39 ` [PATCH 2/2] ARM: shmobile: Move legacy INTC definitions from irqs.h to intc.h Geert Uytterhoeven
2014-08-20 13:39 ` Geert Uytterhoeven
2014-08-22 3:24 ` Simon Horman
2014-08-22 3:24 ` Simon Horman
2014-08-20 14:45 ` [PATCH 0/2] Legacy SH_INTC cleanup Magnus Damm
2014-08-20 14:45 ` Magnus Damm
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.