[U-Boot,v2,2/2] imx: pcl063: add nand boot support
diff mbox series

Message ID 20190823161948.731467-2-pn@denx.de
State New
Delegated to: Stefano Babic
Headers show
Series
  • [U-Boot,v2,1/2] i.MX6: nand: extend nandbcb command for imx6UL(L)
Related show

Commit Message

Parthiban Nallathambi Aug. 23, 2019, 4:19 p.m. UTC
Booting from NAND needs nandbcb and nand boot device selection

Signed-off-by: Parthiban Nallathambi <pn@denx.de>
---

Notes:
    Changes in v2:
    - None

 board/phytec/pcl063/spl.c        | 3 +++
 configs/phycore_pcl063_defconfig | 1 +
 2 files changed, 4 insertions(+)

Comments

Peng Fan Aug. 26, 2019, 8:24 a.m. UTC | #1
> Subject: [PATCH v2 2/2] imx: pcl063: add nand boot support
> 
> Booting from NAND needs nandbcb and nand boot device selection
> 
> Signed-off-by: Parthiban Nallathambi <pn@denx.de>
> ---
> 
> Notes:
>     Changes in v2:
>     - None
> 
>  board/phytec/pcl063/spl.c        | 3 +++
>  configs/phycore_pcl063_defconfig | 1 +
>  2 files changed, 4 insertions(+)
> 
> diff --git a/board/phytec/pcl063/spl.c b/board/phytec/pcl063/spl.c index
> 6d4c827918..358156bfbc 100644
> --- a/board/phytec/pcl063/spl.c
> +++ b/board/phytec/pcl063/spl.c
> @@ -197,6 +197,9 @@ void board_boot_order(u32 *spl_boot_list)
>  	case IMX6_BMODE_EMMC:
>  		boot_dev = BOOT_DEVICE_MMC2;
>  		break;
> +	case IMX6_BMODE_NAND_MIN ... IMX6_BMODE_NAND_MAX:
> +		boot_dev = BOOT_DEVICE_NAND;
> +		break;
>  	default:
>  		/* Default - BOOT_DEVICE_MMC1 */
>  		printf("Wrong board boot order\n");
> diff --git a/configs/phycore_pcl063_defconfig
> b/configs/phycore_pcl063_defconfig
> index cf43b43924..c55670a8ff 100644
> --- a/configs/phycore_pcl063_defconfig
> +++ b/configs/phycore_pcl063_defconfig
> @@ -27,6 +27,7 @@ CONFIG_CMD_MTD=y
>  CONFIG_CMD_USB=y
>  CONFIG_CMD_USB_SDP=y
>  CONFIG_CMD_CACHE=y
> +CONFIG_CMD_NANDBCB=y
>  CONFIG_MTDIDS_DEFAULT="nand0=gpmi-nand"
>  CONFIG_MTDPARTS_DEFAULT="gpmi-nand:4m(uboot),1m(env),-(root)"
>  CONFIG_CMD_UBI=y

Reviewed-by: Peng Fan <peng.fan@nxp.com>

> --
> 2.21.0

Patch
diff mbox series

diff --git a/board/phytec/pcl063/spl.c b/board/phytec/pcl063/spl.c
index 6d4c827918..358156bfbc 100644
--- a/board/phytec/pcl063/spl.c
+++ b/board/phytec/pcl063/spl.c
@@ -197,6 +197,9 @@  void board_boot_order(u32 *spl_boot_list)
 	case IMX6_BMODE_EMMC:
 		boot_dev = BOOT_DEVICE_MMC2;
 		break;
+	case IMX6_BMODE_NAND_MIN ... IMX6_BMODE_NAND_MAX:
+		boot_dev = BOOT_DEVICE_NAND;
+		break;
 	default:
 		/* Default - BOOT_DEVICE_MMC1 */
 		printf("Wrong board boot order\n");
diff --git a/configs/phycore_pcl063_defconfig b/configs/phycore_pcl063_defconfig
index cf43b43924..c55670a8ff 100644
--- a/configs/phycore_pcl063_defconfig
+++ b/configs/phycore_pcl063_defconfig
@@ -27,6 +27,7 @@  CONFIG_CMD_MTD=y
 CONFIG_CMD_USB=y
 CONFIG_CMD_USB_SDP=y
 CONFIG_CMD_CACHE=y
+CONFIG_CMD_NANDBCB=y
 CONFIG_MTDIDS_DEFAULT="nand0=gpmi-nand"
 CONFIG_MTDPARTS_DEFAULT="gpmi-nand:4m(uboot),1m(env),-(root)"
 CONFIG_CMD_UBI=y