RE: [U-Boot-Users] [PATCH] lpd7a40x register defs, include consolidation

Wolfgang,
Thanks for the response. I will resubmit with necessary changes.
A little info regarding point [2]:
No. I reject this. [2] Please do not pollute the Makefile and MAKEALL (oops, you even forgot to update this one!) with so many different build targets which differ only in the available RAM size of the target. There is existing code (in common/memsize.c) to atomatically detect the available size, so please fix your code and auto-adjust as needed.
I had code to autodetect the ram working but I removed it since it required changes to several files relating to how the DRAM config is handled (printed, passed to kernel, etc).
For configurations with more than 32MB of DRAM the layout is not contiguous, ie. more than one bank is required. Since the number of DRAM banks is #defined there is no way to adjust this at runtime. The result is having an extra bank of zero size configured for boards with <= 32MB DRAM.
This gives the wrong impression...that there are more DRAM banks but for some reason one is zero size (ie. something is wrong).
I've since booted a kernel with the above setup and it seems to deal with the zero size bank fine so I guess this isn't a problem from the operation point of view.
It would be nice if either: 1) the number of DRAM banks was configurable at runtime. 2) leave the number of DRAM banks #defined (as max. banks) and simply add checks for zero size in the config print, kernel atag, etc. handling to skip such banks.

Dear Paul,
in message 200410111119.07866.pruhland@microwavedata.com you wrote:
I had code to autodetect the ram working but I removed it since it required changes to several files relating to how the DRAM config is handled (printed, passed to kernel, etc).
OK.
For configurations with more than 32MB of DRAM the layout is not contiguous, ie. more than one bank is required. Since the number of DRAM banks is #defined there is no way to adjust this at runtime. The result is having an extra bank of zero size configured for boards with <= 32MB DRAM.
And this cannot be fixed?
This gives the wrong impression...that there are more DRAM banks but for some reason one is zero size (ie. something is wrong).
I don't understand. You tell me, that there is no SDRAM populated on one of the banks, resulting in a smaller total RAM size, and you hesitate to show this information to the user?
It would be nice if either:
- the number of DRAM banks was configurable at runtime.
Personally, I don't see any need to display the number of banks at all; on PowerPC systems we just print the total RAM size, and every- body is happy with this.
But no matter what you want - both methods can be implemented. Feel free to submit a patch.
- leave the number of DRAM banks #defined (as max. banks) and simply add
checks for zero size in the config print, kernel atag, etc. handling to skip such banks.
Why skip them? What's wrong that a bank that is not populated shows up with a zero size?
Best regards,
Wolfgang Denk

On Sunday 10 October 2004 17:51, you wrote:
I don't understand. You tell me, that there is no SDRAM populated on one of the banks, resulting in a smaller total RAM size, and you hesitate to show this information to the user?
Why skip them? What's wrong that a bank that is not populated shows up with a zero size?
Its not that the ram is unpopulated...it doesn't exist. There is really only one 'physical' bank of ram (2 16bit chips) on the card engine. Due to the way the LH7A40X SoCs address the ram the layout is not contiguous. You can use a register bit to turn on 'rom look-alike' mode which enables a flat addressing scheme but its still limited to 32MB.
So with 32MB there is only one bank while for 64MB there are two banks (using the config option above). Without using the config option you have 8 banks of 4MB each for 32MB. I've only added support for the former.
I just didn't want to show memory that is not there and never will be (disregarding the guy with the soldering iron of course).
Also, I was using the 'make xxx_config' to adjust TEXT_BASE so u-boot could be loaded at the top of ram regardless of the configuration.
If there is a way to accomplish these things without the makefile trickery I'm certainly open to suggestions. Otherwise I'll just remove it and configure all variants with the max possible banks.
participants (3)
-
Paul Ruhland
-
Ruhland, Paul
-
Wolfgang Denk