All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Peng Fan (OSS)" <peng.fan@oss.nxp.com>
To: "Pali Rohár" <pali@kernel.org>,
	"Priyanka Jain" <priyanka.jain@nxp.com>,
	"Qiang Zhao" <qiang.zhao@nxp.com>,
	"Shengzhou Liu" <Shengzhou.Liu@nxp.com>,
	"Sinan Akman" <sinan@writeme.com>
Cc: u-boot@lists.denx.de
Subject: Re: [PATCH v2] board: freescale: p1_p2_rdb_pc: Add env commands norlowerboot, norupperboot, sd2boot and defboot
Date: Thu, 16 Jun 2022 17:01:50 +0800	[thread overview]
Message-ID: <62f6b1ab-7da2-766f-676f-40698af49fbb@oss.nxp.com> (raw)
In-Reply-To: <20220425145043.9945-1-pali@kernel.org>



在 2022/4/25 22:50, Pali Rohár 写道:
> All *boot env commands overrides default boot source location via i2c.
> After board reset without power off, BootROM then starts booting U-Boot
> from this specified location instead of the default one.
>
> Add new env command defboot which reverts boot location to the default
> value, which in most cases is configurable by HW DIP switches.
>
> And add new env commands norlowerboot, norupperboot, sd2boot to boot from
> other locations. norlowerboot would instruct BootROM to boot from lower NOR
> bank, norupperboot from upper NOR bank and sd2boot from SD card with
> alternative configuration.
>
> Signed-off-by: Pali Rohár <pali@kernel.org>

Not able to apply this patch. Please new version.

