summaryrefslogtreecommitdiff
path: root/src/dev/pci
diff options
context:
space:
mode:
authorGabe Black <gabeblack@google.com>2019-03-07 03:02:35 -0800
committerGabe Black <gabeblack@google.com>2019-03-19 10:22:50 +0000
commitd3d24835bcc03ecf312ac6ba7df114656770730f (patch)
tree43bb564a7bc3e22ffd7b1b906f6f96742ecb619a /src/dev/pci
parent378d9ccbeb4053aeeab002159b26625854af54f7 (diff)
downloadgem5-d3d24835bcc03ecf312ac6ba7df114656770730f.tar.xz
arch, cpu, dev, gpu, mem, sim, python: start using getPort.
Replace the getMasterPort, getSlavePort, and getEthPort functions with getPort, and remove extraneous mechanisms that are no longer necessary. Change-Id: Iab7e3c02d2f3a0cf33e7e824e18c28646b5bc318 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/17040 Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br> Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Diffstat (limited to 'src/dev/pci')
-rw-r--r--src/dev/pci/copy_engine.cc14
-rw-r--r--src/dev/pci/copy_engine.hh6
2 files changed, 10 insertions, 10 deletions
diff --git a/src/dev/pci/copy_engine.cc b/src/dev/pci/copy_engine.cc
index 7f8959aca..2a74c5c0c 100644
--- a/src/dev/pci/copy_engine.cc
+++ b/src/dev/pci/copy_engine.cc
@@ -113,24 +113,24 @@ CopyEngine::CopyEngineChannel::~CopyEngineChannel()
delete [] copyBuffer;
}
-BaseMasterPort &
-CopyEngine::getMasterPort(const std::string &if_name, PortID idx)
+Port &
+CopyEngine::getPort(const std::string &if_name, PortID idx)
{
if (if_name != "dma") {
// pass it along to our super class
- return PciDevice::getMasterPort(if_name, idx);
+ return PciDevice::getPort(if_name, idx);
} else {
if (idx >= static_cast<int>(chan.size())) {
- panic("CopyEngine::getMasterPort: unknown index %d\n", idx);
+ panic("CopyEngine::getPort: unknown index %d\n", idx);
}
- return chan[idx]->getMasterPort();
+ return chan[idx]->getPort();
}
}
-BaseMasterPort &
-CopyEngine::CopyEngineChannel::getMasterPort()
+Port &
+CopyEngine::CopyEngineChannel::getPort()
{
return cePort;
}
diff --git a/src/dev/pci/copy_engine.hh b/src/dev/pci/copy_engine.hh
index 1ec29f02e..eb62fd3b7 100644
--- a/src/dev/pci/copy_engine.hh
+++ b/src/dev/pci/copy_engine.hh
@@ -95,7 +95,7 @@ class CopyEngine : public PciDevice
public:
CopyEngineChannel(CopyEngine *_ce, int cid);
virtual ~CopyEngineChannel();
- BaseMasterPort &getMasterPort();
+ Port &getPort();
std::string name() { assert(ce); return ce->name() + csprintf("-chan%d", channelId); }
virtual Tick read(PacketPtr pkt)
@@ -193,8 +193,8 @@ class CopyEngine : public PciDevice
void regStats() override;
- BaseMasterPort &getMasterPort(const std::string &if_name,
- PortID idx = InvalidPortID) override;
+ Port &getPort(const std::string &if_name,
+ PortID idx = InvalidPortID) override;
Tick read(PacketPtr pkt) override;
Tick write(PacketPtr pkt) override;