Support for Hydra i2c

Geert Uytterhoeven Geert.Uytterhoeven at
Fri Apr 30 19:42:34 EST 1999

On Wed, 28 Apr 1999, Frodo Looijaard wrote:
> Geert Uytterhoeven wrote:
> > The attached patch adds support for the i2c interface on the Apple `Hydra' Mac
> > I/O, found on CHRP PPC motherboards. The patch is relative to the anon CVS
> > version of yesterday evening.
> Congratulations! You are the first to add support for a non-Intel 
> architecture. I am very excited by your contribution! To be honest, I did
> not even know the PPC architecture had an I2C interface. Very nice indeed!
> I will merge your code in later today, and if necessary I will send you some
> feedback on it. You may want CVS write access; it will make maintaining 

You seem to have missed these:

Index: doc/modules
RCS file: /home/cvs/lm_sensors2/doc/modules,v
retrieving revision 1.11
diff -u -r1.11 modules
--- doc/modules	1999/04/22 13:06:24	1.11
+++ doc/modules	1999/04/30 09:36:58
@@ -67,6 +67,9 @@
   SMBus emulation on i2c busses. Base algorithm, on which SMBus-only adapters
+(src/busses) i2c-hydra: algo-bit i2c-core
+  Apple Hydra Mac I/O bus access on CHRP motherboards.
 (src/busses) i2c-isa: i2c-core
   Defines the ISA bus as being a I2C adapter. It isn't, of course; but this is
   often used by sensor client modules, to keep the code small and simple.
Index: prog/dump/isadump.c
RCS file: /home/cvs/lm_sensors2/prog/dump/isadump.c,v
retrieving revision 1.3
diff -u -r1.3 isadump.c
--- prog/dump/isadump.c	1999/04/28 18:18:12	1.3
+++ prog/dump/isadump.c	1999/04/30 09:36:59
@@ -99,7 +99,7 @@
 #ifndef __powerpc__
-  if ((datareg < 0x400) && (datareg < 0x400)) {
+  if ((datareg < 0x400) && (addrreg < 0x400)) {
     if(ioperm(datareg,1,1)) {
       fprintf(stderr,"Error: Could not ioperm() data register!\n");

The last one is a typo, I assume. BTW, the ISA stuff doesn't work anyway,
because on PPC the macros inb() and outb() rely on isa_io_base pointed to the
mmap()ed ISA IO space. But I don't think that matters much: this was the `quick
fix', just removing isadump from the compile list on PPC seemed to be more
difficult :-)

A datasheet for the Hydra used to be available on the web, cfr.

 *  This file is based on the following documentation:
 *      Macintosh Technology in the Common Hardware Reference Platform
 *      Apple Computer, Inc.
 *      © Copyright 1995 Apple Computer, Inc. All rights reserved.
 *  It's available online from
 *  You can obtain paper copies of this book from computer bookstores or by
 *  writing Morgan Kaufmann Publishers, Inc., 340 Pine Street, Sixth Floor, San
 *  Francisco, CA 94104. Reference ISBN 1-55860-393-X.

but Apple removed the DNS A record for :-( Fortunately I still
have the doc on CD.

BTW, doc/busses/i2c-hydra and kernel/busses/i2c-hydra.c contain carriage
returns now.



Geert Uytterhoeven                     Geert.Uytterhoeven at
Wavelets, Linux/{m68k~Amiga,PPC~CHRP}
Department of Computer Science -- Katholieke Universiteit Leuven -- Belgium

[[ This message was sent via the linuxppc-dev mailing list.  Replies are ]]
[[ not  forced  back  to the list, so be sure to Cc linuxppc-dev if your ]]
[[ reply is of general interest. Please check ]]
[[ and for useful information before posting.   ]]

More information about the Linuxppc-dev mailing list