aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/bus/Kconfig2
-rw-r--r--drivers/tty/serial/8250/8250_hisi_lpc.c5
2 files changed, 6 insertions, 1 deletions
diff --git a/drivers/bus/Kconfig b/drivers/bus/Kconfig
index f252268be3a7..bee81816299c 100644
--- a/drivers/bus/Kconfig
+++ b/drivers/bus/Kconfig
@@ -94,7 +94,7 @@ config MVEBU_MBUS
config HISILICON_LPC
bool "Workaround for nonstandard ISA I/O space on Hisilicon Hip0X SoC"
- depends on ARCH_HISI || COMPILE_TEST
+ depends on (ARCH_HISI || COMPILE_TEST) && ARM64
select ARM64_INDIRECT_PIO
help
This driver support for some legacy driver that use the ISA I/O ports,
diff --git a/drivers/tty/serial/8250/8250_hisi_lpc.c b/drivers/tty/serial/8250/8250_hisi_lpc.c
index ff6e883e9bf4..eb596a484572 100644
--- a/drivers/tty/serial/8250/8250_hisi_lpc.c
+++ b/drivers/tty/serial/8250/8250_hisi_lpc.c
@@ -273,6 +273,11 @@ static struct platform_device hisi_lpc_uart = {
static int __init hisi_lpc_uart_init(void)
{
+ if (!arm64_isa_pio) {
+ pr_warn("no indirect ISA port I/O for Hisilicon LPC uart");
+ return -EINVAL;
+ }
+
return platform_device_register(&hisi_lpc_uart);
}