
Dear Rune,
in message 9F5558593173D21190EA0008C7B17698731369@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 same.
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.
Best regards,
Wolfgang Denk