io_device.cc (10910:32f3d1c454ec) | io_device.cc (10912:b99a6662d7c2) |
---|---|
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 --- 79 unchanged lines hidden (view full) --- 88PioDevice::getSlavePort(const std::string &if_name, PortID idx) 89{ 90 if (if_name == "pio") { 91 return pioPort; 92 } 93 return MemObject::getSlavePort(if_name, idx); 94} 95 | 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 --- 79 unchanged lines hidden (view full) --- 88PioDevice::getSlavePort(const std::string &if_name, PortID idx) 89{ 90 if (if_name == "pio") { 91 return pioPort; 92 } 93 return MemObject::getSlavePort(if_name, idx); 94} 95 |
96unsigned int 97PioDevice::drain(DrainManager *dm) 98{ 99 unsigned int count; 100 count = pioPort.drain(dm); 101 if (count) 102 setDrainState(DrainState::Draining); 103 else 104 setDrainState(DrainState::Drained); 105 return count; 106} 107 | |
108BasicPioDevice::BasicPioDevice(const Params *p, Addr size) 109 : PioDevice(p), pioAddr(p->pio_addr), pioSize(size), 110 pioDelay(p->pio_latency) 111{} 112 113AddrRangeList 114BasicPioDevice::getAddrRanges() const 115{ 116 assert(pioSize != 0); 117 AddrRangeList ranges; 118 DPRINTF(AddrRanges, "registering range: %#x-%#x\n", pioAddr, pioSize); 119 ranges.push_back(RangeSize(pioAddr, pioSize)); 120 return ranges; 121} | 96BasicPioDevice::BasicPioDevice(const Params *p, Addr size) 97 : PioDevice(p), pioAddr(p->pio_addr), pioSize(size), 98 pioDelay(p->pio_latency) 99{} 100 101AddrRangeList 102BasicPioDevice::getAddrRanges() const 103{ 104 assert(pioSize != 0); 105 AddrRangeList ranges; 106 DPRINTF(AddrRanges, "registering range: %#x-%#x\n", pioAddr, pioSize); 107 ranges.push_back(RangeSize(pioAddr, pioSize)); 108 return ranges; 109} |