[ELDK] confused with the bdt structure

林志平 solyn123 at gmail.com
Mon Nov 16 12:15:28 CET 2009


The problem have been settled now,
it is because of the uncorrect set of the memory controller.
Because in my board, wo do not use dimm, thus we do not provide the spd
information for uboot to read.
And I thought I can just write the the memory controller registers to make
the ddr2 memory work.
It works in uboot1.3.0, while it fails in uboot2009.08
So I changed the code to provide spd info, and print the memory registers
values,
found ddr2 is setted without enable auto precharge.
After change the corresponding bits, uboot2009.08 worked.
And now I need to fix the PCIE and PHY.
But I wonder why directly set the memory registers in initdram failed?

2009/11/15 Wolfgang Denk <wd at denx.de>

> Dear =?GB2312?B?wdbWvsa9?=,
>
> In message <8148211e0911130211i7cf76eb5td8804dab344c9e63 at mail.gmail.com>
> you wrote:
> >
> > I am porting uboot2009.08 under ELDK4.2 to our custom mpc85xx board.
> > everything goes on well until:
> >  bd->bi_intfreq = gd->cpu_clk; /* Internal Freq, in Hz */
> >  bd->bi_busfreq = gd->bus_clk; /* Bus Freq,      in Hz */
> > in lib_ppc/board.c
> > and I disregard this by
> > // bd->bi_intfreq = gd->cpu_clk; /* Internal Freq, in Hz */
> > // bd->bi_busfreq = gd->bus_clk; /* Bus Freq,      in Hz */
>
> Why are you doiung this?
>
> > But the output of the console changes to garbled, which I can not read.
>
> Well, it's no surprise that you ruin into problems after messing with
> the code.
>
> > And later I inserted a dead loop by:
> > while(1)
> > {}
> >  bd->bi_intfreq = gd->cpu_clk; /* Internal Freq, in Hz */
> >  bd->bi_busfreq = gd->bus_clk; /* Bus Freq,      in Hz */
> > And the console can work correctly, and I am a little confused by the
> > result;
>
> This indeed confuses me, too. But you're giving way too little context
> o make even an educated guess.
>
> > I know the board info struct bdt is used to offer info to the linux
> kernel,
>
> No, it is not. Not any more. Today we use the device tree for that.
>
> > I tried a lot and it seems that value bd->bi_intfreq and bd->bi_busfreq
> will
> > cause problems.
> > Because I am not sure if my ddr2 memory can work or not, so I wonder if
> it
> > has anything to do with my memory.
>
>  It seems you are meddling with code that you don't really understand.
> That's  dangerous.  Undo  all  the  changes  you  did,  and  try   to
> investigate  the  first issue you espoerience. Move on only after you
> solved it, and you are really, really sure you understood  why  there
> was a problem and that your fix is the right thing to do.
>
> Also note that this question has little or nothing to do with the
> ELDK, so it is off topic here. Please post U-Boot related questions on
> the U-Boot mailing list instead.
>
> Best regards,
>
> Wolfgang Denk
>
> --
> DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
> The sooner our happiness together begins, the longer it will last.
>        -- Miramanee, "The Paradise Syndrome", stardate 4842.6
>


More information about the eldk mailing list