diff options
author | Andreas Sandberg <andreas.sandberg@arm.com> | 2018-04-09 20:43:28 +0100 |
---|---|---|
committer | Andreas Sandberg <andreas.sandberg@arm.com> | 2018-04-18 09:14:02 +0000 |
commit | 2ecc1756254ba571318ffe30130bad35a99a2d39 (patch) | |
tree | 8f7a0141dd2b921d211763602c247f093ff3c44c /src/dev/arm/kmi.hh | |
parent | e3dd3c77d2e28b40534a77db343163bcb388a40a (diff) | |
download | gem5-2ecc1756254ba571318ffe30130bad35a99a2d39.tar.xz |
dev, arm: Cleanup Pl050 interrupt handling
Add support for TX interrupts and cleanup existing RX interrupt
handling.
Change-Id: If2e5b0c0cc6fbeb2dce09e7e9d935647516b2c47
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Sudhanshu Jha <sudhanshu.jha@arm.com>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/9769
Diffstat (limited to 'src/dev/arm/kmi.hh')
-rw-r--r-- | src/dev/arm/kmi.hh | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/src/dev/arm/kmi.hh b/src/dev/arm/kmi.hh index 16a61a181..8a94ff606 100644 --- a/src/dev/arm/kmi.hh +++ b/src/dev/arm/kmi.hh @@ -106,18 +106,23 @@ class Pl050 : public AmbaIntDevice /** raw interrupt register (unmasked) */ InterruptReg rawInterrupts; - /** Update the status of the interrupt registers and schedule an interrupt - * if required */ - void updateIntStatus(); + /** Set or clear the TX interrupt */ + void setTxInt(bool value); - /** Function to generate interrupt */ - void generateInterrupt(); + /** Update the RX interrupt using PS/2 device state */ + void updateRxInt(); - /** Get interrupt value */ - InterruptReg getInterrupt() const; + /** + * Update the status of the interrupt and control registers and + * deliver an interrupt if required. + */ + void updateIntCtrl(InterruptReg ints, ControlReg ctrl); - /** Wrapper to create an event out of the thing */ - EventFunctionWrapper intEvent; + void setInterrupts(InterruptReg ints) { updateIntCtrl(ints, control); } + void setControl(ControlReg ctrl) { updateIntCtrl(rawInterrupts, ctrl); } + + /** Get current interrupt value */ + InterruptReg getInterrupt() const; /** PS2 device connected to this KMI interface */ PS2Device *ps2; |