[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 35/50] lasi: move second serial port initialisation to machine
From: |
Mark Cave-Ayland |
Subject: |
[PATCH v2 35/50] lasi: move second serial port initialisation to machine.c |
Date: |
Wed, 4 May 2022 10:25:45 +0100 |
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Acked-by: Helge Deller <deller@gmx.de>
---
hw/hppa/lasi.c | 8 --------
hw/hppa/machine.c | 7 +++++++
2 files changed, 7 insertions(+), 8 deletions(-)
diff --git a/hw/hppa/lasi.c b/hw/hppa/lasi.c
index 6faa98dca5..753a08d454 100644
--- a/hw/hppa/lasi.c
+++ b/hw/hppa/lasi.c
@@ -18,7 +18,6 @@
#include "sysemu/sysemu.h"
#include "sysemu/runstate.h"
#include "hppa_sys.h"
-#include "hw/char/serial.h"
#include "hw/input/lasips2.h"
#include "migration/vmstate.h"
#include "qom/object.h"
@@ -236,13 +235,6 @@ LasiState *lasi_initfn(MemoryRegion *address_space)
dev = qdev_new(TYPE_LASI_CHIP);
sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal);
- if (serial_hd(1)) {
- /* 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(1), DEVICE_BIG_ENDIAN);
- }
-
/* PS/2 Keyboard/Mouse */
lasips2_init(address_space, LASI_PS2KBD_HPA,
qdev_get_gpio_in(dev, LASI_IRQ_PS2KBD_HPA));
diff --git a/hw/hppa/machine.c b/hw/hppa/machine.c
index 5244178aaf..5b43ae2960 100644
--- a/hw/hppa/machine.c
+++ b/hw/hppa/machine.c
@@ -205,6 +205,13 @@ static void machine_hppa_init(MachineState *machine)
115200, serial_hd(0), DEVICE_BIG_ENDIAN);
}
+ if (serial_hd(1)) {
+ /* Serial port */
+ serial_mm_init(addr_space, LASI_UART_HPA + 0x800, 0,
+ qdev_get_gpio_in(lasi_dev, LASI_IRQ_UART_HPA), 8000000 / 16,
+ serial_hd(1), DEVICE_BIG_ENDIAN);
+ }
+
/* Parallel port */
parallel_mm_init(addr_space, LASI_LPT_HPA + 0x800, 0,
qdev_get_gpio_in(lasi_dev, LASI_IRQ_LAN_HPA),
--
2.20.1
- Re: [PATCH v2 30/50] lasi: use qdev GPIOs to wire up IRQs in lasi_initfn(), (continued)
- [PATCH v2 31/50] lasi: fix serial port initialisation, Mark Cave-Ayland, 2022/05/04
- [PATCH v2 29/50] lasi: define IRQ inputs as qdev GPIOs, Mark Cave-Ayland, 2022/05/04
- [PATCH v2 32/50] lasi: update lasi_initfn() to return LASIState, Mark Cave-Ayland, 2022/05/04
- [PATCH v2 33/50] lasi: move LAN initialisation to machine.c, Mark Cave-Ayland, 2022/05/04
- [PATCH v2 35/50] lasi: move second serial port initialisation to machine.c,
Mark Cave-Ayland <=
- [PATCH v2 36/50] lasi: move PS2 initialisation to machine.c, Mark Cave-Ayland, 2022/05/04
- [PATCH v2 34/50] lasi: move parallel port initialisation to machine.c, Mark Cave-Ayland, 2022/05/04
- [PATCH v2 37/50] lasi: remove address space parameter from lasi_initfn(), Mark Cave-Ayland, 2022/05/04
- [PATCH v2 38/50] lasi: move lasi_initfn() to machine.c, Mark Cave-Ayland, 2022/05/04