Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: dbcool on iBook G4 late 2004 doesn't work



On Sat, 11 Oct 2008, Paul Goyette wrote:

On Sun, 12 Oct 2008, Robert Fritzsche wrote:

So her is my dmesg:

dbcool0 at ki2c0
dbcool_chip_ident: addr 0x5c c_id 0x08 d_id 0x08 r_id 0x08: No match.
dbcool0: Unrecognized dbCool chip - set-up aborted

no entry in sysctl and the fan run definitive with full speed ^^

Hmmm, I think that there might be something "not quite right" with the chip address! Yours is at 0x5C, but most of the supported chips live at 0x2E (which just happens to be the difference between left- and right- justified i2c addresses).

I don't know if this is correct or not, but the following patch might help. It converts the left-justified 0x5C into right-justified 0x2E.

Index: dbcool_ki2c.c
===================================================================
RCS file: /cvsroot/src/sys/arch/macppc/dev/dbcool_ki2c.c,v
retrieving revision 1.2
diff -u -p -r1.2 dbcool_ki2c.c
--- dbcool_ki2c.c       9 Oct 2008 03:11:29 -0000       1.2
+++ dbcool_ki2c.c       11 Oct 2008 22:24:48 -0000
@@ -82,7 +82,7 @@ dbcool_ki2c_attach(device_t parent, devi
       aprint_naive("\n");

       sc->sc_tag = ka->ka_tag;
-       sc->sc_addr = ka->ka_addr & 0xfe;
+       sc->sc_addr = (ka->ka_addr >> 2) & 0x7f;
-------------------------------------^^^^
       if (dbcool_chip_ident(sc) < 0) {
               aprint_error_dev(self, "Unrecognized dbCool chip - "
                                       "set-up aborted\n");

The above patch is definitely not correct! Where I've indicated, please change '>> 2' to '>> 1' - we only need to shift by one bit, not two!


----------------------------------------------------------------------
|   Paul Goyette   | PGP DSS Key fingerprint: |  E-mail addresses:   |
| Customer Service | FA29 0E3B 35AF E8AE 6651 |  paul%whooppee.com@localhost   |
| Network Engineer | 0786 F758 55DE 53BA 7731 | pgoyette%juniper.net@localhost |
----------------------------------------------------------------------


Home | Main Index | Thread Index | Old Index