linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/9] arm: omap: intc: remaining patches
@ 2014-09-15 21:15 Felipe Balbi
  2014-09-15 21:15 ` [PATCH 1/9] irqchip: add irq-omap-intc.h header Felipe Balbi
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: Felipe Balbi @ 2014-09-15 21:15 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Tony,

Here are the remaining INTC patches rebased on your omap-for-v3.18/intc-v2
branch.

Based on our IRC chat, I kept irq-omap-intc.h header, but included it
on common.h instead of modifying every board-file.

cheers

Felipe Balbi (9):
  irqchip: add irq-omap-intc.h header
  arm: omap: irq: move irq.c to drivers/irqchip/
  irqchip: omap-intc: minor improvement to omap_irq_pending()
  irqchip: omap-intc: comment style cleanup
  irqchip: omap-intc: remove unnecesary of_address_to_resource() call
  irqchip: omap-intc: enable IP protection
  irqchip: omap-intc: enable TURBO idle mode
  irqchip: omap-intc: correct maximum number or MIR registers
  irqchip: omap-intc: remove unnecessary comments

 arch/arm/mach-omap2/Kconfig                        |  1 +
 arch/arm/mach-omap2/Makefile                       |  3 +-
 arch/arm/mach-omap2/common.h                       | 10 +---
 drivers/irqchip/Kconfig                            |  5 ++
 drivers/irqchip/Makefile                           |  1 +
 .../irq.c => drivers/irqchip/irq-omap-intc.c       | 64 +++++++++++++---------
 include/linux/irqchip/irq-omap-intc.h              | 32 +++++++++++
 7 files changed, 78 insertions(+), 38 deletions(-)
 rename arch/arm/mach-omap2/irq.c => drivers/irqchip/irq-omap-intc.c (89%)
 create mode 100644 include/linux/irqchip/irq-omap-intc.h

-- 
2.0.1.563.g66f467c

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

* [PATCH 1/9] irqchip: add irq-omap-intc.h header
  2014-09-15 21:15 [PATCH 0/9] arm: omap: intc: remaining patches Felipe Balbi
@ 2014-09-15 21:15 ` Felipe Balbi
  2014-09-15 21:15 ` [PATCH 2/9] arm: omap: irq: move irq.c to drivers/irqchip/ Felipe Balbi
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Felipe Balbi @ 2014-09-15 21:15 UTC (permalink / raw)
  To: linux-arm-kernel

OMAP INTC irqchip driver will be moved under
drivers/irqchip/ soon but we still have a dependency
with mach-omap2 when it comes to idle functions.

In order to make it easy to share those function
prototypes with OMAP PM code, we introduce this new
header.

To avoid modifying several board-files and some of
the PM-related code, we just include the new header
from common.h which was already included by all
users of IRQ-related PM code.

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 arch/arm/mach-omap2/common.h          | 10 +---------
 include/linux/irqchip/irq-omap-intc.h | 32 ++++++++++++++++++++++++++++++++
 2 files changed, 33 insertions(+), 9 deletions(-)
 create mode 100644 include/linux/irqchip/irq-omap-intc.h

diff --git a/arch/arm/mach-omap2/common.h b/arch/arm/mach-omap2/common.h
index 1800093..377eea8 100644
--- a/arch/arm/mach-omap2/common.h
+++ b/arch/arm/mach-omap2/common.h
@@ -32,6 +32,7 @@
 #include <linux/i2c/twl.h>
 #include <linux/i2c-omap.h>
 #include <linux/reboot.h>
+#include <linux/irqchip/irq-omap-intc.h>
 
 #include <asm/proc-fns.h>
 
@@ -210,15 +211,6 @@ extern struct device *omap2_get_iva_device(void);
 extern struct device *omap2_get_l3_device(void);
 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_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 omap_gic_of_init(void);
 
 #ifdef CONFIG_CACHE_L2X0
diff --git a/include/linux/irqchip/irq-omap-intc.h b/include/linux/irqchip/irq-omap-intc.h
new file mode 100644
index 0000000..e06b370
--- /dev/null
+++ b/include/linux/irqchip/irq-omap-intc.h
@@ -0,0 +1,32 @@
+/**
+ * irq-omap-intc.h - INTC Idle Functions
+ *
+ * Copyright (C) 2014 Texas Instruments Incorporated - http://www.ti.com
+ *
+ * Author: Felipe Balbi <balbi@ti.com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2  of
+ * the License as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+#ifndef __INCLUDE_LINUX_IRQCHIP_IRQ_OMAP_INTC_H
+#define __INCLUDE_LINUX_IRQCHIP_IRQ_OMAP_INTC_H
+
+void omap2_init_irq(void);
+void omap3_init_irq(void);
+void ti81xx_init_irq(void);
+
+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);
+
+#endif /* __INCLUDE_LINUX_IRQCHIP_IRQ_OMAP_INTC_H */
-- 
2.0.1.563.g66f467c

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

* [PATCH 2/9] arm: omap: irq: move irq.c to drivers/irqchip/
  2014-09-15 21:15 [PATCH 0/9] arm: omap: intc: remaining patches Felipe Balbi
  2014-09-15 21:15 ` [PATCH 1/9] irqchip: add irq-omap-intc.h header Felipe Balbi
