dma_device.cc (10910:32f3d1c454ec) dma_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

--- 112 unchanged lines hidden (view full) ---

121DmaDevice::init()
122{
123 if (!dmaPort.isConnected())
124 panic("DMA port of %s not connected to anything!", name());
125 PioDevice::init();
126}
127
128unsigned int
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

--- 112 unchanged lines hidden (view full) ---

121DmaDevice::init()
122{
123 if (!dmaPort.isConnected())
124 panic("DMA port of %s not connected to anything!", name());
125 PioDevice::init();
126}
127
128unsigned int
129DmaDevice::drain(DrainManager *dm)
130{
131 unsigned int count = pioPort.drain(dm) + dmaPort.drain(dm);
132 if (count)
133 setDrainState(DrainState::Draining);
134 else
135 setDrainState(DrainState::Drained);
136 return count;
137}
138
139unsigned int
140DmaPort::drain(DrainManager *dm)
141{
142 if (pendingCount == 0)
143 return 0;
144 drainManager = dm;
145 DPRINTF(Drain, "DmaPort not drained\n");
146 return 1;
147}

--- 130 unchanged lines hidden ---
129DmaPort::drain(DrainManager *dm)
130{
131 if (pendingCount == 0)
132 return 0;
133 drainManager = dm;
134 DPRINTF(Drain, "DmaPort not drained\n");
135 return 1;
136}

--- 130 unchanged lines hidden ---