Broken P2020 board since commit be7dbb60c5bf ("Convert CONFIG_SYS_IMMR to Kconfig")

Pali Rohár pali at kernel.org
Wed Mar 30 14:40:54 CEST 2022


On Wednesday 30 March 2022 14:32:24 Pali Rohár wrote:
> On Wednesday 30 March 2022 08:29:17 Tom Rini wrote:
> > On Wed, Mar 30, 2022 at 02:20:28PM +0200, Pali Rohár wrote:
> > > Hello!
> > > 
> > > In current master branch is U-Boot for P2020 board (powerpc mpc85xx
> > > based) built by P2020RDB-PC_SDCARD_defconfig completely broken. U-Boot
> > > does not work at all and on UART is nothing printed.
> > > 
> > > I run git bisect and it found commit which broke this P2020 board:
> > > 
> > >   be7dbb60c5bfa38ea444fe7de1dca8bd35f83f5b is the first bad commit
> > >   commit be7dbb60c5bfa38ea444fe7de1dca8bd35f83f5b
> > >   Author: Tom Rini <trini at konsulko.com>
> > >   Date:   Sun Dec 12 22:12:30 2021 -0500
> > > 
> > >       Convert CONFIG_SYS_IMMR to Kconfig
> > > 
> > >       This converts the following to Kconfig:
> > >          CONFIG_SYS_IMMR
> > > 
> > >       We do this by consolidating the SYS_IMMR options we have and providing
> > >       defaults.
> > > 
> > >       We also, in the few places where M68K was also sharing code with these
> > >       platforms, define it within the file to CONFIG_SYS_MBAR to match usage.
> > >       This should be cleaned up longer term.
> > > 
> > >       Signed-off-by: Tom Rini <trini at konsulko.com>
> > > 
> > >   :040000 040000 12f819284e85d64b7df5da65476038a542e587f5 ea3da4aefeee93f1566be6b7f85a43846f29aa8b M      arch
> > >   :040000 040000 afe083b1f22b57470532d2a2c3c37b6a5d4a68d4 302d04810c9449622ce43982f562d2e8400086ec M      configs
> > >   :040000 040000 411b7912fc83c8aaf25adf5647400625793cee38 0eff4a6f6e7b5f21bc3d533e1c5bc1cd2a5ed86b M      drivers
> > >   :040000 040000 b7d8b45f803b3619f76be355193d5c5645e76782 be2ac1c8506e99d1f9c615ad09477884f5ce1231 M      include
> > > 
> > > So it is relatively new change (Dec 2021).
> > > 
> > > Tom, any idea how this commit could broke P2020 board which is mpc85xx
> > > platform? I do not see nothing suspicious in this commit. Before this
> > > commit BootROM can successfully boot SPL without any issues and SPL
> > > prints info on UART. This board use include/configs/p1_p2_rdb_pc.h
> > > config file and it was not touched at all.
> > > 
> > > Priyanka, Wolfgang, you are marked as maintainers, do you know how to
> > > debug this issue? Or do you have some P2020 board or other mpc85xx
> > > based, so you could test if U-Boot is working on this platform?
> > > 
> > > 
> > > For reference I built U-Boot SPL by these commands:
> > > 
> > > make CROSS_COMPILE=powerpc-linux-gnuspe- P2020RDB-PC_SDCARD_defconfig spl/u-boot-spl.bin
> > > boot_format config_sram_p2020rdb.dat spl/u-boot-spl.bin -spi u-boot.sdcard.bin
> > > 
> > > boot_format and config_sram_p2020rdb.dat are taken from the upstream git
> > > repo from the latest branch nxp/sdk-v2.0.x:
> > > https://source.codeaurora.org/external/qoriq/qoriq-yocto-sdk/boot-format
> > > 
> > > u-boot.sdcard.bin is then copied to SD card (starting from sector zero).
> > 
> > The likely answer is that one of the sets of games PowerPC platforms
> > play so that "SPL", "TPL" and regular U-Boot to do redefine some symbols
> > / base addresses didn't get migrated correctly.  Or, re-reading that
> > commit, maybe what I had worked out wasn't right, and
> > CONFIG_SYS_IMMR=0xff700000 is wrong?
> 
> In include/mpc85xx.h you removed code:
> 
> -#ifndef CONFIG_SYS_IMMR
> -#define CONFIG_SYS_IMMR			CONFIG_SYS_CCSRBAR
> -#endif
> 
> And in include/configs/p1_p2_rdb_pc.h is:
> 
> #define CONFIG_SYS_CCSRBAR		0xffe00000
> 
> So it looks like that CONFIG_SYS_IMMR needs to be set to 0xffe00000
> value. I'm going to test this change.

Yes, changing it to 0xffe00000 fixed this issue and SPL started printing
on UART again.

Here are config files which sets custom CONFIG_SYS_CCSRBAR value:

$ git grep '#define\s*CONFIG_SYS_CCSRBAR\s' include/
include/configs/MPC8540ADS.h:#define CONFIG_SYS_CCSRBAR         0xe0000000
include/configs/MPC8548CDS.h:#define CONFIG_SYS_CCSRBAR         0xe0000000
include/configs/MPC8560ADS.h:#define CONFIG_SYS_CCSRBAR         0xe0000000
include/configs/P1010RDB.h:#define CONFIG_SYS_CCSRBAR                   0xffe00000
include/configs/p1_p2_rdb_pc.h:#define CONFIG_SYS_CCSRBAR               0xffe00000
include/configs/qemu-ppce500.h:#define CONFIG_SYS_CCSRBAR               0xe0000000
include/configs/socrates.h:#define CONFIG_SYS_CCSRBAR           0xE0000000
include/mpc85xx.h:#define CONFIG_SYS_CCSRBAR            CONFIG_SYS_CCSRBAR_DEFAULT

And this should be reflected into CONFIG_SYS_IMMR as it looks like that
all above config files are MPC85xx platforms.


More information about the U-Boot mailing list