@ 2014-09-15 21:15 ` Felipe Balbi
  2014-09-15 21:15 ` [PATCH 3/9] irqchip: omap-intc: minor improvement to omap_irq_pending() Felipe Balbi
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Felipe Balbi @ 2014-09-15 21:15 UTC (permalink / raw)
  To: linux-arm-kernel

Just move the code over as it has no dependencies
on arch/arm/ anymore.

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 arch/arm/mach-omap2/Kconfig                                  | 1 +
 arch/arm/mach-omap2/Makefile                                 | 3 +--
 drivers/irqchip/Kconfig                                      | 5 +++++
 drivers/irqchip/Makefile                                     | 1 +
 arch/arm/mach-omap2/irq.c => drivers/irqchip/irq-omap-intc.c | 9 +++++----
 5 files changed, 13 insertions(+), 6 deletions(-)
 rename arch/arm/mach-omap2/irq.c => drivers/irqchip/irq-omap-intc.c (98%)

diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index 11ccf0b..691d62a 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -86,6 +86,7 @@ config ARCH_OMAP2PLUS
 	select PINCTRL
 	select SOC_BUS
 	select TI_PRIV_EDMA
+	select OMAP_IRQCHIP
 	help
 	  Systems based on OMAP2, OMAP3, OMAP4 or OMAP5
 
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 69bbcba..0b6095c 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -10,7 +10,6 @@ obj-y := id.o io.o control.o mux.o devices.o fb.o serial.o gpmc.o timer.o pm.o \
 	 common.o gpio.o dma.o wd_timer.o display.o i2c.o hdq1w.o omap_hwmod.o \
 	 omap_device.o sram.o drm.o
 
-omap-2-3-common				= irq.o
 hwmod-common				= omap_hwmod.o omap_hwmod_reset.o \
 					  omap_hwmod_common_data.o
 clock-common				= clock.o clock_common_data.o \
@@ -20,7 +19,7 @@ secure-common				= omap-smc.o omap-secure.o
 obj-$(CONFIG_ARCH_OMAP2) += $(omap-2-3-common) $(hwmod-common)
 obj-$(CONFIG_ARCH_OMAP3) += $(omap-2-3-common) $(hwmod-common) $(secure-common)
 obj-$(CONFIG_ARCH_OMAP4) += $(hwmod-common) $(secure-common)
-obj-$(CONFIG_SOC_AM33XX) += irq.o $(hwmod-common)
+obj-$(CONFIG_SOC_AM33XX) += $(hwmod-common)
 obj-$(CONFIG_SOC_OMAP5)	 += $(hwmod-common) $(secure-common)
 obj-$(CONFIG_SOC_AM43XX) += $(hwmod-common) $(secure-common)
 obj-$(CONFIG_SOC_DRA7XX) += $(hwmod-common) $(secure-common)
diff --git a/drivers/irqchip/Kconfig b/drivers/irqchip/Kconfig
index b8632bf..9d539de 100644
--- a/drivers/irqchip/Kconfig
+++ b/drivers/irqchip/Kconfig
@@ -75,6 +75,11 @@ config OR1K_PIC
 	bool
 	select IRQ_DOMAIN
 
