diff options
author | Marcin Wojtas <mw@semihalf.com> | 2018-03-21 09:55:47 +0100 |
---|---|---|
committer | Kostya Porotchkin <kostap@marvell.com> | 2018-07-29 10:58:24 +0300 |
commit | a743eca5b0c46d6215c9aa295a0faed463368878 (patch) | |
tree | 6a3cb1ca20c77604112222a68dbded27dea7379d | |
parent | 90506b8185bf2801de8bdf7d77d55c94b0763fc4 (diff) |
gicv2: enable configuring IRQ trigger type
This patch introduces new helper routines that allow
configuring the individual IRQs to be edge-triggered
via GICD_ICFGR registers. This is helpful to modify
the default configuration of the GIC SPI's, which
are all set during initialization to be level-sensitive.
Change-Id: I23deb4a0381691a686a3cda52405aa1dfd5e56f2
Signed-off-by: Marcin Wojtas <mw@semihalf.com>
Reviewed-on: http://vgitil04.il.marvell.com:8080/58303
Tested-by: iSoC Platform CI <ykjenk@marvell.com>
Reviewed-by: Kostya Porotchkin <kostap@marvell.com>
-rw-r--r-- | drivers/arm/gic/v2/gicv2_main.c | 8 | ||||
-rw-r--r-- | include/drivers/arm/gicv2.h | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/drivers/arm/gic/v2/gicv2_main.c b/drivers/arm/gic/v2/gicv2_main.c index e25e501d..bbd0be3b 100644 --- a/drivers/arm/gic/v2/gicv2_main.c +++ b/drivers/arm/gic/v2/gicv2_main.c @@ -595,3 +595,11 @@ unsigned int gicv2_set_pmr(unsigned int mask) return old_mask; } + +/******************************************************************************* + * This functions configures the single interrupt to be edge triggered + ******************************************************************************/ +void gicv2_interrupt_set_edge_triggered(unsigned int id) +{ + gicd_set_icfgr(driver_data->gicd_base, id, GIC_INTR_CFG_EDGE); +} diff --git a/include/drivers/arm/gicv2.h b/include/drivers/arm/gicv2.h index 39c73027..7f9d73ea 100644 --- a/include/drivers/arm/gicv2.h +++ b/include/drivers/arm/gicv2.h @@ -190,6 +190,7 @@ void gicv2_set_spi_routing(unsigned int id, int proc_num); void gicv2_set_interrupt_pending(unsigned int id); void gicv2_clear_interrupt_pending(unsigned int id); unsigned int gicv2_set_pmr(unsigned int mask); +void gicv2_interrupt_set_edge_triggered(unsigned int id); #endif /* __ASSEMBLY__ */ #endif /* __GICV2_H__ */ |