Lines Matching +full:imx25 +full:- +full:ccm

1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved.
19 #include "irq-common.h"
29 #define AVIC_NIPRIORITY(x) (0x20 + 4 * (7 - (x))) /* int priority */
57 return -EINVAL; in avic_set_irq_fiq()
63 hwirq -= AVIC_NUM_IRQS / 2; in avic_set_irq_fiq()
85 struct irq_chip_type *ct = gc->chip_types; in avic_irq_suspend()
86 int idx = d->hwirq >> 5; in avic_irq_suspend()
88 avic_saved_mask_reg[idx] = imx_readl(avic_base + ct->regs.mask); in avic_irq_suspend()
89 imx_writel(gc->wake_active, avic_base + ct->regs.mask); in avic_irq_suspend()
92 u8 offs = d->hwirq < AVIC_NUM_IRQS / 2 ? in avic_irq_suspend()
96 * sources. Allow those interrupts in low-power mode. in avic_irq_suspend()
100 imx_writel(~gc->wake_active, mx25_ccm_base + offs); in avic_irq_suspend()
107 struct irq_chip_type *ct = gc->chip_types; in avic_irq_resume()
108 int idx = d->hwirq >> 5; in avic_irq_resume()
110 imx_writel(avic_saved_mask_reg[idx], avic_base + ct->regs.mask); in avic_irq_resume()
113 u8 offs = d->hwirq < AVIC_NUM_IRQS / 2 ? in avic_irq_resume()
130 gc = irq_alloc_generic_chip("mxc-avic", 1, irq_start, avic_base, in avic_init_gc()
132 gc->private = &avic_extra_irq; in avic_init_gc()
133 gc->wake_enabled = IRQ_MSK(32); in avic_init_gc()
135 ct = gc->chip_types; in avic_init_gc()
136 ct->chip.irq_mask = irq_gc_mask_clr_bit; in avic_init_gc()
137 ct->chip.irq_unmask = irq_gc_mask_set_bit; in avic_init_gc()
138 ct->chip.irq_ack = irq_gc_mask_clr_bit; in avic_init_gc()
139 ct->chip.irq_set_wake = irq_gc_set_wake; in avic_init_gc()
140 ct->chip.irq_suspend = avic_irq_suspend; in avic_init_gc()
141 ct->chip.irq_resume = avic_irq_resume; in avic_init_gc()
142 ct->regs.mask = !idx ? AVIC_INTENABLEL : AVIC_INTENABLEH; in avic_init_gc()
143 ct->regs.ack = ct->regs.mask; in avic_init_gc()
174 np = of_find_compatible_node(NULL, NULL, "fsl,imx25-ccm"); in mxc_init_irq()
180 * before we go into low-power mode. in mxc_init_irq()
200 irq_base = irq_alloc_descs(-1, 0, AVIC_NUM_IRQS, numa_node_id()); in mxc_init_irq()