2 * Jailhouse, a Linux-based partitioning hypervisor
4 * Copyright (c) ARM Limited, 2014
7 * Jean-Philippe Brucker <jean-philippe.brucker@arm.com>
9 * This work is licensed under the terms of the GNU GPL, version 2. See
10 * the COPYING file in the top-level directory.
12 #include <asm/gic_common.h>
13 #include <asm/gic_v2.h>
14 #include <mach/gic_v2.h>
17 void gic_enable(unsigned int irqn)
19 mmio_write32(GICD_BASE + GICD_ISENABLER, 1 << irqn);
24 mmio_write32(GICC_BASE + GICC_CTLR, GICC_CTLR_GRPEN1);
25 mmio_write32(GICC_BASE + GICC_PMR, GICC_PMR_DEFAULT);
30 void gic_write_eoi(u32 irqn)
32 mmio_write32(GICC_BASE + GICC_EOIR, irqn);
35 u32 gic_read_ack(void)
37 return mmio_read32(GICC_BASE + GICC_IAR);