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 --- 719 unchanged lines hidden (view full) --- 728 readPendingNum(0), 729 writePendingNum(0), 730 activeDoorbells(0), 731 pendingDoorbells(0), 732 countInt(0), 733 transferTrack(0), 734 taskCommandTrack(0), 735 idlePhaseStart(0), |
736 SCSIResumeEvent(this), 737 UTPEvent(this) 738{ 739 DPRINTF(UFSHostDevice, "The hostcontroller hosts %d Logic units\n", 740 lunAvail); 741 UFSDevice.resize(lunAvail); 742 743 transferDoneCallback = new MakeCallback<UFSHostDevice, --- 1566 unchanged lines hidden (view full) --- 2310 assert(lunAvail == lun_avail); 2311} 2312 2313 2314/** 2315 * Drain; needed to enable checkpoints 2316 */ 2317 |
2318DrainState 2319UFSHostDevice::drain() |
2320{ 2321 if (UFSHCIMem.TRUTRLDBR) { |
2322 DPRINTF(UFSHostDevice, "UFSDevice is draining...\n"); |
2323 return DrainState::Draining; |
2324 } else { 2325 DPRINTF(UFSHostDevice, "UFSDevice drained\n"); |
2326 return DrainState::Drained; |
2327 } 2328} 2329 2330/** 2331 * Checkdrain; needed to enable checkpoints 2332 */ 2333 2334void 2335UFSHostDevice::checkDrain() 2336{ |
2337 if (drainState() != DrainState::Draining) |
2338 return; |
2339 2340 if (UFSHCIMem.TRUTRLDBR) { 2341 DPRINTF(UFSHostDevice, "UFSDevice is still draining; with %d active" 2342 " doorbells\n", activeDoorbells); 2343 } else { 2344 DPRINTF(UFSHostDevice, "UFSDevice is done draining\n"); |
2345 signalDrainDone(); |
2346 } 2347} |