Skip to contentSkip to conversation

serial: 8250_fintek: Fix finding base_port with activated SuperIO

PATCH In review Ji-Ze Hong (Peter Hong) 2 participants 2 messages Oct 17, 2017 – Oct 18, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 drivers/tty/serial/8250/8250_fintek.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/tty/serial/8250/8250_fintek.c +3 -0
index 96cc45f25ee9..b34623914413 100644
@@ -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;
Signature · 1 line
2.7.4
#1 lore raw
Quoted 7 lines · On Tue, 17 Oct 2017 14:23:08 +0800 "Ji-Ze Hong (Peter Hong)"…

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.

Good point.

Alan