summaryrefslogtreecommitdiffstats
path: root/drivers/tty/serial/8250
diff options
context:
space:
mode:
authorJi-Ze Hong (Peter Hong) <hpeter@gmail.com>2017-10-17 14:23:08 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-10-20 14:06:46 +0200
commitfd97e66c5529046e989a0879c3bb58fddb592c71 (patch)
treecd6434e9572322df969112b204c7bdc21dad01a0 /drivers/tty/serial/8250
parentc79dde629d2027ca80329c62854a7635e623d527 (diff)
downloadlinux-fd97e66c5529046e989a0879c3bb58fddb592c71.tar.bz2
serial: 8250_fintek: Fix finding base_port with activated SuperIO
The SuperIO will be configured at boot time by BIOS, but some BIOS will not deactivate the SuperIO when the end of configuration. It'll lead to mismatch for pdata->base_port in probe_setup_port(). So we'll deactivate all SuperIO before activate special base_port in fintek_8250_enter_key(). Tested on iBASE MI802. Cc: stable@vger.kernel.org Tested-by: Ji-Ze Hong (Peter Hong) <hpeter+linux_kernel@gmail.com> Signed-off-by: Ji-Ze Hong (Peter Hong) <hpeter+linux_kernel@gmail.com> Reviewd-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/8250')
-rw-r--r--drivers/tty/serial/8250/8250_fintek.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/tty/serial/8250/8250_fintek.c b/drivers/tty/serial/8250/8250_fintek.c
index 96cc45f25ee9..b34623914413 100644
--- a/drivers/tty/serial/8250/8250_fintek.c
+++ b/drivers/tty/serial/8250/8250_fintek.c
@@ -128,6 +128,9 @@ static int fintek_8250_enter_key(u16 base_port, u8 key)
if (!request_muxed_region(base_port, 2, "8250_fintek"))
return -EBUSY;
+ /* Force to deactive all SuperIO in this base_port */
+ outb(EXIT_KEY, base_port + ADDR_PORT);
+
outb(key, base_port + ADDR_PORT);
outb(key, base_port + ADDR_PORT);
return 0;