pl330.c (701ed34833f53880ba38bde09b0846d01fc16d66) pl330.c (63e6b5645021bb2b545a39f2896a42da5c300d9c)
1/*
2 * ARM PrimeCell PL330 DMA Controller
3 *
4 * Copyright (c) 2009 Samsung Electronics.
5 * Contributed by Kirill Batuzov <batuzovk@ispras.ru>
6 * Copyright (c) 2012 Peter A.G. Crosthwaite (peter.crosthwaite@petalogix.com)
7 * Copyright (c) 2012 PetaLogix Pty Ltd.
8 *

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

134 PL330State *parent;
135 uint8_t tag;
136} PL330Chan;
137
138static const VMStateDescription vmstate_pl330_chan = {
139 .name = "pl330_chan",
140 .version_id = 1,
141 .minimum_version_id = 1,
1/*
2 * ARM PrimeCell PL330 DMA Controller
3 *
4 * Copyright (c) 2009 Samsung Electronics.
5 * Contributed by Kirill Batuzov <batuzovk@ispras.ru>
6 * Copyright (c) 2012 Peter A.G. Crosthwaite (peter.crosthwaite@petalogix.com)
7 * Copyright (c) 2012 PetaLogix Pty Ltd.
8 *

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

134 PL330State *parent;
135 uint8_t tag;
136} PL330Chan;
137
138static const VMStateDescription vmstate_pl330_chan = {
139 .name = "pl330_chan",
140 .version_id = 1,
141 .minimum_version_id = 1,
142 .fields = (VMStateField[]) {
142 .fields = (const VMStateField[]) {
143 VMSTATE_UINT32(src, PL330Chan),
144 VMSTATE_UINT32(dst, PL330Chan),
145 VMSTATE_UINT32(pc, PL330Chan),
146 VMSTATE_UINT32(control, PL330Chan),
147 VMSTATE_UINT32(status, PL330Chan),
148 VMSTATE_UINT32_ARRAY(lc, PL330Chan, 2),
149 VMSTATE_UINT32(fault_type, PL330Chan),
150 VMSTATE_UINT32(watchdog_timer, PL330Chan),

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

165 uint32_t num;
166 uint32_t buf_size;
167} PL330Fifo;
168
169static const VMStateDescription vmstate_pl330_fifo = {
170 .name = "pl330_chan",
171 .version_id = 1,
172 .minimum_version_id = 1,
143 VMSTATE_UINT32(src, PL330Chan),
144 VMSTATE_UINT32(dst, PL330Chan),
145 VMSTATE_UINT32(pc, PL330Chan),
146 VMSTATE_UINT32(control, PL330Chan),
147 VMSTATE_UINT32(status, PL330Chan),
148 VMSTATE_UINT32_ARRAY(lc, PL330Chan, 2),
149 VMSTATE_UINT32(fault_type, PL330Chan),
150 VMSTATE_UINT32(watchdog_timer, PL330Chan),

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

165 uint32_t num;
166 uint32_t buf_size;
167} PL330Fifo;
168
169static const VMStateDescription vmstate_pl330_fifo = {
170 .name = "pl330_chan",
171 .version_id = 1,
172 .minimum_version_id = 1,
173 .fields = (VMStateField[]) {
173 .fields = (const VMStateField[]) {
174 VMSTATE_VBUFFER_UINT32(buf, PL330Fifo, 1, NULL, buf_size),
175 VMSTATE_VBUFFER_UINT32(tag, PL330Fifo, 1, NULL, buf_size),
176 VMSTATE_UINT32(head, PL330Fifo),
177 VMSTATE_UINT32(num, PL330Fifo),
178 VMSTATE_UINT32(buf_size, PL330Fifo),
179 VMSTATE_END_OF_LIST()
180 }
181};

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

189 uint8_t tag;
190 uint8_t seqn;
191} PL330QueueEntry;
192
193static const VMStateDescription vmstate_pl330_queue_entry = {
194 .name = "pl330_queue_entry",
195 .version_id = 1,
196 .minimum_version_id = 1,
174 VMSTATE_VBUFFER_UINT32(buf, PL330Fifo, 1, NULL, buf_size),
175 VMSTATE_VBUFFER_UINT32(tag, PL330Fifo, 1, NULL, buf_size),
176 VMSTATE_UINT32(head, PL330Fifo),
177 VMSTATE_UINT32(num, PL330Fifo),
178 VMSTATE_UINT32(buf_size, PL330Fifo),
179 VMSTATE_END_OF_LIST()
180 }
181};

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

189 uint8_t tag;
190 uint8_t seqn;
191} PL330QueueEntry;
192
193static const VMStateDescription vmstate_pl330_queue_entry = {
194 .name = "pl330_queue_entry",
195 .version_id = 1,
196 .minimum_version_id = 1,
197 .fields = (VMStateField[]) {
197 .fields = (const VMStateField[]) {
198 VMSTATE_UINT32(addr, PL330QueueEntry),
199 VMSTATE_UINT32(len, PL330QueueEntry),
200 VMSTATE_UINT8(n, PL330QueueEntry),
201 VMSTATE_BOOL(inc, PL330QueueEntry),
202 VMSTATE_BOOL(z, PL330QueueEntry),
203 VMSTATE_UINT8(tag, PL330QueueEntry),
204 VMSTATE_UINT8(seqn, PL330QueueEntry),
205 VMSTATE_END_OF_LIST()

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

211 PL330QueueEntry *queue;
212 uint32_t queue_size;
213} PL330Queue;
214
215static const VMStateDescription vmstate_pl330_queue = {
216 .name = "pl330_queue",
217 .version_id = 2,
218 .minimum_version_id = 2,
198 VMSTATE_UINT32(addr, PL330QueueEntry),
199 VMSTATE_UINT32(len, PL330QueueEntry),
200 VMSTATE_UINT8(n, PL330QueueEntry),
201 VMSTATE_BOOL(inc, PL330QueueEntry),
202 VMSTATE_BOOL(z, PL330QueueEntry),
203 VMSTATE_UINT8(tag, PL330QueueEntry),
204 VMSTATE_UINT8(seqn, PL330QueueEntry),
205 VMSTATE_END_OF_LIST()

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

211 PL330QueueEntry *queue;
212 uint32_t queue_size;
213} PL330Queue;
214
215static const VMStateDescription vmstate_pl330_queue = {
216 .name = "pl330_queue",
217 .version_id = 2,
218 .minimum_version_id = 2,
219 .fields = (VMStateField[]) {
219 .fields = (const VMStateField[]) {
220 VMSTATE_STRUCT_VARRAY_POINTER_UINT32(queue, PL330Queue, queue_size,
221 vmstate_pl330_queue_entry,
222 PL330QueueEntry),
223 VMSTATE_END_OF_LIST()
224 }
225};
226
227struct PL330State {

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

275
276#define TYPE_PL330 "pl330"
277OBJECT_DECLARE_SIMPLE_TYPE(PL330State, PL330)
278
279static const VMStateDescription vmstate_pl330 = {
280 .name = "pl330",
281 .version_id = 2,
282 .minimum_version_id = 2,
220 VMSTATE_STRUCT_VARRAY_POINTER_UINT32(queue, PL330Queue, queue_size,
221 vmstate_pl330_queue_entry,
222 PL330QueueEntry),
223 VMSTATE_END_OF_LIST()
224 }
225};
226
227struct PL330State {

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

275
276#define TYPE_PL330 "pl330"
277OBJECT_DECLARE_SIMPLE_TYPE(PL330State, PL330)
278
279static const VMStateDescription vmstate_pl330 = {
280 .name = "pl330",
281 .version_id = 2,
282 .minimum_version_id = 2,
283 .fields = (VMStateField[]) {
283 .fields = (const VMStateField[]) {
284 VMSTATE_STRUCT(manager, PL330State, 0, vmstate_pl330_chan, PL330Chan),
285 VMSTATE_STRUCT_VARRAY_POINTER_UINT32(chan, PL330State, num_chnls,
286 vmstate_pl330_chan, PL330Chan),
287 VMSTATE_VBUFFER_UINT32(lo_seqn, PL330State, 1, NULL, num_chnls),
288 VMSTATE_VBUFFER_UINT32(hi_seqn, PL330State, 1, NULL, num_chnls),
289 VMSTATE_STRUCT(fifo, PL330State, 0, vmstate_pl330_fifo, PL330Fifo),
290 VMSTATE_STRUCT(read_queue, PL330State, 0, vmstate_pl330_queue,
291 PL330Queue),

--- 1414 unchanged lines hidden ---
284 VMSTATE_STRUCT(manager, PL330State, 0, vmstate_pl330_chan, PL330Chan),
285 VMSTATE_STRUCT_VARRAY_POINTER_UINT32(chan, PL330State, num_chnls,
286 vmstate_pl330_chan, PL330Chan),
287 VMSTATE_VBUFFER_UINT32(lo_seqn, PL330State, 1, NULL, num_chnls),
288 VMSTATE_VBUFFER_UINT32(hi_seqn, PL330State, 1, NULL, num_chnls),
289 VMSTATE_STRUCT(fifo, PL330State, 0, vmstate_pl330_fifo, PL330Fifo),
290 VMSTATE_STRUCT(read_queue, PL330State, 0, vmstate_pl330_queue,
291 PL330Queue),

--- 1414 unchanged lines hidden ---