dev: Rename ps2 variables as ps2Device

Pave the way for a ps2 namespace.

Change-Id: I61fa33c57aee3e7c6df02a364420e4f83901f60b
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45389
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Reviewed-by: Gabe Black <gabe.black@gmail.com>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
This commit is contained in:
Daniel R. Carvalho
2021-05-08 09:50:30 -03:00
committed by Daniel Carvalho
parent faad68d224
commit fef8e578bf
2 changed files with 7 additions and 7 deletions

View File

@@ -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);
}

View File

@@ -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);