Skip to contentSkip to conversation

IBM OCP I2C

PATCH In review andrew may 1 participant 2 messages Apr 29, 2002 – Apr 30, 2002 1 message not in the archive

lore
Share & tools
lore

andrew may

author
#0 lore raw

PATCH 1/1 IBM OCP I2C

This is incremental to the other patches I posted. It gets the iic_xfer that is based of the ppcboot code working. The return values are still not correct but the data is transfered ok for what I have tested. I do not try to do a Repeated Start for anything yet either.

If anyone has any comments or more test conditions I would like to hear them.

I pulled some defines from the PPCBoot code and I am not sure the correct header file for them.

I would like to dump the iic_outb/inb as well. In the iic_xfer I use readb/writeb directly without problems.

I put this comment in there about the driver. Does any see anything wrong with this?
/*
* Limits of the IBM OCP I2C driver.
* There is no way to do lenght 0 transfers since iic->cntl TCT==00 means 1 byte
* We can not handle I2C_M_NOSTART since there is no way to put just one bit
* on the bus after a NA.
* We can not handle I2C_M_REV_DIR_ADDR since the Rd/Wr bit is not
* set directly in the address register and the controller uses the
* Rd/Wr bit in the CNTL reg to know what to do.
*
* If you need to get around any of these I suggest you setup i2c-adap-ibm...
* to use the algo-bit and provide functions to use the DirectControl Reg of
* the IBM OCP hardware.
*/

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

author
#2 lore raw
In reply to a message not in the archive
Quoted 4 lines · Armin

Please send me that patch, I am in the middle of a major restructuring and any suggestions from you are welcome. As soon as I am comfortable with what i have , I will send you a preview. The other patchs I have put on hold until I get what I have working.

Always forget the attachments, sorry.