All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFT/RFC/PATCH 00/31] arm: omap: irq: cleanup INTC driver
@ 2013-11-20 18:08 ` Felipe Balbi
  0 siblings, 0 replies; 82+ messages in thread
From: Felipe Balbi @ 2013-11-20 18:08 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Linux OMAP Mailing List, Linux ARM Kernel Mailing List, Felipe Balbi

Afte these patches, we're very close to being able
to move arch/arm/mach-omap2/irq.c to drivers/irqchip/irq-intc.c

All which would be missing is for Tony to drop all OMAP2/3 board
files so we remove the few pending bits and pieces left in
for legacy boot.

Note that I have only boot tested these on AM335x Bone Black
(with a small fix for fixed regulator which should be in
the mailing list already), so I'd need help testing all
other impacted platforms, specially when it comes to PM.

Felipe Balbi (31):
  arm: omap: irq: make omap_irq_base global
  arm: omap: irq: define INTC_ILR0 register
  arm: omap: irq: start to remove irq_banks array
  arm: omap: irq: add a global omap_nr_irqs variable
  arm: omap: irq: remove rest of irq_banks usage
  arm: omap: irq: remove unused macro
  arm: omap: irq: switch over to intc_readl on omap_intc_handle_irq
  arm: omap: irq: remove unnecessary base_addr argument
  arm: omap: irq: rename omap3_intc_regs
  arm: omap: irq: always define omap3 support
  arm: omap: irq: reorganize code a little bit
  arm: omap: irq: add suspend/resume methods
  arm: omap: irq: remove last bits of our homebrew irqchip pm
  arm: omap: irq: make intc_of_init static
  arm: omap: irq: call set_handle_irq() from intc_of_init
  arm: omap: irq: use IRQCHIP_DECLARE macro
  arm: omap: irq: drop .handle_irq and .init_irq fields
  arm: omap: irq: add specific compatibles for omap3 and am33xx devices
  arm: omap: irq: use compatible flag to figure out number of IRQ lines
  arm: boot: dts: am33xx/omap3: fix intc compatible flag
  arm: omap: irq: drop ti,intc-size support
  arm: boot: dts: omap2/3/am33xx: drop ti,intc-size
  arm: omap: irq: move some more code around
  arm: omap: irq: call set_handle_irq() from .init_irq
  arm: omap: irq: drop omap3_intc_handle_irq()
  arm: omap: irq: drop omap2_intc_handle_irq()
  arm: omap: irq: drop omap_pending_irq()
  arm: omap: irq: remove unnecessary header
  arm: omap: irq: remove nr_irqs argument
  arm: omap: irq: introduce omap_nr_pending
  arm: omap: irq: get rid of ifdef hack

 arch/arm/boot/dts/am33xx.dtsi              |   3 +-
 arch/arm/boot/dts/omap2.dtsi               |   1 -
 arch/arm/boot/dts/omap3.dtsi               |   3 +-
 arch/arm/mach-omap2/board-2430sdp.c        |   1 -
 arch/arm/mach-omap2/board-3430sdp.c        |   1 -
 arch/arm/mach-omap2/board-am3517crane.c    |   1 -
 arch/arm/mach-omap2/board-am3517evm.c      |   1 -
 arch/arm/mach-omap2/board-cm-t35.c         |   2 -
 arch/arm/mach-omap2/board-cm-t3517.c       |   1 -
 arch/arm/mach-omap2/board-devkit8000.c     |   1 -
 arch/arm/mach-omap2/board-generic.c        |  12 -
 arch/arm/mach-omap2/board-h4.c             |   1 -
 arch/arm/mach-omap2/board-ldp.c            |   1 -
 arch/arm/mach-omap2/board-n8x0.c           |   3 -
 arch/arm/mach-omap2/board-omap3beagle.c    |   1 -
 arch/arm/mach-omap2/board-omap3logic.c     |   2 -
 arch/arm/mach-omap2/board-omap3pandora.c   |   1 -
 arch/arm/mach-omap2/board-omap3stalker.c   |   1 -
 arch/arm/mach-omap2/board-omap3touchbook.c |   1 -
 arch/arm/mach-omap2/board-overo.c          |   1 -
 arch/arm/mach-omap2/board-rx51.c           |   1 -
 arch/arm/mach-omap2/common.h               |  19 --
 arch/arm/mach-omap2/cpuidle34xx.c          |   2 +-
 arch/arm/mach-omap2/irq.c                  | 357 ++++++++++++-----------------
 arch/arm/mach-omap2/pm24xx.c               |  11 -
 arch/arm/mach-omap2/pm34xx.c               |  13 --
 26 files changed, 153 insertions(+), 289 deletions(-)

-- 
1.8.4.GIT


^ permalink raw reply	[flat|nested] 82+ messages in thread

* [RFT/RFC/PATCH 00/31] arm: omap: irq: cleanup INTC driver
@ 2013-11-20 18:08 ` Felipe Balbi
  0 siblings, 0 replies; 82+ messages in thread
From: Felipe Balbi @ 2013-11-20 18:08 UTC (permalink / raw)
  To: linux-arm-kernel

Afte these patches, we're very close to being able
to move arch/arm/mach-omap2/irq.c to drivers/irqchip/irq-intc.c

All which would be missing is for Tony to drop all OMAP2/3 board
files so we remove the few pending bits and pieces left in
for legacy boot.

Note that I have only boot tested these on AM335x Bone Black
(with a small fix for fixed regulator which should be in
the mailing list already), so I'd need help testing all
other impacted platforms, specially when it comes to PM.

Felipe Balbi (31):
  arm: omap: irq: make omap_irq_base global
  arm: omap: irq: define INTC_ILR0 register
  arm: omap: irq: start to remove irq_banks array
  arm: omap: irq: add a global omap_nr_irqs variable
  arm: omap: irq: remove rest of irq_banks usage
  arm: omap: irq: remove unused macro
  arm: omap: irq: switch over to intc_readl on omap_intc_handle_irq
  arm: omap: irq: remove unnecessary base_addr argument
  arm: omap: irq: rename omap3_intc_regs
  arm: omap: irq: always define omap3 support
  arm: omap: irq: reorganize code a little bit
  arm: omap: irq: add suspend/resume methods
  arm: omap: irq: remove last bits of our homebrew irqchip pm
  arm: omap: irq: make intc_of_init static
  arm: omap: irq: call set_handle_irq() from intc_of_init
  arm: omap: irq: use IRQCHIP_DECLARE macro
  arm: omap: irq: drop .handle_irq and .init_irq fields
  arm: omap: irq: add specific compatibles for omap3 and am33xx devices
  arm: omap: irq: use compatible flag to figure out number of IRQ lines
  arm: boot: dts: am33xx/omap3: fix intc compatible flag
  arm: omap: irq: drop ti,intc-size support
  arm: boot: dts: omap2/3/am33xx: drop ti,intc-size
  arm: omap: irq: move some more code around
  arm: omap: irq: call set_handle_irq() from .init_irq
  arm: omap: irq: drop omap3_intc_handle_irq()
  arm: omap: irq: drop omap2_intc_handle_irq()
  arm: omap: irq: drop omap_pending_irq()
  arm: omap: irq: remove unnecessary header
  arm: omap: irq: remove nr_irqs argument
  arm: omap: irq: introduce omap_nr_pending
  arm: omap: irq: get rid of ifdef hack

 arch/arm/boot/dts/am33xx.dtsi              |   3 +-
 arch/arm/boot/dts/omap2.dtsi               |   1 -
 arch/arm/boot/dts/omap3.dtsi               |   3 +-
 arch/arm/mach-omap2/board-2430sdp.c        |   1 -
 arch/arm/mach-omap2/board-3430sdp.c        |   1 -
 arch/arm/mach-omap2/board-am3517crane.c    |   1 -
 arch/arm/mach-omap2/board-am3517evm.c      |   1 -
 arch/arm/mach-omap2/board-cm-t35.c         |   2 -
 arch/arm/mach-omap2/board-cm-t3517.c       |   1 -
 arch/arm/mach-omap2/board-devkit8000.c     |   1 -
 arch/arm/mach-omap2/board-generic.c        |  12 -
 arch/arm/mach-omap2/board-h4.c             |   1 -
 arch/arm/mach-omap2/board-ldp.c            |   1 -
 arch/arm/mach-omap2/board-n8x0.c           |   3 -
 arch/arm/mach-omap2/board-omap3beagle.c    |   1 -
 arch/arm/mach-omap2/board-omap3logic.c     |   2 -
 arch/arm/mach-omap2/board-omap3pandora.c   |   1 -
 arch/arm/mach-omap2/board-omap3stalker.c   |   1 -
 arch/arm/mach-omap2/board-omap3touchbook.c |   1 -
 arch/arm/mach-omap2/board-overo.c          |   1 -
 arch/arm/mach-omap2/board-rx51.c           |   1 -
 arch/arm/mach-omap2/common.h               |  19 --
 arch/arm/mach-omap2/cpuidle34xx.c          |   2 +-
 arch/arm/mach-omap2/irq.c                  | 357 ++++++++++++-----------------
 arch/arm/mach-omap2/pm24xx.c               |  11 -
 arch/arm/mach-omap2/pm34xx.c               |  13 --
 26 files changed, 153 insertions(+), 289 deletions(-)

-- 
1.8.4.GIT

^ permalink raw reply	[flat|nested] 82+ messages in thread

* [RFT/RFC/PATCH 01/31] arm: omap: irq: make omap_irq_base global
  2013-11-20 18:08 ` Felipe Balbi
@ 2013-11-20 18:08   ` Felipe Balbi
  -1 siblings, 0 replies; 82+ messages in thread
From: Felipe Balbi @ 2013-11-20 18:08 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Linux OMAP Mailing List, Linux ARM Kernel Mailing List, Felipe Balbi

This is in preparation for removing the pointless
irq_banks array.

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 arch/arm/mach-omap2/irq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c
index e022a86..748f86b 100644
--- a/arch/arm/mach-omap2/irq.c
+++ b/arch/arm/mach-omap2/irq.c
@@ -68,6 +68,7 @@ static struct omap_irq_bank {
 };
 
 static struct irq_domain *domain;
