linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* IBM ocp I2C circular dependency
@ 2002-05-07 13:02 Kenneth Johansson
  2002-05-07 14:04 ` Allen Curtis
  2002-05-07 16:16 ` andrew may
  0 siblings, 2 replies; 7+ messages in thread
From: Kenneth Johansson @ 2002-05-07 13:02 UTC (permalink / raw)
  To: linuxppc-embedded; +Cc: kuster, acmay


i2c-adap-ibm_ocp.c uses
	i2c_iic_add_bus and i2c_iic_del_bus from i2c-algo-ibm_ocp.c

i2c-algo-ibm_ocp.c uses
	iic_ibmocp_waitforpin from i2c-adap-ibm_ocp.c

This makes it impossible to build as a module. I'am not shure how you want to
solv this.

Also I found a problem with the code when I access a i2c memory from
userspace and no chip is present at that address. After that it's not
possible to access anything else on the I2C bus. Works OK as long as I use
addresses that have a device that answers (I think).


--
Kenneth Johansson
Ericsson AB                       Tel: +46 8 404 71 83
Borgafjordsgatan 9                Fax: +46 8 404 72 72
164 80 Stockholm                  kenneth.johansson@etx.ericsson.se

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: IBM ocp I2C circular dependency
  2002-05-07 13:02 IBM ocp I2C circular dependency Kenneth Johansson
@ 2002-05-07 14:04 ` Allen Curtis
  2002-05-07 15:05   ` Kenneth Johansson
  2002-05-07 15:19   ` Armin
  2002-05-07 16:16 ` andrew may
  1 sibling, 2 replies; 7+ messages in thread
From: Allen Curtis @ 2002-05-07 14:04 UTC (permalink / raw)
  To: Kenneth Johansson, linuxppc-embedded; +Cc: kuster, acmay


I can not speak toward the modularization issue but if the i2c is anything
like the old 8260 version, change the interruptible_sleep_on() to
interruptible_sleep_on_timeout(). IMHO this is the easiest fix.

-----Original Message-----
From: owner-linuxppc-embedded@lists.linuxppc.org
[mailto:owner-linuxppc-embedded@lists.linuxppc.org]On Behalf Of Kenneth
Johansson
Sent: Tuesday, May 07, 2002 6:02 AM
To: linuxppc-embedded@lists.linuxppc.org
Cc: kuster@pacbell.net; acmay@acmay.homeip.ne
Subject: IBM ocp I2C circular dependency



i2c-adap-ibm_ocp.c uses
	i2c_iic_add_bus and i2c_iic_del_bus from i2c-algo-ibm_ocp.c

i2c-algo-ibm_ocp.c uses
	iic_ibmocp_waitforpin from i2c-adap-ibm_ocp.c

This makes it impossible to build as a module. I'am not shure how you want
to
solv this.

Also I found a problem with the code when I access a i2c memory from
userspace and no chip is present at that address. After that it's not
possible to access anything else on the I2C bus. Works OK as long as I use
addresses that have a device that answers (I think).


--
Kenneth Johansson
Ericsson AB                       Tel: +46 8 404 71 83
Borgafjordsgatan 9                Fax: +46 8 404 72 72
164 80 Stockholm                  kenneth.johansson@etx.ericsson.se


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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: IBM ocp I2C circular dependency
  2002-05-07 14:04 ` Allen Curtis
@ 2002-05-07 15:05   ` Kenneth Johansson
  2002-05-07 15:10     ` Allen Curtis
  2002-05-07 15:19   ` Armin
  1 sibling, 1 reply; 7+ messages in thread
From: Kenneth Johansson @ 2002-05-07 15:05 UTC (permalink / raw)
  To: acurtis; +Cc: linuxppc-embedded


Would that kind of problem not hang the process?? I don't see that.

Allen Curtis wrote:
>
> I can not speak toward the modularization issue but if the i2c is anything
> like the old 8260 version, change the interruptible_sleep_on() to
> interruptible_sleep_on_timeout(). IMHO this is the easiest fix.
>
> -----Original Message-----
> [mailto:owner-linuxppc-embedded@lists.linuxppc.org]On Behalf Of Kenneth
> Johansson
> Also I found a problem with the code when I access a i2c memory from
> userspace and no chip is present at that address. After that it's not
> possible to access anything else on the I2C bus. Works OK as long as I use
> addresses that have a device that answers (I think).
>

--
Kenneth Johansson
Ericsson AB                       Tel: +46 8 404 71 83
Borgafjordsgatan 9                Fax: +46 8 404 72 72
164 80 Stockholm                  kenneth.johansson@etx.ericsson.se

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: IBM ocp I2C circular dependency
  2002-05-07 15:05   ` Kenneth Johansson
@ 2002-05-07 15:10     ` Allen Curtis
  0 siblings, 0 replies; 7+ messages in thread
From: Allen Curtis @ 2002-05-07 15:10 UTC (permalink / raw)
  To: Kenneth Johansson; +Cc: linuxppc-embedded


