Fabien, Am 19.02.2013 17:22, schrieb Fabien Chouteau: > From: Ronald Hecht <ronald.he...@gmx.de> > > - enable/disable Rx and Tx > - Rx and Tx interrupt > - Tx FIFO empty and Tx SHIFT empty > > Signed-off-by: Fabien Chouteau <chout...@adacore.com> > --- > hw/grlib_apbuart.c | 36 +++++++++++++++++++++++++++++------- > 1 file changed, 29 insertions(+), 7 deletions(-) > > diff --git a/hw/grlib_apbuart.c b/hw/grlib_apbuart.c > index 3a61788..ba1685a 100644 > --- a/hw/grlib_apbuart.c > +++ b/hw/grlib_apbuart.c
> @@ -242,6 +250,19 @@ static int grlib_apbuart_init(SysBusDevice *dev) > return 0; > } > > +static void grlib_apbuart_reset(DeviceState *d) > +{ > + UART *uart = container_of(d, UART, busdev.qdev); This is still wrong, please introduce a QOM cast macro for this device, e.g., GRLIB_APB_UART(d) due to the unfortunate use of UART rather than UARTState for the struct. http://wiki.qemu.org/QOMConventions Also if you have some cycles, all SysBus init functions such as the one visible above should be replaced by instance_init and realize functions. Regards, Andreas -- SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg