[ELDK] confused with the bdt structure

Wolfgang Denk wd at denx.de
Sat Nov 14 19:48:43 CET 2009


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