* [PATCH] hw/char/escc: Implement loopback mode
@ 2023-07-16 15:35 Thomas Huth
2023-07-16 16:00 ` Philippe Mathieu-Daudé
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Thomas Huth @ 2023-07-16 15:35 UTC (permalink / raw)
To: Marc-André Lureau, qemu-devel
Cc: Paolo Bonzini, Laurent Vivier, Mark Cave-Ayland
The firmware of the m68k next-cube machine uses the loopback mode
for self-testing the hardware and currently fails during this step.
By implementing the loopback mode, we can make the firmware pass
to the next step.
Signed-off-by: Thomas Huth <huth@tuxfamily.org>
---
hw/char/escc.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/hw/char/escc.c b/hw/char/escc.c
index 4f3872bfe9..4be66053c1 100644
--- a/hw/char/escc.c
+++ b/hw/char/escc.c
@@ -653,7 +653,9 @@ static void escc_mem_write(void *opaque, hwaddr addr,
escc_update_irq(s);
s->tx = val;
if (s->wregs[W_TXCTRL2] & TXCTRL2_TXEN) { /* tx enabled */
- if (qemu_chr_fe_backend_connected(&s->chr)) {
+ if (s->wregs[W_MISC2] & MISC2_LCL_LOOP) {
+ serial_receive_byte(s, s->tx);
+ } else if (qemu_chr_fe_backend_connected(&s->chr)) {
/*
* XXX this blocks entire thread. Rewrite to use
* qemu_chr_fe_write and background I/O callbacks
--
2.41.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] hw/char/escc: Implement loopback mode
2023-07-16 15:35 [PATCH] hw/char/escc: Implement loopback mode Thomas Huth
@ 2023-07-16 16:00 ` Philippe Mathieu-Daudé
2023-07-17 19:48 ` Mark Cave-Ayland
2023-07-25 14:57 ` Philippe Mathieu-Daudé
2 siblings, 0 replies; 4+ messages in thread
From: Philippe Mathieu-Daudé @ 2023-07-16 16:00 UTC (permalink / raw)
To: Thomas Huth, Marc-André Lureau, qemu-devel
Cc: Paolo Bonzini, Laurent Vivier, Mark Cave-Ayland
On 16/7/23 17:35, Thomas Huth wrote:
> The firmware of the m68k next-cube machine uses the loopback mode
> for self-testing the hardware and currently fails during this step.
> By implementing the loopback mode, we can make the firmware pass
> to the next step.
>
> Signed-off-by: Thomas Huth <huth@tuxfamily.org>
> ---
> hw/char/escc.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] hw/char/escc: Implement loopback mode
2023-07-16 15:35 [PATCH] hw/char/escc: Implement loopback mode Thomas Huth
2023-07-16 16:00 ` Philippe Mathieu-Daudé
@ 2023-07-17 19:48 ` Mark Cave-Ayland
2023-07-25 14:57 ` Philippe Mathieu-Daudé
2 siblings, 0 replies; 4+ messages in thread
From: Mark Cave-Ayland @ 2023-07-17 19:48 UTC (permalink / raw)
To: Thomas Huth, Marc-André Lureau, qemu-devel
Cc: Paolo Bonzini, Laurent Vivier
On 16/07/2023 16:35, Thomas Huth wrote:
> The firmware of the m68k next-cube machine uses the loopback mode
> for self-testing the hardware and currently fails during this step.
> By implementing the loopback mode, we can make the firmware pass
> to the next step.
>
> Signed-off-by: Thomas Huth <huth@tuxfamily.org>
> ---
> hw/char/escc.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/hw/char/escc.c b/hw/char/escc.c
> index 4f3872bfe9..4be66053c1 100644
> --- a/hw/char/escc.c
> +++ b/hw/char/escc.c
> @@ -653,7 +653,9 @@ static void escc_mem_write(void *opaque, hwaddr addr,
> escc_update_irq(s);
> s->tx = val;
> if (s->wregs[W_TXCTRL2] & TXCTRL2_TXEN) { /* tx enabled */
> - if (qemu_chr_fe_backend_connected(&s->chr)) {
> + if (s->wregs[W_MISC2] & MISC2_LCL_LOOP) {
> + serial_receive_byte(s, s->tx);
> + } else if (qemu_chr_fe_backend_connected(&s->chr)) {
> /*
> * XXX this blocks entire thread. Rewrite to use
> * qemu_chr_fe_write and background I/O callbacks
Yes indeed, that helps things here :)
Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
ATB,
Mark.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] hw/char/escc: Implement loopback mode
2023-07-16 15:35 [PATCH] hw/char/escc: Implement loopback mode Thomas Huth
2023-07-16 16:00 ` Philippe Mathieu-Daudé
2023-07-17 19:48 ` Mark Cave-Ayland
@ 2023-07-25 14:57 ` Philippe Mathieu-Daudé
2 siblings, 0 replies; 4+ messages in thread
From: Philippe Mathieu-Daudé @ 2023-07-25 14:57 UTC (permalink / raw)
To: Thomas Huth, Marc-André Lureau, qemu-devel
Cc: Paolo Bonzini, Laurent Vivier, Mark Cave-Ayland
On 16/7/23 17:35, Thomas Huth wrote:
> The firmware of the m68k next-cube machine uses the loopback mode
> for self-testing the hardware and currently fails during this step.
> By implementing the loopback mode, we can make the firmware pass
> to the next step.
>
> Signed-off-by: Thomas Huth <huth@tuxfamily.org>
> ---
> hw/char/escc.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
Thanks, queued to my misc-fixes tree.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-07-25 14:57 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-16 15:35 [PATCH] hw/char/escc: Implement loopback mode Thomas Huth
2023-07-16 16:00 ` Philippe Mathieu-Daudé
2023-07-17 19:48 ` Mark Cave-Ayland
2023-07-25 14:57 ` Philippe Mathieu-Daudé
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.