Convert MPC85xx platforms to a single linker script
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest0 of 4 patches 0 repliesNew
Patches in v1 No applies recorded yet
None of the 4 patches the cover letter announces are in this archive.
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [U-Boot] [PATCH 0/4] Convert MPC85xx platforms to a single linker script
Dear Trent,
Quoted 2 lines · In message <[email protected]> you wrote:
All the mpc85xx platforms hard code the size of the flash via the local bus
No, they don't.
Quoted 5 lines
controller settings. For example, if you look in
include/configs/MPC8572DS.hyou will find these lines:#define
CFG_BR0_PRELIM0xe8001001
#defineCFG_OR0_PRELIM0xf8000ff7
Mind the "PRELIM" part in that names. PRELIM as in PRELIMINARY.
Quoted 6 lines
Those two lines encode the location of the flash bank at 0xe800_0000 and the size of the bank at 128MB. Also the port width and the timing parameters. Determining the value of these registers at run time would be somewhat of a challenge. You can't query the size of the flash chip with CFI until the chip is mapped. And you can't map the chip until you know its size, which creates a certain chicken and egg problem.
You think you have to tell me that? Umm...
Quoted 3 lines
I think what you would have to do is create a huge initial mapping, big enough to cover the chip with the most address lines. I suppose you could map 4 GB to the flash and be assured of getting all 32 address lines on the eLBC. But
Not really. You just have to map a small part, just big enough to be able to read the CFI information.
Quoted 5 lines
you'd be running from the flash you just re-mapped, that makes things a little more interesting. Then you could do a CFI query to the base of that mapping to get the bank size, then resize the mapping to the correct value. I'm not sure how to figure out the port size. Maybe one could try 8, 16 and 32 bit ports and see which one worked, but that sounds a little iffy. Actually, I
You might want to have a look at the CFI driver, then.
Quoted 7 lines
think this must be in the cpu reset strapping somewhere, otherwise how would it boot?
But again, this has nothing to do with my patch. I'm just improving the way the linker script works. If you want to talk about how the local bus controller is programmed, can we have another thread please? Something like "TODO: dynamically determine Freescale eLBC parameters at run time".
We are talking about your patches here, which claim to cover "all MPC85xx" boards.
Quoted 4 lines
Quoted 2 lines
But in the patch you submit you hard-wire certain flash bank sizes into the linker scriopts, don't you?
Not really. I'm calculating the boot page location in a better way.
Now what. First you say you do, then you say you don't?
Quoted 2 lines
The expression from tqm85xx will let you change the image size without being edited. Why not use that one then? Suppose you decide to change the location
He. Funny that you come up with that example.
Quoted 1 line
of the flash bank? Then it won't work, unless you edit the linker script.
"Change the location of the flash bank" - what exactly do you mean by that?
Quoted 6 lines
create a broken image (that is 8MB+ in size). If you want to support a board with a 2 MB flash bank with the mpc8540eval style script, you need to copy the entire linker script and edit it. With my method method, you can create a two line script:
__flash_mask= 2M - 1;
INCLUDEcpu/mpc85xx/u-boot.lds
And what do I do with a board that can have 2, 4, 8, 16, 32 or 64 MB of flash?
Quoted 4 lines
This is what my patch is for. Letting all existing 85xx boards use one script. And if a board is created that can't use the script alone, it can be handled easily, re-using the common script without duplicating any code. Clearly this is an improvement over how things work now, is it not?
I'd be happy if that works, but somehow you don't add the missing pieces of explanation I'm looking for.
Best regards,
Wolfgang Denk
Signature · 5 lines
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 Fascinating, a totally parochial attitude. -- Spock, "Metamorphosis", stardate 3219.8