[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC v4 4/5] hw/arm/digic: add UART support
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [RFC v4 4/5] hw/arm/digic: add UART support |
Date: |
Sat, 7 Sep 2013 09:33:55 +0100 |
On 7 September 2013 06:45, Antony Pavlov <address@hidden> wrote:
> But Canon A1100 firmware can use this routine:
> 1. wait TX_RDY bit in status register;
> 2. write TX_RDY and some other (unknown behaviour) bit to status register;
> 3. write byte to TX register.
>
> IMHO the step 2 is bizarre.
Maybe the TX_RDY bit is write-1-to-clear? Some devices
use that kind of thing for a "conditions that happened that
could trigger an interrupt" (and if you're using them for
polling you can just poll the register).
> IMHO the more standart UART outc() routune is:
> * wait for UART "transmitter is ready to send next char" flag;
> * write char to TX register.
Yes, you're right. In either case you can see if there's
a uart via:
* wait for TX_RDY to be set
* clear TX_RDY
* write byte to TX
* immediately look at TX_RDY -- if it's set straight away
there's almost certainly a FIFO involved; otherwise it
would have to wait for the char to go out over serial
before setting it again
This is kind of a sidetrack though, we can model it without a
UART for the moment.
-- PMM
- Re: [Qemu-devel] [RFC v4 1/5] hw/arm: add very initial support for Canon DIGIC SoC, (continued)
[Qemu-devel] [RFC v4 3/5] hw/arm/digic: add timer support, Antony Pavlov, 2013/09/05
[Qemu-devel] [RFC v4 4/5] hw/arm/digic: add UART support, Antony Pavlov, 2013/09/05
- Re: [Qemu-devel] [RFC v4 4/5] hw/arm/digic: add UART support, Peter Maydell, 2013/09/05
- Re: [Qemu-devel] [RFC v4 4/5] hw/arm/digic: add UART support, Antony Pavlov, 2013/09/06
- Re: [Qemu-devel] [RFC v4 4/5] hw/arm/digic: add UART support, Peter Maydell, 2013/09/06
- Re: [Qemu-devel] [RFC v4 4/5] hw/arm/digic: add UART support, Antony Pavlov, 2013/09/06
- Re: [Qemu-devel] [RFC v4 4/5] hw/arm/digic: add UART support, Peter Maydell, 2013/09/06
- Re: [Qemu-devel] [RFC v4 4/5] hw/arm/digic: add UART support, Antony Pavlov, 2013/09/07
- Re: [Qemu-devel] [RFC v4 4/5] hw/arm/digic: add UART support,
Peter Maydell <=
[Qemu-devel] [RFC v4 2/5] hw/arm/digic: prepare DIGIC-based boards support, Antony Pavlov, 2013/09/05
[Qemu-devel] [RFC v4 5/5] hw/arm/digic: add NOR ROM support, Antony Pavlov, 2013/09/05