static void gsc_asic_mask_irq(unsigned int irq) { struct gsc_asic *irq_dev = get_irq_chip_data(irq); int local_irq = gsc_find_local_irq(irq, irq_dev->global_irq, 32); u32 imr; DEBPRINTK(KERN_DEBUG "%s(%d) %s: IMR 0x%x\n", __func__, irq, irq_dev->name, imr); /* Disable the IRQ line by clearing the bit in the IMR */ imr = gsc_readl(irq_dev->hpa + OFFSET_IMR); imr &= ~(1 << local_irq); gsc_writel(imr, irq_dev->hpa + OFFSET_IMR); }
static void gsc_asic_enable_irq(unsigned int irq) { struct irq_desc *desc = irq_to_desc(irq); struct gsc_asic *irq_dev = desc->chip_data; int local_irq = gsc_find_local_irq(irq, irq_dev->global_irq, 32); u32 imr; DEBPRINTK(KERN_DEBUG "%s(%d) %s: IMR 0x%x\n", __func__, irq, irq_dev->name, imr); /* Enable the IRQ line by setting the bit in the IMR */ imr = gsc_readl(irq_dev->hpa + OFFSET_IMR); imr |= 1 << local_irq; gsc_writel(imr, irq_dev->hpa + OFFSET_IMR); }
static void gsc_asic_unmask_irq(unsigned int irq) { struct gsc_asic *irq_dev = get_irq_chip_data(irq); int local_irq = gsc_find_local_irq(irq, irq_dev->global_irq, 32); u32 imr; DEBPRINTK(KERN_DEBUG "%s(%d) %s: IMR 0x%x\n", __func__, irq, irq_dev->name, imr); /* Enable the IRQ line by setting the bit in the IMR */ imr = gsc_readl(irq_dev->hpa + OFFSET_IMR); imr |= 1 << local_irq; gsc_writel(imr, irq_dev->hpa + OFFSET_IMR); /* * FIXME: read IPR to make sure the IRQ isn't already pending. * If so, we need to read IRR and manually call do_irq(). */ }