summaryrefslogtreecommitdiff
path: root/src/dev/arm/rtc_pl031.cc
diff options
context:
space:
mode:
authorGabe Black <gabeblack@google.com>2018-10-12 04:58:50 -0700
committerGabe Black <gabeblack@google.com>2018-10-12 23:45:51 +0000
commit9125a43f624653e6238dbb8713658cae2c5d43cd (patch)
tree268bab703026e5d6497492c97b736f125e875c59 /src/dev/arm/rtc_pl031.cc
parent413b4e7431b20d9b29dbf66d6677a60205ddd357 (diff)
downloadgem5-9125a43f624653e6238dbb8713658cae2c5d43cd.tar.xz
arm: Use little endian packet accessors.
We know data is little endian, so we can use those accessors explicitly. Change-Id: Iee337109fcda134e1ac5a700e5141fd7060f9c45 Reviewed-on: https://gem5-review.googlesource.com/c/13457 Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Diffstat (limited to 'src/dev/arm/rtc_pl031.cc')
-rw-r--r--src/dev/arm/rtc_pl031.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/dev/arm/rtc_pl031.cc b/src/dev/arm/rtc_pl031.cc
index 5b6ce5288..9abb77629 100644
--- a/src/dev/arm/rtc_pl031.cc
+++ b/src/dev/arm/rtc_pl031.cc
@@ -92,7 +92,7 @@ PL031::read(PacketPtr pkt)
default:
if (readId(pkt, ambaId, pioAddr)) {
// Hack for variable sized access
- data = pkt->get<uint32_t>();
+ data = pkt->getLE<uint32_t>();
break;
}
panic("Tried to read PL031 at offset %#x that doesn't exist\n", daddr);
@@ -101,13 +101,13 @@ PL031::read(PacketPtr pkt)
switch(pkt->getSize()) {
case 1:
- pkt->set<uint8_t>(data);
+ pkt->setLE<uint8_t>(data);
break;
case 2:
- pkt->set<uint16_t>(data);
+ pkt->setLE<uint16_t>(data);
break;
case 4:
- pkt->set<uint32_t>(data);
+ pkt->setLE<uint32_t>(data);
break;
default:
panic("Uart read size too big?\n");
@@ -131,22 +131,22 @@ PL031::write(PacketPtr pkt)
case DataReg:
break;
case MatchReg:
- matchVal = pkt->get<uint32_t>();
+ matchVal = pkt->getLE<uint32_t>();
resyncMatch();
break;
case LoadReg:
lastWrittenTick = curTick();
- timeVal = pkt->get<uint32_t>();
+ timeVal = pkt->getLE<uint32_t>();
loadVal = timeVal;
resyncMatch();
break;
case ControlReg:
break; // Can't stop when started
case IntMask:
- maskInt = pkt->get<uint32_t>();
+ maskInt = pkt->getLE<uint32_t>();
break;
case IntClear:
- if (pkt->get<uint32_t>()) {
+ if (pkt->getLE<uint32_t>()) {
rawInt = false;
pendingInt = false;
}