
-----Original Message----- From: york sun Sent: Wednesday, January 20, 2016 9:32 PM To: Pratiyush Mohan Srivastava pratiyush.srivastava@freescale.com; u-boot@lists.denx.de Cc: Prabhakar Kushwaha prabhakar.kushwaha@nxp.com; Pratiyush Srivastava pratiyush.srivastava@nxp.com Subject: Re: [PATCH ] board: ls2080a: Add "mcinitcmd" env for MC & DPL deployment
On 01/19/2016 10:59 PM, Pratiyush Mohan Srivastava wrote:
From: Pratiyush Mohan Srivastava pratiyush.srivastava@nxp.com
Environment variable mcinitcmd is defined to initiate MC and DPL deployment from the location where it is stored(NOR, NAND, SD, SATA, USB)during u-boot booting.If this variable is not defined then macro MC_BOOT_ENV_VAR will be null and MC will not be booted and DPL will not be applied during U-boot booting.
Signed-off-by: Pratiyush Mohan Srivastava pratiyush.srivastava@nxp.com Signed-off-by: Prabhakar Kushwaha prabhakar.kushwaha@nxp.com
arch/arm/cpu/armv8/fsl-layerscape/README.lsch3 | 29 ++++++++++++++++++++++++++ board/freescale/ls2080aqds/eth.c | 5 +++++ board/freescale/ls2080ardb/eth_ls2080rdb.c | 5 +++++ 3 files changed, 39 insertions(+)
<snip>
diff --git a/board/freescale/ls2080aqds/eth.c b/board/freescale/ls2080aqds/eth.c index 5b9c2d1..db9de77 100644 --- a/board/freescale/ls2080aqds/eth.c +++ b/board/freescale/ls2080aqds/eth.c @@ -20,6 +20,7 @@
#include "ls2080aqds_qixis.h"
+#define MC_BOOT_ENV_VAR "mcinitcmd"
#ifdef CONFIG_FSL_MC_ENET /* - In LS2080A there are only 16 SERDES lanes, spread across 2 SERDES banks. @@ -714,6 +715,7 @@ void ls2080a_handle_phy_interface_xsgmii(int i) int board_eth_init(bd_t *bis) { int error;
- char *mc_boot_env_var;
#ifdef CONFIG_FSL_MC_ENET struct ccsr_gur __iomem *gur = (void *)CONFIG_SYS_FSL_GUTS_ADDR; int serdes1_prtcl = (in_le32(&gur->rcwsr[28]) & @@ -781,6 +783,9 @@ int board_eth_init(bd_t *bis) } }
- mc_boot_env_var = getenv(MC_BOOT_ENV_VAR);
- if (mc_boot_env_var)
error = cpu_eth_init(bis);run_command_list(mc_boot_env_var, -1, 0);
Why not put the code into cpu_eth_init()?
Ans: While deciding on the location of the command "run_command_list" I could not find any prior usage in arch/arm folder. Hence I decided that the run_command_list command be kept just before calling cpu_eth_init inside board folder.
York