[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-arm] [Qemu-devel] [PATCH 1/6] hw/char: QOM'ify pl011 model
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-arm] [Qemu-devel] [PATCH 1/6] hw/char: QOM'ify pl011 model |
Date: |
Fri, 27 May 2016 11:42:26 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.0 |
On 27/05/2016 11:01, Peter Maydell wrote:
>> > I found bcm2835-peripherals is only used by bcm2836 code, you mean
>> > this(bcm2836) is the 'board level' and I should set chardev properties
>> > here?
> Device models subclass DeviceClass (possibly indirectly).
> Boards subclass MachineClass. Only boards should be looking
> at serial_hds[]. Sometimes you have a device which is just
> a "container" which encapsulates several other devices
> (typically this is a model of an SoC). For that kind of
> container device, it should expose chardev properties for
> its UARTs, which will usually be alias properties for
> the properties on the actual UART devices which the
> container has.
>
> bcm2835-peripherals is a device, not a board, so it shouldn't
> be using serial_hds[].
>
> If it's clearer, you can use a separate patch to push the
> serial_hds[] usage out another layer, rather than folding
> it into this one.
I agree. This patch is fine (perhaps with the FIXME comment left
there); then chardev properties can be added to bcm2835-peripherals and
set in bcm2836.
Thanks,
Paolo
- [Qemu-arm] [PATCH 3/6] hw/char: QOM'ify digic-uart model, (continued)
- [Qemu-arm] [PATCH 3/6] hw/char: QOM'ify digic-uart model, xiaoqiang zhao, 2016/05/25
- [Qemu-arm] [PATCH 5/6] hw/char: QOM'ify xilinx_uartlite model, xiaoqiang zhao, 2016/05/25
- [Qemu-arm] [PATCH 1/6] hw/char: QOM'ify pl011 model, xiaoqiang zhao, 2016/05/25
- Re: [Qemu-arm] [Qemu-devel] [PATCH 1/6] hw/char: QOM'ify pl011 model, xiaoqiang zhao, 2016/05/26
- Re: [Qemu-arm] [Qemu-devel] [PATCH 1/6] hw/char: QOM'ify pl011 model, Peter Maydell, 2016/05/27
- Re: [Qemu-arm] [Qemu-devel] [PATCH 1/6] hw/char: QOM'ify pl011 model,
Paolo Bonzini <=
- Re: [Qemu-arm] [Qemu-devel] [PATCH 1/6] hw/char: QOM'ify pl011 model, xiaoqiang zhao, 2016/05/27
- Re: [Qemu-arm] [Qemu-devel] [PATCH 1/6] hw/char: QOM'ify pl011 model, Markus Armbruster, 2016/05/30
[Qemu-arm] [PATCH 6/6] char: get rid of qemu_char_get_next_serial, xiaoqiang zhao, 2016/05/25
[Qemu-arm] [PATCH 4/6] hw/char: QOM'ify stm32f2xx_usart model, xiaoqiang zhao, 2016/05/25
[Qemu-arm] [PATCH 2/6] hw/char: QOM'ify cadence_uart model, xiaoqiang zhao, 2016/05/25
Re: [Qemu-arm] [PATCH 0/6] Drop the qemu_char_get_next_serial function, Paolo Bonzini, 2016/05/25