Skip to contentSkip to conversation

nios2: Add Altera JTAG UART emulation

PATCH New Tobias Klauser 1 participant 1 message Sep 1, 2017

lore
Share & tools
lore
#0 lore raw

PATCH v7 1/1 nios2: Add Altera JTAG UART emulation

From: Juro Bystricky <[email protected]>

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)

[tk: updated to compile with latest qemu master]

---

v7:
- resending with changes needed to compile with latest qemu 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 1bcd37e98d9c..adb0e3ebc36a 100644
@@ -28,6 +28,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.13.0