From fef8e578bf7b8e505a29c34a0689ce710475dc98 Mon Sep 17 00:00:00 2001 From: "Daniel R. Carvalho" Date: Sat, 8 May 2021 09:50:30 -0300 Subject: [PATCH] dev: Rename ps2 variables as ps2Device Pave the way for a ps2 namespace. Change-Id: I61fa33c57aee3e7c6df02a364420e4f83901f60b Signed-off-by: Daniel R. Carvalho Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45389 Tested-by: kokoro Reviewed-by: Bobby R. Bruce Reviewed-by: Gabe Black Maintainer: Bobby R. Bruce --- src/dev/arm/kmi.cc | 12 ++++++------ src/dev/arm/kmi.hh | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/dev/arm/kmi.cc b/src/dev/arm/kmi.cc index 18fb1f1795..4f0541ea6b 100644 --- a/src/dev/arm/kmi.cc +++ b/src/dev/arm/kmi.cc @@ -51,9 +51,9 @@ Pl050::Pl050(const Pl050Params &p) : AmbaIntDevice(p, 0x1000), control(0), status(0x43), clkdiv(0), rawInterrupts(0), - ps2(p.ps2) + ps2Device(p.ps2) { - ps2->hostRegDataAvailable([this]() { this->updateRxInt(); }); + ps2Device->hostRegDataAvailable([this]() { this->updateRxInt(); }); } Tick @@ -72,13 +72,13 @@ Pl050::read(PacketPtr pkt) break; case kmiStat: - status.rxfull = ps2->hostDataAvailable() ? 1 : 0; + status.rxfull = ps2Device->hostDataAvailable() ? 1 : 0; DPRINTF(Pl050, "Read Status: %#x\n", (uint32_t)status); data = status; break; case kmiData: - data = ps2->hostDataAvailable() ? ps2->hostRead() : 0; + data = ps2Device->hostDataAvailable() ? ps2Device->hostRead() : 0; updateRxInt(); DPRINTF(Pl050, "Read Data: %#x\n", (uint32_t)data); break; @@ -134,7 +134,7 @@ Pl050::write(PacketPtr pkt) DPRINTF(Pl050, "Write Data: %#x\n", data); // Clear the TX interrupt before writing new data. setTxInt(false); - ps2->hostWrite((uint8_t)data); + ps2Device->hostWrite((uint8_t)data); // Data is written in 0 time, so raise the TX interrupt again. setTxInt(true); break; @@ -167,7 +167,7 @@ Pl050::updateRxInt() { InterruptReg ints = rawInterrupts; - ints.rx = ps2->hostDataAvailable() ? 1 : 0; + ints.rx = ps2Device->hostDataAvailable() ? 1 : 0; setInterrupts(ints); } diff --git a/src/dev/arm/kmi.hh b/src/dev/arm/kmi.hh index 2d83c138d4..03e9dbd009 100644 --- a/src/dev/arm/kmi.hh +++ b/src/dev/arm/kmi.hh @@ -123,7 +123,7 @@ class Pl050 : public AmbaIntDevice InterruptReg getInterrupt() const; /** PS2 device connected to this KMI interface */ - PS2Device *ps2; + PS2Device *ps2Device; public: Pl050(const Pl050Params &p);