+config OMAP_IRQCHIP
+	bool
+	select GENERIC_IRQ_CHIP
+	select IRQ_DOMAIN
+
 config ORION_IRQCHIP
 	bool
 	select IRQ_DOMAIN
diff --git a/drivers/irqchip/Makefile b/drivers/irqchip/Makefile
index 73052ba..d0a2613 100644
--- a/drivers/irqchip/Makefile
+++ b/drivers/irqchip/Makefile
@@ -13,6 +13,7 @@ obj-$(CONFIG_ARCH_MOXART)		+= irq-moxart.o
 obj-$(CONFIG_CLPS711X_IRQCHIP)		+= irq-clps711x.o
 obj-$(CONFIG_OR1K_PIC)			+= irq-or1k-pic.o
 obj-$(CONFIG_ORION_IRQCHIP)		+= irq-orion.o
+obj-$(CONFIG_OMAP_IRQCHIP)		+= irq-omap-intc.o
 obj-$(CONFIG_ARCH_SUNXI)		+= irq-sun4i.o
 obj-$(CONFIG_ARCH_SUNXI)		+= irq-sunxi-nmi.o
 obj-$(CONFIG_ARCH_SPEAR3XX)		+= spear-shirq.o
diff --git a/arch/arm/mach-omap2/irq.c b/drivers/irqchip/irq-omap-intc.c
similarity index 98%
rename from arch/arm/mach-omap2/irq.c
rename to drivers/irqchip/irq-omap-intc.c
index b2993e4..1478f1a 100644
--- a/arch/arm/mach-omap2/irq.c
+++ b/drivers/irqchip/irq-omap-intc.c
@@ -17,15 +17,16 @@
 #include <linux/io.h>
 
 #include <asm/exception.h>
-#include <asm/mach/irq.h>
 #include <linux/irqdomain.h>
 #include <linux/of.h>
 #include <linux/of_address.h>
 #include <linux/of_irq.h>
 
-#include "soc.h"
-#include "common.h"
-#include "../../drivers/irqchip/irqchip.h"
+#include "irqchip.h"
+
+/* Define these here for now until we drop all board-files */
+#define OMAP24XX_IC_BASE	0x480fe000
+#define OMAP34XX_IC_BASE	0x48200000
 
 /* selected INTC register offsets */
 
-- 
2.0.1.563.g66f467c

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

* [PATCH 3/9] irqchip: omap-intc: minor improvement to omap_irq_pending()
  2014-09-15 21:15 [PATCH 0/9] arm: omap: intc: remaining patches Felipe Balbi
  2014-09-15 21:15 ` [PATCH 1/9] irqchip: add irq-omap-intc.h header Felipe Balbi
  2014-09-15 21:15 ` [PATCH 2/9] arm: omap: irq: move irq.c to drivers/irqchip/ Felipe Balbi
@ 2014-09-15 21:15 ` Felipe Balbi
  2014-09-15 21:15 ` [PATCH 4/9] irqchip: omap-intc: comment style cleanup Felipe Balbi
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Felipe Balbi @ 2014-09-15 21:15 UTC (permalink / raw)
  To: linux-arm-kernel

We already hold the number of Pending registers
in omap_nr_pending. Let's use that instead.

Acked-by: Jason Cooper <jason@lakedaemon.net>
Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 drivers/irqchip/irq-omap-intc.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/irqchip/irq-omap-intc.c b/drivers/irqchip/irq-omap-intc.c
index 1478f1a..2933760 100644
--- a/drivers/irqchip/irq-omap-intc.c
+++ b/drivers/irqchip/irq-omap-intc.c
@@ -174,11 +174,10 @@ static void __init omap_irq_soft_reset(void)
 
 int omap_irq_pending(void)
 {
-	int irq;
+	int i;
 
-	for (irq = 0; irq < omap_nr_irqs; irq += 32)
-		if (intc_readl(INTC_PENDING_IRQ0 +
-					((irq >> 5) << 5)))
+	for (i = 0; i < omap_nr_pending; i++)
+		if (intc_readl(INTC_PENDING_IRQ0 + (0x20 * i)))
 			return 1;
 	return 0;
 }
-- 
2.0.1.563.g66f467c

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