Thanks,
Peng.
> ---
> Changes in v2:
> * Fix commit message
> * Adapt code to use p1_p2_bootsrc.h
> ---
>   include/configs/p1_p2_bootsrc.h | 20 ++++++++++++++++++++
>   include/configs/p1_p2_rdb_pc.h  | 13 +++++++++++++
>   2 files changed, 33 insertions(+)
>
> diff --git a/include/configs/p1_p2_bootsrc.h b/include/configs/p1_p2_bootsrc.h
> index a274c57786f5..60741ef544c0 100644
> --- a/include/configs/p1_p2_bootsrc.h
> +++ b/include/configs/p1_p2_bootsrc.h
> @@ -30,6 +30,18 @@
>   #define RST_NOR_CMD(var, ...) ""
>   #endif
>   
> +#ifdef __SW_BOOT_NOR_BANK_LO
> +#define RST_NOR_LO_CMD(var, ...) __VAR_CMD_RST(var, __VA_ARGS__ __BOOTSRC_CMD(__SW_BOOT_NOR_BANK_LO, __SW_BOOT_MASK))
> +#else
> +#define RST_NOR_LO_CMD(var, ...) ""
> +#endif
> +
> +#ifdef __SW_BOOT_NOR_BANK_UP
> +#define RST_NOR_UP_CMD(var, ...) __VAR_CMD_RST(var, __VA_ARGS__ __BOOTSRC_CMD(__SW_BOOT_NOR_BANK_UP, __SW_BOOT_MASK))
> +#else
> +#define RST_NOR_UP_CMD(var, ...) ""
> +#endif
> +
>   #ifdef __SW_BOOT_SPI
>   #define RST_SPI_CMD(var, ...) __VAR_CMD_RST(var, __VA_ARGS__ __BOOTSRC_CMD(__SW_BOOT_SPI, __SW_BOOT_MASK))
>   #else
> @@ -42,6 +54,12 @@
>   #define RST_SD_CMD(var, ...) ""
>   #endif
>   
> +#ifdef __SW_BOOT_SD2
> +#define RST_SD2_CMD(var, ...) __VAR_CMD_RST(var, __VA_ARGS__ __BOOTSRC_CMD(__SW_BOOT_SD2, __SW_BOOT_MASK))
> +#else
> +#define RST_SD2_CMD(var, ...) ""
> +#endif
> +
>   #ifdef __SW_BOOT_NAND
>   #define RST_NAND_CMD(var, ...) __VAR_CMD_RST(var, __VA_ARGS__ __BOOTSRC_CMD(__SW_BOOT_NAND, __SW_BOOT_MASK))
>   #else
> @@ -53,3 +71,5 @@
>   #else
>   #define RST_PCIE_CMD(var, ...) ""
>   #endif
> +
> +#define RST_DEF_CMD(var, ...) __VAR_CMD_RST(var, __VA_ARGS__ __BOOTSRC_CMD(0x00, 0xff))
> diff --git a/include/configs/p1_p2_rdb_pc.h b/include/configs/p1_p2_rdb_pc.h
> index 47bd20eeeafb..50ce2d9aaed4 100644
> --- a/include/configs/p1_p2_rdb_pc.h
> +++ b/include/configs/p1_p2_rdb_pc.h
> @@ -25,6 +25,9 @@
>   #define __SW_NOR_BANK_MASK	0xfd
>   #define __SW_NOR_BANK_UP	0x00
>   #define __SW_NOR_BANK_LO	0x02
> +#define __SW_BOOT_NOR_BANK_UP	0x5c /* (__SW_BOOT_NOR | __SW_NOR_BANK_UP) */
> +#define __SW_BOOT_NOR_BANK_LO	0x5e /* (__SW_BOOT_NOR | __SW_NOR_BANK_LO) */
> +#define __SW_BOOT_NOR_BANK_MASK	0x01 /* (__SW_BOOT_MASK & __SW_NOR_BANK_MASK) */
>   #define CONFIG_SYS_L2_SIZE	(256 << 10)
>   #endif
>   
> @@ -54,6 +57,9 @@
>   #define __SW_NOR_BANK_MASK	0xfd
>   #define __SW_NOR_BANK_UP	0x00
>   #define __SW_NOR_BANK_LO	0x02
> +#define __SW_BOOT_NOR_BANK_UP	0x64 /* (__SW_BOOT_NOR | __SW_NOR_BANK_UP) */
> +#define __SW_BOOT_NOR_BANK_LO	0x66 /* (__SW_BOOT_NOR | __SW_NOR_BANK_LO) */
> +#define __SW_BOOT_NOR_BANK_MASK	0x01 /* (__SW_BOOT_MASK & __SW_NOR_BANK_MASK) */
>   #define CONFIG_SYS_L2_SIZE	(256 << 10)
>   /*
>    * Dynamic MTD Partition support with mtdparts
> @@ -73,6 +79,9 @@
>   #define __SW_NOR_BANK_MASK	0xfd
>   #define __SW_NOR_BANK_UP	0x00
>   #define __SW_NOR_BANK_LO	0x02
> +#define __SW_BOOT_NOR_BANK_UP	0xc8 /* (__SW_BOOT_NOR | __SW_NOR_BANK_UP) */
> +#define __SW_BOOT_NOR_BANK_LO	0xca /* (__SW_BOOT_NOR | __SW_NOR_BANK_LO) */
> +#define __SW_BOOT_NOR_BANK_MASK	0x01 /* (__SW_BOOT_MASK & __SW_NOR_BANK_MASK) */
>   #define CONFIG_SYS_L2_SIZE	(512 << 10)
>   /*
>    * Dynamic MTD Partition support with mtdparts
> @@ -605,10 +614,14 @@ __VSCFW_ADDR	\
>   MAP_NOR_LO_CMD(map_lowernorbank) \
>   MAP_NOR_UP_CMD(map_uppernorbank) \
>   RST_NOR_CMD(norboot) \
> +RST_NOR_LO_CMD(norlowerboot) \
> +RST_NOR_UP_CMD(norupperboot) \
>   RST_SPI_CMD(spiboot) \
>   RST_SD_CMD(sdboot) \
> +RST_SD2_CMD(sd2boot) \
>   RST_NAND_CMD(nandboot) \
>   RST_PCIE_CMD(pciboot) \
> +RST_DEF_CMD(defboot) \
>   ""
>   
>   #define CONFIG_USB_FAT_BOOT	\


  reply	other threads:[~2022-06-16  9:02 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-07 10:16 [PATCH 00/11] board: freescale: p1_p2_rdb_pc: Various cleanups and fixes Pali Rohár
2022-04-07 10:16 ` [PATCH 01/11] board: freescale: p1_p2_rdb_pc: Do not hang in checkboard() Pali Rohár
2022-04-07 10:16 ` [PATCH 02/11] board: freescale: p1_p2_rdb_pc: Detect both P2020 SD switch configurations Pali Rohár
2022-04-07 10:16 ` [PATCH 03/11] board: freescale: p1_p2_rdb_pc: Fix parsing negated upper 4 bits from boot input data Pali Rohár
2022-04-25 14:12   ` [PATCH v2] board: freescale: p1_p2_rdb_pc: Fix parsing inverted " Pali Rohár
2022-06-16  9:00     ` Peng Fan (OSS)
2022-06-16 12:37       ` [PATCH v3] " Pali Rohár
2022-06-23 13:04         ` Pali Rohár
2022-07-03 12:39           ` Pali Rohár
2022-07-08 22:49             ` Pali Rohár
2022-07-08 23:10               ` Tom Rini
2022-07-23  9:48                 ` Pali Rohár
2022-04-07 10:16 ` [PATCH 04/11] board: freescale: p1_p2_rdb_pc: Do not set MPC85xx_PMUXCR_SDHC_WP bit when SDHC_WP is used as GPIO Pali Rohár
2022-04-07 10:16 ` [PATCH 05/11] board: freescale: p1_p2_rdb_pc: Fix page attributes for second 1G SDRAM map Pali Rohár
2022-04-07 10:16 ` [PATCH 06/11] board: freescale: p1_p2_rdb_pc: Move ifdef for USB/eLBC check to correct place Pali Rohár
2022-04-07 10:16 ` [PATCH 07/11] board: freescale: p1_p2_rdb_pc: Fix env $vscfw_addr Pali Rohár
2022-04-07 10:16 ` [PATCH 08/11] board: freescale: p1_p2_rdb_pc: Use named macros for i2c bus num and address Pali Rohár
2022-04-07 10:16 ` [PATCH 09/11] board: freescale: p1_p2_rdb_pc: Define SW macros for lower and upper NOR banks Pali Rohár
2022-04-07 10:16 ` [PATCH 10/11] board: freescale: p1_p2_rdb_pc: Move BootROM change source macros to p1_p2_bootrom.h Pali Rohár
2022-04-25 14:48   ` [PATCH v2] board: freescale: p1_p2_rdb_pc: Move boot reset macros to p1_p2_bootsrc.h Pali Rohár
2022-05-26  6:08     ` Priyanka Jain (OSS)
2022-05-26  8:32       ` Pali Rohár
2022-05-26  8:52         ` [PATCH v3] " Pali Rohár
2022-06-02 22:02           ` Pali Rohár
2022-04-07 10:16 ` [PATCH 11/11] board: freescale: p1_p2_rdb_pc: Add env commands norlowerboot, norupperboot, sd2boot and defboot Pali Rohár
2022-04-25 14:50   ` [PATCH v2] " Pali Rohár
2022-06-16  9:01     ` Peng Fan (OSS) [this message]
2022-06-23 13:43       ` Pali Rohár
2022-07-03 12:38         ` Pali Rohár
     [not found]           ` <20220708224344.jswbjxp3tdnfnmlp@pali>
2022-07-08 23:12             ` Tom Rini
2022-07-21 22:20               ` Pali Rohár
2022-08-01 13:01                 ` Pali Rohár

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=62f6b1ab-7da2-766f-676f-40698af49fbb@oss.nxp.com \
    --to=peng.fan@oss.nxp.com \
    --cc=Shengzhou.Liu@nxp.com \
    --cc=pali@kernel.org \
    --cc=priyanka.jain@nxp.com \
    --cc=qiang.zhao@nxp.com \
    --cc=sinan@writeme.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.