+static void __iomem *omap_irq_base;
 
 /* Structure to save interrupt controller context */
 struct omap3_intc_regs {
@@ -161,7 +162,6 @@ omap_alloc_gc(void __iomem *base, unsigned int irq_start, unsigned int num)
 static void __init omap_init_irq(u32 base, int nr_irqs,
 				 struct device_node *node)
 {
-	void __iomem *omap_irq_base;
 	unsigned long nr_of_irqs = 0;
 	unsigned int nr_banks = 0;
 	int i, j, irq_base;
-- 
1.8.4.GIT


^ permalink raw reply related	[flat|nested] 82+ messages in thread

* [RFT/RFC/PATCH 01/31] arm: omap: irq: make omap_irq_base global
@ 2013-11-20 18:08   ` Felipe Balbi
  0 siblings, 0 replies; 82+ messages in thread
From: Felipe Balbi @ 2013-11-20 18:08 UTC (permalink / raw)
  To: linux-arm-kernel

This is in preparation for removing the pointless
irq_banks array.

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 arch/arm/mach-omap2/irq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c
index e022a86..748f86b 100644
--- a/arch/arm/mach-omap2/irq.c
+++ b/arch/arm/mach-omap2/irq.c
@@ -68,6 +68,7 @@ static struct omap_irq_bank {
 };
 
 static struct irq_domain *domain;
+static void __iomem *omap_irq_base;
 
 /* Structure to save interrupt controller context */
 struct omap3_intc_regs {
@@ -161,7 +162,6 @@ omap_alloc_gc(void __iomem *base, unsigned int irq_start, unsigned int num)
 static void __init omap_init_irq(u32 base, int nr_irqs,
 				 struct device_node *node)
 {
-	void __iomem *omap_irq_base;
 	unsigned long nr_of_irqs = 0;
 	unsigned int nr_banks = 0;
 	int i, j, irq_base;
-- 
1.8.4.GIT

^ permalink raw reply related	[flat|nested] 82+ messages in thread

* [RFT/RFC/PATCH 02/31] arm: omap: irq: define INTC_ILR0 register
  2013-11-20 18:08 ` Felipe Balbi
@ 2013-11-20 18:08   ` Felipe Balbi
  -1 siblings, 0 replies; 82+ messages in thread
From: Felipe Balbi @ 2013-11-20 18:08 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Linux OMAP Mailing List, Linux ARM Kernel Mailing List, Felipe Balbi

this is currently used as a hardcoded 0x100
offset.

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 arch/arm/mach-omap2/irq.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c
index 748f86b..c9539b1 100644
--- a/arch/arm/mach-omap2/irq.c
+++ b/arch/arm/mach-omap2/irq.c
@@ -41,6 +41,7 @@
 #define INTC_MIR_CLEAR0		0x0088
 #define INTC_MIR_SET0		0x008c
 #define INTC_PENDING_IRQ0	0x0098
+#define INTC_ILR0		0x0100
 /* Number of IRQ state bits in each MIR register */
 #define IRQ_BITS_PER_REG	32
 
-- 
1.8.4.GIT


^ permalink raw reply related	[flat|nested] 82+ messages in thread

* [RFT/RFC/PATCH 02/31] arm: omap: irq: define INTC_ILR0 register
@ 2013-11-20 18:08   ` Felipe Balbi
  0 siblings, 0 replies; 82+ messages in thread
From: Felipe Balbi @ 2013-11-20 18:08 UTC (permalink / raw)
  To: linux-arm-kernel

this is currently used as a hardcoded 0x100
offset.

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 arch/arm/mach-omap2/irq.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c
index 748f86b..c9539b1 100644
--- a/arch/arm/mach-omap2/irq.c
+++ b/arch/arm/mach-omap2/irq.c
@@ -41,6 +41,7 @@
 #define INTC_MIR_CLEAR0		0x0088
 #define INTC_MIR_SET0		0x008c
 #define INTC_PENDING_IRQ0	0x0098
+#define INTC_ILR0		0x0100
 /* Number of IRQ state bits in each MIR register */
 #define IRQ_BITS_PER_REG	32
 
-- 
1.8.4.GIT

^ permalink raw reply related	[flat|nested] 82+ messages in thread

* [RFT/RFC/PATCH 03/31] arm: omap: irq: start to remove irq_banks array
  2013-11-20 18:08 ` Felipe Balbi
@ 2013-11-20 18:08   ` Felipe Balbi
  -1 siblings, 0 replies; 82+ messages in thread
From: Felipe Balbi @ 2013-11-20 18:08 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Linux OMAP Mailing List, Linux ARM Kernel Mailing List, Felipe Balbi

We have a single bank in that array, this patch
is in preparation to remove that array. It just
shifts everything to a new set of functions
for register IO while also removing old ones.

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 arch/arm/mach-omap2/irq.c | 64 ++++++++++++++++++++---------------------------
 1 file changed, 27 insertions(+), 37 deletions(-)

diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c
index c9539b1..18637e9 100644
--- a/arch/arm/mach-omap2/irq.c
+++ b/arch/arm/mach-omap2/irq.c
@@ -82,21 +82,20 @@ struct omap3_intc_regs {
 };
 
 /* INTC bank register get/set */
-
-static void intc_bank_write_reg(u32 val, struct omap_irq_bank *bank, u16 reg)
+static void intc_writel(u32 reg, u32 val)
 {
-	__raw_writel(val, bank->base_reg + reg);
+	writel_relaxed(val, omap_irq_base + reg);
 }
 
-static u32 intc_bank_read_reg(struct omap_irq_bank *bank, u16 reg)
+static u32 intc_readl(u32 reg)
 {
-	return __raw_readl(bank->base_reg + reg);
+	return readl_relaxed(omap_irq_base + reg);
 }
 
 /* XXX: FIQ and additional INTC support (only MPU at the moment) */
 static void omap_ack_irq(struct irq_data *d)
 {
-	intc_bank_write_reg(0x1, &irq_banks[0], INTC_CONTROL);
+	intc_writel(INTC_CONTROL, 0x1);
 }
 
 static void omap_mask_ack_irq(struct irq_data *d)
@@ -109,19 +108,19 @@ static void __init omap_irq_bank_init_one(struct omap_irq_bank *bank)
 {
 	unsigned long tmp;
 
-	tmp = intc_bank_read_reg(bank, INTC_REVISION) & 0xff;
+	tmp = intc_readl(INTC_REVISION) & 0xff;
 	pr_info("IRQ: Found an INTC at 0x%p (revision %ld.%ld) with %d interrupts\n",
 		bank->base_reg, tmp >> 4, tmp & 0xf, bank->nr_irqs);
 
-	tmp = intc_bank_read_reg(bank, INTC_SYSCONFIG);
+	tmp = intc_readl(INTC_SYSCONFIG);
 	tmp |= 1 << 1;	/* soft reset */
-	intc_bank_write_reg(tmp, bank, INTC_SYSCONFIG);
+	intc_writel(INTC_SYSCONFIG, tmp);
 
-	while (!(intc_bank_read_reg(bank, INTC_SYSSTATUS) & 0x1))
+	while (!(intc_readl(INTC_SYSSTATUS) & 0x1))
 		/* Wait for reset to complete */;
 
 	/* Enable autoidle */
-	intc_bank_write_reg(1 << 0, bank, INTC_SYSCONFIG);
+	intc_writel(INTC_SYSCONFIG, 1 << 0);
 }
 
 int omap_irq_pending(void)
@@ -133,7 +132,7 @@ int omap_irq_pending(void)
 		int irq;
 
 		for (irq = 0; irq < bank->nr_irqs; irq += 32)
-			if (intc_bank_read_reg(bank, INTC_PENDING_IRQ0 +
+			if (intc_readl(INTC_PENDING_IRQ0 +
 					       ((irq >> 5) << 5)))
 				return 1;
 	}
@@ -299,22 +298,20 @@ void omap_intc_save_context(void)
 {
 	int ind = 0, i = 0;
 	for (ind = 0; ind < ARRAY_SIZE(irq_banks); ind++) {
-		struct omap_irq_bank *bank = irq_banks + ind;
 		intc_context[ind].sysconfig =
-			intc_bank_read_reg(bank, INTC_SYSCONFIG);
+			intc_readl(INTC_SYSCONFIG);
 		intc_context[ind].protection =
-			intc_bank_read_reg(bank, INTC_PROTECTION);
+			intc_readl(INTC_PROTECTION);
 		intc_context[ind].idle =
-			intc_bank_read_reg(bank, INTC_IDLE);
+			intc_readl(INTC_IDLE);
 		intc_context[ind].threshold =
-			intc_bank_read_reg(bank, INTC_THRESHOLD);
+			intc_readl(INTC_THRESHOLD);
 		for (i = 0; i < INTCPS_NR_IRQS; i++)
 			intc_context[ind].ilr[i] =
-				intc_bank_read_reg(bank, (0x100 + 0x4*i));
+				intc_readl((INTC_ILR0 + 0x4 * i));
 		for (i = 0; i < INTCPS_NR_MIR_REGS; i++)
 			intc_context[ind].mir[i] =
-				intc_bank_read_reg(&irq_banks[0], INTC_MIR0 +
-				(0x20 * i));
+				intc_readl(INTC_MIR0 + (0x20 * i));
 	}
 }
 
@@ -323,23 +320,16 @@ void omap_intc_restore_context(void)
 	int ind = 0, i = 0;
 
 	for (ind = 0; ind < ARRAY_SIZE(irq_banks); ind++) {
-		struct omap_irq_bank *bank = irq_banks + ind;
-		intc_bank_write_reg(intc_context[ind].sysconfig,
-					bank, INTC_SYSCONFIG);
-		intc_bank_write_reg(intc_context[ind].sysconfig,
-					bank, INTC_SYSCONFIG);
-		intc_bank_write_reg(intc_context[ind].protection,
-					bank, INTC_PROTECTION);
-		intc_bank_write_reg(intc_context[ind].idle,
-					bank, INTC_IDLE);
-		intc_bank_write_reg(intc_context[ind].threshold,
-					bank, INTC_THRESHOLD);
+		intc_writel(INTC_SYSCONFIG, intc_context[ind].sysconfig);
+		intc_writel(INTC_PROTECTION, intc_context[ind].protection);
+		intc_writel(INTC_IDLE, intc_context[ind].idle);
+		intc_writel(INTC_THRESHOLD, intc_context[ind].threshold);
 		for (i = 0; i < INTCPS_NR_IRQS; i++)
-			intc_bank_write_reg(intc_context[ind].ilr[i],
-				bank, (0x100 + 0x4*i));
+			intc_writel(INTC_ILR0 + 0x4 * i,
+					intc_context[ind].ilr[i]);
 		for (i = 0; i < INTCPS_NR_MIR_REGS; i++)
-			intc_bank_write_reg(intc_context[ind].mir[i],
-				 &irq_banks[0], INTC_MIR0 + (0x20 * i));
+			intc_writel(INTC_MIR0 + 0x20 * i,
+				intc_context[ind].mir[i]);
 	}
 	/* MIRs are saved and restore with other PRCM registers */
 }
@@ -356,13 +346,13 @@ void omap3_intc_prepare_idle(void)
 	 * Disable autoidle as it can stall interrupt controller,
 	 * cf. errata ID i540 for 3430 (all revisions up to 3.1.x)
 	 */
-	intc_bank_write_reg(0, &irq_banks[0], INTC_SYSCONFIG);
+	intc_writel(INTC_SYSCONFIG, 0);
 }
 
 void omap3_intc_resume_idle(void)
 {
 	/* Re-enable autoidle */
-	intc_bank_write_reg(1, &irq_banks[0], INTC_SYSCONFIG);
+	intc_writel(INTC_SYSCONFIG, 1);
 }
 
 asmlinkage void __exception_irq_entry omap3_intc_handle_irq(struct pt_regs *regs)
-- 
1.8.4.GIT


^ permalink raw reply related	[flat|nested] 82+ messages in thread

* [RFT/RFC/PATCH 03/31] arm: omap: irq: start to remove irq_banks array
@ 2013-11-20 18:08   ` Felipe Balbi
  0 siblings, 0 replies; 82+ messages in thread
From: Felipe Balbi @ 2013-11-20 18:08 UTC (permalink / raw)
  To: linux-arm-kernel

We have a single bank in that array, this patch
is in preparation to remove that array. It just
shifts everything to a new set of functions
for register IO while also removing old ones.

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 arch/arm/mach-omap2/irq.c | 64 ++++++++++++++++++++---------------------------
 1 file changed, 27 insertions(+), 37 deletions(-)

diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c
index c9539b1..18637e9 100644
--- a/arch/arm/mach-omap2/irq.c
+++ b/arch/arm/mach-omap2/irq.c
@@ -82,21 +82,20 @@ struct omap3_intc_regs {
 };
 
 /* INTC bank register get/set */
-
-static void intc_bank_write_reg(u32 val, struct omap_irq_bank *bank, u16 reg)
+static void intc_writel(u32 reg, u32 val)
 {
-	__raw_writel(val, bank->base_reg + reg);
+	writel_relaxed(val, omap_irq_base + reg);
 }
 
-static u32 intc_bank_read_reg(struct omap_irq_bank *bank, u16 reg)
+static u32 intc_readl(u32 reg)
 {
-	return __raw_readl(bank->base_reg + reg);
+	return readl_relaxed(omap_irq_base + reg);
 }
 
 /* XXX: FIQ and additional INTC support (only MPU at the moment) */
 static void omap_ack_irq(struct irq_data *d)
 {
-	intc_bank_write_reg(0x1, &irq_banks[0], INTC_CONTROL);
+	intc_writel(INTC_CONTROL, 0x1);
 }
 
 static void omap_mask_ack_irq(struct irq_data *d)
@@ -109,19 +108,19 @@ static void __init omap_irq_bank_init_one(struct omap_irq_bank *bank)
 {
 	unsigned long tmp;
 
-	tmp = intc_bank_read_reg(bank, INTC_REVISION) & 0xff;
+	tmp = intc_readl(INTC_REVISION) & 0xff;
 	pr_info("IRQ: Found an INTC at 0x%p (revision %ld.%ld) with %d interrupts\n",
 		bank->base_reg, tmp >> 4, tmp & 0xf, bank->nr_irqs);
 
-	tmp = intc_bank_read_reg(bank, INTC_SYSCONFIG);
+	tmp = intc_readl(INTC_SYSCONFIG);
 	tmp |= 1 << 1;	/* soft reset */
-	intc_bank_write_reg(tmp, bank, INTC_SYSCONFIG);
+	intc_writel(INTC_SYSCONFIG, tmp);
 
-	while (!(intc_bank_read_reg(bank, INTC_SYSSTATUS) & 0x1))
+	while (!(intc_readl(INTC_SYSSTATUS) & 0x1))
 		/* Wait for reset to complete */;
 
 	/* Enable autoidle */
-	intc_bank_write_reg(1 << 0, bank, INTC_SYSCONFIG);
+	intc_writel(INTC_SYSCONFIG, 1 << 0);
 }
 
 int omap_irq_pending(void)
@@ -133,7 +132,7 @@ int omap_irq_pending(void)
 		int irq;
 
 		for (irq = 0; irq < bank->nr_irqs; irq += 32)
-			if (intc_bank_read_reg(bank, INTC_PENDING_IRQ0 +
+			if (intc_readl(INTC_PENDING_IRQ0 +
 					       ((irq >> 5) << 5)))
 				return 1;
 	}
@@ -299,22 +298,20 @@ void omap_intc_save_context(void)
 {
 	int ind = 0, i = 0;
 	for (ind = 0; ind < ARRAY_SIZE(irq_banks); ind++) {
-		struct omap_irq_bank *bank = irq_banks + ind;
 		intc_context[ind].sysconfig =
-			intc_bank_read_reg(bank, INTC_SYSCONFIG);
+			intc_readl(INTC_SYSCONFIG);
 		intc_context[ind].protection =
-			intc_bank_read_reg(bank, INTC_PROTECTION);
+			intc_readl(INTC_PROTECTION);
 		intc_context[ind].idle =
-			intc_bank_read_reg(bank, INTC_IDLE);
+			intc_readl(INTC_IDLE);
 		intc_context[ind].threshold =
-			intc_bank_read_reg(bank, INTC_THRESHOLD);
+			intc_readl(INTC_THRESHOLD);
 		for (i = 0; i < INTCPS_NR_IRQS; i++)
 			intc_context[ind].ilr[i] =
-				intc_bank_read_reg(bank, (0x100 + 0x4*i));
+				intc_readl((INTC_ILR0 + 0x4 * i));
 		for (i = 0; i < INTCPS_NR_MIR_REGS; i++)
 			intc_context[ind].mir[i] =
-				intc_bank_read_reg(&irq_banks[0], INTC_MIR0 +
-				(0x20 * i));
+				intc_readl(INTC_MIR0 + (0x20 * i));
 	}
 }
 
@@ -323,23 +320,16 @@ void omap_intc_restore_context(void)
 	int ind = 0, i = 0;
 
 	for (ind = 0; ind < ARRAY_SIZE(irq_banks); ind++) {
-		struct omap_irq_bank *bank = irq_banks + ind;
-		intc_bank_write_reg(intc_context[ind].sysconfig,
-					bank, INTC_SYSCONFIG);
-		intc_bank_write_reg(intc_context[ind].sysconfig,
-					bank, INTC_SYSCONFIG);
-		intc_bank_write_reg(intc_context[ind].protection,
-					bank, INTC_PROTECTION);
-		intc_bank_write_reg(intc_context[ind].idle,
-					bank, INTC_IDLE);
-		intc_bank_write_reg(intc_context[ind].threshold,
-					bank, INTC_THRESHOLD);
+		intc_writel(INTC_SYSCONFIG, intc_context[ind].sysconfig);
+		intc_writel(INTC_PROTECTION, intc_context[ind].protection);
+		intc_writel(INTC_IDLE, intc_context[ind].idle);
+		intc_writel(INTC_THRESHOLD, intc_context[ind].threshold);
 		for (i = 0; i < INTCPS_NR_IRQS; i++)
-			intc_bank_write_reg(intc_context[ind].ilr[i],
-				bank, (0x100 + 0x4*i));
+			intc_writel(INTC_ILR0 + 0x4 * i,
+					intc_context[ind].ilr[i]);
 		for (i = 0; i < INTCPS_NR_MIR_REGS; i++)
-			intc_bank_write_reg(intc_context[ind].mir[i],
-				 &irq_banks[0], INTC_MIR0 + (0x20 * i));
+			intc_writel(INTC_MIR0 + 0x20 * i,
+				intc_context[ind].mir[i]);
 	}
 	/* MIRs are saved and restore with other PRCM registers */
 }
@@ -356,13 +346,13 @@ void omap3_intc_prepare_idle(void)
 	 * Disable autoidle as it can stall interrupt controller,
 	 * cf. errata ID i540 for 3430 (all revisions up to 3.1.x)
 	 */
-	intc_bank_write_reg(0, &irq_banks[0], INTC_SYSCONFIG);
+	intc_writel(INTC_SYSCONFIG, 0);
 }
 
 void omap3_intc_resume_idle(void)
 {
 	/* Re-enable autoidle */
-	intc_bank_write_reg(1, &irq_banks[0], INTC_SYSCONFIG);
+	intc_writel(INTC_SYSCONFIG, 1);
 }
 
 asmlinkage void __exception_irq_entry omap3_intc_handle_irq(struct pt_regs *regs)
-- 
1.8.4.GIT

^ permalink raw reply related	[flat|nested] 82+ messages in thread

* [RFT/RFC/PATCH 04/31] arm: omap: irq: add a global omap_nr_irqs variable
  2013-11-20 18:08 ` Felipe Balbi
@ 2013-11-20 18:08   ` Felipe Balbi
  -1 siblings, 0 replies; 82+ messages in thread
From: Felipe Balbi @ 2013-11-20 18:08 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Linux OMAP Mailing List, Linux ARM Kernel Mailing List, Felipe Balbi

this will cache number of irqs. Also in preparation
for removal of irq_banks array.

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 arch/arm/mach-omap2/irq.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c
index 18637e9..f6d0d38 100644
--- a/arch/arm/mach-omap2/irq.c
+++ b/arch/arm/mach-omap2/irq.c
@@ -70,6 +70,7 @@ static struct omap_irq_bank {
 
 static struct irq_domain *domain;
 static void __iomem *omap_irq_base;
+static int omap_nr_irqs = 96;
 
 /* Structure to save interrupt controller context */
 struct omap3_intc_regs {
@@ -170,6 +171,8 @@ static void __init omap_init_irq(u32 base, int nr_irqs,
 	if (WARN_ON(!omap_irq_base))
 		return;
 
+	omap_nr_irqs = nr_irqs;
+
 	irq_base = irq_alloc_descs(-1, 0, nr_irqs, 0);
 	if (irq_base < 0) {
 		pr_warn("Couldn't allocate IRQ numbers\n");
-- 
1.8.4.GIT


^ permalink raw reply related	[flat|nested] 82+ messages in thread

* [RFT/RFC/PATCH 04/31] arm: omap: irq: add a global omap_nr_irqs variable
@ 2013-11-20 18:08   ` Felipe Balbi
  0 siblings, 0 replies; 82+ messages in thread
From: Felipe Balbi @ 2013-11-20 18:08 UTC (permalink / raw)
  To: linux-arm-kernel

this will cache number of irqs. Also in preparation
for removal of irq_banks array.

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 arch/arm/mach-omap2/irq.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c
index 18637e9..f6d0d38 100644
--- a/arch/arm/mach-omap2/irq.c
+++ b/arch/arm/mach-omap2/irq.c
@@ -70,6 +70,7 @@ static struct omap_irq_bank {
 
 static struct irq_domain *domain;
 static void __iomem *omap_irq_base;
+static int omap_nr_irqs = 96;
 
 /* Structure to save interrupt controller context */
 struct omap3_intc_regs {
@@ -170,6 +171,8 @@ static void __init omap_init_irq(u32 base, int nr_irqs,
 	if (WARN_ON(!omap_irq_base))
 		return;
 
+	omap_nr_irqs = nr_irqs;
+
 	irq_base = irq_alloc_descs(-1, 0, nr_irqs, 0);
 	if (irq_base < 0) {
 		pr_warn("Couldn't allocate IRQ numbers\n");
-- 
1.8.4.GIT

^ permalink raw reply related	[flat|nested] 82+ messages in thread

* [RFT/RFC/PATCH 05/31] arm: omap: irq: remove rest of irq_banks usage
  2013-11-20 18:08 ` Felipe Balbi
@ 2013-11-20 18:08   ` Felipe Balbi
  -1 siblings, 0 replies; 82+ messages in thread
From: Felipe Balbi @ 2013-11-20 18:08 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Linux OMAP Mailing List, Linux ARM Kernel Mailing List, Felipe Balbi

now we can finally remove the pointless irq_banks
array.

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 arch/arm/mach-omap2/irq.c | 128 +++++++++++++++++-----------------------------
 1 file changed, 47 insertions(+), 81 deletions(-)

diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c
index f6d0d38..cfca775 100644
--- a/arch/arm/mach-omap2/irq.c
+++ b/arch/arm/mach-omap2/irq.c
@@ -49,8 +49,8 @@
 #define OMAP3_IRQ_BASE		OMAP2_L4_IO_ADDRESS(OMAP34XX_IC_BASE)
 #define INTCPS_SIR_IRQ_OFFSET	0x0040	/* omap2/3 active interrupt offset */
 #define ACTIVEIRQ_MASK		0x7f	/* omap2/3 active interrupt bits */
+#define INTCPS_NR_ILR_REGS	128
 #define INTCPS_NR_MIR_REGS	3
-#define INTCPS_NR_IRQS		96
 
 /*
  * OMAP2 has a number of different interrupt controllers, each interrupt
@@ -58,15 +58,6 @@
  * fairly consistent for each bank, but not all registers are implemented
  * for each bank.. when in doubt, consult the TRM.
  */
-static struct omap_irq_bank {
-	void __iomem *base_reg;
-	unsigned int nr_irqs;
-} __attribute__ ((aligned(4))) irq_banks[] = {
-	{
-		/* MPU INTC */
-		.nr_irqs	= 96,
-	},
-};
 
 static struct irq_domain *domain;
 static void __iomem *omap_irq_base;
@@ -78,7 +69,7 @@ struct omap3_intc_regs {
 	u32 protection;
 	u32 idle;
 	u32 threshold;
-	u32 ilr[INTCPS_NR_IRQS];
+	u32 ilr[INTCPS_NR_ILR_REGS];
 	u32 mir[INTCPS_NR_MIR_REGS];
 };
 
@@ -105,13 +96,14 @@ static void omap_mask_ack_irq(struct irq_data *d)
 	omap_ack_irq(d);
 }
 
-static void __init omap_irq_bank_init_one(struct omap_irq_bank *bank)
+static void __init omap_irq_soft_reset(void)
 {
 	unsigned long tmp;
 
 	tmp = intc_readl(INTC_REVISION) & 0xff;
+
 	pr_info("IRQ: Found an INTC at 0x%p (revision %ld.%ld) with %d interrupts\n",
-		bank->base_reg, tmp >> 4, tmp & 0xf, bank->nr_irqs);
+		omap_irq_base, tmp >> 4, tmp & 0xf, omap_nr_irqs);
 
 	tmp = intc_readl(INTC_SYSCONFIG);
 	tmp |= 1 << 1;	/* soft reset */
@@ -126,17 +118,12 @@ static void __init omap_irq_bank_init_one(struct omap_irq_bank *bank)
 
 int omap_irq_pending(void)
 {
-	int i;
+	int irq;
 
-	for (i = 0; i < ARRAY_SIZE(irq_banks); i++) {
-		struct omap_irq_bank *bank = irq_banks + i;
-		int irq;
-
-		for (irq = 0; irq < bank->nr_irqs; irq += 32)
-			if (intc_readl(INTC_PENDING_IRQ0 +
-					       ((irq >> 5) << 5)))
-				return 1;
-	}
+	for (irq = 0; irq < omap_nr_irqs; irq += 32)
+		if (intc_readl(INTC_PENDING_IRQ0 +
+					((irq >> 5) << 5)))
+			return 1;
 	return 0;
 }
 
@@ -163,9 +150,7 @@ omap_alloc_gc(void __iomem *base, unsigned int irq_start, unsigned int num)
 static void __init omap_init_irq(u32 base, int nr_irqs,
 				 struct device_node *node)
 {
-	unsigned long nr_of_irqs = 0;
-	unsigned int nr_banks = 0;
-	int i, j, irq_base;
+	int j, irq_base;
 
 	omap_irq_base = ioremap(base, SZ_4K);
 	if (WARN_ON(!omap_irq_base))
@@ -180,31 +165,12 @@ static void __init omap_init_irq(u32 base, int nr_irqs,
 	}
 
 	domain = irq_domain_add_legacy(node, nr_irqs, irq_base, 0,
-				       &irq_domain_simple_ops, NULL);
-
-	for (i = 0; i < ARRAY_SIZE(irq_banks); i++) {
-		struct omap_irq_bank *bank = irq_banks + i;
-
-		bank->nr_irqs = nr_irqs;
-
-		/* Static mapping, never released */
-		bank->base_reg = ioremap(base, SZ_4K);
-		if (!bank->base_reg) {
-			pr_err("Could not ioremap irq bank%i\n", i);
-			continue;
-		}
-
-		omap_irq_bank_init_one(bank);
+			&irq_domain_simple_ops, NULL);
 
-		for (j = 0; j < bank->nr_irqs; j += 32)
-			omap_alloc_gc(bank->base_reg + j, j + irq_base, 32);
+	omap_irq_soft_reset();
 
-		nr_of_irqs += bank->nr_irqs;
-		nr_banks++;
-	}
-
-	pr_info("Total of %ld interrupts on %d active controller%s\n",
-		nr_of_irqs, nr_banks, nr_banks > 1 ? "s" : "");
+	for (j = 0; j < omap_nr_irqs; j += 32)
+		omap_alloc_gc(omap_irq_base + j, j + irq_base, 32);
 }
 
 void __init omap2_init_irq(void)
@@ -295,45 +261,45 @@ void __init omap_intc_of_init(void)
 }
 
 #if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_SOC_AM33XX)
-static struct omap3_intc_regs intc_context[ARRAY_SIZE(irq_banks)];
+static struct omap3_intc_regs intc_context;
 
 void omap_intc_save_context(void)
 {
-	int ind = 0, i = 0;
-	for (ind = 0; ind < ARRAY_SIZE(irq_banks); ind++) {
-		intc_context[ind].sysconfig =
-			intc_readl(INTC_SYSCONFIG);
-		intc_context[ind].protection =
-			intc_readl(INTC_PROTECTION);
-		intc_context[ind].idle =
-			intc_readl(INTC_IDLE);
-		intc_context[ind].threshold =
-			intc_readl(INTC_THRESHOLD);
-		for (i = 0; i < INTCPS_NR_IRQS; i++)
-			intc_context[ind].ilr[i] =
-				intc_readl((INTC_ILR0 + 0x4 * i));
-		for (i = 0; i < INTCPS_NR_MIR_REGS; i++)
-			intc_context[ind].mir[i] =
-				intc_readl(INTC_MIR0 + (0x20 * i));
-	}
+	int i;
+
+	intc_context.sysconfig =
+		intc_readl(INTC_SYSCONFIG);
+	intc_context.protection =
+		intc_readl(INTC_PROTECTION);
+	intc_context.idle =
+		intc_readl(INTC_IDLE);
+	intc_context.threshold =
+		intc_readl(INTC_THRESHOLD);
+
+	for (i = 0; i < omap_nr_irqs; i++)
+		intc_context.ilr[i] =
+			intc_readl((INTC_ILR0 + 0x4 * i));
+	for (i = 0; i < INTCPS_NR_MIR_REGS; i++)
+		intc_context.mir[i] =
+			intc_readl(INTC_MIR0 + (0x20 * i));
 }
 
 void omap_intc_restore_context(void)
 {
-	int ind = 0, i = 0;
-
-	for (ind = 0; ind < ARRAY_SIZE(irq_banks); ind++) {
-		intc_writel(INTC_SYSCONFIG, intc_context[ind].sysconfig);
-		intc_writel(INTC_PROTECTION, intc_context[ind].protection);
-		intc_writel(INTC_IDLE, intc_context[ind].idle);
-		intc_writel(INTC_THRESHOLD, intc_context[ind].threshold);
-		for (i = 0; i < INTCPS_NR_IRQS; i++)
-			intc_writel(INTC_ILR0 + 0x4 * i,
-					intc_context[ind].ilr[i]);
-		for (i = 0; i < INTCPS_NR_MIR_REGS; i++)
-			intc_writel(INTC_MIR0 + 0x20 * i,
-				intc_context[ind].mir[i]);
-	}
+	int i;
+
+	intc_writel(INTC_SYSCONFIG, intc_context.sysconfig);
+	intc_writel(INTC_PROTECTION, intc_context.protection);
+	intc_writel(INTC_IDLE, intc_context.idle);
+	intc_writel(INTC_THRESHOLD, intc_context.threshold);
+
+	for (i = 0; i < omap_nr_irqs; i++)
+		intc_writel(INTC_ILR0 + 0x4 * i,
+				intc_context.ilr[i]);
+
+	for (i = 0; i < INTCPS_NR_MIR_REGS; i++)
+		intc_writel(INTC_MIR0 + 0x20 * i,
+			intc_context.mir[i]);
 	/* MIRs are saved and restore with other PRCM registers */
 }
 
-- 
1.8.4.GIT


^ permalink raw reply related	[flat|nested] 82+ messages in thread

* [RFT/RFC/PATCH 05/31] arm: omap: irq: remove rest of irq_banks usage
@ 2013-11-20 18:08   ` Felipe Balbi
  0 siblings, 0 replies; 82+ messages in thread
From: Felipe Balbi @ 2013-11-20 18:08 UTC (permalink / raw)
  To: linux-arm-kernel

now we can finally remove the pointless irq_banks
array.

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 arch/arm/mach-omap2/irq.c | 128 +++++++++++++++++-----------------------------
 1 file changed, 47 insertions(+), 81 deletions(-)

diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c
index f6d0d38..cfca775 100644
--- a/arch/arm/mach-omap2/irq.c
+++ b/arch/arm/mach-omap2/irq.c
@@ -49,8 +49,8 @@
 #define OMAP3_IRQ_BASE		OMAP2_L4_IO_ADDRESS(OMAP34XX_IC_BASE)
 #define INTCPS_SIR_IRQ_OFFSET	0x0040	/* omap2/3 active interrupt offset */
 #define ACTIVEIRQ_MASK		0x7f	/* omap2/3 active interrupt bits */
+#define INTCPS_NR_ILR_REGS	128
 #define INTCPS_NR_MIR_REGS	3
-#define INTCPS_NR_IRQS		96
 
 /*
  * OMAP2 has a number of different interrupt controllers, each interrupt
@@ -58,15 +58,6 @@
  * fairly consistent for each bank, but not all registers are implemented
  * for each bank.. when in doubt, consult the TRM.
  */
-static struct omap_irq_bank {
-	void __iomem *base_reg;
-	unsigned int nr_irqs;
-} __attribute__ ((aligned(4))) irq_banks[] = {
-	{
-		/* MPU INTC */
-		.nr_irqs	= 96,
-	},
-};
 
 static struct irq_domain *domain;
 static void __iomem *omap_irq_base;
@@ -78,7 +69,7 @@ struct omap3_intc_regs {
 	u32 protection;
 	u32 idle;
 	u32 threshold;
-	u32 ilr[INTCPS_NR_IRQS];
+	u32 ilr[INTCPS_NR_ILR_REGS];
 	u32 mir[INTCPS_NR_MIR_REGS];
 };
 
@@ -105,13 +96,14 @@ static void omap_mask_ack_irq(struct irq_data *d)
 	omap_ack_irq(d);
 }
 
-static void __init omap_irq_bank_init_one(struct omap_irq_bank *bank)
+static void __init omap_irq_soft_reset(void)
 {
 	unsigned long tmp;
 
 	tmp = intc_readl(INTC_REVISION) & 0xff;
+
 	pr_info("IRQ: Found an INTC at 0x%p (revision %ld.%ld) with %d interrupts\n",
-		bank->base_reg, tmp >> 4, tmp & 0xf, bank->nr_irqs);
+		omap_irq_base, tmp >> 4, tmp & 0xf, omap_nr_irqs);
 
 	tmp = intc_readl(INTC_SYSCONFIG);
 	tmp |= 1 << 1;	/* soft reset */
@@ -126,17 +118,12 @@ static void __init omap_irq_bank_init_one(struct omap_irq_bank *bank)
 
 int omap_irq_pending(void)
 {
-	int i;
+	int irq;
 
-	for (i = 0; i < ARRAY_SIZE(irq_banks); i++) {
-		struct omap_irq_bank *bank = irq_banks + i;
-		int irq;
-
-		for (irq = 0; irq < bank->nr_irqs; irq += 32)
-			if (intc_readl(INTC_PENDING_IRQ0 +
-					       ((irq >> 5) << 5)))
-				return 1;
-	}
+	for (irq = 0; irq < omap_nr_irqs; irq += 32)
+		if (intc_readl(INTC_PENDING_IRQ0 +
+					((irq >> 5) << 5)))
+			return 1;
 	return 0;
 }
 
@@ -163,9 +150,7 @@ omap_alloc_gc(void __iomem *base, unsigned int irq_start, unsigned int num)
 static void __init omap_init_irq(u32 base, int nr_irqs,
 				 struct device_node *node)
 {
-	unsigned long nr_of_irqs = 0;
-	unsigned int nr_banks = 0;
-	int i, j, irq_base;
+	int j, irq_base;
 
 	omap_irq_base = ioremap(base, SZ_4K);
 	if (WARN_ON(!omap_irq_base))
@@ -180,31 +165,12 @@ static void __init omap_init_irq(u32 base, int nr_irqs,
 	}
 
 	domain = irq_domain_add_legacy(node, nr_irqs, irq_base, 0,
-				       &irq_domain_simple_ops, NULL);
-
-	for (i = 0; i < ARRAY_SIZE(irq_banks); i++) {
-		struct omap_irq_bank *bank = irq_banks + i;
-
-		bank->nr_irqs = nr_irqs;
-
-		/* Static mapping, never released */
-		bank->base_reg = ioremap(base, SZ_4K);
-		if (!bank->base_reg) {
-			pr_err("Could not ioremap irq bank%i\n", i);
-			continue;
-		}
-
-		omap_irq_bank_init_one(bank);
+			&irq_domain_simple_ops, NULL);
 
-		for (j = 0; j < bank->nr_irqs; j += 32)
-			omap_alloc_gc(bank->base_reg + j, j + irq_base, 32);
+	omap_irq_soft_reset();
 
-		nr_of_irqs += bank->nr_irqs;
-		nr_banks++;
-	}
-
-	pr_info("Total of %ld interrupts on %d active controller%s\n",
-		nr_of_irqs, nr_banks, nr_banks > 1 ? "s" : "");
+	for (j = 0; j < omap_nr_irqs; j += 32)
+		omap_alloc_gc(omap_irq_base + j, j + irq_base, 32);
 }
 
 void __init omap2_init_irq(void)
@@ -295,45 +261,45 @@ void __init omap_intc_of_init(void)
 }
 
 #if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_SOC_AM33XX)
-static struct omap3_intc_regs intc_context[ARRAY_SIZE(irq_banks)];
+static struct omap3_intc_regs intc_context;
 
 void omap_intc_save_context(void)
 {
-	int ind = 0, i = 0;
-	for (ind = 0; ind < ARRAY_SIZE(irq_banks); ind++) {
-		intc_context[ind].sysconfig =
-			intc_readl(INTC_SYSCONFIG);
-		intc_context[ind].protection =
-			intc_readl(INTC_PROTECTION);
-		intc_context[ind].idle =
-			intc_readl(INTC_IDLE);
-		intc_context[ind].threshold =
-			intc_readl(INTC_THRESHOLD);
-		for (i = 0; i < INTCPS_NR_IRQS; i++)
-			intc_context[ind].ilr[i] =
-				intc_readl((INTC_ILR0 + 0x4 * i));
-		for (i = 0; i < INTCPS_NR_MIR_REGS; i++)
-			intc_context[ind].mir[i] =
-				intc_readl(INTC_MIR0 + (0x20 * i));
-	}
+	int i;
+
+	intc_context.sysconfig =
+		intc_readl(INTC_SYSCONFIG);
+	intc_context.protection =
+		intc_readl(INTC_PROTECTION);
+	intc_context.idle =
+		intc_readl(INTC_IDLE);
+	intc_context.threshold =
+		intc_readl(INTC_THRESHOLD);
+
+	for (i = 0; i < omap_nr_irqs; i++)
+		intc_context.ilr[i] =
+			intc_readl((INTC_ILR0 + 0x4 * i));
+	for (i = 0; i < INTCPS_NR_MIR_REGS; i++)
+		intc_context.mir[i] =
+			intc_readl(INTC_MIR0 + (0x20 * i));
 }
 
 void omap_intc_restore_context(void)
 {
-	int ind = 0, i = 0;
-
-	for (ind = 0; ind < ARRAY_SIZE(irq_banks); ind++) {
-		intc_writel(INTC_SYSCONFIG, intc_context[ind].sysconfig);
-		intc_writel(INTC_PROTECTION, intc_context[ind].protection);
-		intc_writel(INTC_IDLE, intc_context[ind].idle);
-		intc_writel(INTC_THRESHOLD, intc_context[ind].threshold);
-		for (i = 0; i < INTCPS_NR_IRQS; i++)
-			intc_writel(INTC_ILR0 + 0x4 * i,
-					intc_context[ind].ilr[i]);
-		for (i = 0; i < INTCPS_NR_MIR_REGS; i++)
-			intc_writel(INTC_MIR0 + 0x20 * i,
-				intc_context[ind].mir[i]);
-	}
+	int i;
+
+	intc_writel(INTC_SYSCONFIG, intc_context.sysconfig);
+	intc_writel(INTC_PROTECTION, intc_context.protection);
+	intc_writel(INTC_IDLE, intc_context.idle);
+	intc_writel(INTC_THRESHOLD, intc_context.threshold);
+
+	for (i = 0; i < omap_nr_irqs; i++)
+		intc_writel(INTC_ILR0 + 0x4 * i,
+				intc_context.ilr[i]);
+
+	for (i = 0; i < INTCPS_NR_MIR_REGS; i++)
+		intc_writel(INTC_MIR0 + 0x20 * i,
+			intc_context.mir[i]);
 	/* MIRs are saved and restore with other PRCM registers */
 }
 
-- 
1.8.4.GIT

^ permalink raw reply related	[flat|nested] 82+ messages in thread

* [RFT/RFC/PATCH 06/31] arm: omap: irq: remove unused macro
  2013-11-20 18:08 ` Felipe Balbi
@ 2013-11-20 18:08   ` Felipe Balbi
  -1 siblings, 0 replies; 82+ messages in thread
From: Felipe Balbi @ 2013-11-20 18:08 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Linux OMAP Mailing List, Linux ARM Kernel Mailing List, Felipe Balbi

no functional changes.

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 arch/arm/mach-omap2/irq.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c
index cfca775..0772a3db 100644
--- a/arch/arm/mach-omap2/irq.c
+++ b/arch/arm/mach-omap2/irq.c
@@ -42,8 +42,6 @@
 #define INTC_MIR_SET0		0x008c
 #define INTC_PENDING_IRQ0	0x0098
 #define INTC_ILR0		0x0100
-/* Number of IRQ state bits in each MIR register */
-#define IRQ_BITS_PER_REG	32
 
 #define OMAP2_IRQ_BASE		OMAP2_L4_IO_ADDRESS(OMAP24XX_IC_BASE)
 #define OMAP3_IRQ_BASE		OMAP2_L4_IO_ADDRESS(OMAP34XX_IC_BASE)
-- 
1.8.4.GIT


^ permalink raw reply related	[flat|nested] 82+ messages in thread

* [RFT/RFC/PATCH 06/31] arm: omap: irq: remove unused macro
@ 2013-11-20 18:08   ` Felipe Balbi
  0 siblings, 0 replies; 82+ messages in thread
From: Felipe Balbi @ 2013-11-20 18:08 UTC (permalink / raw)
  To: linux-arm-kernel

no functional changes.

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 arch/arm/mach-omap2/irq.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c
index cfca775..0772a3db 100644
--- a/arch/arm/mach-omap2/irq.c
+++ b/arch/arm/mach-omap2/irq.c
@@ -42,8 +42,6 @@
 #define INTC_MIR_SET0		0x008c
 #define INTC_PENDING_IRQ0	0x0098
 #define INTC_ILR0		0x0100
-/* Number of IRQ state bits in each MIR register */
-#define IRQ_BITS_PER_REG	32
 
 #define OMAP2_IRQ_BASE		OMAP2_L4_IO_ADDRESS(OMAP24XX_IC_BASE)
 #define OMAP3_IRQ_BASE		OMAP2_L4_IO_ADDRESS(OMAP34XX_IC_BASE)
-- 
1.8.4.GIT

^ permalink raw reply related	[flat|nested] 82+ messages in thread

* [RFT/RFC/PATCH 07/31] arm: omap: irq: switch over to intc_readl on omap_intc_handle_irq
  2013-11-20 18:08 ` Felipe Balbi
@ 2013-11-20 18:08   ` Felipe Balbi
  -1 siblings, 0 replies; 82+ messages in thread
From: Felipe Balbi @ 2013-11-20 18:08 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Linux OMAP Mailing List, Linux ARM Kernel Mailing List, Felipe Balbi

an almost blind conversion from readl_relaxed
to our newly introduced intc_readl().

While at that, also remove some hardcoded
register addresses.

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 arch/arm/mach-omap2/irq.c | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c
index 0772a3db..0fe790c 100644
--- a/arch/arm/mach-omap2/irq.c
+++ b/arch/arm/mach-omap2/irq.c
@@ -41,11 +41,13 @@
 #define INTC_MIR_CLEAR0		0x0088
 #define INTC_MIR_SET0		0x008c
 #define INTC_PENDING_IRQ0	0x0098
+#define INTC_PENDING_IRQ1	0x00b8
+#define INTC_PENDING_IRQ2	0x00d8
+#define INTC_PENDING_IRQ3	0x00f8
 #define INTC_ILR0		0x0100
 
 #define OMAP2_IRQ_BASE		OMAP2_L4_IO_ADDRESS(OMAP24XX_IC_BASE)
 #define OMAP3_IRQ_BASE		OMAP2_L4_IO_ADDRESS(OMAP34XX_IC_BASE)
-#define INTCPS_SIR_IRQ_OFFSET	0x0040	/* omap2/3 active interrupt offset */
 #define ACTIVEIRQ_MASK		0x7f	/* omap2/3 active interrupt bits */
 #define INTCPS_NR_ILR_REGS	128
 #define INTCPS_NR_MIR_REGS	3
@@ -191,26 +193,26 @@ static inline void omap_intc_handle_irq(void __iomem *base_addr, struct pt_regs
 	u32 irqnr;
 
 	do {
-		irqnr = readl_relaxed(base_addr + 0x98);
+		irqnr = intc_readl(INTC_PENDING_IRQ0);
 		if (irqnr)
 			goto out;
 
-		irqnr = readl_relaxed(base_addr + 0xb8);
+		irqnr = intc_readl(INTC_PENDING_IRQ1);
 		if (irqnr)
 			goto out;
 
-		irqnr = readl_relaxed(base_addr + 0xd8);
+		irqnr = intc_readl(INTC_PENDING_IRQ2);
 #if IS_ENABLED(CONFIG_SOC_TI81XX) || IS_ENABLED(CONFIG_SOC_AM33XX)
 		if (irqnr)
 			goto out;
-		irqnr = readl_relaxed(base_addr + 0xf8);
+		irqnr = intc_readl(INTC_PENDING_IRQ3);
 #endif
 
 out:
 		if (!irqnr)
 			break;
 
-		irqnr = readl_relaxed(base_addr + INTCPS_SIR_IRQ_OFFSET);
+		irqnr = intc_readl(INTC_SIR);
 		irqnr &= ACTIVEIRQ_MASK;
 
 		if (irqnr) {
-- 
1.8.4.GIT


^ permalink raw reply related	[flat|nested] 82+ messages in thread

* [RFT/RFC/PATCH 07/31] arm: omap: irq: switch over to intc_readl on omap_intc_handle_irq
@ 2013-11-20 18:08   ` Felipe Balbi
  0 siblings, 0 replies; 82+ messages in thread
From: Felipe Balbi @ 2013-11-20 18:08 UTC (permalink / raw)
  To: linux-arm-kernel

an almost blind conversion from readl_relaxed
to our newly introduced intc_readl().

While at that, also remove some hardcoded
register addresses.

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 arch/arm/mach-omap2/irq.c | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c
index 0772a3db..0fe790c 100644
--- a/arch/arm/mach-omap2/irq.c
+++ b/arch/arm/mach-omap2/irq.c
@@ -41,11 +41,13 @@
 #define INTC_MIR_CLEAR0		0x0088
 #define INTC_MIR_SET0		0x008c
 #define INTC_PENDING_IRQ0	0x0098
+#define INTC_PENDING_IRQ1	0x00b8
+#define INTC_PENDING_IRQ2	0x00d8
+#define INTC_PENDING_IRQ3	0x00f8
 #define INTC_ILR0		0x0100
 
 #define OMAP2_IRQ_BASE		OMAP2_L4_IO_ADDRESS(OMAP24XX_IC_BASE)
 #define OMAP3_IRQ_BASE		OMAP2_L4_IO_ADDRESS(OMAP34XX_IC_BASE)
-#define INTCPS_SIR_IRQ_OFFSET	0x0040	/* omap2/3 active interrupt offset */
 #define ACTIVEIRQ_MASK		0x7f	/* omap2/3 active interrupt bits */
 #define INTCPS_NR_ILR_REGS	128
 #define INTCPS_NR_MIR_REGS	3
@@ -191,26 +193,26 @@ static inline void omap_intc_handle_irq(void __iomem *base_addr, struct pt_regs
 	u32 irqnr;
 
 	do {
-		irqnr = readl_relaxed(base_addr + 0x98);
+		irqnr = intc_readl(INTC_PENDING_IRQ0);
 		if (irqnr)
 			goto out;
 
-		irqnr = readl_relaxed(base_addr + 0xb8);
+		irqnr = intc_readl(INTC_PENDING_IRQ1);
 		if (irqnr)
 			goto out;
 
-		irqnr = readl_relaxed(base_addr + 0xd8);
+		irqnr = intc_readl(INTC_PENDING_IRQ2);
 #if IS_ENABLED(CONFIG_SOC_TI81XX) || IS_ENABLED(CONFIG_SOC_AM33XX)
 		if (irqnr)
 			goto out;
-		irqnr = readl_relaxed(base_addr + 0xf8);
+		irqnr = intc_readl(INTC_PENDING_IRQ3);
 #endif
 
 out:
 		if (!irqnr)
 			break;
 
-		irqnr = readl_relaxed(base_addr + INTCPS_SIR_IRQ_OFFSET);
+		irqnr = intc_readl(INTC_SIR);
 		irqnr &= ACTIVEIRQ_MASK;
 
 		if (irqnr) {
-- 
1.8.4.GIT

^ permalink raw reply related	[flat|nested] 82+ messages in thread

* [RFT/RFC/PATCH 08/31] arm: omap: irq: remove unnecessary base_addr argument
  2013-11-20 18:08 ` Felipe Balbi
@ 2013-11-20 18:08   ` Felipe Balbi
  -1 siblings, 0 replies; 82+ messages in thread
From: Felipe Balbi @ 2013-11-20 18:08 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Linux OMAP Mailing List, Linux ARM Kernel Mailing List, Felipe Balbi

omap_intc_handle_irq now had an unnecessary
base_addr argument. Let's remove it and fix
all callers.

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 arch/arm/mach-omap2/irq.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c
index 0fe790c..ec97ade 100644
--- a/arch/arm/mach-omap2/irq.c
+++ b/arch/arm/mach-omap2/irq.c
@@ -46,8 +46,6 @@
 #define INTC_PENDING_IRQ3	0x00f8
 #define INTC_ILR0		0x0100
 
-#define OMAP2_IRQ_BASE		OMAP2_L4_IO_ADDRESS(OMAP24XX_IC_BASE)
-#define OMAP3_IRQ_BASE		OMAP2_L4_IO_ADDRESS(OMAP34XX_IC_BASE)
 #define ACTIVEIRQ_MASK		0x7f	/* omap2/3 active interrupt bits */
 #define INTCPS_NR_ILR_REGS	128
 #define INTCPS_NR_MIR_REGS	3
@@ -188,7 +186,7 @@ void __init ti81xx_init_irq(void)
 	omap_init_irq(OMAP34XX_IC_BASE, 128, NULL);
 }
 
-static inline void omap_intc_handle_irq(void __iomem *base_addr, struct pt_regs *regs)
+static inline void omap_intc_handle_irq(struct pt_regs *regs)
 {
 	u32 irqnr;
 
@@ -224,8 +222,7 @@ out:
 
 asmlinkage void __exception_irq_entry omap2_intc_handle_irq(struct pt_regs *regs)
 {
-	void __iomem *base_addr = OMAP2_IRQ_BASE;
-	omap_intc_handle_irq(base_addr, regs);
+	omap_intc_handle_irq(regs);
 }
 
 int __init intc_of_init(struct device_node *node,
@@ -326,7 +323,6 @@ void omap3_intc_resume_idle(void)
 
 asmlinkage void __exception_irq_entry omap3_intc_handle_irq(struct pt_regs *regs)
 {
-	void __iomem *base_addr = OMAP3_IRQ_BASE;
-	omap_intc_handle_irq(base_addr, regs);
+	omap_intc_handle_irq(regs);
 }
 #endif /* CONFIG_ARCH_OMAP3 */
-- 
1.8.4.GIT


^ permalink raw reply related	[flat|nested] 82+ messages in thread

* [RFT/RFC/PATCH 08/31] arm: omap: irq: remove unnecessary base_addr argument
@ 2013-11-20 18:08   ` Felipe Balbi
  0 siblings, 0 replies; 82+ messages in thread
From: Felipe Balbi @ 2013-11-20 18:08 UTC (permalink / raw)
  To: linux-arm-kernel

omap_intc_handle_irq now had an unnecessary
base_addr argument. Let's remove it and fix
all callers.

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 arch/arm/mach-omap2/irq.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c
index 0fe790c..ec97ade 100644
--- a/arch/arm/mach-omap2/irq.c
+++ b/arch/arm/mach-omap2/irq.c
@@ -46,8 +46,6 @@
 #define INTC_PENDING_IRQ3	0x00f8
 #define INTC_ILR0		0x0100
 
-#define OMAP2_IRQ_BASE		OMAP2_L4_IO_ADDRESS(OMAP24XX_IC_BASE)
-#define OMAP3_IRQ_BASE		OMAP2_L4_IO_ADDRESS(OMAP34XX_IC_BASE)
 #define ACTIVEIRQ_MASK		0x7f	/* omap2/3 active interrupt bits */
 #define INTCPS_NR_ILR_REGS	128
 #define INTCPS_NR_MIR_REGS	3
@@ -188,7 +186,7 @@ void __init ti81xx_init_irq(void)
 	omap_init_irq(OMAP34XX_IC_BASE, 128, NULL);
 }
 
-static inline void omap_intc_handle_irq(void __iomem *base_addr, struct pt_regs *regs)
+static inline void omap_intc_handle_irq(struct pt_regs *regs)
 {
 	u32 irqnr;
 
@@ -224,8 +222,7 @@ out:
 
 asmlinkage void __exception_irq_entry omap2_intc_handle_irq(struct pt_regs *regs)
 {
-	void __iomem *base_addr = OMAP2_IRQ_BASE;
-	omap_intc_handle_irq(base_addr, regs);
+	omap_intc_handle_irq(regs);
 }
 
 int __init intc_of_init(struct device_node *node,
@@ -326,7 +323,6 @@ void omap3_intc_resume_idle(void)
 
 asmlinkage void __exception_irq_entry omap3_intc_handle_irq(struct pt_regs *regs)
 {
-	void __iomem *base_addr = OMAP3_IRQ_BASE;
-	omap_intc_handle_irq(base_addr, regs);
+	omap_intc_handle_irq(regs);
 }
 #endif /* CONFIG_ARCH_OMAP3 */
-- 
1.8.4.GIT

^ permalink raw reply related	[flat|nested] 82+ messages in thread

* [RFT/RFC/PATCH 09/31] arm: omap: irq: rename omap3_intc_regs
  2013-11-20 18:08 ` Felipe Balbi
@ 2013-11-20 18:08   ` Felipe Balbi
  -1 siblings, 0 replies; 82+ messages in thread
From: Felipe Balbi @ 2013-11-20 18:08 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Linux OMAP Mailing List, Linux ARM Kernel Mailing List, Felipe Balbi

just to make it clearer that it can
be used on all omaps.

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 arch/arm/mach-omap2/irq.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c
index ec97ade..52386e7 100644
--- a/arch/arm/mach-omap2/irq.c
+++ b/arch/arm/mach-omap2/irq.c
@@ -62,7 +62,7 @@ static void __iomem *omap_irq_base;
 static int omap_nr_irqs = 96;
 
 /* Structure to save interrupt controller context */
-struct omap3_intc_regs {
+struct omap_intc_regs {
 	u32 sysconfig;
 	u32 protection;
 	u32 idle;
@@ -258,7 +258,7 @@ void __init omap_intc_of_init(void)
 }
 
 #if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_SOC_AM33XX)
-static struct omap3_intc_regs intc_context;
+static struct omap_intc_regs intc_context;
 
 void omap_intc_save_context(void)
 {
-- 
1.8.4.GIT


^ permalink raw reply related	[flat|nested] 82+ messages in thread

* [RFT/RFC/PATCH 09/31] arm: omap: irq: rename omap3_intc_regs
@ 2013-11-20 18:08   ` Felipe Balbi
  0 siblings, 0 replies; 82+ messages in thread
From: Felipe Balbi @ 2013-11-20 18:08 UTC (permalink / raw)
  To: linux-arm-kernel

just to make it clearer that it can
be used on all omaps.

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 arch/arm/mach-omap2/irq.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c
index ec97ade..52386e7 100644
--- a/arch/arm/mach-omap2/irq.c
+++ b/arch/arm/mach-omap2/irq.c
@@ -62,7 +62,7 @@ static void __iomem *omap_irq_base;
 static int omap_nr_irqs = 96;
 
 /* Structure to save interrupt controller context */
-struct omap3_intc_regs {
+struct omap_intc_regs {
 	u32 sysconfig;
 	u32 protection;
 	u32 idle;
@@ -258,7 +258,7 @@ void __init omap_intc_of_init(void)
 }
 
 #if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_SOC_AM33XX)
-static struct omap3_intc_regs intc_context;
+static struct omap_intc_regs intc_context;
 
 void omap_intc_save_context(void)
 {
-- 
1.8.4.GIT

^ permalink raw reply related	[flat|nested] 82+ messages in thread

* [RFT/RFC/PATCH 10/31] arm: omap: irq: always define omap3 support
  2013-11-20 18:08 ` Felipe Balbi
@ 2013-11-20 18:08   ` Felipe Balbi
  -1 siblings, 0 replies; 82+ messages in thread
From: Felipe Balbi @ 2013-11-20 18:08 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Linux OMAP Mailing List, Linux ARM Kernel Mailing List, Felipe Balbi

remove ifdef around omap3 INTC support. This
will make it easier to reuse code for PM.

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 arch/arm/mach-omap2/irq.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c
index 52386e7..b586317 100644
--- a/arch/arm/mach-omap2/irq.c
+++ b/arch/arm/mach-omap2/irq.c
@@ -257,7 +257,6 @@ void __init omap_intc_of_init(void)
 	of_irq_init(irq_match);
 }
 
-#if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_SOC_AM33XX)
 static struct omap_intc_regs intc_context;
 
 void omap_intc_save_context(void)
@@ -325,4 +324,3 @@ asmlinkage void __exception_irq_entry omap3_intc_handle_irq(struct pt_regs *regs
 {
 	omap_intc_handle_irq(regs);
 }
-#endif /* CONFIG_ARCH_OMAP3 */
-- 
1.8.4.GIT


^ permalink raw reply related	[flat|nested] 82+ messages in thread

* [RFT/RFC/PATCH 10/31] arm: omap: irq: always define omap3 support
@ 2013-11-20 18:08   ` Felipe Balbi
  0 siblings, 0 replies; 82+ messages in thread
From: Felipe Balbi @ 2013-11-20 18:08 UTC (permalink / raw)
  To: linux-arm-kernel

remove ifdef around omap3 INTC support. This
will make it easier to reuse code for PM.

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 arch/arm/mach-omap2/irq.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c
index 52386e7..b586317 100644
--- a/arch/arm/mach-omap2/irq.c
+++ b/arch/arm/mach-omap2/irq.c
@@ -257,7 +257,6 @@ void __init omap_intc_of_init(void)
 	of_irq_init(irq_match);
 }
 
-#if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_SOC_AM33XX)
 static struct omap_intc_regs intc_context;
 
 void omap_intc_save_context(void)
@@ -325,4 +324,3 @@ asmlinkage void __exception_irq_entry omap3_intc_handle_irq(struct pt_regs *regs
 {
 	omap_intc_handle_irq(regs);
 }
-#endif /* CONFIG_ARCH_OMAP3 */
-- 
1.8.4.GIT

^ permalink raw reply related	[flat|nested] 82+ messages in thread

* [RFT/RFC/PATCH 11/31] arm: omap: irq: reorganize code a little bit
  2013-11-20 18:08 ` Felipe Balbi
@ 2013-11-20 18:08   ` Felipe Balbi
  -1 siblings, 0 replies; 82+ messages in thread
From: Felipe Balbi @ 2013-11-20 18:08 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Linux OMAP Mailing List, Linux ARM Kernel Mailing List, Felipe Balbi

no functional changes, just moving code around.

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 arch/arm/mach-omap2/irq.c | 133 +++++++++++++++++++++++-----------------------
 1 file changed, 66 insertions(+), 67 deletions(-)

diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c
index b586317..45c5acc 100644
--- a/arch/arm/mach-omap2/irq.c
+++ b/arch/arm/mach-omap2/irq.c
@@ -57,10 +57,6 @@
  * for each bank.. when in doubt, consult the TRM.
  */
 
-static struct irq_domain *domain;
-static void __iomem *omap_irq_base;
-static int omap_nr_irqs = 96;
-
 /* Structure to save interrupt controller context */
 struct omap_intc_regs {
 	u32 sysconfig;
@@ -70,6 +66,11 @@ struct omap_intc_regs {
 	u32 ilr[INTCPS_NR_ILR_REGS];
 	u32 mir[INTCPS_NR_MIR_REGS];
 };
+static struct omap_intc_regs intc_context;
+
+static struct irq_domain *domain;
+static void __iomem *omap_irq_base;
+static int omap_nr_irqs = 96;
 
 /* INTC bank register get/set */
 static void intc_writel(u32 reg, u32 val)
@@ -82,6 +83,61 @@ static u32 intc_readl(u32 reg)
 	return readl_relaxed(omap_irq_base + reg);
 }
 
+void omap_intc_save_context(void)
+{
+	int i;
+
+	intc_context.sysconfig =
+		intc_readl(INTC_SYSCONFIG);
+	intc_context.protection =
+		intc_readl(INTC_PROTECTION);
+	intc_context.idle =
+		intc_readl(INTC_IDLE);
+	intc_context.threshold =
+		intc_readl(INTC_THRESHOLD);
+
+	for (i = 0; i < omap_nr_irqs; i++)
+		intc_context.ilr[i] =
+			intc_readl((INTC_ILR0 + 0x4 * i));
+	for (i = 0; i < INTCPS_NR_MIR_REGS; i++)
+		intc_context.mir[i] =
+			intc_readl(INTC_MIR0 + (0x20 * i));
+}
+
+void omap_intc_restore_context(void)
+{
+	int i;
+
+	intc_writel(INTC_SYSCONFIG, intc_context.sysconfig);
+	intc_writel(INTC_PROTECTION, intc_context.protection);
+	intc_writel(INTC_IDLE, intc_context.idle);
+	intc_writel(INTC_THRESHOLD, intc_context.threshold);
+
+	for (i = 0; i < omap_nr_irqs; i++)
+		intc_writel(INTC_ILR0 + 0x4 * i,
+				intc_context.ilr[i]);
+
+	for (i = 0; i < INTCPS_NR_MIR_REGS; i++)
+		intc_writel(INTC_MIR0 + 0x20 * i,
+			intc_context.mir[i]);
+	/* MIRs are saved and restore with other PRCM registers */
+}
+
+void omap3_intc_prepare_idle(void)
+{
+	/*
+	 * Disable autoidle as it can stall interrupt controller,
+	 * cf. errata ID i540 for 3430 (all revisions up to 3.1.x)
+	 */
+	intc_writel(INTC_SYSCONFIG, 0);
+}
+
+void omap3_intc_resume_idle(void)
+{
+	/* Re-enable autoidle */
+	intc_writel(INTC_SYSCONFIG, 1);
+}
+
 /* XXX: FIQ and additional INTC support (only MPU at the moment) */
 static void omap_ack_irq(struct irq_data *d)
 {
@@ -125,6 +181,12 @@ int omap_irq_pending(void)
 	return 0;
 }
 
+void omap3_intc_suspend(void)
+{
+	/* A pending interrupt would prevent OMAP from entering suspend */
+	omap_ack_irq(NULL);
+}
+
 static __init void
 omap_alloc_gc(void __iomem *base, unsigned int irq_start, unsigned int num)
 {
@@ -257,69 +319,6 @@ void __init omap_intc_of_init(void)
 	of_irq_init(irq_match);
 }
 
-static struct omap_intc_regs intc_context;
-
-void omap_intc_save_context(void)
-{
-	int i;
-
-	intc_context.sysconfig =
-		intc_readl(INTC_SYSCONFIG);
-	intc_context.protection =
-		intc_readl(INTC_PROTECTION);
-	intc_context.idle =
-		intc_readl(INTC_IDLE);
-	intc_context.threshold =
-		intc_readl(INTC_THRESHOLD);
-
-	for (i = 0; i < omap_nr_irqs; i++)
-		intc_context.ilr[i] =
-			intc_readl((INTC_ILR0 + 0x4 * i));
-	for (i = 0; i < INTCPS_NR_MIR_REGS; i++)
-		intc_context.mir[i] =
-			intc_readl(INTC_MIR0 + (0x20 * i));
-}
-
-void omap_intc_restore_context(void)
-{
-	int i;
-
-	intc_writel(INTC_SYSCONFIG, intc_context.sysconfig);
-	intc_writel(INTC_PROTECTION, intc_context.protection);
-	intc_writel(INTC_IDLE, intc_context.idle);
-	intc_writel(INTC_THRESHOLD, intc_context.threshold);
-
-	for (i = 0; i < omap_nr_irqs; i++)
-		intc_writel(INTC_ILR0 + 0x4 * i,
-				intc_context.ilr[i]);
-
-	for (i = 0; i < INTCPS_NR_MIR_REGS; i++)
-		intc_writel(INTC_MIR0 + 0x20 * i,
-			intc_context.mir[i]);
-	/* MIRs are saved and restore with other PRCM registers */
-}
-
-void omap3_intc_suspend(void)
-{
-	/* A pending interrupt would prevent OMAP from entering suspend */
-	omap_ack_irq(NULL);
-}
-
-void omap3_intc_prepare_idle(void)
-{
-	/*
-	 * Disable autoidle as it can stall interrupt controller,
-	 * cf. errata ID i540 for 3430 (all revisions up to 3.1.x)
-	 */
-	intc_writel(INTC_SYSCONFIG, 0);
-}
-
-void omap3_intc_resume_idle(void)
-{
-	/* Re-enable autoidle */
-	intc_writel(INTC_SYSCONFIG, 1);
-}
-
 asmlinkage void __exception_irq_entry omap3_intc_handle_irq(struct pt_regs *regs)
 {
 	omap_intc_handle_irq(regs);
-- 
1.8.4.GIT


^ permalink raw reply related	[flat|nested] 82+ messages in thread

* [RFT/RFC/PATCH 11/31] arm: omap: irq: reorganize code a little bit
@ 2013-11-20 18:08   ` Felipe Balbi
  0 siblings, 0 replies; 82+ messages in thread
From: Felipe Balbi @ 2013-11-20 18:08 UTC (permalink / raw)
  To: linux-arm-kernel

no functional changes, just moving code around.

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 arch/arm/mach-omap2/irq.c | 133 +++++++++++++++++++++++-----------------------
 1 file changed, 66 insertions(+), 67 deletions(-)

diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c
index b586317..45c5acc 100644
--- a/arch/arm/mach-omap2/irq.c
+++ b/arch/arm/mach-omap2/irq.c
@@ -57,10 +57,6 @@
  * for each bank.. when in doubt, consult the TRM.
  */
 
-static struct irq_domain *domain;
-static void __iomem *omap_irq_base;
-static int omap_nr_irqs = 96;
-
 /* Structure to save interrupt controller context */
 struct omap_intc_regs {
 	u32 sysconfig;
@@ -70,6 +66,11 @@ struct omap_intc_regs {
 	u32 ilr[INTCPS_NR_ILR_REGS];
 	u32 mir[INTCPS_NR_MIR_REGS];
 };
+static struct omap_intc_regs intc_context;
+
+static struct irq_domain *domain;
+static void __iomem *omap_irq_base;
+static int omap_nr_irqs = 96;
 
 /* INTC bank register get/set */
 static void intc_writel(u32 reg, u32 val)
@@ -82,6 +83,61 @@ static u32 intc_readl(u32 reg)
 	return readl_relaxed(omap_irq_base + reg);
 }
 
+void omap_intc_save_context(void)
+{
+	int i;
+
+	intc_context.sysconfig =
+		intc_readl(INTC_SYSCONFIG);
+	intc_context.protection =
+		intc_readl(INTC_PROTECTION);
+	intc_context.idle =
+		intc_readl(INTC_IDLE);
+	intc_context.threshold =
+		intc_readl(INTC_THRESHOLD);
+
+	for (i = 0; i < omap_nr_irqs; i++)
+		intc_context.ilr[i] =
+			intc_readl((INTC_ILR0 + 0x4 * i));
+	for (i = 0; i < INTCPS_NR_MIR_REGS; i++)
+		intc_context.mir[i] =
+			intc_readl(INTC_MIR0 + (0x20 * i));
+}
+
+void omap_intc_restore_context(void)
+{
+	int i;
+
+	intc_writel(INTC_SYSCONFIG, intc_context.sysconfig);
+	intc_writel(INTC_PROTECTION, intc_context.protection);
+	intc_writel(INTC_IDLE, intc_context.idle);
+	intc_writel(INTC_THRESHOLD, intc_context.threshold);
+
+	for (i = 0; i < omap_nr_irqs; i++)
+		intc_writel(INTC_ILR0 + 0x4 * i,
+				intc_context.ilr[i]);
+
+	for (i = 0; i < INTCPS_NR_MIR_REGS; i++)
+		intc_writel(INTC_MIR0 + 0x20 * i,
+			intc_context.mir[i]);
+	/* MIRs are saved and restore with other PRCM registers */
+}
+
+void omap3_intc_prepare_idle(void)
+{
+	/*
+	 * Disable autoidle as it can stall interrupt controller,
+	 * cf. errata ID i540 for 3430 (all revisions up to 3.1.x)
+	 */
+	intc_writel(INTC_SYSCONFIG, 0);
+}
+
+void omap3_intc_resume_idle(void)
+{
+	/* Re-enable autoidle */
+	intc_writel(INTC_SYSCONFIG, 1);
+}
+
 /* XXX: FIQ and additional INTC support (only MPU@the moment) */
 static void omap_ack_irq(struct irq_data *d)
 {
@@ -125,6 +181,12 @@ int omap_irq_pending(void)
 	return 0;
 }
 
+void omap3_intc_suspend(void)
+{
+	/* A pending interrupt would prevent OMAP from entering suspend */
+	omap_ack_irq(NULL);
+}
+
 static __init void
 omap_alloc_gc(void __iomem *base, unsigned int irq_start, unsigned int num)
 {
@@ -257,69 +319,6 @@ void __init omap_intc_of_init(void)
 	of_irq_init(irq_match);
 }
 
-static struct omap_intc_regs intc_context;
-
-void omap_intc_save_context(void)
-{
-	int i;
-
-	intc_context.sysconfig =
-		intc_readl(INTC_SYSCONFIG);
-	intc_context.protection =
-		intc_readl(INTC_PROTECTION);
-	intc_context.idle =
-		intc_readl(INTC_IDLE);
-	intc_context.threshold =
-		intc_readl(INTC_THRESHOLD);
-
-	for (i = 0; i < omap_nr_irqs; i++)
-		intc_context.ilr[i] =
-			intc_readl((INTC_ILR0 + 0x4 * i));
-	for (i = 0; i < INTCPS_NR_MIR_REGS; i++)
-		intc_context.mir[i] =
-			intc_readl(INTC_MIR0 + (0x20 * i));
-}
-
-void omap_intc_restore_context(void)
-{
-	int i;
-
-	intc_writel(INTC_SYSCONFIG, intc_context.sysconfig);
-	intc_writel(INTC_PROTECTION, intc_context.protection);
-	intc_writel(INTC_IDLE, intc_context.idle);
-	intc_writel(INTC_THRESHOLD, intc_context.threshold);
-
-	for (i = 0; i < omap_nr_irqs; i++)
-		intc_writel(INTC_ILR0 + 0x4 * i,
-				intc_context.ilr[i]);
-
-	for (i = 0; i < INTCPS_NR_MIR_REGS; i++)
-		intc_writel(INTC_MIR0 + 0x20 * i,
-			intc_context.mir[i]);
-	/* MIRs are saved and restore with other PRCM registers */
-}
-
-void omap3_intc_suspend(void)
-{
-	/* A pending interrupt would prevent OMAP from entering suspend */
-	omap_ack_irq(NULL);
-}
-
-void omap3_intc_prepare_idle(void)
-{
-	/*
-	 * Disable autoidle as it can stall interrupt controller,
-	 * cf. errata ID i540 for 3430 (all revisions up to 3.1.x)
-	 */
-	intc_writel(INTC_SYSCONFIG, 0);
-}
-
-void omap3_intc_resume_idle(void)
-{
-	/* Re-enable autoidle */
-	intc_writel(INTC_SYSCONFIG, 1);
-}
-
 asmlinkage void __exception_irq_entry omap3_intc_handle_irq(struct pt_regs *regs)
 {
 	omap_intc_handle_irq(regs);
-- 
1.8.4.GIT

^ permalink raw reply related	[flat|nested] 82+ messages in thread

* [RFT/RFC/PATCH 12/31] arm: omap: irq: add suspend/resume methods
  2013-11-20 18:08 ` Felipe Balbi
@ 2013-11-20 18:08   ` Felipe Balbi
  -1 siblings, 0 replies; 82+ messages in thread
From: Felipe Balbi @ 2013-11-20 18:08 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Linux OMAP Mailing List, Linux ARM Kernel Mailing List, Felipe Balbi

there is a generic way to suspend/resume irqchips,
let's use that instead of our homebrew version.

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 arch/arm/mach-omap2/irq.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c
index 45c5acc..6dfa6cf 100644
--- a/arch/arm/mach-omap2/irq.c
+++ b/arch/arm/mach-omap2/irq.c
@@ -150,6 +150,18 @@ static void omap_mask_ack_irq(struct irq_data *d)
 	omap_ack_irq(d);
 }
 
+static void omap_suspend_irq(struct irq_data *d)
+{
+	omap3_intc_prepare_idle();
+	omap_intc_save_context();
+}
+
+static void omap_resume_irq(struct irq_data *d)
+{
+	omap_intc_restore_context();
+	omap3_intc_resume_idle();
+}
+
 static void __init omap_irq_soft_reset(void)
 {
 	unsigned long tmp;
@@ -199,6 +211,8 @@ omap_alloc_gc(void __iomem *base, unsigned int irq_start, unsigned int num)
 	ct->chip.irq_ack = omap_mask_ack_irq;
 	ct->chip.irq_mask = irq_gc_mask_disable_reg;
 	ct->chip.irq_unmask = irq_gc_unmask_enable_reg;
+	ct->chip.irq_suspend = omap_suspend_irq;
+	ct->chip.irq_resume = omap_resume_irq;
 	ct->chip.flags |= IRQCHIP_SKIP_SET_WAKE;
 
 	ct->regs.enable = INTC_MIR_CLEAR0;
-- 
1.8.4.GIT


^ permalink raw reply related	[flat|nested] 82+ messages in thread

* [RFT/RFC/PATCH 12/31] arm: omap: irq: add suspend/resume methods
@ 2013-11-20 18:08   ` Felipe Balbi
  0 siblings, 0 replies; 82+ messages in thread
From: Felipe Balbi @ 2013-11-20 18:08 UTC (permalink / raw)
  To: linux-arm-kernel

there is a generic way to suspend/resume irqchips,
let's use that instead of our homebrew version.

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 arch/arm/mach-omap2/irq.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c
index 45c5acc..6dfa6cf 100644
--- a/arch/arm/mach-omap2/irq.c
+++ b/arch/arm/mach-omap2/irq.c
@@ -150,6 +150,18 @@ static void omap_mask_ack_irq(struct irq_data *d)
 	omap_ack_irq(d);
 }
 
+static void omap_suspend_irq(struct irq_data *d)
+{
+	omap3_intc_prepare_idle();
+	omap_intc_save_context();
+}
+
+static void omap_resume_irq(struct irq_data *d)
+{
+	omap_intc_restore_context();
+	omap3_intc_resume_idle();
+}
+
 static void __init omap_irq_soft_reset(void)
 {
 	unsigned long tmp;
@@ -199,6 +211,8 @@ omap_alloc_gc(void __iomem *base, unsigned int irq_start, unsigned int num)
 	ct->chip.irq_ack = omap_mask_ack_irq;
 	ct->chip.irq_mask = irq_gc_mask_disable_reg;
 	ct->chip.irq_unmask = irq_gc_unmask_enable_reg;
+	ct->chip.irq_suspend = omap_suspend_irq;
+	ct->chip.irq_resume = omap_resume_irq;
 	ct->chip.flags |= IRQCHIP_SKIP_SET_WAKE;
 
 	ct->regs.enable = INTC_MIR_CLEAR0;
-- 
1.8.4.GIT

^ permalink raw reply related	[flat|nested] 82+ messages in thread

* [RFT/RFC/PATCH 13/31] arm: omap: irq: remove last bits of our homebrew irqchip pm
  2013-11-20 18:08 ` Felipe Balbi
@ 2013-11-20 18:09   ` Felipe Balbi
  -1 siblings, 0 replies; 82+ messages in thread
From: Felipe Balbi @ 2013-11-20 18:09 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Linux OMAP Mailing List, Linux ARM Kernel Mailing List, Felipe Balbi

completely move towards generic irqchip PM.

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 arch/arm/mach-omap2/common.h |  5 -----
 arch/arm/mach-omap2/irq.c    | 21 +++++++++------------
 arch/arm/mach-omap2/pm34xx.c | 10 ----------
 3 files changed, 9 insertions(+), 27 deletions(-)

diff --git a/arch/arm/mach-omap2/common.h b/arch/arm/mach-omap2/common.h
index f7644fe..4d90328 100644
--- a/arch/arm/mach-omap2/common.h
+++ b/arch/arm/mach-omap2/common.h
@@ -199,11 +199,6 @@ void omap2_init_irq(void);
 void omap3_init_irq(void);
 void ti81xx_init_irq(void);
 extern int omap_irq_pending(void);
-void omap_intc_save_context(void);
-void omap_intc_restore_context(void);
-void omap3_intc_suspend(void);
-void omap3_intc_prepare_idle(void);
-void omap3_intc_resume_idle(void);
 void omap2_intc_handle_irq(struct pt_regs *regs);
 void omap3_intc_handle_irq(struct pt_regs *regs);
 void omap_intc_of_init(void);
diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c
index 6dfa6cf..f290f16 100644
--- a/arch/arm/mach-omap2/irq.c
+++ b/arch/arm/mach-omap2/irq.c
@@ -83,7 +83,7 @@ static u32 intc_readl(u32 reg)
 	return readl_relaxed(omap_irq_base + reg);
 }
 
-void omap_intc_save_context(void)
+static void omap_intc_save_context(void)
 {
 	int i;
 
@@ -104,7 +104,7 @@ void omap_intc_save_context(void)
 			intc_readl(INTC_MIR0 + (0x20 * i));
 }
 
-void omap_intc_restore_context(void)
+static void omap_intc_restore_context(void)
 {
 	int i;
 
@@ -123,7 +123,7 @@ void omap_intc_restore_context(void)
 	/* MIRs are saved and restore with other PRCM registers */
 }
 
-void omap3_intc_prepare_idle(void)
+static void omap_intc_prepare_idle(void)
 {
 	/*
 	 * Disable autoidle as it can stall interrupt controller,
@@ -132,7 +132,7 @@ void omap3_intc_prepare_idle(void)
 	intc_writel(INTC_SYSCONFIG, 0);
 }
 
-void omap3_intc_resume_idle(void)
+static void omap_intc_resume_idle(void)
 {
 	/* Re-enable autoidle */
 	intc_writel(INTC_SYSCONFIG, 1);
@@ -152,14 +152,17 @@ static void omap_mask_ack_irq(struct irq_data *d)
 
 static void omap_suspend_irq(struct irq_data *d)
 {
-	omap3_intc_prepare_idle();
+	omap_intc_prepare_idle();
 	omap_intc_save_context();
+
+	/* A pending interrupt would prevent OMAP from entering suspend */
+	omap_ack_irq(NULL);
 }
 
 static void omap_resume_irq(struct irq_data *d)
 {
 	omap_intc_restore_context();
-	omap3_intc_resume_idle();
+	omap_intc_resume_idle();
 }
 
 static void __init omap_irq_soft_reset(void)
@@ -193,12 +196,6 @@ int omap_irq_pending(void)
 	return 0;
 }
 
-void omap3_intc_suspend(void)
-{
-	/* A pending interrupt would prevent OMAP from entering suspend */
-	omap_ack_irq(NULL);
-}
-
 static __init void
 omap_alloc_gc(void __iomem *base, unsigned int irq_start, unsigned int num)
 {
diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
index 93b80e5..2764796 100644
--- a/arch/arm/mach-omap2/pm34xx.c
+++ b/arch/arm/mach-omap2/pm34xx.c
@@ -82,8 +82,6 @@ static void omap3_core_save_context(void)
 	omap_ctrl_writel(omap_ctrl_readl(OMAP343X_PADCONF_ETK_D14),
 		OMAP343X_CONTROL_MEM_WKUP + 0x2a0);
 
-	/* Save the Interrupt controller context */
-	omap_intc_save_context();
 	/* Save the GPMC context */
 	omap3_gpmc_save_context();
 	/* Save the system control module context, padconf already save above*/
@@ -97,8 +95,6 @@ static void omap3_core_restore_context(void)
 	omap3_control_restore_context();
 	/* Restore the GPMC context */
 	omap3_gpmc_restore_context();
-	/* Restore the interrupt controller context */
-	omap_intc_restore_context();
 	omap_dma_global_context_restore();
 }
 
@@ -288,8 +284,6 @@ void omap_sram_idle(void)
 		}
 	}
 
-	omap3_intc_prepare_idle();
-
 	/*
 	 * On EMU/HS devices ROM code restores a SRDC value
 	 * from scratchpad which has automatic self refresh on timeout
@@ -335,8 +329,6 @@ void omap_sram_idle(void)
 					       OMAP3430_GR_MOD,
 					       OMAP3_PRM_VOLTCTRL_OFFSET);
 	}
-	omap3_intc_resume_idle();
-
 	pwrdm_post_transition(NULL);
 
 	/* PER */
@@ -373,8 +365,6 @@ static int omap3_pm_suspend(void)
 			goto restore;
 	}
 
-	omap3_intc_suspend();
-
 	omap_sram_idle();
 
 restore:
-- 
1.8.4.GIT


^ permalink raw reply related	[flat|nested] 82+ messages in thread

* [RFT/RFC/PATCH 13/31] arm: omap: irq: remove last bits of our homebrew irqchip pm
@ 2013-11-20 18:09   ` Felipe Balbi
  0 siblings, 0 replies; 82+ messages in thread
From: Felipe Balbi @ 2013-11-20 18:09 UTC (permalink / raw)
  To: linux-arm-kernel

completely move towards generic irqchip PM.

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 arch/arm/mach-omap2/common.h |  5 -----
 arch/arm/mach-omap2/irq.c    | 21 +++++++++------------
 arch/arm/mach-omap2/pm34xx.c | 10 ----------
 3 files changed, 9 insertions(+), 27 deletions(-)

diff --git a/arch/arm/mach-omap2/common.h b/arch/arm/mach-omap2/common.h
index f7644fe..4d90328 100644
--- a/arch/arm/mach-omap2/common.h
+++ b/arch/arm/mach-omap2/common.h
@@ -199,11 +199,6 @@ void omap2_init_irq(void);
 void omap3_init_irq(void);
 void ti81xx_init_irq(void);
 extern int omap_irq_pending(void);
-void omap_intc_save_context(void);
-void omap_intc_restore_context(void);
-void omap3_intc_suspend(void);
-void omap3_intc_prepare_idle(void);
-void omap3_intc_resume_idle(void);
 void omap2_intc_handle_irq(struct pt_regs *regs);
 void omap3_intc_handle_irq(struct pt_regs *regs);
 void omap_intc_of_init(void);
diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c
index 6dfa6cf..f290f16 100644
--- a/arch/arm/mach-omap2/irq.c
+++ b/arch/arm/mach-omap2/irq.c
@@ -83,7 +83,7 @@ static u32 intc_readl(u32 reg)
 	return readl_relaxed(omap_irq_base + reg);
 }
 
-void omap_intc_save_context(void)
+static void omap_intc_save_context(void)
 {
 	int i;
 
@@ -104,7 +104,7 @@ void omap_intc_save_context(void)
 			intc_readl(INTC_MIR0 + (0x20 * i));
 }
 
-void omap_intc_restore_context(void)
+static void omap_intc_restore_context(void)
 {
 	int i;
 
@@ -123,7 +123,7 @@ void omap_intc_restore_context(void)
 	/* MIRs are saved and restore with other PRCM registers */
 }
 
-void omap3_intc_prepare_idle(void)
+static void omap_intc_prepare_idle(void)
 {
 	/*
 	 * Disable autoidle as it can stall interrupt controller,
@@ -132,7 +132,7 @@ void omap3_intc_prepare_idle(void)
 	intc_writel(INTC_SYSCONFIG, 0);
 }
 
-void omap3_intc_resume_idle(void)
+static void omap_intc_resume_idle(void)
 {
 	/* Re-enable autoidle */
 	intc_writel(INTC_SYSCONFIG, 1);
@@ -152,14 +152,17 @@ static void omap_mask_ack_irq(struct irq_data *d)
 
 static void omap_suspend_irq(struct irq_data *d)
 {
-	omap3_intc_prepare_idle();
+	omap_intc_prepare_idle();
 	omap_intc_save_context();
+
+	/* A pending interrupt would prevent OMAP from entering suspend */
+	omap_ack_irq(NULL);
 }
 
 static void omap_resume_irq(struct irq_data *d)
 {
 	omap_intc_restore_context();
-	omap3_intc_resume_idle();
+	omap_intc_resume_idle();
 }
 
 static void __init omap_irq_soft_reset(void)
@@ -193,12 +196,6 @@ int omap_irq_pending(void)
 	return 0;
 }
 
-void omap3_intc_suspend(void)
-{
-	/* A pending interrupt would prevent OMAP from entering suspend */
-	omap_ack_irq(NULL);
-}
-
 static __init void
 omap_alloc_gc(void __iomem *base, unsigned int irq_start, unsigned int num)
 {
diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
index 93b80e5..2764796 100644
--- a/arch/arm/mach-omap2/pm34xx.c
+++ b/arch/arm/mach-omap2/pm34xx.c
@@ -82,8 +82,6 @@ static void omap3_core_save_context(void)
 	omap_ctrl_writel(omap_ctrl_readl(OMAP343X_PADCONF_ETK_D14),
 		OMAP343X_CONTROL_MEM_WKUP + 0x2a0);
 
-	/* Save the Interrupt controller context */
-	omap_intc_save_context();
 	/* Save the GPMC context */
 	omap3_gpmc_save_context();
 	/* Save the system control module context, padconf already save above*/
@@ -97,8 +95,6 @@ static void omap3_core_restore_context(void)
 	omap3_control_restore_context();
 	/* Restore the GPMC context */
 	omap3_gpmc_restore_context();
-	/* Restore the interrupt controller context */
-	omap_intc_restore_context();
 	omap_dma_global_context_restore();
 }
 
@@ -288,8 +284,6 @@ void omap_sram_idle(void)
 		}
 	}
 
-	omap3_intc_prepare_idle();
-
 	/*
 	 * On EMU/HS devices ROM code restores a SRDC value
 	 * from scratchpad which has automatic self refresh on timeout
@@ -335,8 +329,6 @@ void omap_sram_idle(void)
 					       OMAP3430_GR_MOD,
 					       OMAP3_PRM_VOLTCTRL_OFFSET);
 	}
-	omap3_intc_resume_idle();
-
 	pwrdm_post_transition(NULL);
 
 	/* PER */
@@ -373,8 +365,6 @@ static int omap3_pm_suspend(void)
 			goto restore;
 	}
 
-	omap3_intc_suspend();
-
 	omap_sram_idle();
 
 restore:
-- 
1.8.4.GIT

^ permalink raw reply related	[flat|nested] 82+ messages in thread

* [RFT/RFC/PATCH 14/31] arm: omap: irq: make intc_of_init static
  2013-11-20 18:08 ` Felipe Balbi
@ 2013-11-20 18:09   ` Felipe Balbi
  -1 siblings, 0 replies; 82+ messages in thread
From: Felipe Balbi @ 2013-11-20 18:09 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Linux OMAP Mailing List, Linux ARM Kernel Mailing List, Felipe Balbi

nobody uses that function outside of this file,
so we don't need to expose it.

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 arch/arm/mach-omap2/common.h | 10 ----------
 arch/arm/mach-omap2/irq.c    |  2 +-
 2 files changed, 1 insertion(+), 11 deletions(-)

diff --git a/arch/arm/mach-omap2/common.h b/arch/arm/mach-omap2/common.h
index 4d90328..89e73fe 100644
--- a/arch/arm/mach-omap2/common.h
+++ b/arch/arm/mach-omap2/common.h
@@ -209,16 +209,6 @@ extern void __iomem *omap4_get_l2cache_base(void);
 #endif
 
 struct device_node;
-#ifdef CONFIG_OF
-int __init intc_of_init(struct device_node *node,
-			     struct device_node *parent);
-#else
-int __init intc_of_init(struct device_node *node,
-			     struct device_node *parent)
-{
-	return 0;
-}
-#endif
 
 #ifdef CONFIG_SMP
 extern void __iomem *omap4_get_scu_base(void);
diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c
index f290f16..8ef2bfd 100644
--- a/arch/arm/mach-omap2/irq.c
+++ b/arch/arm/mach-omap2/irq.c
@@ -298,7 +298,7 @@ asmlinkage void __exception_irq_entry omap2_intc_handle_irq(struct pt_regs *regs
 	omap_intc_handle_irq(regs);
 }
 
-int __init intc_of_init(struct device_node *node,
+static int __init intc_of_init(struct device_node *node,
 			     struct device_node *parent)
 {
 	struct resource res;
-- 
1.8.4.GIT


^ permalink raw reply related	[flat|nested] 82+ messages in thread

* [RFT/RFC/PATCH 14/31] arm: omap: irq: make intc_of_init static
@ 2013-11-20 18:09   ` Felipe Balbi
  0 siblings, 0 replies; 82+ messages in thread
From: Felipe Balbi @ 2013-11-20 18:09 UTC (permalink / raw)
  To: linux-arm-kernel

nobody uses that function outside of this file,
so we don't need to expose it.

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 arch/arm/mach-omap2/common.h | 10 ----------
 arch/arm/mach-omap2/irq.c    |  2 +-
 2 files changed, 1 insertion(+), 11 deletions(-)

diff --git a/arch/arm/mach-omap2/common.h b/arch/arm/mach-omap2/common.h
index 4d90328..89e73fe 100644
--- a/arch/arm/mach-omap2/common.h
+++ b/arch/arm/mach-omap2/common.h
@@ -209,16 +209,6 @@ extern void __iomem *omap4_get_l2cache_base(void);
 #endif
 
 struct device_node;
-#ifdef CONFIG_OF
-int __init intc_of_init(struct device_node *node,
-			     struct device_node *parent);
-#else
-int __init intc_of_init(struct device_node *node,
-			     struct device_node *parent)
-{
-	return 0;
-}
-#endif
 
 #ifdef CONFIG_SMP
 extern void __iomem *omap4_get_scu_base(void);
diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c
index f290f16..8ef2bfd 100644
--- a/arch/arm/mach-omap2/irq.c
+++ b/arch/arm/mach-omap2/irq.c
@@ -298,7 +298,7 @@ asmlinkage void __exception_irq_entry omap2_intc_handle_irq(struct pt_regs *regs
 	omap_intc_handle_irq(regs);
 }
 
-int __init intc_of_init(struct device_node *node,
+static int __init intc_of_init(struct device_node *node,
 			     struct device_node *parent)
 {
 	struct resource res;
-- 
1.8.4.GIT

^ permalink raw reply related	[flat|nested] 82+ messages in thread

* [RFT/RFC/PATCH 15/31] arm: omap: irq: call set_handle_irq() from intc_of_init
  2013-11-20 18:08 ` Felipe Balbi
@ 2013-11-20 18:09   ` Felipe Balbi
  -1 siblings, 0 replies; 82+ messages in thread
From: Felipe Balbi @ 2013-11-20 18:09 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Linux OMAP Mailing List, Linux ARM Kernel Mailing List, Felipe Balbi

this will let us drop .handle_irq and .init_irq fields
from our generic machine_descs.

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 arch/arm/mach-omap2/irq.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c
index 8ef2bfd..503d345 100644
--- a/arch/arm/mach-omap2/irq.c
+++ b/arch/arm/mach-omap2/irq.c
@@ -317,6 +317,8 @@ static int __init intc_of_init(struct device_node *node,
 
 	omap_init_irq(res.start, nr_irq, of_node_get(node));
 
+	set_handle_irq(omap2_intc_handle_irq);
+
 	return 0;
 }
 
-- 
1.8.4.GIT


^ permalink raw reply related	[flat|nested] 82+ messages in thread

* [RFT/RFC/PATCH 15/31] arm: omap: irq: call set_handle_irq() from intc_of_init
@ 2013-11-20 18:09   ` Felipe Balbi
  0 siblings, 0 replies; 82+ messages in thread
From: Felipe Balbi @ 2013-11-20 18:09 UTC (permalink / raw)
  To: linux-arm-kernel

this will let us drop .handle_irq and .init_irq fields
from our generic machine_descs.

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 arch/arm/mach-omap2/irq.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c
index 8ef2bfd..503d345 100644
--- a/arch/arm/mach-omap2/irq.c
+++ b/arch/arm/mach-omap2/irq.c
@@ -317,6 +317,8 @@ static int __init intc_of_init(struct device_node *node,
 
 	omap_init_irq(res.start, nr_irq, of_node_get(node));
 
+	set_handle_irq(omap2_intc_handle_irq);
+
 	return 0;
 }
 
-- 
1.8.4.GIT

^ permalink raw reply related	[flat|nested] 82+ messages in thread

* [RFT/RFC/PATCH 16/31] arm: omap: irq: use IRQCHIP_DECLARE macro
  2013-11-20 18:08 ` Felipe Balbi
@ 2013-11-20 18:09   ` Felipe Balbi
  -1 siblings, 0 replies; 82+ messages in thread
From: Felipe Balbi @ 2013-11-20 18:09 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Linux OMAP Mailing List, Linux ARM Kernel Mailing List, Felipe Balbi

IRQCHIP_DECLARE macro is used to declare the same
of_device_id structure for irqchips, it's just
a helper. No functional changes.

Note that we're temporarily including irqchip.h
with its full path, until we move this driver
to drivers/irqchip/.

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 arch/arm/mach-omap2/irq.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c
index 503d345..5c3ab05 100644
--- a/arch/arm/mach-omap2/irq.c
+++ b/arch/arm/mach-omap2/irq.c
@@ -26,6 +26,7 @@
 #include "soc.h"
 #include "iomap.h"
 #include "common.h"
+#include "../../drivers/irqchip/irqchip.h"
 
 /* selected INTC register offsets */
 
@@ -322,14 +323,11 @@ static int __init intc_of_init(struct device_node *node,
 	return 0;
 }
 
-static struct of_device_id irq_match[] __initdata = {
-	{ .compatible = "ti,omap2-intc", .data = intc_of_init, },
-	{ }
-};
+IRQCHIP_DECLARE(omap_intc, "ti,omap2-intc", intc_of_init);
 
 void __init omap_intc_of_init(void)
 {
-	of_irq_init(irq_match);
+	of_irq_init(&irqchip_of_match_omap_intc);
 }
 
 asmlinkage void __exception_irq_entry omap3_intc_handle_irq(struct pt_regs *regs)
-- 
1.8.4.GIT


^ permalink raw reply related	[flat|nested] 82+ messages in thread

* [RFT/RFC/PATCH 16/31] arm: omap: irq: use IRQCHIP_DECLARE macro
@ 2013-11-20 18:09   ` Felipe Balbi
  0 siblings, 0 replies; 82+ messages in thread
From: Felipe Balbi @ 2013-11-20 18:09 UTC (permalink / raw)
  To: linux-arm-kernel

IRQCHIP_DECLARE macro is used to declare the same
of_device_id structure for irqchips, it's just
a helper. No functional changes.

Note that we're temporarily including irqchip.h
with its full path, until we move this driver
to drivers/irqchip/.

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 arch/arm/mach-omap2/irq.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c
index 503d345..5c3ab05 100644
--- a/arch/arm/mach-omap2/irq.c
+++ b/arch/arm/mach-omap2/irq.c
@@ -26,6 +26,7 @@
 #include "soc.h"
 #include "iomap.h"
 #include "common.h"
+#include "../../drivers/irqchip/irqchip.h"
 
 /* selected INTC register offsets */
 
@@ -322,14 +323,11 @@ static int __init intc_of_init(struct device_node *node,
 	return 0;
 }
 
-static struct of_device_id irq_match[] __initdata = {
-	{ .compatible = "ti,omap2-intc", .data = intc_of_init, },
-	{ }
-};
+IRQCHIP_DECLARE(omap_intc, "ti,omap2-intc", intc_of_init);
 
 void __init omap_intc_of_init(void)
 {
-	of_irq_init(irq_match);
+	of_irq_init(&irqchip_of_match_omap_intc);
 }
 
 asmlinkage void __exception_irq_entry omap3_intc_handle_irq(struct pt_regs *regs)
-- 
1.8.4.GIT

^ permalink raw reply related	[flat|nested] 82+ messages in thread

* [RFT/RFC/PATCH 17/31] arm: omap: irq: drop .handle_irq and .init_irq fields
  2013-11-20 18:08 ` Felipe Balbi
@ 2013-11-20 18:09   ` Felipe Balbi
  -1 siblings, 0 replies; 82+ messages in thread
From: Felipe Balbi @ 2013-11-20 18:09 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Linux OMAP Mailing List, Linux ARM Kernel Mailing List, Felipe Balbi

now we can safely drop those fields from our machine_desc.

While at that, also drop the now unused omap_intc_of_init()
definition.

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 arch/arm/mach-omap2/board-generic.c | 12 ------------
 arch/arm/mach-omap2/common.h        |  1 -
 arch/arm/mach-omap2/irq.c           |  5 -----
 3 files changed, 18 deletions(-)

diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c
index 19f1652..d63bf99 100644
--- a/arch/arm/mach-omap2/board-generic.c
+++ b/arch/arm/mach-omap2/board-generic.c
@@ -48,8 +48,6 @@ DT_MACHINE_START(OMAP242X_DT, "Generic OMAP2420 (Flattened Device Tree)")
 	.reserve	= omap_reserve,
 	.map_io		= omap242x_map_io,
 	.init_early	= omap2420_init_early,
-	.init_irq	= omap_intc_of_init,
-	.handle_irq	= omap2_intc_handle_irq,
 	.init_machine	= omap_generic_init,
 	.init_time	= omap2_sync32k_timer_init,
 	.dt_compat	= omap242x_boards_compat,
@@ -67,8 +65,6 @@ DT_MACHINE_START(OMAP243X_DT, "Generic OMAP2430 (Flattened Device Tree)")
 	.reserve	= omap_reserve,
 	.map_io		= omap243x_map_io,
 	.init_early	= omap2430_init_early,
-	.init_irq	= omap_intc_of_init,
-	.handle_irq	= omap2_intc_handle_irq,
 	.init_machine	= omap_generic_init,
 	.init_time	= omap2_sync32k_timer_init,
 	.dt_compat	= omap243x_boards_compat,
@@ -86,8 +82,6 @@ DT_MACHINE_START(OMAP3_DT, "Generic OMAP3 (Flattened Device Tree)")
 	.reserve	= omap_reserve,
 	.map_io		= omap3_map_io,
 	.init_early	= omap3430_init_early,
-	.init_irq	= omap_intc_of_init,
-	.handle_irq	= omap3_intc_handle_irq,
 	.init_machine	= omap_generic_init,
 	.init_late	= omap3_init_late,
 	.init_time	= omap3_sync32k_timer_init,
@@ -104,8 +98,6 @@ DT_MACHINE_START(OMAP36XX_DT, "Generic OMAP36xx (Flattened Device Tree)")
 	.reserve	= omap_reserve,
 	.map_io		= omap3_map_io,
 	.init_early	= omap3630_init_early,
-	.init_irq	= omap_intc_of_init,
-	.handle_irq	= omap3_intc_handle_irq,
 	.init_machine	= omap_generic_init,
 	.init_late	= omap3_init_late,
 	.init_time	= omap3_sync32k_timer_init,
@@ -123,8 +115,6 @@ DT_MACHINE_START(OMAP3_GP_DT, "Generic OMAP3-GP (Flattened Device Tree)")
 	.reserve	= omap_reserve,
 	.map_io		= omap3_map_io,
 	.init_early	= omap3430_init_early,
-	.init_irq	= omap_intc_of_init,
-	.handle_irq	= omap3_intc_handle_irq,
 	.init_machine	= omap_generic_init,
 	.init_late	= omap3_init_late,
 	.init_time	= omap3_secure_sync32k_timer_init,
@@ -143,8 +133,6 @@ DT_MACHINE_START(AM33XX_DT, "Generic AM33XX (Flattened Device Tree)")
 	.reserve	= omap_reserve,
 	.map_io		= am33xx_map_io,
 	.init_early	= am33xx_init_early,
-	.init_irq	= omap_intc_of_init,
-	.handle_irq	= omap3_intc_handle_irq,
 	.init_machine	= omap_generic_init,
 	.init_late	= am33xx_init_late,
 	.init_time	= omap3_gptimer_timer_init,
diff --git a/arch/arm/mach-omap2/common.h b/arch/arm/mach-omap2/common.h
index 89e73fe..4df64c36 100644
--- a/arch/arm/mach-omap2/common.h
+++ b/arch/arm/mach-omap2/common.h
@@ -201,7 +201,6 @@ void ti81xx_init_irq(void);
 extern int omap_irq_pending(void);
 void omap2_intc_handle_irq(struct pt_regs *regs);
 void omap3_intc_handle_irq(struct pt_regs *regs);
-void omap_intc_of_init(void);
 void omap_gic_of_init(void);
 
 #ifdef CONFIG_CACHE_L2X0
diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c
index 5c3ab05..8104f85 100644
--- a/arch/arm/mach-omap2/irq.c
+++ b/arch/arm/mach-omap2/irq.c
@@ -325,11 +325,6 @@ static int __init intc_of_init(struct device_node *node,
 
 IRQCHIP_DECLARE(omap_intc, "ti,omap2-intc", intc_of_init);
 
-void __init omap_intc_of_init(void)
-{
-	of_irq_init(&irqchip_of_match_omap_intc);
-}
-
 asmlinkage void __exception_irq_entry omap3_intc_handle_irq(struct pt_regs *regs)
 {
 	omap_intc_handle_irq(regs);
-- 
1.8.4.GIT


^ permalink raw reply related	[flat|nested] 82+ messages in thread

* [RFT/RFC/PATCH 17/31] arm: omap: irq: drop .handle_irq and .init_irq fields
@ 2013-11-20 18:09   ` Felipe Balbi
  0 siblings, 0 replies; 82+ messages in thread
From: Felipe Balbi @ 2013-11-20 18:09 UTC (permalink / raw)
  To: linux-arm-kernel

now we can safely drop those fields from our machine_desc.

While at that, also drop the now unused omap_intc_of_init()
definition.

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 arch/arm/mach-omap2/board-generic.c | 12 ------------
 arch/arm/mach-omap2/common.h        |  1 -
 arch/arm/mach-omap2/irq.c           |  5 -----
 3 files changed, 18 deletions(-)

diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c
index 19f1652..d63bf99 100644
--- a/arch/arm/mach-omap2/board-generic.c
+++ b/arch/arm/mach-omap2/board-generic.c
@@ -48,8 +48,6 @@ DT_MACHINE_START(OMAP242X_DT, "Generic OMAP2420 (Flattened Device Tree)")
 	.reserve	= omap_reserve,
 	.map_io		= omap242x_map_io,
 	.init_early	= omap2420_init_early,
-	.init_irq	= omap_intc_of_init,
-	.handle_irq	= omap2_intc_handle_irq,
 	.init_machine	= omap_generic_init,
 	.init_time	= omap2_sync32k_timer_init,
 	.dt_compat	= omap242x_boards_compat,
@@ -67,8 +65,6 @@ DT_MACHINE_START(OMAP243X_DT, "Generic OMAP2430 (Flattened Device Tree)")
 	.reserve	= omap_reserve,
 	.map_io		= omap243x_map_io,
 	.init_early	= omap2430_init_early,
-	.init_irq	= omap_intc_of_init,
-	.handle_irq	= omap2_intc_handle_irq,
 	.init_machine	= omap_generic_init,
 	.init_time	= omap2_sync32k_timer_init,
 	.dt_compat	= omap243x_boards_compat,
@@ -86,8 +82,6 @@ DT_MACHINE_START(OMAP3_DT, "Generic OMAP3 (Flattened Device Tree)")
 	.reserve	= omap_reserve,
 	.map_io		= omap3_map_io,
 	.init_early	= omap3430_init_early,
-	.init_irq	= omap_intc_of_init,
-	.handle_irq	= omap3_intc_handle_irq,
 	.init_machine	= omap_generic_init,
 	.init_late	= omap3_init_late,
 	.init_time	= omap3_sync32k_timer_init,
@@ -104,8 +98,6 @@ DT_MACHINE_START(OMAP36XX_DT, "Generic OMAP36xx (Flattened Device Tree)")
 	.reserve	= omap_reserve,
 	.map_io		= omap3_map_io,
 	.init_early	= omap3630_init_early,
-	.init_irq	= omap_intc_of_init,
-	.handle_irq	= omap3_intc_handle_irq,
 	.init_machine	= omap_generic_init,
 	.init_late	= omap3_init_late,
 	.init_time	= omap3_sync32k_timer_init,
@@ -123,8 +115,6 @@ DT_MACHINE_START(OMAP3_GP_DT, "Generic OMAP3-GP (Flattened Device Tree)")
 	.reserve	= omap_reserve,
 	.map_io		= omap3_map_io,
 	.init_early	= omap3430_init_early,
-	.init_irq	= omap_intc_of_init,
-	.handle_irq	= omap3_intc_handle_irq,
 	.init_machine	= omap_generic_init,
 	.init_late	= omap3_init_late,
 	.init_time	= omap3_secure_sync32k_timer_init,
@@ -143,8 +133,6 @@ DT_MACHINE_START(AM33XX_DT, "Generic AM33XX (Flattened Device Tree)")
 	.reserve	= omap_reserve,
 	.map_io		= am33xx_map_io,
 	.init_early	= am33xx_init_early,
-	.init_irq	= omap_intc_of_init,
-	.handle_irq	= omap3_intc_handle_irq,
 	.init_machine	= omap_generic_init,
 	.init_late	= am33xx_init_late,
 	.init_time	= omap3_gptimer_timer_init,
diff --git a/arch/arm/mach-omap2/common.h b/arch/arm/mach-omap2/common.h
index 89e73fe..4df64c36 100644
--- a/arch/arm/mach-omap2/common.h
+++ b/arch/arm/mach-omap2/common.h
@@ -201,7 +201,6 @@ void ti81xx_init_irq(void);
 extern int omap_irq_pending(void);
 void omap2_intc_handle_irq(struct pt_regs *regs);
 void omap3_intc_handle_irq(struct pt_regs *regs);
-void omap_intc_of_init(void);
 void omap_gic_of_init(void);
 
 #ifdef CONFIG_CACHE_L2X0
diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c
index 5c3ab05..8104f85 100644
--- a/arch/arm/mach-omap2/irq.c
+++ b/arch/arm/mach-omap2/irq.c
@@ -325,11 +325,6 @@ static int __init intc_of_init(struct device_node *node,
 
 IRQCHIP_DECLARE(omap_intc, "ti,omap2-intc", intc_of_init);
 
-void __init omap_intc_of_init(void)
-{
-	of_irq_init(&irqchip_of_match_omap_intc);
-}
-
 asmlinkage void __exception_irq_entry omap3_intc_handle_irq(struct pt_regs *regs)
 {
 	omap_intc_handle_irq(regs);
-- 
1.8.4.GIT

^ permalink raw reply related	[flat|nested] 82+ messages in thread

* [RFT/RFC/PATCH 18/31] arm: omap: irq: add specific compatibles for omap3 and am33xx devices
  2013-11-20 18:08 ` Felipe Balbi
@ 2013-11-20 18:09   ` Felipe Balbi
  -1 siblings, 0 replies; 82+ messages in thread
From: Felipe Balbi @ 2013-11-20 18:09 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Linux OMAP Mailing List, Linux ARM Kernel Mailing List, Felipe Balbi

with this, we can use a compatible flag to figure
out how many irq lines are wired up, no need for
our TI-specific ti,intc-size binding.

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 arch/arm/mach-omap2/irq.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c
index 8104f85..1e1015c 100644
--- a/arch/arm/mach-omap2/irq.c
+++ b/arch/arm/mach-omap2/irq.c
@@ -323,7 +323,9 @@ static int __init intc_of_init(struct device_node *node,
 	return 0;
 }
 
-IRQCHIP_DECLARE(omap_intc, "ti,omap2-intc", intc_of_init);
+IRQCHIP_DECLARE(omap2_intc, "ti,omap2-intc", intc_of_init);
+IRQCHIP_DECLARE(omap3_intc, "ti,omap3-intc", intc_of_init);
+IRQCHIP_DECLARE(am33xx_intc, "ti,am33xx-intc", intc_of_init);
 
 asmlinkage void __exception_irq_entry omap3_intc_handle_irq(struct pt_regs *regs)
 {
-- 
1.8.4.GIT


^ permalink raw reply related	[flat|nested] 82+ messages in thread

* [RFT/RFC/PATCH 18/31] arm: omap: irq: add specific compatibles for omap3 and am33xx devices
@ 2013-11-20 18:09   ` Felipe Balbi
  0 siblings, 0 replies; 82+ messages in thread
From: Felipe Balbi @ 2013-11-20 18:09 UTC (permalink / raw)
  To: linux-arm-kernel

with this, we can use a compatible flag to figure
out how many irq lines are wired up, no need for
our TI-specific ti,intc-size binding.

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 arch/arm/mach-omap2/irq.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c
index 8104f85..1e1015c 100644
--- a/arch/arm/mach-omap2/irq.c
+++ b/arch/arm/mach-omap2/irq.c
@@ -323,7 +323,9 @@ static int __init intc_of_init(struct device_node *node,
 	return 0;
 }
 
-IRQCHIP_DECLARE(omap_intc, "ti,omap2-intc", intc_of_init);
+IRQCHIP_DECLARE(omap2_intc, "ti,omap2-intc", intc_of_init);
+IRQCHIP_DECLARE(omap3_intc, "ti,omap3-intc", intc_of_init);
+IRQCHIP_DECLARE(am33xx_intc, "ti,am33xx-intc", intc_of_init);
 
 asmlinkage void __exception_irq_entry omap3_intc_handle_irq(struct pt_regs *regs)
 {
-- 
1.8.4.GIT

^ permalink raw reply related	[flat|nested] 82+ messages in thread

* [RFT/RFC/PATCH 19/31] arm: omap: irq: use compatible flag to figure out number of IRQ lines
  2013-11-20 18:08 ` Felipe Balbi
@ 2013-11-20 18:09   ` Felipe Balbi
  -1 siblings, 0 replies; 82+ messages in thread
From: Felipe Balbi @ 2013-11-20 18:09 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Linux OMAP Mailing List, Linux ARM Kernel Mailing List, Felipe Balbi

so far, only am33xx has 128 lines, all other devices
have only 96.

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 arch/arm/mach-omap2/irq.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c
index 1e1015c..fd89488 100644
--- a/arch/arm/mach-omap2/irq.c
+++ b/arch/arm/mach-omap2/irq.c
@@ -313,6 +313,9 @@ static int __init intc_of_init(struct device_node *node,
 		return -EINVAL;
 	}
 
+	if (of_device_is_compatible(node, "ti,am33xx-intc"))
+		nr_irq = 128;
+
 	if (of_property_read_u32(node, "ti,intc-size", &nr_irq))
 		pr_warn("unable to get intc-size, default to %d\n", nr_irq);
 
-- 
1.8.4.GIT


^ permalink raw reply related	[flat|nested] 82+ messages in thread

* [RFT/RFC/PATCH 19/31] arm: omap: irq: use compatible flag to figure out number of IRQ lines
@ 2013-11-20 18:09   ` Felipe Balbi
  0 siblings, 0 replies; 82+ messages in thread
From: Felipe Balbi @ 2013-11-20 18:09 UTC (permalink / raw)
  To: linux-arm-kernel

so far, only am33xx has 128 lines, all other devices
have only 96.

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 arch/arm/mach-omap2/irq.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c
index 1e1015c..fd89488 100644
--- a/arch/arm/mach-omap2/irq.c
+++ b/arch/arm/mach-omap2/irq.c
@@ -313,6 +313,9 @@ static int __init intc_of_init(struct device_node *node,
 		return -EINVAL;
 	}
 
+	if (of_device_is_compatible(node, "ti,am33xx-intc"))
+		nr_irq = 128;
+
 	if (of_property_read_u32(node, "ti,intc-size", &nr_irq))
 		pr_warn("unable to get intc-size, default to %d\n", nr_irq);
 
-- 
1.8.4.GIT

^ permalink raw reply related	[flat|nested] 82+ messages in thread

* [RFT/RFC/PATCH 20/31] arm: boot: dts: am33xx/omap3: fix intc compatible flag
  2013-11-20 18:08 ` Felipe Balbi
@ 2013-11-20 18:09   ` Felipe Balbi
  -1 siblings, 0 replies; 82+ messages in thread
From: Felipe Balbi @ 2013-11-20 18:09 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Linux OMAP Mailing List, Linux ARM Kernel Mailing List, Felipe Balbi

that way, our intc driver can figure out how
many IRQ lines INTC has.

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 arch/arm/boot/dts/am33xx.dtsi | 2 +-
 arch/arm/boot/dts/omap3.dtsi  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi
index f6d8ffe..93dd479 100644
--- a/arch/arm/boot/dts/am33xx.dtsi
+++ b/arch/arm/boot/dts/am33xx.dtsi
@@ -103,7 +103,7 @@
 		ti,hwmods = "l3_main";
 
 		intc: interrupt-controller@48200000 {
-			compatible = "ti,omap2-intc";
+			compatible = "ti,am33xx-intc";
 			interrupt-controller;
 			#interrupt-cells = <1>;
 			ti,intc-size = <128>;
diff --git a/arch/arm/boot/dts/omap3.dtsi b/arch/arm/boot/dts/omap3.dtsi
index f3a0c26..e42d17d 100644
--- a/arch/arm/boot/dts/omap3.dtsi
+++ b/arch/arm/boot/dts/omap3.dtsi
@@ -89,7 +89,7 @@
 		};
 
 		intc: interrupt-controller@48200000 {
-			compatible = "ti,omap2-intc";
+			compatible = "ti,omap3-intc";
 			interrupt-controller;
 			#interrupt-cells = <1>;
 			ti,intc-size = <96>;
-- 
1.8.4.GIT


^ permalink raw reply related	[flat|nested] 82+ messages in thread

* [RFT/RFC/PATCH 20/31] arm: boot: dts: am33xx/omap3: fix intc compatible flag
@ 2013-11-20 18:09   ` Felipe Balbi
  0 siblings, 0 replies; 82+ messages in thread
From: Felipe Balbi @ 2013-11-20 18:09 UTC (permalink / raw)
  To: linux-arm-kernel

that way, our intc driver can figure out how
many IRQ lines INTC has.

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 arch/arm/boot/dts/am33xx.dtsi | 2 +-
 arch/arm/boot/dts/omap3.dtsi  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi
index f6d8ffe..93dd479 100644
--- a/arch/arm/boot/dts/am33xx.dtsi
+++ b/arch/arm/boot/dts/am33xx.dtsi
@@ -103,7 +103,7 @@
 		ti,hwmods = "l3_main";
 
 		intc: interrupt-controller at 48200000 {
-			compatible = "ti,omap2-intc";
+			compatible = "ti,am33xx-intc";
 			interrupt-controller;
 			#interrupt-cells = <1>;
 			ti,intc-size = <128>;
diff --git a/arch/arm/boot/dts/omap3.dtsi b/arch/arm/boot/dts/omap3.dtsi
index f3a0c26..e42d17d 100644
--- a/arch/arm/boot/dts/omap3.dtsi
+++ b/arch/arm/boot/dts/omap3.dtsi
@@ -89,7 +89,7 @@
 		};
 
 		intc: interrupt-controller at 48200000 {
-			compatible = "ti,omap2-intc";
+			compatible = "ti,omap3-intc";
 			interrupt-controller;
 			#interrupt-cells = <1>;
 			ti,intc-size = <96>;
-- 
1.8.4.GIT

^ permalink raw reply related	[flat|nested] 82+ messages in thread

* [RFT/RFC/PATCH 21/31] arm: omap: irq: drop ti,intc-size support
  2013-11-20 18:08 ` Felipe Balbi
@ 2013-11-20 18:09   ` Felipe Balbi
  -1 siblings, 0 replies; 82+ messages in thread
From: Felipe Balbi @ 2013-11-20 18:09 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Linux OMAP Mailing List, Linux ARM Kernel Mailing List, Felipe Balbi

we don't need that anymore since specific
devices are passing correct compatible flags.

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 arch/arm/mach-omap2/irq.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c
index fd89488..e87e8be 100644
--- a/arch/arm/mach-omap2/irq.c
+++ b/arch/arm/mach-omap2/irq.c
@@ -316,9 +316,6 @@ static int __init intc_of_init(struct device_node *node,
 	if (of_device_is_compatible(node, "ti,am33xx-intc"))
 		nr_irq = 128;
 
-	if (of_property_read_u32(node, "ti,intc-size", &nr_irq))
-		pr_warn("unable to get intc-size, default to %d\n", nr_irq);
-
 	omap_init_irq(res.start, nr_irq, of_node_get(node));
 
 	set_handle_irq(omap2_intc_handle_irq);
-- 
1.8.4.GIT


^ permalink raw reply related	[flat|nested] 82+ messages in thread

* [RFT/RFC/PATCH 21/31] arm: omap: irq: drop ti,intc-size support
@ 2013-11-20 18:09   ` Felipe Balbi
  0 siblings, 0 replies; 82+ messages in thread
From: Felipe Balbi @ 2013-11-20 18:09 UTC (permalink / raw)
  To: linux-arm-kernel

we don't need that anymore since specific
devices are passing correct compatible flags.

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 arch/arm/mach-omap2/irq.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c
index fd89488..e87e8be 100644
--- a/arch/arm/mach-omap2/irq.c
+++ b/arch/arm/mach-omap2/irq.c
@@ -316,9 +316,6 @@ static int __init intc_of_init(struct device_node *node,
 	if (of_device_is_compatible(node, "ti,am33xx-intc"))
 		nr_irq = 128;
 
-	if (of_property_read_u32(node, "ti,intc-size", &nr_irq))
-		pr_warn("unable to get intc-size, default to %d\n", nr_irq);
-
 	omap_init_irq(res.start, nr_irq, of_node_get(node));
 
 	set_handle_irq(omap2_intc_handle_irq);
-- 
1.8.4.GIT

^ permalink raw reply related	[flat|nested] 82+ messages in thread

* [RFT/RFC/PATCH 22/31] arm: boot: dts: omap2/3/am33xx: drop ti,intc-size
  2013-11-20 18:08 ` Felipe Balbi
@ 2013-11-20 18:09   ` Felipe Balbi
  -1 siblings, 0 replies; 82+ messages in thread
From: Felipe Balbi @ 2013-11-20 18:09 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Linux OMAP Mailing List, Linux ARM Kernel Mailing List, Felipe Balbi

we are now infering number of IRQ lines based
on correct compatible flag, which renders this
binding completely useless.

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 arch/arm/boot/dts/am33xx.dtsi | 1 -
 arch/arm/boot/dts/omap2.dtsi  | 1 -
 arch/arm/boot/dts/omap3.dtsi  | 1 -
 3 files changed, 3 deletions(-)

diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi
index 93dd479..63acc21 100644
--- a/arch/arm/boot/dts/am33xx.dtsi
+++ b/arch/arm/boot/dts/am33xx.dtsi
@@ -106,7 +106,6 @@
 			compatible = "ti,am33xx-intc";
 			interrupt-controller;
 			#interrupt-cells = <1>;
-			ti,intc-size = <128>;
 			reg = <0x48200000 0x1000>;
 		};
 
diff --git a/arch/arm/boot/dts/omap2.dtsi b/arch/arm/boot/dts/omap2.dtsi
index a2bfcde..50f8aff 100644
--- a/arch/arm/boot/dts/omap2.dtsi
+++ b/arch/arm/boot/dts/omap2.dtsi
@@ -57,7 +57,6 @@
 			compatible = "ti,omap2-intc";
 			interrupt-controller;
 			#interrupt-cells = <1>;
-			ti,intc-size = <96>;
 			reg = <0x480FE000 0x1000>;
 		};
 
diff --git a/arch/arm/boot/dts/omap3.dtsi b/arch/arm/boot/dts/omap3.dtsi
index e42d17d..6d9626a 100644
--- a/arch/arm/boot/dts/omap3.dtsi
+++ b/arch/arm/boot/dts/omap3.dtsi
@@ -92,7 +92,6 @@
 			compatible = "ti,omap3-intc";
 			interrupt-controller;
 			#interrupt-cells = <1>;
-			ti,intc-size = <96>;
 			reg = <0x48200000 0x1000>;
 		};
 
-- 
1.8.4.GIT


^ permalink raw reply related	[flat|nested] 82+ messages in thread

* [RFT/RFC/PATCH 22/31] arm: boot: dts: omap2/3/am33xx: drop ti, intc-size
@ 2013-11-20 18:09   ` Felipe Balbi
  0 siblings, 0 replies; 82+ messages in thread
From: Felipe Balbi @ 2013-11-20 18:09 UTC (permalink / raw)
  To: linux-arm-kernel

we are now infering number of IRQ lines based
on correct compatible flag, which renders this
binding completely useless.

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 arch/arm/boot/dts/am33xx.dtsi | 1 -
 arch/arm/boot/dts/omap2.dtsi  | 1 -
 arch/arm/boot/dts/omap3.dtsi  | 1 -
 3 files changed, 3 deletions(-)

diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi
index 93dd479..63acc21 100644
--- a/arch/arm/boot/dts/am33xx.dtsi
+++ b/arch/arm/boot/dts/am33xx.dtsi
@@ -106,7 +106,6 @@
 			compatible = "ti,am33xx-intc";
 			interrupt-controller;
 			#interrupt-cells = <1>;
-			ti,intc-size = <128>;
 			reg = <0x48200000 0x1000>;
 		};
 
diff --git a/arch/arm/boot/dts/omap2.dtsi b/arch/arm/boot/dts/omap2.dtsi
index a2bfcde..50f8aff 100644
--- a/arch/arm/boot/dts/omap2.dtsi
+++ b/arch/arm/boot/dts/omap2.dtsi
@@ -57,7 +57,6 @@
 			compatible = "ti,omap2-intc";
 			interrupt-controller;
 			#interrupt-cells = <1>;
-			ti,intc-size = <96>;
 			reg = <0x480FE000 0x1000>;
 		};
 
diff --git a/arch/arm/boot/dts/omap3.dtsi b/arch/arm/boot/dts/omap3.dtsi
index e42d17d..6d9626a 100644
--- a/arch/arm/boot/dts/omap3.dtsi
+++ b/arch/arm/boot/dts/omap3.dtsi
@@ -92,7 +92,6 @@
 			compatible = "ti,omap3-intc";
 			interrupt-controller;
 			#interrupt-cells = <1>;
-			ti,intc-size = <96>;
 			reg = <0x48200000 0x1000>;
 		};
 
-- 
1.8.4.GIT

^ permalink raw reply related	[flat|nested] 82+ messages in thread

* [RFT/RFC/PATCH 23/31] arm: omap: irq: move some more code around
  2013-11-20 18:08 ` Felipe Balbi
@ 2013-11-20 18:09   ` Felipe Balbi
  -1 siblings, 0 replies; 82+ messages in thread
From: Felipe Balbi @ 2013-11-20 18:09 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Linux OMAP Mailing List, Linux ARM Kernel Mailing List, Felipe Balbi

We want .init_irq to call set_irq_handle() for
legacy platforms. Note that this code will also
be dropped once omap2/3 devices are completely
moved to DT.

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 arch/arm/mach-omap2/irq.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c
index e87e8be..6b9bf0b 100644
--- a/arch/arm/mach-omap2/irq.c
+++ b/arch/arm/mach-omap2/irq.c
@@ -245,21 +245,6 @@ static void __init omap_init_irq(u32 base, int nr_irqs,
 		omap_alloc_gc(omap_irq_base + j, j + irq_base, 32);
 }
 
-void __init omap2_init_irq(void)
-{
-	omap_init_irq(OMAP24XX_IC_BASE, 96, NULL);
-}
-
-void __init omap3_init_irq(void)
-{
-	omap_init_irq(OMAP34XX_IC_BASE, 96, NULL);
-}
-
-void __init ti81xx_init_irq(void)
-{
-	omap_init_irq(OMAP34XX_IC_BASE, 128, NULL);
-}
-
 static inline void omap_intc_handle_irq(struct pt_regs *regs)
 {
 	u32 irqnr;
@@ -299,6 +284,21 @@ asmlinkage void __exception_irq_entry omap2_intc_handle_irq(struct pt_regs *regs
 	omap_intc_handle_irq(regs);
 }
 
+void __init omap2_init_irq(void)
+{
+	omap_init_irq(OMAP24XX_IC_BASE, 96, NULL);
+}
+
+void __init omap3_init_irq(void)
+{
+	omap_init_irq(OMAP34XX_IC_BASE, 96, NULL);
+}
+
+void __init ti81xx_init_irq(void)
+{
+	omap_init_irq(OMAP34XX_IC_BASE, 128, NULL);
+}
+
 static int __init intc_of_init(struct device_node *node,
 			     struct device_node *parent)
 {
-- 
1.8.4.GIT


^ permalink raw reply related	[flat|nested] 82+ messages in thread

* [RFT/RFC/PATCH 23/31] arm: omap: irq: move some more code around
@ 2013-11-20 18:09   ` Felipe Balbi
  0 siblings, 0 replies; 82+ messages in thread
From: Felipe Balbi @ 2013-11-20 18:09 UTC (permalink / raw)
  To: linux-arm-kernel

We want .init_irq to call set_irq_handle() for
legacy platforms. Note that this code will also
be dropped once omap2/3 devices are completely
moved to DT.

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 arch/arm/mach-omap2/irq.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c
index e87e8be..6b9bf0b 100644
--- a/arch/arm/mach-omap2/irq.c
+++ b/arch/arm/mach-omap2/irq.c
@@ -245,21 +245,6 @@ static void __init omap_init_irq(u32 base, int nr_irqs,
 		omap_alloc_gc(omap_irq_base + j, j + irq_base, 32);
 }
 
-void __init omap2_init_irq(void)
-{
-	omap_init_irq(OMAP24XX_IC_BASE, 96, NULL);
-}
-
-void __init omap3_init_irq(void)
-{
-	omap_init_irq(OMAP34XX_IC_BASE, 96, NULL);
-}
-
-void __init ti81xx_init_irq(void)
-{
-	omap_init_irq(OMAP34XX_IC_BASE, 128, NULL);
-}
-
 static inline void omap_intc_handle_irq(struct pt_regs *regs)
 {
 	u32 irqnr;
@@ -299,6 +284,21 @@ asmlinkage void __exception_irq_entry omap2_intc_handle_irq(struct pt_regs *regs
 	omap_intc_handle_irq(regs);
 }
 
+void __init omap2_init_irq(void)
+{
+	omap_init_irq(OMAP24XX_IC_BASE, 96, NULL);
+}
+
+void __init omap3_init_irq(void)
+{
+	omap_init_irq(OMAP34XX_IC_BASE, 96, NULL);
+}
+
+void __init ti81xx_init_irq(void)
+{
+	omap_init_irq(OMAP34XX_IC_BASE, 128, NULL);
+}
+
 static int __init intc_of_init(struct device_node *node,
 			     struct device_node *parent)
 {
-- 
1.8.4.GIT

^ permalink raw reply related	[flat|nested] 82+ messages in thread

* [RFT/RFC/PATCH 24/31] arm: omap: irq: call set_handle_irq() from .init_irq
  2013-11-20 18:08 ` Felipe Balbi
@ 2013-11-20 18:09   ` Felipe Balbi
  -1 siblings, 0 replies; 82+ messages in thread
From: Felipe Balbi @ 2013-11-20 18:09 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Linux OMAP Mailing List, Linux ARM Kernel Mailing List, Felipe Balbi

the idea is that board-files won't need to set
.handle_irq on their machine_descs, which lets
us drop a little more pointless code.

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 arch/arm/mach-omap2/board-2430sdp.c        | 1 -
 arch/arm/mach-omap2/board-3430sdp.c        | 1 -
 arch/arm/mach-omap2/board-am3517crane.c    | 1 -
 arch/arm/mach-omap2/board-am3517evm.c      | 1 -
 arch/arm/mach-omap2/board-cm-t35.c         | 2 --
 arch/arm/mach-omap2/board-cm-t3517.c       | 1 -
 arch/arm/mach-omap2/board-devkit8000.c     | 1 -
 arch/arm/mach-omap2/board-h4.c             | 1 -
 arch/arm/mach-omap2/board-ldp.c            | 1 -
 arch/arm/mach-omap2/board-n8x0.c           | 3 ---
 arch/arm/mach-omap2/board-omap3beagle.c    | 1 -
 arch/arm/mach-omap2/board-omap3logic.c     | 2 --
 arch/arm/mach-omap2/board-omap3pandora.c   | 1 -
 arch/arm/mach-omap2/board-omap3stalker.c   | 1 -
 arch/arm/mach-omap2/board-omap3touchbook.c | 1 -
 arch/arm/mach-omap2/board-overo.c          | 1 -
 arch/arm/mach-omap2/board-rx51.c           | 1 -
 arch/arm/mach-omap2/irq.c                  | 3 +++
 18 files changed, 3 insertions(+), 21 deletions(-)

diff --git a/arch/arm/mach-omap2/board-2430sdp.c b/arch/arm/mach-omap2/board-2430sdp.c
index c711ad6..39504f8 100644
--- a/arch/arm/mach-omap2/board-2430sdp.c
+++ b/arch/arm/mach-omap2/board-2430sdp.c
@@ -265,7 +265,6 @@ MACHINE_START(OMAP_2430SDP, "OMAP2430 sdp2430 board")
 	.map_io		= omap243x_map_io,
 	.init_early	= omap2430_init_early,
 	.init_irq	= omap2_init_irq,
-	.handle_irq	= omap2_intc_handle_irq,
 	.init_machine	= omap_2430sdp_init,
 	.init_late	= omap2430_init_late,
 	.init_time	= omap2_sync32k_timer_init,
diff --git a/arch/arm/mach-omap2/board-3430sdp.c b/arch/arm/mach-omap2/board-3430sdp.c
index d95d0ef..d21a304 100644
--- a/arch/arm/mach-omap2/board-3430sdp.c
+++ b/arch/arm/mach-omap2/board-3430sdp.c
@@ -625,7 +625,6 @@ MACHINE_START(OMAP_3430SDP, "OMAP3430 3430SDP board")
 	.map_io		= omap3_map_io,
 	.init_early	= omap3430_init_early,
 	.init_irq	= omap3_init_irq,
-	.handle_irq	= omap3_intc_handle_irq,
 	.init_machine	= omap_3430sdp_init,
 	.init_late	= omap3430_init_late,
 	.init_time	= omap3_sync32k_timer_init,
diff --git a/arch/arm/mach-omap2/board-am3517crane.c b/arch/arm/mach-omap2/board-am3517crane.c
index 0d499a1..212c316 100644
--- a/arch/arm/mach-omap2/board-am3517crane.c
+++ b/arch/arm/mach-omap2/board-am3517crane.c
@@ -142,7 +142,6 @@ MACHINE_START(CRANEBOARD, "AM3517/05 CRANEBOARD")
 	.map_io		= omap3_map_io,
 	.init_early	= am35xx_init_early,
 	.init_irq	= omap3_init_irq,
-	.handle_irq	= omap3_intc_handle_irq,
 	.init_machine	= am3517_crane_init,
 	.init_late	= am35xx_init_late,
 	.init_time	= omap3_sync32k_timer_init,
diff --git a/arch/arm/mach-omap2/board-am3517evm.c b/arch/arm/mach-omap2/board-am3517evm.c
index 543d9a8..489ad02 100644
--- a/arch/arm/mach-omap2/board-am3517evm.c
+++ b/arch/arm/mach-omap2/board-am3517evm.c
@@ -371,7 +371,6 @@ MACHINE_START(OMAP3517EVM, "OMAP3517/AM3517 EVM")
 	.map_io		= omap3_map_io,
 	.init_early	= am35xx_init_early,
 	.init_irq	= omap3_init_irq,
-	.handle_irq	= omap3_intc_handle_irq,
 	.init_machine	= am3517_evm_init,
 	.init_late	= am35xx_init_late,
 	.init_time	= omap3_sync32k_timer_init,
diff --git a/arch/arm/mach-omap2/board-cm-t35.c b/arch/arm/mach-omap2/board-cm-t35.c
index 8dd0ec8..2c27014 100644
--- a/arch/arm/mach-omap2/board-cm-t35.c
+++ b/arch/arm/mach-omap2/board-cm-t35.c
@@ -750,7 +750,6 @@ MACHINE_START(CM_T35, "Compulab CM-T35")
 	.map_io		= omap3_map_io,
 	.init_early	= omap35xx_init_early,
 	.init_irq	= omap3_init_irq,
-	.handle_irq	= omap3_intc_handle_irq,
 	.init_machine	= cm_t35_init,
 	.init_late	= omap35xx_init_late,
 	.init_time	= omap3_sync32k_timer_init,
@@ -763,7 +762,6 @@ MACHINE_START(CM_T3730, "Compulab CM-T3730")
 	.map_io		= omap3_map_io,
 	.init_early	= omap3630_init_early,
 	.init_irq	= omap3_init_irq,
-	.handle_irq	= omap3_intc_handle_irq,
 	.init_machine	= cm_t3730_init,
 	.init_late     = omap3630_init_late,
 	.init_time	= omap3_sync32k_timer_init,
diff --git a/arch/arm/mach-omap2/board-cm-t3517.c b/arch/arm/mach-omap2/board-cm-t3517.c
index 4eb5e6f..8a2c167 100644
--- a/arch/arm/mach-omap2/board-cm-t3517.c
+++ b/arch/arm/mach-omap2/board-cm-t3517.c
@@ -329,7 +329,6 @@ MACHINE_START(CM_T3517, "Compulab CM-T3517")
 	.map_io		= omap3_map_io,
 	.init_early	= am35xx_init_early,
 	.init_irq	= omap3_init_irq,
-	.handle_irq	= omap3_intc_handle_irq,
 	.init_machine	= cm_t3517_init,
 	.init_late	= am35xx_init_late,
 	.init_time	= omap3_gptimer_timer_init,
diff --git a/arch/arm/mach-omap2/board-devkit8000.c b/arch/arm/mach-omap2/board-devkit8000.c
index cdc4fb9..d8e4f34 100644
--- a/arch/arm/mach-omap2/board-devkit8000.c
+++ b/arch/arm/mach-omap2/board-devkit8000.c
@@ -647,7 +647,6 @@ MACHINE_START(DEVKIT8000, "OMAP3 Devkit8000")
 	.map_io		= omap3_map_io,
 	.init_early	= omap35xx_init_early,
 	.init_irq	= omap3_init_irq,
-	.handle_irq	= omap3_intc_handle_irq,
 	.init_machine	= devkit8000_init,
 	.init_late	= omap35xx_init_late,
 	.init_time	= omap3_secure_sync32k_timer_init,
diff --git a/arch/arm/mach-omap2/board-h4.c b/arch/arm/mach-omap2/board-h4.c
index f780834..d1a9924 100644
--- a/arch/arm/mach-omap2/board-h4.c
+++ b/arch/arm/mach-omap2/board-h4.c
@@ -357,7 +357,6 @@ MACHINE_START(OMAP_H4, "OMAP2420 H4 board")
 	.map_io		= omap242x_map_io,
 	.init_early	= omap2420_init_early,
 	.init_irq	= omap2_init_irq,
-	.handle_irq	= omap2_intc_handle_irq,
 	.init_machine	= omap_h4_init,
 	.init_late	= omap2420_init_late,
 	.init_time	= omap2_sync32k_timer_init,
diff --git a/arch/arm/mach-omap2/board-ldp.c b/arch/arm/mach-omap2/board-ldp.c
index 4ec8d82..fdb9759 100644
--- a/arch/arm/mach-omap2/board-ldp.c
+++ b/arch/arm/mach-omap2/board-ldp.c
@@ -417,7 +417,6 @@ MACHINE_START(OMAP_LDP, "OMAP LDP board")
 	.map_io		= omap3_map_io,
 	.init_early	= omap3430_init_early,
 	.init_irq	= omap3_init_irq,
-	.handle_irq	= omap3_intc_handle_irq,
 	.init_machine	= omap_ldp_init,
 	.init_late	= omap3430_init_late,
 	.init_time	= omap3_sync32k_timer_init,
diff --git a/arch/arm/mach-omap2/board-n8x0.c b/arch/arm/mach-omap2/board-n8x0.c
index 827d1500..18810d8 100644
--- a/arch/arm/mach-omap2/board-n8x0.c
+++ b/arch/arm/mach-omap2/board-n8x0.c
@@ -724,7 +724,6 @@ MACHINE_START(NOKIA_N800, "Nokia N800")
 	.map_io		= omap242x_map_io,
 	.init_early	= omap2420_init_early,
 	.init_irq	= omap2_init_irq,
-	.handle_irq	= omap2_intc_handle_irq,
 	.init_machine	= n8x0_init_machine,
 	.init_late	= omap2420_init_late,
 	.init_time	= omap2_sync32k_timer_init,
@@ -737,7 +736,6 @@ MACHINE_START(NOKIA_N810, "Nokia N810")
 	.map_io		= omap242x_map_io,
 	.init_early	= omap2420_init_early,
 	.init_irq	= omap2_init_irq,
-	.handle_irq	= omap2_intc_handle_irq,
 	.init_machine	= n8x0_init_machine,
 	.init_late	= omap2420_init_late,
 	.init_time	= omap2_sync32k_timer_init,
@@ -750,7 +748,6 @@ MACHINE_START(NOKIA_N810_WIMAX, "Nokia N810 WiMAX")
 	.map_io		= omap242x_map_io,
 	.init_early	= omap2420_init_early,
 	.init_irq	= omap2_init_irq,
-	.handle_irq	= omap2_intc_handle_irq,
 	.init_machine	= n8x0_init_machine,
 	.init_late	= omap2420_init_late,
 	.init_time	= omap2_sync32k_timer_init,
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
index d6ed819..bb3b9ca 100644
--- a/arch/arm/mach-omap2/board-omap3beagle.c
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
@@ -588,7 +588,6 @@ MACHINE_START(OMAP3_BEAGLE, "OMAP3 Beagle Board")
 	.map_io		= omap3_map_io,
 	.init_early	= omap3_init_early,
 	.init_irq	= omap3_init_irq,
-	.handle_irq	= omap3_intc_handle_irq,
 	.init_machine	= omap3_beagle_init,
 	.init_late	= omap3_init_late,
 	.init_time	= omap3_secure_sync32k_timer_init,
diff --git a/arch/arm/mach-omap2/board-omap3logic.c b/arch/arm/mach-omap2/board-omap3logic.c
index bab51e6..6049f60 100644
--- a/arch/arm/mach-omap2/board-omap3logic.c
+++ b/arch/arm/mach-omap2/board-omap3logic.c
@@ -230,7 +230,6 @@ MACHINE_START(OMAP3_TORPEDO, "Logic OMAP3 Torpedo board")
 	.map_io		= omap3_map_io,
 	.init_early	= omap35xx_init_early,
 	.init_irq	= omap3_init_irq,
-	.handle_irq	= omap3_intc_handle_irq,
 	.init_machine	= omap3logic_init,
 	.init_late	= omap35xx_init_late,
 	.init_time	= omap3_sync32k_timer_init,
@@ -243,7 +242,6 @@ MACHINE_START(OMAP3530_LV_SOM, "OMAP Logic 3530 LV SOM board")
 	.map_io		= omap3_map_io,
 	.init_early	= omap35xx_init_early,
 	.init_irq	= omap3_init_irq,
-	.handle_irq	= omap3_intc_handle_irq,
 	.init_machine	= omap3logic_init,
 	.init_late	= omap35xx_init_late,
 	.init_time	= omap3_sync32k_timer_init,
diff --git a/arch/arm/mach-omap2/board-omap3pandora.c b/arch/arm/mach-omap2/board-omap3pandora.c
index de1bc6b..cb675fe 100644
--- a/arch/arm/mach-omap2/board-omap3pandora.c
+++ b/arch/arm/mach-omap2/board-omap3pandora.c
@@ -622,7 +622,6 @@ MACHINE_START(OMAP3_PANDORA, "Pandora Handheld Console")
 	.map_io		= omap3_map_io,
 	.init_early	= omap35xx_init_early,
 	.init_irq	= omap3_init_irq,
-	.handle_irq	= omap3_intc_handle_irq,
 	.init_machine	= omap3pandora_init,
 	.init_late	= omap35xx_init_late,
 	.init_time	= omap3_sync32k_timer_init,
diff --git a/arch/arm/mach-omap2/board-omap3stalker.c b/arch/arm/mach-omap2/board-omap3stalker.c
index 119efaf..06db64b 100644
--- a/arch/arm/mach-omap2/board-omap3stalker.c
+++ b/arch/arm/mach-omap2/board-omap3stalker.c
@@ -430,7 +430,6 @@ MACHINE_START(SBC3530, "OMAP3 STALKER")
 	.map_io			= omap3_map_io,
 	.init_early		= omap35xx_init_early,
 	.init_irq		= omap3_init_irq,
-	.handle_irq		= omap3_intc_handle_irq,
 	.init_machine		= omap3_stalker_init,
 	.init_late		= omap35xx_init_late,
 	.init_time		= omap3_secure_sync32k_timer_init,
diff --git a/arch/arm/mach-omap2/board-omap3touchbook.c b/arch/arm/mach-omap2/board-omap3touchbook.c
index 7da48bc..d454508 100644
--- a/arch/arm/mach-omap2/board-omap3touchbook.c
+++ b/arch/arm/mach-omap2/board-omap3touchbook.c
@@ -388,7 +388,6 @@ MACHINE_START(TOUCHBOOK, "OMAP3 touchbook Board")
 	.map_io		= omap3_map_io,
 	.init_early	= omap3430_init_early,
 	.init_irq	= omap3_init_irq,
-	.handle_irq	= omap3_intc_handle_irq,
 	.init_machine	= omap3_touchbook_init,
 	.init_late	= omap3430_init_late,
 	.init_time	= omap3_secure_sync32k_timer_init,
diff --git a/arch/arm/mach-omap2/board-overo.c b/arch/arm/mach-omap2/board-overo.c
index f6d3841..2dae6cc 100644
--- a/arch/arm/mach-omap2/board-overo.c
+++ b/arch/arm/mach-omap2/board-overo.c
@@ -564,7 +564,6 @@ MACHINE_START(OVERO, "Gumstix Overo")
 	.map_io		= omap3_map_io,
 	.init_early	= omap35xx_init_early,
 	.init_irq	= omap3_init_irq,
-	.handle_irq	= omap3_intc_handle_irq,
 	.init_machine	= overo_init,
 	.init_late	= omap35xx_init_late,
 	.init_time	= omap3_sync32k_timer_init,
diff --git a/arch/arm/mach-omap2/board-rx51.c b/arch/arm/mach-omap2/board-rx51.c
index db168c9..2d1e5a6 100644
--- a/arch/arm/mach-omap2/board-rx51.c
+++ b/arch/arm/mach-omap2/board-rx51.c
@@ -134,7 +134,6 @@ MACHINE_START(NOKIA_RX51, "Nokia RX-51 board")
 	.map_io		= omap3_map_io,
 	.init_early	= omap3430_init_early,
 	.init_irq	= omap3_init_irq,
-	.handle_irq	= omap3_intc_handle_irq,
 	.init_machine	= rx51_init,
 	.init_late	= omap3430_init_late,
 	.init_time	= omap3_sync32k_timer_init,
diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c
index 6b9bf0b..d936955 100644
--- a/arch/arm/mach-omap2/irq.c
+++ b/arch/arm/mach-omap2/irq.c
@@ -287,16 +287,19 @@ asmlinkage void __exception_irq_entry omap2_intc_handle_irq(struct pt_regs *regs
 void __init omap2_init_irq(void)
 {
 	omap_init_irq(OMAP24XX_IC_BASE, 96, NULL);
+	set_handle_irq(omap2_intc_handle_irq);
 }
 
 void __init omap3_init_irq(void)
 {
 	omap_init_irq(OMAP34XX_IC_BASE, 96, NULL);
+	set_handle_irq(omap2_intc_handle_irq);
 }
 
 void __init ti81xx_init_irq(void)
 {
 	omap_init_irq(OMAP34XX_IC_BASE, 128, NULL);
+	set_handle_irq(omap2_intc_handle_irq);
 }
 
 static int __init intc_of_init(struct device_node *node,
-- 
1.8.4.GIT


^ permalink raw reply related	[flat|nested] 82+ messages in thread

* [RFT/RFC/PATCH 24/31] arm: omap: irq: call set_handle_irq() from .init_irq
@ 2013-11-20 18:09   ` Felipe Balbi
  0 siblings, 0 replies; 82+ messages in thread
From: Felipe Balbi @ 2013-11-20 18:09 UTC (permalink / raw)
  To: linux-arm-kernel

the idea is that board-files won't need to set
.handle_irq on their machine_descs, which lets
us drop a little more pointless code.

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 arch/arm/mach-omap2/board-2430sdp.c        | 1 -
 arch/arm/mach-omap2/board-3430sdp.c        | 1 -
 arch/arm/mach-omap2/board-am3517crane.c    | 1 -
 arch/arm/mach-omap2/board-am3517evm.c      | 1 -
 arch/arm/mach-omap2/board-cm-t35.c         | 2 --
 arch/arm/mach-omap2/board-cm-t3517.c       | 1 -
 arch/arm/mach-omap2/board-devkit8000.c     | 1 -
 arch/arm/mach-omap2/board-h4.c             | 1 -
 arch/arm/mach-omap2/board-ldp.c            | 1 -
 arch/arm/mach-omap2/board-n8x0.c           | 3 ---
 arch/arm/mach-omap2/board-omap3beagle.c    | 1 -
 arch/arm/mach-omap2/board-omap3logic.c     | 2 --
 arch/arm/mach-omap2/board-omap3pandora.c   | 1 -
 arch/arm/mach-omap2/board-omap3stalker.c   | 1 -
 arch/arm/mach-omap2/board-omap3touchbook.c | 1 -
 arch/arm/mach-omap2/board-overo.c          | 1 -
 arch/arm/mach-omap2/board-rx51.c           | 1 -
 arch/arm/mach-omap2/irq.c                  | 3 +++
 18 files changed, 3 insertions(+), 21 deletions(-)

diff --git a/arch/arm/mach-omap2/board-2430sdp.c b/arch/arm/mach-omap2/board-2430sdp.c
index c711ad6..39504f8 100644
--- a/arch/arm/mach-omap2/board-2430sdp.c
+++ b/arch/arm/mach-omap2/board-2430sdp.c
@@ -265,7 +265,6 @@ MACHINE_START(OMAP_2430SDP, "OMAP2430 sdp2430 board")
 	.map_io		= omap243x_map_io,
 	.init_early	= omap2430_init_early,
 	.init_irq	= omap2_init_irq,
-	.handle_irq	= omap2_intc_handle_irq,
 	.init_machine	= omap_2430sdp_init,
 	.init_late	= omap2430_init_late,
 	.init_time	= omap2_sync32k_timer_init,
diff --git a/arch/arm/mach-omap2/board-3430sdp.c b/arch/arm/mach-omap2/board-3430sdp.c
index d95d0ef..d21a304 100644
--- a/arch/arm/mach-omap2/board-3430sdp.c
+++ b/arch/arm/mach-omap2/board-3430sdp.c
@@ -625,7 +625,6 @@ MACHINE_START(OMAP_3430SDP, "OMAP3430 3430SDP board")
 	.map_io		= omap3_map_io,
 	.init_early	= omap3430_init_early,
 	.init_irq	= omap3_init_irq,
-	.handle_irq	= omap3_intc_handle_irq,
 	.init_machine	= omap_3430sdp_init,
 	.init_late	= omap3430_init_late,
 	.init_time	= omap3_sync32k_timer_init,
diff --git a/arch/arm/mach-omap2/board-am3517crane.c b/arch/arm/mach-omap2/board-am3517crane.c
index 0d499a1..212c316 100644
--- a/arch/arm/mach-omap2/board-am3517crane.c
+++ b/arch/arm/mach-omap2/board-am3517crane.c
@@ -142,7 +142,6 @@ MACHINE_START(CRANEBOARD, "AM3517/05 CRANEBOARD")
 	.map_io		= omap3_map_io,
 	.init_early	= am35xx_init_early,
 	.init_irq	= omap3_init_irq,
-	.handle_irq	= omap3_intc_handle_irq,
 	.init_machine	= am3517_crane_init,
 	.init_late	= am35xx_init_late,
 	.init_time	= omap3_sync32k_timer_init,
diff --git a/arch/arm/mach-omap2/board-am3517evm.c b/arch/arm/mach-omap2/board-am3517evm.c
index 543d9a8..489ad02 100644
--- a/arch/arm/mach-omap2/board-am3517evm.c
+++ b/arch/arm/mach-omap2/board-am3517evm.c
@@ -371,7 +371,6 @@ MACHINE_START(OMAP3517EVM, "OMAP3517/AM3517 EVM")
 	.map_io		= omap3_map_io,
 	.init_early	= am35xx_init_early,
 	.init_irq	= omap3_init_irq,
-	.handle_irq	= omap3_intc_handle_irq,
 	.init_machine	= am3517_evm_init,
 	.init_late	= am35xx_init_late,
 	.init_time	= omap3_sync32k_timer_init,
diff --git a/arch/arm/mach-omap2/board-cm-t35.c b/arch/arm/mach-omap2/board-cm-t35.c
index 8dd0ec8..2c27014 100644
--- a/arch/arm/mach-omap2/board-cm-t35.c
+++ b/arch/arm/mach-omap2/board-cm-t35.c
@@ -750,7 +750,6 @@ MACHINE_START(CM_T35, "Compulab CM-T35")
 	.map_io		= omap3_map_io,
 	.init_early	= omap35xx_init_early,
 	.init_irq	= omap3_init_irq,
-	.handle_irq	= omap3_intc_handle_irq,
 	.init_machine	= cm_t35_init,
 	.init_late	= omap35xx_init_late,
 	.init_time	= omap3_sync32k_timer_init,
@@ -763,7 +762,6 @@ MACHINE_START(CM_T3730, "Compulab CM-T3730")
 	.map_io		= omap3_map_io,
 	.init_early	= omap3630_init_early,
 	.init_irq	= omap3_init_irq,
-	.handle_irq	= omap3_intc_handle_irq,
 	.init_machine	= cm_t3730_init,
 	.init_late     = omap3630_init_late,
 	.init_time	= omap3_sync32k_timer_init,
diff --git a/arch/arm/mach-omap2/board-cm-t3517.c b/arch/arm/mach-omap2/board-cm-t3517.c
index 4eb5e6f..8a2c167 100644
--- a/arch/arm/mach-omap2/board-cm-t3517.c
+++ b/arch/arm/mach-omap2/board-cm-t3517.c
@@ -329,7 +329,6 @@ MACHINE_START(CM_T3517, "Compulab CM-T3517")
 	.map_io		= omap3_map_io,
 	.init_early	= am35xx_init_early,
 	.init_irq	= omap3_init_irq,
-	.handle_irq	= omap3_intc_handle_irq,
 	.init_machine	= cm_t3517_init,
 	.init_late	= am35xx_init_late,
 	.init_time	= omap3_gptimer_timer_init,
diff --git a/arch/arm/mach-omap2/board-devkit8000.c b/arch/arm/mach-omap2/board-devkit8000.c
index cdc4fb9..d8e4f34 100644
--- a/arch/arm/mach-omap2/board-devkit8000.c
+++ b/arch/arm/mach-omap2/board-devkit8000.c
@@ -647,7 +647,6 @@ MACHINE_START(DEVKIT8000, "OMAP3 Devkit8000")
 	.map_io		= omap3_map_io,
 	.init_early	= omap35xx_init_early,
 	.init_irq	= omap3_init_irq,
-	.handle_irq	= omap3_intc_handle_irq,
 	.init_machine	= devkit8000_init,
 	.init_late	= omap35xx_init_late,
 	.init_time	= omap3_secure_sync32k_timer_init,
diff --git a/arch/arm/mach-omap2/board-h4.c b/arch/arm/mach-omap2/board-h4.c
index f780834..d1a9924 100644
--- a/arch/arm/mach-omap2/board-h4.c
+++ b/arch/arm/mach-omap2/board-h4.c
@@ -357,7 +357,6 @@ MACHINE_START(OMAP_H4, "OMAP2420 H4 board")
 	.map_io		= omap242x_map_io,
 	.init_early	= omap2420_init_early,
 	.init_irq	= omap2_init_irq,
-	.handle_irq	= omap2_intc_handle_irq,
 	.init_machine	= omap_h4_init,
 	.init_late	= omap2420_init_late,
 	.init_time	= omap2_sync32k_timer_init,
diff --git a/arch/arm/mach-omap2/board-ldp.c b/arch/arm/mach-omap2/board-ldp.c
index 4ec8d82..fdb9759 100644
--- a/arch/arm/mach-omap2/board-ldp.c
+++ b/arch/arm/mach-omap2/board-ldp.c
@@ -417,7 +417,6 @@ MACHINE_START(OMAP_LDP, "OMAP LDP board")
 	.map_io		= omap3_map_io,
 	.init_early	= omap3430_init_early,
 	.init_irq	= omap3_init_irq,
-	.handle_irq	= omap3_intc_handle_irq,
 	.init_machine	= omap_ldp_init,
 	.init_late	= omap3430_init_late,
 	.init_time	= omap3_sync32k_timer_init,
diff --git a/arch/arm/mach-omap2/board-n8x0.c b/arch/arm/mach-omap2/board-n8x0.c
index 827d1500..18810d8 100644
--- a/arch/arm/mach-omap2/board-n8x0.c
+++ b/arch/arm/mach-omap2/board-n8x0.c
@@ -724,7 +724,6 @@ MACHINE_START(NOKIA_N800, "Nokia N800")
 	.map_io		= omap242x_map_io,
 	.init_early	= omap2420_init_early,
 	.init_irq	= omap2_init_irq,
-	.handle_irq	= omap2_intc_handle_irq,
 	.init_machine	= n8x0_init_machine,
 	.init_late	= omap2420_init_late,
 	.init_time	= omap2_sync32k_timer_init,
@@ -737,7 +736,6 @@ MACHINE_START(NOKIA_N810, "Nokia N810")
 	.map_io		= omap242x_map_io,
 	.init_early	= omap2420_init_early,
 	.init_irq	= omap2_init_irq,
-	.handle_irq	= omap2_intc_handle_irq,
 	.init_machine	= n8x0_init_machine,
 	.init_late	= omap2420_init_late,
 	.init_time	= omap2_sync32k_timer_init,
@@ -750,7 +748,6 @@ MACHINE_START(NOKIA_N810_WIMAX, "Nokia N810 WiMAX")
 	.map_io		= omap242x_map_io,
 	.init_early	= omap2420_init_early,
 	.init_irq	= omap2_init_irq,
-	.handle_irq	= omap2_intc_handle_irq,
 	.init_machine	= n8x0_init_machine,
 	.init_late	= omap2420_init_late,
 	.init_time	= omap2_sync32k_timer_init,
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
index d6ed819..bb3b9ca 100644
--- a/arch/arm/mach-omap2/board-omap3beagle.c
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
@@ -588,7 +588,6 @@ MACHINE_START(OMAP3_BEAGLE, "OMAP3 Beagle Board")
 	.map_io		= omap3_map_io,
 	.init_early	= omap3_init_early,
 	.init_irq	= omap3_init_irq,
-	.handle_irq	= omap3_intc_handle_irq,
 	.init_machine	= omap3_beagle_init,
 	.init_late	= omap3_init_late,
 	.init_time	= omap3_secure_sync32k_timer_init,
diff --git a/arch/arm/mach-omap2/board-omap3logic.c b/arch/arm/mach-omap2/board-omap3logic.c
index bab51e6..6049f60 100644
--- a/arch/arm/mach-omap2/board-omap3logic.c
+++ b/arch/arm/mach-omap2/board-omap3logic.c
@@ -230,7 +230,6 @@ MACHINE_START(OMAP3_TORPEDO, "Logic OMAP3 Torpedo board")
 	.map_io		= omap3_map_io,
 	.init_early	= omap35xx_init_early,
 	.init_irq	= omap3_init_irq,
-	.handle_irq	= omap3_intc_handle_irq,
 	.init_machine	= omap3logic_init,
 	.init_late	= omap35xx_init_late,
 	.init_time	= omap3_sync32k_timer_init,
@@ -243,7 +242,6 @@ MACHINE_START(OMAP3530_LV_SOM, "OMAP Logic 3530 LV SOM board")
 	.map_io		= omap3_map_io,
 	.init_early	= omap35xx_init_early,
 	.init_irq	= omap3_init_irq,
-	.handle_irq	= omap3_intc_handle_irq,
 	.init_machine	= omap3logic_init,
 	.init_late	= omap35xx_init_late,
 	.init_time	= omap3_sync32k_timer_init,
diff --git a/arch/arm/mach-omap2/board-omap3pandora.c b/arch/arm/mach-omap2/board-omap3pandora.c
index de1bc6b..cb675fe 100644
--- a/arch/arm/mach-omap2/board-omap3pandora.c
+++ b/arch/arm/mach-omap2/board-omap3pandora.c
@@ -622,7 +622,6 @@ MACHINE_START(OMAP3_PANDORA, "Pandora Handheld Console")
 	.map_io		= omap3_map_io,
 	.init_early	= omap35xx_init_early,
 	.init_irq	= omap3_init_irq,
-	.handle_irq	= omap3_intc_handle_irq,
 	.init_machine	= omap3pandora_init,
 	.init_late	= omap35xx_init_late,
 	.init_time	= omap3_sync32k_timer_init,
diff --git a/arch/arm/mach-omap2/board-omap3stalker.c b/arch/arm/mach-omap2/board-omap3stalker.c
index 119efaf..06db64b 100644
--- a/arch/arm/mach-omap2/board-omap3stalker.c
+++ b/arch/arm/mach-omap2/board-omap3stalker.c
@@ -430,7 +430,6 @@ MACHINE_START(SBC3530, "OMAP3 STALKER")
 	.map_io			= omap3_map_io,
 	.init_early		= omap35xx_init_early,
 	.init_irq		= omap3_init_irq,
-	.handle_irq		= omap3_intc_handle_irq,
 	.init_machine		= omap3_stalker_init,
 	.init_late		= omap35xx_init_late,
 	.init_time		= omap3_secure_sync32k_timer_init,
diff --git a/arch/arm/mach-omap2/board-omap3touchbook.c b/arch/arm/mach-omap2/board-omap3touchbook.c
index 7da48bc..d454508 100644
--- a/arch/arm/mach-omap2/board-omap3touchbook.c
+++ b/arch/arm/mach-omap2/board-omap3touchbook.c
@@ -388,7 +388,6 @@ MACHINE_START(TOUCHBOOK, "OMAP3 touchbook Board")
 	.map_io		= omap3_map_io,
 	.init_early	= omap3430_init_early,
 	.init_irq	= omap3_init_irq,
-	.handle_irq	= omap3_intc_handle_irq,
 	.init_machine	= omap3_touchbook_init,
 	.init_late	= omap3430_init_late,
 	.init_time	= omap3_secure_sync32k_timer_init,
diff --git a/arch/arm/mach-omap2/board-overo.c b/arch/arm/mach-omap2/board-overo.c
index f6d3841..2dae6cc 100644
--- a/arch/arm/mach-omap2/board-overo.c
+++ b/arch/arm/mach-omap2/board-overo.c
@@ -564,7 +564,6 @@ MACHINE_START(OVERO, "Gumstix Overo")
 	.map_io		= omap3_map_io,
 	.init_early	= omap35xx_init_early,
 	.init_irq	= omap3_init_irq,
-	.handle_irq	= omap3_intc_handle_irq,
 	.init_machine	= overo_init,
 	.init_late	= omap35xx_init_late,
 	.init_time	= omap3_sync32k_timer_init,
diff --git a/arch/arm/mach-omap2/board-rx51.c b/arch/arm/mach-omap2/board-rx51.c
index db168c9..2d1e5a6 100644
--- a/arch/arm/mach-omap2/board-rx51.c
+++ b/arch/arm/mach-omap2/board-rx51.c
@@ -134,7 +134,6 @@ MACHINE_START(NOKIA_RX51, "Nokia RX-51 board")
 	.map_io		= omap3_map_io,
 	.init_early	= omap3430_init_early,
 	.init_irq	= omap3_init_irq,
-	.handle_irq	= omap3_intc_handle_irq,
 	.init_machine	= rx51_init,
 	.init_late	= omap3430_init_late,
 	.init_time	= omap3_sync32k_timer_init,
diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c
index 6b9bf0b..d936955 100644
--- a/arch/arm/mach-omap2/irq.c
+++ b/arch/arm/mach-omap2/irq.c
@@ -287,16 +287,19 @@ asmlinkage void __exception_irq_entry omap2_intc_handle_irq(struct pt_regs *regs
 void __init omap2_init_irq(void)
 {
 	omap_init_irq(OMAP24XX_IC_BASE, 96, NULL);
+	set_handle_irq(omap2_intc_handle_irq);
 }
 
 void __init omap3_init_irq(void)
 {
 	omap_init_irq(OMAP34XX_IC_BASE, 96, NULL);
+	set_handle_irq(omap2_intc_handle_irq);
 }
 
 void __init ti81xx_init_irq(void)
 {
 	omap_init_irq(OMAP34XX_IC_BASE, 128, NULL);
+	set_handle_irq(omap2_intc_handle_irq);
 }
 
 static int __init intc_of_init(struct device_node *node,
-- 
1.8.4.GIT

^ permalink raw reply related	[flat|nested] 82+ messages in thread

* [RFT/RFC/PATCH 25/31] arm: omap: irq: drop omap3_intc_handle_irq()
  2013-11-20 18:08 ` Felipe Balbi
@ 2013-11-20 18:09   ` Felipe Balbi
  -1 siblings, 0 replies; 82+ messages in thread
From: Felipe Balbi @ 2013-11-20 18:09 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Linux OMAP Mailing List, Linux ARM Kernel Mailing List, Felipe Balbi

there are no more users for that function, we
can safely drop it.

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 arch/arm/mach-omap2/common.h | 1 -
 arch/arm/mach-omap2/irq.c    | 5 -----
 2 files changed, 6 deletions(-)

diff --git a/arch/arm/mach-omap2/common.h b/arch/arm/mach-omap2/common.h
index 4df64c36..bfc5e5f 100644
--- a/arch/arm/mach-omap2/common.h
+++ b/arch/arm/mach-omap2/common.h
@@ -200,7 +200,6 @@ void omap3_init_irq(void);
 void ti81xx_init_irq(void);
 extern int omap_irq_pending(void);
 void omap2_intc_handle_irq(struct pt_regs *regs);
-void omap3_intc_handle_irq(struct pt_regs *regs);
 void omap_gic_of_init(void);
 
 #ifdef CONFIG_CACHE_L2X0
diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c
index d936955..f72af7a 100644
--- a/arch/arm/mach-omap2/irq.c
+++ b/arch/arm/mach-omap2/irq.c
@@ -329,8 +329,3 @@ static int __init intc_of_init(struct device_node *node,
 IRQCHIP_DECLARE(omap2_intc, "ti,omap2-intc", intc_of_init);
 IRQCHIP_DECLARE(omap3_intc, "ti,omap3-intc", intc_of_init);
 IRQCHIP_DECLARE(am33xx_intc, "ti,am33xx-intc", intc_of_init);
-
-asmlinkage void __exception_irq_entry omap3_intc_handle_irq(struct pt_regs *regs)
-{
-	omap_intc_handle_irq(regs);
-}
-- 
1.8.4.GIT


^ permalink raw reply related	[flat|nested] 82+ messages in thread

* [RFT/RFC/PATCH 25/31] arm: omap: irq: drop omap3_intc_handle_irq()
@ 2013-11-20 18:09   ` Felipe Balbi
  0 siblings, 0 replies; 82+ messages in thread
From: Felipe Balbi @ 2013-11-20 18:09 UTC (permalink / raw)
  To: linux-arm-kernel

there are no more users for that function, we
can safely drop it.

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 arch/arm/mach-omap2/common.h | 1 -
 arch/arm/mach-omap2/irq.c    | 5 -----
 2 files changed, 6 deletions(-)

diff --git a/arch/arm/mach-omap2/common.h b/arch/arm/mach-omap2/common.h
index 4df64c36..bfc5e5f 100644
--- a/arch/arm/mach-omap2/common.h
+++ b/arch/arm/mach-omap2/common.h
@@ -200,7 +200,6 @@ void omap3_init_irq(void);
 void ti81xx_init_irq(void);
 extern int omap_irq_pending(void);
 void omap2_intc_handle_irq(struct pt_regs *regs);
-void omap3_intc_handle_irq(struct pt_regs *regs);
 void omap_gic_of_init(void);
 
 #ifdef CONFIG_CACHE_L2X0
diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c
index d936955..f72af7a 100644
--- a/arch/arm/mach-omap2/irq.c
+++ b/arch/arm/mach-omap2/irq.c
@@ -329,8 +329,3 @@ static int __init intc_of_init(struct device_node *node,
 IRQCHIP_DECLARE(omap2_intc, "ti,omap2-intc", intc_of_init);
 IRQCHIP_DECLARE(omap3_intc, "ti,omap3-intc", intc_of_init);
 IRQCHIP_DECLARE(am33xx_intc, "ti,am33xx-intc", intc_of_init);
-
-asmlinkage void __exception_irq_entry omap3_intc_handle_irq(struct pt_regs *regs)
-{
-	omap_intc_handle_irq(regs);
-}
-- 
1.8.4.GIT

^ permalink raw reply related	[flat|nested] 82+ messages in thread

* [RFT/RFC/PATCH 26/31] arm: omap: irq: drop omap2_intc_handle_irq()
  2013-11-20 18:08 ` Felipe Balbi
@ 2013-11-20 18:09   ` Felipe Balbi
  -1 siblings, 0 replies; 82+ messages in thread
From: Felipe Balbi @ 2013-11-20 18:09 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Linux OMAP Mailing List, Linux ARM Kernel Mailing List, Felipe Balbi

that was just a no-op wrapper around omap_intc_handle_irq
anyway.

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 arch/arm/mach-omap2/common.h |  1 -
 arch/arm/mach-omap2/irq.c    | 16 ++++++----------
 2 files changed, 6 insertions(+), 11 deletions(-)

diff --git a/arch/arm/mach-omap2/common.h b/arch/arm/mach-omap2/common.h
index bfc5e5f..427160b 100644
--- a/arch/arm/mach-omap2/common.h
+++ b/arch/arm/mach-omap2/common.h
@@ -199,7 +199,6 @@ void omap2_init_irq(void);
 void omap3_init_irq(void);
 void ti81xx_init_irq(void);
 extern int omap_irq_pending(void);
-void omap2_intc_handle_irq(struct pt_regs *regs);
 void omap_gic_of_init(void);
 
 #ifdef CONFIG_CACHE_L2X0
diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c
index f72af7a..5425258 100644
--- a/arch/arm/mach-omap2/irq.c
+++ b/arch/arm/mach-omap2/irq.c
@@ -245,7 +245,8 @@ static void __init omap_init_irq(u32 base, int nr_irqs,
 		omap_alloc_gc(omap_irq_base + j, j + irq_base, 32);
 }
 
-static inline void omap_intc_handle_irq(struct pt_regs *regs)
+static asmlinkage void __exception_irq_entry
+omap_intc_handle_irq(struct pt_regs *regs)
 {
 	u32 irqnr;
 
@@ -279,27 +280,22 @@ out:
 	} while (irqnr);
 }
 
-asmlinkage void __exception_irq_entry omap2_intc_handle_irq(struct pt_regs *regs)
-{
-	omap_intc_handle_irq(regs);
-}
-
 void __init omap2_init_irq(void)
 {
 	omap_init_irq(OMAP24XX_IC_BASE, 96, NULL);
-	set_handle_irq(omap2_intc_handle_irq);
+	set_handle_irq(omap_intc_handle_irq);
 }
 
 void __init omap3_init_irq(void)
 {
 	omap_init_irq(OMAP34XX_IC_BASE, 96, NULL);
-	set_handle_irq(omap2_intc_handle_irq);
+	set_handle_irq(omap_intc_handle_irq);
 }
 
 void __init ti81xx_init_irq(void)
 {
 	omap_init_irq(OMAP34XX_IC_BASE, 128, NULL);
-	set_handle_irq(omap2_intc_handle_irq);
+	set_handle_irq(omap_intc_handle_irq);
 }
 
 static int __init intc_of_init(struct device_node *node,
@@ -321,7 +317,7 @@ static int __init intc_of_init(struct device_node *node,
 
 	omap_init_irq(res.start, nr_irq, of_node_get(node));
 
-	set_handle_irq(omap2_intc_handle_irq);
+	set_handle_irq(omap_intc_handle_irq);
 
 	return 0;
 }
-- 
1.8.4.GIT


^ permalink raw reply related	[flat|nested] 82+ messages in thread

* [RFT/RFC/PATCH 26/31] arm: omap: irq: drop omap2_intc_handle_irq()
@ 2013-11-20 18:09   ` Felipe Balbi
  0 siblings, 0 replies; 82+ messages in thread
From: Felipe Balbi @ 2013-11-20 18:09 UTC (permalink / raw)
  To: linux-arm-kernel

that was just a no-op wrapper around omap_intc_handle_irq
anyway.

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 arch/arm/mach-omap2/common.h |  1 -
 arch/arm/mach-omap2/irq.c    | 16 ++++++----------
 2 files changed, 6 insertions(+), 11 deletions(-)

diff --git a/arch/arm/mach-omap2/common.h b/arch/arm/mach-omap2/common.h
index bfc5e5f..427160b 100644
--- a/arch/arm/mach-omap2/common.h
+++ b/arch/arm/mach-omap2/common.h
@@ -199,7 +199,6 @@ void omap2_init_irq(void);
 void omap3_init_irq(void);
 void ti81xx_init_irq(void);
 extern int omap_irq_pending(void);
-void omap2_intc_handle_irq(struct pt_regs *regs);
 void omap_gic_of_init(void);
 
 #ifdef CONFIG_CACHE_L2X0
diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c
index f72af7a..5425258 100644
--- a/arch/arm/mach-omap2/irq.c
+++ b/arch/arm/mach-omap2/irq.c
@@ -245,7 +245,8 @@ static void __init omap_init_irq(u32 base, int nr_irqs,
 		omap_alloc_gc(omap_irq_base + j, j + irq_base, 32);
 }
 
-static inline void omap_intc_handle_irq(struct pt_regs *regs)
+static asmlinkage void __exception_irq_entry
+omap_intc_handle_irq(struct pt_regs *regs)
 {
 	u32 irqnr;
 
@@ -279,27 +280,22 @@ out:
 	} while (irqnr);
 }
 
-asmlinkage void __exception_irq_entry omap2_intc_handle_irq(struct pt_regs *regs)
-{
-	omap_intc_handle_irq(regs);
-}
-
 void __init omap2_init_irq(void)
 {
 	omap_init_irq(OMAP24XX_IC_BASE, 96, NULL);
-	set_handle_irq(omap2_intc_handle_irq);
+	set_handle_irq(omap_intc_handle_irq);
 }
 
 void __init omap3_init_irq(void)
 {
 	omap_init_irq(OMAP34XX_IC_BASE, 96, NULL);
-	set_handle_irq(omap2_intc_handle_irq);
+	set_handle_irq(omap_intc_handle_irq);
 }
 
 void __init ti81xx_init_irq(void)
 {
 	omap_init_irq(OMAP34XX_IC_BASE, 128, NULL);
-	set_handle_irq(omap2_intc_handle_irq);
+	set_handle_irq(omap_intc_handle_irq);
 }
 
 static int __init intc_of_init(struct device_node *node,
@@ -321,7 +317,7 @@ static int __init intc_of_init(struct device_node *node,
 
 	omap_init_irq(res.start, nr_irq, of_node_get(node));
 
-	set_handle_irq(omap2_intc_handle_irq);
+	set_handle_irq(omap_intc_handle_irq);
 
 	return 0;
 }
-- 
1.8.4.GIT

^ permalink raw reply related	[flat|nested] 82+ messages in thread

* [RFT/RFC/PATCH 27/31] arm: omap: irq: drop omap_pending_irq()
  2013-11-20 18:08 ` Felipe Balbi
@ 2013-11-20 18:09   ` Felipe Balbi
  -1 siblings, 0 replies; 82+ messages in thread
From: Felipe Balbi @ 2013-11-20 18:09 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Linux OMAP Mailing List, Linux ARM Kernel Mailing List, Felipe Balbi

We already ack pending IRQs during suspend,
which renders the check for pending IRQs
quite unnecessary.

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 arch/arm/mach-omap2/common.h      |  1 -
 arch/arm/mach-omap2/cpuidle34xx.c |  2 +-
 arch/arm/mach-omap2/irq.c         | 11 -----------
 arch/arm/mach-omap2/pm24xx.c      | 11 -----------
 arch/arm/mach-omap2/pm34xx.c      |  3 ---
 5 files changed, 1 insertion(+), 27 deletions(-)

diff --git a/arch/arm/mach-omap2/common.h b/arch/arm/mach-omap2/common.h
index 427160b..f44a410 100644
--- a/arch/arm/mach-omap2/common.h
+++ b/arch/arm/mach-omap2/common.h
@@ -198,7 +198,6 @@ extern struct device *omap4_get_dsp_device(void);
 void omap2_init_irq(void);
 void omap3_init_irq(void);
 void ti81xx_init_irq(void);
-extern int omap_irq_pending(void);
 void omap_gic_of_init(void);
 
 #ifdef CONFIG_CACHE_L2X0
diff --git a/arch/arm/mach-omap2/cpuidle34xx.c b/arch/arm/mach-omap2/cpuidle34xx.c
index e18709d..96cced3 100644
--- a/arch/arm/mach-omap2/cpuidle34xx.c
+++ b/arch/arm/mach-omap2/cpuidle34xx.c
@@ -112,7 +112,7 @@ static int omap3_enter_idle(struct cpuidle_device *dev,
 {
 	struct omap3_idle_statedata *cx = &omap3_idle_data[index];
 
-	if (omap_irq_pending() || need_resched())
+	if (need_resched())
 		goto return_sleep_time;
 
 	/* Deny idle for C1 */
diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c
index 5425258..397157a 100644
--- a/arch/arm/mach-omap2/irq.c
+++ b/arch/arm/mach-omap2/irq.c
@@ -186,17 +186,6 @@ static void __init omap_irq_soft_reset(void)
 	intc_writel(INTC_SYSCONFIG, 1 << 0);
 }
 
-int omap_irq_pending(void)
-{
-	int irq;
-
-	for (irq = 0; irq < omap_nr_irqs; irq += 32)
-		if (intc_readl(INTC_PENDING_IRQ0 +
-					((irq >> 5) << 5)))
-			return 1;
-	return 0;
-}
-
 static __init void
 omap_alloc_gc(void __iomem *base, unsigned int irq_start, unsigned int num)
 {
diff --git a/arch/arm/mach-omap2/pm24xx.c b/arch/arm/mach-omap2/pm24xx.c
index 8c07594..33ea27c 100644
--- a/arch/arm/mach-omap2/pm24xx.c
+++ b/arch/arm/mach-omap2/pm24xx.c
@@ -88,17 +88,11 @@ static int omap2_enter_full_retention(void)
 
 	omap2_gpio_prepare_for_idle(0);
 
-	/* One last check for pending IRQs to avoid extra latency due
-	 * to sleeping unnecessarily. */
-	if (omap_irq_pending())
-		goto no_sleep;
-
 	/* Jump to SRAM suspend code */
 	omap2_sram_suspend(sdrc_read_reg(SDRC_DLLA_CTRL),
 			   OMAP_SDRC_REGADDR(SDRC_DLLA_CTRL),
 			   OMAP_SDRC_REGADDR(SDRC_POWER));
 
-no_sleep:
 	omap2_gpio_resume_after_idle();
 
 	clk_enable(osc_ck);
@@ -181,15 +175,10 @@ static int omap2_can_sleep(void)
 static void omap2_pm_idle(void)
 {
 	if (!omap2_can_sleep()) {
-		if (omap_irq_pending())
-			return;
 		omap2_enter_mpu_retention();
 		return;
 	}
 
-	if (omap_irq_pending())
-		return;
-
 	omap2_enter_full_retention();
 }
 
diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
index 2764796..7c43fa0 100644
--- a/arch/arm/mach-omap2/pm34xx.c
+++ b/arch/arm/mach-omap2/pm34xx.c
@@ -338,9 +338,6 @@ void omap_sram_idle(void)
 
 static void omap3_pm_idle(void)
 {
-	if (omap_irq_pending())
-		return;
-
 	trace_cpu_idle(1, smp_processor_id());
 
 	omap_sram_idle();
-- 
1.8.4.GIT


^ permalink raw reply related	[flat|nested] 82+ messages in thread

* [RFT/RFC/PATCH 27/31] arm: omap: irq: drop omap_pending_irq()
@ 2013-11-20 18:09   ` Felipe Balbi
  0 siblings, 0 replies; 82+ messages in thread
From: Felipe Balbi @ 2013-11-20 18:09 UTC (permalink / raw)
  To: linux-arm-kernel

We already ack pending IRQs during suspend,
which renders the check for pending IRQs
quite unnecessary.

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 arch/arm/mach-omap2/common.h      |  1 -
 arch/arm/mach-omap2/cpuidle34xx.c |  2 +-
 arch/arm/mach-omap2/irq.c         | 11 -----------
 arch/arm/mach-omap2/pm24xx.c      | 11 -----------
 arch/arm/mach-omap2/pm34xx.c      |  3 ---
 5 files changed, 1 insertion(+), 27 deletions(-)

diff --git a/arch/arm/mach-omap2/common.h b/arch/arm/mach-omap2/common.h
index 427160b..f44a410 100644
--- a/arch/arm/mach-omap2/common.h
+++ b/arch/arm/mach-omap2/common.h
@@ -198,7 +198,6 @@ extern struct device *omap4_get_dsp_device(void);
 void omap2_init_irq(void);
 void omap3_init_irq(void);
 void ti81xx_init_irq(void);
-extern int omap_irq_pending(void);
 void omap_gic_of_init(void);
 
 #ifdef CONFIG_CACHE_L2X0
diff --git a/arch/arm/mach-omap2/cpuidle34xx.c b/arch/arm/mach-omap2/cpuidle34xx.c
index e18709d..96cced3 100644
--- a/arch/arm/mach-omap2/cpuidle34xx.c
+++ b/arch/arm/mach-omap2/cpuidle34xx.c
@@ -112,7 +112,7 @@ static int omap3_enter_idle(struct cpuidle_device *dev,
 {
 	struct omap3_idle_statedata *cx = &omap3_idle_data[index];
 
-	if (omap_irq_pending() || need_resched())
+	if (need_resched())
 		goto return_sleep_time;
 
 	/* Deny idle for C1 */
diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c
index 5425258..397157a 100644
--- a/arch/arm/mach-omap2/irq.c
+++ b/arch/arm/mach-omap2/irq.c
@@ -186,17 +186,6 @@ static void __init omap_irq_soft_reset(void)
 	intc_writel(INTC_SYSCONFIG, 1 << 0);
 }
 
-int omap_irq_pending(void)
-{
-	int irq;
-
-	for (irq = 0; irq < omap_nr_irqs; irq += 32)
-		if (intc_readl(INTC_PENDING_IRQ0 +
-					((irq >> 5) << 5)))
-			return 1;
-	return 0;
-}
-
 static __init void
 omap_alloc_gc(void __iomem *base, unsigned int irq_start, unsigned int num)
 {
diff --git a/arch/arm/mach-omap2/pm24xx.c b/arch/arm/mach-omap2/pm24xx.c
index 8c07594..33ea27c 100644
--- a/arch/arm/mach-omap2/pm24xx.c
+++ b/arch/arm/mach-omap2/pm24xx.c
@@ -88,17 +88,11 @@ static int omap2_enter_full_retention(void)
 
 	omap2_gpio_prepare_for_idle(0);
 
-	/* One last check for pending IRQs to avoid extra latency due
-	 * to sleeping unnecessarily. */
-	if (omap_irq_pending())
-		goto no_sleep;
-
 	/* Jump to SRAM suspend code */
 	omap2_sram_suspend(sdrc_read_reg(SDRC_DLLA_CTRL),
 			   OMAP_SDRC_REGADDR(SDRC_DLLA_CTRL),
 			   OMAP_SDRC_REGADDR(SDRC_POWER));
 
-no_sleep:
 	omap2_gpio_resume_after_idle();
 
 	clk_enable(osc_ck);
@@ -181,15 +175,10 @@ static int omap2_can_sleep(void)
 static void omap2_pm_idle(void)
 {
 	if (!omap2_can_sleep()) {
-		if (omap_irq_pending())
-			return;
 		omap2_enter_mpu_retention();
 		return;
 	}
 
-	if (omap_irq_pending())
-		return;
-
 	omap2_enter_full_retention();
 }
 
diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
index 2764796..7c43fa0 100644
--- a/arch/arm/mach-omap2/pm34xx.c
+++ b/arch/arm/mach-omap2/pm34xx.c
@@ -338,9 +338,6 @@ void omap_sram_idle(void)
 
 static void omap3_pm_idle(void)
 {
-	if (omap_irq_pending())
-		return;
-
 	trace_cpu_idle(1, smp_processor_id());
 
 	omap_sram_idle();
-- 
1.8.4.GIT

^ permalink raw reply related	[flat|nested] 82+ messages in thread

* [RFT/RFC/PATCH 28/31] arm: omap: irq: remove unnecessary header
  2013-11-20 18:08 ` Felipe Balbi
@ 2013-11-20 18:09   ` Felipe Balbi
  -1 siblings, 0 replies; 82+ messages in thread
From: Felipe Balbi @ 2013-11-20 18:09 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Linux OMAP Mailing List, Linux ARM Kernel Mailing List, Felipe Balbi

There's no need for that header to be included.

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 arch/arm/mach-omap2/irq.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c
index 397157a..5d4e883 100644
--- a/arch/arm/mach-omap2/irq.c
+++ b/arch/arm/mach-omap2/irq.c
@@ -24,7 +24,6 @@
 #include <linux/of_irq.h>
 
 #include "soc.h"
-#include "iomap.h"
 #include "common.h"
 #include "../../drivers/irqchip/irqchip.h"
 
-- 
1.8.4.GIT


^ permalink raw reply related	[flat|nested] 82+ messages in thread

* [RFT/RFC/PATCH 28/31] arm: omap: irq: remove unnecessary header
@ 2013-11-20 18:09   ` Felipe Balbi
  0 siblings, 0 replies; 82+ messages in thread
From: Felipe Balbi @ 2013-11-20 18:09 UTC (permalink / raw)
  To: linux-arm-kernel

There's no need for that header to be included.

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 arch/arm/mach-omap2/irq.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c
index 397157a..5d4e883 100644
--- a/arch/arm/mach-omap2/irq.c
+++ b/arch/arm/mach-omap2/irq.c
@@ -24,7 +24,6 @@
 #include <linux/of_irq.h>
 
 #include "soc.h"
-#include "iomap.h"
 #include "common.h"
 #include "../../drivers/irqchip/irqchip.h"
 
-- 
1.8.4.GIT

^ permalink raw reply related	[flat|nested] 82+ messages in thread

* [RFT/RFC/PATCH 29/31] arm: omap: irq: remove nr_irqs argument
  2013-11-20 18:08 ` Felipe Balbi
@ 2013-11-20 18:09   ` Felipe Balbi
  -1 siblings, 0 replies; 82+ messages in thread
From: Felipe Balbi @ 2013-11-20 18:09 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Linux OMAP Mailing List, Linux ARM Kernel Mailing List, Felipe Balbi

we can set our global omap_nr_irqs early on
and drop the extra argument to omap_init_irq().

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 arch/arm/mach-omap2/irq.c | 25 +++++++++++++------------
 1 file changed, 13 insertions(+), 12 deletions(-)

diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c
index 5d4e883..a411ed4 100644
--- a/arch/arm/mach-omap2/irq.c
+++ b/arch/arm/mach-omap2/irq.c
@@ -207,8 +207,7 @@ omap_alloc_gc(void __iomem *base, unsigned int irq_start, unsigned int num)
 				IRQ_NOREQUEST | IRQ_NOPROBE, 0);
 }
 
-static void __init omap_init_irq(u32 base, int nr_irqs,
-				 struct device_node *node)
+static void __init omap_init_irq(u32 base, struct device_node *node)
 {
 	int j, irq_base;
 
@@ -216,15 +215,13 @@ static void __init omap_init_irq(u32 base, int nr_irqs,
 	if (WARN_ON(!omap_irq_base))
 		return;
 
-	omap_nr_irqs = nr_irqs;
-
-	irq_base = irq_alloc_descs(-1, 0, nr_irqs, 0);
+	irq_base = irq_alloc_descs(-1, 0, omap_nr_irqs, 0);
 	if (irq_base < 0) {
 		pr_warn("Couldn't allocate IRQ numbers\n");
 		irq_base = 0;
 	}
 
-	domain = irq_domain_add_legacy(node, nr_irqs, irq_base, 0,
+	domain = irq_domain_add_legacy(node, omap_nr_irqs, irq_base, 0,
 			&irq_domain_simple_ops, NULL);
 
 	omap_irq_soft_reset();
@@ -270,19 +267,22 @@ out:
 
 void __init omap2_init_irq(void)
 {
-	omap_init_irq(OMAP24XX_IC_BASE, 96, NULL);
+	omap_nr_irqs = 96;
+	omap_init_irq(OMAP24XX_IC_BASE, NULL);
 	set_handle_irq(omap_intc_handle_irq);
 }
 
 void __init omap3_init_irq(void)
 {
-	omap_init_irq(OMAP34XX_IC_BASE, 96, NULL);
+	omap_nr_irqs = 96;
+	omap_init_irq(OMAP34XX_IC_BASE, NULL);
 	set_handle_irq(omap_intc_handle_irq);
 }
 
 void __init ti81xx_init_irq(void)
 {
-	omap_init_irq(OMAP34XX_IC_BASE, 128, NULL);
+	omap_nr_irqs = 96;
+	omap_init_irq(OMAP34XX_IC_BASE, NULL);
 	set_handle_irq(omap_intc_handle_irq);
 }
 
@@ -290,7 +290,8 @@ static int __init intc_of_init(struct device_node *node,
 			     struct device_node *parent)
 {
 	struct resource res;
-	u32 nr_irq = 96;
+
+	omap_nr_irqs = 96;
 
 	if (WARN_ON(!node))
 		return -ENODEV;
@@ -301,9 +302,9 @@ static int __init intc_of_init(struct device_node *node,
 	}
 
 	if (of_device_is_compatible(node, "ti,am33xx-intc"))
-		nr_irq = 128;
+		omap_nr_irqs = 128;
 
-	omap_init_irq(res.start, nr_irq, of_node_get(node));
+	omap_init_irq(res.start, of_node_get(node));
 
 	set_handle_irq(omap_intc_handle_irq);
 
-- 
1.8.4.GIT


^ permalink raw reply related	[flat|nested] 82+ messages in thread

* [RFT/RFC/PATCH 29/31] arm: omap: irq: remove nr_irqs argument
@ 2013-11-20 18:09   ` Felipe Balbi
  0 siblings, 0 replies; 82+ messages in thread
From: Felipe Balbi @ 2013-11-20 18:09 UTC (permalink / raw)
  To: linux-arm-kernel

we can set our global omap_nr_irqs early on
and drop the extra argument to omap_init_irq().

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 arch/arm/mach-omap2/irq.c | 25 +++++++++++++------------
 1 file changed, 13 insertions(+), 12 deletions(-)

diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c
index 5d4e883..a411ed4 100644
--- a/arch/arm/mach-omap2/irq.c
+++ b/arch/arm/mach-omap2/irq.c
@@ -207,8 +207,7 @@ omap_alloc_gc(void __iomem *base, unsigned int irq_start, unsigned int num)
 				IRQ_NOREQUEST | IRQ_NOPROBE, 0);
 }
 
-static void __init omap_init_irq(u32 base, int nr_irqs,
-				 struct device_node *node)
+static void __init omap_init_irq(u32 base, struct device_node *node)
 {
 	int j, irq_base;
 
@@ -216,15 +215,13 @@ static void __init omap_init_irq(u32 base, int nr_irqs,
 	if (WARN_ON(!omap_irq_base))
 		return;
 
-	omap_nr_irqs = nr_irqs;
-
-	irq_base = irq_alloc_descs(-1, 0, nr_irqs, 0);
+	irq_base = irq_alloc_descs(-1, 0, omap_nr_irqs, 0);
 	if (irq_base < 0) {
 		pr_warn("Couldn't allocate IRQ numbers\n");
 		irq_base = 0;
 	}
 
-	domain = irq_domain_add_legacy(node, nr_irqs, irq_base, 0,
+	domain = irq_domain_add_legacy(node, omap_nr_irqs, irq_base, 0,
 			&irq_domain_simple_ops, NULL);
 
 	omap_irq_soft_reset();
@@ -270,19 +267,22 @@ out:
 
 void __init omap2_init_irq(void)
 {
-	omap_init_irq(OMAP24XX_IC_BASE, 96, NULL);
+	omap_nr_irqs = 96;
+	omap_init_irq(OMAP24XX_IC_BASE, NULL);
 	set_handle_irq(omap_intc_handle_irq);
 }
 
 void __init omap3_init_irq(void)
 {
-	omap_init_irq(OMAP34XX_IC_BASE, 96, NULL);
+	omap_nr_irqs = 96;
+	omap_init_irq(OMAP34XX_IC_BASE, NULL);
 	set_handle_irq(omap_intc_handle_irq);
 }
 
 void __init ti81xx_init_irq(void)
 {
-	omap_init_irq(OMAP34XX_IC_BASE, 128, NULL);
+	omap_nr_irqs = 96;
+	omap_init_irq(OMAP34XX_IC_BASE, NULL);
 	set_handle_irq(omap_intc_handle_irq);
 }
 
@@ -290,7 +290,8 @@ static int __init intc_of_init(struct device_node *node,
 			     struct device_node *parent)
 {
 	struct resource res;
-	u32 nr_irq = 96;
+
+	omap_nr_irqs = 96;
 
 	if (WARN_ON(!node))
 		return -ENODEV;
@@ -301,9 +302,9 @@ static int __init intc_of_init(struct device_node *node,
 	}
 
 	if (of_device_is_compatible(node, "ti,am33xx-intc"))
-		nr_irq = 128;
+		omap_nr_irqs = 128;
 
-	omap_init_irq(res.start, nr_irq, of_node_get(node));
+	omap_init_irq(res.start, of_node_get(node));
 
 	set_handle_irq(omap_intc_handle_irq);
 
-- 
1.8.4.GIT

^ permalink raw reply related	[flat|nested] 82+ messages in thread

* [RFT/RFC/PATCH 30/31] arm: omap: irq: introduce omap_nr_pending
  2013-11-20 18:08 ` Felipe Balbi
@ 2013-11-20 18:09   ` Felipe Balbi
  -1 siblings, 0 replies; 82+ messages in thread
From: Felipe Balbi @ 2013-11-20 18:09 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Linux OMAP Mailing List, Linux ARM Kernel Mailing List, Felipe Balbi

that variable will tell us how many INTC_PENDING_IRQn
registers we have. It'll be used on a following patch
to cleanup omap_intc_handle_irq() a bit.

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 arch/arm/mach-omap2/irq.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c
index a411ed4..1b2266a 100644
--- a/arch/arm/mach-omap2/irq.c
+++ b/arch/arm/mach-omap2/irq.c
@@ -70,6 +70,7 @@ static struct omap_intc_regs intc_context;
 
 static struct irq_domain *domain;
 static void __iomem *omap_irq_base;
+static int omap_nr_pending = 3;
 static int omap_nr_irqs = 96;
 
 /* INTC bank register get/set */
@@ -268,6 +269,7 @@ out:
 void __init omap2_init_irq(void)
 {
 	omap_nr_irqs = 96;
+	omap_nr_pending = 3;
 	omap_init_irq(OMAP24XX_IC_BASE, NULL);
 	set_handle_irq(omap_intc_handle_irq);
 }
@@ -275,6 +277,7 @@ void __init omap2_init_irq(void)
 void __init omap3_init_irq(void)
 {
 	omap_nr_irqs = 96;
+	omap_nr_pending = 3;
 	omap_init_irq(OMAP34XX_IC_BASE, NULL);
 	set_handle_irq(omap_intc_handle_irq);
 }
@@ -282,6 +285,7 @@ void __init omap3_init_irq(void)
 void __init ti81xx_init_irq(void)
 {
 	omap_nr_irqs = 96;
+	omap_nr_pending = 4;
 	omap_init_irq(OMAP34XX_IC_BASE, NULL);
 	set_handle_irq(omap_intc_handle_irq);
 }
@@ -291,6 +295,7 @@ static int __init intc_of_init(struct device_node *node,
 {
 	struct resource res;
 
+	omap_nr_pending = 3;
 	omap_nr_irqs = 96;
 
 	if (WARN_ON(!node))
@@ -301,8 +306,10 @@ static int __init intc_of_init(struct device_node *node,
 		return -EINVAL;
 	}
 
-	if (of_device_is_compatible(node, "ti,am33xx-intc"))
+	if (of_device_is_compatible(node, "ti,am33xx-intc")) {
 		omap_nr_irqs = 128;
+		omap_nr_pending = 4;
+	}
 
 	omap_init_irq(res.start, of_node_get(node));
 
-- 
1.8.4.GIT


^ permalink raw reply related	[flat|nested] 82+ messages in thread

* [RFT/RFC/PATCH 30/31] arm: omap: irq: introduce omap_nr_pending
@ 2013-11-20 18:09   ` Felipe Balbi
  0 siblings, 0 replies; 82+ messages in thread
From: Felipe Balbi @ 2013-11-20 18:09 UTC (permalink / raw)
  To: linux-arm-kernel

that variable will tell us how many INTC_PENDING_IRQn
registers we have. It'll be used on a following patch
to cleanup omap_intc_handle_irq() a bit.

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 arch/arm/mach-omap2/irq.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c
index a411ed4..1b2266a 100644
--- a/arch/arm/mach-omap2/irq.c
+++ b/arch/arm/mach-omap2/irq.c
@@ -70,6 +70,7 @@ static struct omap_intc_regs intc_context;
 
 static struct irq_domain *domain;
 static void __iomem *omap_irq_base;
+static int omap_nr_pending = 3;
 static int omap_nr_irqs = 96;
 
 /* INTC bank register get/set */
@@ -268,6 +269,7 @@ out:
 void __init omap2_init_irq(void)
 {
 	omap_nr_irqs = 96;
+	omap_nr_pending = 3;
 	omap_init_irq(OMAP24XX_IC_BASE, NULL);
 	set_handle_irq(omap_intc_handle_irq);
 }
@@ -275,6 +277,7 @@ void __init omap2_init_irq(void)
 void __init omap3_init_irq(void)
 {
 	omap_nr_irqs = 96;
+	omap_nr_pending = 3;
 	omap_init_irq(OMAP34XX_IC_BASE, NULL);
 	set_handle_irq(omap_intc_handle_irq);
 }
@@ -282,6 +285,7 @@ void __init omap3_init_irq(void)
 void __init ti81xx_init_irq(void)
 {
 	omap_nr_irqs = 96;
+	omap_nr_pending = 4;
 	omap_init_irq(OMAP34XX_IC_BASE, NULL);
 	set_handle_irq(omap_intc_handle_irq);
 }
@@ -291,6 +295,7 @@ static int __init intc_of_init(struct device_node *node,
 {
 	struct resource res;
 
+	omap_nr_pending = 3;
 	omap_nr_irqs = 96;
 
 	if (WARN_ON(!node))
@@ -301,8 +306,10 @@ static int __init intc_of_init(struct device_node *node,
 		return -EINVAL;
 	}
 
-	if (of_device_is_compatible(node, "ti,am33xx-intc"))
+	if (of_device_is_compatible(node, "ti,am33xx-intc")) {
 		omap_nr_irqs = 128;
+		omap_nr_pending = 4;
+	}
 
 	omap_init_irq(res.start, of_node_get(node));
 
-- 
1.8.4.GIT

^ permalink raw reply related	[flat|nested] 82+ messages in thread

* [RFT/RFC/PATCH 31/31] arm: omap: irq: get rid of ifdef hack
  2013-11-20 18:08 ` Felipe Balbi
@ 2013-11-20 18:09   ` Felipe Balbi
  -1 siblings, 0 replies; 82+ messages in thread
From: Felipe Balbi @ 2013-11-20 18:09 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Linux OMAP Mailing List, Linux ARM Kernel Mailing List, Felipe Balbi

we don't need the ifdef if we have omap_nr_pending
telling us how many pending registers we have
on current platform. This solves a possible
problem where we could try to handle bogus
interrupts on OMAP2 and OMAP3 if using single
zImage kernel, because we would end up reading
the following pending FIQ register.

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 arch/arm/mach-omap2/irq.c | 22 +++++++---------------
 1 file changed, 7 insertions(+), 15 deletions(-)

diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c
index 1b2266a..35669c1 100644
--- a/arch/arm/mach-omap2/irq.c
+++ b/arch/arm/mach-omap2/irq.c
@@ -234,23 +234,15 @@ static void __init omap_init_irq(u32 base, struct device_node *node)
 static asmlinkage void __exception_irq_entry
 omap_intc_handle_irq(struct pt_regs *regs)
 {
-	u32 irqnr;
+	u32 irqnr = 0;
+	int i;
 
 	do {
-		irqnr = intc_readl(INTC_PENDING_IRQ0);
-		if (irqnr)
-			goto out;
-
-		irqnr = intc_readl(INTC_PENDING_IRQ1);
-		if (irqnr)
-			goto out;
-
-		irqnr = intc_readl(INTC_PENDING_IRQ2);
-#if IS_ENABLED(CONFIG_SOC_TI81XX) || IS_ENABLED(CONFIG_SOC_AM33XX)
-		if (irqnr)
-			goto out;
-		irqnr = intc_readl(INTC_PENDING_IRQ3);
-#endif
+		for (i = 0; i < omap_nr_pending; i++) {
+			irqnr = intc_readl(INTC_PENDING_IRQ0 + (0x20 * i));
+			if (irqnr)
+				goto out;
+		}
 
 out:
 		if (!irqnr)
-- 
1.8.4.GIT


^ permalink raw reply related	[flat|nested] 82+ messages in thread

* [RFT/RFC/PATCH 31/31] arm: omap: irq: get rid of ifdef hack
@ 2013-11-20 18:09   ` Felipe Balbi
  0 siblings, 0 replies; 82+ messages in thread
From: Felipe Balbi @ 2013-11-20 18:09 UTC (permalink / raw)
  To: linux-arm-kernel

we don't need the ifdef if we have omap_nr_pending
telling us how many pending registers we have
on current platform. This solves a possible
problem where we could try to handle bogus
interrupts on OMAP2 and OMAP3 if using single
zImage kernel, because we would end up reading
the following pending FIQ register.

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 arch/arm/mach-omap2/irq.c | 22 +++++++---------------
 1 file changed, 7 insertions(+), 15 deletions(-)

diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c
index 1b2266a..35669c1 100644
--- a/arch/arm/mach-omap2/irq.c
+++ b/arch/arm/mach-omap2/irq.c
@@ -234,23 +234,15 @@ static void __init omap_init_irq(u32 base, struct device_node *node)
 static asmlinkage void __exception_irq_entry
 omap_intc_handle_irq(struct pt_regs *regs)
 {
-	u32 irqnr;
+	u32 irqnr = 0;
+	int i;
 
 	do {
-		irqnr = intc_readl(INTC_PENDING_IRQ0);
-		if (irqnr)
-			goto out;
-
-		irqnr = intc_readl(INTC_PENDING_IRQ1);
-		if (irqnr)
-			goto out;
-
-		irqnr = intc_readl(INTC_PENDING_IRQ2);
-#if IS_ENABLED(CONFIG_SOC_TI81XX) || IS_ENABLED(CONFIG_SOC_AM33XX)
-		if (irqnr)
-			goto out;
-		irqnr = intc_readl(INTC_PENDING_IRQ3);
-#endif
+		for (i = 0; i < omap_nr_pending; i++) {
+			irqnr = intc_readl(INTC_PENDING_IRQ0 + (0x20 * i));
+			if (irqnr)
+				goto out;
+		}
 
 out:
 		if (!irqnr)
-- 
1.8.4.GIT

^ permalink raw reply related	[flat|nested] 82+ messages in thread

* Re: [RFT/RFC/PATCH 00/31] arm: omap: irq: cleanup INTC driver
  2013-11-20 18:08 ` Felipe Balbi
@ 2013-12-19 18:48   ` Tony Lindgren
  -1 siblings, 0 replies; 82+ messages in thread
From: Tony Lindgren @ 2013-12-19 18:48 UTC (permalink / raw)
  To: Felipe Balbi; +Cc: Linux OMAP Mailing List, Linux ARM Kernel Mailing List

* Felipe Balbi <balbi@ti.com> [131120 10:10]:
> Afte these patches, we're very close to being able
> to move arch/arm/mach-omap2/irq.c to drivers/irqchip/irq-intc.c

That would be nice :)
 
> All which would be missing is for Tony to drop all OMAP2/3 board
> files so we remove the few pending bits and pieces left in
> for legacy boot.

That may still need to wait a while, but let's see.
 
> Note that I have only boot tested these on AM335x Bone Black
> (with a small fix for fixed regulator which should be in
> the mailing list already), so I'd need help testing all
> other impacted platforms, specially when it comes to PM.

Sorry have not had much of a chance to test these with PM with
all the fixes needed for omap3 DT mode. Tried testing these
just now, but I get:

arch/arm/mach-omap2/board-generic.c:134: error: ‘omap_intc_of_init’ undeclared here (not in a function)

Regards,

Tony
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 82+ messages in thread

* [RFT/RFC/PATCH 00/31] arm: omap: irq: cleanup INTC driver
@ 2013-12-19 18:48   ` Tony Lindgren
  0 siblings, 0 replies; 82+ messages in thread
From: Tony Lindgren @ 2013-12-19 18:48 UTC (permalink / raw)
  To: linux-arm-kernel

* Felipe Balbi <balbi@ti.com> [131120 10:10]:
> Afte these patches, we're very close to being able
> to move arch/arm/mach-omap2/irq.c to drivers/irqchip/irq-intc.c

That would be nice :)
 
> All which would be missing is for Tony to drop all OMAP2/3 board
> files so we remove the few pending bits and pieces left in
> for legacy boot.

That may still need to wait a while, but let's see.
 
> Note that I have only boot tested these on AM335x Bone Black
> (with a small fix for fixed regulator which should be in
> the mailing list already), so I'd need help testing all
> other impacted platforms, specially when it comes to PM.

Sorry have not had much of a chance to test these with PM with
all the fixes needed for omap3 DT mode. Tried testing these
just now, but I get:

arch/arm/mach-omap2/board-generic.c:134: error: ?omap_intc_of_init? undeclared here (not in a function)

Regards,

Tony

^ permalink raw reply	[flat|nested] 82+ messages in thread

* Re: [RFT/RFC/PATCH 00/31] arm: omap: irq: cleanup INTC driver
  2013-12-19 18:48   ` Tony Lindgren
@ 2013-12-19 23:21     ` Felipe Balbi
  -1 siblings, 0 replies; 82+ messages in thread
From: Felipe Balbi @ 2013-12-19 23:21 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Felipe Balbi, Linux OMAP Mailing List, Linux ARM Kernel Mailing List

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

On Thu, Dec 19, 2013 at 10:48:15AM -0800, Tony Lindgren wrote:
> * Felipe Balbi <balbi@ti.com> [131120 10:10]:
> > Afte these patches, we're very close to being able
> > to move arch/arm/mach-omap2/irq.c to drivers/irqchip/irq-intc.c
> 
> That would be nice :)
>  
> > All which would be missing is for Tony to drop all OMAP2/3 board
> > files so we remove the few pending bits and pieces left in
> > for legacy boot.
> 
> That may still need to wait a while, but let's see.
>  
> > Note that I have only boot tested these on AM335x Bone Black
> > (with a small fix for fixed regulator which should be in
> > the mailing list already), so I'd need help testing all
> > other impacted platforms, specially when it comes to PM.
> 
> Sorry have not had much of a chance to test these with PM with
> all the fixes needed for omap3 DT mode. Tried testing these
> just now, but I get:
> 
> arch/arm/mach-omap2/board-generic.c:134: error: ‘omap_intc_of_init’ undeclared here (not in a function)

some of your other changes messed it up, I have not references of
omap_intc_of_init() in my branch, because that's one of the things I'm
dropping from DT-based boots.

Can you see which patch added a new omap_intc_of_init() call ? Or maybe
tell me which branch I should rebase on top of ?

cheers

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 82+ messages in thread

* [RFT/RFC/PATCH 00/31] arm: omap: irq: cleanup INTC driver
@ 2013-12-19 23:21     ` Felipe Balbi
  0 siblings, 0 replies; 82+ messages in thread
From: Felipe Balbi @ 2013-12-19 23:21 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Dec 19, 2013 at 10:48:15AM -0800, Tony Lindgren wrote:
> * Felipe Balbi <balbi@ti.com> [131120 10:10]:
> > Afte these patches, we're very close to being able
> > to move arch/arm/mach-omap2/irq.c to drivers/irqchip/irq-intc.c
> 
> That would be nice :)
>  
> > All which would be missing is for Tony to drop all OMAP2/3 board
> > files so we remove the few pending bits and pieces left in
> > for legacy boot.
> 
> That may still need to wait a while, but let's see.
>  
> > Note that I have only boot tested these on AM335x Bone Black
> > (with a small fix for fixed regulator which should be in
> > the mailing list already), so I'd need help testing all
> > other impacted platforms, specially when it comes to PM.
> 
> Sorry have not had much of a chance to test these with PM with
> all the fixes needed for omap3 DT mode. Tried testing these
> just now, but I get:
> 
> arch/arm/mach-omap2/board-generic.c:134: error: ?omap_intc_of_init? undeclared here (not in a function)

some of your other changes messed it up, I have not references of
omap_intc_of_init() in my branch, because that's one of the things I'm
dropping from DT-based boots.

Can you see which patch added a new omap_intc_of_init() call ? Or maybe
tell me which branch I should rebase on top of ?

cheers

-- 
balbi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20131219/6397427f/attachment.sig>

^ permalink raw reply	[flat|nested] 82+ messages in thread

* Re: [RFT/RFC/PATCH 00/31] arm: omap: irq: cleanup INTC driver
  2013-12-19 23:21     ` Felipe Balbi
@ 2013-12-21  0:53       ` Tony Lindgren
  -1 siblings, 0 replies; 82+ messages in thread
From: Tony Lindgren @ 2013-12-21  0:53 UTC (permalink / raw)
  To: Felipe Balbi; +Cc: Linux OMAP Mailing List, Linux ARM Kernel Mailing List

* Felipe Balbi <balbi@ti.com> [131219 15:23]:
> On Thu, Dec 19, 2013 at 10:48:15AM -0800, Tony Lindgren wrote:
> > * Felipe Balbi <balbi@ti.com> [131120 10:10]:
> > > Afte these patches, we're very close to being able
> > > to move arch/arm/mach-omap2/irq.c to drivers/irqchip/irq-intc.c
> > 
> > That would be nice :)
> >  
> > > All which would be missing is for Tony to drop all OMAP2/3 board
> > > files so we remove the few pending bits and pieces left in
> > > for legacy boot.
> > 
> > That may still need to wait a while, but let's see.
> >  
> > > Note that I have only boot tested these on AM335x Bone Black
> > > (with a small fix for fixed regulator which should be in
> > > the mailing list already), so I'd need help testing all
> > > other impacted platforms, specially when it comes to PM.
> > 
> > Sorry have not had much of a chance to test these with PM with
> > all the fixes needed for omap3 DT mode. Tried testing these
> > just now, but I get:
> > 
> > arch/arm/mach-omap2/board-generic.c:134: error: ‘omap_intc_of_init’ undeclared here (not in a function)
> 
> some of your other changes messed it up, I have not references of
> omap_intc_of_init() in my branch, because that's one of the things I'm
> dropping from DT-based boots.
> 
> Can you see which patch added a new omap_intc_of_init() call ? Or maybe
> tell me which branch I should rebase on top of ?

OK I tried against v3.13-rc4, it's the 3517 changes that caused
it. Looks like that can be just removed, and then there are some
trivial n8x0 merge conflicts. And n8x0 boots too.

But looks like omap3 off-idle hangs after hitting idle with these,
so a bit more work is needed. Maybe also rebase these against
omap-for-v3.14/dt too?

Regards,

Tony


--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 82+ messages in thread

* [RFT/RFC/PATCH 00/31] arm: omap: irq: cleanup INTC driver
@ 2013-12-21  0:53       ` Tony Lindgren
  0 siblings, 0 replies; 82+ messages in thread
From: Tony Lindgren @ 2013-12-21  0:53 UTC (permalink / raw)
  To: linux-arm-kernel

* Felipe Balbi <balbi@ti.com> [131219 15:23]:
> On Thu, Dec 19, 2013 at 10:48:15AM -0800, Tony Lindgren wrote:
> > * Felipe Balbi <balbi@ti.com> [131120 10:10]:
> > > Afte these patches, we're very close to being able
> > > to move arch/arm/mach-omap2/irq.c to drivers/irqchip/irq-intc.c
> > 
> > That would be nice :)
> >  
> > > All which would be missing is for Tony to drop all OMAP2/3 board
> > > files so we remove the few pending bits and pieces left in
> > > for legacy boot.
> > 
> > That may still need to wait a while, but let's see.
> >  
> > > Note that I have only boot tested these on AM335x Bone Black
> > > (with a small fix for fixed regulator which should be in
> > > the mailing list already), so I'd need help testing all
> > > other impacted platforms, specially when it comes to PM.
> > 
> > Sorry have not had much of a chance to test these with PM with
> > all the fixes needed for omap3 DT mode. Tried testing these
> > just now, but I get:
> > 
> > arch/arm/mach-omap2/board-generic.c:134: error: ?omap_intc_of_init? undeclared here (not in a function)
> 
> some of your other changes messed it up, I have not references of
> omap_intc_of_init() in my branch, because that's one of the things I'm
> dropping from DT-based boots.
> 
> Can you see which patch added a new omap_intc_of_init() call ? Or maybe
> tell me which branch I should rebase on top of ?

OK I tried against v3.13-rc4, it's the 3517 changes that caused
it. Looks like that can be just removed, and then there are some
trivial n8x0 merge conflicts. And n8x0 boots too.

But looks like omap3 off-idle hangs after hitting idle with these,
so a bit more work is needed. Maybe also rebase these against
omap-for-v3.14/dt too?

Regards,

Tony

^ permalink raw reply	[flat|nested] 82+ messages in thread

* Re: [RFT/RFC/PATCH 00/31] arm: omap: irq: cleanup INTC driver
  2013-12-21  0:53       ` Tony Lindgren
@ 2013-12-23 17:34         ` Felipe Balbi
  -1 siblings, 0 replies; 82+ messages in thread
From: Felipe Balbi @ 2013-12-23 17:34 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Felipe Balbi, Linux OMAP Mailing List, Linux ARM Kernel Mailing List

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

On Fri, Dec 20, 2013 at 04:53:09PM -0800, Tony Lindgren wrote:
> * Felipe Balbi <balbi@ti.com> [131219 15:23]:
> > On Thu, Dec 19, 2013 at 10:48:15AM -0800, Tony Lindgren wrote:
> > > * Felipe Balbi <balbi@ti.com> [131120 10:10]:
> > > > Afte these patches, we're very close to being able
> > > > to move arch/arm/mach-omap2/irq.c to drivers/irqchip/irq-intc.c
> > > 
> > > That would be nice :)
> > >  
> > > > All which would be missing is for Tony to drop all OMAP2/3 board
> > > > files so we remove the few pending bits and pieces left in
> > > > for legacy boot.
> > > 
> > > That may still need to wait a while, but let's see.
> > >  
> > > > Note that I have only boot tested these on AM335x Bone Black
> > > > (with a small fix for fixed regulator which should be in
> > > > the mailing list already), so I'd need help testing all
> > > > other impacted platforms, specially when it comes to PM.
> > > 
> > > Sorry have not had much of a chance to test these with PM with
> > > all the fixes needed for omap3 DT mode. Tried testing these
> > > just now, but I get:
> > > 
> > > arch/arm/mach-omap2/board-generic.c:134: error: ‘omap_intc_of_init’ undeclared here (not in a function)
> > 
> > some of your other changes messed it up, I have not references of
> > omap_intc_of_init() in my branch, because that's one of the things I'm
> > dropping from DT-based boots.
> > 
> > Can you see which patch added a new omap_intc_of_init() call ? Or maybe
> > tell me which branch I should rebase on top of ?
> 
> OK I tried against v3.13-rc4, it's the 3517 changes that caused
> it. Looks like that can be just removed, and then there are some
> trivial n8x0 merge conflicts. And n8x0 boots too.
> 
> But looks like omap3 off-idle hangs after hitting idle with these,

could it be we're racing between irq_chip.suspend() and hwmod's
_disable() calls ?

> so a bit more work is needed. Maybe also rebase these against
> omap-for-v3.14/dt too?

Will do.

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 82+ messages in thread

* [RFT/RFC/PATCH 00/31] arm: omap: irq: cleanup INTC driver
@ 2013-12-23 17:34         ` Felipe Balbi
  0 siblings, 0 replies; 82+ messages in thread
From: Felipe Balbi @ 2013-12-23 17:34 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Dec 20, 2013 at 04:53:09PM -0800, Tony Lindgren wrote:
> * Felipe Balbi <balbi@ti.com> [131219 15:23]:
> > On Thu, Dec 19, 2013 at 10:48:15AM -0800, Tony Lindgren wrote:
> > > * Felipe Balbi <balbi@ti.com> [131120 10:10]:
> > > > Afte these patches, we're very close to being able
> > > > to move arch/arm/mach-omap2/irq.c to drivers/irqchip/irq-intc.c
> > > 
> > > That would be nice :)
> > >  
> > > > All which would be missing is for Tony to drop all OMAP2/3 board
> > > > files so we remove the few pending bits and pieces left in
> > > > for legacy boot.
> > > 
> > > That may still need to wait a while, but let's see.
> > >  
> > > > Note that I have only boot tested these on AM335x Bone Black
> > > > (with a small fix for fixed regulator which should be in
> > > > the mailing list already), so I'd need help testing all
> > > > other impacted platforms, specially when it comes to PM.
> > > 
> > > Sorry have not had much of a chance to test these with PM with
> > > all the fixes needed for omap3 DT mode. Tried testing these
> > > just now, but I get:
> > > 
> > > arch/arm/mach-omap2/board-generic.c:134: error: ?omap_intc_of_init? undeclared here (not in a function)
> > 
> > some of your other changes messed it up, I have not references of
> > omap_intc_of_init() in my branch, because that's one of the things I'm
> > dropping from DT-based boots.
> > 
> > Can you see which patch added a new omap_intc_of_init() call ? Or maybe
> > tell me which branch I should rebase on top of ?
> 
> OK I tried against v3.13-rc4, it's the 3517 changes that caused
> it. Looks like that can be just removed, and then there are some
> trivial n8x0 merge conflicts. And n8x0 boots too.
> 
> But looks like omap3 off-idle hangs after hitting idle with these,

could it be we're racing between irq_chip.suspend() and hwmod's
_disable() calls ?

> so a bit more work is needed. Maybe also rebase these against
> omap-for-v3.14/dt too?

Will do.

-- 
balbi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20131223/39d4027f/attachment.sig>

^ permalink raw reply	[flat|nested] 82+ messages in thread

* Re: [RFT/RFC/PATCH 00/31] arm: omap: irq: cleanup INTC driver
  2013-12-23 17:34         ` Felipe Balbi
@ 2014-01-02 22:01           ` Felipe Balbi
  -1 siblings, 0 replies; 82+ messages in thread
From: Felipe Balbi @ 2014-01-02 22:01 UTC (permalink / raw)
  To: Felipe Balbi
  Cc: Tony Lindgren, Linux OMAP Mailing List, Linux ARM Kernel Mailing List

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

Hi,

On Mon, Dec 23, 2013 at 11:34:09AM -0600, Felipe Balbi wrote:
> On Fri, Dec 20, 2013 at 04:53:09PM -0800, Tony Lindgren wrote:
> > * Felipe Balbi <balbi@ti.com> [131219 15:23]:
> > > On Thu, Dec 19, 2013 at 10:48:15AM -0800, Tony Lindgren wrote:
> > > > * Felipe Balbi <balbi@ti.com> [131120 10:10]:
> > > > > Afte these patches, we're very close to being able
> > > > > to move arch/arm/mach-omap2/irq.c to drivers/irqchip/irq-intc.c
> > > > 
> > > > That would be nice :)

added a few patches on top of my branch removing all arch/arm/
dependencies and moving the driver to drivers/irqchip/irq-omap-intc.c

> > > > > Note that I have only boot tested these on AM335x Bone Black
> > > > > (with a small fix for fixed regulator which should be in
> > > > > the mailing list already), so I'd need help testing all
> > > > > other impacted platforms, specially when it comes to PM.
> > > > 
> > > > Sorry have not had much of a chance to test these with PM with
> > > > all the fixes needed for omap3 DT mode. Tried testing these
> > > > just now, but I get:
> > > > 
> > > > arch/arm/mach-omap2/board-generic.c:134: error: ‘omap_intc_of_init’ undeclared here (not in a function)
> > > 
> > > some of your other changes messed it up, I have not references of
> > > omap_intc_of_init() in my branch, because that's one of the things I'm
> > > dropping from DT-based boots.
> > > 
> > > Can you see which patch added a new omap_intc_of_init() call ? Or maybe
> > > tell me which branch I should rebase on top of ?
> > 
> > OK I tried against v3.13-rc4, it's the 3517 changes that caused
> > it. Looks like that can be just removed, and then there are some
> > trivial n8x0 merge conflicts. And n8x0 boots too.
> > 
> > But looks like omap3 off-idle hangs after hitting idle with these,
> 
> could it be we're racing between irq_chip.suspend() and hwmod's
> _disable() calls ?

So there are a few possibilities here (and having an OMAP3 platform at
home would help a lot):

a. We're either killing INTC inside hwmod before irq_chip suspend is
	called.

b. We could be calling irq_chip's resume before INTC is enabled again

c. We're loosing interrupts (??)

I might have a really old beagleboard somewhere around, if I do, I'll
try to to boot it up again and track down this regression. Would be
great to see these patches reaching mainline.

> > so a bit more work is needed. Maybe also rebase these against
> > omap-for-v3.14/dt too?
> 
> Will do.

Rebased on top of omap-for-v3.14/omap3-board-removal. Patches are on my
k.org tree:

git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git wip/omap-fix-intc

cheers

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 82+ messages in thread

* [RFT/RFC/PATCH 00/31] arm: omap: irq: cleanup INTC driver
@ 2014-01-02 22:01           ` Felipe Balbi
  0 siblings, 0 replies; 82+ messages in thread
From: Felipe Balbi @ 2014-01-02 22:01 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

On Mon, Dec 23, 2013 at 11:34:09AM -0600, Felipe Balbi wrote:
> On Fri, Dec 20, 2013 at 04:53:09PM -0800, Tony Lindgren wrote:
> > * Felipe Balbi <balbi@ti.com> [131219 15:23]:
> > > On Thu, Dec 19, 2013 at 10:48:15AM -0800, Tony Lindgren wrote:
> > > > * Felipe Balbi <balbi@ti.com> [131120 10:10]:
> > > > > Afte these patches, we're very close to being able
> > > > > to move arch/arm/mach-omap2/irq.c to drivers/irqchip/irq-intc.c
> > > > 
> > > > That would be nice :)

added a few patches on top of my branch removing all arch/arm/
dependencies and moving the driver to drivers/irqchip/irq-omap-intc.c

> > > > > Note that I have only boot tested these on AM335x Bone Black
> > > > > (with a small fix for fixed regulator which should be in
> > > > > the mailing list already), so I'd need help testing all
> > > > > other impacted platforms, specially when it comes to PM.
> > > > 
> > > > Sorry have not had much of a chance to test these with PM with
> > > > all the fixes needed for omap3 DT mode. Tried testing these
> > > > just now, but I get:
> > > > 
> > > > arch/arm/mach-omap2/board-generic.c:134: error: ?omap_intc_of_init? undeclared here (not in a function)
> > > 
> > > some of your other changes messed it up, I have not references of
> > > omap_intc_of_init() in my branch, because that's one of the things I'm
> > > dropping from DT-based boots.
> > > 
> > > Can you see which patch added a new omap_intc_of_init() call ? Or maybe
> > > tell me which branch I should rebase on top of ?
> > 
> > OK I tried against v3.13-rc4, it's the 3517 changes that caused
> > it. Looks like that can be just removed, and then there are some
> > trivial n8x0 merge conflicts. And n8x0 boots too.
> > 
> > But looks like omap3 off-idle hangs after hitting idle with these,
> 
> could it be we're racing between irq_chip.suspend() and hwmod's
> _disable() calls ?

So there are a few possibilities here (and having an OMAP3 platform at
home would help a lot):

a. We're either killing INTC inside hwmod before irq_chip suspend is
	called.

b. We could be calling irq_chip's resume before INTC is enabled again

c. We're loosing interrupts (??)

I might have a really old beagleboard somewhere around, if I do, I'll
try to to boot it up again and track down this regression. Would be
great to see these patches reaching mainline.

> > so a bit more work is needed. Maybe also rebase these against
> > omap-for-v3.14/dt too?
> 
> Will do.

Rebased on top of omap-for-v3.14/omap3-board-removal. Patches are on my
k.org tree:

git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git wip/omap-fix-intc

cheers

-- 
balbi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140102/b38f0700/attachment.sig>

^ permalink raw reply	[flat|nested] 82+ messages in thread

* Re: [RFT/RFC/PATCH 00/31] arm: omap: irq: cleanup INTC driver
  2014-01-02 22:01           ` Felipe Balbi
@ 2014-01-03 12:12             ` Rajendra Nayak
  -1 siblings, 0 replies; 82+ messages in thread
From: Rajendra Nayak @ 2014-01-03 12:12 UTC (permalink / raw)
  To: balbi
  Cc: Tony Lindgren, Linux OMAP Mailing List, Linux ARM Kernel Mailing List

[]..

>>> so a bit more work is needed. Maybe also rebase these against
>>> omap-for-v3.14/dt too?
>>
>> Will do.
> 
> Rebased on top of omap-for-v3.14/omap3-board-removal. Patches are on my
> k.org tree:
> 
> git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git wip/omap-fix-intc

It needs a minor build fix though..

diff --git a/drivers/irqchip/irq-omap-intc.c b/drivers/irqchip/irq-omap-intc.c
index b58c5d5..d03b5a3 100644
--- a/drivers/irqchip/irq-omap-intc.c
+++ b/drivers/irqchip/irq-omap-intc.c
@@ -151,7 +151,7 @@ static void omap_mask_ack_irq(struct irq_data *d)
 static void omap_suspend_irq(struct irq_data *d)
 {
        omap_intc_save_context();
-       omap3_intc_prepare_idle();
+       omap_intc_prepare_idle();
 
        /* A pending interrupt would prevent OMAP from entering suspend */
        omap_ack_irq(NULL);

regards,
Rajendra

> 
> cheers
> 
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
> 


^ permalink raw reply related	[flat|nested] 82+ messages in thread

* [RFT/RFC/PATCH 00/31] arm: omap: irq: cleanup INTC driver
@ 2014-01-03 12:12             ` Rajendra Nayak
  0 siblings, 0 replies; 82+ messages in thread
From: Rajendra Nayak @ 2014-01-03 12:12 UTC (permalink / raw)
  To: linux-arm-kernel

[]..

>>> so a bit more work is needed. Maybe also rebase these against
>>> omap-for-v3.14/dt too?
>>
>> Will do.
> 
> Rebased on top of omap-for-v3.14/omap3-board-removal. Patches are on my
> k.org tree:
> 
> git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git wip/omap-fix-intc

It needs a minor build fix though..

diff --git a/drivers/irqchip/irq-omap-intc.c b/drivers/irqchip/irq-omap-intc.c
index b58c5d5..d03b5a3 100644
--- a/drivers/irqchip/irq-omap-intc.c
+++ b/drivers/irqchip/irq-omap-intc.c
@@ -151,7 +151,7 @@ static void omap_mask_ack_irq(struct irq_data *d)
 static void omap_suspend_irq(struct irq_data *d)
 {
        omap_intc_save_context();
-       omap3_intc_prepare_idle();
+       omap_intc_prepare_idle();
 
        /* A pending interrupt would prevent OMAP from entering suspend */
        omap_ack_irq(NULL);

regards,
Rajendra

> 
> cheers
> 
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
> 

^ permalink raw reply related	[flat|nested] 82+ messages in thread

* Re: [RFT/RFC/PATCH 00/31] arm: omap: irq: cleanup INTC driver
  2014-01-03 12:12             ` Rajendra Nayak
@ 2014-01-03 16:40               ` Felipe Balbi
  -1 siblings, 0 replies; 82+ messages in thread
From: Felipe Balbi @ 2014-01-03 16:40 UTC (permalink / raw)
  To: Rajendra Nayak
  Cc: balbi, Tony Lindgren, Linux OMAP Mailing List,
	Linux ARM Kernel Mailing List

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

On Fri, Jan 03, 2014 at 05:42:41PM +0530, Rajendra Nayak wrote:
> []..
> 
> >>> so a bit more work is needed. Maybe also rebase these against
> >>> omap-for-v3.14/dt too?
> >>
> >> Will do.
> > 
> > Rebased on top of omap-for-v3.14/omap3-board-removal. Patches are on my
> > k.org tree:
> > 
> > git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git wip/omap-fix-intc
> 
> It needs a minor build fix though..
> 
> diff --git a/drivers/irqchip/irq-omap-intc.c b/drivers/irqchip/irq-omap-intc.c
> index b58c5d5..d03b5a3 100644
> --- a/drivers/irqchip/irq-omap-intc.c
> +++ b/drivers/irqchip/irq-omap-intc.c
> @@ -151,7 +151,7 @@ static void omap_mask_ack_irq(struct irq_data *d)
>  static void omap_suspend_irq(struct irq_data *d)
>  {
>         omap_intc_save_context();
> -       omap3_intc_prepare_idle();
> +       omap_intc_prepare_idle();

fixed now, thanks. Wonder how come I didn't see that, I was building
every commit with omap2plus_defconfig :-( Oh well...

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 82+ messages in thread

* [RFT/RFC/PATCH 00/31] arm: omap: irq: cleanup INTC driver
@ 2014-01-03 16:40               ` Felipe Balbi
  0 siblings, 0 replies; 82+ messages in thread
From: Felipe Balbi @ 2014-01-03 16:40 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Jan 03, 2014 at 05:42:41PM +0530, Rajendra Nayak wrote:
> []..
> 
> >>> so a bit more work is needed. Maybe also rebase these against
> >>> omap-for-v3.14/dt too?
> >>
> >> Will do.
> > 
> > Rebased on top of omap-for-v3.14/omap3-board-removal. Patches are on my
> > k.org tree:
> > 
> > git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git wip/omap-fix-intc
> 
> It needs a minor build fix though..
> 
> diff --git a/drivers/irqchip/irq-omap-intc.c b/drivers/irqchip/irq-omap-intc.c
> index b58c5d5..d03b5a3 100644
> --- a/drivers/irqchip/irq-omap-intc.c
> +++ b/drivers/irqchip/irq-omap-intc.c
> @@ -151,7 +151,7 @@ static void omap_mask_ack_irq(struct irq_data *d)
>  static void omap_suspend_irq(struct irq_data *d)
>  {
>         omap_intc_save_context();
> -       omap3_intc_prepare_idle();
> +       omap_intc_prepare_idle();

fixed now, thanks. Wonder how come I didn't see that, I was building
every commit with omap2plus_defconfig :-( Oh well...

-- 
balbi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140103/2dd4ab0f/attachment.sig>

^ permalink raw reply	[flat|nested] 82+ messages in thread

* Re: [RFT/RFC/PATCH 00/31] arm: omap: irq: cleanup INTC driver
  2014-01-03 16:40               ` Felipe Balbi
@ 2014-07-15  9:14                 ` Tony Lindgren
  -1 siblings, 0 replies; 82+ messages in thread
From: Tony Lindgren @ 2014-07-15  9:14 UTC (permalink / raw)
  To: Felipe Balbi
  Cc: Rajendra Nayak, Linux OMAP Mailing List, Linux ARM Kernel Mailing List

* Felipe Balbi <balbi@ti.com> [140103 08:43]:
> On Fri, Jan 03, 2014 at 05:42:41PM +0530, Rajendra Nayak wrote:
> > []..
> > 
> > >>> so a bit more work is needed. Maybe also rebase these against
> > >>> omap-for-v3.14/dt too?
> > >>
> > >> Will do.
> > > 
> > > Rebased on top of omap-for-v3.14/omap3-board-removal. Patches are on my
> > > k.org tree:
> > > 
> > > git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git wip/omap-fix-intc
> > 
> > It needs a minor build fix though..
> > 
> > diff --git a/drivers/irqchip/irq-omap-intc.c b/drivers/irqchip/irq-omap-intc.c
> > index b58c5d5..d03b5a3 100644
> > --- a/drivers/irqchip/irq-omap-intc.c
> > +++ b/drivers/irqchip/irq-omap-intc.c
> > @@ -151,7 +151,7 @@ static void omap_mask_ack_irq(struct irq_data *d)
> >  static void omap_suspend_irq(struct irq_data *d)
> >  {
> >         omap_intc_save_context();
> > -       omap3_intc_prepare_idle();
> > +       omap_intc_prepare_idle();
> 
> fixed now, thanks. Wonder how come I didn't see that, I was building
> every commit with omap2plus_defconfig :-( Oh well...

Felipe, care to refresh this series against v3.16-rc4 and
repost? We now finally have the DT based booting working for
PM for omap3 the same way as legacy booting so I can test
this easily for regressions. But I don't seem to have the
patches in my mailbox any longer.

Regards,

Tony

^ permalink raw reply	[flat|nested] 82+ messages in thread

* [RFT/RFC/PATCH 00/31] arm: omap: irq: cleanup INTC driver
@ 2014-07-15  9:14                 ` Tony Lindgren
  0 siblings, 0 replies; 82+ messages in thread
From: Tony Lindgren @ 2014-07-15  9:14 UTC (permalink / raw)
  To: linux-arm-kernel

* Felipe Balbi <balbi@ti.com> [140103 08:43]:
> On Fri, Jan 03, 2014 at 05:42:41PM +0530, Rajendra Nayak wrote:
> > []..
> > 
> > >>> so a bit more work is needed. Maybe also rebase these against
> > >>> omap-for-v3.14/dt too?
> > >>
> > >> Will do.
> > > 
> > > Rebased on top of omap-for-v3.14/omap3-board-removal. Patches are on my
> > > k.org tree:
> > > 
> > > git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git wip/omap-fix-intc
> > 
> > It needs a minor build fix though..
> > 
> > diff --git a/drivers/irqchip/irq-omap-intc.c b/drivers/irqchip/irq-omap-intc.c
> > index b58c5d5..d03b5a3 100644
> > --- a/drivers/irqchip/irq-omap-intc.c
> > +++ b/drivers/irqchip/irq-omap-intc.c
> > @@ -151,7 +151,7 @@ static void omap_mask_ack_irq(struct irq_data *d)
> >  static void omap_suspend_irq(struct irq_data *d)
> >  {
> >         omap_intc_save_context();
> > -       omap3_intc_prepare_idle();
> > +       omap_intc_prepare_idle();
> 
> fixed now, thanks. Wonder how come I didn't see that, I was building
> every commit with omap2plus_defconfig :-( Oh well...

Felipe, care to refresh this series against v3.16-rc4 and
repost? We now finally have the DT based booting working for
PM for omap3 the same way as legacy booting so I can test
this easily for regressions. But I don't seem to have the
patches in my mailbox any longer.

Regards,

Tony

^ permalink raw reply	[flat|nested] 82+ messages in thread

* Re: [RFT/RFC/PATCH 00/31] arm: omap: irq: cleanup INTC driver
  2014-07-15  9:14                 ` Tony Lindgren
@ 2014-07-15 19:56                   ` Felipe Balbi
  -1 siblings, 0 replies; 82+ messages in thread
From: Felipe Balbi @ 2014-07-15 19:56 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Felipe Balbi, Linux OMAP Mailing List, Linux ARM Kernel Mailing List

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

On Tue, Jul 15, 2014 at 02:14:35AM -0700, Tony Lindgren wrote:
> * Felipe Balbi <balbi@ti.com> [140103 08:43]:
> > On Fri, Jan 03, 2014 at 05:42:41PM +0530, Rajendra Nayak wrote:
> > > []..
> > > 
> > > >>> so a bit more work is needed. Maybe also rebase these against
> > > >>> omap-for-v3.14/dt too?
> > > >>
> > > >> Will do.
> > > > 
> > > > Rebased on top of omap-for-v3.14/omap3-board-removal. Patches are on my
> > > > k.org tree:
> > > > 
> > > > git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git wip/omap-fix-intc
> > > 
> > > It needs a minor build fix though..
> > > 
> > > diff --git a/drivers/irqchip/irq-omap-intc.c b/drivers/irqchip/irq-omap-intc.c
> > > index b58c5d5..d03b5a3 100644
> > > --- a/drivers/irqchip/irq-omap-intc.c
> > > +++ b/drivers/irqchip/irq-omap-intc.c
> > > @@ -151,7 +151,7 @@ static void omap_mask_ack_irq(struct irq_data *d)
> > >  static void omap_suspend_irq(struct irq_data *d)
> > >  {
> > >         omap_intc_save_context();
> > > -       omap3_intc_prepare_idle();
> > > +       omap_intc_prepare_idle();
> > 
> > fixed now, thanks. Wonder how come I didn't see that, I was building
> > every commit with omap2plus_defconfig :-( Oh well...
> 
> Felipe, care to refresh this series against v3.16-rc4 and
> repost? We now finally have the DT based booting working for
> PM for omap3 the same way as legacy booting so I can test
> this easily for regressions. But I don't seem to have the
> patches in my mailbox any longer.

not sure when I'll have time to work on this again, but I'll add it to
my TODO list.

-- 
balbi

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

^ permalink raw reply	[flat|nested] 82+ messages in thread

* [RFT/RFC/PATCH 00/31] arm: omap: irq: cleanup INTC driver
@ 2014-07-15 19:56                   ` Felipe Balbi
  0 siblings, 0 replies; 82+ messages in thread
From: Felipe Balbi @ 2014-07-15 19:56 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Jul 15, 2014 at 02:14:35AM -0700, Tony Lindgren wrote:
> * Felipe Balbi <balbi@ti.com> [140103 08:43]:
> > On Fri, Jan 03, 2014 at 05:42:41PM +0530, Rajendra Nayak wrote:
> > > []..
> > > 
> > > >>> so a bit more work is needed. Maybe also rebase these against
> > > >>> omap-for-v3.14/dt too?
> > > >>
> > > >> Will do.
> > > > 
> > > > Rebased on top of omap-for-v3.14/omap3-board-removal. Patches are on my
> > > > k.org tree:
> > > > 
> > > > git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git wip/omap-fix-intc
> > > 
> > > It needs a minor build fix though..
> > > 
> > > diff --git a/drivers/irqchip/irq-omap-intc.c b/drivers/irqchip/irq-omap-intc.c
> > > index b58c5d5..d03b5a3 100644
> > > --- a/drivers/irqchip/irq-omap-intc.c
> > > +++ b/drivers/irqchip/irq-omap-intc.c
> > > @@ -151,7 +151,7 @@ static void omap_mask_ack_irq(struct irq_data *d)
> > >  static void omap_suspend_irq(struct irq_data *d)
> > >  {
> > >         omap_intc_save_context();
> > > -       omap3_intc_prepare_idle();
> > > +       omap_intc_prepare_idle();
> > 
> > fixed now, thanks. Wonder how come I didn't see that, I was building
> > every commit with omap2plus_defconfig :-( Oh well...
> 
> Felipe, care to refresh this series against v3.16-rc4 and
> repost? We now finally have the DT based booting working for
> PM for omap3 the same way as legacy booting so I can test
> this easily for regressions. But I don't seem to have the
> patches in my mailbox any longer.

not sure when I'll have time to work on this again, but I'll add it to
my TODO list.

-- 
balbi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140715/5e577733/attachment.sig>

^ permalink raw reply	[flat|nested] 82+ messages in thread

end of thread, other threads:[~2014-07-15 19:56 UTC | newest]

Thread overview: 82+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-20 18:08 [RFT/RFC/PATCH 00/31] arm: omap: irq: cleanup INTC driver Felipe Balbi
2013-11-20 18:08 ` Felipe Balbi
2013-11-20 18:08 ` [RFT/RFC/PATCH 01/31] arm: omap: irq: make omap_irq_base global Felipe Balbi
2013-11-20 18:08   ` Felipe Balbi
2013-11-20 18:08 ` [RFT/RFC/PATCH 02/31] arm: omap: irq: define INTC_ILR0 register Felipe Balbi
2013-11-20 18:08   ` Felipe Balbi
2013-11-20 18:08 ` [RFT/RFC/PATCH 03/31] arm: omap: irq: start to remove irq_banks array Felipe Balbi
2013-11-20 18:08   ` Felipe Balbi
2013-11-20 18:08 ` [RFT/RFC/PATCH 04/31] arm: omap: irq: add a global omap_nr_irqs variable Felipe Balbi
2013-11-20 18:08   ` Felipe Balbi
2013-11-20 18:08 ` [RFT/RFC/PATCH 05/31] arm: omap: irq: remove rest of irq_banks usage Felipe Balbi
2013-11-20 18:08   ` Felipe Balbi
2013-11-20 18:08 ` [RFT/RFC/PATCH 06/31] arm: omap: irq: remove unused macro Felipe Balbi
2013-11-20 18:08   ` Felipe Balbi
2013-11-20 18:08 ` [RFT/RFC/PATCH 07/31] arm: omap: irq: switch over to intc_readl on omap_intc_handle_irq Felipe Balbi
2013-11-20 18:08   ` Felipe Balbi
2013-11-20 18:08 ` [RFT/RFC/PATCH 08/31] arm: omap: irq: remove unnecessary base_addr argument Felipe Balbi
2013-11-20 18:08   ` Felipe Balbi
2013-11-20 18:08 ` [RFT/RFC/PATCH 09/31] arm: omap: irq: rename omap3_intc_regs Felipe Balbi
2013-11-20 18:08   ` Felipe Balbi
2013-11-20 18:08 ` [RFT/RFC/PATCH 10/31] arm: omap: irq: always define omap3 support Felipe Balbi
2013-11-20 18:08   ` Felipe Balbi
2013-11-20 18:08 ` [RFT/RFC/PATCH 11/31] arm: omap: irq: reorganize code a little bit Felipe Balbi
2013-11-20 18:08   ` Felipe Balbi
2013-11-20 18:08 ` [RFT/RFC/PATCH 12/31] arm: omap: irq: add suspend/resume methods Felipe Balbi
2013-11-20 18:08   ` Felipe Balbi
2013-11-20 18:09 ` [RFT/RFC/PATCH 13/31] arm: omap: irq: remove last bits of our homebrew irqchip pm Felipe Balbi
2013-11-20 18:09   ` Felipe Balbi
2013-11-20 18:09 ` [RFT/RFC/PATCH 14/31] arm: omap: irq: make intc_of_init static Felipe Balbi
2013-11-20 18:09   ` Felipe Balbi
2013-11-20 18:09 ` [RFT/RFC/PATCH 15/31] arm: omap: irq: call set_handle_irq() from intc_of_init Felipe Balbi
2013-11-20 18:09   ` Felipe Balbi
2013-11-20 18:09 ` [RFT/RFC/PATCH 16/31] arm: omap: irq: use IRQCHIP_DECLARE macro Felipe Balbi
2013-11-20 18:09   ` Felipe Balbi
2013-11-20 18:09 ` [RFT/RFC/PATCH 17/31] arm: omap: irq: drop .handle_irq and .init_irq fields Felipe Balbi
2013-11-20 18:09   ` Felipe Balbi
2013-11-20 18:09 ` [RFT/RFC/PATCH 18/31] arm: omap: irq: add specific compatibles for omap3 and am33xx devices Felipe Balbi
2013-11-20 18:09   ` Felipe Balbi
2013-11-20 18:09 ` [RFT/RFC/PATCH 19/31] arm: omap: irq: use compatible flag to figure out number of IRQ lines Felipe Balbi
2013-11-20 18:09   ` Felipe Balbi
2013-11-20 18:09 ` [RFT/RFC/PATCH 20/31] arm: boot: dts: am33xx/omap3: fix intc compatible flag Felipe Balbi
2013-11-20 18:09   ` Felipe Balbi
2013-11-20 18:09 ` [RFT/RFC/PATCH 21/31] arm: omap: irq: drop ti,intc-size support Felipe Balbi
2013-11-20 18:09   ` Felipe Balbi
2013-11-20 18:09 ` [RFT/RFC/PATCH 22/31] arm: boot: dts: omap2/3/am33xx: drop ti,intc-size Felipe Balbi
2013-11-20 18:09   ` [RFT/RFC/PATCH 22/31] arm: boot: dts: omap2/3/am33xx: drop ti, intc-size Felipe Balbi
2013-11-20 18:09 ` [RFT/RFC/PATCH 23/31] arm: omap: irq: move some more code around Felipe Balbi
2013-11-20 18:09   ` Felipe Balbi
2013-11-20 18:09 ` [RFT/RFC/PATCH 24/31] arm: omap: irq: call set_handle_irq() from .init_irq Felipe Balbi
2013-11-20 18:09   ` Felipe Balbi
2013-11-20 18:09 ` [RFT/RFC/PATCH 25/31] arm: omap: irq: drop omap3_intc_handle_irq() Felipe Balbi
2013-11-20 18:09   ` Felipe Balbi
2013-11-20 18:09 ` [RFT/RFC/PATCH 26/31] arm: omap: irq: drop omap2_intc_handle_irq() Felipe Balbi
2013-11-20 18:09   ` Felipe Balbi
2013-11-20 18:09 ` [RFT/RFC/PATCH 27/31] arm: omap: irq: drop omap_pending_irq() Felipe Balbi
2013-11-20 18:09   ` Felipe Balbi
2013-11-20 18:09 ` [RFT/RFC/PATCH 28/31] arm: omap: irq: remove unnecessary header Felipe Balbi
2013-11-20 18:09   ` Felipe Balbi
2013-11-20 18:09 ` [RFT/RFC/PATCH 29/31] arm: omap: irq: remove nr_irqs argument Felipe Balbi
2013-11-20 18:09   ` Felipe Balbi
2013-11-20 18:09 ` [RFT/RFC/PATCH 30/31] arm: omap: irq: introduce omap_nr_pending Felipe Balbi
2013-11-20 18:09   ` Felipe Balbi
2013-11-20 18:09 ` [RFT/RFC/PATCH 31/31] arm: omap: irq: get rid of ifdef hack Felipe Balbi
2013-11-20 18:09   ` Felipe Balbi
2013-12-19 18:48 ` [RFT/RFC/PATCH 00/31] arm: omap: irq: cleanup INTC driver Tony Lindgren
2013-12-19 18:48   ` Tony Lindgren
2013-12-19 23:21   ` Felipe Balbi
2013-12-19 23:21     ` Felipe Balbi
2013-12-21  0:53     ` Tony Lindgren
2013-12-21  0:53       ` Tony Lindgren
2013-12-23 17:34       ` Felipe Balbi
2013-12-23 17:34         ` Felipe Balbi
2014-01-02 22:01         ` Felipe Balbi
2014-01-02 22:01           ` Felipe Balbi
2014-01-03 12:12           ` Rajendra Nayak
2014-01-03 12:12             ` Rajendra Nayak
2014-01-03 16:40             ` Felipe Balbi
2014-01-03 16:40               ` Felipe Balbi
2014-07-15  9:14               ` Tony Lindgren
2014-07-15  9:14                 ` Tony Lindgren
2014-07-15 19:56                 ` Felipe Balbi
2014-07-15 19:56                   ` Felipe Balbi

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.