Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 11 Oct 2006 18:58:49 -0700 (PDT)
From:      "Nicholas C. Lewis" <nplayshorn@yahoo.com>
To:        freebsd-bugs@freebsd.org
Subject:   TC1000 serial ports need enabling w/ 6.1-RELEASE
Message-ID:  <20061012015849.47465.qmail@web57015.mail.re3.yahoo.com>

next in thread | raw e-mail | index | archive | help
Does anyone know how to make this patch work with
6.1-RELEASE.

Thank you in advance,
Nick
>Number:         65355
>Category:       kern
>Synopsis:       TC1000 serial ports need enabling
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Apr 09 05:30:15 PDT 2004
>Closed-Date:
>Last-Modified:
>Originator:     Milan Obuch
>Release:        5.2.1-RELEASE
>Organization:
>Environment:
FreeBSD tablet.dino.sk 5.2.1-RELEASE FreeBSD
5.2.1-RELEASE #13: Thu Apr  8 05:56:24 CEST 2004    
root at
tablet.dino.sk:/usr/src/sys/i386/compile/TABLET  i386
>Description:
Booting FreeBSD on Compaq's TC1000 TabletPC gives
sio0: configured irq 4 not in bitmap of probed irqs 0
sio0: port may not be enabled
sio1: configured irq 3 not in bitmap of probed irqs 0
sio1: port may not be enabled
when serial ports are probed. First serial port is
connected to pen digitizer.
This platform uses Via Technologies VT82C686A chip,
and PhoenixBIOS does not fully initialize its SuperI/O
controller
>How-To-Repeat:
Install FreeBSD on TC1000 and boot
>Fix:
--- sys/dev/pci/isa_pci.c.orig  Sun Aug 24 19:54:15
2003
+++ sys/dev/pci/isa_pci.c       Wed Apr  7 11:07:16
2004
@@ -159,6 +159,7 @@
 {
     struct isab_softc *sc = device_get_softc(dev);
     int error, rid;
+    u_int32_t u;

     /*
      * Attach an ISA bus.  Note that we can only have
one ISA bus.
@@ -180,6 +181,30 @@
        if (sc->elcr_res == NULL)
            device_printf(dev, "failed to allocate
ELCR resource\n");
         break;
+    case 0x06861106: /* VIA 82C686 */
+       /*
+        * PhoenixBIOS used in Compaq's TabletPC
TC1000 does not initialises
+        * chip to enable serial ports, so we handle
it ourselves.
+        */
+
+#define CONFIG_INDEX 0x3F0
+#define CONFIG_DATA 0x3F1
+
+        device_printf(dev, "TC1000 Serial1 port
enabler\n");
+        u = pci_read_config(dev,0x85,1);
+        pci_write_config(dev, 0x85, u | 2, 1); //
enable SuperI/O configuration
+
+        outb(CONFIG_INDEX, 0xE7);
+        outb(CONFIG_DATA, 0xFE); // Serial1 addr set
to 0x3F8
+
+        outb(CONFIG_INDEX, 0xE2);
+        u = inb(CONFIG_DATA);
+
+        outb(CONFIG_INDEX, 0xE2);
+        outb(CONFIG_DATA, u | 4); // enable Serial1
+
+        u = pci_read_config(dev,0x85,1);
+        pci_write_config(dev, 0x85, u & ~2, 1); //
disable SuperI/O configuration
     }

     return(0);

Maybe some #ifdef kernel option could be used here,
say TC1000_SIO_ENABLE_HACK, but I did not bother with
this.
>Release-Note:
>Audit-Trail:
>Unformatted:

**************************
Nicholas C. Lewis
NPlaysHorn@Yahoo.com

**************************

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20061012015849.47465.qmail>