All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] Update env support for Am62x
@ 2023-04-28  7:53 Nikhil M Jain
  2023-04-28  7:53 ` [PATCH 1/3] board: ti: am62x: Kconfig: Add ENV_SOIRCE_FILE for am62x Nikhil M Jain
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Nikhil M Jain @ 2023-04-28  7:53 UTC (permalink / raw)
  To: u-boot, trini; +Cc: devarsht, vigneshr, nsekhar, n-francis, Nikhil M Jain

This patch series aims at updating the env support on Am62x by adding
necessary config, updating env variables, update to using
CONFIG_IS_ENABLED.

Nikhil M Jain (3):
  board: ti: am62x: Kconfig: Add ENV_SOIRCE_FILE for am62x
  board: ti: am62x: am62x: Update args_all env variable
  include: configs: am62x_evm: Use CONFIG_IS_ENABLED

 board/ti/am62x/Kconfig      | 6 ++++++
 board/ti/am62x/am62x.env    | 3 +--
 include/configs/am62x_evm.h | 8 ++++----
 3 files changed, 11 insertions(+), 6 deletions(-)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 1/3] board: ti: am62x: Kconfig: Add ENV_SOIRCE_FILE for am62x
  2023-04-28  7:53 [PATCH 0/3] Update env support for Am62x Nikhil M Jain
@ 2023-04-28  7:53 ` Nikhil M Jain
  2023-04-28 13:00   ` Tom Rini
  2023-04-28  7:53 ` [PATCH 2/3] board: ti: am62x: am62x: Update args_all env variable Nikhil M Jain
  2023-04-28  7:53 ` [PATCH 3/3] include: configs: am62x_evm: Use CONFIG_IS_ENABLED Nikhil M Jain
  2 siblings, 1 reply; 7+ messages in thread
From: Nikhil M Jain @ 2023-04-28  7:53 UTC (permalink / raw)
  To: u-boot, trini; +Cc: devarsht, vigneshr, nsekhar, n-francis, Nikhil M Jain

Set the base name for am62x to use am62x.env file, for setting
environment variable.

Signed-off-by: Nikhil M Jain <n-jain1@ti.com>
---
 board/ti/am62x/Kconfig | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/board/ti/am62x/Kconfig b/board/ti/am62x/Kconfig
index 5e8dfa3cc4..b681d8e589 100644
--- a/board/ti/am62x/Kconfig
+++ b/board/ti/am62x/Kconfig
@@ -34,6 +34,9 @@ config SYS_VENDOR
 config SYS_CONFIG_NAME
        default "am62x_evm"
 
+config ENV_SOURCE_FILE
+       default "am62x"
+
 source "board/ti/common/Kconfig"
 
 endif
@@ -52,6 +55,9 @@ config SYS_CONFIG_NAME
 config SPL_LDSCRIPT
 	default "arch/arm/mach-omap2/u-boot-spl.lds"
 
+config ENV_SOURCE_FILE
+       default "am62x"
+
 source "board/ti/common/Kconfig"
 
 endif
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 2/3] board: ti: am62x: am62x: Update args_all env variable
  2023-04-28  7:53 [PATCH 0/3] Update env support for Am62x Nikhil M Jain
  2023-04-28  7:53 ` [PATCH 1/3] board: ti: am62x: Kconfig: Add ENV_SOIRCE_FILE for am62x Nikhil M Jain
