linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* MPC860 and I2C
@ 2003-05-08 19:04 Eitan Rabin
  2003-05-08 21:19 ` Joakim Tjernlund
  0 siblings, 1 reply; 6+ messages in thread
From: Eitan Rabin @ 2003-05-08 19:04 UTC (permalink / raw)
  To: linuxppc-embedded


Hi All,

I'm trying to use the MPC I2C controller to generate I2C transactions. I
use  the devel kernel version and include the I2C relocation patch (seen
in /var/log/messages).

I used the standard I2C driver and also tried the driver downloaded
directly from lmsensors.

The problem occurs when I activate the master. As soon as I give the
master the start command (i2c->i2c_i2com = 0x80) for the DMA transaction
to start the CPU complete freezes.
I narrowed the problem and found out the it is actually the address of the
descriptor the one causing the CPU to hang. If I give addresses that are
relatively small, few Kilos, then everything is OK. If I give addresses
that are given to me by kmalloc and translated properly then the cpu
hangs.

It seems to me that maybe something is wrong with the SDMA
configuration.

The cards I'm using are CLLF from embedded planet.


Any assistance will be highly appreciated.

Thanks.

Eitan.


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

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

* RE: MPC860 and I2C
@ 2003-05-08 19:18 Steven Blakeslee
  2003-05-08 19:20 ` Eitan Rabin
  0 siblings, 1 reply; 6+ messages in thread
From: Steven Blakeslee @ 2003-05-08 19:18 UTC (permalink / raw)
  To: 'Eitan Rabin', linuxppc-embedded


Are you sure you need to use the relocation patch?

-----Original Message-----
From: Eitan Rabin [mailto:rabin@mellanox.co.il]
Sent: Thursday, May 08, 2003 3:04 PM
To: linuxppc-embedded@lists.linuxppc.org
Subject: MPC860 and I2C



Hi All,

I'm trying to use the MPC I2C controller to generate I2C transactions. I
use  the devel kernel version and include the I2C relocation patch (seen
in /var/log/messages).

I used the standard I2C driver and also tried the driver downloaded
directly from lmsensors.

The problem occurs when I activate the master. As soon as I give the
master the start command (i2c->i2c_i2com = 0x80) for the DMA transaction
to start the CPU complete freezes.
I narrowed the problem and found out the it is actually the address of the
descriptor the one causing the CPU to hang. If I give addresses that are
relatively small, few Kilos, then everything is OK. If I give addresses
that are given to me by kmalloc and translated properly then the cpu
hangs.

It seems to me that maybe something is wrong with the SDMA
configuration.

The cards I'm using are CLLF from embedded planet.


Any assistance will be highly appreciated.

Thanks.

Eitan.


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

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

* RE: MPC860 and I2C
  2003-05-08 19:18 MPC860 and I2C Steven Blakeslee
@ 2003-05-08 19:20 ` Eitan Rabin
  2003-05-08 21:24   ` Joakim Tjernlund
  0 siblings, 1 reply; 6+ messages in thread
From: Eitan Rabin @ 2003-05-08 19:20 UTC (permalink / raw)
  To: Steven Blakeslee; +Cc: linuxppc-embedded


The version of CPU I has requires the patch to solve the conflict  between
the ram parameters of I2C/SPI and those of Ethernet. I checked my version
against the errata at Motorola's website and it is required.

If I don't use the relocation then the command has not effect. If I use the
patch then there are i2c transaction being generated but I can only use
certain addresses.

Any advice will be appreciated.

Thanks.

Eitan






On Thu, 8 May 2003, Steven Blakeslee wrote:

> Are you sure you need to use the relocation patch?
>
> -----Original Message-----
> From: Eitan Rabin [mailto:rabin@mellanox.co.il]
> Sent: Thursday, May 08, 2003 3:04 PM
> To: linuxppc-embedded@lists.linuxppc.org
> Subject: MPC860 and I2C
>
>
>
> Hi All,
>
> I'm trying to use the MPC I2C controller to generate I2C transactions. I
> use  the devel kernel version and include the I2C relocation patch (seen
> in /var/log/messages).
>
> I used the standard I2C driver and also tried the driver downloaded
> directly from lmsensors.
>
> The problem occurs when I activate the master. As soon as I give the
> master the start command (i2c->i2c_i2com = 0x80) for the DMA transaction
> to start the CPU complete freezes.
> I narrowed the problem and found out the it is actually the address of the
> descriptor the one causing the CPU to hang. If I give addresses that are
> relatively small, few Kilos, then everything is OK. If I give addresses
> that are given to me by kmalloc and translated properly then the cpu
> hangs.
>
> It seems to me that maybe something is wrong with the SDMA
> configuration.
>
> The cards I'm using are CLLF from embedded planet.
>
>
> Any assistance will be highly appreciated.
>
> Thanks.
>
> Eitan.
>
>
>


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

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

