
Hi Stephen,
On Mon, Dec 11, 2017 at 6:02 PM, Stephen Warren swarren@wwwdotorg.org wrote:
On 12/11/2017 09:55 AM, Stephen Warren wrote:
Simon, the latest commits in u-boot-dm/git master branch (2b64d049a061 "power: pmic/regulator: Add basic support for TPS65910") crash on at least Beaver and Jetson TK1. On TK1, I added debug spew to lib/initcall.c, and the last function called before the crash is initr_serial():
Bisect shows this is due to the commit below. If I revert this, U-Boot works correctly again:
0c98340717f69a66acd4156392b6a45cc51042b3 is the first bad commit commit 0c98340717f69a66acd4156392b6a45cc51042b3 Author: Mario Six mario.six@gdsys.cc Date: Fri Nov 24 07:51:40 2017 +0100
drivers: core: Add translation in live tree case The function dev_read_addr calls ofnode_get_addr_index in the live
tree case, which does not apply bus translations to the address read from the device tree. This results in illegal addresses on boards that rely on bus translations being applied. Fix this situation by applying bus translations in the live tree case as well. Signed-off-by: Mario Six mario.six@gdsys.cc Reviewed-by: Simon Glass sjg@chromium.org
That's what I feared; some boards are already relying on the non-translating behavior. dev_read_addr does bus translations with this patch (which is the correct behavior, since it does that in the non-livetree case as well). But the device tree was probably written with the non-translating behavior in mind.
Check the ranges properties in the device tree; otherwise, check which address you expect dev_read_addr to return, and compare it with what it does return now.
Best regards,
Mario