dev-arm: Fix DTB autogen for HDLcd
authorGiacomo Travaglini <giacomo.travaglini@arm.com>
Wed, 29 Jul 2020 11:25:25 +0000 (12:25 +0100)
committerGiacomo Travaglini <giacomo.travaglini@arm.com>
Thu, 30 Jul 2020 16:06:34 +0000 (16:06 +0000)
The HDLcd was wrongly reporting the hardcoded IRQ=63 as the interrupt
number during DTB autogeneration. This is because the DTS is using 63.
However that corresponds to the SPI offset; the gem5 helper is
instead expecting the global IRQ number = 32 + SPI offset

Change-Id: I9e82360843eacb13cef5ddd2e28d2f3ef3147335
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/31940
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
src/dev/arm/RealView.py

index b206a3ff26dab42b68090994861f21968b1056df..5bfc12e87b02f7ea446e9c80248b0f7d4299afff 100644 (file)
@@ -522,9 +522,8 @@ class HDLcd(AmbaDmaDevice):
         port_node = FdtNode("port")
         port_node.append(endpoint_node)
 
-        # Interrupt number is hardcoded; it is not a property of this class
         node = self.generateBasicPioDeviceNode(state, 'hdlcd',
-                                               self.pio_addr, 0x1000, [63])
+            self.pio_addr, 0x1000, [ self.interrupt.num ])
 
         node.appendCompatible(["arm,hdlcd"])
         node.append(FdtPropertyWords("clocks", state.phandle(self.pxl_clk)))