SPI + SCC problem
Yes, I have enabled it, but it makes no difference.
Is this a bug ?
Quoted 40 lines
----- Original Message -----
From: "Wolfgang Denk" <[email protected]>
To: "Yigit Can" <[email protected]>
Cc: <[email protected]>
Sent: Friday, June 27, 2003 5:26 PM
Subject: Re: [U-Boot-Users] SPI + SCC problemQuoted 31 lines
Quoted 7 lines · In message <008c01c33cb2$613a6cd0$3002a8c0@yigitcan> you wrote:
but when I use the SPI driver with Tqm850L (configured as SCC2 by default ) it does not receive any byte. The problem i found is the SCC controllers
when i select SCC1 from make menu screen my driver works but ethernet fails.
I must use ethernet for my applications.Did you enable the uCode patch?
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: wd at denx.de
Q: How do you spell "onomatopoeia"?
A: The way it sounds.-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner. Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission! INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
_______________________________________________
U-Boot-Users mailing list
U-Boot-Users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users
Quoted 3 lines · In message <005901c33ed6$453cc5c0$3002a8c0@yigitcan> you wrote:
Yes, I have enabled it, but it makes no difference.
Is this a bug ?
If you cannot receive data it is _obviously_ a bug. The question is _where_ the bug is.
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
but when I use the SPI driver with Tqm850L (configured as SCC2 by default ) it does not receive any byte. The problem i found is the SCC
Are you sure your SPI device is actually sending data? Can you see the data on the wire when you attach a LA / oscilloscope?
Best regards,
Wolfgang Denk
Signature · 4 lines
Software Engineering: Embedded and Realtime Systems, Embedded Linux Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: wd at denx.de You're dead, Jim. -- McCoy, "Amok Time", stardate 3372.7
Yes, I attach an oscilloscope and I can see it sends the data properly
in addition to this problem,
the drivers ONLY work with SCC1, choosing the other SCCs or disabling the SCC ethernet makes no difference.
Best regards,
Yigit Can
----- Original Message -----
From: "Wolfgang Denk" <[email protected]>
To: "Yigit Can" <[email protected]>
Cc: <[email protected]>
Sent: Monday, June 30, 2003 11:05 AM
Subject: Re: Re : [U-Boot-Users] SPI + SCC problem
Quoted 10 lines
Quoted 3 lines · In message <005901c33ed6$453cc5c0$3002a8c0@yigitcan> you wrote:
Yes, I have enabled it, but it makes no difference.
Is this a bug ?If you cannot receive data it is _obviously_ a bug. The question is _where_ the bug is.
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
but when I use the SPI driver with Tqm850L (configured as SCC2 by default ) it does not receive any byte. The problem i found is the
SCC
Quoted 14 lines
Are you sure your SPI device is actually sending data? Can you see the data on the wire when you attach a LA / oscilloscope?
Best regards,
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: wd at denx.de You're dead, Jim.
-- McCoy, "Amok Time", stardate 3372.7
Quoted 5 lines · In message <007c01c33ee0$3f4c3060$3002a8c0@yigitcan> you wrote:
Yes, I attach an oscilloscope and I can see it sends the data properly
in addition to this problem,
the drivers ONLY work with SCC1, choosing the other SCCs or disabling the SCC ethernet makes no difference.
I lost you here. Which driver work only with SCC1?
We have been using the SPI driver in several projects on different hardware, and did not notice any problems.
Did you check for possible conflicts in the usage of port pins?
Best regards,
Wolfgang Denk
Signature · 4 lines
Software Engineering: Embedded and Realtime Systems, Embedded Linux Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: wd at denx.de Philosophy is a game with objectives and no rules. Mathematics is a game with rules and no objectives.
I use 3 different drivers,
I'm using standard TQ850L_config in kernel (eldk 2.0.2)
first one comes with eldk I only made a small modification to compile with TQM850L.
second is an interrupt driven driver working with TQM862L (I have verified it)
and I wrote the last one using 850 user-manual to be sure.
All has the same problem when I choose SCC1 they work perfectly ,but when I choose the other SCCs or disable the SCC ethernet,
they send data but they stall while receiving becouse the buffer descriptor cbd_sc register does not change (rx_bdf->cbd_sc).
Best regards,
Yigit Can
----- Original Message -----
From: "Wolfgang Denk" <[email protected]>
To: "Yigit Can" <[email protected]>
Cc: <[email protected]>
Sent: Monday, June 30, 2003 11:53 AM
Subject: Re: [U-Boot-Users] SPI + SCC problem
Quoted 5 lines
Quoted 4 lines · In message <007c01c33ee0$3f4c3060$3002a8c0@yigitcan> you wrote:
Yes, I attach an oscilloscope and I can see it sends the data properly
in addition to this problem,
the drivers ONLY work with SCC1, choosing the other SCCs or disabling
the
Quoted 19 lines
Quoted 1 line
SCC ethernet makes no difference.
I lost you here. Which driver work only with SCC1?
We have been using the SPI driver in several projects on different hardware, and did not notice any problems.
Did you check for possible conflicts in the usage of port pins?
Best regards,
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: wd at denx.de Philosophy is a game with objectives and no rules. Mathematics is a game with rules and no objectives.
Quoted 1 line · In message <001901c33ee7$214ae5f0$3002a8c0@yigitcan> you wrote:
I use 3 different drivers,
Arrrgghh. Please don't let my guess what sort of drivers these are.
Ethernet? UART? HDLC? SPI? Or what?
Quoted 1 line
I'm using standard
TQ850L_configin kernel (eldk 2.0.2)
...which works fine.
Quoted 2 lines
first one comes with eldk I only made a small modification to compile with TQM850L.
OK, so what exactly did you change, and why?
Quoted 9 lines
second is an interrupt driven driver working with TQM862L (I have verified it)
and I wrote the last one using 850 user-manual to be sure.
All has the same problem when I choose SCC1 they work perfectly ,but when I choose the other SCCs or disable the SCC ethernet,
they send data but they stall while receiving becouse the buffer descriptorcbd_scregister does not change (rx_bdf->cbd_sc).
You mentiones SPI before, but now you talk about using SCC1 - this makes no sense to me.
Wolfgang Denk
Signature · 4 lines
Software Engineering: Embedded and Realtime Systems, Embedded Linux Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: wd at denx.de You can love it, change it, or leave it. There is NO other option. But do not complain - it is your own choice... -- wd
Oops I'm sorry,
all of the drivers are for SPI,
I have changed the driver which comes with eldk to compile with TQM850L.
this driver's header contains a #define statement for a specific module, and I have changed it.
secondly I have changed the chip select statements.
Best regards,
Yigit Can
PS : I attached another code that I use.
I'm compiling this code with the kernel, it works with SCC1 enabled and it does not work with SCC2, SCC3 or with disabled SCC ethernet.
----- Original Message -----
From: "Wolfgang Denk" <[email protected]>
To: "Yigit Can" <[email protected]>
Cc: <[email protected]>
Sent: Monday, June 30, 2003 12:17 PM
Subject: Re: [U-Boot-Users] SPI + SCC problem
Quoted 12 lines
Quoted 1 line · In message <001901c33ee7$214ae5f0$3002a8c0@yigitcan> you wrote:
I use 3 different drivers,
Arrrgghh. Please don't let my guess what sort of drivers these are.
Ethernet? UART? HDLC? SPI? Or what?
Quoted 1 line
I'm using standard
TQ850L_configin kernel (eldk 2.0.2)...which works fine.
Quoted 1 line
first one comes with eldk I only made a small modification to compile
with
Quoted 5 lines
Quoted 1 line
TQM850L.
OK, so what exactly did you change, and why?
Quoted 1 line
second is an interrupt driven driver working with TQM862L (I have
verified
Quoted 5 lines
Quoted 5 lines
it)
and I wrote the last one using 850 user-manual to be sure.
All has the same problem when I choose SCC1 they work perfectly ,but
when I
Quoted 2 lines
Quoted 2 lines
choose the other SCCs or disable the SCC ethernet, they send data but they stall while receiving becouse the buffer
descriptor
Quoted 16 lines
Quoted 1 line
cbd_scregister does not change (rx_bdf->cbd_sc).You mentiones SPI before, but now you talk about using SCC1 - this makes no sense to me.
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: wd at denx.de
You can love it, change it, or leave it. There is NO other option.
But do not complain - it is your own choice... -- wd
Quoted 9 lines
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01
_______________________________________________
U-Boot-Users mailing list
U-Boot-Users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cpm_spi.c
Type: application/octet-stream
Size: 20465 bytes
Desc: not available
Url : http://lists.denx.de/pipermail/u-boot/attachments/20030630/1370a9f9/attachment.obj
Quoted 2 lines · In message <002e01c33ef0$8627e320$3002a8c0@yigitcan> you wrote:
all of the drivers are for SPI,
...
Quoted 2 lines
I'm compiling this code with the kernel, it works with SCC1 enabled and it does not work with SCC2, SCC3 or with disabled SCC ethernet.
"SCC1 enabled" means SCC1 configured for ethernet?
I bet a cse of beer that this is probalem caused by missing / wrong uCode patch. Especially to run SPI in combination with ethernet on SCC2 you MUST use the I2C/SPI Microcode Patch.
Please note that there is a new version of this patch on Motorola's web page, which is known to fix a couple of (sometimes very strange) problems. This new patch has not yer found a way into the kernel (we are working on this, but it is a bit complicated since you need different patches depending on CPU type [823/850/860]; it will be available with the next version of the ELDK).
I suggest you fetch this current uCode patch and try using this.
Best regards,
Wolfgang Denk
Signature · 3 lines
Software Engineering: Embedded and Realtime Systems, Embedded Linux Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: wd at denx.de A failure will not appear until a unit has passed final inspection.
Quoted 6 lines
Please note that there is a new version of this patch on Motorola's web page, which is known to fix a couple of (sometimes very strange) problems. This new patch has not yer found a way into the kernel (we are working on this, but it is a bit complicated since you need different patches depending on CPU type [823/850/860]; it will be available with the next version of the ELDK).
hmm, what new version are you referring to? I can only find:
MPC860 Microcode Patch for Relocating I2C/SPI Parameters (03/06/2002), version 1.3
I think this is the one that is in linuxppc_2_4_devel, is it not?
Jocke
Quoted 6 lines · In message <[email protected]> you…
hmm, what new version are you referring to? I can only find:
MPC860 Microcode Patch for Relocating I2C/SPI Parameters (03/06/2002), version 1.3I think this is the one that is in
linuxppc_2_4_devel, is it not?
I don't remember which version is in linuxppc_2_4_devel, but if it is this one, then you will need a different one for a MPC850 CPU.
Best regards,
Wolfgang Denk
Signature · 5 lines
Software Engineering: Embedded and Realtime Systems, Embedded Linux Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: wd at denx.de Lots of people drink from the wrong bottle sometimes. -- Edith Keeler, "The City on the Edge of Forever", stardate unknown
Quoted 10 lines
Quoted 6 lines · In message <[email protected]> you…
hmm, what new version are you referring to? I can only find:
MPC860 Microcode Patch for Relocating I2C/SPI Parameters (03/06/2002), version 1.3I think this is the one that is in
linuxppc_2_4_devel, is it not?I don't remember which version is in
linuxppc_2_4_devel, but if it is this one, then you will need a different one for a MPC850 CPU.
hmm, they look the same to me:
MPC850 Microcode Patch for Relocating I2C/SPI Parameters (06/10/2002), version 1.3
After a quick look inside the zip file, they still look the same.
Jocke
Quoted 4 lines · In message <[email protected]> you…
hmm, they look the same to me:
MPC850 Microcode Patch for Relocating I2C/SPI Parameters (06/10/2002), version 1.3
No, they are fdifferent:
Using MPC850MC2.zip and MPC860MC05.zip (both 01/22/2002) I get:
smc_spi_860.c 2002-01-21 16:29:38.000000000 +0100 renamed from smc_spi_850.c 2002-01-21 16:27:10.000000000 +0100 +1 -1
@@ -170,7 +170,7 @@ 0xFB18AD2E, 0x1EA9BBB8, 0x74283B7E, -0x73C2E4BB, +0x7375E4BB, 0x2ADA4FB8, 0xDC21E4BB, 0xB2A1FFBF,
Using MPC850MC1.zip (06/10/2002) and MPC860MC04.zip (03/06/2002) I get:
860_i2c_spi.c 2000-05-05 14:35:52.000000000 +0200 renamed from 850_i2c_spi.c 2000-05-10 15:05:10.000000000 +0200 +3 -3
@@ -17,11 +17,11 @@ *((unsigned long *)0x0220203c) = 0xfdaff9cf; *((unsigned long *)0x02202040) = 0xabf88dc8; *((unsigned long *)0x02202044) = 0xab5879f7; - *((unsigned long *)0x02202048) = 0xb0926a27; + *((unsigned long *)0x02202048) = 0xb0927383; *((unsigned long *)0x0220204c) = 0xdfd079f7; *((unsigned long *)0x02202050) = 0xb090e6bb; *((unsigned long *)0x02202054) = 0xe5bbe74f; - *((unsigned long *)0x02202058) = 0xaa616f0f; + *((unsigned long *)0x02202058) = 0xb3fa6f0f; *((unsigned long *)0x0220205c) = 0x6ffb76ce; *((unsigned long *)0x02202060) = 0xee0cf9cf; *((unsigned long *)0x02202064) = 0x2bfbefef;
@@ -77,7 +77,7 @@ *((unsigned long *)0x0220212c) = 0x5f73e522; *((unsigned long *)0x02202130) = 0xefde5f73; *((unsigned long *)0x02202134) = 0xcfda0b61; - *((unsigned long *)0x02202138) = 0x6a29df61; + *((unsigned long *)0x02202138) = 0x7385df61; *((unsigned long *)0x0220213c) = 0xe7c9edf9; *((unsigned long *)0x02202140) = 0x7e9a30d5; *((unsigned long *)0x02202144) = 0x1458bfff;
The differences are small, but nobody was willing/able to explain details. I don't know if you can access these, but if you can please see also Moto helpline "Service Requests" 1-54379501 ("I2C/SPI relocation ucode") and 1-54027957 ("I2C/SPI/SMC MicroCode Patch for MPC823E").
Best regards,
Wolfgang Denk
Signature · 3 lines
Software Engineering: Embedded and Realtime Systems, Embedded Linux Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: wd at denx.de It is much easier to suggest solutions when you know nothing
Quoted 5 lines
The differences are small, but nobody was willing/able to explain details. I don't know if you can access these, but if you can please see also Moto helpline "Service Requests" 1-54379501 ("I2C/SPI relocation ucode") and 1-54027957 ("I2C/SPI/SMC MicroCode Patch for MPC823E").
No I can not access these "Service Requests", only my own :( However, I have asked my Motorla contact about this. Lets see what he can find out.
Jocke