zephyr/include/dt-bindings/interrupt-controller/arm-gic.h
Carlo Caione 7baf3f74a9 interrupt_controller: gic: Support PPIs
The GIC-400 driver currently only supports SPIs because the (32) offset
for the INTIDs is hard-coded in the driver. At the driver level there is
no really difference between PPIs and SPIs so we can easily extend the
driver to support PPIs as well.

This is useful if we want to add support for the ARM Generic Timers that
use INTIDs in the PPI range.

SPI interrupts are in the range [0-987]. PPI interrupts are in the range
[0-15].

This commit adds interrupt 'type' cell to the GIC device tree binding
and changes the 'irq' cell to use interrupt type-specific index, rather
than a linear IRQ number.

The 'type'+'irq (index)' combo is automatically fixed up into a linear
IRQ number by the scripts/dts/gen_defines.py script.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2019-12-10 06:59:55 +01:00

26 lines
551 B
C

/*
* Copyright (c) 2018 Lexmark International, Inc.
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef __DT_BINDING_ARM_GIC_H
#define __DT_BINDING_ARM_GIC_H
/* CPU Interrupt numbers */
#define GIC_INT_VIRT_MAINT 25
#define GIC_INT_HYP_TIMER 26
#define GIC_INT_VIRT_TIMER 27
#define GIC_INT_LEGACY_FIQ 28
#define GIC_INT_PHYS_TIMER 29
#define GIC_INT_NS_PHYS_TIMER 30
#define GIC_INT_LEGACY_IRQ 31
#define IRQ_TYPE_LEVEL 0x0
#define IRQ_TYPE_EDGE 0x1
#define GIC_SPI 0x0
#define GIC_PPI 0x1
#define IRQ_DEFAULT_PRIORITY 0xa
#endif