Subject: [PATCH] via-cuda (CUDA_COMBINED_FORMAT_IIC)

From: "Iain Sandoe" <[email-masked]>
Date: Wed, 30 Aug 2000 00:53:09 +0100

hi,

Attached are:

1/ a patch that adds CUDA_COMBINED_FORMAT_IIC support (at the moment to
2.2.17 - although it should go into 2.4.0 relatively easily).  This allows
you to dump the contents of things on the i2c bus (where it is supported)
using via-cuda.

This has meant a modification of the cuda state machine, in the process I've
made it a bit more paranoid about passed params & buffer overflows etc.

This release has an amount of (ifdef'd) debugging printks that will be
removed if no-one reports any serious problems.

files patched:
   drivers/macintosh/via-cuda.c
   include/asm-ppc/adb.h
   include/asm-ppc/cuda.h

It also adds support for using cuda adb in xmon for 2.2.x (separate patch to
follow) - this is already done in 2.4.0.

2/  a small code fragment showing the use of the COMBINED_FORMAT_IIC command
(you *must* set the adb request reply length to limit what you want back -
since the cuda does not seem to stop sending voluntarily).

3/ the output of this when run on my G3-beige.

Unfortunately, the one chip I *really* want to probe (the TDA7433 on the
audio card -  i2c address 0x8a) doesn't seem to give a proper response... so
if anyone knows more about this - I'd be interested.

Patches against linuxcare linux-pmac-benh as of approx. 00:00 BST
29/09/2000.
Should be equally OK against linux-pmac-stable.

I'll post them on sourceforge linuxppc & update my web page later...

Iain.