dma_device.cc revision 545
12847Sksewell@umich.edu/* 27783SGiacomo.Gabrielli@arm.com * Copyright (c) 2003 The Regents of The University of Michigan 37783SGiacomo.Gabrielli@arm.com * All rights reserved. 47783SGiacomo.Gabrielli@arm.com * 57783SGiacomo.Gabrielli@arm.com * Redistribution and use in source and binary forms, with or without 67783SGiacomo.Gabrielli@arm.com * modification, are permitted provided that the following conditions are 77783SGiacomo.Gabrielli@arm.com * met: redistributions of source code must retain the above copyright 87783SGiacomo.Gabrielli@arm.com * notice, this list of conditions and the following disclaimer; 97783SGiacomo.Gabrielli@arm.com * redistributions in binary form must reproduce the above copyright 107783SGiacomo.Gabrielli@arm.com * notice, this list of conditions and the following disclaimer in the 117783SGiacomo.Gabrielli@arm.com * documentation and/or other materials provided with the distribution; 127783SGiacomo.Gabrielli@arm.com * neither the name of the copyright holders nor the names of its 137783SGiacomo.Gabrielli@arm.com * contributors may be used to endorse or promote products derived from 145596Sgblack@eecs.umich.edu * this software without specific prior written permission. 152847Sksewell@umich.edu * 162847Sksewell@umich.edu * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 172847Sksewell@umich.edu * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 182847Sksewell@umich.edu * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 192847Sksewell@umich.edu * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 202847Sksewell@umich.edu * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 212847Sksewell@umich.edu * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 222847Sksewell@umich.edu * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 232847Sksewell@umich.edu * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 242847Sksewell@umich.edu * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 252847Sksewell@umich.edu * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 262847Sksewell@umich.edu * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 272847Sksewell@umich.edu */ 282847Sksewell@umich.edu 292847Sksewell@umich.edu#include "dev/io_device.hh" 302847Sksewell@umich.edu#include "mem/bus/base_interface.hh" 312847Sksewell@umich.edu 322847Sksewell@umich.eduPioDevice::PioDevice(const std::string &name) 332847Sksewell@umich.edu : FunctionalMemory(name), pioInterface(NULL) 342847Sksewell@umich.edu{} 352847Sksewell@umich.edu 362847Sksewell@umich.eduPioDevice::~PioDevice() 372847Sksewell@umich.edu{ 382847Sksewell@umich.edu if (pioInterface) 392847Sksewell@umich.edu delete pioInterface; 405596Sgblack@eecs.umich.edu} 412847Sksewell@umich.edu 422847Sksewell@umich.eduDmaDevice::DmaDevice(const std::string &name) 432847Sksewell@umich.edu : PioDevice(name), dmaInterface(NULL) 442847Sksewell@umich.edu{} 452847Sksewell@umich.edu 465596Sgblack@eecs.umich.eduDmaDevice::~DmaDevice() 476658Snate@binkert.org{ 488229Snate@binkert.org if (dmaInterface) 498229Snate@binkert.org delete dmaInterface; 505596Sgblack@eecs.umich.edu} 515596Sgblack@eecs.umich.edu 522847Sksewell@umich.edu