MPC8272ADS: fix device tree for 8 MB flash, size
A message that is not in the archive (sent off-list or not yet received): [email protected]
Hello Wolfgang,
Quoted 4 lines
The current device tree for the MPC8272ADS assumes a mapping of 32 MB of NOR flash at 0xFE00.0000, while there are actually only 8 MB on the boards, mapped at 0xFF80.0000. When booting an uImage with such a device tree, the kernel crashes because 0xFE00.0000 is not mapped.
Wouldn;t it be better, if u-boot fixes the device tree entries? I think, u-boot should know, where the flash begins and ends, and because this is maybe a dynamic variable for this board, it should be better, if u-boot fixes this, so no need for adding a device tree for every board variant.
bye
Heiko
Signature · 2 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Quoted 8 lines · Heiko Schocher
Hello Wolfgang,
Quoted 4 lines
The current device tree for the MPC8272ADS assumes a mapping of 32 MB of NOR flash at 0xFE00.0000, while there are actually only 8 MB on the boards, mapped at 0xFF80.0000. When booting an uImage with such a device tree, the kernel crashes because 0xFE00.0000 is not mapped.
Wouldn;t it be better, if u-boot fixes the device tree entries?
We should proabbly leave out the ranges altogether, and have u-boot populate it from the mappings it establishes.
Quoted 4 lines
I think, u-boot should know, where the flash begins and ends, and because this is maybe a dynamic variable for this board, it should be better, if u-boot fixes this, so no need for adding a device tree for every board variant.
Flash is on a SIMM on this board, and the board manual says it's expandable to 32 MiB. However, I suspect that the current DTS was just an error as I based it on a board that had not had its flash SIMM modified. That specific flash SIMM is no longer working (or perhaps just got its contents corrupted -- one of these days I may hook up a BDI and try to reflash), so I can't go back and check.
I don't see how current u-boot would accomodate more than 8MiB flash on this board (there's some detection in board/freescale/mpc8260ads/flash.c, but I don't see any setting of BR0 besides the preliminary value at 0xff800000).
-Scott
Hello Scott,
Quoted 11 lines · Scott Wood
Quoted 7 lines · Heiko Schocher
Hello Wolfgang,
Quoted 4 lines
The current device tree for the MPC8272ADS assumes a mapping of 32 MB of NOR flash at 0xFE00.0000, while there are actually only 8 MB on the boards, mapped at 0xFF80.0000. When booting an uImage with such a device tree, the kernel crashes because 0xFE00.0000 is not mapped.
Wouldn;t it be better, if u-boot fixes the device tree entries?
We should proabbly leave out the ranges altogether, and have u-boot populate it from the mappings it establishes.
No, I vote for manipulating just the entries, which u-boot dynamically detect, and let the other entries untouched. It is possible that there is a device which u-boot didn;t use/know, and there is in the DTS an ranges entry for it (Maybe not on the MPC8727ADS, but we should define a rule, how a bootloader has to manipulate entries). So if u-boot build the complete ranges entry, it maybe miss something.
Quoted 12 lines
Quoted 4 lines
I think, u-boot should know, where the flash begins and ends, and because this is maybe a dynamic variable for this board, it should be better, if u-boot fixes this, so no need for adding a device tree for every board variant.
Flash is on a SIMM on this board, and the board manual says it's expandable to 32 MiB. However, I suspect that the current DTS was just an error as I based it on a board that had not had its flash SIMM modified. That specific flash SIMM is no longer working (or perhaps just got its contents corrupted -- one of these days I may hook up a BDI and try to reflash), so I can't go back and check.
Quoted 2 lines
I don't see how current u-boot would accomodate more than 8MiB flash on this board (there's some detection in
board/freescale/mpc8260ads/flash.c,
Didn;t this board uses the CFI driver? :-(
Quoted 2 lines
but I don't see any setting of BR0 besides the preliminary value at
0xff800000).
OK, then the patch from Wolfgang should be sufficient.
bye
Heiko
Signature · 2 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Quoted 10 lines · Heiko Schocher
Quoted 2 lines · Scott Wood
We should proabbly leave out the ranges altogether, and have u-boot populate it from the mappings it establishes.
No, I vote for manipulating just the entries, which u-boot dynamically detect, and let the other entries untouched. It is possible that there is a device which u-boot didn;t use/know, and there is in the DTS an ranges entry for it (Maybe not on the MPC8727ADS, but we should define a rule, how a bootloader has to manipulate entries). So if u-boot build the complete ranges entry, it maybe miss something.
If u-boot doesn't know about it, then it didn't create the mapping, and thus it's not accessible (if something later on creates a mapping, it can update ranges itself). The devices themselves would still be described, just not the non-existent mapping.
The benefit is that you would have just one place that reads out the localbus config into the device tree, with no error-prone duplication of data, or separate hacks for each board that has something that is variable.
We could leave ranges in the dts for cuImage, and have u-boot just overwrite the entire thing rather than patch up individual entries.
Quoted 4 lines
Quoted 2 lines
I don't see how current u-boot would accomodate more than 8MiB flash on this board (there's some detection in
board/freescale/mpc8260ads/flash.c,Didn;t this board uses the CFI driver? :-(
Not yet, unfortunately. This is pretty old code.
-Scott