[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH V2 2/4] grlib-apbuart: Add support of various fl
From: |
Andreas Färber |
Subject: |
Re: [Qemu-devel] [PATCH V2 2/4] grlib-apbuart: Add support of various flags |
Date: |
Sat, 23 Feb 2013 18:13:16 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130105 Thunderbird/17.0.2 |
Fabien,
Am 19.02.2013 17:22, schrieb Fabien Chouteau:
> From: Ronald Hecht <address@hidden>
>
> - enable/disable Rx and Tx
> - Rx and Tx interrupt
> - Tx FIFO empty and Tx SHIFT empty
>
> Signed-off-by: Fabien Chouteau <address@hidden>
> ---
> 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
- [Qemu-devel] [PATCH V2 0/4] Misc Leon3 fixes, Fabien Chouteau, 2013/02/19
- [Qemu-devel] [PATCH V2 1/4] Typo: replace gptimer by apbuart, Fabien Chouteau, 2013/02/19
- [Qemu-devel] [PATCH V2 4/4] SPARC LEON power-down support added, Fabien Chouteau, 2013/02/19
- [Qemu-devel] [PATCH V2 2/4] grlib-apbuart: Add support of various flags, Fabien Chouteau, 2013/02/19
- Re: [Qemu-devel] [PATCH V2 2/4] grlib-apbuart: Add support of various flags,
Andreas Färber <=
- [Qemu-devel] [PATCH V2 3/4] Added LEON MMU ASI mappings and corrected LEON3 MMU masks., Fabien Chouteau, 2013/02/19
- Re: [Qemu-devel] [PATCH V2 0/4] Misc Leon3 fixes, Blue Swirl, 2013/02/23