dm: fix LPC UART no output issue after reboot

The meaning of lpc_uart_vdev::enabled was changed from runtime enablement
status of UARTs to user configuration in commit 852f10cc3. So it's
incorrect to clear it in lpc_deinit() which will cause UARTs disabled
after reboot.

Tracked-On: #8537
Fixes: 852f10cc3 ("dm: lpc: only emulate COM ports specified in command line")
Signed-off-by: Qiang Zhang <qiang4.zhang@intel.com>
This commit is contained in:
Qiang Zhang 2024-02-20 12:57:52 +08:00 committed by acrnsi-robot
parent e0d03b27d0
commit 01beb65527
1 changed files with 1 additions and 3 deletions

View File

@ -65,7 +65,7 @@ static struct lpc_uart_vdev {
const char *opts;
int iobase;
int irq;
int enabled;
int enabled; /* enabled/configured by user */
} lpc_uart_vdev[LPC_UART_NUM];
static const char *lpc_uart_names[LPC_UART_NUM] = { "COM1", "COM2", "COM3", "COM4" };
@ -185,7 +185,6 @@ lpc_deinit(struct vmctx *ctx)
uart_release_backend(lpc_uart->uart, lpc_uart->opts);
uart_legacy_dealloc(unit);
lpc_uart->uart = NULL;
lpc_uart->enabled = 0;
}
}
@ -233,7 +232,6 @@ lpc_init(struct vmctx *ctx)
error = register_inout(&iop);
if (error)
goto init_failed;
lpc_uart->enabled = 1;
}
return 0;