dev-arm: generateBasicPioDeviceNode requiring an ArmInterruptPin
Change-Id: I16ed3b689158defe2a43cccfa053d48dec4a1e41 Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com> Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/31941 Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Maintainer: Andreas Sandberg <andreas.sandberg@arm.com> Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
@@ -57,14 +57,14 @@ class PioDevice(ClockedObject):
|
||||
state.sizeCells(size) ))
|
||||
|
||||
if interrupts:
|
||||
if any([i < 32 for i in interrupts]):
|
||||
if any([i.num < 32 for i in interrupts]):
|
||||
raise(("Interrupt number smaller than 32 "+
|
||||
" in PioDevice %s") % name)
|
||||
|
||||
# subtracting 32 because Linux assumes that SPIs start at 0, while
|
||||
# gem5 uses the internal GIC numbering (SPIs start at 32)
|
||||
node.append(FdtPropertyWords("interrupts", sum(
|
||||
[[0, i - 32, 4] for i in interrupts], []) ))
|
||||
[[0, i.num - 32, 4] for i in interrupts], []) ))
|
||||
|
||||
return node
|
||||
|
||||
|
||||
Reference in New Issue
Block a user