Skip to contentSkip to conversation

hw/char: Add Altera JTAG UART emulation

PATCH In review Tobias Klauser 2 participants 3 messages Jan 29, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hw/char: Add Altera JTAG UART emulation

Add the Altera JTAG UART model.

Hardware emulation based on:
https://www.altera.com/en_US/pdfs/literature/ug/ug_embedded_ip.pdf
(Please see "Register Map" on page 65)

---

Re-submit of a patch originally submitted by Juro Bystricky in 2017. Adjusted to compile against latest master.

 default-configs/nios2-softmmu.mak |   1 +
 hw/char/Makefile.objs             |   1 +
 hw/char/altera_juart.c            | 286 ++++++++++++++++++++++++++++++
 include/hw/char/altera_juart.h    |  46 +++++
 4 files changed, 334 insertions(+)
 create mode 100644 hw/char/altera_juart.c
 create mode 100644 include/hw/char/altera_juart.h
default-configs/nios2-softmmu.mak +1 -0
index 74dc70caaef0..61598465c11d 100644
@@ -4,3 +4,4 @@ CONFIG_NIOS2=y
 CONFIG_SERIAL=y
 CONFIG_PTIMER=y
 CONFIG_ALTERA_TIMER=y
+CONFIG_ALTERA_JUART=y
hw/char/Makefile.objs +1 -0
index c4947d7ae7b4..289622f72104 100644
@@ -30,6 +30,7 @@ common-obj-$(CONFIG_LM32) += lm32_juart.o
 common-obj-$(CONFIG_LM32) += lm32_uart.o
 common-obj-$(CONFIG_MILKYMIST) += milkymist-uart.o
 common-obj-$(CONFIG_SCLPCONSOLE) += sclpconsole.o sclpconsole-lm.o
+common-obj-$(CONFIG_ALTERA_JUART) += altera_juart.o
 
 obj-$(CONFIG_VIRTIO) += virtio-serial-bus.o
 obj-$(CONFIG_TERMINAL3270) += terminal3270.o
hw/char/altera_juart.c new file +286 -0

286 lines not on this page · raw message

include/hw/char/altera_juart.h new file +46 -0

46 lines not on this page · raw message

Signature · 1 line
2.20.0
#1 lore raw
Quoted 11 lines · Tobias Klauser

Add the Altera JTAG UART model.

Hardware emulation based on:
https://www.altera.com/en_US/pdfs/literature/ug/ug_embedded_ip.pdf
(Please see "Register Map" on page 65)

Do you also have a patch which makes one of the QEMU machine models use this new device ?

thanks
-- PMM

#2 lore raw
Quoted 8 lines · Peter Maydell
Quoted 7 lines · Tobias Klauser

Add the Altera JTAG UART model.

Hardware emulation based on:
https://www.altera.com/en_US/pdfs/literature/ug/ug_embedded_ip.pdf
(Please see "Register Map" on page 65)

Quoted 7 lines
Quoted 4 lines

Do you also have a patch which makes one of the QEMU machine models use this new device ?

Yes, I have a patch (which needs some adjustments) to add the 3c120 Nios devboard which will use this UART.

It could also be used with the 10m50 as it was used in version 15 of the hardware reference design provided by Altera [1]. Though it seems it is no longer used in version 16 of the reference design [2].

[1]
https://rocketboards.org/foswiki/view/Documentation/AlteraMAX1010M50RevCDevelopmentKitLinuxSetupUsingMAX10GHRDVersion151
[2]
https://rocketboards.org/foswiki/Documentation/AlteraMAX1010M50RevCDevelopmentKitLinuxSetupV160

Thanks
Tobias