linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/5] ARM: integrator: cascaded IRQs on IM-PD1
@ 2014-01-22 13:31 Linus Walleij
  2014-01-22 13:31 ` [PATCH 1/5] irqchip: vic: update the base IRQ member correctly Linus Walleij
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Linus Walleij @ 2014-01-22 13:31 UTC (permalink / raw)
  To: linux-arm-kernel

This series alters the VIC driver to allow for cascaded VICs off other
IRQ parents, such as the VIC found on the IM-PD1 daughterboard on the
Integrator/AP.

After this series I can start a fully working console on the UARTs on
the IM-PD1 that report their IRQs in /proc/interrupts like this:

root at integrator:/ cat /proc/interrupts
           CPU0
 17:        111       pic   1  uart-pl010
 18:          7       pic   2  uart-pl010
 22:       5377       pic   6  timer
 24:          0       pic   8  rtc-pl030
 33:          0       pic  17  PCIv3 error
 39:        102       VIC   1  uart-pl011
 40:          7       VIC   2  uart-pl011
Err:          0

(Dumped on the IM-PD1 UART.)

Linus Walleij (5):
  irqchip: vic: update the base IRQ member correctly
  irqchip: support cascaded VICs
  ARM: integrator: use managed resources for the IM-PD1
  ARM: integrator: register the IM-PD1 VIC
  ARM: integrator: select AMBA bus and GPIO block

 arch/arm/mach-integrator/Kconfig |  4 ++
 arch/arm/mach-integrator/impd1.c | 81 +++++++++++++++++++++++-----------------
 arch/arm/mach-versatile/core.c   |  2 +-
 drivers/irqchip/irq-vic.c        | 59 +++++++++++++++++++++++++----
 include/linux/irqchip/arm-vic.h  |  6 ++-
 5 files changed, 107 insertions(+), 45 deletions(-)

-- 
1.8.4.2

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

* [PATCH 1/5] irqchip: vic: update the base IRQ member correctly
  2014-01-22 13:31 [PATCH 0/5] ARM: integrator: cascaded IRQs on IM-PD1 Linus Walleij
@ 2014-01-22 13:31 ` Linus Walleij
  2014-02-03  9:22   ` Linus Walleij
  2014-01-22 13:31 ` [PATCH 2/5] irqchip: support cascaded VICs Linus Walleij
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 9+ messages in thread
From: Linus Walleij @ 2014-01-22 13:31 UTC (permalink / raw)
  To: linux-arm-kernel

When passing 0 as the irq base the VIC driver will dynamically
allocate a number of consecutive interrupt descriptors at some
available number range. Make sure this number is recorded in
the state container rather than the passed-in zero argument
in this case.

Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
tglx: if you're happy with this pls ACK it so I can take this
through the ARM SoC tree.
---
 drivers/irqchip/irq-vic.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/irqchip/irq-vic.c b/drivers/irqchip/irq-vic.c
