Josh Boyer wrote:
> On Thu, 2008-08-21 at 12:21 -0400, Steven A. Falco wrote:
>> The following patch enables building the I2C driver for 4xx chips.
>> Tested on a Sequoia board.  Comments invited.
>>
>> Signed-off-by: Steven A. Falco <[EMAIL PROTECTED]>
>> ---
>>  drivers/i2c/busses/Kconfig      |    7 +++++++
>>  drivers/i2c/busses/i2c-ibm_of.c |    5 ++---
>>  2 files changed, 9 insertions(+), 3 deletions(-)
> 
> That file doesn't even exist in the mainline kernel:
> 
> [EMAIL PROTECTED] linux-2.6]$ find drivers/i2c/ -name *ibm*
> drivers/i2c/busses/i2c-ibm_iic.c
> drivers/i2c/busses/i2c-ibm_iic.h
> [EMAIL PROTECTED] linux-2.6]$ 
> 
> josh
> 
> 

Interesting.  Ok - I found the problem with the driver you *did* find:

diff --git a/drivers/i2c/busses/i2c-ibm_iic.c b/drivers/i2c/busses/i2c-ibm_iic.c
index 85dbf34..569161d 100644
--- a/drivers/i2c/busses/i2c-ibm_iic.c
+++ b/drivers/i2c/busses/i2c-ibm_iic.c
@@ -989,6 +989,7 @@ static int __devexit iic_remove(struct of_device *ofdev)
 static const struct of_device_id ibm_iic_match[] = {
        { .compatible = "ibm,iic-405ex", },
        { .compatible = "ibm,iic-405gp", },
+       { .compatible = "ibm,iic-440epx", },
        { .compatible = "ibm,iic-440gp", },
        { .compatible = "ibm,iic-440gpx", },
        { .compatible = "ibm,iic-440grx", },

However, while the i2c-ibm_of.c driver works with the sequoia .dts,
i2c-ibm_iic.c does not, because it is looking for an "index" property,
which is not in the .dts file.  I added one:

diff --git a/arch/powerpc/boot/dts/sequoia.dts 
b/arch/powerpc/boot/dts/sequoia.dts
index 72d6756..538aadb 100644
--- a/arch/powerpc/boot/dts/sequoia.dts
+++ b/arch/powerpc/boot/dts/sequoia.dts
@@ -248,6 +248,7 @@
                                reg = <ef600700 14>;
                                interrupt-parent = <&UIC0>;
                                interrupts = <2 4>;
+                               index = <0>;
                        };
 
                        IIC1: [EMAIL PROTECTED] {
@@ -255,6 +256,7 @@
                                reg = <ef600800 14>;
                                interrupt-parent = <&UIC0>;
                                interrupts = <7 4>;
+                               index = <1>;
                        };
 
                        ZMII0: [EMAIL PROTECTED] {

However, something is still not right.  Using the mystery i2c-ibm_of.c
driver, I get:

i2c /dev entries driver
IBM IIC driver v2.1
m41t80_probe called
rtc-m41t80 0-0068: chip found, driver version 0.05
rtc-m41t80 0-0068: rtc core: registered m41t80 as rtc0
ibm-iic(/plb/opb/[EMAIL PROTECTED]): using standard (100 kHz) mode
ibm-iic(/plb/opb/[EMAIL PROTECTED]): using standard (100 kHz) mode

But with the i2c-ibm_iic.c driver, I get:

i2c /dev entries driver
ibm-iic 1ef600700.i2c: using standard (100 kHz) mode
ibm-iic 1ef600800.i2c: using standard (100 kHz) mode

I.e. it doesn't find the rtc (which I added to my sequoia board).

        Steve
_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev

Reply via email to