* [PATCH 4/9] irqchip: omap-intc: comment style cleanup
  2014-09-15 21:15 [PATCH 0/9] arm: omap: intc: remaining patches Felipe Balbi
                   ` (2 preceding siblings ...)
  2014-09-15 21:15 ` [PATCH 3/9] irqchip: omap-intc: minor improvement to omap_irq_pending() Felipe Balbi
@ 2014-09-15 21:15 ` Felipe Balbi
  2014-09-15 21:15 ` [PATCH 5/9] irqchip: omap-intc: remove unnecesary of_address_to_resource() call Felipe Balbi
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Felipe Balbi @ 2014-09-15 21:15 UTC (permalink / raw)
  To: linux-arm-kernel

no functional changes, just making sure comment
follows Coding Style.

Acked-by: Jason Cooper <jason@lakedaemon.net>
Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 drivers/irqchip/irq-omap-intc.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/irqchip/irq-omap-intc.c b/drivers/irqchip/irq-omap-intc.c
index 2933760..f4d562e 100644
--- a/drivers/irqchip/irq-omap-intc.c
+++ b/drivers/irqchip/irq-omap-intc.c
@@ -326,9 +326,11 @@ out:
 		}
 	} while (irqnr);
 
-	/* If an irq is masked or deasserted while active, we will
+	/*
+	 * If an irq is masked or deasserted while active, we will
 	 * keep ending up here with no irq handled. So remove it from
-	 * the INTC with an ack.*/
+	 * the INTC with an ack.
+	 */
 	if (!handled_irq)
 		omap_ack_irq(NULL);
 }
-- 
2.0.1.563.g66f467c

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

* [PATCH 5/9] irqchip: omap-intc: remove unnecesary of_address_to_resource() call
  2014-09-15 21:15 [PATCH 0/9] arm: omap: intc: remaining patches Felipe Balbi
                   ` (3 preceding siblings ...)
  2014-09-15 21:15 ` [PATCH 4/9] irqchip: omap-intc: comment style cleanup Felipe Balbi
@ 2014-09-15 21:15 ` Felipe Balbi
  2014-09-15 21:15 ` [PATCH 6/9] irqchip: omap-intc: enable IP protection Felipe Balbi
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Felipe Balbi @ 2014-09-15 21:15 UTC (permalink / raw)
  To: linux-arm-kernel

of_iomap(), which is called from omap_init_irq_of(),
already takes care of making sure we have a valid
resource to deal with. Because of that, we can
safely remove our explicit call to of_address_to_resource().

