diff mbox series

include: env: ti: ti_common: Run main_cpsw0_qsgmii_phyinit conditionally

Message ID 20231211104209.1078892-1-s-vadapalli@ti.com
State Accepted
Commit 0d72b0f2f83b788273c40ed4a64d1adf74877726
Delegated to: Tom Rini
Headers show
Series include: env: ti: ti_common: Run main_cpsw0_qsgmii_phyinit conditionally | expand

Commit Message

Siddharth Vadapalli Dec. 11, 2023, 10:42 a.m. UTC
From: Manorit Chawdhry <m-chawdhry@ti.com>

The main_cpsw0_qsgmii_phyinit command is defined only for certain TI
SoCs which have the do_main_cpsw0_qsgmii_phyinit variable set.

Add a check to ensure that the main_cpsw0_qsgmii_phyinit command is run
only for such SoCs.

Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com>
Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com>
---

Hello,

This patch is based on commit
65eed68772 test/py: Disable error E0611 in two cases for pylint

Regards,
Siddharth.

 include/env/ti/ti_common.env | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Comments

Tom Rini Dec. 11, 2023, 7:15 p.m. UTC | #1
On Mon, Dec 11, 2023 at 04:12:09PM +0530, Siddharth Vadapalli wrote:

> From: Manorit Chawdhry <m-chawdhry@ti.com>
> 
> The main_cpsw0_qsgmii_phyinit command is defined only for certain TI
> SoCs which have the do_main_cpsw0_qsgmii_phyinit variable set.
> 
> Add a check to ensure that the main_cpsw0_qsgmii_phyinit command is run
> only for such SoCs.
> 
> Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com>
> Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com>

Reviewed-by: Tom Rini <trini@konsulko.com>
Mattijs Korpershoek Dec. 20, 2023, 5:06 p.m. UTC | #2
On Mon, Dec 11, 2023 at 16:12, Siddharth Vadapalli <s-vadapalli@ti.com> wrote:

> From: Manorit Chawdhry <m-chawdhry@ti.com>
>
> The main_cpsw0_qsgmii_phyinit command is defined only for certain TI
> SoCs which have the do_main_cpsw0_qsgmii_phyinit variable set.
>
> Add a check to ensure that the main_cpsw0_qsgmii_phyinit command is run
> only for such SoCs.
>
> Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com>
> Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com>

Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>

> ---
>
> Hello,
>
> This patch is based on commit
> 65eed68772 test/py: Disable error E0611 in two cases for pylint
>
> Regards,
> Siddharth.
>
>  include/env/ti/ti_common.env | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/include/env/ti/ti_common.env b/include/env/ti/ti_common.env
> index f5d84216e3..f0f89a2287 100644
> --- a/include/env/ti/ti_common.env
> +++ b/include/env/ti/ti_common.env
> @@ -25,7 +25,10 @@ run_fit=run get_fit_config; bootm ${addr_fit}#${name_fit_config}${overlaystring}
>  bootcmd_ti_mmc=
>  	run findfdt; run init_${boot};
>  #if CONFIG_CMD_REMOTEPROC
> -	run main_cpsw0_qsgmii_phyinit; run boot_rprocs;
> +	if test ${do_main_cpsw0_qsgmii_phyinit} -eq 1;
> +		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;
> -- 
> 2.34.1
Tom Rini Dec. 21, 2023, 9:06 p.m. UTC | #3
On Mon, Dec 11, 2023 at 04:12:09PM +0530, Siddharth Vadapalli wrote:

> From: Manorit Chawdhry <m-chawdhry@ti.com>
> 
> The main_cpsw0_qsgmii_phyinit command is defined only for certain TI
> SoCs which have the do_main_cpsw0_qsgmii_phyinit variable set.
> 
> Add a check to ensure that the main_cpsw0_qsgmii_phyinit command is run
> only for such SoCs.
> 
> Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com>
> Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com>
> Reviewed-by: Tom Rini <trini@konsulko.com>
> Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>

Applied to u-boot/next, thanks!
Nishanth Menon Dec. 27, 2023, 1:06 p.m. UTC | #4
On 16:06-20231221, Tom Rini wrote:
> On Mon, Dec 11, 2023 at 04:12:09PM +0530, Siddharth Vadapalli wrote:
> 
> > From: Manorit Chawdhry <m-chawdhry@ti.com>
> > 
> > The main_cpsw0_qsgmii_phyinit command is defined only for certain TI
> > SoCs which have the do_main_cpsw0_qsgmii_phyinit variable set.
> > 
> > Add a check to ensure that the main_cpsw0_qsgmii_phyinit command is run
> > only for such SoCs.
> > 
> > Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com>
> > Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com>
> > Reviewed-by: Tom Rini <trini@konsulko.com>
> > Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
> 
> Applied to u-boot/next, thanks!

Shouldn't main_cpsw0_qsgmii_phyinit be part of the driver?? why are we
scripting up driver initialization?
diff mbox series

Patch

diff --git a/include/env/ti/ti_common.env b/include/env/ti/ti_common.env
index f5d84216e3..f0f89a2287 100644
--- a/include/env/ti/ti_common.env
+++ b/include/env/ti/ti_common.env
@@ -25,7 +25,10 @@  run_fit=run get_fit_config; bootm ${addr_fit}#${name_fit_config}${overlaystring}
 bootcmd_ti_mmc=
 	run findfdt; run init_${boot};
 #if CONFIG_CMD_REMOTEPROC
-	run main_cpsw0_qsgmii_phyinit; run boot_rprocs;
+	if test ${do_main_cpsw0_qsgmii_phyinit} -eq 1;
+		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;