The problem I have, but our source is very old, is that it hung the process.
Implementing a timeout is half of the solution. The other thing you need to
do is issue a STOP_TX command to the CP. (allow the CP to continue to the
next request) Perhaps that is what you are seeing? Check the buffer
descriptors and see if the CP is still "busy" with the current descriptor
pointer.

-----Original Message-----
From: innkeon@etx.ericsson.se [mailto:innkeon@etx.ericsson.se]On Behalf
Of Kenneth Johansson
Sent: Tuesday, May 07, 2002 8:05 AM
To: acurtis@onz.com
Cc: linuxppc-embedded@lists.linuxppc.org
Subject: Re: IBM ocp I2C circular dependency


Would that kind of problem not hang the process?? I don't see that.

Allen Curtis wrote:
>
> I can not speak toward the modularization issue but if the i2c is anything
> like the old 8260 version, change the interruptible_sleep_on() to
> interruptible_sleep_on_timeout(). IMHO this is the easiest fix.
>
> -----Original Message-----
> [mailto:owner-linuxppc-embedded@lists.linuxppc.org]On Behalf Of Kenneth
> Johansson
> Also I found a problem with the code when I access a i2c memory from
> userspace and no chip is present at that address. After that it's not
> possible to access anything else on the I2C bus. Works OK as long as I use
> addresses that have a device that answers (I think).
>

--
Kenneth Johansson
Ericsson AB                       Tel: +46 8 404 71 83
Borgafjordsgatan 9                Fax: +46 8 404 72 72
164 80 Stockholm                  kenneth.johansson@etx.ericsson.se


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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: IBM ocp I2C circular dependency
  2002-05-07 14:04 ` Allen Curtis
  2002-05-07 15:05   ` Kenneth Johansson
@ 2002-05-07 15:19   ` Armin
  1 sibling, 0 replies; 7+ messages in thread
From: Armin @ 2002-05-07 15:19 UTC (permalink / raw)
  To: acurtis; +Cc: Kenneth Johansson, linuxppc-embedded, kuster, acmay


Allen Curtis wrote:
> I can not speak toward the modularization issue but if the i2c is anything
> like the old 8260 version, change the interruptible_sleep_on() to
> interruptible_sleep_on_timeout(). IMHO this is the easiest fix.
>
>
> i2c-adap-ibm_ocp.c uses
> 	i2c_iic_add_bus and i2c_iic_del_bus from i2c-algo-ibm_ocp.c
>
> i2c-algo-ibm_ocp.c uses
> 	iic_ibmocp_waitforpin from i2c-adap-ibm_ocp.c
>
> This makes it impossible to build as a module. I'am not shure how you want
> to
> solv this.
>
> Also I found a problem with the code when I access a i2c memory from
> userspace and no chip is present at that address. After that it's not
> possible to access anything else on the I2C bus. Works OK as long as I use
> addresses that have a device that answers (I think).
>

Thanks,  I like easy

armin


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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: IBM ocp I2C circular dependency
  2002-05-07 13:02 IBM ocp I2C circular dependency Kenneth Johansson
  2002-05-07 14:04 ` Allen Curtis
@ 2002-05-07 16:16 ` andrew may
  2002-05-07 16:42   ` Kenneth Johansson
  1 sibling, 1 reply; 7+ messages in thread
From: andrew may @ 2002-05-07 16:16 UTC (permalink / raw)
  To: Kenneth Johansson; +Cc: linuxppc-embedded, kuster, acmay


On Tue, May 07, 2002 at 03:02:04PM +0200, Kenneth Johansson wrote:
> Also I found a problem with the code when I access a i2c memory from
> userspace and no chip is present at that address. After that it's not
> possible to access anything else on the I2C bus. Works OK as long as I use
> addresses that have a device that answers (I think).

There is a suprising lack of copy to/from user functions in the i2c
code. This may be part of the problem but I think it needs to be fixed
more in the core code rather than each driver.

The driver should not support "Quick" 0 len transfers, I am not sure how
it handles them now. This may be another problem.

ps you forgot a "t" in .net.

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: IBM ocp I2C circular dependency
  2002-05-07 16:16 ` andrew may
@ 2002-05-07 16:42   ` Kenneth Johansson
  0 siblings, 0 replies; 7+ messages in thread
From: Kenneth Johansson @ 2002-05-07 16:42 UTC (permalink / raw)
  To: andrew may; +Cc: linuxppc-embedded


andrew may wrote:
> ps you forgot a "t" in .net.

and the a in Armin's email. At least I got the mailinglist right :)

--
Kenneth Johansson
Ericsson AB                       Tel: +46 8 404 71 83
Borgafjordsgatan 9                Fax: +46 8 404 72 72
164 80 Stockholm                  kenneth.johansson@etx.ericsson.se

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2002-05-07 16:42 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-05-07 13:02 IBM ocp I2C circular dependency Kenneth Johansson
2002-05-07 14:04 ` Allen Curtis
2002-05-07 15:05   ` Kenneth Johansson
2002-05-07 15:10     ` Allen Curtis
2002-05-07 15:19   ` Armin
2002-05-07 16:16 ` andrew may
2002-05-07 16:42   ` Kenneth Johansson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).