ufs_device.cc (10910:32f3d1c454ec) | ufs_device.cc (10912:b99a6662d7c2) |
---|---|
1/* 2 * Copyright (c) 2013-2015 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 --- 2305 unchanged lines hidden (view full) --- 2314 2315/** 2316 * Drain; needed to enable checkpoints 2317 */ 2318 2319unsigned int 2320UFSHostDevice::drain(DrainManager *dm) 2321{ | 1/* 2 * Copyright (c) 2013-2015 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 --- 2305 unchanged lines hidden (view full) --- 2314 2315/** 2316 * Drain; needed to enable checkpoints 2317 */ 2318 2319unsigned int 2320UFSHostDevice::drain(DrainManager *dm) 2321{ |
2322 unsigned int count = 0; 2323 2324 // check pio, dma port, and doorbells 2325 count = pioPort.drain(dm) + dmaPort.drain(dm); 2326 | |
2327 if (UFSHCIMem.TRUTRLDBR) { | 2322 if (UFSHCIMem.TRUTRLDBR) { |
2328 count += 1; | |
2329 drainManager = dm; | 2323 drainManager = dm; |
2330 } else { 2331 DPRINTF(UFSHostDevice, "UFSHostDevice in drained state\n"); 2332 } 2333 2334 if (count) { | |
2335 DPRINTF(UFSHostDevice, "UFSDevice is draining...\n"); 2336 setDrainState(DrainState::Draining); | 2324 DPRINTF(UFSHostDevice, "UFSDevice is draining...\n"); 2325 setDrainState(DrainState::Draining); |
2326 return 1; |
|
2337 } else { 2338 DPRINTF(UFSHostDevice, "UFSDevice drained\n"); 2339 setDrainState(DrainState::Drained); | 2327 } else { 2328 DPRINTF(UFSHostDevice, "UFSDevice drained\n"); 2329 setDrainState(DrainState::Drained); |
2330 return 0; |
|
2340 } | 2331 } |
2341 return count; | |
2342} 2343 2344/** 2345 * Checkdrain; needed to enable checkpoints 2346 */ 2347 2348void 2349UFSHostDevice::checkDrain() --- 14 unchanged lines hidden --- | 2332} 2333 2334/** 2335 * Checkdrain; needed to enable checkpoints 2336 */ 2337 2338void 2339UFSHostDevice::checkDrain() --- 14 unchanged lines hidden --- |