Subject: Re: NVIDIA nForce2/3/4 SMBus controller
To: None <current-users@netbsd.org>
From: KIYOHARA Takashi <kiyohara@kk.iij4u.or.jp>
List: current-users
Date: 07/01/2007 17:59:50
Hi! all,


The nfsmb_send_1() before was wrong. I corrected it, and could attach
adt7463c0. 

# However, the fan works very early. ???  ;-<


From: KIYOHARA Takashi <kiyohara@kk.iij4u.or.jp>
Date: Sat, 30 Jun 2007 22:06:29 +0900 (JST)

> I wrote the nfsmb(4) driver for NVIDIA nForce2/3/4 SMBus controller.
> However, it might be difficult for me to verify that this source is
> correct.  I don't have the datasheet of nForce2/3/4, and do not know
> IC of what SMBus is mounted in my machine. 
> 
> This driver is looked and wrote to drivers/i2c/busses/i2c-nforce2.c of
> Linux.  Can this driver be verified?
> 
> 
> You can add below in sys/dev/pci/pcidevs
> 
>   # NVIDIA nForce2/3/4 SMBus controller
>   device nfsmbc { }
>   attach nfsmbc at pci
>   device nfsmb: i2cbus
>   attach nfsmb at nfsmbc
>   file   dev/pci/nfsmb.c                 nfsmbc | nfsmb
> 
> 
> And to your configuration file
> 
>   nfsmbc* at pci? dev ? function ?        # NVIDIA nForce2/3/4 SMBus controller
>   nfsmb*  at nfsmbc?
>   iic*    at nfsmb?


--- nfsmb.c.orig        2007-06-30 21:42:42.000000000 +0900
+++ nfsmb.c     2007-07-01 17:59:06.000000000 +0900
@@ -299,8 +299,8 @@
 {
        u_int16_t data;
 
-       /* store data */
-       bus_space_write_1(sc->sc_iot, sc->sc_ioh, NFORCE_SMB_DATA, val);
+        /* store cmd */
+       bus_space_write_1(sc->sc_iot, sc->sc_ioh, NFORCE_SMB_COMMAND, val);
 
        /* write smbus slave address to register */
        data = addr << 1;


Thanks,
--
kiyohara