I don't have this chip, but while this chip specific documentation says
this is needed.  (The rest of the winbond superio's within the
v2_linuxbios tree has this code already.)  

So I'm entering it untested, but should work according to documentation.


--
Roger
http://www.eskimo.com/~roger/index.html
Key fingerprint = 8977 A252 2623 F567 70CD 1261 640F C963 1005 1D61

Wed May 9 12:52:41 PDT 2007
The superio needs 0x87 sent twice to 0x2eh (or 0x4eh) to enable extended function (power-on strapping).  Although this is already done in superio.c, it's not being done when w83627thf_early_serial.c is executed.  As such, no console_init without it.

Signed-off-by: Roger Zauner <[EMAIL PROTECTED]>


Index: src/superio/winbond/w83627thf/w83627thf_early_serial.c
===================================================================
--- src/superio/winbond/w83627thf/w83627thf_early_serial.c	(revision 2643)
+++ src/superio/winbond/w83627thf/w83627thf_early_serial.c	(working copy)
@@ -2,10 +2,26 @@
 #include "w83627thf.h"
 
 
+static inline void pnp_enter_ext_func_mode(device_t dev)
+{
+        unsigned port = dev >> 8;
+        outb(0x87, port);
+        outb(0x87, port);
+}
+
+static void pnp_exit_ext_func_mode(device_t dev)
+{
+        unsigned port = dev >> 8;
+        outb(0xaa, port);
+}
+
 static void w83627thf_enable_serial(device_t dev, unsigned iobase)
 {
-	pnp_set_logical_device(dev);
-	pnp_set_enable(dev, 0);
-	pnp_set_iobase(dev, PNP_IDX_IO0, iobase);
-	pnp_set_enable(dev, 1);
+        pnp_enter_ext_func_mode(dev);
+        pnp_set_logical_device(dev);
+        pnp_set_enable(dev, 0);
+        pnp_set_iobase(dev, PNP_IDX_IO0, iobase);
+        pnp_set_enable(dev, 1);
+        pnp_exit_ext_func_mode(dev);
 }
+
-- 
linuxbios mailing list
linuxbios@linuxbios.org
http://www.linuxbios.org/mailman/listinfo/linuxbios

Reply via email to