board: ls2080a: Add "mcinitcmd" env for MC & DPL deployment
PATCH 1/1 board: ls2080a: Add "mcinitcmd" env for MC & DPL deployment
From: Pratiyush Mohan Srivastava <[email protected]>
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.
--- 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(+)
arch/arm/cpu/armv8/fsl-layerscape/README.lsch3 +29 -0
@@ -121,6 +121,35 @@ mcboottimeout: MC boot timeout in milliseconds. If this variable is not defined mcmemsize: MC DRAM block size. If this variable is not defined, the value CONFIG_SYS_LS_MC_DRAM_BLOCK_MIN_SIZE will be assumed. +mcinitcmd: This environment variable 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 MC_BOOT_ENV_VAR + will be null and MC will not be booted and DPL will not be applied + during U-boot booting.However the MC, DPC and DPL can be applied from + console independently. + The variable needs to be set from the console once and then on + rebooting the parameters set in the varible will automatically be + executed. The commmand is demostrated taking an example of mc boot + using NOR Flash i.e. MC, DPL, and DPC is stored in the NOR flash: + + cp.b 0xa0000000 0x580300000 $filesize + cp.b 0x80000000 0x580800000 $filesize + cp.b 0x90000000 0x580700000 $filesize + + setenv mcinitcmd 'fsl_mc start mc 0x580300000 0x580800000' + + If only linux is to be booted then the mcinitcmd environment should be set as + + setenv mcinitcmd 'fsl_mc start mc 0x580300000 0x580800000;fsl_mc apply DPL 0x580700000' + + Here the addresses 0xa0000000, 0x80000000, 0x80000000 are of DDR to where + MC binary, DPC binary and DPL binary are stored and 0x580300000, 0x580800000 + and 0x580700000 are addresses in NOR where these are copied. It is to be + noted that these addresses in 'fsl_mc start mc 0x580300000 0x580800000;fsl_mc apply DPL 0x580700000' + can be replaced with the addresses of DDR to + which these will be copied in case of these binaries being stored in other + devices like SATA, USB, NAND, SD etc. + Booting from NAND ------------------- Booting from NAND requires two images, RCW and u-boot-with-spl.bin.
board/freescale/ls2080aqds/eth.c +5 -0
@@ -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) +run_command_list (mc_boot_env_var,-1 ,0 ); error =cpu_eth_init (bis);if (hwconfig_f ("xqsgmii" , env_hwconfig)) {
board/freescale/ls2080ardb/eth_ls2080rdb.c +5 -0
@@ -20,9 +20,11 @@DECLARE_GLOBAL_DATA_PTR ; +#define MC_BOOT_ENV_VAR "mcinitcmd"int board_eth_init (bd_t *bis) {#if defined(CONFIG_FSL_MC_ENET ) +char *mc_boot_env_var;int i, interface;struct memac_mdio_info mdio_info;struct mii_dev *dev;
@@ -89,6 +91,9 @@ int board_eth_init(bd_t *bis) } } + mc_boot_env_var =getenv (MC_BOOT_ENV_VAR ); +if (mc_boot_env_var) +run_command_list (mc_boot_env_var,-1 ,0 );cpu_eth_init (bis);#endif /* CONFIG_FMAN_ENET */
Signature · 1 line
1.9.1
PATCH 1/1 board: ls2080a: Add "mcinitcmd" env for MC & DPL deployment
Quoted 15 lines · Pratiyush Mohan Srivastava
From: Pratiyush Mohan Srivastava <[email protected]>
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 macroMC_BOOT_ENV_VARwill be null and MC will not be booted and DPL will not be applied during U-boot booting.Signed-off-by Pratiyush Mohan Srivastava <[email protected]>Signed-off-by Prabhakar Kushwaha <[email protected]>--- 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>
Quoted 21 lines
board/freescale/ls2080aqds/eth.c +2
-0@@ -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]) &
board/freescale/ls2080aqds/eth.c int board_eth_init(bd_t *bis) · line 789
Quoted 7 lines
board/freescale/ls2080aqds/eth.c +3
-0@@ -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) +run_command_list (mc_boot_env_var,-1 ,0 ); error =cpu_eth_init (bis);
Why not put the code into cpu_eth_init()?
York
PATCH 1/1 board: ls2080a: Add "mcinitcmd" env for MC & DPL deployment
-----Original Message-----
From: york sun
Sent: Wednesday, January 20, 2016 9:32 PM
To: Pratiyush Mohan Srivastava <[email protected]>; u-boot at lists.denx.de
Cc: Prabhakar Kushwaha <[email protected]>; Pratiyush Srivastava <[email protected]>
Subject: Re: [PATCH ] board: ls2080a: Add "mcinitcmd" env for MC & DPL deployment
Quoted 16 lines · Pratiyush Mohan Srivastava
From: Pratiyush Mohan Srivastava <[email protected]>
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 macroMC_BOOT_ENV_VARwill be null and MC will not be booted and DPL will not be applied during U-boot booting.Signed-off-by: Pratiyush Mohan Srivastava
<[email protected]>Signed-off-by Prabhakar Kushwaha <[email protected]>--- 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>
Quoted 21 lines
board/freescale/ls2080aqds/eth.c +2
-0@@ -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)
board/freescale/ls2080aqds/eth.c int board_eth_init(bd_t *bis) · line 789
Quoted 7 lines
board/freescale/ls2080aqds/eth.c +3
-0} } + mc_boot_env_var =getenv (MC_BOOT_ENV_VAR ); +if (mc_boot_env_var) +run_command_list (mc_boot_env_var,-1 ,0 ); error =cpu_eth_init (bis);
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
York Sun
AppliedPATCH 1/1 board: ls2080a: Add "mcinitcmd" env for MC & DPL deployment
In reply to Pratiyush Mohan SrivastavaQuoted 7 lines · Pratiyush Mohan Srivastava
From: Pratiyush Mohan Srivastava <[email protected]>
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 macroMC_BOOT_ENV_VARwill be null and MC will not be booted and DPL will not be applied during U-boot booting.
Quoted 7 lines
Signed-off-by Pratiyush Mohan Srivastava <[email protected]>Signed-off-by Prabhakar Kushwaha <[email protected]>--- 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(+)
Applied to fsl-qoriq master. Awaiting upstream. Thanks.
York