[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: |
Fabien Chouteau |
Subject: |
Re: [Qemu-devel] [PATCH V2 2/4] grlib-apbuart: Add support of various flags |
Date: |
Tue, 26 Feb 2013 10:59:03 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130106 Thunderbird/17.0.2 |
On 02/23/2013 06:13 PM, Andreas Färber wrote:
> Am 19.02.2013 17:22, schrieb Fabien Chouteau:
>>
>> +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.
Hello,
Changing UART to UARTState is not difficult, but I don't understand why
the current name is a problem.
>
> http://wiki.qemu.org/QOMConventions
>
I didn't know this page. I think it would be great to have an example
for each point. Or maybe a complete "dummy" device that shows the best
practices.
> 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.
>
You mean dc->init instead of k->init?
--
Fabien Chouteau
- [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
- [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