* Re: MPC860 and I2C
  2003-05-08 19:04 Eitan Rabin
@ 2003-05-08 21:19 ` Joakim Tjernlund
  0 siblings, 0 replies; 6+ messages in thread
From: Joakim Tjernlund @ 2003-05-08 21:19 UTC (permalink / raw)
  To: Eitan Rabin, linuxppc-embedded


> Hi All,
>
> I'm trying to use the MPC I2C controller to generate I2C transactions. I
> use  the devel kernel version and include the I2C relocation patch (seen
> in /var/log/messages).

Can you post the message it prints?

>
> I used the standard I2C driver and also tried the driver downloaded
> directly from lmsensors.
>
> The problem occurs when I activate the master. As soon as I give the
> master the start command (i2c->i2c_i2com = 0x80) for the DMA transaction
> to start the CPU complete freezes.
> I narrowed the problem and found out the it is actually the address of the
> descriptor the one causing the CPU to hang. If I give addresses that are
> relatively small, few Kilos, then everything is OK. If I give addresses
> that are given to me by kmalloc and translated properly then the cpu
> hangs.

What address? Have you made any changes to the driver?
Can you post some example code?

> It seems to me that maybe something is wrong with the SDMA
> configuration.

hmm, if SDMA doesn't work as it should I think you would experience
problems with the console and ethernet.

Make sure that SDA and clock signals has a pull up resistor.

Jocke

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

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

* Re: MPC860 and I2C
  2003-05-08 19:20 ` Eitan Rabin
@ 2003-05-08 21:24   ` Joakim Tjernlund
  2003-05-08 22:17     ` Eitan Rabin
  0 siblings, 1 reply; 6+ messages in thread
From: Joakim Tjernlund @ 2003-05-08 21:24 UTC (permalink / raw)
  To: Eitan Rabin, Steven Blakeslee; +Cc: linuxppc-embedded


> The version of CPU I has requires the patch to solve the conflict  between
> the ram parameters of I2C/SPI and those of Ethernet. I checked my version
> against the errata at Motorola's website and it is required.
>
> If I don't use the relocation then the command has not effect. If I use the
> patch then there are i2c transaction being generated but I can only use
> certain addresses.
>
> Any advice will be appreciated.

What CPU revison do you have? Older CPUs than D4 has a lot of I2C bugs.
If you have an older CPU, try enabling the chip errata code in the i2c driver.

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

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

* Re: MPC860 and I2C
  2003-05-08 21:24   ` Joakim Tjernlund
@ 2003-05-08 22:17     ` Eitan Rabin
  0 siblings, 0 replies; 6+ messages in thread
From: Eitan Rabin @ 2003-05-08 22:17 UTC (permalink / raw)
  To: Joakim Tjernlund; +Cc: Steven Blakeslee, linuxppc-embedded


The message in var log messages is:

I2C uCode patch installed

I checked multiple times that the patch was applied correctly and it seems
it has. I verified that the CPM traps were set correctly as well.

The cpu version I'm using is 860PZP50D4, so I think that I should be able
to generate I2C cycles using the CPM in this version.

I tried the patch that is in the driver with the same results.

My impression is that when the SDMA channel is used for descriptors of
the I2C driver, there is a fatal error for certain address ranges. I was
looking for some general configuration that can cause such behavior by
couldn't find any.

Did someone succeeded to have this working on CLLF embeddedplanet cards
SBC860H ?

Did someone succeeded with other cards? I might need to consider using
other brands, I'll appreciate any recommendation.

Thanks

Eitan



On Thu, 8 May 2003, Joakim Tjernlund wrote:

> > The version of CPU I has requires the patch to solve the conflict  between
> > the ram parameters of I2C/SPI and those of Ethernet. I checked my version
> > against the errata at Motorola's website and it is required.
> >
> > If I don't use the relocation then the command has not effect. If I use the
> > patch then there are i2c transaction being generated but I can only use
> > certain addresses.
> >
> > Any advice will be appreciated.
>
> What CPU revison do you have? Older CPUs than D4 has a lot of I2C bugs.
> If you have an older CPU, try enabling the chip errata code in the i2c driver.
>


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

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

end of thread, other threads:[~2003-05-08 22:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-05-08 19:18 MPC860 and I2C Steven Blakeslee
2003-05-08 19:20 ` Eitan Rabin
2003-05-08 21:24   ` Joakim Tjernlund
2003-05-08 22:17     ` Eitan Rabin
  -- strict thread matches above, loose matches on Subject: below --
2003-05-08 19:04 Eitan Rabin
2003-05-08 21:19 ` Joakim Tjernlund

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).