pl111.hh (9394:e88cf95d33d3) pl111.hh (9395:bf428987f54e)
1/*
1/*
2 * Copyright (c) 2010 ARM Limited
2 * Copyright (c) 2010-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
9 * licensed hereunder. You may use the software subject to the license
10 * terms below provided that you ensure that this notice is replicated

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

156 Bitfield<8> bgr;
157 Bitfield<9> bebo;
158 Bitfield<10> bepo;
159 Bitfield<11> lcdpwr;
160 Bitfield<13,12> lcdvcomp;
161 Bitfield<16> watermark;
162 EndBitUnion(ControlReg)
163
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
9 * licensed hereunder. You may use the software subject to the license
10 * terms below provided that you ensure that this notice is replicated

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

156 Bitfield<8> bgr;
157 Bitfield<9> bebo;
158 Bitfield<10> bepo;
159 Bitfield<11> lcdpwr;
160 Bitfield<13,12> lcdvcomp;
161 Bitfield<16> watermark;
162 EndBitUnion(ControlReg)
163
164 /**
165 * Event wrapper for dmaDone()
166 *
167 * This event calls pushes its this pointer onto the freeDoneEvent
168 * vector and calls dmaDone() when triggered.
169 */
170 class DmaDoneEvent : public Event
171 {
172 private:
173 Pl111 &obj;
174
175 public:
176 DmaDoneEvent(Pl111 *_obj)
177 : Event(), obj(*_obj) {}
178
179 void process() {
180 obj.dmaDoneEventFree.push_back(this);
181 obj.dmaDone();
182 }
183
184 const std::string name() const {
185 return obj.name() + ".DmaDoneEvent";
186 }
187 };
188
164 /** Horizontal axis panel control register */
165 TimingReg0 lcdTiming0;
166
167 /** Vertical axis panel control register */
168 TimingReg1 lcdTiming1;
169
170 /** Clock and signal polarity control register */
171 TimingReg2 lcdTiming2;

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

291 void dmaDone();
292
293 /** DMA framebuffer read event */
294 EventWrapper<Pl111, &Pl111::readFramebuffer> readEvent;
295
296 /** Fill fifo */
297 EventWrapper<Pl111, &Pl111::fillFifo> fillFifoEvent;
298
189 /** Horizontal axis panel control register */
190 TimingReg0 lcdTiming0;
191
192 /** Vertical axis panel control register */
193 TimingReg1 lcdTiming1;
194
195 /** Clock and signal polarity control register */
196 TimingReg2 lcdTiming2;

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

316 void dmaDone();
317
318 /** DMA framebuffer read event */
319 EventWrapper<Pl111, &Pl111::readFramebuffer> readEvent;
320
321 /** Fill fifo */
322 EventWrapper<Pl111, &Pl111::fillFifo> fillFifoEvent;
323
299 /** DMA done event */
300 std::vector<EventWrapper<Pl111, &Pl111::dmaDone> > dmaDoneEvent;
324 /**@{*/
325 /**
326 * All pre-allocated DMA done events
327 *
328 * The PL111 model preallocates maxOutstandingDma number of
329 * DmaDoneEvents to avoid having to heap allocate every single
330 * event when it is needed. In order to keep track of which events
331 * are in flight and which are ready to be used, we use two
332 * different vectors. dmaDoneEventAll contains <i>all</i>
333 * DmaDoneEvents that the object may use, while dmaDoneEventFree
334 * contains a list of currently <i>unused</i> events. When an
335 * event needs to be scheduled, the last element of the
336 * dmaDoneEventFree is used and removed from the list. When an
337 * event fires, it is added to the end of the
338 * dmaEventFreeList. dmaDoneEventAll is never used except for in
339 * initialization and serialization.
340 */
341 std::vector<DmaDoneEvent> dmaDoneEventAll;
301
342
343 /** Unused DMA done events that are ready to be scheduled */
344 std::vector<DmaDoneEvent *> dmaDoneEventFree;
345 /**@}*/
346
302 /** Wrapper to create an event out of the interrupt */
303 EventWrapper<Pl111, &Pl111::generateInterrupt> intEvent;
304
305 public:
306 typedef Pl111Params Params;
307
308 const Params *
309 params() const

--- 21 unchanged lines hidden ---
347 /** Wrapper to create an event out of the interrupt */
348 EventWrapper<Pl111, &Pl111::generateInterrupt> intEvent;
349
350 public:
351 typedef Pl111Params Params;
352
353 const Params *
354 params() const

--- 21 unchanged lines hidden ---