[U-Boot-Users] Change file location
wd at denx.de
Mon May 12 18:24:16 CEST 2003
in message <9F5558593173D21190EA0008C7B17698731369 at innsys1> you wrote:
> >> The better solution would be to move this file into the board specific
> >> directories.
> >> If not, I would have to do #ifdef around the whole file.
> >Can you please explain why you think this is a board specific file?
> Because the PCI Maemory and IO map is defined there, and it does depend a
> bit on how you want the board set up.
> I guess it can be used for multiple boards if the memory map should be the
I see what you mean...
> * This file is a bit of a problem since the PCI memory map is hardcoded here
> in code common to all MPC8260 targets, but one memory map may not
> necessarily be appropriate for all targets. For now I just changed the
> hardcoded memory map to one that I like better. This probably broke the
> PM826 u-boot port. The memory map definition could be #ifdef'd for each
> board, or the memory map definition could be moved to the board
> configuration header file. My motivation here was to move the PCI I/O space
> from 0xA0000000 to 0xF4000000. Having all the I/O regions above 0xF0000000
> allows Linux to efficiently map them all with one BAT register.
OK, I understand what you want to do.
But there is no need to create multiple copies of this file in board
specific directories - on contrary, this is a really bad idea.
Instead we should turn the hardwired constants into CFG_ values which
can be #define'd in the board config files. Probably we should even
leave the existing code as default, so that you just have to #define
your own settings if you want a different mapping.
Please feel free to send me such a patch.
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: wd at denx.de
I don't want to be young again, I just don't want to get any older.
More information about the U-Boot