mirror of
https://github.com/torvalds/linux.git
synced 2026-06-07 14:04:54 +02:00
irqchip/gicv2/3: add gic_retrigger
Change-Id: Ic87d4936317fb598c04e3ccc56a850c0c9e4e6ba Signed-off-by: Joseph Chen <chenjh@rock-chips.com> Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
This commit is contained in:
parent
e480347688
commit
9219340e40
|
|
@ -226,6 +226,15 @@ static void gic_unmask_irq(struct irq_data *d)
|
|||
gic_poke_irq(d, GICD_ISENABLER);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_ARCH_ROCKCHIP
|
||||
static int gic_retrigger(struct irq_data *d)
|
||||
{
|
||||
gic_poke_irq(d, GICD_ISPENDR);
|
||||
/* the genirq layer expects 0 if we can't retrigger in hardware */
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
static int gic_irq_set_irqchip_state(struct irq_data *d,
|
||||
enum irqchip_irq_state which, bool val)
|
||||
{
|
||||
|
|
@ -858,6 +867,9 @@ static struct irq_chip gic_chip = {
|
|||
.irq_unmask = gic_unmask_irq,
|
||||
.irq_eoi = gic_eoi_irq,
|
||||
.irq_set_type = gic_set_type,
|
||||
#ifdef CONFIG_ARCH_ROCKCHIP
|
||||
.irq_retrigger = gic_retrigger,
|
||||
#endif
|
||||
.irq_set_affinity = gic_set_affinity,
|
||||
.irq_get_irqchip_state = gic_irq_get_irqchip_state,
|
||||
.irq_set_irqchip_state = gic_irq_set_irqchip_state,
|
||||
|
|
@ -871,6 +883,9 @@ static struct irq_chip gic_eoimode1_chip = {
|
|||
.irq_mask = gic_eoimode1_mask_irq,
|
||||
.irq_unmask = gic_unmask_irq,
|
||||
.irq_eoi = gic_eoimode1_eoi_irq,
|
||||
#ifdef CONFIG_ARCH_ROCKCHIP
|
||||
.irq_retrigger = gic_retrigger,
|
||||
#endif
|
||||
.irq_set_type = gic_set_type,
|
||||
.irq_set_affinity = gic_set_affinity,
|
||||
.irq_get_irqchip_state = gic_irq_get_irqchip_state,
|
||||
|
|
|
|||
|
|
@ -227,6 +227,15 @@ static void gic_unmask_irq(struct irq_data *d)
|
|||
gic_poke_irq(d, GIC_DIST_ENABLE_SET);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_ARCH_ROCKCHIP
|
||||
static int gic_retrigger(struct irq_data *d)
|
||||
{
|
||||
gic_poke_irq(d, GIC_DIST_PENDING_SET);
|
||||
/* the genirq layer expects 0 if we can't retrigger in hardware */
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
static void gic_eoi_irq(struct irq_data *d)
|
||||
{
|
||||
writel_relaxed(gic_irq(d), gic_cpu_base(d) + GIC_CPU_EOI);
|
||||
|
|
@ -420,6 +429,9 @@ static const struct irq_chip gic_chip = {
|
|||
.irq_unmask = gic_unmask_irq,
|
||||
.irq_eoi = gic_eoi_irq,
|
||||
.irq_set_type = gic_set_type,
|
||||
#ifdef CONFIG_ARCH_ROCKCHIP
|
||||
.irq_retrigger = gic_retrigger,
|
||||
#endif
|
||||
.irq_get_irqchip_state = gic_irq_get_irqchip_state,
|
||||
.irq_set_irqchip_state = gic_irq_set_irqchip_state,
|
||||
.flags = IRQCHIP_SET_TYPE_MASKED |
|
||||
|
|
@ -1081,6 +1093,9 @@ static void gic_init_chip(struct gic_chip_data *gic, struct device *dev,
|
|||
gic->chip.irq_mask = gic_eoimode1_mask_irq;
|
||||
gic->chip.irq_eoi = gic_eoimode1_eoi_irq;
|
||||
gic->chip.irq_set_vcpu_affinity = gic_irq_set_vcpu_affinity;
|
||||
#ifdef CONFIG_ARCH_ROCKCHIP
|
||||
gic->chip.irq_retrigger = gic_retrigger;
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user