[PATCH qemu v4 0/9] Update opentitan uart (part of supporting opentitan version 1)

~lexbaileylowrisc posted 9 patches 3 weeks, 4 days ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/177756498815.8917.12449488721849651971-0@git.sr.ht
Maintainers: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>, Paolo Bonzini <pbonzini@redhat.com>, "Marc-André Lureau" <marcandre.lureau@redhat.com>, Alistair Francis <Alistair.Francis@wdc.com>, Palmer Dabbelt <palmer@dabbelt.com>, Weiwei Li <liwei1518@gmail.com>, Daniel Henrique Barboza <daniel.barboza@oss.qualcomm.com>, Liu Zhiwei <zhiwei_liu@linux.alibaba.com>, Chao Liu <chao.liu.zevorn@gmail.com>
MAINTAINERS                          |   1 +
docs/system/riscv/opentitan-uart.rst |  43 ++
hw/char/Kconfig                      |   3 +
hw/char/ibex_uart.c                  | 569 --------------------
hw/char/meson.build                  |   2 +-
hw/char/ot_uart.c                    | 778 +++++++++++++++++++++++++++
hw/char/trace-events                 |   8 +
hw/riscv/Kconfig                     |   1 +
hw/riscv/opentitan.c                 |   3 +-
include/hw/char/ibex_uart.h          |  73 ---
include/hw/char/ot_uart.h            |  70 +++
include/hw/riscv/opentitan.h         |   4 +-
12 files changed, 909 insertions(+), 646 deletions(-)
create mode 100644 docs/system/riscv/opentitan-uart.rst
delete mode 100644 hw/char/ibex_uart.c
create mode 100644 hw/char/ot_uart.c
delete mode 100644 include/hw/char/ibex_uart.h
create mode 100644 include/hw/char/ot_uart.h
[PATCH qemu v4 0/9] Update opentitan uart (part of supporting opentitan version 1)
Posted by ~lexbaileylowrisc 3 weeks, 4 days ago
This is the fourth revision of the patch set that updates the
OpenTitan uart to align with Earlgrey version 1.0.0.

For a specific git commit from OpenTitan that we are aiming to
support:
https://github.com/lowRISC/opentitan/tree/Earlgrey-PROD-M6
(git tag Earlgrey-PROD-M6, which is commit a78922f)

Once again, for completeness, the details of the version 1 of the UART
are found here:
https://opentitan.org/book/hw/ip/uart/index.html
(and this URL is still added to the file header in one of these commits,
as before)

Fixes in this revision:
- removed accidental add/delete of unused #define.
- added documentation about break condition in commit message
   and also in a documentation file (is it in a suitable place?)
   this is copied from the documentation on our (lowRISC's) fork.
- removed the commit that removes the regular clock pulse to
   transmit data. Following the discussion, I think it's better to merge
   this without that change for now, and if we decide we need it in
   the future we will test it with tock and propose the change again.
- one review comment I couldn't fix: the one that suggested adding
   a return statement to avoid an else block. There is logic after the
   else block that runs in both cases, so I can't remove that.

Thanks!

Lex.

Lex Bailey (9):
  Rename ibex_uart to ot_uart
  ot_uart: move to new reset API
  ot_uart: update register defs, switch to Fifo8 for tx/rx buffers
  ot_uart: replace individual IRQ fields with array, add missing IRQs
  ot_uart: gather similar behaviours togeter in register read and write
  ot_uart: implement RX fifo and loopback
  ot_uart: handle break condition
  ot_uart: update file headers with new authorship and documentation URL
  ot_uart: add tracing

 MAINTAINERS                          |   1 +
 docs/system/riscv/opentitan-uart.rst |  43 ++
 hw/char/Kconfig                      |   3 +
 hw/char/ibex_uart.c                  | 569 --------------------
 hw/char/meson.build                  |   2 +-
 hw/char/ot_uart.c                    | 778 +++++++++++++++++++++++++++
 hw/char/trace-events                 |   8 +
 hw/riscv/Kconfig                     |   1 +
 hw/riscv/opentitan.c                 |   3 +-
 include/hw/char/ibex_uart.h          |  73 ---
 include/hw/char/ot_uart.h            |  70 +++
 include/hw/riscv/opentitan.h         |   4 +-
 12 files changed, 909 insertions(+), 646 deletions(-)
 create mode 100644 docs/system/riscv/opentitan-uart.rst
 delete mode 100644 hw/char/ibex_uart.c
 create mode 100644 hw/char/ot_uart.c
 delete mode 100644 include/hw/char/ibex_uart.h
 create mode 100644 include/hw/char/ot_uart.h

-- 
2.49.1