io_device.cc (9294:8fb03b13de02) io_device.cc (9342:6fec8f26e56d)
1/*
2 * Copyright (c) 2012 ARM Limited
3 * All rights reserved.
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

--- 75 unchanged lines hidden (view full) ---

84{
85 if (if_name == "pio") {
86 return pioPort;
87 }
88 return MemObject::getSlavePort(if_name, idx);
89}
90
91unsigned int
1/*
2 * Copyright (c) 2012 ARM Limited
3 * All rights reserved.
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

--- 75 unchanged lines hidden (view full) ---

84{
85 if (if_name == "pio") {
86 return pioPort;
87 }
88 return MemObject::getSlavePort(if_name, idx);
89}
90
91unsigned int
92PioDevice::drain(Event *de)
92PioDevice::drain(DrainManager *dm)
93{
94 unsigned int count;
93{
94 unsigned int count;
95 count = pioPort.drain(de);
95 count = pioPort.drain(dm);
96 if (count)
96 if (count)
97 changeState(Draining);
97 setDrainState(Drainable::Draining);
98 else
98 else
99 changeState(Drained);
99 setDrainState(Drainable::Drained);
100 return count;
101}
102
103BasicPioDevice::BasicPioDevice(const Params *p)
104 : PioDevice(p), pioAddr(p->pio_addr), pioSize(0),
105 pioDelay(p->pio_latency)
106{}
107
108AddrRangeList
109BasicPioDevice::getAddrRanges() const
110{
111 assert(pioSize != 0);
112 AddrRangeList ranges;
113 DPRINTF(BusAddrRanges, "registering range: %#x-%#x\n", pioAddr, pioSize);
114 ranges.push_back(RangeSize(pioAddr, pioSize));
115 return ranges;
116}
100 return count;
101}
102
103BasicPioDevice::BasicPioDevice(const Params *p)
104 : PioDevice(p), pioAddr(p->pio_addr), pioSize(0),
105 pioDelay(p->pio_latency)
106{}
107
108AddrRangeList
109BasicPioDevice::getAddrRanges() const
110{
111 assert(pioSize != 0);
112 AddrRangeList ranges;
113 DPRINTF(BusAddrRanges, "registering range: %#x-%#x\n", pioAddr, pioSize);
114 ranges.push_back(RangeSize(pioAddr, pioSize));
115 return ranges;
116}