Lines Matching full:vic
3 * linux/arch/arm/common/vic.c
23 #include <linux/irqchip/arm-vic.h>
42 #define VIC_ITCR 0x300 /* VIC test control register */
49 * struct vic_device - VIC PM device
50 * @parent_irq: The parent IRQ number of the VIC if cascaded, or 0.
51 * @irq: The IRQ number for the base of the VIC.
52 * @base: The register base for the VIC.
60 * @domain: The IRQ domain for the VIC.
84 * @base: Base of the VIC.
102 static void resume_one_vic(struct vic_device *vic) in resume_one_vic() argument
104 void __iomem *base = vic->base; in resume_one_vic()
106 printk(KERN_DEBUG "%s: resuming vic at %p\n", __func__, base); in resume_one_vic()
111 writel(vic->int_select, base + VIC_INT_SELECT); in resume_one_vic()
112 writel(vic->protect, base + VIC_PROTECT); in resume_one_vic()
115 writel(vic->int_enable, base + VIC_INT_ENABLE); in resume_one_vic()
116 writel(~vic->int_enable, base + VIC_INT_ENABLE_CLEAR); in resume_one_vic()
120 writel(vic->soft_int, base + VIC_INT_SOFT); in resume_one_vic()
121 writel(~vic->soft_int, base + VIC_INT_SOFT_CLEAR); in resume_one_vic()
132 static void suspend_one_vic(struct vic_device *vic) in suspend_one_vic() argument
134 void __iomem *base = vic->base; in suspend_one_vic()
136 printk(KERN_DEBUG "%s: suspending vic at %p\n", __func__, base); in suspend_one_vic()
138 vic->int_select = readl(base + VIC_INT_SELECT); in suspend_one_vic()
139 vic->int_enable = readl(base + VIC_INT_ENABLE); in suspend_one_vic()
140 vic->soft_int = readl(base + VIC_INT_SOFT); in suspend_one_vic()
141 vic->protect = readl(base + VIC_PROTECT); in suspend_one_vic()
146 writel(vic->resume_irqs, base + VIC_INT_ENABLE); in suspend_one_vic()
147 writel(~vic->resume_irqs, base + VIC_INT_ENABLE_CLEAR); in suspend_one_vic()
166 * vic_pm_init - initcall to register VIC pm
170 * nature of the VIC's registration.
199 * Handle each interrupt in a single VIC. Returns non-zero if we've
204 static int handle_one_vic(struct vic_device *vic, struct pt_regs *regs) in handle_one_vic() argument
209 while ((stat = readl_relaxed(vic->base + VIC_IRQ_STATUS))) { in handle_one_vic()
211 generic_handle_domain_irq(vic->domain, irq); in handle_one_vic()
222 struct vic_device *vic = irq_desc_get_handler_data(desc); in vic_handle_irq_cascaded() local
226 while ((stat = readl_relaxed(vic->base + VIC_IRQ_STATUS))) { in vic_handle_irq_cascaded()
228 generic_handle_domain_irq(vic->domain, hwirq); in vic_handle_irq_cascaded()
235 * Keep iterating over all registered VIC's until there are no pending
254 * vic_register() - Register a VIC.
255 * @base: The base address of the VIC.
257 * @irq: The base IRQ for the VIC.
260 * @node: The device tree node associated with the VIC.
262 * Register the VIC with the system device tree so that it can be notified
266 * This also configures the IRQ domain for the VIC.
368 .name = "VIC",
442 /* Identify which VIC cell this one is, by reading the ID */ in __vic_init()
449 printk(KERN_INFO "VIC @%p: id 0x%08x, vendor 0x%02x\n", in __vic_init()
457 printk(KERN_WARNING "VIC: unknown vendor, continuing anyways\n"); in __vic_init()
513 IRQCHIP_DECLARE(arm_pl190_vic, "arm,pl190-vic", vic_of_init);
514 IRQCHIP_DECLARE(arm_pl192_vic, "arm,pl192-vic", vic_of_init);
515 IRQCHIP_DECLARE(arm_versatile_vic, "arm,versatile-vic", vic_of_init);