diff options
author | ian <ian@FreeBSD.org> | 2014-09-14 21:21:03 +0000 |
---|---|---|
committer | ian <ian@FreeBSD.org> | 2014-09-14 21:21:03 +0000 |
commit | 4c51a2212236e79a65ec9962d39ec638154a5c54 (patch) | |
tree | 56e25a0775e05d86a742c90594fae48fc23c61ae /sys/arm/include/intr.h | |
parent | d29687c2d2d53404f1e8de51ed369c2cb57dfcee (diff) | |
download | FreeBSD-src-4c51a2212236e79a65ec9962d39ec638154a5c54.zip FreeBSD-src-4c51a2212236e79a65ec9962d39ec638154a5c54.tar.gz |
Add a common routine for parsing FDT data describing an ARM GIC interrupt.
In the fdt data we've written for ourselves, the interrupt properties
for GIC interrupts have just been a bare interrupt number. In standard
data that conforms to the published bindings, GIC interrupt properties
contain 3-tuples that describe the interrupt as shared vs private, the
interrupt number within the shared/private address space, and configuration
info such as level vs edge triggered.
The new gic_decode_fdt() function parses both types of data, based on the
#interrupt-cells property. Previously, each platform implemented a decode
routine and put a pointer to it into fdt_pic_table. Now they can just
list this function in their table instead if they use arm/gic.c.
Diffstat (limited to 'sys/arm/include/intr.h')
-rw-r--r-- | sys/arm/include/intr.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/arm/include/intr.h b/sys/arm/include/intr.h index c1d4e39..3509772 100644 --- a/sys/arm/include/intr.h +++ b/sys/arm/include/intr.h @@ -82,5 +82,7 @@ extern int (*arm_config_irq)(int irq, enum intr_trigger trig, void arm_irq_memory_barrier(uintptr_t); void gic_init_secondary(void); +int gic_decode_fdt(uint32_t iparentnode, uint32_t *intrcells, int *interrupt, + int *trig, int *pol); #endif /* _MACHINE_INTR_H */ |