Date: Thu, 02 Sep 2004 16:44:35 -0500 From: "Jeremy Messenger" <mezz7@cox.net> To: freebsd-hackers@freebsd.org Subject: Right way to test SMBus? Trying to add nForce2... Message-ID: <opsdpyol2i9aq2h7@mezz.mezzweb.com>
next in thread | raw e-mail | index | archive | help
Hello, I got a new motherboard; it is MSI K7N2 Delta2 Platinum (MS-6570E-010). http://www.msicomputer.com/product/p_spec.asp?model=K7N2_Delta2_Platinum&class=mb Right now, I am playing with the sys/pci/amdpm.c by add IDs. It's my first time to poke in the drivers code with no C knowledge, so please try to speak in English. :-) Before pciconf: ===================================== none5@pci0:1:1: class=0x0c0500 card=0x57001462 chip=0x008410de rev=0xa1 hdr=0x00 vendor = 'NVIDIA Corporation' device = 'nForce PCI System Management' class = serial bus subclass = SMBus ===================================== After pciconf: ===================================== amdpm0@pci0:1:1: class=0x0c0500 card=0x57001462 chip=0x008410de rev=0xa1 hdr=0x00 vendor = 'NVIDIA Corporation' device = 'nForce PCI System Management' class = serial bus subclass = SMBus ===================================== But in dmesg shows: ===================================== amdpm0: <nForce SMBus Controller> port 0-0x1f,0xec00-0xec1f irq 23 at device 1.1 on pci0 amdpm0: could not map i/o space device_attach: amdpm0 attach returned 6 ===================================== I think, I might have to change the PCI registers from 0x14 to 0x50 and/or (not sure) 0x54, which I haven't done on this part yet. I hope, I have the right PCI registers number (found in google). I am going to try add two PCI registers (not sure how to do it yet) and I want to know how should I test with SMBus to make sure it works? Thanks! So far the patch looks like this: ===================================== --- sys/pci/amdpm.c.orig Thu Sep 2 11:24:09 2004 +++ sys/pci/amdpm.c Thu Sep 2 12:20:01 2004 @@ -73,6 +73,7 @@ /* nVidia nForce chipset */ #define AMDPM_VENDORID_NVIDIA 0x10de #define AMDPM_DEVICEID_NF_SMB 0x01b4 +#define AMDPM_DEVICEID_NF2_SMB 0x0084 /* PCI Configuration space registers */ #define AMDPCI_PMBASE 0x58 @@ -167,7 +168,8 @@ } if ((vid == AMDPM_VENDORID_NVIDIA) && - (did == AMDPM_DEVICEID_NF_SMB)) { + ((did == AMDPM_DEVICEID_NF_SMB) || + (did == AMDPM_DEVICEID_NF2_SMB))) { device_set_desc(dev, "nForce SMBus Controller"); /* ===================================== Cheers, Mezz -- mezz7 at cox.net - mezz at FreeBSD.org FreeBSD GNOME Team http://www.FreeBSD.org/gnome/ - gnome at FreeBSD.org
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?opsdpyol2i9aq2h7>