* [U-Boot-Users] Still trying to get a stable 2.6.20.4 running on 8349ITX evalboard
2007-04-13 17:03 ` Timur Tabi
@ 2007-04-13 18:31 ` Bruce_Leonard at selinc.com
2007-04-16 21:25 ` Benedict, Michael
2007-04-19 5:19 ` Bruce_Leonard at selinc.com
2 siblings, 0 replies; 17+ messages in thread
From: Bruce_Leonard at selinc.com @ 2007-04-13 18:31 UTC (permalink / raw)
To: u-boot
Timur,
Timur Tabi <timur@freescale.com> wrote on 04/13/2007 10:03:29 AM:
>
> Oh wait, do you have the config file that I wrote? I don't know if
> it's on the BSP. Let
> me know if you don't have it.
>
Can't seem to find and BDI config files in the BSP. Mine is pretty basic
and does no RAM/FLASH/or other CS configuration. Pretty much all it does
is hold the processor after a POR. I'm letting u-boot handle all config
operations. If you think I need more than that, please feel free to send
me your config file.
Bruce
------------------------------------------------
This e-mail may contain SEL confidential information. The opinions
expressed are not necessarily those of SEL. Any unauthorized disclosure,
distribution or other use is prohibited. If you received this e-mail in
error, please notify the sender, permanently delete it, and destroy any
printout.
Thank you.
------------------------------------------------
^ permalink raw reply [flat|nested] 17+ messages in thread
* [U-Boot-Users] Still trying to get a stable 2.6.20.4 running on 8349ITX evalboard
2007-04-13 17:03 ` Timur Tabi
2007-04-13 18:31 ` Bruce_Leonard at selinc.com
@ 2007-04-16 21:25 ` Benedict, Michael
2007-04-17 0:10 ` Bruce_Leonard at selinc.com
2007-04-19 5:19 ` Bruce_Leonard at selinc.com
2 siblings, 1 reply; 17+ messages in thread
From: Benedict, Michael @ 2007-04-16 21:25 UTC (permalink / raw)
To: u-boot
Timur Tabi wrote:
> You'll notice in spd_sdram() that not only is it really complicated,
> with dozens of if-statements, but there's quite a bit of code to
> handle various errata. In other words,
> it's not surprising (well, to me, at least) that you may have
> encountered a hardware bug of some kind. Alternatively
>
The key differences were:
DDR:timing_cfg_1=0x26242321
<snip>
DDR:sdram_mode=0x00000032
For the hard-coded RAM init / stable case and
DDR:timing_cfg_1=0x26232321
<snip>
DDR:sdram_mode=0x00000022
For the SPD RAM init / unstable case. In other words, the CASLAT
control value. In the default timing case (bus speeds are configurable
on the board) this is with a max_data_rate of 400 and ddrc_clk of 266.
Timur,
I am slightly confused about the scenario you used to develop
the hardcoded timings. The git tree from October 31 (when you commited
these definitions) did not even contain SDP support for DDR400 RAM
(unless I am not reading the code correctly). Is it possible that
I am really confused by this code. Hopefully someone can explain all
the conditionals that are causing the caslat to be decremented based on
spd.clk_cycle*. In my current configuration I could blame that
decrement by two on the difference. Any help explaining this code is
greatly appreciated.
Thank you!
Michael
^ permalink raw reply [flat|nested] 17+ messages in thread
* [U-Boot-Users] Still trying to get a stable 2.6.20.4 running on 8349ITX evalboard
2007-04-16 21:25 ` Benedict, Michael
@ 2007-04-17 0:10 ` Bruce_Leonard at selinc.com
0 siblings, 0 replies; 17+ messages in thread
From: Bruce_Leonard at selinc.com @ 2007-04-17 0:10 UTC (permalink / raw)
To: u-boot
"Benedict, Michael" <MBenedict@twacs.com> wrote on 04/16/2007 02:25:14 PM:
> >
> The key differences were:
> DDR:timing_cfg_1=0x26242321
> <snip>
> DDR:sdram_mode=0x00000032
>
> For the hard-coded RAM init / stable case and
>
> DDR:timing_cfg_1=0x26232321
> <snip>
> DDR:sdram_mode=0x00000022
>
I found the same descrepency. I'm used to SDRAM, but I'm still figuring
out DDR SDRAM (which is just enough different to be confusing ;) ) so I'm
not sure what impact the differences in timing_cfg_1 have. Working on it.
>
> I am really confused by this code. Hopefully someone can explain all
> the conditionals that are causing the caslat to be decremented based on
>
I'm right there with you, but I'm going through the code line by line
trying to figure out what it's doing. Then I'm going to post about a
thousand (well maybe only a few) specific questions. Hopefully the
answers to those will help clear up both or our confusions. I'm seeing
some really tricky stuff in here, but I'm not sure but what that tricky
stuff is what's causing our problems. Update again tomorrow.
Bruce
------------------------------------------------
This e-mail may contain SEL confidential information. The opinions
expressed are not necessarily those of SEL. Any unauthorized disclosure,
distribution or other use is prohibited. If you received this e-mail in
error, please notify the sender, permanently delete it, and destroy any
printout.
Thank you.
------------------------------------------------
^ permalink raw reply [flat|nested] 17+ messages in thread
* [U-Boot-Users] Still trying to get a stable 2.6.20.4 running on 8349ITX evalboard
2007-04-13 17:03 ` Timur Tabi
2007-04-13 18:31 ` Bruce_Leonard at selinc.com
2007-04-16 21:25 ` Benedict, Michael
@ 2007-04-19 5:19 ` Bruce_Leonard at selinc.com
2007-04-20 18:13 ` Benedict, Michael
2 siblings, 1 reply; 17+ messages in thread
From: Bruce_Leonard at selinc.com @ 2007-04-19 5:19 UTC (permalink / raw)
To: u-boot
Timur Tabi <timur@freescale.com> wrote on 04/13/2007 10:03:29 AM:
> Bruce_Leonard at selinc.com wrote:
>
> > Just an update, I've had the kernel up and running a continuos "find"
> > command for the last 11 hours using the hardcoded DDR memory
controller
> > values, so there's definitely something wrong with using SPD and the
> > memory that's installed on my 8349itx board. Still working on
figuring
> > out spd_sdram().
>
> You may need to define CFG_DDR_SDRAM_CLK_CNTL.
>
Well, I finally zeroed in on the problem and it is indeed the DDR SDRAM
Clock Control register as Timur suggested nearly a week ago, I just didn't
understand at the time what he was saying. Evidently the msb of this
register needs to be set for DDR memory to work correctly on the 834x.
However, I have three (and only three :) ) questions:
1) Since it clearly needs to be set so that DDR memory will work (and I
can see in a few other config files where CFG_DDR_SDRAM_CLK_CNTL gets that
high bit set), why does the MPC8349ITX config file NOT set it and how has
it worked for so many people for so long? I find it difficult to believe
that I'm the first person to stumble over this. Or am I the only person
who has tried to use the SPD code on this board?
2) My major concern is this: that high bit is un-documented, it's shown as
reserverd in all the documentation I can find for the 834x. How was I (or
anyone for that matter) supposed to know about that bit?
3) What exactly is the purpose of "providing a source-synchronous option"?
That collection of words doesn't mean anything to me.
Thanks to all that helped point me in the right direction on this one. I
could have spent many weeks digging into/blaming the kernel before I ever
thought of RAM problems.
Bruce
------------------------------------------------
This e-mail may contain SEL confidential information. The opinions
expressed are not necessarily those of SEL. Any unauthorized disclosure,
distribution or other use is prohibited. If you received this e-mail in
error, please notify the sender, permanently delete it, and destroy any
printout.
Thank you.
------------------------------------------------
^ permalink raw reply [flat|nested] 17+ messages in thread
* [U-Boot-Users] Still trying to get a stable 2.6.20.4 running on 8349ITX evalboard
2007-04-19 5:19 ` Bruce_Leonard at selinc.com
@ 2007-04-20 18:13 ` Benedict, Michael
2007-04-20 19:50 ` Bruce_Leonard at selinc.com
0 siblings, 1 reply; 17+ messages in thread
From: Benedict, Michael @ 2007-04-20 18:13 UTC (permalink / raw)
To: u-boot
Bruce_Leonard at selinc.com wrote:
> 1) Since it clearly needs to be set so that DDR memory will
> work (and I
> can see in a few other config files where
> CFG_DDR_SDRAM_CLK_CNTL gets that
> high bit set), why does the MPC8349ITX config file NOT set it
> and how has
> it worked for so many people for so long? I find it
> difficult to believe
> that I'm the first person to stumble over this. Or am I the
> only person
> who has tried to use the SPD code on this board?
Actually, the clock control used to be set to this value, until commit
f6eda7f80ccc13d658020268c507d7173cf2e8aa in October last year. The
Freescale-release BSP also has sdram_clk_cntl set to this value. I am
curious if the change was intended to accommodate another platform or if
there is something more going on here.
Cheers,
Michael
^ permalink raw reply [flat|nested] 17+ messages in thread
* [U-Boot-Users] Still trying to get a stable 2.6.20.4 running on 8349ITX evalboard
2007-04-20 18:13 ` Benedict, Michael
@ 2007-04-20 19:50 ` Bruce_Leonard at selinc.com
2007-04-20 19:58 ` Benedict, Michael
2007-04-20 20:00 ` Jon Loeliger
0 siblings, 2 replies; 17+ messages in thread
From: Bruce_Leonard at selinc.com @ 2007-04-20 19:50 UTC (permalink / raw)
To: u-boot
"Benedict, Michael" <MBenedict@twacs.com> wrote on 04/20/2007 11:13:21 AM:
>
> Actually, the clock control used to be set to this value, until commit
> f6eda7f80ccc13d658020268c507d7173cf2e8aa in October last year. The
> Freescale-release BSP also has sdram_clk_cntl set to this value. I am
> curious if the change was intended to accommodate another platform or if
> there is something more going on here.
> Cheers,
> Michael
>
Okay Micheal,
How the #$^@&#$%&@^$ did you figure out which commit changed things? I
don't even know how to find that commit so I can see what changed! The
way I see the issue being 'fixed' is to have the following in
.../include/configs/MPC8349ITX.h:
#define CFG_DDR_SDRAM_CLK_CNTL (DDR_SDRAM_CLK_CNTL_SS_EN |
DDR_SDRAM_CLK_CNTL_ADJUST_05)
At least that's what I did to fix it and i just lifted that from Timur's
hardcoded SDRAM init routine in .../board/mpc8349itx/mpc8349itx.c. By
doing the above in the config file you cause spd_sdram() to load
CFG_DDR_SDRAM_CLK_CNTL into the clock control register and everything
works fine. But I can't find that the above has ever been done in the
config file. It certainly wasn't in (what appears to me anyway but I
don't know how to drive git so I may be mistaken) the original posting of
the config file. And I don't think it's been in any version since. So I
don't think using spd_sdram() to set up the DDR controller on the 8349itx
board has ever worked.
To follow up on the purpose of the register, it provides a way to adjust
your DDR clock (CLK not CLK\) relative to when the DDR command/address is
issued (see Freescale's app note AN2583). Has something to do with the
way the DDR controller's clock is locked or not locked with DLL. I don't
really follow it all yet, but it's one more way to adjust signals so that
everything lines up correctly for setup and hold times. However, for our
purposes of getting this board to work using spd_sdram(), you do need to
setup the clock control reg with the values noted above, provided you are
using a Kingston KVR400X64C3A/256 DDR memory module like I am. I don't
gaurentee that the adjust value will be correct for any other part.
Hope this helps someone other than just me, given how long this thread has
been going on. :)
Bruce
------------------------------------------------
This e-mail may contain SEL confidential information. The opinions
expressed are not necessarily those of SEL. Any unauthorized disclosure,
distribution or other use is prohibited. If you received this e-mail in
error, please notify the sender, permanently delete it, and destroy any
printout.
Thank you.
------------------------------------------------
^ permalink raw reply [flat|nested] 17+ messages in thread
* [U-Boot-Users] Still trying to get a stable 2.6.20.4 running on 8349ITX evalboard
2007-04-20 19:50 ` Bruce_Leonard at selinc.com
@ 2007-04-20 19:58 ` Benedict, Michael
2007-04-20 20:00 ` Jon Loeliger
1 sibling, 0 replies; 17+ messages in thread
From: Benedict, Michael @ 2007-04-20 19:58 UTC (permalink / raw)
To: u-boot
Bruce_Leonard at selinc.com wrote:
> "Benedict, Michael" <MBenedict@twacs.com> wrote on 04/20/2007
>> Actually, the clock control used to be set to this value,
>
> But I can't find that the above has ever been done in the
> config file. It certainly wasn't in (what appears to me anyway but I
> don't know how to drive git so I may be mistaken) the original posting
of
> the config file. And I don't think it's been in any version
> since. So I don't think using spd_sdram() to set up the DDR
controller on
> the 8349itx board has ever worked.
Sorry, I should have been more explicit. The change I am talking about
was hard-coded in spd_sdram.c. You are correct in that it was never in
the config file before. Git-blame head and the
f6eda7f80ccc13d658020268c507d7173cf2e8aa commit for spd_sdram.c should
get us on the same page.
Cheers,
Michael
^ permalink raw reply [flat|nested] 17+ messages in thread
* [U-Boot-Users] Still trying to get a stable 2.6.20.4 running on 8349ITX evalboard
2007-04-20 19:50 ` Bruce_Leonard at selinc.com
2007-04-20 19:58 ` Benedict, Michael
@ 2007-04-20 20:00 ` Jon Loeliger
2007-04-20 20:18 ` Bruce_Leonard at selinc.com
1 sibling, 1 reply; 17+ messages in thread
From: Jon Loeliger @ 2007-04-20 20:00 UTC (permalink / raw)
To: u-boot
On Fri, 2007-04-20 at 14:50, Bruce_Leonard at selinc.com wrote:
>
> How the #$^@&#$%&@^$ did you figure out which commit changed things? I
> don't even know how to find that commit so I can see what changed! The
> way I see the issue being 'fixed' is to have the following in
> .../include/configs/MPC8349ITX.h:
Ooo! Tool hostility!
Deep breath. *sigh* There...
OK. Commands like these may be your friends here:
% git log -- path/to/file.c
% git log -p
If you have the SHA-1 or name of a commit, use:
% git show f6eda7
or
% git show master~4
HTH,
jdl
^ permalink raw reply [flat|nested] 17+ messages in thread* [U-Boot-Users] Still trying to get a stable 2.6.20.4 running on 8349ITX evalboard
2007-04-20 20:00 ` Jon Loeliger
@ 2007-04-20 20:18 ` Bruce_Leonard at selinc.com
0 siblings, 0 replies; 17+ messages in thread
From: Bruce_Leonard at selinc.com @ 2007-04-20 20:18 UTC (permalink / raw)
To: u-boot
Jon Loeliger <jdl@freescale.com> wrote on 04/20/2007 01:00:36 PM:
> On Fri, 2007-04-20 at 14:50, Bruce_Leonard at selinc.com wrote:
>
> >
> > How the #$^@&#$%&@^$ did you figure out which commit changed things? I
> > don't even know how to find that commit so I can see what changed! The
> > way I see the issue being 'fixed' is to have the following in
> > .../include/configs/MPC8349ITX.h:
>
> Ooo! Tool hostility!
>
My apologies to the list. It wasn't meant to be hostile, it was meant to
be an indication of frustration. Too many new tools and too much
information in too short a period for me to easily digest! I'm starting
to blow out circuits. Thanks for the info on git Jon.
Bruce
------------------------------------------------
This e-mail may contain SEL confidential information. The opinions
expressed are not necessarily those of SEL. Any unauthorized disclosure,
distribution or other use is prohibited. If you received this e-mail in
error, please notify the sender, permanently delete it, and destroy any
printout.
Thank you.
------------------------------------------------
^ permalink raw reply [flat|nested] 17+ messages in thread