[PATCH v2 31/50] lasi: fix serial port initialisation

Mark Cave-Ayland posted 50 patches 3 years, 9 months ago
[PATCH v2 31/50] lasi: fix serial port initialisation
Posted by Mark Cave-Ayland 3 years, 9 months ago
The existing code checks for serial_hd(1) but sets the LASI serial port chardev
to serial_hd(0). Use serial_hd(1) for the LASI serial port and also set the
serial port endian to DEVICE_BIG_ENDIAN (which also matches the endian of the
existing serial port).

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Acked-by: Helge Deller <deller@gmx.de>
---
 hw/hppa/lasi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/hppa/lasi.c b/hw/hppa/lasi.c
index 32c7514d3a..219eb779f3 100644
--- a/hw/hppa/lasi.c
+++ b/hw/hppa/lasi.c
@@ -253,7 +253,7 @@ DeviceState *lasi_initfn(MemoryRegion *address_space)
         /* Serial port */
         serial_mm_init(address_space, LASI_UART_HPA + 0x800, 0,
                 qdev_get_gpio_in(dev, LASI_IRQ_UART_HPA), 8000000 / 16,
-                serial_hd(0), DEVICE_NATIVE_ENDIAN);
+                serial_hd(1), DEVICE_BIG_ENDIAN);
     }
 
     /* PS/2 Keyboard/Mouse */
-- 
2.20.1
Re: [PATCH v2 31/50] lasi: fix serial port initialisation
Posted by Richard Henderson 3 years, 9 months ago
On 5/4/22 04:25, Mark Cave-Ayland wrote:
> The existing code checks for serial_hd(1) but sets the LASI serial port chardev
> to serial_hd(0). Use serial_hd(1) for the LASI serial port and also set the
> serial port endian to DEVICE_BIG_ENDIAN (which also matches the endian of the
> existing serial port).
> 
> Signed-off-by: Mark Cave-Ayland<mark.cave-ayland@ilande.co.uk>
> Acked-by: Helge Deller<deller@gmx.de>
> ---
>   hw/hppa/lasi.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~
Re: [PATCH v2 31/50] lasi: fix serial port initialisation
Posted by Richard Henderson 3 years, 9 months ago
On 5/4/22 04:25, Mark Cave-Ayland wrote:
> The existing code checks for serial_hd(1) but sets the LASI serial port chardev
> to serial_hd(0). Use serial_hd(1) for the LASI serial port and also set the
> serial port endian to DEVICE_BIG_ENDIAN (which also matches the endian of the
> existing serial port).
> 
> Signed-off-by: Mark Cave-Ayland<mark.cave-ayland@ilande.co.uk>
> Acked-by: Helge Deller<deller@gmx.de>
> ---
>   hw/hppa/lasi.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~