* [PATCH v2 1/4] irqchip: add basic infrastructure
2012-10-28 9:30 [PATCH v2] Introduce minimal irqchip infrastructure Thomas Petazzoni
@ 2012-10-28 9:30 ` Thomas Petazzoni
2012-10-28 13:18 ` Rob Herring
2012-10-28 9:30 ` [PATCH v2 2/4] arm: bcm2835: convert to the irqchip infrastructure Thomas Petazzoni
` (3 subsequent siblings)
4 siblings, 1 reply; 14+ messages in thread
From: Thomas Petazzoni @ 2012-10-28 9:30 UTC (permalink / raw)
To: linux-arm-kernel
With the recent creation of the drivers/irqchip/ directory, it is
desirable to move irq controller drivers here. At the moment, the only
driver here is irq-bcm2835, the driver for the irq controller found in
the ARM BCM2835 SoC, present in Rasberry Pi systems. This irq
controller driver was exporting its initialization function and its
irq handling function through a header file in
<linux/irqchip/bcm2835.h>.
When proposing to also move another irq controller driver in
drivers/irqchip, Rob Herring raised the very valid point that moving
things to drivers/irqchip was good in order to remove more stuff from
arch/arm, but if it means adding gazillions of headers files in
include/linux/irqchip/, it would not be very nice.
So, upon the suggestion of Rob Herring and Arnd Bergmann, this commit
introduces a small infrastructure that defines a central
irqchip_init() function in drivers/irqchip/irqchip.c, which is meant
to be called as the ->init_irq() callback of ARM platforms. This
function calls of_irq_init() with an array that will progressively
contain the compatible strings of each irq controller driver, and also
a reference to the initialization functions of such drivers. The
drivers/irqchip/irqchip.h header file, currently empty, is added to
allow irq controller drivers to expose their initialization function
to the main irqchip.c file. Note that the irq controller driver
initialization function is responsible for setting the global
handle_arch_irq() variable, so that ARM platforms no longer have to
define the ->handle_irq field in their DT_MACHINE structure.
A global header, <linux/irqchip.h> is also added to expose the single
irqchip_init() function to the reset of the kernel.
A further commit moves the BCM2835 irq controller driver to this new
small infrastructure, therefore removing the include/linux/irqchip/
directory.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Reviewed-by: Stephen Warren <swarren@wwwdotorg.org>
---
drivers/irqchip/Kconfig | 3 ++-
drivers/irqchip/Makefile | 1 +
drivers/irqchip/irqchip.c | 23 +++++++++++++++++++++++
drivers/irqchip/irqchip.h | 14 ++++++++++++++
include/linux/irqchip.h | 16 ++++++++++++++++
5 files changed, 56 insertions(+), 1 deletion(-)
create mode 100644 drivers/irqchip/irqchip.c
create mode 100644 drivers/irqchip/irqchip.h
create mode 100644 include/linux/irqchip.h
diff --git a/drivers/irqchip/Kconfig b/drivers/irqchip/Kconfig
index 1bb8bf6..e0ff166 100644
--- a/drivers/irqchip/Kconfig
+++ b/drivers/irqchip/Kconfig
@@ -1 +1,2 @@
-# empty
+config USE_IRQCHIP
+ bool
diff --git a/drivers/irqchip/Makefile b/drivers/irqchip/Makefile
index 054321d..77adcb1 100644
--- a/drivers/irqchip/Makefile
+++ b/drivers/irqchip/Makefile
@@ -1 +1,2 @@
+obj-$(CONFIG_USE_IRQCHIP) += irqchip.o
obj-$(CONFIG_ARCH_BCM2835) += irq-bcm2835.o
diff --git a/drivers/irqchip/irqchip.c b/drivers/irqchip/irqchip.c
new file mode 100644
index 0000000..410f99f
--- /dev/null
+++ b/drivers/irqchip/irqchip.c
@@ -0,0 +1,23 @@
+/*
+ * Copyright (C) 2012 Thomas Petazzoni
+ *
+ * Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+ *
+ * This file is licensed under the terms of the GNU General Public
+ * License version 2. This program is licensed "as is" without any
+ * warranty of any kind, whether express or implied.
+ */
+
+#include <linux/init.h>
+#include <linux/of_irq.h>
+
+#include "irqchip.h"
+
+static const struct of_device_id irqchip_of_match[] __initconst = {
+ {},
+};
+
+void __init irqchip_init(void)
+{
+ of_irq_init(irqchip_of_match);
+}
diff --git a/drivers/irqchip/irqchip.h b/drivers/irqchip/irqchip.h
new file mode 100644
index 0000000..1e7a5c2
--- /dev/null
+++ b/drivers/irqchip/irqchip.h
@@ -0,0 +1,14 @@
+/*
+ * Copyright (C) 2012 Thomas Petazzoni
+ *
+ * Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+ *
+ * This file is licensed under the terms of the GNU General Public
+ * License version 2. This program is licensed "as is" without any
+ * warranty of any kind, whether express or implied.
+ */
+
+#ifndef _IRQCHIP_H
+#define _IRQCHIP_H
+
+#endif
diff --git a/include/linux/irqchip.h b/include/linux/irqchip.h
new file mode 100644
index 0000000..e0006f1
--- /dev/null
+++ b/include/linux/irqchip.h
@@ -0,0 +1,16 @@
+/*
+ * Copyright (C) 2012 Thomas Petazzoni
+ *
+ * Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+ *
+ * This file is licensed under the terms of the GNU General Public
+ * License version 2. This program is licensed "as is" without any
+ * warranty of any kind, whether express or implied.
+ */
+
+#ifndef _LINUX_IRQCHIP_H
+#define _LINUX_IRQCHIP_H
+
+void irqchip_init(void);
+
+#endif
--
1.7.9.5
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH v2 1/4] irqchip: add basic infrastructure
2012-10-28 9:30 ` [PATCH v2 1/4] irqchip: add basic infrastructure Thomas Petazzoni
@ 2012-10-28 13:18 ` Rob Herring
2012-10-28 13:24 ` Thomas Petazzoni
0 siblings, 1 reply; 14+ messages in thread
From: Rob Herring @ 2012-10-28 13:18 UTC (permalink / raw)
To: linux-arm-kernel
On 10/28/2012 04:30 AM, Thomas Petazzoni wrote:
> With the recent creation of the drivers/irqchip/ directory, it is
> desirable to move irq controller drivers here. At the moment, the only
> driver here is irq-bcm2835, the driver for the irq controller found in
> the ARM BCM2835 SoC, present in Rasberry Pi systems. This irq
> controller driver was exporting its initialization function and its
> irq handling function through a header file in
> <linux/irqchip/bcm2835.h>.
>
> When proposing to also move another irq controller driver in
> drivers/irqchip, Rob Herring raised the very valid point that moving
> things to drivers/irqchip was good in order to remove more stuff from
> arch/arm, but if it means adding gazillions of headers files in
> include/linux/irqchip/, it would not be very nice.
>
> So, upon the suggestion of Rob Herring and Arnd Bergmann, this commit
> introduces a small infrastructure that defines a central
> irqchip_init() function in drivers/irqchip/irqchip.c, which is meant
> to be called as the ->init_irq() callback of ARM platforms. This
> function calls of_irq_init() with an array that will progressively
> contain the compatible strings of each irq controller driver, and also
> a reference to the initialization functions of such drivers. The
> drivers/irqchip/irqchip.h header file, currently empty, is added to
> allow irq controller drivers to expose their initialization function
> to the main irqchip.c file. Note that the irq controller driver
> initialization function is responsible for setting the global
> handle_arch_irq() variable, so that ARM platforms no longer have to
> define the ->handle_irq field in their DT_MACHINE structure.
>
> A global header, <linux/irqchip.h> is also added to expose the single
> irqchip_init() function to the reset of the kernel.
>
> A further commit moves the BCM2835 irq controller driver to this new
> small infrastructure, therefore removing the include/linux/irqchip/
> directory.
>
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> Reviewed-by: Stephen Warren <swarren@wwwdotorg.org>
> ---
> drivers/irqchip/Kconfig | 3 ++-
> drivers/irqchip/Makefile | 1 +
> drivers/irqchip/irqchip.c | 23 +++++++++++++++++++++++
> drivers/irqchip/irqchip.h | 14 ++++++++++++++
> include/linux/irqchip.h | 16 ++++++++++++++++
> 5 files changed, 56 insertions(+), 1 deletion(-)
> create mode 100644 drivers/irqchip/irqchip.c
> create mode 100644 drivers/irqchip/irqchip.h
> create mode 100644 include/linux/irqchip.h
>
> diff --git a/drivers/irqchip/Kconfig b/drivers/irqchip/Kconfig
> index 1bb8bf6..e0ff166 100644
> --- a/drivers/irqchip/Kconfig
> +++ b/drivers/irqchip/Kconfig
> @@ -1 +1,2 @@
> -# empty
> +config USE_IRQCHIP
> + bool
This should depend on OF_IRQ.
Rob
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH v2 1/4] irqchip: add basic infrastructure
2012-10-28 13:18 ` Rob Herring
@ 2012-10-28 13:24 ` Thomas Petazzoni
2012-10-28 13:30 ` Rob Herring
0 siblings, 1 reply; 14+ messages in thread
From: Thomas Petazzoni @ 2012-10-28 13:24 UTC (permalink / raw)
To: linux-arm-kernel
Rob,
On Sun, 28 Oct 2012 08:18:42 -0500, Rob Herring wrote:
> > diff --git a/drivers/irqchip/Kconfig b/drivers/irqchip/Kconfig
> > index 1bb8bf6..e0ff166 100644
> > --- a/drivers/irqchip/Kconfig
> > +++ b/drivers/irqchip/Kconfig
> > @@ -1 +1,2 @@
> > -# empty
> > +config USE_IRQCHIP
> > + bool
>
> This should depend on OF_IRQ.
It is correct that the mechanism only works for irqchip drivers that
are probed through the Device Tree. However, having a "depends on"
inside a configuration that gets "select"ed by other configuration
options (in our case ARCH_BCM2835 and ARCH_MVEBU select USE_IRQCHIP) is
useless: kconfig doesn't care of the "depends on" dependencies when
you're "select"ing an option.
So, I can add it for documentation purposes, but it is practically
useless.
Best regards,
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH v2 1/4] irqchip: add basic infrastructure
2012-10-28 13:24 ` Thomas Petazzoni
@ 2012-10-28 13:30 ` Rob Herring
2012-10-28 13:35 ` Thomas Petazzoni
0 siblings, 1 reply; 14+ messages in thread
From: Rob Herring @ 2012-10-28 13:30 UTC (permalink / raw)
To: linux-arm-kernel
On 10/28/2012 08:24 AM, Thomas Petazzoni wrote:
> Rob,
>
> On Sun, 28 Oct 2012 08:18:42 -0500, Rob Herring wrote:
>
>>> diff --git a/drivers/irqchip/Kconfig b/drivers/irqchip/Kconfig
>>> index 1bb8bf6..e0ff166 100644
>>> --- a/drivers/irqchip/Kconfig
>>> +++ b/drivers/irqchip/Kconfig
>>> @@ -1 +1,2 @@
>>> -# empty
>>> +config USE_IRQCHIP
>>> + bool
>>
>> This should depend on OF_IRQ.
>
> It is correct that the mechanism only works for irqchip drivers that
> are probed through the Device Tree. However, having a "depends on"
> inside a configuration that gets "select"ed by other configuration
> options (in our case ARCH_BCM2835 and ARCH_MVEBU select USE_IRQCHIP) is
> useless: kconfig doesn't care of the "depends on" dependencies when
> you're "select"ing an option.
>
> So, I can add it for documentation purposes, but it is practically
> useless.
It will give a kconfig error rather than build error on of_irq_init
which would result in patches for empty of_irq_init.
How about default y and depends on OF_IRQ. Then you don't need a select.
I think we want all DT enabled platforms to use this and it's only a
small amount of init space.
Rob
>
> Best regards,
>
> Thomas
>
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH v2 1/4] irqchip: add basic infrastructure
2012-10-28 13:30 ` Rob Herring
@ 2012-10-28 13:35 ` Thomas Petazzoni
0 siblings, 0 replies; 14+ messages in thread
From: Thomas Petazzoni @ 2012-10-28 13:35 UTC (permalink / raw)
To: linux-arm-kernel
Rob,
On Sun, 28 Oct 2012 08:30:01 -0500, Rob Herring wrote:
> It will give a kconfig error rather than build error on of_irq_init
> which would result in patches for empty of_irq_init.
Right.
> How about default y and depends on OF_IRQ. Then you don't need a select.
> I think we want all DT enabled platforms to use this and it's only a
> small amount of init space.
Sounds good. Will do and post a v3.
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH v2 2/4] arm: bcm2835: convert to the irqchip infrastructure
2012-10-28 9:30 [PATCH v2] Introduce minimal irqchip infrastructure Thomas Petazzoni
2012-10-28 9:30 ` [PATCH v2 1/4] irqchip: add basic infrastructure Thomas Petazzoni
@ 2012-10-28 9:30 ` Thomas Petazzoni
2012-10-28 9:30 ` [PATCH v2 3/4] arm: mvebu: move irq controller driver to drivers/irqchip Thomas Petazzoni
` (2 subsequent siblings)
4 siblings, 0 replies; 14+ messages in thread
From: Thomas Petazzoni @ 2012-10-28 9:30 UTC (permalink / raw)
To: linux-arm-kernel
Register the irq controller driver in the main
drivers/irqchip/irqchip.c file, and make sure that the initialization
function of the driver sets handle_arch_irq() appropriately. This
requires a bit of movement in the driver since the
bcm2835_handle_irq() must move before the armctrl_of_init() function
to avoid a forward declaration.
On the arch/arm side, use irqchip_init() as the ->init_irq() callback,
and remove the definition of ->handle_irq() since this is now done by
the irq controller driver.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
---
arch/arm/Kconfig | 1 +
arch/arm/mach-bcm2835/bcm2835.c | 5 ++---
drivers/irqchip/irq-bcm2835.c | 24 +++++++++++-------------
drivers/irqchip/irqchip.c | 6 ++++++
drivers/irqchip/irqchip.h | 2 ++
include/linux/irqchip/bcm2835.h | 29 -----------------------------
6 files changed, 22 insertions(+), 45 deletions(-)
delete mode 100644 include/linux/irqchip/bcm2835.h
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 73067ef..7030500 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -347,6 +347,7 @@ config ARCH_BCM2835
select MULTI_IRQ_HANDLER
select SPARSE_IRQ
select USE_OF
+ select USE_IRQCHIP
help
This enables support for the Broadcom BCM2835 SoC. This SoC is
use in the Raspberry Pi, and Roku 2 devices.
diff --git a/arch/arm/mach-bcm2835/bcm2835.c b/arch/arm/mach-bcm2835/bcm2835.c
index f6fea49..ab1bccd 100644
--- a/arch/arm/mach-bcm2835/bcm2835.c
+++ b/arch/arm/mach-bcm2835/bcm2835.c
@@ -13,10 +13,10 @@
*/
#include <linux/init.h>
-#include <linux/irqchip/bcm2835.h>
#include <linux/of_platform.h>
#include <linux/bcm2835_timer.h>
#include <linux/clk/bcm2835.h>
+#include <linux/irqchip.h>
#include <asm/mach/arch.h>
#include <asm/mach/map.h>
@@ -56,8 +56,7 @@ static const char * const bcm2835_compat[] = {
DT_MACHINE_START(BCM2835, "BCM2835")
.map_io = bcm2835_map_io,
- .init_irq = bcm2835_init_irq,
- .handle_irq = bcm2835_handle_irq,
+ .init_irq = irqchip_init,
.init_machine = bcm2835_init,
.timer = &bcm2835_timer,
.dt_compat = bcm2835_compat
diff --git a/drivers/irqchip/irq-bcm2835.c b/drivers/irqchip/irq-bcm2835.c
index dc670cc..62d1dad 100644
--- a/drivers/irqchip/irq-bcm2835.c
+++ b/drivers/irqchip/irq-bcm2835.c
@@ -49,9 +49,11 @@
#include <linux/of_address.h>
#include <linux/of_irq.h>
#include <linux/irqdomain.h>
-#include <linux/irqchip/bcm2835.h>
#include <asm/exception.h>
+#include <asm/mach/irq.h>
+
+#include "irqchip.h"
/* Put the bank and irq (32 bits) into the hwirq */
#define MAKE_HWIRQ(b, n) ((b << 5) | (n))
@@ -135,8 +137,10 @@ static struct irq_domain_ops armctrl_ops = {
.xlate = armctrl_xlate
};
-static int __init armctrl_of_init(struct device_node *node,
- struct device_node *parent)
+static asmlinkage void bcm2835_handle_irq(struct pt_regs *regs);
+
+int __init bcm2835_irqchip_init(struct device_node *node,
+ struct device_node *parent)
{
void __iomem *base;
int irq, b, i;
@@ -164,16 +168,10 @@ static int __init armctrl_of_init(struct device_node *node,
set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
}
}
- return 0;
-}
-static struct of_device_id irq_of_match[] __initconst = {
- { .compatible = "brcm,bcm2835-armctrl-ic", .data = armctrl_of_init }
-};
+ handle_arch_irq = bcm2835_handle_irq;
-void __init bcm2835_init_irq(void)
-{
- of_irq_init(irq_of_match);
+ return 0;
}
/*
@@ -199,8 +197,8 @@ static void armctrl_handle_shortcut(int bank, struct pt_regs *regs,
handle_IRQ(irq_linear_revmap(intc.domain, irq), regs);
}
-asmlinkage void __exception_irq_entry bcm2835_handle_irq(
- struct pt_regs *regs)
+static asmlinkage void __exception_irq_entry
+bcm2835_handle_irq(struct pt_regs *regs)
{
u32 stat, irq;
diff --git a/drivers/irqchip/irqchip.c b/drivers/irqchip/irqchip.c
index 410f99f..e2496e4 100644
--- a/drivers/irqchip/irqchip.c
+++ b/drivers/irqchip/irqchip.c
@@ -14,6 +14,12 @@
#include "irqchip.h"
static const struct of_device_id irqchip_of_match[] __initconst = {
+#ifdef CONFIG_ARCH_BCM2835
+ {
+ .compatible = "brcm,bcm2835-armctrl-ic",
+ .data = bcm2835_irqchip_init,
+ },
+#endif
{},
};
diff --git a/drivers/irqchip/irqchip.h b/drivers/irqchip/irqchip.h
index 1e7a5c2..1075537 100644
--- a/drivers/irqchip/irqchip.h
+++ b/drivers/irqchip/irqchip.h
@@ -11,4 +11,6 @@
#ifndef _IRQCHIP_H
#define _IRQCHIP_H
+int bcm2835_irqchip_init(struct device_node *node, struct device_node *parent);
+
#endif
diff --git a/include/linux/irqchip/bcm2835.h b/include/linux/irqchip/bcm2835.h
deleted file mode 100644
index 48a859b..0000000
--- a/include/linux/irqchip/bcm2835.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Copyright (C) 2010 Broadcom
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#ifndef __LINUX_IRQCHIP_BCM2835_H_
-#define __LINUX_IRQCHIP_BCM2835_H_
-
-#include <asm/exception.h>
-
-extern void bcm2835_init_irq(void);
-
-extern asmlinkage void __exception_irq_entry bcm2835_handle_irq(
- struct pt_regs *regs);
-
-#endif
--
1.7.9.5
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH v2 3/4] arm: mvebu: move irq controller driver to drivers/irqchip
2012-10-28 9:30 [PATCH v2] Introduce minimal irqchip infrastructure Thomas Petazzoni
2012-10-28 9:30 ` [PATCH v2 1/4] irqchip: add basic infrastructure Thomas Petazzoni
2012-10-28 9:30 ` [PATCH v2 2/4] arm: bcm2835: convert to the irqchip infrastructure Thomas Petazzoni
@ 2012-10-28 9:30 ` Thomas Petazzoni
2012-10-28 9:41 ` Thomas Petazzoni
2012-10-28 9:42 ` Thomas Petazzoni
2012-10-28 9:30 ` [PATCH v2 4/4] irqchip: add to the directories part of the IRQ subsystem in MAINTAINERS Thomas Petazzoni
2012-10-28 13:23 ` [PATCH v2] Introduce minimal irqchip infrastructure Rob Herring
4 siblings, 2 replies; 14+ messages in thread
From: Thomas Petazzoni @ 2012-10-28 9:30 UTC (permalink / raw)
To: linux-arm-kernel
Now that the drivers/irqchip/ directory has a minimal infrastructure
to support the addition of irq controller driver, we move the irq
controller driver for Armada 370 and Armada XP ARM SoCs from the
arch/arm/mach-mvebu/ directory to the drivers/irqchip/ directory and
update the irqchip infrastructure to take into account this new
driver.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Reviewed-by: Stephen Warren <swarren@wwwdotorg.org>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: Gregory Clement <gregory.clement@free-electrons.com>
---
arch/arm/mach-mvebu/Kconfig | 1 +
arch/arm/mach-mvebu/Makefile | 2 +-
arch/arm/mach-mvebu/armada-370-xp.c | 4 +-
arch/arm/mach-mvebu/common.h | 3 -
arch/arm/mach-mvebu/irq-armada-370-xp.c | 133 -------------------------------
drivers/irqchip/Makefile | 1 +
drivers/irqchip/irq-armada-370-xp.c | 130 ++++++++++++++++++++++++++++++
drivers/irqchip/irqchip.c | 6 ++
drivers/irqchip/irqchip.h | 2 +
9 files changed, 143 insertions(+), 139 deletions(-)
delete mode 100644 arch/arm/mach-mvebu/irq-armada-370-xp.c
create mode 100644 drivers/irqchip/irq-armada-370-xp.c
diff --git a/arch/arm/mach-mvebu/Kconfig b/arch/arm/mach-mvebu/Kconfig
index 416d46e..415ed0f 100644
--- a/arch/arm/mach-mvebu/Kconfig
+++ b/arch/arm/mach-mvebu/Kconfig
@@ -9,6 +9,7 @@ config ARCH_MVEBU
select PINCTRL
select PLAT_ORION
select SPARSE_IRQ
+ select USE_IRQCHIP
if ARCH_MVEBU
diff --git a/arch/arm/mach-mvebu/Makefile b/arch/arm/mach-mvebu/Makefile
index 57f996b..7f4e9f4 100644
--- a/arch/arm/mach-mvebu/Makefile
+++ b/arch/arm/mach-mvebu/Makefile
@@ -2,4 +2,4 @@ ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/$(src)/include \
-I$(srctree)/arch/arm/plat-orion/include
obj-y += system-controller.o
-obj-$(CONFIG_MACH_ARMADA_370_XP) += armada-370-xp.o irq-armada-370-xp.o addr-map.o
+obj-$(CONFIG_MACH_ARMADA_370_XP) += armada-370-xp.o addr-map.o
diff --git a/arch/arm/mach-mvebu/armada-370-xp.c b/arch/arm/mach-mvebu/armada-370-xp.c
index 68f1483..9b28991 100644
--- a/arch/arm/mach-mvebu/armada-370-xp.c
+++ b/arch/arm/mach-mvebu/armada-370-xp.c
@@ -16,6 +16,7 @@
#include <linux/init.h>
#include <linux/of_platform.h>
#include <linux/io.h>
+#include <linux/irqchip.h>
#include <linux/time-armada-370-xp.h>
#include <asm/mach/arch.h>
#include <asm/mach/map.h>
@@ -56,8 +57,7 @@ static const char * const armada_370_xp_dt_board_dt_compat[] = {
DT_MACHINE_START(ARMADA_XP_DT, "Marvell Aramada 370/XP (Device Tree)")
.init_machine = armada_370_xp_dt_init,
.map_io = armada_370_xp_map_io,
- .init_irq = armada_370_xp_init_irq,
- .handle_irq = armada_370_xp_handle_irq,
+ .init_irq = irqchip_init,
.timer = &armada_370_xp_timer,
.restart = mvebu_restart,
.dt_compat = armada_370_xp_dt_board_dt_compat,
diff --git a/arch/arm/mach-mvebu/common.h b/arch/arm/mach-mvebu/common.h
index 02f89ea..f0eaa21 100644
--- a/arch/arm/mach-mvebu/common.h
+++ b/arch/arm/mach-mvebu/common.h
@@ -17,7 +17,4 @@
void mvebu_restart(char mode, const char *cmd);
-void armada_370_xp_init_irq(void);
-void armada_370_xp_handle_irq(struct pt_regs *regs);
-
#endif
diff --git a/arch/arm/mach-mvebu/irq-armada-370-xp.c b/arch/arm/mach-mvebu/irq-armada-370-xp.c
deleted file mode 100644
index 5f5f939..0000000
--- a/arch/arm/mach-mvebu/irq-armada-370-xp.c
+++ /dev/null
@@ -1,133 +0,0 @@
-/*
- * Marvell Armada 370 and Armada XP SoC IRQ handling
- *
- * Copyright (C) 2012 Marvell
- *
- * Lior Amsalem <alior@marvell.com>
- * Gregory CLEMENT <gregory.clement@free-electrons.com>
- * Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
- * Ben Dooks <ben.dooks@codethink.co.uk>
- *
- * This file is licensed under the terms of the GNU General Public
- * License version 2. This program is licensed "as is" without any
- * warranty of any kind, whether express or implied.
- */
-
-#include <linux/kernel.h>
-#include <linux/module.h>
-#include <linux/init.h>
-#include <linux/irq.h>
-#include <linux/interrupt.h>
-#include <linux/io.h>
-#include <linux/of_address.h>
-#include <linux/of_irq.h>
-#include <linux/irqdomain.h>
-#include <asm/mach/arch.h>
-#include <asm/exception.h>
-
-/* Interrupt Controller Registers Map */
-#define ARMADA_370_XP_INT_SET_MASK_OFFS (0x48)
-#define ARMADA_370_XP_INT_CLEAR_MASK_OFFS (0x4C)
-
-#define ARMADA_370_XP_INT_CONTROL (0x00)
-#define ARMADA_370_XP_INT_SET_ENABLE_OFFS (0x30)
-#define ARMADA_370_XP_INT_CLEAR_ENABLE_OFFS (0x34)
-
-#define ARMADA_370_XP_CPU_INTACK_OFFS (0x44)
-
-static void __iomem *per_cpu_int_base;
-static void __iomem *main_int_base;
-static struct irq_domain *armada_370_xp_mpic_domain;
-
-static void armada_370_xp_irq_mask(struct irq_data *d)
-{
- writel(irqd_to_hwirq(d),
- per_cpu_int_base + ARMADA_370_XP_INT_SET_MASK_OFFS);
-}
-
-static void armada_370_xp_irq_unmask(struct irq_data *d)
-{
- writel(irqd_to_hwirq(d),
- per_cpu_int_base + ARMADA_370_XP_INT_CLEAR_MASK_OFFS);
-}
-
-static struct irq_chip armada_370_xp_irq_chip = {
- .name = "armada_370_xp_irq",
- .irq_mask = armada_370_xp_irq_mask,
- .irq_mask_ack = armada_370_xp_irq_mask,
- .irq_unmask = armada_370_xp_irq_unmask,
-};
-
-static int armada_370_xp_mpic_irq_map(struct irq_domain *h,
- unsigned int virq, irq_hw_number_t hw)
-{
- armada_370_xp_irq_mask(irq_get_irq_data(virq));
- writel(hw, main_int_base + ARMADA_370_XP_INT_SET_ENABLE_OFFS);
-
- irq_set_chip_and_handler(virq, &armada_370_xp_irq_chip,
- handle_level_irq);
- irq_set_status_flags(virq, IRQ_LEVEL);
- set_irq_flags(virq, IRQF_VALID | IRQF_PROBE);
-
- return 0;
-}
-
-static struct irq_domain_ops armada_370_xp_mpic_irq_ops = {
- .map = armada_370_xp_mpic_irq_map,
- .xlate = irq_domain_xlate_onecell,
-};
-
-static int __init armada_370_xp_mpic_of_init(struct device_node *node,
- struct device_node *parent)
-{
- u32 control;
-
- main_int_base = of_iomap(node, 0);
- per_cpu_int_base = of_iomap(node, 1);
-
- BUG_ON(!main_int_base);
- BUG_ON(!per_cpu_int_base);
-
- control = readl(main_int_base + ARMADA_370_XP_INT_CONTROL);
-
- armada_370_xp_mpic_domain =
- irq_domain_add_linear(node, (control >> 2) & 0x3ff,
- &armada_370_xp_mpic_irq_ops, NULL);
-
- if (!armada_370_xp_mpic_domain)
- panic("Unable to add Armada_370_Xp MPIC irq domain (DT)\n");
-
- irq_set_default_host(armada_370_xp_mpic_domain);
- return 0;
-}
-
-asmlinkage void __exception_irq_entry armada_370_xp_handle_irq(struct pt_regs
- *regs)
-{
- u32 irqstat, irqnr;
-
- do {
- irqstat = readl_relaxed(per_cpu_int_base +
- ARMADA_370_XP_CPU_INTACK_OFFS);
- irqnr = irqstat & 0x3FF;
-
- if (irqnr < 1023) {
- irqnr =
- irq_find_mapping(armada_370_xp_mpic_domain, irqnr);
- handle_IRQ(irqnr, regs);
- continue;
- }
-
- break;
- } while (1);
-}
-
-static const struct of_device_id mpic_of_match[] __initconst = {
- {.compatible = "marvell,mpic", .data = armada_370_xp_mpic_of_init},
- {},
-};
-
-void __init armada_370_xp_init_irq(void)
-{
- of_irq_init(mpic_of_match);
-}
diff --git a/drivers/irqchip/Makefile b/drivers/irqchip/Makefile
index 77adcb1..d1a163c 100644
--- a/drivers/irqchip/Makefile
+++ b/drivers/irqchip/Makefile
@@ -1,2 +1,3 @@
obj-$(CONFIG_USE_IRQCHIP) += irqchip.o
obj-$(CONFIG_ARCH_BCM2835) += irq-bcm2835.o
+obj-$(CONFIG_ARCH_MVEBU) += irq-armada-370-xp.o
diff --git a/drivers/irqchip/irq-armada-370-xp.c b/drivers/irqchip/irq-armada-370-xp.c
new file mode 100644
index 0000000..140c6b3
--- /dev/null
+++ b/drivers/irqchip/irq-armada-370-xp.c
@@ -0,0 +1,130 @@
+/*
+ * Marvell Armada 370 and Armada XP SoC IRQ handling
+ *
+ * Copyright (C) 2012 Marvell
+ *
+ * Lior Amsalem <alior@marvell.com>
+ * Gregory CLEMENT <gregory.clement@free-electrons.com>
+ * Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+ * Ben Dooks <ben.dooks@codethink.co.uk>
+ *
+ * This file is licensed under the terms of the GNU General Public
+ * License version 2. This program is licensed "as is" without any
+ * warranty of any kind, whether express or implied.
+ */
+
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/init.h>
+#include <linux/irq.h>
+#include <linux/interrupt.h>
+#include <linux/io.h>
+#include <linux/of_address.h>
+#include <linux/of_irq.h>
+#include <linux/irqdomain.h>
+#include <asm/mach/arch.h>
+#include <asm/mach/irq.h>
+#include <asm/exception.h>
+
+/* Interrupt Controller Registers Map */
+#define ARMADA_370_XP_INT_SET_MASK_OFFS (0x48)
+#define ARMADA_370_XP_INT_CLEAR_MASK_OFFS (0x4C)
+
+#define ARMADA_370_XP_INT_CONTROL (0x00)
+#define ARMADA_370_XP_INT_SET_ENABLE_OFFS (0x30)
+#define ARMADA_370_XP_INT_CLEAR_ENABLE_OFFS (0x34)
+
+#define ARMADA_370_XP_CPU_INTACK_OFFS (0x44)
+
+static void __iomem *per_cpu_int_base;
+static void __iomem *main_int_base;
+static struct irq_domain *armada_370_xp_mpic_domain;
+
+static void armada_370_xp_irq_mask(struct irq_data *d)
+{
+ writel(irqd_to_hwirq(d),
+ per_cpu_int_base + ARMADA_370_XP_INT_SET_MASK_OFFS);
+}
+
+static void armada_370_xp_irq_unmask(struct irq_data *d)
+{
+ writel(irqd_to_hwirq(d),
+ per_cpu_int_base + ARMADA_370_XP_INT_CLEAR_MASK_OFFS);
+}
+
+static struct irq_chip armada_370_xp_irq_chip = {
+ .name = "armada_370_xp_irq",
+ .irq_mask = armada_370_xp_irq_mask,
+ .irq_mask_ack = armada_370_xp_irq_mask,
+ .irq_unmask = armada_370_xp_irq_unmask,
+};
+
+static int armada_370_xp_mpic_irq_map(struct irq_domain *h,
+ unsigned int virq, irq_hw_number_t hw)
+{
+ armada_370_xp_irq_mask(irq_get_irq_data(virq));
+ writel(hw, main_int_base + ARMADA_370_XP_INT_SET_ENABLE_OFFS);
+
+ irq_set_chip_and_handler(virq, &armada_370_xp_irq_chip,
+ handle_level_irq);
+ irq_set_status_flags(virq, IRQ_LEVEL);
+ set_irq_flags(virq, IRQF_VALID | IRQF_PROBE);
+
+ return 0;
+}
+
+static struct irq_domain_ops armada_370_xp_mpic_irq_ops = {
+ .map = armada_370_xp_mpic_irq_map,
+ .xlate = irq_domain_xlate_onecell,
+};
+
+static asmlinkage void
+armada_370_xp_handle_irq(struct pt_regs *regs);
+
+int __init armada_370_xp_mpic_of_init(struct device_node *node,
+ struct device_node *parent)
+{
+ u32 control;
+
+ main_int_base = of_iomap(node, 0);
+ per_cpu_int_base = of_iomap(node, 1);
+
+ BUG_ON(!main_int_base);
+ BUG_ON(!per_cpu_int_base);
+
+ control = readl(main_int_base + ARMADA_370_XP_INT_CONTROL);
+
+ armada_370_xp_mpic_domain =
+ irq_domain_add_linear(node, (control >> 2) & 0x3ff,
+ &armada_370_xp_mpic_irq_ops, NULL);
+
+ if (!armada_370_xp_mpic_domain)
+ panic("Unable to add Armada_370_Xp MPIC irq domain (DT)\n");
+
+ irq_set_default_host(armada_370_xp_mpic_domain);
+
+ handle_arch_irq = armada_370_xp_handle_irq;
+
+ return 0;
+}
+
+static asmlinkage void __exception_irq_entry
+armada_370_xp_handle_irq(struct pt_regs *regs)
+{
+ u32 irqstat, irqnr;
+
+ do {
+ irqstat = readl_relaxed(per_cpu_int_base +
+ ARMADA_370_XP_CPU_INTACK_OFFS);
+ irqnr = irqstat & 0x3FF;
+
+ if (irqnr < 1023) {
+ irqnr =
+ irq_find_mapping(armada_370_xp_mpic_domain, irqnr);
+ handle_IRQ(irqnr, regs);
+ continue;
+ }
+
+ break;
+ } while (1);
+}
diff --git a/drivers/irqchip/irqchip.c b/drivers/irqchip/irqchip.c
index e2496e4..f36d423 100644
--- a/drivers/irqchip/irqchip.c
+++ b/drivers/irqchip/irqchip.c
@@ -20,6 +20,12 @@ static const struct of_device_id irqchip_of_match[] __initconst = {
.data = bcm2835_irqchip_init,
},
#endif
+#ifdef CONFIG_ARCH_MVEBU
+ {
+ .compatible = "marvell,mpic",
+ .data = armada_370_xp_mpic_of_init,
+ },
+#endif
{},
};
diff --git a/drivers/irqchip/irqchip.h b/drivers/irqchip/irqchip.h
index 1075537..0a0d7af 100644
--- a/drivers/irqchip/irqchip.h
+++ b/drivers/irqchip/irqchip.h
@@ -12,5 +12,7 @@
#define _IRQCHIP_H
int bcm2835_irqchip_init(struct device_node *node, struct device_node *parent);
+int armada_370_xp_mpic_of_init(struct device_node *node,
+ struct device_node *parent);
#endif
--
1.7.9.5
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH v2 3/4] arm: mvebu: move irq controller driver to drivers/irqchip
2012-10-28 9:30 ` [PATCH v2 3/4] arm: mvebu: move irq controller driver to drivers/irqchip Thomas Petazzoni
@ 2012-10-28 9:41 ` Thomas Petazzoni
2012-10-28 9:42 ` Thomas Petazzoni
1 sibling, 0 replies; 14+ messages in thread
From: Thomas Petazzoni @ 2012-10-28 9:41 UTC (permalink / raw)
To: linux-arm-kernel
On Sun, 28 Oct 2012 10:30:33 +0100, Thomas Petazzoni wrote:
> Now that the drivers/irqchip/ directory has a minimal infrastructure
> to support the addition of irq controller driver, we move the irq
> controller driver for Armada 370 and Armada XP ARM SoCs from the
> arch/arm/mach-mvebu/ directory to the drivers/irqchip/ directory and
> update the irqchip infrastructure to take into account this new
> driver.
>
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> Reviewed-by: Stephen Warren <swarren@wwwdotorg.org>
> Cc: Jason Cooper <jason@lakedaemon.net>
> Cc: Andrew Lunn <andrew@lunn.ch>
> Cc: Gregory Clement <gregory.clement@free-electrons.com>
Grr, forgot -M when doing the format-patch, so it's showing a huge +/-
delta due to the code movement. Will repost an updated version of this
one.
Guess it's time to figure out how to make -M being the default for
format-patch here.
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH v2 3/4] arm: mvebu: move irq controller driver to drivers/irqchip
2012-10-28 9:30 ` [PATCH v2 3/4] arm: mvebu: move irq controller driver to drivers/irqchip Thomas Petazzoni
2012-10-28 9:41 ` Thomas Petazzoni
@ 2012-10-28 9:42 ` Thomas Petazzoni
1 sibling, 0 replies; 14+ messages in thread
From: Thomas Petazzoni @ 2012-10-28 9:42 UTC (permalink / raw)
To: linux-arm-kernel
Now that the drivers/irqchip/ directory has a minimal infrastructure
to support the addition of irq controller driver, we move the irq
controller driver for Armada 370 and Armada XP ARM SoCs from the
arch/arm/mach-mvebu/ directory to the drivers/irqchip/ directory and
update the irqchip infrastructure to take into account this new
driver.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Reviewed-by: Stephen Warren <swarren@wwwdotorg.org>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: Gregory Clement <gregory.clement@free-electrons.com>
---
arch/arm/mach-mvebu/Kconfig | 1 +
arch/arm/mach-mvebu/Makefile | 2 +-
arch/arm/mach-mvebu/armada-370-xp.c | 4 ++--
arch/arm/mach-mvebu/common.h | 3 ---
drivers/irqchip/Makefile | 1 +
.../irqchip}/irq-armada-370-xp.c | 25 +++++++++-----------
drivers/irqchip/irqchip.c | 6 +++++
drivers/irqchip/irqchip.h | 2 ++
8 files changed, 24 insertions(+), 20 deletions(-)
rename {arch/arm/mach-mvebu => drivers/irqchip}/irq-armada-370-xp.c (87%)
diff --git a/arch/arm/mach-mvebu/Kconfig b/arch/arm/mach-mvebu/Kconfig
index 416d46e..415ed0f 100644
--- a/arch/arm/mach-mvebu/Kconfig
+++ b/arch/arm/mach-mvebu/Kconfig
@@ -9,6 +9,7 @@ config ARCH_MVEBU
select PINCTRL
select PLAT_ORION
select SPARSE_IRQ
+ select USE_IRQCHIP
if ARCH_MVEBU
diff --git a/arch/arm/mach-mvebu/Makefile b/arch/arm/mach-mvebu/Makefile
index 57f996b..7f4e9f4 100644
--- a/arch/arm/mach-mvebu/Makefile
+++ b/arch/arm/mach-mvebu/Makefile
@@ -2,4 +2,4 @@ ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/$(src)/include \
-I$(srctree)/arch/arm/plat-orion/include
obj-y += system-controller.o
-obj-$(CONFIG_MACH_ARMADA_370_XP) += armada-370-xp.o irq-armada-370-xp.o addr-map.o
+obj-$(CONFIG_MACH_ARMADA_370_XP) += armada-370-xp.o addr-map.o
diff --git a/arch/arm/mach-mvebu/armada-370-xp.c b/arch/arm/mach-mvebu/armada-370-xp.c
index 68f1483..9b28991 100644
--- a/arch/arm/mach-mvebu/armada-370-xp.c
+++ b/arch/arm/mach-mvebu/armada-370-xp.c
@@ -16,6 +16,7 @@
#include <linux/init.h>
#include <linux/of_platform.h>
#include <linux/io.h>
+#include <linux/irqchip.h>
#include <linux/time-armada-370-xp.h>
#include <asm/mach/arch.h>
#include <asm/mach/map.h>
@@ -56,8 +57,7 @@ static const char * const armada_370_xp_dt_board_dt_compat[] = {
DT_MACHINE_START(ARMADA_XP_DT, "Marvell Aramada 370/XP (Device Tree)")
.init_machine = armada_370_xp_dt_init,
.map_io = armada_370_xp_map_io,
- .init_irq = armada_370_xp_init_irq,
- .handle_irq = armada_370_xp_handle_irq,
+ .init_irq = irqchip_init,
.timer = &armada_370_xp_timer,
.restart = mvebu_restart,
.dt_compat = armada_370_xp_dt_board_dt_compat,
diff --git a/arch/arm/mach-mvebu/common.h b/arch/arm/mach-mvebu/common.h
index 02f89ea..f0eaa21 100644
--- a/arch/arm/mach-mvebu/common.h
+++ b/arch/arm/mach-mvebu/common.h
@@ -17,7 +17,4 @@
void mvebu_restart(char mode, const char *cmd);
-void armada_370_xp_init_irq(void);
-void armada_370_xp_handle_irq(struct pt_regs *regs);
-
#endif
diff --git a/drivers/irqchip/Makefile b/drivers/irqchip/Makefile
index 77adcb1..d1a163c 100644
--- a/drivers/irqchip/Makefile
+++ b/drivers/irqchip/Makefile
@@ -1,2 +1,3 @@
obj-$(CONFIG_USE_IRQCHIP) += irqchip.o
obj-$(CONFIG_ARCH_BCM2835) += irq-bcm2835.o
+obj-$(CONFIG_ARCH_MVEBU) += irq-armada-370-xp.o
diff --git a/arch/arm/mach-mvebu/irq-armada-370-xp.c b/drivers/irqchip/irq-armada-370-xp.c
similarity index 87%
rename from arch/arm/mach-mvebu/irq-armada-370-xp.c
rename to drivers/irqchip/irq-armada-370-xp.c
index 5f5f939..140c6b3 100644
--- a/arch/arm/mach-mvebu/irq-armada-370-xp.c
+++ b/drivers/irqchip/irq-armada-370-xp.c
@@ -23,6 +23,7 @@
#include <linux/of_irq.h>
#include <linux/irqdomain.h>
#include <asm/mach/arch.h>
+#include <asm/mach/irq.h>
#include <asm/exception.h>
/* Interrupt Controller Registers Map */
@@ -77,8 +78,11 @@ static struct irq_domain_ops armada_370_xp_mpic_irq_ops = {
.xlate = irq_domain_xlate_onecell,
};
-static int __init armada_370_xp_mpic_of_init(struct device_node *node,
- struct device_node *parent)
+static asmlinkage void
+armada_370_xp_handle_irq(struct pt_regs *regs);
+
+int __init armada_370_xp_mpic_of_init(struct device_node *node,
+ struct device_node *parent)
{
u32 control;
@@ -98,11 +102,14 @@ static int __init armada_370_xp_mpic_of_init(struct device_node *node,
panic("Unable to add Armada_370_Xp MPIC irq domain (DT)\n");
irq_set_default_host(armada_370_xp_mpic_domain);
+
+ handle_arch_irq = armada_370_xp_handle_irq;
+
return 0;
}
-asmlinkage void __exception_irq_entry armada_370_xp_handle_irq(struct pt_regs
- *regs)
+static asmlinkage void __exception_irq_entry
+armada_370_xp_handle_irq(struct pt_regs *regs)
{
u32 irqstat, irqnr;
@@ -121,13 +128,3 @@ asmlinkage void __exception_irq_entry armada_370_xp_handle_irq(struct pt_regs
break;
} while (1);
}
-
-static const struct of_device_id mpic_of_match[] __initconst = {
- {.compatible = "marvell,mpic", .data = armada_370_xp_mpic_of_init},
- {},
-};
-
-void __init armada_370_xp_init_irq(void)
-{
- of_irq_init(mpic_of_match);
-}
diff --git a/drivers/irqchip/irqchip.c b/drivers/irqchip/irqchip.c
index e2496e4..f36d423 100644
--- a/drivers/irqchip/irqchip.c
+++ b/drivers/irqchip/irqchip.c
@@ -20,6 +20,12 @@ static const struct of_device_id irqchip_of_match[] __initconst = {
.data = bcm2835_irqchip_init,
},
#endif
+#ifdef CONFIG_ARCH_MVEBU
+ {
+ .compatible = "marvell,mpic",
+ .data = armada_370_xp_mpic_of_init,
+ },
+#endif
{},
};
diff --git a/drivers/irqchip/irqchip.h b/drivers/irqchip/irqchip.h
index 1075537..0a0d7af 100644
--- a/drivers/irqchip/irqchip.h
+++ b/drivers/irqchip/irqchip.h
@@ -12,5 +12,7 @@
#define _IRQCHIP_H
int bcm2835_irqchip_init(struct device_node *node, struct device_node *parent);
+int armada_370_xp_mpic_of_init(struct device_node *node,
+ struct device_node *parent);
#endif
--
1.7.9.5
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH v2 4/4] irqchip: add to the directories part of the IRQ subsystem in MAINTAINERS
2012-10-28 9:30 [PATCH v2] Introduce minimal irqchip infrastructure Thomas Petazzoni
` (2 preceding siblings ...)
2012-10-28 9:30 ` [PATCH v2 3/4] arm: mvebu: move irq controller driver to drivers/irqchip Thomas Petazzoni
@ 2012-10-28 9:30 ` Thomas Petazzoni
2012-10-28 13:11 ` Rob Herring
2012-10-28 13:23 ` [PATCH v2] Introduce minimal irqchip infrastructure Rob Herring
4 siblings, 1 reply; 14+ messages in thread
From: Thomas Petazzoni @ 2012-10-28 9:30 UTC (permalink / raw)
To: linux-arm-kernel
Now that the drivers/irqchip/ directory is getting more code, it needs
a maintainer. The obvious maintainer for it is Thomas Gleixner, who is
maintaining the overall IRQ subsystem. So we add drivers/irqchip/ in
the list of directories that are part of the IRQ subsystem.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
MAINTAINERS | 1 +
1 file changed, 1 insertion(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index 027ec2b..c057bfc 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -4034,6 +4034,7 @@ M: Thomas Gleixner <tglx@linutronix.de>
S: Maintained
T: git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git irq/core
F: kernel/irq/
+F: drivers/irchip/
IRQ DOMAINS (IRQ NUMBER MAPPING LIBRARY)
M: Benjamin Herrenschmidt <benh@kernel.crashing.org>
--
1.7.9.5
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH v2 4/4] irqchip: add to the directories part of the IRQ subsystem in MAINTAINERS
2012-10-28 9:30 ` [PATCH v2 4/4] irqchip: add to the directories part of the IRQ subsystem in MAINTAINERS Thomas Petazzoni
@ 2012-10-28 13:11 ` Rob Herring
0 siblings, 0 replies; 14+ messages in thread
From: Rob Herring @ 2012-10-28 13:11 UTC (permalink / raw)
To: linux-arm-kernel
On 10/28/2012 04:30 AM, Thomas Petazzoni wrote:
> Now that the drivers/irqchip/ directory is getting more code, it needs
> a maintainer. The obvious maintainer for it is Thomas Gleixner, who is
> maintaining the overall IRQ subsystem. So we add drivers/irqchip/ in
> the list of directories that are part of the IRQ subsystem.
>
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> ---
> MAINTAINERS | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 027ec2b..c057bfc 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -4034,6 +4034,7 @@ M: Thomas Gleixner <tglx@linutronix.de>
> S: Maintained
> T: git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git irq/core
> F: kernel/irq/
> +F: drivers/irchip/
s/irchip/irqchip/
>
> IRQ DOMAINS (IRQ NUMBER MAPPING LIBRARY)
> M: Benjamin Herrenschmidt <benh@kernel.crashing.org>
>
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH v2] Introduce minimal irqchip infrastructure
2012-10-28 9:30 [PATCH v2] Introduce minimal irqchip infrastructure Thomas Petazzoni
` (3 preceding siblings ...)
2012-10-28 9:30 ` [PATCH v2 4/4] irqchip: add to the directories part of the IRQ subsystem in MAINTAINERS Thomas Petazzoni
@ 2012-10-28 13:23 ` Rob Herring
2012-10-28 13:26 ` Thomas Petazzoni
4 siblings, 1 reply; 14+ messages in thread
From: Rob Herring @ 2012-10-28 13:23 UTC (permalink / raw)
To: linux-arm-kernel
On 10/28/2012 04:30 AM, Thomas Petazzoni wrote:
> Thomas, Rob, Arnd,
>
> Here is a small set of patches that introduces a small irqchip
> infrastructure that allows the registration of irqchip drivers without
> having each of those drivers to expose a public API in
> include/linux/irqchip/ (patch 1/4), moves the only existing irqchip
> driver, irq-bcm2835 to this infrastructure (patch 2/4), moves the
> irqchip driver for the Armada 370 / Armada XP SoCs to the
> drivers/irqchip directory (patch 3/4) and finally adds the
> drivers/irqchip directory to the IRQ subsystem entry in the
> MAINTAINERS file (patch 4/4).
>
> Changes since v1:
>
> * Add a new patch mentionning the drivers/irqchip in the list of
> directories part of the IRQ subsystem maintained by Thomas Gleixner
> in the MAINTAINERS file. Requested by Arnd Bergmann.
>
> * Reduce the amount of code movement in the irq-bcm2835.c and
> irq-armada-370-xp.c files by using one forward declaration for the
> IRQ handling entry point. Requested by Stephen Warren.
>
> * Rename the armctrl_of_init() function to bcm2835_irqchip_init() as
> requested by Stephen Warren.
>
> * Added the formal Acked-by and Reviewed-by received from Stephen
> Warren.
Other than the 2 minor things I mentioned, this series looks good.
Reviewed-by: Rob Herring <rob.herring@calxeda.com>
Also, I have some follow-on patches to move the GIC and VIC to
drivers/irqchip. It was much more simple than I expected. I'll post them
later.
Rob
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH v2] Introduce minimal irqchip infrastructure
2012-10-28 13:23 ` [PATCH v2] Introduce minimal irqchip infrastructure Rob Herring
@ 2012-10-28 13:26 ` Thomas Petazzoni
0 siblings, 0 replies; 14+ messages in thread
From: Thomas Petazzoni @ 2012-10-28 13:26 UTC (permalink / raw)
To: linux-arm-kernel
On Sun, 28 Oct 2012 08:23:54 -0500, Rob Herring wrote:
> Other than the 2 minor things I mentioned, this series looks good.
>
> Reviewed-by: Rob Herring <rob.herring@calxeda.com>
Thanks, I'll repost a v3 once you confirm the part about "depends on
OF_IRQ".
> Also, I have some follow-on patches to move the GIC and VIC to
> drivers/irqchip. It was much more simple than I expected. I'll post them
> later.
Ah good. Aren't they some remaining non-DT users of the GIC and VIC
drivers?
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 14+ messages in thread