From nobody@FreeBSD.org  Fri Feb 15 14:49:11 2008
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id E242616A418
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 15 Feb 2008 14:49:11 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id B6ABC13C4E1
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 15 Feb 2008 14:49:11 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.2/8.14.2) with ESMTP id m1FEkoe0011104
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 15 Feb 2008 14:46:50 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.2/8.14.1/Submit) id m1FEko4p011103;
	Fri, 15 Feb 2008 14:46:50 GMT
	(envelope-from nobody)
Message-Id: <200802151446.m1FEko4p011103@www.freebsd.org>
Date: Fri, 15 Feb 2008 14:46:50 GMT
From: "Y.Okabe" <be_works_us@yahoo.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: viapm driver doesn't work on VIA VT8237 chip
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         120714
>Category:       kern
>Synopsis:       [viapm] [patch] viapm driver doesn't work on VIA VT8237 chip
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    gonzo
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Feb 15 14:50:05 UTC 2008
>Closed-Date:    Tue Feb 09 09:41:29 UTC 2010
>Last-Modified:  Tue Feb 09 09:41:29 UTC 2010
>Originator:     Y.Okabe
>Release:        7.0-RC2
>Organization:
n/a
>Environment:
FreeBSD 7.0-PRERELEASE

VIA C7 1.5Ghz + CN700 + VT8237R



>Description:
I configure and build kernel with enable viapm driver.

but, kernrl could not detect the VIA VT8237R southbridge on my motherboad(GA-C7V7).

The OpenBSD current viapm.c that support VT8237(same as VT8233).

>How-To-Repeat:
install 7.0 RC2
>Fix:

patched kernel's dmesg >>
viapropm0: <VIA VT8233/VT8235/VT8237/CX700 Power Management Unit> port 0x500-0x5
0f at device 17.0 on pci0
smbus0: <System Management Bus> on viapropm0
smb0: <SMBus generic I/O> on smbus0
isa0: <ISA bus> on viapropm0


Add VT8237 pci-deviceID to viapm.c
(and shrink code very little...)


*** /usr/src/sys/pci/viapm.c.org    Fri Feb 15 22:00:49 2008
--- /usr/src/sys/pci/viapm.c        Fri Feb 15 22:10:29 2008
*************** static int viapm_debug = 0;
*** 70,75 ****
--- 70,76 ----
  #define VIA_8233_PMU_ID               0x30741106
  #define       VIA_8233A_PMU_ID        0x31471106
  #define       VIA_8235_PMU_ID         0x31771106
+ #define       VIA_8237_PMU_ID         0x32271106
  #define       VIA_CX700_PMU_ID        0x83241106

  #define VIAPM_INB(port) \
*************** viapm_pro_probe(device_t dev)
*** 276,298 ****

        case VIA_8233_PMU_ID:
        case VIA_8233A_PMU_ID:
-               desc = "VIA VT8233 Power Management Unit";
-               viapm->type = VIAPM_TYP_UNKNOWN;
-               base_cfgreg = VIAPM_8233_BASE;
-               goto viapro;
-
        case VIA_8235_PMU_ID:
!               desc = "VIA VT8235 Power Management Unit";
!               viapm->type = VIAPM_TYP_UNKNOWN;
!               base_cfgreg = VIAPM_8233_BASE;
!               goto viapro;
!
        case VIA_CX700_PMU_ID:
!               desc = "VIA CX700 Power Management Unit";
!               viapm->type = VIAPM_TYP_UNKNOWN;
                base_cfgreg = VIAPM_8233_BASE;
                goto viapro;

        viapro:

  #ifdef VIAPM_BASE_ADDR
--- 277,291 ----

        case VIA_8233_PMU_ID:
        case VIA_8233A_PMU_ID:
        case VIA_8235_PMU_ID:
!       case VIA_8237_PMU_ID:
        case VIA_CX700_PMU_ID:
!               desc = "VIA VT8233/VT8235/VT8237/CX700 Power Management Unit";
!               viapm->type = VIAPM_TYP_8233;
                base_cfgreg = VIAPM_8233_BASE;
                goto viapro;