@ 2023-04-28  7:53 ` Nikhil M Jain
  2023-04-28  8:36   ` Raghavendra, Vignesh
  2023-04-28  7:53 ` [PATCH 3/3] include: configs: am62x_evm: Use CONFIG_IS_ENABLED Nikhil M Jain
  2 siblings, 1 reply; 7+ messages in thread
From: Nikhil M Jain @ 2023-04-28  7:53 UTC (permalink / raw)
  To: u-boot, trini; +Cc: devarsht, vigneshr, nsekhar, n-francis, Nikhil M Jain

Remove the earlycon settings from args_all.

Signed-off-by: Nikhil M Jain <n-jain1@ti.com>
---
 board/ti/am62x/am62x.env | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/board/ti/am62x/am62x.env b/board/ti/am62x/am62x.env
index e4e64fa637..cdd30b08ed 100644
--- a/board/ti/am62x/am62x.env
+++ b/board/ti/am62x/am62x.env
@@ -7,8 +7,7 @@ findfdt=
 	setenv fdtfile ${name_fdt}
 name_kern=Image
 console=ttyS2,115200n8
-args_all=setenv optargs ${optargs} earlycon=ns16550a,mmio32,0x02800000
-	${mtdparts}
+args_all=setenv optargs ${optargs} ${mtdparts}
 run_kern=booti ${loadaddr} ${rd_spec} ${fdtaddr}
 
 boot=mmc
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 3/3] include: configs: am62x_evm: Use CONFIG_IS_ENABLED
  2023-04-28  7:53 [PATCH 0/3] Update env support for Am62x Nikhil M Jain
  2023-04-28  7:53 ` [PATCH 1/3] board: ti: am62x: Kconfig: Add ENV_SOIRCE_FILE for am62x Nikhil M Jain
  2023-04-28  7:53 ` [PATCH 2/3] board: ti: am62x: am62x: Update args_all env variable Nikhil M Jain
@ 2023-04-28  7:53 ` Nikhil M Jain
  2023-04-28 13:01   ` Tom Rini
  2 siblings, 1 reply; 7+ messages in thread
From: Nikhil M Jain @ 2023-04-28  7:53 UTC (permalink / raw)
  To: u-boot, trini; +Cc: devarsht, vigneshr, nsekhar, n-francis, Nikhil M Jain

Update to using CONFIG_IS_ENABLED and change DISTRO_BOOT_DEV_MMC to
first attempt SD card boot and next emmc boot.

Signed-off-by: Nikhil M Jain <n-jain1@ti.com>
---
 include/configs/am62x_evm.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/include/configs/am62x_evm.h b/include/configs/am62x_evm.h
index 7bf07809b0..55ed2bc68f 100644
--- a/include/configs/am62x_evm.h
+++ b/include/configs/am62x_evm.h
@@ -15,19 +15,19 @@
 /* DDR Configuration */
 #define CFG_SYS_SDRAM_BASE1		0x880000000
 
-#ifdef CONFIG_CMD_MMC
-#define DISTRO_BOOT_DEV_MMC(func) func(MMC, mmc, 0) func(MMC, mmc, 1)
+#if CONFIG_IS_ENABLED(CMD_MMC)
+#define DISTRO_BOOT_DEV_MMC(func) func(MMC, mmc, 1) func(MMC, mmc, 0)
 #else
 #define DISTRO_BOOT_DEV_MMC(func)
 #endif
 
-#ifdef CONFIG_CMD_PXE
+#if CONFIG_IS_ENABLED(CMD_PXE)
 #define DISTRO_BOOT_DEV_PXE(func) func(PXE, pxe, na)
 #else
 #define DISTRO_BOOT_DEV_PXE(func)
 #endif
 
-#ifdef CONFIG_CMD_DHCP
+#if CONFIG_IS_ENABLED(CMD_DHCP)
 #define DISTRO_BOOT_DEV_DHCP(func) func(DHCP, dhcp, na)
 #else
 #define DISTRO_BOOT_DEV_DHCP(func)
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/3] board: ti: am62x: am62x: Update args_all env variable
  2023-04-28  7:53 ` [PATCH 2/3] board: ti: am62x: am62x: Update args_all env variable Nikhil M Jain
@ 2023-04-28  8:36   ` Raghavendra, Vignesh
  0 siblings, 0 replies; 7+ messages in thread
From: Raghavendra, Vignesh @ 2023-04-28  8:36 UTC (permalink / raw)
  To: Nikhil M Jain, u-boot, trini; +Cc: devarsht, nsekhar, n-francis



On 4/28/2023 1:23 PM, Nikhil M Jain wrote:
> Remove the earlycon settings from args_all.
> 

Could you explain why is it okay to drop earlycon?

Note, earlycon helps us to debug kernel crashes "before" kernel
initializes UART driver ... Its very useful to have it on by default

Regards
Vignesh

> Signed-off-by: Nikhil M Jain <n-jain1@ti.com>
> ---
>  board/ti/am62x/am62x.env | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/board/ti/am62x/am62x.env b/board/ti/am62x/am62x.env
> index e4e64fa637..cdd30b08ed 100644
> --- a/board/ti/am62x/am62x.env
> +++ b/board/ti/am62x/am62x.env
> @@ -7,8 +7,7 @@ findfdt=
>  	setenv fdtfile ${name_fdt}
>  name_kern=Image
>  console=ttyS2,115200n8
> -args_all=setenv optargs ${optargs} earlycon=ns16550a,mmio32,0x02800000
> -	${mtdparts}
> +args_all=setenv optargs ${optargs} ${mtdparts}
>  run_kern=booti ${loadaddr} ${rd_spec} ${fdtaddr}
>  
>  boot=mmc

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/3] board: ti: am62x: Kconfig: Add ENV_SOIRCE_FILE for am62x
  2023-04-28  7:53 ` [PATCH 1/3] board: ti: am62x: Kconfig: Add ENV_SOIRCE_FILE for am62x Nikhil M Jain
