On 29 October 2012 06:35, Peter Crosthwaite <peter.crosthwa...@xilinx.com> wrote: > Device model for Primecell PL330 dma controller.
A general question -- this is a DMA controller so should it be using the DMAContext APIs now? Avi? > +static void pl330_queue_init(PL330Queue *s, int size, int channum) > +{ > + s->queue = (PL330QueueEntry *)g_new0(PL330QueueEntry, size); > + s->chan_num = channum; > + s->lo_seqn = (uint8_t *)g_malloc0(channum); > + s->hi_seqn = (uint8_t *)g_malloc0(channum); You don't need to cast the return value from g_new0 or g_malloc0. > + > + default: > + hw_error("pl330: bad read offset " TARGET_FMT_plx "\n", offset); This hw_error() (and probably most of the others in this file) should be replaced by qemu_log_mask() with either LOG_GUEST_ERROR or LOG_UNIMP as appropriate. > + s->manager.parent = s; > + s->manager.tag = s->num_chnls; > + s->manager.is_manager = 1; This is a bool, so 'true'. thanks -- PMM