mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-05-04 20:26:13 +02:00
Since commit 27cc5951c862 ("include: env: ti: add default for
do_main_cpsw0_qsgmii_phyinit"), the value of the environment variable
do_main_cpsw0_qsgmii_phyinit happened to remain '0' and couldn't be
changed without user intervention. This behavior is due to the following
cyclic dependency:
A) ti_common.env sets do_main_cpsw0_qsgmii_phyinit to '0' and its value
can only be updated automatically by main_cpsw0_qsgmii_phyinit.
B) main_cpsw0_qsgmii_phyinit is defined in j721e.env and it can run only
if 'do_main_cpsw0_qsgmii_phyinit' is already '1' which isn't possible
unless the user manually assigns the value.
Fix the aforementioned cyclic dependency by using board_late_init() to
detect the QSGMII Daughtercard and set do_main_cpsw0_qsgmii_phyinit.
Additionally, to address the issue of do_main_cpsw0_qsgmii_phyinit being
'undefined' for other platforms, replace:
if test ${do_main_cpsw0_qsgmii_phyinit} -eq 1;
with:
if env exists do_main_cpsw0_qsgmii_phyinit;
in ti_common.env.
Fixes: 27cc5951c862 ("include: env: ti: add default for do_main_cpsw0_qsgmii_phyinit")
Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com>
Reviewed-by: Anshul Dalal <anshuld@ti.com>
38 lines
1.0 KiB
Bash
38 lines
1.0 KiB
Bash
loadaddr=0x82000000
|
|
kernel_addr_r=0x82000000
|
|
fdtaddr=0x88000000
|
|
dtboaddr=0x89000000
|
|
fdt_addr_r=0x88000000
|
|
fdtoverlay_addr_r=0x89000000
|
|
rdaddr=0x88080000
|
|
ramdisk_addr_r=0x88080000
|
|
scriptaddr=0x80000000
|
|
pxefile_addr_r=0x80100000
|
|
boot_fdt=try
|
|
|
|
boot_fit=0
|
|
secure_rprocs=0
|
|
addr_fit=0x90000000
|
|
name_fit=fitImage
|
|
update_to_fit=setenv loadaddr ${addr_fit}; setenv bootfile ${name_fit}
|
|
get_fit_overlaystring=
|
|
for overlay in $name_overlays; do;
|
|
setexpr name_fit_overlay gsub / _ conf-${overlay};
|
|
setenv overlaystring ${overlaystring}'#'${name_fit_overlay};
|
|
done;
|
|
get_fit_config=setexpr name_fit_config gsub / _ conf-${fdtfile}
|
|
run_fit=run get_fit_config; bootm ${addr_fit}#${name_fit_config}${overlaystring}
|
|
bootcmd_ti_mmc=
|
|
run init_${boot};
|
|
#if CONFIG_CMD_REMOTEPROC
|
|
if env exists do_main_cpsw0_qsgmii_phyinit;
|
|
then run main_cpsw0_qsgmii_phyinit;
|
|
fi;
|
|
run boot_rprocs;
|
|
#endif
|
|
if test ${boot_fit} -eq 1;
|
|
then run get_fit_${boot}; run get_fit_overlaystring; run run_fit;
|
|
else;
|
|
run get_kern_${boot}; run get_fdt_${boot}; run get_overlay_${boot}; run run_kern;
|
|
fi;
|