The superio needs 0x87 sent twice to 0x3f0 to enable extended function
(power-on strapping). Although this is already done in superio.c, it's
not being done when w83977tf_early_serial.c is executed. As such, no
console_init -- atleast in my case.
(Next on the agenda, check the other winbond superio chips to see if
this is needed as well as I have the chip spec pdf files here as well.
I noticed the other winbond chips use different addresses and values.)
--
Roger
http://www.eskimo.com/~roger/index.html
Key fingerprint = 8977 A252 2623 F567 70CD 1261 640F C963 1005 1D61
Wed May 9 07:25:26 PDT 2007
The superio needs 0x87 sent twice to 0x3f0 to enable extended function (power-on strapping). Although this is already done in superio.c, it's not being done when w83977tf_early_serial.c is executed. As such, no console_init without it.
Signed-off-by: Roger Zauner <[EMAIL PROTECTED]>
Index: src/superio/winbond/w83977tf/w83977tf_early_serial.c
===================================================================
--- src/superio/winbond/w83977tf/w83977tf_early_serial.c (revision 2640)
+++ src/superio/winbond/w83977tf/w83977tf_early_serial.c (working copy)
@@ -2,10 +2,26 @@
#include "w83977tf.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 w83977tf_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
[email protected]
http://www.linuxbios.org/mailman/listinfo/linuxbios