Acked-by: Jason Cooper <jason@lakedaemon.net>
Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 drivers/irqchip/irq-omap-intc.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/drivers/irqchip/irq-omap-intc.c b/drivers/irqchip/irq-omap-intc.c
index f4d562e..e97b535 100644
--- a/drivers/irqchip/irq-omap-intc.c
+++ b/drivers/irqchip/irq-omap-intc.c
@@ -362,7 +362,6 @@ void __init ti81xx_init_irq(void)
 static int __init intc_of_init(struct device_node *node,
 			     struct device_node *parent)
 {
-	struct resource res;
 	int ret;
 
 	omap_nr_pending = 3;
@@ -371,11 +370,6 @@ static int __init intc_of_init(struct device_node *node,
 	if (WARN_ON(!node))
 		return -ENODEV;
 
-	if (of_address_to_resource(node, 0, &res)) {
-		WARN(1, "unable to get intc registers\n");
-		return -EINVAL;
-	}
-
 	if (of_device_is_compatible(node, "ti,am33xx-intc")) {
 		omap_nr_irqs = 128;
 		omap_nr_pending = 4;
-- 
2.0.1.563.g66f467c

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

* [PATCH 6/9] irqchip: omap-intc: enable IP protection
  2014-09-15 21:15 [PATCH 0/9] arm: omap: intc: remaining patches Felipe Balbi
                   ` (4 preceding siblings ...)
  2014-09-15 21:15 ` [PATCH 5/9] irqchip: omap-intc: remove unnecesary of_address_to_resource() call Felipe Balbi
@ 2014-09-15 21:15 ` Felipe Balbi
  2014-09-15 21:15 ` [PATCH 7/9] irqchip: omap-intc: enable TURBO idle mode Felipe Balbi
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Felipe Balbi @ 2014-09-15 21:15 UTC (permalink / raw)
  To: linux-arm-kernel

When PROTECTION bit in enabled in PROTECTION
register, INTC's registers are only accessible
from privileged mode.

Acked-by: Jason Cooper <jason@lakedaemon.net>
Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 drivers/irqchip/irq-omap-intc.c | 22 ++++++++++++++++++++--
 1 file changed, 20 insertions(+), 2 deletions(-)

diff --git a/drivers/irqchip/irq-omap-intc.c b/drivers/irqchip/irq-omap-intc.c
index e97b535..7681b13 100644
--- a/drivers/irqchip/irq-omap-intc.c
+++ b/drivers/irqchip/irq-omap-intc.c
@@ -51,6 +51,8 @@
 #define INTCPS_NR_ILR_REGS	128
 #define INTCPS_NR_MIR_REGS	3
 
+#define INTC_PROTECTION_ENABLE	(1 << 0)
+
 /*
  * OMAP2 has a number of different interrupt controllers, each interrupt
  * controller is identified as its own "bank". Register definitions are
@@ -290,12 +292,28 @@ static int __init omap_init_irq_legacy(u32 base)
 	return 0;
 }
 
+static void __init omap_irq_enable_protection(void)
+{
+	u32 reg;
+
+	reg = intc_readl(INTC_PROTECTION);
+	reg |= INTC_PROTECTION_ENABLE;
+	intc_writel(INTC_PROTECTION, reg);
+}
+
 static int __init omap_init_irq(u32 base, struct device_node *node)
 {
+	int ret;
+
 	if (node)
-		return omap_init_irq_of(node);
+		ret = omap_init_irq_of(node);
 	else
-		return omap_init_irq_legacy(base);
+		ret = omap_init_irq_legacy(base);
+
+	if (ret == 0)
+		omap_irq_enable_protection();
+
+	return ret;
 }
 
 static asmlinkage void __exception_irq_entry
-- 
2.0.1.563.g66f467c

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

* [PATCH 7/9] irqchip: omap-intc: enable TURBO idle mode
  2014-09-15 21:15 [PATCH 0/9] arm: omap: intc: remaining patches Felipe Balbi
                   ` (5 preceding siblings ...)
  2014-09-15 21:15 ` [PATCH 6/9] irqchip: omap-intc: enable IP protection Felipe Balbi
@ 2014-09-15 21:15 ` Felipe Balbi
  2014-09-15 21:15 ` [PATCH 8/9] irqchip: omap-intc: correct maximum number or MIR registers Felipe Balbi
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Felipe Balbi @ 2014-09-15 21:15 UTC (permalink / raw)
  To: linux-arm-kernel

When TURBO bit is set in the INTC_IDLE register,
the input synchronizer clock will be autogated
based on activity on the INTC.

Because this idle mode increases the interrupt
latency by 2 clock cycles, we're only enabling
it during suspend.

Acked-by: Jason Cooper <jason@lakedaemon.net>
Signed-off-by: Felipe Balbi <balbi@ti.com>
---

Tony, let me know if you want TURBO to be set unconditionally. That's likely
going to shave off a few extra microwatts, although I don't have a good way to
measure it.

 drivers/irqchip/irq-omap-intc.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/irqchip/irq-omap-intc.c b/drivers/irqchip/irq-omap-intc.c
index 7681b13..dfa2d9d 100644
--- a/drivers/irqchip/irq-omap-intc.c
+++ b/drivers/irqchip/irq-omap-intc.c
@@ -51,6 +51,9 @@
 #define INTCPS_NR_ILR_REGS	128
 #define INTCPS_NR_MIR_REGS	3
 
+#define INTC_IDLE_FUNCIDLE	(1 << 0)
+#define INTC_IDLE_TURBO		(1 << 1)
+
 #define INTC_PROTECTION_ENABLE	(1 << 0)
 
 /*
@@ -134,12 +137,14 @@ void omap3_intc_prepare_idle(void)
 	 * cf. errata ID i540 for 3430 (all revisions up to 3.1.x)
 	 */
 	intc_writel(INTC_SYSCONFIG, 0);
+	intc_writel(INTC_IDLE, INTC_IDLE_TURBO);
 }
 
 void omap3_intc_resume_idle(void)
 {
 	/* Re-enable autoidle */
 	intc_writel(INTC_SYSCONFIG, 1);
+	intc_writel(INTC_IDLE, 0);
 }
 
 /* XXX: FIQ and additional INTC support (only MPU@the moment) */
-- 
2.0.1.563.g66f467c

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

* [PATCH 8/9] irqchip: omap-intc: correct maximum number or MIR registers
  2014-09-15 21:15 [PATCH 0/9] arm: omap: intc: remaining patches Felipe Balbi
                   ` (6 preceding siblings ...)
  2014-09-15 21:15 ` [PATCH 7/9] irqchip: omap-intc: enable TURBO idle mode Felipe Balbi
@ 2014-09-15 21:15 ` Felipe Balbi
  2014-09-15 21:15 ` [PATCH 9/9] irqchip: omap-intc: remove unnecessary comments Felipe Balbi
  2014-09-17 14:54 ` [PATCH 0/9] arm: omap: intc: remaining patches Tony Lindgren
  9 siblings, 0 replies; 11+ messages in thread
From: Felipe Balbi @ 2014-09-15 21:15 UTC (permalink / raw)
  To: linux-arm-kernel

maximum number of MIR register is 4, rather than 3.
Fix that.

Acked-by: Jason Cooper <jason@lakedaemon.net>
Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 drivers/irqchip/irq-omap-intc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/irqchip/irq-omap-intc.c b/drivers/irqchip/irq-omap-intc.c
index dfa2d9d..976d4c1 100644
--- a/drivers/irqchip/irq-omap-intc.c
+++ b/drivers/irqchip/irq-omap-intc.c
@@ -49,7 +49,7 @@
 
 #define ACTIVEIRQ_MASK		0x7f	/* omap2/3 active interrupt bits */
 #define INTCPS_NR_ILR_REGS	128
-#define INTCPS_NR_MIR_REGS	3
+#define INTCPS_NR_MIR_REGS	4
 
 #define INTC_IDLE_FUNCIDLE	(1 << 0)
 #define INTC_IDLE_TURBO		(1 << 1)
-- 
2.0.1.563.g66f467c

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

* [PATCH 9/9] irqchip: omap-intc: remove unnecessary comments
  2014-09-15 21:15 [PATCH 0/9] arm: omap: intc: remaining patches Felipe Balbi
                   ` (7 preceding siblings ...)
  2014-09-15 21:15 ` [PATCH 8/9] irqchip: omap-intc: correct maximum number or MIR registers Felipe Balbi
@ 2014-09-15 21:15 ` Felipe Balbi
  2014-09-17 14:54 ` [PATCH 0/9] arm: omap: intc: remaining patches Tony Lindgren
  9 siblings, 0 replies; 11+ messages in thread
From: Felipe Balbi @ 2014-09-15 21:15 UTC (permalink / raw)
  To: linux-arm-kernel

no fuctional changes.

Acked-by: Jason Cooper <jason@lakedaemon.net>
Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 drivers/irqchip/irq-omap-intc.c | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/drivers/irqchip/irq-omap-intc.c b/drivers/irqchip/irq-omap-intc.c
index 976d4c1..f3814e7 100644
--- a/drivers/irqchip/irq-omap-intc.c
+++ b/drivers/irqchip/irq-omap-intc.c
@@ -56,14 +56,6 @@
 
 #define INTC_PROTECTION_ENABLE	(1 << 0)
 
-/*
- * OMAP2 has a number of different interrupt controllers, each interrupt
- * controller is identified as its own "bank". Register definitions are
- * fairly consistent for each bank, but not all registers are implemented
- * for each bank.. when in doubt, consult the TRM.
- */
-
-/* Structure to save interrupt controller context */
 struct omap_intc_regs {
 	u32 sysconfig;
 	u32 protection;
@@ -79,7 +71,6 @@ static void __iomem *omap_irq_base;
 static int omap_nr_pending = 3;
 static int omap_nr_irqs = 96;
 
-/* INTC bank register get/set */
 static void intc_writel(u32 reg, u32 val)
 {
 	writel_relaxed(val, omap_irq_base + reg);
-- 
2.0.1.563.g66f467c

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

* [PATCH 0/9] arm: omap: intc: remaining patches
  2014-09-15 21:15 [PATCH 0/9] arm: omap: intc: remaining patches Felipe Balbi
                   ` (8 preceding siblings ...)
  2014-09-15 21:15 ` [PATCH 9/9] irqchip: omap-intc: remove unnecessary comments Felipe Balbi
@ 2014-09-17 14:54 ` Tony Lindgren
  9 siblings, 0 replies; 11+ messages in thread
From: Tony Lindgren @ 2014-09-17 14:54 UTC (permalink / raw)
  To: linux-arm-kernel

* Felipe Balbi <balbi@ti.com> [140915 14:16]:
> Hi Tony,
> 
> Here are the remaining INTC patches rebased on your omap-for-v3.18/intc-v2
> branch.
> 
> Based on our IRC chat, I kept irq-omap-intc.h header, but included it
> on common.h instead of modifying every board-file.

Great thanks. We can deal with common.h header once we've dropped
the legacy board-*.c files for omap3.

Applying all into omap-for-v3.18/intc-v2.

Regards,

Tony
 
> cheers
> 
> Felipe Balbi (9):
>   irqchip: add irq-omap-intc.h header
>   arm: omap: irq: move irq.c to drivers/irqchip/
>   irqchip: omap-intc: minor improvement to omap_irq_pending()
>   irqchip: omap-intc: comment style cleanup
>   irqchip: omap-intc: remove unnecesary of_address_to_resource() call
>   irqchip: omap-intc: enable IP protection
>   irqchip: omap-intc: enable TURBO idle mode
>   irqchip: omap-intc: correct maximum number or MIR registers
>   irqchip: omap-intc: remove unnecessary comments
> 
>  arch/arm/mach-omap2/Kconfig                        |  1 +
>  arch/arm/mach-omap2/Makefile                       |  3 +-
>  arch/arm/mach-omap2/common.h                       | 10 +---
>  drivers/irqchip/Kconfig                            |  5 ++
>  drivers/irqchip/Makefile                           |  1 +
>  .../irq.c => drivers/irqchip/irq-omap-intc.c       | 64 +++++++++++++---------
>  include/linux/irqchip/irq-omap-intc.h              | 32 +++++++++++
>  7 files changed, 78 insertions(+), 38 deletions(-)
>  rename arch/arm/mach-omap2/irq.c => drivers/irqchip/irq-omap-intc.c (89%)
>  create mode 100644 include/linux/irqchip/irq-omap-intc.h
> 
> -- 
> 2.0.1.563.g66f467c
> 

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

end of thread, other threads:[~2014-09-17 14:54 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-15 21:15 [PATCH 0/9] arm: omap: intc: remaining patches Felipe Balbi
2014-09-15 21:15 ` [PATCH 1/9] irqchip: add irq-omap-intc.h header Felipe Balbi
2014-09-15 21:15 ` [PATCH 2/9] arm: omap: irq: move irq.c to drivers/irqchip/ Felipe Balbi
2014-09-15 21:15 ` [PATCH 3/9] irqchip: omap-intc: minor improvement to omap_irq_pending() Felipe Balbi
2014-09-15 21:15 ` [PATCH 4/9] irqchip: omap-intc: comment style cleanup Felipe Balbi
2014-09-15 21:15 ` [PATCH 5/9] irqchip: omap-intc: remove unnecesary of_address_to_resource() call Felipe Balbi
2014-09-15 21:15 ` [PATCH 6/9] irqchip: omap-intc: enable IP protection Felipe Balbi
2014-09-15 21:15 ` [PATCH 7/9] irqchip: omap-intc: enable TURBO idle mode Felipe Balbi
2014-09-15 21:15 ` [PATCH 8/9] irqchip: omap-intc: correct maximum number or MIR registers Felipe Balbi
2014-09-15 21:15 ` [PATCH 9/9] irqchip: omap-intc: remove unnecessary comments Felipe Balbi
2014-09-17 14:54 ` [PATCH 0/9] arm: omap: intc: remaining patches Tony Lindgren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).