* [U-Boot] [PATCH ] board: ls2080a: Add "mcinitcmd" env for MC & DPL deployment
@ 2016-01-20 6:59 Pratiyush Mohan Srivastava
2016-01-20 16:02 ` york sun
2016-06-10 22:23 ` York Sun
0 siblings, 2 replies; 4+ messages in thread
From: Pratiyush Mohan Srivastava @ 2016-01-20 6:59 UTC (permalink / raw
To: u-boot
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(+)
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/README.lsch3 b/arch/arm/cpu/armv8/fsl-layerscape/README.lsch3
index f9323c1..da5e052 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/README.lsch3
+++ b/arch/arm/cpu/armv8/fsl-layerscape/README.lsch3
@@ -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.
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)
+ run_command_list(mc_boot_env_var, -1, 0);
error = cpu_eth_init(bis);
if (hwconfig_f("xqsgmii", env_hwconfig)) {
diff --git a/board/freescale/ls2080ardb/eth_ls2080rdb.c b/board/freescale/ls2080ardb/eth_ls2080rdb.c
index 58ea746..758bb3d 100644
--- a/board/freescale/ls2080ardb/eth_ls2080rdb.c
+++ b/board/freescale/ls2080ardb/eth_ls2080rdb.c
@@ -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 */
--
1.9.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH ] board: ls2080a: Add "mcinitcmd" env for MC & DPL deployment
2016-01-20 6:59 [U-Boot] [PATCH ] board: ls2080a: Add "mcinitcmd" env for MC & DPL deployment Pratiyush Mohan Srivastava
@ 2016-01-20 16:02 ` york sun
2016-02-04 6:22 ` Pratiyush Srivastava
2016-06-10 22:23 ` York Sun
1 sibling, 1 reply; 4+ messages in thread
From: york sun @ 2016-01-20 16:02 UTC (permalink / raw
To: u-boot
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)
> + run_command_list(mc_boot_env_var, -1, 0);
> error = cpu_eth_init(bis);
Why not put the code into cpu_eth_init()?
York
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH ] board: ls2080a: Add "mcinitcmd" env for MC & DPL deployment
2016-01-20 16:02 ` york sun
@ 2016-02-04 6:22 ` Pratiyush Srivastava
0 siblings, 0 replies; 4+ messages in thread
From: Pratiyush Srivastava @ 2016-02-04 6:22 UTC (permalink / raw
To: u-boot
-----Original Message-----
From: york sun
Sent: Wednesday, January 20, 2016 9:32 PM
To: Pratiyush Mohan Srivastava <pratiyush.srivastava@freescale.com>; u-boot at 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)
> + 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
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH ] board: ls2080a: Add "mcinitcmd" env for MC & DPL deployment
2016-01-20 6:59 [U-Boot] [PATCH ] board: ls2080a: Add "mcinitcmd" env for MC & DPL deployment Pratiyush Mohan Srivastava
2016-01-20 16:02 ` york sun
@ 2016-06-10 22:23 ` York Sun
1 sibling, 0 replies; 4+ messages in thread
From: York Sun @ 2016-06-10 22:23 UTC (permalink / raw
To: u-boot
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(+)
Applied to fsl-qoriq master. Awaiting upstream. Thanks.
York
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-06-10 22:23 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-20 6:59 [U-Boot] [PATCH ] board: ls2080a: Add "mcinitcmd" env for MC & DPL deployment Pratiyush Mohan Srivastava
2016-01-20 16:02 ` york sun
2016-02-04 6:22 ` Pratiyush Srivastava
2016-06-10 22:23 ` York Sun
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.