Right way to test SMBus? Trying to add nForce2...
Jeremy Messenger
mezz7 at cox.net
Fri Sep 3 12:24:23 PDT 2004
On Thu, 02 Sep 2004 16:44:35 -0500, Jeremy Messenger <mezz7 at cox.net> wrote:
> Hello,
<snip>
> 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!
<snip>
Changed from 0x14 to 0x50 looks like it works without throw any error.
Update dmesg shows:
=====================================
amdpm0: <nForce SMBus Controller> port 0x5000-0x501f,0xec00-0xec1f irq 23
at device 1.1 on pci0
smbus0: <System Management Bus> on amdpm0
=====================================
I found a source for nForce2 SMBus[1] and it said that it has two SMBus
interfaces (0x50 and 0x54) in a nForce2. So.. I think, I will not hack it
more (due to lack of C knowledge) and keep patch (attaching) it by myself
for personal. To have one 0x50 seems work for me.
BTW: I am willing to test patch(es) if there has any.
[1]
http://www2.lm-sensors.nu/~lm78/cvs/browse.cgi/lm_sensors2/kernel/busses/i2c-nforce2.c
Cheers,
Mezz
> Cheers,
> Mezz
--
mezz7 at cox.net - mezz at FreeBSD.org
FreeBSD GNOME Team
http://www.FreeBSD.org/gnome/ - gnome at FreeBSD.org
-------------- next part --------------
--- sys/pci/amdpm.c.orig Thu Sep 2 11:24:09 2004
+++ sys/pci/amdpm.c Fri Sep 3 01:11:02 2004
@@ -73,10 +73,11 @@
/* 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
-#define NFPCI_PMBASE 0x14
+#define NFPCI_PMBASE 0x50
#define AMDPCI_GEN_CONFIG_PM 0x41
#define AMDPCI_PMIOEN (1<<7)
@@ -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");
/*
More information about the freebsd-hackers
mailing list