Date: Tue, 20 Aug 2002 20:40:12 +0900 (JST) From: FUJIMOTO Kou <fujimoto@yebisu.j.dendai.ac.jp> To: FreeBSD-gnats-submit@FreeBSD.org Subject: kern/41812: patch to detect/function AMD768 SMBus Message-ID: <20020820114012.65FC64083F@yebisu.j.dendai.ac.jp>
next in thread | raw e-mail | index | archive | help
>Number: 41812 >Category: kern >Synopsis: patch to detect/function AMD768 SMBus >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: Tue Aug 20 04:50:01 PDT 2002 >Closed-Date: >Last-Modified: >Originator: FUJIMOTO Kou >Release: FreeBSD 4.6-STABLE i386 >Organization: Tokyo Denki University >Environment: System: FreeBSD yebisu.j.dendai.ac.jp 4.6-STABLE FreeBSD 4.6-STABLE #26: Tue Aug 13 00:25:35 JST 2002 root@yebisu.j.dendai.ac.jp:/usr/src/sys/compile/XPSMP i386 >Description: The attached patch for sys/pci/amdpm.c enables kernel to recognize AMD766/768 SMBus interface. AMD766/768 SMBus seems to be compatible with that of AMD756, and so the patch just adds PCI device IDs and modifies one conditional. >How-To-Repeat: It works fine with ASUS A7M266-D (AMD768 chipset) and ports/sysutils/xmbmon, though I never examined with AMD766 or other applications. >Fix: --- amdpm.c.orig Wed Oct 10 21:10:26 2001 +++ amdpm.c Mon Mar 11 14:27:58 2002 @@ -66,6 +66,8 @@ #define AMDPM_VENDORID_AMD 0x1022 #define AMDPM_DEVICEID_AMD756PM 0x740b +#define AMDPM_DEVICEID_AMD766PM 0x7413 +#define AMDPM_DEVICEID_AMD768PM 0x7443 /* PCI Configuration space registers */ #define AMDPCI_PMBASE 0x58 @@ -155,10 +157,14 @@ amdpm_probe(device_t dev) { u_long base; - + u_int16_t did; + + did = pci_get_device(dev); if ((pci_get_vendor(dev) == AMDPM_VENDORID_AMD) && - (pci_get_device(dev) == AMDPM_DEVICEID_AMD756PM)) { - device_set_desc(dev, "AMD 756 Power Management Controller"); + ((did == AMDPM_DEVICEID_AMD756PM) || + (did == AMDPM_DEVICEID_AMD766PM) || + (did == AMDPM_DEVICEID_AMD768PM))) { + device_set_desc(dev, "AMD 756/766/768 Power Management Controller"); /* * We have to do this, since the BIOS won't give us the @@ -215,8 +221,8 @@ if (!amdsmb_sc->smbus) return (EINVAL); - device_set_desc(dev, "AMD 756 SMBus interface"); - device_printf(dev, "AMD 756 SMBus interface\n"); + device_set_desc(dev, "AMD 756/766/768 SMBus interface"); + device_printf(dev, "AMD 756/766/768 SMBus interface\n"); return (0); } >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020820114012.65FC64083F>