From 1f43e244bda0c78844720609455fd77f6f275e51 Mon Sep 17 00:00:00 2001 From: Steve Reinhardt Date: Thu, 11 Jul 2013 21:57:04 -0500 Subject: dev: make BasicPioDevice take size in constructor Instead of relying on derived classes explicitly assigning to the BasicPioDevice pioSize field, require them to pass a size value in to the constructor. Committed by: Nilay Vaish --- src/dev/mips/malta_cchip.cc | 3 +-- src/dev/mips/malta_io.cc | 4 +--- src/dev/mips/malta_pchip.cc | 4 +--- 3 files changed, 3 insertions(+), 8 deletions(-) (limited to 'src/dev/mips') diff --git a/src/dev/mips/malta_cchip.cc b/src/dev/mips/malta_cchip.cc index 25062e422..fe3336435 100755 --- a/src/dev/mips/malta_cchip.cc +++ b/src/dev/mips/malta_cchip.cc @@ -55,11 +55,10 @@ using namespace std; using namespace TheISA; MaltaCChip::MaltaCChip(Params *p) - : BasicPioDevice(p), malta(p->malta) + : BasicPioDevice(p, 0xfffffff), malta(p->malta) { warn("MaltaCCHIP::MaltaCChip() not implemented."); - pioSize = 0xfffffff; //Put back pointer in malta malta->cchip = this; diff --git a/src/dev/mips/malta_io.cc b/src/dev/mips/malta_io.cc index 1ae5442bf..d769b1112 100755 --- a/src/dev/mips/malta_io.cc +++ b/src/dev/mips/malta_io.cc @@ -65,11 +65,9 @@ MaltaIO::RTC::RTC(const string &name, const MaltaIOParams *p) } MaltaIO::MaltaIO(const Params *p) - : BasicPioDevice(p), malta(p->malta), + : BasicPioDevice(p, 0x100), malta(p->malta), pitimer(this, p->name + "pitimer"), rtc(p->name + ".rtc", p) { - pioSize = 0x100; - // set the back pointer from malta to myself malta->io = this; diff --git a/src/dev/mips/malta_pchip.cc b/src/dev/mips/malta_pchip.cc index 076fdfe84..37aaa1b5a 100755 --- a/src/dev/mips/malta_pchip.cc +++ b/src/dev/mips/malta_pchip.cc @@ -51,10 +51,8 @@ using namespace std; using namespace TheISA; MaltaPChip::MaltaPChip(const Params *p) -: BasicPioDevice(p) + : BasicPioDevice(p, 0x1000) { - pioSize = 0x1000; - for (int i = 0; i < 4; i++) { wsba[i] = 0; wsm[i] = 0; -- cgit v1.2.3