@ 2023-04-28 13:00   ` Tom Rini
  0 siblings, 0 replies; 7+ messages in thread
From: Tom Rini @ 2023-04-28 13:00 UTC (permalink / raw)
  To: Nikhil M Jain; +Cc: u-boot, devarsht, vigneshr, nsekhar, n-francis

[-- Attachment #1: Type: text/plain, Size: 903 bytes --]

On Fri, Apr 28, 2023 at 01:23:34PM +0530, Nikhil M Jain wrote:
> Set the base name for am62x to use am62x.env file, for setting
> environment variable.
> 
> Signed-off-by: Nikhil M Jain <n-jain1@ti.com>
> ---
>  board/ti/am62x/Kconfig | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/board/ti/am62x/Kconfig b/board/ti/am62x/Kconfig
> index 5e8dfa3cc4..b681d8e589 100644
> --- a/board/ti/am62x/Kconfig
> +++ b/board/ti/am62x/Kconfig
> @@ -34,6 +34,9 @@ config SYS_VENDOR
>  config SYS_CONFIG_NAME
>         default "am62x_evm"
>  
> +config ENV_SOURCE_FILE
> +       default "am62x"
> +
>  source "board/ti/common/Kconfig"
>  
>  endif

Ugh, I see I didn't catch this on j721* in time.  Please set this in the
defconfig when needed. If we can't use CONFIG_SYS_BOARD.env for the
common one, we should probably think a bit harder on what's named what.

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 3/3] include: configs: am62x_evm: Use CONFIG_IS_ENABLED
  2023-04-28  7:53 ` [PATCH 3/3] include: configs: am62x_evm: Use CONFIG_IS_ENABLED Nikhil M Jain
@ 2023-04-28 13:01   ` Tom Rini
  0 siblings, 0 replies; 7+ messages in thread
From: Tom Rini @ 2023-04-28 13:01 UTC (permalink / raw)
  To: Nikhil M Jain; +Cc: u-boot, devarsht, vigneshr, nsekhar, n-francis

[-- Attachment #1: Type: text/plain, Size: 1394 bytes --]

On Fri, Apr 28, 2023 at 01:23:36PM +0530, Nikhil M Jain wrote:
> Update to using CONFIG_IS_ENABLED and change DISTRO_BOOT_DEV_MMC to
> first attempt SD card boot and next emmc boot.
> 
> Signed-off-by: Nikhil M Jain <n-jain1@ti.com>
> ---
>  include/configs/am62x_evm.h | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/include/configs/am62x_evm.h b/include/configs/am62x_evm.h
> index 7bf07809b0..55ed2bc68f 100644
> --- a/include/configs/am62x_evm.h
> +++ b/include/configs/am62x_evm.h
> @@ -15,19 +15,19 @@
>  /* DDR Configuration */
>  #define CFG_SYS_SDRAM_BASE1		0x880000000
>  
> -#ifdef CONFIG_CMD_MMC
> -#define DISTRO_BOOT_DEV_MMC(func) func(MMC, mmc, 0) func(MMC, mmc, 1)
> +#if CONFIG_IS_ENABLED(CMD_MMC)
> +#define DISTRO_BOOT_DEV_MMC(func) func(MMC, mmc, 1) func(MMC, mmc, 0)
>  #else
>  #define DISTRO_BOOT_DEV_MMC(func)
>  #endif
>  
> -#ifdef CONFIG_CMD_PXE
> +#if CONFIG_IS_ENABLED(CMD_PXE)
>  #define DISTRO_BOOT_DEV_PXE(func) func(PXE, pxe, na)
>  #else
>  #define DISTRO_BOOT_DEV_PXE(func)
>  #endif
>  
> -#ifdef CONFIG_CMD_DHCP
> +#if CONFIG_IS_ENABLED(CMD_DHCP)
>  #define DISTRO_BOOT_DEV_DHCP(func) func(DHCP, dhcp, na)
>  #else
>  #define DISTRO_BOOT_DEV_DHCP(func)

Using CONFIG_IS_ENABLED is bad here, there's no context outside of full
U-Boot where we have CMD_foo being possible.

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-04-28 13:02 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-28  7:53 [PATCH 0/3] Update env support for Am62x Nikhil M Jain
2023-04-28  7:53 ` [PATCH 1/3] board: ti: am62x: Kconfig: Add ENV_SOIRCE_FILE for am62x Nikhil M Jain
2023-04-28 13:00   ` Tom Rini
2023-04-28  7:53 ` [PATCH 2/3] board: ti: am62x: am62x: Update args_all env variable Nikhil M Jain
2023-04-28  8:36   ` Raghavendra, Vignesh
2023-04-28  7:53 ` [PATCH 3/3] include: configs: am62x_evm: Use CONFIG_IS_ENABLED Nikhil M Jain
2023-04-28 13:01   ` Tom Rini

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.