1/* 2 * Copyright (c) 2006 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 61 unchanged lines hidden (view full) --- 70void 71PioDevice::init() 72{ 73 if (!pioPort) 74 panic("Pio port %s not connected to anything!", name()); 75 pioPort->sendStatusChange(Port::RangeChange); 76} 77 |
78Port * 79PioDevice::getPort(const std::string &if_name, int idx) 80{ 81 if (if_name == "pio") { 82 if (pioPort != NULL) 83 fatal("%s: pio port already connected to %s", 84 name(), pioPort->getPeer()->name()); 85 pioPort = new PioPort(this, sys); 86 return pioPort; 87 } 88 return NULL; 89} |
90 91unsigned int 92PioDevice::drain(Event *de) 93{ 94 unsigned int count; 95 count = pioPort->drain(de); 96 if (count) 97 changeState(Draining); --- 258 unchanged lines hidden (view full) --- 356 panic("Unknown memory command state."); 357} 358 359DmaDevice::~DmaDevice() 360{ 361 if (dmaPort) 362 delete dmaPort; 363} |
364 365 366Port * 367DmaDevice::getPort(const std::string &if_name, int idx) 368{ 369 if (if_name == "dma") { 370 if (dmaPort != NULL) 371 fatal("%s: dma port already connected to %s", 372 name(), dmaPort->getPeer()->name()); 373 dmaPort = new DmaPort(this, sys, params()->min_backoff_delay, 374 params()->max_backoff_delay); 375 return dmaPort; 376 } 377 return PioDevice::getPort(if_name, idx); 378} 379 |