+
        viapro:

  #ifdef VIAPM_BASE_ADDR





>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-i386->freebsd-bugs 
Responsible-Changed-By: gavin 
Responsible-Changed-When: Fri Jun 20 21:17:36 UTC 2008 
Responsible-Changed-Why:  
This doesn't look i386 specific 

http://www.freebsd.org/cgi/query-pr.cgi?pr=120714 

From: Gavin Atkinson <gavin@FreeBSD.org>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/120714: [viapm] [patch] viapm driver doesn't work on VIA
 VT8237 chip
Date: Sun, 22 Jun 2008 18:37:16 +0100 (BST)

 I don't really see any need to collapse the four similar chipsets into 
 one, here is a patch which simply adds support for the chip without 
 affecting the description of others.
 
 Index: src/sys/pci/viapm.c
 ===================================================================
 RCS file: /usr/ncvs/src/sys/pci/viapm.c,v
 retrieving revision 1.19
 diff -u -r1.19 viapm.c
 --- src/sys/pci/viapm.c	6 Jun 2008 18:29:56 -0000	1.19
 +++ src/sys/pci/viapm.c	22 Jun 2008 17:33:17 -0000
 @@ -70,6 +70,7 @@
   #define VIA_8233_PMU_ID		0x30741106
   #define	VIA_8233A_PMU_ID	0x31471106
   #define	VIA_8235_PMU_ID		0x31771106
 +#define	VIA_8237_PMU_ID		0x32271106
   #define	VIA_CX700_PMU_ID	0x83241106
 
   #define VIAPM_INB(port) \
 @@ -285,6 +286,12 @@
   		base_cfgreg = VIAPM_8233_BASE;
   		goto viapro;
 
 +	case VIA_8237_PMU_ID:
 +		desc = "VIA VT8237 Power Management Unit";
 +		viapm->type = VIAPM_TYP_UNKNOWN;
 +		base_cfgreg = VIAPM_8233_BASE;
 +		goto viapro;
 +
   	case VIA_CX700_PMU_ID:
   		desc = "VIA CX700 Power Management Unit";
   		viapm->type = VIAPM_TYP_UNKNOWN;
Responsible-Changed-From-To: freebsd-bugs->gonzo 
Responsible-Changed-By: gonzo 
Responsible-Changed-When: Sun Jun 22 20:32:47 UTC 2008 
Responsible-Changed-Why:  
Bugathons is in progress, I'll commit it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=120714 
State-Changed-From-To: open->patched 
State-Changed-By: gonzo 
State-Changed-When: Sun Jun 22 20:57:26 UTC 2008 
State-Changed-Why:  
Patch committed 

http://www.freebsd.org/cgi/query-pr.cgi?pr=120714 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/120714: commit references a PR
Date: Sun, 22 Jun 2008 20:53:41 +0000 (UTC)

 gonzo       2008-06-22 20:53:29 UTC
 
   FreeBSD src repository
 
   Modified files:
     sys/pci              viapm.c 
   Log:
   SVN rev 179933 on 2008-06-22 20:53:29Z by gonzo
   
   Add support for VT8237 ISA bridge.
   
   PR:     kern/120714
   Event:  Bugathon#5
   
   Revision  Changes    Path
   1.20      +7 -0      src/sys/pci/viapm.c
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/120714: commit references a PR
Date: Sun,  6 Jul 2008 12:14:05 +0000 (UTC)

 gonzo       2008-07-06 12:13:38 UTC
 
   FreeBSD src repository
 
   Modified files:        (Branch: RELENG_7)
     sys/pci              viapm.c 
   Log:
   SVN rev 180324 on 2008-07-06 12:13:38Z by gonzo
   
   Add support for VT8237 ISA bridge.
   
   PR:             kern/120714
   MFC after:      2 weeks
   
   Revision  Changes    Path
   1.18.2.1  +7 -0      src/sys/pci/viapm.c
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: patched->closed 
State-Changed-By: gavin 
State-Changed-When: Tue Feb 9 09:41:06 UTC 2010 
State-Changed-Why:  
Close, this has been patched and MFC'd. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=120714 
>Unformatted:
