mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06:00
hw/char/cadence_uart: add clock support
Switch the cadence uart to multi-phase reset and add the reference clock input. The input clock frequency is added to the migration structure. The reference clock controls the baudrate generation. If it disabled, any input characters and events are ignored. If this clock remains unconnected, the uart behaves as before (it default to a 50MHz ref clock). Signed-off-by: Damien Hedde <damien.hedde@greensocs.com> Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Message-id: 20200406135251.157596-8-damien.hedde@greensocs.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
38867cb7ec
commit
b636db306e
3 changed files with 67 additions and 10 deletions
|
@ -49,6 +49,7 @@ typedef struct {
|
|||
CharBackend chr;
|
||||
qemu_irq irq;
|
||||
QEMUTimer *fifo_trigger_handle;
|
||||
Clock *refclk;
|
||||
} CadenceUARTState;
|
||||
|
||||
static inline DeviceState *cadence_uart_create(hwaddr addr,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue