aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/irqchip/irq-versatile-fpga.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-08-08 14:14:29 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-08-08 14:14:29 -0400
commitb3345d7c57d70e6cb6749af25cdbe80515582e99 (patch)
tree04cce706bc7e944ad1fb257108a8ae735948f97f /drivers/irqchip/irq-versatile-fpga.c
parent44c916d58b9ef1f2c4aec2def57fa8289c716a60 (diff)
parentc2fff85e21818952aa0ee5778926beee6c03e579 (diff)
Merge tag 'soc-for-3.17' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM SoC platform changes from Olof Johansson: "This is the bulk of new SoC enablement and other platform changes for 3.17: - Samsung S5PV210 has been converted to DT and multiplatform - Clock drivers and bindings for some of the lower-end i.MX 1/2 platforms - Kirkwood, one of the popular Marvell platforms, is folded into the mvebu platform code, removing mach-kirkwood - Hwmod data for TI AM43xx and DRA7 platforms - More additions of Renesas shmobile platform support - Removal of plat-samsung contents that can be removed with S5PV210 being multiplatform/DT-enabled and the other two old platforms being removed New platforms (most with only basic support right now): - Hisilicon X5HD2 settop box chipset is introduced - Mediatek MT6589 (mobile chipset) is introduced - Broadcom BCM7xxx settop box chipset is introduced + as usual a lot other pieces all over the platform code" * tag 'soc-for-3.17' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (240 commits) ARM: hisi: remove smp from machine descriptor power: reset: move hisilicon reboot code ARM: dts: Add hix5hd2-dkb dts file. ARM: debug: Rename Hi3716 to HIX5HD2 ARM: hisi: enable hix5hd2 SoC ARM: hisi: add ARCH_HISI MAINTAINERS: add entry for Broadcom ARM STB architecture ARM: brcmstb: select GISB arbiter and interrupt drivers ARM: brcmstb: add infrastructure for ARM-based Broadcom STB SoCs ARM: configs: enable SMP in bcm_defconfig ARM: add SMP support for Broadcom mobile SoCs Documentation: arm: misc updates to Marvell EBU SoC status Documentation: arm: add URLs to public datasheets for the Marvell Armada XP SoC ARM: mvebu: fix build without platforms selected ARM: mvebu: add cpuidle support for Armada 38x ARM: mvebu: add cpuidle support for Armada 370 cpuidle: mvebu: add Armada 38x support cpuidle: mvebu: add Armada 370 support cpuidle: mvebu: rename the driver from armada-370-xp to mvebu-v7 ARM: mvebu: export the SCU address ...
Diffstat (limited to 'drivers/irqchip/irq-versatile-fpga.c')
-rw-r--r--drivers/irqchip/irq-versatile-fpga.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/drivers/irqchip/irq-versatile-fpga.c b/drivers/irqchip/irq-versatile-fpga.c
index 3ae2bb8d9cf2..ccf58548b161 100644
--- a/drivers/irqchip/irq-versatile-fpga.c
+++ b/drivers/irqchip/irq-versatile-fpga.c
@@ -14,6 +14,8 @@
14#include <asm/exception.h> 14#include <asm/exception.h>
15#include <asm/mach/irq.h> 15#include <asm/mach/irq.h>
16 16
17#include "irqchip.h"
18
17#define IRQ_STATUS 0x00 19#define IRQ_STATUS 0x00
18#define IRQ_RAW_STATUS 0x04 20#define IRQ_RAW_STATUS 0x04
19#define IRQ_ENABLE_SET 0x08 21#define IRQ_ENABLE_SET 0x08
@@ -26,6 +28,8 @@
26#define FIQ_ENABLE_SET 0x28 28#define FIQ_ENABLE_SET 0x28
27#define FIQ_ENABLE_CLEAR 0x2C 29#define FIQ_ENABLE_CLEAR 0x2C
28 30
31#define PIC_ENABLES 0x20 /* set interrupt pass through bits */
32
29/** 33/**
30 * struct fpga_irq_data - irq data container for the FPGA IRQ controller 34 * struct fpga_irq_data - irq data container for the FPGA IRQ controller
31 * @base: memory offset in virtual memory 35 * @base: memory offset in virtual memory
@@ -201,14 +205,26 @@ int __init fpga_irq_of_init(struct device_node *node,
201 205
202 /* Some chips are cascaded from a parent IRQ */ 206 /* Some chips are cascaded from a parent IRQ */
203 parent_irq = irq_of_parse_and_map(node, 0); 207 parent_irq = irq_of_parse_and_map(node, 0);
204 if (!parent_irq) 208 if (!parent_irq) {
209 set_handle_irq(fpga_handle_irq);
205 parent_irq = -1; 210 parent_irq = -1;
211 }
206 212
207 fpga_irq_init(base, node->name, 0, parent_irq, valid_mask, node); 213 fpga_irq_init(base, node->name, 0, parent_irq, valid_mask, node);
208 214
209 writel(clear_mask, base + IRQ_ENABLE_CLEAR); 215 writel(clear_mask, base + IRQ_ENABLE_CLEAR);
210 writel(clear_mask, base + FIQ_ENABLE_CLEAR); 216 writel(clear_mask, base + FIQ_ENABLE_CLEAR);
211 217
218 /*
219 * On Versatile AB/PB, some secondary interrupts have a direct
220 * pass-thru to the primary controller for IRQs 20 and 22-31 which need
221 * to be enabled. See section 3.10 of the Versatile AB user guide.
222 */
223 if (of_device_is_compatible(node, "arm,versatile-sic"))
224 writel(0xffd00000, base + PIC_ENABLES);
225
212 return 0; 226 return 0;
213} 227}
228IRQCHIP_DECLARE(arm_fpga, "arm,versatile-fpga-irq", fpga_irq_of_init);
229IRQCHIP_DECLARE(arm_fpga_sic, "arm,versatile-sic", fpga_irq_of_init);
214#endif 230#endif