index 8e21ae0bab46..70108c1491bc 100644
--- a/drivers/irqchip/irq-vic.c
+++ b/drivers/irqchip/irq-vic.c
@@ -273,7 +273,6 @@ static void __init vic_register(void __iomem *base, unsigned int irq,
 	v->base = base;
 	v->valid_sources = valid_sources;
 	v->resume_sources = resume_sources;
-	v->irq = irq;
 	set_handle_irq(vic_handle_irq);
 	vic_id++;
 	v->domain = irq_domain_add_simple(node, fls(valid_sources), irq,
@@ -282,6 +281,11 @@ static void __init vic_register(void __iomem *base, unsigned int irq,
 	for (i = 0; i < fls(valid_sources); i++)
 		if (valid_sources & (1 << i))
 			irq_create_mapping(v->domain, i);
+	/* If no base IRQ was passed, figure out our allocated base */
+	if (irq)
+		v->irq = irq;
+	else
+		v->irq = irq_find_mapping(v->domain, 0);
 }
 
 static void vic_ack_irq(struct irq_data *d)
-- 
1.8.4.2

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

* [PATCH 2/5] irqchip: support cascaded VICs
  2014-01-22 13:31 [PATCH 0/5] ARM: integrator: cascaded IRQs on IM-PD1 Linus Walleij
  2014-01-22 13:31 ` [PATCH 1/5] irqchip: vic: update the base IRQ member correctly Linus Walleij
@ 2014-01-22 13:31 ` Linus Walleij
  2014-02-03  9:23   ` Linus Walleij
  2014-01-22 13:31 ` [PATCH 3/5] ARM: integrator: use managed resources for the IM-PD1 Linus Walleij
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 9+ messages in thread
From: Linus Walleij @ 2014-01-22 13:31 UTC (permalink / raw)
  To: linux-arm-kernel

This adds support for a VIC to be cascaded off another IRQ.
On the Integrator/AP logical module IM-PD1 there is a VIC
cascaded off the central FPGA IRQ controller so this is
needed for that to work out.

In order for the plug-in board to be able to register all
the devices with their IRQs relative to the offset of the
base obtained for the cascaded VIC, the base IRQ number
is passed back to the caller.

Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
tglx: if you're happy with this pls ACK it so I can take this
through the ARM SoC tree.
---
 arch/arm/mach-versatile/core.c  |  2 +-
 drivers/irqchip/irq-vic.c       | 53 ++++++++++++++++++++++++++++++++++++-----
 include/linux/irqchip/arm-vic.h |  6 +++--
 3 files changed, 52 insertions(+), 9 deletions(-)

diff --git a/arch/arm/mach-versatile/core.c b/arch/arm/mach-versatile/core.c
index 3b0572f30d56..36b97212d554 100644
--- a/arch/arm/mach-versatile/core.c
+++ b/arch/arm/mach-versatile/core.c
@@ -108,7 +108,7 @@ void __init versatile_init_irq(void)
 
 	np = of_find_matching_node_by_address(NULL, vic_of_match,
 					      VERSATILE_VIC_BASE);
-	__vic_init(VA_VIC_BASE, IRQ_VIC_START, ~0, 0, np);
+	__vic_init(VA_VIC_BASE, 0, IRQ_VIC_START, ~0, 0, np);
 
 	writel(~0, VA_SIC_BASE + SIC_IRQ_ENABLE_CLEAR);
 
diff --git a/drivers/irqchip/irq-vic.c b/drivers/irqchip/irq-vic.c
index 70108c1491bc..6002942a231c 100644
--- a/drivers/irqchip/irq-vic.c
+++ b/drivers/irqchip/irq-vic.c
@@ -57,6 +57,7 @@
 
 /**
  * struct vic_device - VIC PM device
+ * @parent_irq: The parent IRQ number of the VIC if cascaded, or 0.
  * @irq: The IRQ number for the base of the VIC.
  * @base: The register base for the VIC.
  * @valid_sources: A bitmask of valid interrupts
@@ -224,6 +225,17 @@ static int handle_one_vic(struct vic_device *vic, struct pt_regs *regs)
 	return handled;
 }
 
+static void vic_handle_irq_cascaded(unsigned int irq, struct irq_desc *desc)
+{
+	u32 stat, hwirq;
+	struct vic_device *vic = irq_desc_get_handler_data(desc);
+
+	while ((stat = readl_relaxed(vic->base + VIC_IRQ_STATUS))) {
+		hwirq = ffs(stat) - 1;
+		generic_handle_irq(irq_find_mapping(vic->domain, hwirq));
+	}
+}
+
 /*
  * Keep iterating over all registered VIC's until there are no pending
  * interrupts.
@@ -246,6 +258,7 @@ static struct irq_domain_ops vic_irqdomain_ops = {
 /**
  * vic_register() - Register a VIC.
  * @base: The base address of the VIC.
+ * @parent_irq: The parent IRQ if cascaded, else 0.
  * @irq: The base IRQ for the VIC.
  * @valid_sources: bitmask of valid interrupts
  * @resume_sources: bitmask of interrupts allowed for resume sources.
@@ -257,7 +270,8 @@ static struct irq_domain_ops vic_irqdomain_ops = {
  *
  * This also configures the IRQ domain for the VIC.
  */
-static void __init vic_register(void __iomem *base, unsigned int irq,
+static void __init vic_register(void __iomem *base, unsigned int parent_irq,
+				unsigned int irq,
 				u32 valid_sources, u32 resume_sources,
 				struct device_node *node)
 {
@@ -275,6 +289,12 @@ static void __init vic_register(void __iomem *base, unsigned int irq,
 	v->resume_sources = resume_sources;
 	set_handle_irq(vic_handle_irq);
 	vic_id++;
+
+	if (parent_irq) {
+		irq_set_handler_data(parent_irq, v);
+		irq_set_chained_handler(parent_irq, vic_handle_irq_cascaded);
+	}
+
 	v->domain = irq_domain_add_simple(node, fls(valid_sources), irq,
 					  &vic_irqdomain_ops, v);
 	/* create an IRQ mapping for each valid IRQ */
@@ -413,10 +433,10 @@ static void __init vic_init_st(void __iomem *base, unsigned int irq_start,
 		writel(32, base + VIC_PL190_DEF_VECT_ADDR);
 	}
 
-	vic_register(base, irq_start, vic_sources, 0, node);
+	vic_register(base, 0, irq_start, vic_sources, 0, node);
 }
 
-void __init __vic_init(void __iomem *base, int irq_start,
+void __init __vic_init(void __iomem *base, int parent_irq, int irq_start,
 			      u32 vic_sources, u32 resume_sources,
 			      struct device_node *node)
 {
@@ -453,7 +473,7 @@ void __init __vic_init(void __iomem *base, int irq_start,
 
 	vic_init2(base);
 
-	vic_register(base, irq_start, vic_sources, resume_sources, node);
+	vic_register(base, parent_irq, irq_start, vic_sources, resume_sources, node);
 }
 
 /**
@@ -466,7 +486,28 @@ void __init __vic_init(void __iomem *base, int irq_start,
 void __init vic_init(void __iomem *base, unsigned int irq_start,
 		     u32 vic_sources, u32 resume_sources)
 {
-	__vic_init(base, irq_start, vic_sources, resume_sources, NULL);
+	__vic_init(base, 0, irq_start, vic_sources, resume_sources, NULL);
+}
+
+/**
+ * vic_init_cascaded() - initialise a cascaded vectored interrupt controller
+ * @base: iomem base address
+ * @parent_irq: the parent IRQ we're cascaded off
+ * @irq_start: starting interrupt number, must be muliple of 32
+ * @vic_sources: bitmask of interrupt sources to allow
+ * @resume_sources: bitmask of interrupt sources to allow for resume
+ *
+ * This returns the base for the new interrupts or negative on error.
+ */
+int __init vic_init_cascaded(void __iomem *base, unsigned int parent_irq,
+			      u32 vic_sources, u32 resume_sources)
+{
+	struct vic_device *v;
+
+	v = &vic_devices[vic_id];
+	__vic_init(base, parent_irq, 0, vic_sources, resume_sources, NULL);
+	/* Return out acquired base */
+	return v->irq;
 }
 
 #ifdef CONFIG_OF
@@ -489,7 +530,7 @@ int __init vic_of_init(struct device_node *node, struct device_node *parent)
 	/*
 	 * Passing 0 as first IRQ makes the simple domain allocate descriptors
 	 */
-	__vic_init(regs, 0, interrupt_mask, wakeup_mask, node);
+	__vic_init(regs, 0, 0, interrupt_mask, wakeup_mask, node);
 
 	return 0;
 }
diff --git a/include/linux/irqchip/arm-vic.h b/include/linux/irqchip/arm-vic.h
index e3c82dc95756..ba46c794b4e5 100644
--- a/include/linux/irqchip/arm-vic.h
+++ b/include/linux/irqchip/arm-vic.h
@@ -29,8 +29,10 @@
 struct device_node;
 struct pt_regs;
 
-void __vic_init(void __iomem *base, int irq_start, u32 vic_sources,
-		u32 resume_sources, struct device_node *node);
+void __vic_init(void __iomem *base, int parent_irq, int irq_start,
+		u32 vic_sources, u32 resume_sources, struct device_node *node);
 void vic_init(void __iomem *base, unsigned int irq_start, u32 vic_sources, u32 resume_sources);
+int vic_init_cascaded(void __iomem *base, unsigned int parent_irq,
+		      u32 vic_sources, u32 resume_sources);
 
 #endif
-- 
1.8.4.2

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

* [PATCH 3/5] ARM: integrator: use managed resources for the IM-PD1
  2014-01-22 13:31 [PATCH 0/5] ARM: integrator: cascaded IRQs on IM-PD1 Linus Walleij
  2014-01-22 13:31 ` [PATCH 1/5] irqchip: vic: update the base IRQ member correctly Linus Walleij
  2014-01-22 13:31 ` [PATCH 2/5] irqchip: support cascaded VICs Linus Walleij
@ 2014-01-22 13:31 ` Linus Walleij
  2014-01-22 13:31 ` [PATCH 4/5] ARM: integrator: register the IM-PD1 VIC Linus Walleij
  2014-01-22 13:31 ` [PATCH 5/5] ARM: integrator: select AMBA bus and GPIO block Linus Walleij
  4 siblings, 0 replies; 9+ messages in thread
From: Linus Walleij @ 2014-01-22 13:31 UTC (permalink / raw)
  To: linux-arm-kernel

Switch the IM-PD1 driver to use managed resources and cut down
on boilerplate.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 arch/arm/mach-integrator/impd1.c | 36 ++++++++++--------------------------
 1 file changed, 10 insertions(+), 26 deletions(-)

diff --git a/arch/arm/mach-integrator/impd1.c b/arch/arm/mach-integrator/impd1.c
index 9f82f9dcbb98..aeeae0d79a18 100644
--- a/arch/arm/mach-integrator/impd1.c
+++ b/arch/arm/mach-integrator/impd1.c
@@ -307,25 +307,23 @@ static struct impd1_device impd1_devs[] = {
 static int impd1_probe(struct lm_device *dev)
 {
 	struct impd1_module *impd1;
-	int i, ret;
+	int i;
 
 	if (dev->id != module_id)
 		return -EINVAL;
 
-	if (!request_mem_region(dev->resource.start, SZ_4K, "LM registers"))
+	if (!devm_request_mem_region(&dev->dev, dev->resource.start,
+				     SZ_4K, "LM registers"))
 		return -EBUSY;
 
-	impd1 = kzalloc(sizeof(struct impd1_module), GFP_KERNEL);
-	if (!impd1) {
-		ret = -ENOMEM;
-		goto release_lm;
-	}
+	impd1 = devm_kzalloc(&dev->dev, sizeof(struct impd1_module),
+			     GFP_KERNEL);
+	if (!impd1)
+		return -ENOMEM;
 
-	impd1->base = ioremap(dev->resource.start, SZ_4K);
-	if (!impd1->base) {
-		ret = -ENOMEM;
-		goto free_impd1;
-	}
+	impd1->base = devm_ioremap(&dev->dev, dev->resource.start, SZ_4K);
+	if (!impd1->base)
+		return -ENOMEM;
 
 	lm_set_drvdata(dev, impd1);
 
@@ -353,14 +351,6 @@ static int impd1_probe(struct lm_device *dev)
 	}
 
 	return 0;
-
- free_impd1:
-	if (impd1 && impd1->base)
-		iounmap(impd1->base);
-	kfree(impd1);
- release_lm:
-	release_mem_region(dev->resource.start, SZ_4K);
-	return ret;
 }
 
 static int impd1_remove_one(struct device *dev, void *data)
@@ -371,16 +361,10 @@ static int impd1_remove_one(struct device *dev, void *data)
 
 static void impd1_remove(struct lm_device *dev)
 {
-	struct impd1_module *impd1 = lm_get_drvdata(dev);
-
 	device_for_each_child(&dev->dev, NULL, impd1_remove_one);
 	integrator_impd1_clk_exit(dev->id);
 
 	lm_set_drvdata(dev, NULL);
-
-	iounmap(impd1->base);
-	kfree(impd1);
-	release_mem_region(dev->resource.start, SZ_4K);
 }
 
 static struct lm_driver impd1_driver = {
-- 
1.8.4.2

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

* [PATCH 4/5] ARM: integrator: register the IM-PD1 VIC
  2014-01-22 13:31 [PATCH 0/5] ARM: integrator: cascaded IRQs on IM-PD1 Linus Walleij
                   ` (2 preceding siblings ...)
  2014-01-22 13:31 ` [PATCH 3/5] ARM: integrator: use managed resources for the IM-PD1 Linus Walleij
@ 2014-01-22 13:31 ` Linus Walleij
  2014-01-22 13:31 ` [PATCH 5/5] ARM: integrator: select AMBA bus and GPIO block Linus Walleij
  4 siblings, 0 replies; 9+ messages in thread
From: Linus Walleij @ 2014-01-22 13:31 UTC (permalink / raw)
  To: linux-arm-kernel

The peripherals on the IM-PD1 has never really been able to
properly fire their IRQs to the main FPGA IRQ controller.
Cascade it properly and register interrupts for all the
devices in the array.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 arch/arm/mach-integrator/Kconfig |  1 +
 arch/arm/mach-integrator/impd1.c | 45 ++++++++++++++++++++++++++++++++--------
 2 files changed, 37 insertions(+), 9 deletions(-)

diff --git a/arch/arm/mach-integrator/Kconfig b/arch/arm/mach-integrator/Kconfig
index abeff25532ab..46be99007529 100644
--- a/arch/arm/mach-integrator/Kconfig
+++ b/arch/arm/mach-integrator/Kconfig
@@ -30,6 +30,7 @@ config ARCH_CINTEGRATOR
 config INTEGRATOR_IMPD1
 	tristate "Include support for Integrator/IM-PD1"
 	depends on ARCH_INTEGRATOR_AP
+	select ARM_VIC
 	help
 	  The IM-PD1 is an add-on logic module for the Integrator which
 	  allows ARM(R) Ltd PrimeCells to be developed and evaluated.
diff --git a/arch/arm/mach-integrator/impd1.c b/arch/arm/mach-integrator/impd1.c
index aeeae0d79a18..d9b784824808 100644
--- a/arch/arm/mach-integrator/impd1.c
+++ b/arch/arm/mach-integrator/impd1.c
@@ -23,6 +23,7 @@
 #include <linux/io.h>
 #include <linux/platform_data/clk-integrator.h>
 #include <linux/slab.h>
+#include <linux/irqchip/arm-vic.h>
 
 #include <mach/lm.h>
 #include <mach/impd1.h>
@@ -35,6 +36,7 @@ MODULE_PARM_DESC(lmid, "logic module stack position");
 
 struct impd1_module {
 	void __iomem	*base;
+	void __iomem	*vic_base;
 };
 
 void impd1_tweak_control(struct device *dev, u32 mask, u32 val)
@@ -262,9 +264,6 @@ struct impd1_device {
 
 static struct impd1_device impd1_devs[] = {
 	{
-		.offset	= 0x03000000,
-		.id	= 0x00041190,
-	}, {
 		.offset	= 0x00100000,
 		.irq	= { 1 },
 		.id	= 0x00141011,
@@ -304,9 +303,15 @@ static struct impd1_device impd1_devs[] = {
 	}
 };
 
-static int impd1_probe(struct lm_device *dev)
+/*
+ * Valid IRQs: 0 thru 9 and 11, 10 unused.
+ */
+#define IMPD1_VALID_IRQS 0x00000bffU
+
+static int __init impd1_probe(struct lm_device *dev)
 {
 	struct impd1_module *impd1;
+	int irq_base;
 	int i;
 
 	if (dev->id != module_id)
@@ -325,23 +330,45 @@ static int impd1_probe(struct lm_device *dev)
 	if (!impd1->base)
 		return -ENOMEM;
 
-	lm_set_drvdata(dev, impd1);
+	integrator_impd1_clk_init(impd1->base, dev->id);
+
+	if (!devm_request_mem_region(&dev->dev,
+				     dev->resource.start + 0x03000000,
+				     SZ_4K, "VIC"))
+		return -EBUSY;
 
-	printk("IM-PD1 found at 0x%08lx\n",
-		(unsigned long)dev->resource.start);
+	impd1->vic_base = devm_ioremap(&dev->dev,
+				       dev->resource.start + 0x03000000,
+				       SZ_4K);
+	if (!impd1->vic_base)
+		return -ENOMEM;
 
-	integrator_impd1_clk_init(impd1->base, dev->id);
+	irq_base = vic_init_cascaded(impd1->vic_base, dev->irq,
+				     IMPD1_VALID_IRQS, 0);
+
+	lm_set_drvdata(dev, impd1);
+
+	dev_info(&dev->dev, "IM-PD1 found at 0x%08lx\n",
+		 (unsigned long)dev->resource.start);
 
 	for (i = 0; i < ARRAY_SIZE(impd1_devs); i++) {
 		struct impd1_device *idev = impd1_devs + i;
 		struct amba_device *d;
 		unsigned long pc_base;
 		char devname[32];
+		int irq1 = idev->irq[0];
+		int irq2 = idev->irq[1];
+
+		/* Translate IRQs to IM-PD1 local numberspace */
+		if (irq1)
+			irq1 += irq_base;
+		if (irq2)
+			irq2 += irq_base;
 
 		pc_base = dev->resource.start + idev->offset;
 		snprintf(devname, 32, "lm%x:%5.5lx", dev->id, idev->offset >> 12);
 		d = amba_ahb_device_add_res(&dev->dev, devname, pc_base, SZ_4K,
-					    dev->irq, dev->irq,
+					    irq1, irq2,
 					    idev->platform_data, idev->id,
 					    &dev->resource);
 		if (IS_ERR(d)) {
-- 
1.8.4.2

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

* [PATCH 5/5] ARM: integrator: select AMBA bus and GPIO block
  2014-01-22 13:31 [PATCH 0/5] ARM: integrator: cascaded IRQs on IM-PD1 Linus Walleij
                   ` (3 preceding siblings ...)
  2014-01-22 13:31 ` [PATCH 4/5] ARM: integrator: register the IM-PD1 VIC Linus Walleij
@ 2014-01-22 13:31 ` Linus Walleij
  2014-01-22 13:37   ` Russell King - ARM Linux
  4 siblings, 1 reply; 9+ messages in thread
From: Linus Walleij @ 2014-01-22 13:31 UTC (permalink / raw)
  To: linux-arm-kernel

The Integrator/AP can be used with a logical module called
IM-PD1, which contains a few AMBA PrimeCell devices, one of which
is the PL061 GPIO controller. As the lines from this GPIO
controller are looped back to devices on the board itself and
provides resources back to it, we need to always have GPIO
and the PL061 driver available for other devices to work.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 arch/arm/mach-integrator/Kconfig | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm/mach-integrator/Kconfig b/arch/arm/mach-integrator/Kconfig
index 46be99007529..b61e962ef992 100644
--- a/arch/arm/mach-integrator/Kconfig
+++ b/arch/arm/mach-integrator/Kconfig
@@ -30,7 +30,10 @@ config ARCH_CINTEGRATOR
 config INTEGRATOR_IMPD1
 	tristate "Include support for Integrator/IM-PD1"
 	depends on ARCH_INTEGRATOR_AP
+	select ARCH_REQUIRE_GPIOLIB
+	select ARM_AMBA
 	select ARM_VIC
+	select GPIO_PL061 if GPIOLIB
 	help
 	  The IM-PD1 is an add-on logic module for the Integrator which
 	  allows ARM(R) Ltd PrimeCells to be developed and evaluated.
-- 
1.8.4.2

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

* [PATCH 5/5] ARM: integrator: select AMBA bus and GPIO block
  2014-01-22 13:31 ` [PATCH 5/5] ARM: integrator: select AMBA bus and GPIO block Linus Walleij
@ 2014-01-22 13:37   ` Russell King - ARM Linux
  0 siblings, 0 replies; 9+ messages in thread
From: Russell King - ARM Linux @ 2014-01-22 13:37 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Jan 22, 2014 at 02:31:11PM +0100, Linus Walleij wrote:
> The Integrator/AP can be used with a logical module called

	logic module

> IM-PD1, which contains a few AMBA PrimeCell devices, one of which
> is the PL061 GPIO controller. As the lines from this GPIO
> controller are looped back to devices on the board itself and
> provides resources back to it, we need to always have GPIO
> and the PL061 driver available for other devices to work.

>  config INTEGRATOR_IMPD1
>  	tristate "Include support for Integrator/IM-PD1"
>  	depends on ARCH_INTEGRATOR_AP
> +	select ARCH_REQUIRE_GPIOLIB
> +	select ARM_AMBA

Doesn't ARCH_INTEGRATOR already select ARM_AMBA, which this option already
depends on?

-- 
FTTC broadband for 0.8mile line: 5.8Mbps down 500kbps up.  Estimation
in database were 13.1 to 19Mbit for a good line, about 7.5+ for a bad.
Estimate before purchase was "up to 13.2Mbit".

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

* [PATCH 1/5] irqchip: vic: update the base IRQ member correctly
  2014-01-22 13:31 ` [PATCH 1/5] irqchip: vic: update the base IRQ member correctly Linus Walleij
@ 2014-02-03  9:22   ` Linus Walleij
  0 siblings, 0 replies; 9+ messages in thread
From: Linus Walleij @ 2014-02-03  9:22 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Jan 22, 2014 at 2:31 PM, Linus Walleij <linus.walleij@linaro.org> wrote:

> When passing 0 as the irq base the VIC driver will dynamically
> allocate a number of consecutive interrupt descriptors at some
> available number range. Make sure this number is recorded in
> the state container rather than the passed-in zero argument
> in this case.
>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
> tglx: if you're happy with this pls ACK it so I can take this
> through the ARM SoC tree.

Ping on this.
Wanna queue up some stuff in ARM SoC.

Yours,
Linus Walleij

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

* [PATCH 2/5] irqchip: support cascaded VICs
  2014-01-22 13:31 ` [PATCH 2/5] irqchip: support cascaded VICs Linus Walleij
@ 2014-02-03  9:23   ` Linus Walleij
  0 siblings, 0 replies; 9+ messages in thread
From: Linus Walleij @ 2014-02-03  9:23 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Jan 22, 2014 at 2:31 PM, Linus Walleij <linus.walleij@linaro.org> wrote:

> This adds support for a VIC to be cascaded off another IRQ.
> On the Integrator/AP logical module IM-PD1 there is a VIC
> cascaded off the central FPGA IRQ controller so this is
> needed for that to work out.
>
> In order for the plug-in board to be able to register all
> the devices with their IRQs relative to the offset of the
> base obtained for the cascaded VIC, the base IRQ number
> is passed back to the caller.
>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
> tglx: if you're happy with this pls ACK it so I can take this
> through the ARM SoC tree.

Ping on this, too.

Yours,
Linus Walleij

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

end of thread, other threads:[~2014-02-03  9:23 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-22 13:31 [PATCH 0/5] ARM: integrator: cascaded IRQs on IM-PD1 Linus Walleij
2014-01-22 13:31 ` [PATCH 1/5] irqchip: vic: update the base IRQ member correctly Linus Walleij
2014-02-03  9:22   ` Linus Walleij
2014-01-22 13:31 ` [PATCH 2/5] irqchip: support cascaded VICs Linus Walleij
2014-02-03  9:23   ` Linus Walleij
2014-01-22 13:31 ` [PATCH 3/5] ARM: integrator: use managed resources for the IM-PD1 Linus Walleij
2014-01-22 13:31 ` [PATCH 4/5] ARM: integrator: register the IM-PD1 VIC Linus Walleij
2014-01-22 13:31 ` [PATCH 5/5] ARM: integrator: select AMBA bus and GPIO block Linus Walleij
2014-01-22 13:37   ` Russell King - ARM Linux

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).