* [PATCH V2 01/12] board: ti: j721e: evm: Drop unused headers
2023-11-04 7:21 [PATCH V2 00/12] board: ti: j721e: cleanup Nishanth Menon
@ 2023-11-04 7:21 ` Nishanth Menon
2023-11-07 7:02 ` Neha Malcom Francis
2023-11-22 20:49 ` Tom Rini
2023-11-04 7:21 ` [PATCH V2 02/12] board: ti: j721e: evm: Drop board check for ESM Nishanth Menon
` (10 subsequent siblings)
11 siblings, 2 replies; 24+ messages in thread
From: Nishanth Menon @ 2023-11-04 7:21 UTC (permalink / raw)
To: Tom Rini
Cc: Heinrich Schuchardt, Sinthu Raja, Manorit Chawdhry, Reid Tonking,
Neha Malcom Francis, Andrew Davis, Simon Glass, Robert Nelson,
Jason Kridner, Nishanth Menon, u-boot
Drop headers that are no longer necessary for build
Signed-off-by: Nishanth Menon <nm@ti.com>
---
board/ti/j721e/evm.c | 8 --------
1 file changed, 8 deletions(-)
diff --git a/board/ti/j721e/evm.c b/board/ti/j721e/evm.c
index d4f7c1d9f938..aa22f1653fec 100644
--- a/board/ti/j721e/evm.c
+++ b/board/ti/j721e/evm.c
@@ -8,21 +8,13 @@
*/
#include <common.h>
-#include <env.h>
-#include <fdt_support.h>
#include <generic-phy.h>
#include <image.h>
-#include <init.h>
-#include <log.h>
#include <net.h>
#include <asm/arch/hardware.h>
-#include <asm/global_data.h>
#include <asm/gpio.h>
-#include <asm/io.h>
#include <spl.h>
#include <dm.h>
-#include <dm/uclass-internal.h>
-#include <linux/printk.h>
#include "../common/board_detect.h"
--
2.37.2
^ permalink raw reply related [flat|nested] 24+ messages in thread* Re: [PATCH V2 01/12] board: ti: j721e: evm: Drop unused headers
2023-11-04 7:21 ` [PATCH V2 01/12] board: ti: j721e: evm: Drop unused headers Nishanth Menon
@ 2023-11-07 7:02 ` Neha Malcom Francis
2023-11-22 20:49 ` Tom Rini
1 sibling, 0 replies; 24+ messages in thread
From: Neha Malcom Francis @ 2023-11-07 7:02 UTC (permalink / raw)
To: Nishanth Menon, Tom Rini
Cc: Heinrich Schuchardt, Sinthu Raja, Manorit Chawdhry, Reid Tonking,
Andrew Davis, Simon Glass, Robert Nelson, Jason Kridner, u-boot
Hi Nishanth,
On 04/11/23 12:51, Nishanth Menon wrote:
> Drop headers that are no longer necessary for build
>
> Signed-off-by: Nishanth Menon <nm@ti.com>
> ---
> board/ti/j721e/evm.c | 8 --------
> 1 file changed, 8 deletions(-)
>
> diff --git a/board/ti/j721e/evm.c b/board/ti/j721e/evm.c
> index d4f7c1d9f938..aa22f1653fec 100644
> --- a/board/ti/j721e/evm.c
> +++ b/board/ti/j721e/evm.c
> @@ -8,21 +8,13 @@
> */
>
> #include <common.h>
> -#include <env.h>
> -#include <fdt_support.h>
> #include <generic-phy.h>
> #include <image.h>
> -#include <init.h>
> -#include <log.h>
> #include <net.h>
> #include <asm/arch/hardware.h>
> -#include <asm/global_data.h>
> #include <asm/gpio.h>
> -#include <asm/io.h>
> #include <spl.h>
> #include <dm.h>
> -#include <dm/uclass-internal.h>
> -#include <linux/printk.h>
>
> #include "../common/board_detect.h"
>
Reviewed-by: Neha Malcom Francis <n-francis@ti.com>
--
Thanking You
Neha Malcom Francis
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH V2 01/12] board: ti: j721e: evm: Drop unused headers
2023-11-04 7:21 ` [PATCH V2 01/12] board: ti: j721e: evm: Drop unused headers Nishanth Menon
2023-11-07 7:02 ` Neha Malcom Francis
@ 2023-11-22 20:49 ` Tom Rini
1 sibling, 0 replies; 24+ messages in thread
From: Tom Rini @ 2023-11-22 20:49 UTC (permalink / raw)
To: Nishanth Menon
Cc: Heinrich Schuchardt, Sinthu Raja, Manorit Chawdhry, Reid Tonking,
Neha Malcom Francis, Andrew Davis, Simon Glass, Robert Nelson,
Jason Kridner, u-boot
[-- Attachment #1: Type: text/plain, Size: 289 bytes --]
On Sat, Nov 04, 2023 at 02:21:39AM -0500, Nishanth Menon wrote:
> Drop headers that are no longer necessary for build
>
> Signed-off-by: Nishanth Menon <nm@ti.com>
> Reviewed-by: Neha Malcom Francis <n-francis@ti.com>
For the series, applied to u-boot/next, thanks!
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH V2 02/12] board: ti: j721e: evm: Drop board check for ESM
2023-11-04 7:21 [PATCH V2 00/12] board: ti: j721e: cleanup Nishanth Menon
2023-11-04 7:21 ` [PATCH V2 01/12] board: ti: j721e: evm: Drop unused headers Nishanth Menon
@ 2023-11-04 7:21 ` Nishanth Menon
2023-11-07 7:06 ` Neha Malcom Francis
2023-11-04 7:21 ` [PATCH V2 03/12] board: ti: j721e: evm: Switch to using IS_ENABLED Nishanth Menon
` (9 subsequent siblings)
11 siblings, 1 reply; 24+ messages in thread
From: Nishanth Menon @ 2023-11-04 7:21 UTC (permalink / raw)
To: Tom Rini
Cc: Heinrich Schuchardt, Sinthu Raja, Manorit Chawdhry, Reid Tonking,
Neha Malcom Francis, Andrew Davis, Simon Glass, Robert Nelson,
Jason Kridner, Nishanth Menon, u-boot
When config is enabled, the esm dt probe makes sense. Simplify by
dropping board specific checks.
Signed-off-by: Nishanth Menon <nm@ti.com>
---
board/ti/j721e/evm.c | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/board/ti/j721e/evm.c b/board/ti/j721e/evm.c
index aa22f1653fec..8f0996c32ee6 100644
--- a/board/ti/j721e/evm.c
+++ b/board/ti/j721e/evm.c
@@ -523,10 +523,8 @@ err_free_gpio:
void spl_board_init(void)
{
-#if defined(CONFIG_ESM_K3) || defined(CONFIG_ESM_PMIC)
struct udevice *dev;
int ret;
-#endif
if ((IS_ENABLED(CONFIG_TARGET_J721E_A72_EVM) ||
IS_ENABLED(CONFIG_TARGET_J7200_A72_EVM)) &&
@@ -535,24 +533,20 @@ void spl_board_init(void)
probe_daughtercards();
}
-#ifdef CONFIG_ESM_K3
- if (board_ti_k3_is("J721EX-PM2-SOM")) {
+ if (IS_ENABLED(CONFIG_ESM_K3)) {
ret = uclass_get_device_by_driver(UCLASS_MISC,
DM_DRIVER_GET(k3_esm), &dev);
if (ret)
printf("ESM init failed: %d\n", ret);
}
-#endif
-#ifdef CONFIG_ESM_PMIC
- if (board_ti_k3_is("J721EX-PM2-SOM")) {
+ if (IS_ENABLED(CONFIG_ESM_PMIC)) {
ret = uclass_get_device_by_driver(UCLASS_MISC,
DM_DRIVER_GET(pmic_esm),
&dev);
if (ret)
printf("ESM PMIC init failed: %d\n", ret);
}
-#endif
if ((IS_ENABLED(CONFIG_TARGET_J7200_A72_EVM) || IS_ENABLED(CONFIG_TARGET_J721E_A72_EVM)) &&
IS_ENABLED(CONFIG_HBMC_AM654)) {
struct udevice *dev;
--
2.37.2
^ permalink raw reply related [flat|nested] 24+ messages in thread* Re: [PATCH V2 02/12] board: ti: j721e: evm: Drop board check for ESM
2023-11-04 7:21 ` [PATCH V2 02/12] board: ti: j721e: evm: Drop board check for ESM Nishanth Menon
@ 2023-11-07 7:06 ` Neha Malcom Francis
0 siblings, 0 replies; 24+ messages in thread
From: Neha Malcom Francis @ 2023-11-07 7:06 UTC (permalink / raw)
To: Nishanth Menon, Tom Rini
Cc: Heinrich Schuchardt, Sinthu Raja, Manorit Chawdhry, Reid Tonking,
Andrew Davis, Simon Glass, Robert Nelson, Jason Kridner, u-boot
Hi Nishanth,
On 04/11/23 12:51, Nishanth Menon wrote:
> When config is enabled, the esm dt probe makes sense. Simplify by
> dropping board specific checks.
>
> Signed-off-by: Nishanth Menon <nm@ti.com>
> ---
> board/ti/j721e/evm.c | 10 ++--------
> 1 file changed, 2 insertions(+), 8 deletions(-)
>
> diff --git a/board/ti/j721e/evm.c b/board/ti/j721e/evm.c
> index aa22f1653fec..8f0996c32ee6 100644
> --- a/board/ti/j721e/evm.c
> +++ b/board/ti/j721e/evm.c
> @@ -523,10 +523,8 @@ err_free_gpio:
>
> void spl_board_init(void)
> {
> -#if defined(CONFIG_ESM_K3) || defined(CONFIG_ESM_PMIC)
> struct udevice *dev;
> int ret;
> -#endif
>
> if ((IS_ENABLED(CONFIG_TARGET_J721E_A72_EVM) ||
> IS_ENABLED(CONFIG_TARGET_J7200_A72_EVM)) &&
> @@ -535,24 +533,20 @@ void spl_board_init(void)
> probe_daughtercards();
> }
>
> -#ifdef CONFIG_ESM_K3
> - if (board_ti_k3_is("J721EX-PM2-SOM")) {
> + if (IS_ENABLED(CONFIG_ESM_K3)) {
> ret = uclass_get_device_by_driver(UCLASS_MISC,
> DM_DRIVER_GET(k3_esm), &dev);
> if (ret)
> printf("ESM init failed: %d\n", ret);
> }
> -#endif
>
> -#ifdef CONFIG_ESM_PMIC
> - if (board_ti_k3_is("J721EX-PM2-SOM")) {
> + if (IS_ENABLED(CONFIG_ESM_PMIC)) {
> ret = uclass_get_device_by_driver(UCLASS_MISC,
> DM_DRIVER_GET(pmic_esm),
> &dev);
> if (ret)
> printf("ESM PMIC init failed: %d\n", ret);
> }
> -#endif
Add empty line here?
> if ((IS_ENABLED(CONFIG_TARGET_J7200_A72_EVM) || IS_ENABLED(CONFIG_TARGET_J721E_A72_EVM)) &&
> IS_ENABLED(CONFIG_HBMC_AM654)) {
> struct udevice *dev;
Reviewed-by: Neha Malcom Francis <n-francis@ti.com>
--
Thanking You
Neha Malcom Francis
^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH V2 03/12] board: ti: j721e: evm: Switch to using IS_ENABLED
2023-11-04 7:21 [PATCH V2 00/12] board: ti: j721e: cleanup Nishanth Menon
2023-11-04 7:21 ` [PATCH V2 01/12] board: ti: j721e: evm: Drop unused headers Nishanth Menon
2023-11-04 7:21 ` [PATCH V2 02/12] board: ti: j721e: evm: Drop board check for ESM Nishanth Menon
@ 2023-11-04 7:21 ` Nishanth Menon
2023-11-07 7:08 ` Neha Malcom Francis
2023-11-04 7:21 ` [PATCH V2 04/12] board: ti: j721e: j721e.env: Add explicit boot_targets Nishanth Menon
` (8 subsequent siblings)
11 siblings, 1 reply; 24+ messages in thread
From: Nishanth Menon @ 2023-11-04 7:21 UTC (permalink / raw)
To: Tom Rini
Cc: Heinrich Schuchardt, Sinthu Raja, Manorit Chawdhry, Reid Tonking,
Neha Malcom Francis, Andrew Davis, Simon Glass, Robert Nelson,
Jason Kridner, Nishanth Menon, u-boot
Switch to using IS_ENABLED() for inline function usage.
Signed-off-by: Nishanth Menon <nm@ti.com>
---
board/ti/j721e/evm.c | 83 ++++++++++++++++++++++----------------------
1 file changed, 42 insertions(+), 41 deletions(-)
diff --git a/board/ti/j721e/evm.c b/board/ti/j721e/evm.c
index 8f0996c32ee6..17640ae79665 100644
--- a/board/ti/j721e/evm.c
+++ b/board/ti/j721e/evm.c
@@ -300,53 +300,54 @@ static int probe_daughtercards(void)
printf("Detected: %s rev %s\n", ep.name, ep.version);
daughter_card_detect_flags[i] = true;
-#ifndef CONFIG_SPL_BUILD
- int j;
- /*
- * Populate any MAC addresses from daughtercard into the U-Boot
- * environment, starting with a card-specific offset so we can
- * have multiple ext_cards contribute to the MAC pool in a well-
- * defined manner.
- */
- for (j = 0; j < mac_addr_cnt; j++) {
- if (!is_valid_ethaddr((u8 *)mac_addr[j]))
- continue;
-
- eth_env_set_enetaddr_by_index("eth",
- ext_cards[i].eth_offset + j,
- (uchar *)mac_addr[j]);
+ if (!IS_ENABLED(CONFIG_SPL_BUILD)) {
+ int j;
+ /*
+ * Populate any MAC addresses from daughtercard into the U-Boot
+ * environment, starting with a card-specific offset so we can
+ * have multiple ext_cards contribute to the MAC pool in a well-
+ * defined manner.
+ */
+ for (j = 0; j < mac_addr_cnt; j++) {
+ if (!is_valid_ethaddr((u8 *)mac_addr[j]))
+ continue;
+
+ eth_env_set_enetaddr_by_index("eth",
+ ext_cards[i].eth_offset + j,
+ (uchar *)mac_addr[j]);
+ }
}
-#endif
}
-#ifndef CONFIG_SPL_BUILD
- char name_overlays[1024] = { 0 };
- for (i = 0; i < ARRAY_SIZE(ext_cards); i++) {
- if (!daughter_card_detect_flags[i])
- continue;
+ if (!IS_ENABLED(CONFIG_SPL_BUILD)) {
+ char name_overlays[1024] = { 0 };
- /* Skip if no overlays are to be added */
- if (!strlen(ext_cards[i].dtbo_name))
- continue;
+ for (i = 0; i < ARRAY_SIZE(ext_cards); i++) {
+ if (!daughter_card_detect_flags[i])
+ continue;
- /*
- * Make sure we are not running out of buffer space by checking
- * if we can fit the new overlay, a trailing space to be used
- * as a separator, plus the terminating zero.
- */
- if (strlen(name_overlays) + strlen(ext_cards[i].dtbo_name) + 2 >
- sizeof(name_overlays))
- return -ENOMEM;
-
- /* Append to our list of overlays */
- strcat(name_overlays, ext_cards[i].dtbo_name);
- strcat(name_overlays, " ");
- }
+ /* Skip if no overlays are to be added */
+ if (!strlen(ext_cards[i].dtbo_name))
+ continue;
- /* Apply device tree overlay(s) to the U-Boot environment, if any */
- if (strlen(name_overlays))
- return env_set("name_overlays", name_overlays);
-#endif
+ /*
+ * Make sure we are not running out of buffer space by checking
+ * if we can fit the new overlay, a trailing space to be used
+ * as a separator, plus the terminating zero.
+ */
+ if (strlen(name_overlays) + strlen(ext_cards[i].dtbo_name) + 2 >
+ sizeof(name_overlays))
+ return -ENOMEM;
+
+ /* Append to our list of overlays */
+ strcat(name_overlays, ext_cards[i].dtbo_name);
+ strcat(name_overlays, " ");
+ }
+
+ /* Apply device tree overlay(s) to the U-Boot environment, if any */
+ if (strlen(name_overlays))
+ return env_set("name_overlays", name_overlays);
+ }
return 0;
}
--
2.37.2
^ permalink raw reply related [flat|nested] 24+ messages in thread* Re: [PATCH V2 03/12] board: ti: j721e: evm: Switch to using IS_ENABLED
2023-11-04 7:21 ` [PATCH V2 03/12] board: ti: j721e: evm: Switch to using IS_ENABLED Nishanth Menon
@ 2023-11-07 7:08 ` Neha Malcom Francis
0 siblings, 0 replies; 24+ messages in thread
From: Neha Malcom Francis @ 2023-11-07 7:08 UTC (permalink / raw)
To: Nishanth Menon, Tom Rini
Cc: Heinrich Schuchardt, Sinthu Raja, Manorit Chawdhry, Reid Tonking,
Andrew Davis, Simon Glass, Robert Nelson, Jason Kridner, u-boot
Hi Nishanth,
On 04/11/23 12:51, Nishanth Menon wrote:
> Switch to using IS_ENABLED() for inline function usage.
>
> Signed-off-by: Nishanth Menon <nm@ti.com>
> ---
> board/ti/j721e/evm.c | 83 ++++++++++++++++++++++----------------------
> 1 file changed, 42 insertions(+), 41 deletions(-)
>
> diff --git a/board/ti/j721e/evm.c b/board/ti/j721e/evm.c
> index 8f0996c32ee6..17640ae79665 100644
> --- a/board/ti/j721e/evm.c
> +++ b/board/ti/j721e/evm.c
> @@ -300,53 +300,54 @@ static int probe_daughtercards(void)
> printf("Detected: %s rev %s\n", ep.name, ep.version);
> daughter_card_detect_flags[i] = true;
>
> -#ifndef CONFIG_SPL_BUILD
> - int j;
> - /*
> - * Populate any MAC addresses from daughtercard into the U-Boot
> - * environment, starting with a card-specific offset so we can
> - * have multiple ext_cards contribute to the MAC pool in a well-
> - * defined manner.
> - */
> - for (j = 0; j < mac_addr_cnt; j++) {
> - if (!is_valid_ethaddr((u8 *)mac_addr[j]))
> - continue;
> -
> - eth_env_set_enetaddr_by_index("eth",
> - ext_cards[i].eth_offset + j,
> - (uchar *)mac_addr[j]);
> + if (!IS_ENABLED(CONFIG_SPL_BUILD)) {
> + int j;
> + /*
> + * Populate any MAC addresses from daughtercard into the U-Boot
> + * environment, starting with a card-specific offset so we can
> + * have multiple ext_cards contribute to the MAC pool in a well-
> + * defined manner.
> + */
> + for (j = 0; j < mac_addr_cnt; j++) {
> + if (!is_valid_ethaddr((u8 *)mac_addr[j]))
> + continue;
> +
> + eth_env_set_enetaddr_by_index("eth",
> + ext_cards[i].eth_offset + j,
> + (uchar *)mac_addr[j]);
> + }
> }
> -#endif
> }
> -#ifndef CONFIG_SPL_BUILD
> - char name_overlays[1024] = { 0 };
>
> - for (i = 0; i < ARRAY_SIZE(ext_cards); i++) {
> - if (!daughter_card_detect_flags[i])
> - continue;
> + if (!IS_ENABLED(CONFIG_SPL_BUILD)) {
> + char name_overlays[1024] = { 0 };
>
> - /* Skip if no overlays are to be added */
> - if (!strlen(ext_cards[i].dtbo_name))
> - continue;
> + for (i = 0; i < ARRAY_SIZE(ext_cards); i++) {
> + if (!daughter_card_detect_flags[i])
> + continue;
>
> - /*
> - * Make sure we are not running out of buffer space by checking
> - * if we can fit the new overlay, a trailing space to be used
> - * as a separator, plus the terminating zero.
> - */
> - if (strlen(name_overlays) + strlen(ext_cards[i].dtbo_name) + 2 >
> - sizeof(name_overlays))
> - return -ENOMEM;
> -
> - /* Append to our list of overlays */
> - strcat(name_overlays, ext_cards[i].dtbo_name);
> - strcat(name_overlays, " ");
> - }
> + /* Skip if no overlays are to be added */
> + if (!strlen(ext_cards[i].dtbo_name))
> + continue;
>
> - /* Apply device tree overlay(s) to the U-Boot environment, if any */
> - if (strlen(name_overlays))
> - return env_set("name_overlays", name_overlays);
> -#endif
> + /*
> + * Make sure we are not running out of buffer space by checking
> + * if we can fit the new overlay, a trailing space to be used
> + * as a separator, plus the terminating zero.
> + */
> + if (strlen(name_overlays) + strlen(ext_cards[i].dtbo_name) + 2 >
> + sizeof(name_overlays))
> + return -ENOMEM;
> +
> + /* Append to our list of overlays */
> + strcat(name_overlays, ext_cards[i].dtbo_name);
> + strcat(name_overlays, " ");
> + }
> +
> + /* Apply device tree overlay(s) to the U-Boot environment, if any */
> + if (strlen(name_overlays))
> + return env_set("name_overlays", name_overlays);
> + }
>
> return 0;
> }
Reviewed-by: Neha Malcom Francis <n-francis@ti.com>
--
Thanking You
Neha Malcom Francis
^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH V2 04/12] board: ti: j721e: j721e.env: Add explicit boot_targets
2023-11-04 7:21 [PATCH V2 00/12] board: ti: j721e: cleanup Nishanth Menon
` (2 preceding siblings ...)
2023-11-04 7:21 ` [PATCH V2 03/12] board: ti: j721e: evm: Switch to using IS_ENABLED Nishanth Menon
@ 2023-11-04 7:21 ` Nishanth Menon
2023-11-07 7:09 ` Neha Malcom Francis
2023-11-04 7:21 ` [PATCH V2 05/12] configs: j721e_evm_a72_defconfig: Switch to bootstd Nishanth Menon
` (7 subsequent siblings)
11 siblings, 1 reply; 24+ messages in thread
From: Nishanth Menon @ 2023-11-04 7:21 UTC (permalink / raw)
To: Tom Rini
Cc: Heinrich Schuchardt, Sinthu Raja, Manorit Chawdhry, Reid Tonking,
Neha Malcom Francis, Andrew Davis, Simon Glass, Robert Nelson,
Jason Kridner, Nishanth Menon, u-boot
Add explicit boot_targets to indicate the specific boot sequence to
follow.
Signed-off-by: Nishanth Menon <nm@ti.com>
---
board/ti/j721e/j721e.env | 1 +
1 file changed, 1 insertion(+)
diff --git a/board/ti/j721e/j721e.env b/board/ti/j721e/j721e.env
index 8cc8232fc131..cb27bf5e2b24 100644
--- a/board/ti/j721e/j721e.env
+++ b/board/ti/j721e/j721e.env
@@ -31,6 +31,7 @@ addr_mcur5f0_0load=0x89000000
name_mcur5f0_0fw=/lib/firmware/j7200-mcu-r5f0_0-fw
#endif
+boot_targets=mmc1 mmc0 usb pxe dhcp
boot=mmc
mmcdev=1
bootpart=1:2
--
2.37.2
^ permalink raw reply related [flat|nested] 24+ messages in thread* Re: [PATCH V2 04/12] board: ti: j721e: j721e.env: Add explicit boot_targets
2023-11-04 7:21 ` [PATCH V2 04/12] board: ti: j721e: j721e.env: Add explicit boot_targets Nishanth Menon
@ 2023-11-07 7:09 ` Neha Malcom Francis
0 siblings, 0 replies; 24+ messages in thread
From: Neha Malcom Francis @ 2023-11-07 7:09 UTC (permalink / raw)
To: Nishanth Menon, Tom Rini
Cc: Heinrich Schuchardt, Sinthu Raja, Manorit Chawdhry, Reid Tonking,
Andrew Davis, Simon Glass, Robert Nelson, Jason Kridner, u-boot
Hi Nishanth,
On 04/11/23 12:51, Nishanth Menon wrote:
> Add explicit boot_targets to indicate the specific boot sequence to
> follow.
>
> Signed-off-by: Nishanth Menon <nm@ti.com>
> ---
> board/ti/j721e/j721e.env | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/board/ti/j721e/j721e.env b/board/ti/j721e/j721e.env
> index 8cc8232fc131..cb27bf5e2b24 100644
> --- a/board/ti/j721e/j721e.env
> +++ b/board/ti/j721e/j721e.env
> @@ -31,6 +31,7 @@ addr_mcur5f0_0load=0x89000000
> name_mcur5f0_0fw=/lib/firmware/j7200-mcu-r5f0_0-fw
> #endif
>
> +boot_targets=mmc1 mmc0 usb pxe dhcp
> boot=mmc
> mmcdev=1
> bootpart=1:2
Reviewed-by: Neha Malcom Francis <n-francis@ti.com>
--
Thanking You
Neha Malcom Francis
^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH V2 05/12] configs: j721e_evm_a72_defconfig: Switch to bootstd
2023-11-04 7:21 [PATCH V2 00/12] board: ti: j721e: cleanup Nishanth Menon
` (3 preceding siblings ...)
2023-11-04 7:21 ` [PATCH V2 04/12] board: ti: j721e: j721e.env: Add explicit boot_targets Nishanth Menon
@ 2023-11-04 7:21 ` Nishanth Menon
2023-11-07 7:09 ` Neha Malcom Francis
2023-11-04 7:21 ` [PATCH V2 06/12] arm: mach-k3: Kconfig: Introduce a symbol to indicate J7200 Nishanth Menon
` (6 subsequent siblings)
11 siblings, 1 reply; 24+ messages in thread
From: Nishanth Menon @ 2023-11-04 7:21 UTC (permalink / raw)
To: Tom Rini
Cc: Heinrich Schuchardt, Sinthu Raja, Manorit Chawdhry, Reid Tonking,
Neha Malcom Francis, Andrew Davis, Simon Glass, Robert Nelson,
Jason Kridner, Nishanth Menon, u-boot
Switch to using bootstd. Note with this change, we will stop using
distro_bootcmd and instead depend entirely on bootflow method of
starting the system up.
Signed-off-by: Nishanth Menon <nm@ti.com>
---
configs/j721e_evm_a72_defconfig | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/configs/j721e_evm_a72_defconfig b/configs/j721e_evm_a72_defconfig
index 99e0e168ebf7..98ac7ca59789 100644
--- a/configs/j721e_evm_a72_defconfig
+++ b/configs/j721e_evm_a72_defconfig
@@ -29,10 +29,11 @@ CONFIG_SPL_SPI=y
# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
CONFIG_SPL_LOAD_FIT=y
CONFIG_SPL_LOAD_FIT_ADDRESS=0x81000000
-CONFIG_DISTRO_DEFAULTS=y
CONFIG_OF_BOARD_SETUP=y
CONFIG_OF_SYSTEM_SETUP=y
-CONFIG_BOOTCOMMAND="run envboot; run distro_bootcmd;"
+CONFIG_BOOTSTD_FULL=y
+CONFIG_BOOTSTD_DEFAULTS=y
+CONFIG_BOOTCOMMAND="run envboot; bootflow scan -lb"
CONFIG_LOGLEVEL=7
CONFIG_SPL_MAX_SIZE=0xc0000
CONFIG_SPL_HAS_BSS_LINKER_SECTION=y
--
2.37.2
^ permalink raw reply related [flat|nested] 24+ messages in thread* Re: [PATCH V2 05/12] configs: j721e_evm_a72_defconfig: Switch to bootstd
2023-11-04 7:21 ` [PATCH V2 05/12] configs: j721e_evm_a72_defconfig: Switch to bootstd Nishanth Menon
@ 2023-11-07 7:09 ` Neha Malcom Francis
0 siblings, 0 replies; 24+ messages in thread
From: Neha Malcom Francis @ 2023-11-07 7:09 UTC (permalink / raw)
To: Nishanth Menon, Tom Rini
Cc: Heinrich Schuchardt, Sinthu Raja, Manorit Chawdhry, Reid Tonking,
Andrew Davis, Simon Glass, Robert Nelson, Jason Kridner, u-boot
Hi Nishanth
On 04/11/23 12:51, Nishanth Menon wrote:
> Switch to using bootstd. Note with this change, we will stop using
> distro_bootcmd and instead depend entirely on bootflow method of
> starting the system up.
>
> Signed-off-by: Nishanth Menon <nm@ti.com>
> ---
> configs/j721e_evm_a72_defconfig | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/configs/j721e_evm_a72_defconfig b/configs/j721e_evm_a72_defconfig
> index 99e0e168ebf7..98ac7ca59789 100644
> --- a/configs/j721e_evm_a72_defconfig
> +++ b/configs/j721e_evm_a72_defconfig
> @@ -29,10 +29,11 @@ CONFIG_SPL_SPI=y
> # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
> CONFIG_SPL_LOAD_FIT=y
> CONFIG_SPL_LOAD_FIT_ADDRESS=0x81000000
> -CONFIG_DISTRO_DEFAULTS=y
> CONFIG_OF_BOARD_SETUP=y
> CONFIG_OF_SYSTEM_SETUP=y
> -CONFIG_BOOTCOMMAND="run envboot; run distro_bootcmd;"
> +CONFIG_BOOTSTD_FULL=y
> +CONFIG_BOOTSTD_DEFAULTS=y
> +CONFIG_BOOTCOMMAND="run envboot; bootflow scan -lb"
> CONFIG_LOGLEVEL=7
> CONFIG_SPL_MAX_SIZE=0xc0000
> CONFIG_SPL_HAS_BSS_LINKER_SECTION=y
Reviewed-by: Neha Malcom Francis <n-francis@ti.com>
--
Thanking You
Neha Malcom Francis
^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH V2 06/12] arm: mach-k3: Kconfig: Introduce a symbol to indicate J7200
2023-11-04 7:21 [PATCH V2 00/12] board: ti: j721e: cleanup Nishanth Menon
` (4 preceding siblings ...)
2023-11-04 7:21 ` [PATCH V2 05/12] configs: j721e_evm_a72_defconfig: Switch to bootstd Nishanth Menon
@ 2023-11-04 7:21 ` Nishanth Menon
2023-11-06 16:45 ` Andrew Davis
2023-11-04 7:21 ` [PATCH V2 07/12] board: ti: j721e: Select SOC_K3_J721E_J7200 for J7200evm Nishanth Menon
` (5 subsequent siblings)
11 siblings, 1 reply; 24+ messages in thread
From: Nishanth Menon @ 2023-11-04 7:21 UTC (permalink / raw)
To: Tom Rini
Cc: Heinrich Schuchardt, Sinthu Raja, Manorit Chawdhry, Reid Tonking,
Neha Malcom Francis, Andrew Davis, Simon Glass, Robert Nelson,
Jason Kridner, Nishanth Menon, u-boot
J7200 shares quite a few characteristics with J721E. However a few sets
are different. Introduce a Kconfig to differentiate the two to allow for
new boards to be introduced in a seamless manner.
Signed-off-by: Nishanth Menon <nm@ti.com>
---
arch/arm/mach-k3/Kconfig | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/arch/arm/mach-k3/Kconfig b/arch/arm/mach-k3/Kconfig
index 9168bf842dca..57e2dd966eb8 100644
--- a/arch/arm/mach-k3/Kconfig
+++ b/arch/arm/mach-k3/Kconfig
@@ -24,6 +24,11 @@ config SOC_K3_AM62A7
endchoice
+if SOC_K3_J721E
+config SOC_K3_J721E_J7200
+ bool "TI's K3 based J7200 SoC variant Family Support"
+endif
+
config SYS_SOC
default "k3"
--
2.37.2
^ permalink raw reply related [flat|nested] 24+ messages in thread* Re: [PATCH V2 06/12] arm: mach-k3: Kconfig: Introduce a symbol to indicate J7200
2023-11-04 7:21 ` [PATCH V2 06/12] arm: mach-k3: Kconfig: Introduce a symbol to indicate J7200 Nishanth Menon
@ 2023-11-06 16:45 ` Andrew Davis
2023-11-06 16:50 ` Nishanth Menon
0 siblings, 1 reply; 24+ messages in thread
From: Andrew Davis @ 2023-11-06 16:45 UTC (permalink / raw)
To: Nishanth Menon, Tom Rini
Cc: Heinrich Schuchardt, Sinthu Raja, Manorit Chawdhry, Reid Tonking,
Neha Malcom Francis, Simon Glass, Robert Nelson, Jason Kridner,
u-boot
On 11/4/23 2:21 AM, Nishanth Menon wrote:
> J7200 shares quite a few characteristics with J721E. However a few sets
> are different. Introduce a Kconfig to differentiate the two to allow for
> new boards to be introduced in a seamless manner.
>
> Signed-off-by: Nishanth Menon <nm@ti.com>
> ---
> arch/arm/mach-k3/Kconfig | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/arch/arm/mach-k3/Kconfig b/arch/arm/mach-k3/Kconfig
> index 9168bf842dca..57e2dd966eb8 100644
> --- a/arch/arm/mach-k3/Kconfig
> +++ b/arch/arm/mach-k3/Kconfig
> @@ -24,6 +24,11 @@ config SOC_K3_AM62A7
>
> endchoice
>
> +if SOC_K3_J721E
> +config SOC_K3_J721E_J7200
I'm sure you know how messy this is :(
We wanted to treat J7200 as a proper subset device of J721e but we
also know that didn't happen. These two SoCs ended up more different
than expected and although still very similar I believe continuing
to try to support both under one name is not the right solution.
We will split out J7200 from J721e in TF-A[0] for similar reasons,
might be time to do the same in u-boot.
Andrew
[0] https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/23970
> + bool "TI's K3 based J7200 SoC variant Family Support"
> +endif
> +
> config SYS_SOC
> default "k3"
>
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH V2 06/12] arm: mach-k3: Kconfig: Introduce a symbol to indicate J7200
2023-11-06 16:45 ` Andrew Davis
@ 2023-11-06 16:50 ` Nishanth Menon
0 siblings, 0 replies; 24+ messages in thread
From: Nishanth Menon @ 2023-11-06 16:50 UTC (permalink / raw)
To: Andrew Davis
Cc: Tom Rini, Heinrich Schuchardt, Sinthu Raja, Manorit Chawdhry,
Reid Tonking, Neha Malcom Francis, Simon Glass, Robert Nelson,
Jason Kridner, u-boot
On 10:45-20231106, Andrew Davis wrote:
> On 11/4/23 2:21 AM, Nishanth Menon wrote:
> > J7200 shares quite a few characteristics with J721E. However a few sets
> > are different. Introduce a Kconfig to differentiate the two to allow for
> > new boards to be introduced in a seamless manner.
> >
> > Signed-off-by: Nishanth Menon <nm@ti.com>
> > ---
> > arch/arm/mach-k3/Kconfig | 5 +++++
> > 1 file changed, 5 insertions(+)
> >
> > diff --git a/arch/arm/mach-k3/Kconfig b/arch/arm/mach-k3/Kconfig
> > index 9168bf842dca..57e2dd966eb8 100644
> > --- a/arch/arm/mach-k3/Kconfig
> > +++ b/arch/arm/mach-k3/Kconfig
> > @@ -24,6 +24,11 @@ config SOC_K3_AM62A7
> > endchoice
> > +if SOC_K3_J721E
> > +config SOC_K3_J721E_J7200
>
> I'm sure you know how messy this is :(
>
> We wanted to treat J7200 as a proper subset device of J721e but we
> also know that didn't happen. These two SoCs ended up more different
> than expected and although still very similar I believe continuing
> to try to support both under one name is not the right solution.
>
> We will split out J7200 from J721e in TF-A[0] for similar reasons,
> might be time to do the same in u-boot.
Yes, I am aware. A follow on series to cleanup J7200 will be appreciated.
--
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D
^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH V2 07/12] board: ti: j721e: Select SOC_K3_J721E_J7200 for J7200evm
2023-11-04 7:21 [PATCH V2 00/12] board: ti: j721e: cleanup Nishanth Menon
` (5 preceding siblings ...)
2023-11-04 7:21 ` [PATCH V2 06/12] arm: mach-k3: Kconfig: Introduce a symbol to indicate J7200 Nishanth Menon
@ 2023-11-04 7:21 ` Nishanth Menon
2023-11-04 7:21 ` [PATCH V2 08/12] arm: mach-k3: arm64-mmu: Refactor to be independent of board Nishanth Menon
` (4 subsequent siblings)
11 siblings, 0 replies; 24+ messages in thread
From: Nishanth Menon @ 2023-11-04 7:21 UTC (permalink / raw)
To: Tom Rini
Cc: Heinrich Schuchardt, Sinthu Raja, Manorit Chawdhry, Reid Tonking,
Neha Malcom Francis, Andrew Davis, Simon Glass, Robert Nelson,
Jason Kridner, Nishanth Menon, u-boot
Enable SOC_K3_J721E_J7200 when board is J7200 EVM - this allows us to
differentiate J7200 platform cleanly in board independent codebase.
Signed-off-by: Nishanth Menon <nm@ti.com>
---
board/ti/j721e/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/board/ti/j721e/Kconfig b/board/ti/j721e/Kconfig
index e6cb21f77bd2..a895d7aac4ab 100644
--- a/board/ti/j721e/Kconfig
+++ b/board/ti/j721e/Kconfig
@@ -30,6 +30,7 @@ config TARGET_J721E_R5_EVM
config TARGET_J7200_A72_EVM
bool "TI K3 based J7200 EVM running on A72"
select ARM64
+ select SOC_K3_J721E_J7200
select BOARD_LATE_INIT
imply TI_I2C_BOARD_DETECT
select SYS_DISABLE_DCACHE_OPS
--
2.37.2
^ permalink raw reply related [flat|nested] 24+ messages in thread* [PATCH V2 08/12] arm: mach-k3: arm64-mmu: Refactor to be independent of board
2023-11-04 7:21 [PATCH V2 00/12] board: ti: j721e: cleanup Nishanth Menon
` (6 preceding siblings ...)
2023-11-04 7:21 ` [PATCH V2 07/12] board: ti: j721e: Select SOC_K3_J721E_J7200 for J7200evm Nishanth Menon
@ 2023-11-04 7:21 ` Nishanth Menon
2023-11-06 16:54 ` Andrew Davis
2023-11-04 7:21 ` [PATCH V2 09/12] arm: mach-k3: j721e: Improve support for UDA FS Nishanth Menon
` (3 subsequent siblings)
11 siblings, 1 reply; 24+ messages in thread
From: Nishanth Menon @ 2023-11-04 7:21 UTC (permalink / raw)
To: Tom Rini
Cc: Heinrich Schuchardt, Sinthu Raja, Manorit Chawdhry, Reid Tonking,
Neha Malcom Francis, Andrew Davis, Simon Glass, Robert Nelson,
Jason Kridner, Nishanth Menon, u-boot
Refactor J721E J7200 definition to make this independent of board
macros.
Signed-off-by: Nishanth Menon <nm@ti.com>
---
arch/arm/mach-k3/arm64-mmu.c | 50 ++++++++++++++++++------------------
1 file changed, 25 insertions(+), 25 deletions(-)
diff --git a/arch/arm/mach-k3/arm64-mmu.c b/arch/arm/mach-k3/arm64-mmu.c
index f8087d2421e7..8cb6614035a5 100644
--- a/arch/arm/mach-k3/arm64-mmu.c
+++ b/arch/arm/mach-k3/arm64-mmu.c
@@ -68,12 +68,11 @@ struct mm_region *mem_map = am654_mem_map;
#ifdef CONFIG_SOC_K3_J721E
-#ifdef CONFIG_TARGET_J721E_A72_EVM
-/* NR_DRAM_BANKS + 32bit IO + 64bit IO + terminator */
-#define NR_MMU_REGIONS (CONFIG_NR_DRAM_BANKS + 6)
+#ifdef CONFIG_SOC_K3_J721E_J7200
+#define NR_MMU_REGIONS (CONFIG_NR_DRAM_BANKS + 5)
/* ToDo: Add 64bit IO */
-struct mm_region j721e_mem_map[NR_MMU_REGIONS] = {
+struct mm_region j7200_mem_map[NR_MMU_REGIONS] = {
{
.virt = 0x0UL,
.phys = 0x0UL,
@@ -90,13 +89,13 @@ struct mm_region j721e_mem_map[NR_MMU_REGIONS] = {
}, {
.virt = 0xa0000000UL,
.phys = 0xa0000000UL,
- .size = 0x1bc00000UL,
+ .size = 0x04800000UL,
.attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL_NC) |
PTE_BLOCK_NON_SHARE
}, {
- .virt = 0xbbc00000UL,
- .phys = 0xbbc00000UL,
- .size = 0x44400000UL,
+ .virt = 0xa4800000UL,
+ .phys = 0xa4800000UL,
+ .size = 0x5b800000UL,
.attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) |
PTE_BLOCK_INNER_SHARE
}, {
@@ -112,26 +111,21 @@ struct mm_region j721e_mem_map[NR_MMU_REGIONS] = {
.attrs = PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) |
PTE_BLOCK_NON_SHARE |
PTE_BLOCK_PXN | PTE_BLOCK_UXN
- }, {
- .virt = 0x4d80000000UL,
- .phys = 0x4d80000000UL,
- .size = 0x0002000000UL,
- .attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL_NC) |
- PTE_BLOCK_INNER_SHARE
}, {
/* List terminator */
0,
}
};
-struct mm_region *mem_map = j721e_mem_map;
-#endif /* CONFIG_TARGET_J721E_A72_EVM */
+struct mm_region *mem_map = j7200_mem_map;
-#ifdef CONFIG_TARGET_J7200_A72_EVM
-#define NR_MMU_REGIONS (CONFIG_NR_DRAM_BANKS + 5)
+#else /* CONFIG_SOC_K3_J721E_J7200 */
+
+/* NR_DRAM_BANKS + 32bit IO + 64bit IO + terminator */
+#define NR_MMU_REGIONS (CONFIG_NR_DRAM_BANKS + 6)
/* ToDo: Add 64bit IO */
-struct mm_region j7200_mem_map[NR_MMU_REGIONS] = {
+struct mm_region j721e_mem_map[NR_MMU_REGIONS] = {
{
.virt = 0x0UL,
.phys = 0x0UL,
@@ -148,13 +142,13 @@ struct mm_region j7200_mem_map[NR_MMU_REGIONS] = {
}, {
.virt = 0xa0000000UL,
.phys = 0xa0000000UL,
- .size = 0x04800000UL,
+ .size = 0x1bc00000UL,
.attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL_NC) |
PTE_BLOCK_NON_SHARE
}, {
- .virt = 0xa4800000UL,
- .phys = 0xa4800000UL,
- .size = 0x5b800000UL,
+ .virt = 0xbbc00000UL,
+ .phys = 0xbbc00000UL,
+ .size = 0x44400000UL,
.attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) |
PTE_BLOCK_INNER_SHARE
}, {
@@ -170,14 +164,20 @@ struct mm_region j7200_mem_map[NR_MMU_REGIONS] = {
.attrs = PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) |
PTE_BLOCK_NON_SHARE |
PTE_BLOCK_PXN | PTE_BLOCK_UXN
+ }, {
+ .virt = 0x4d80000000UL,
+ .phys = 0x4d80000000UL,
+ .size = 0x0002000000UL,
+ .attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL_NC) |
+ PTE_BLOCK_INNER_SHARE
}, {
/* List terminator */
0,
}
};
-struct mm_region *mem_map = j7200_mem_map;
-#endif /* CONFIG_TARGET_J7200_A72_EVM */
+struct mm_region *mem_map = j721e_mem_map;
+#endif /* CONFIG_SOC_K3_J721E_J7200 */
#endif /* CONFIG_SOC_K3_J721E */
--
2.37.2
^ permalink raw reply related [flat|nested] 24+ messages in thread* Re: [PATCH V2 08/12] arm: mach-k3: arm64-mmu: Refactor to be independent of board
2023-11-04 7:21 ` [PATCH V2 08/12] arm: mach-k3: arm64-mmu: Refactor to be independent of board Nishanth Menon
@ 2023-11-06 16:54 ` Andrew Davis
0 siblings, 0 replies; 24+ messages in thread
From: Andrew Davis @ 2023-11-06 16:54 UTC (permalink / raw)
To: Nishanth Menon, Tom Rini
Cc: Heinrich Schuchardt, Sinthu Raja, Manorit Chawdhry, Reid Tonking,
Neha Malcom Francis, Simon Glass, Robert Nelson, Jason Kridner,
u-boot
On 11/4/23 2:21 AM, Nishanth Menon wrote:
> Refactor J721E J7200 definition to make this independent of board
> macros.
>
> Signed-off-by: Nishanth Menon <nm@ti.com>
> ---
> arch/arm/mach-k3/arm64-mmu.c | 50 ++++++++++++++++++------------------
> 1 file changed, 25 insertions(+), 25 deletions(-)
>
> diff --git a/arch/arm/mach-k3/arm64-mmu.c b/arch/arm/mach-k3/arm64-mmu.c
> index f8087d2421e7..8cb6614035a5 100644
> --- a/arch/arm/mach-k3/arm64-mmu.c
> +++ b/arch/arm/mach-k3/arm64-mmu.c
> @@ -68,12 +68,11 @@ struct mm_region *mem_map = am654_mem_map;
>
> #ifdef CONFIG_SOC_K3_J721E
>
> -#ifdef CONFIG_TARGET_J721E_A72_EVM
> -/* NR_DRAM_BANKS + 32bit IO + 64bit IO + terminator */
> -#define NR_MMU_REGIONS (CONFIG_NR_DRAM_BANKS + 6)
> +#ifdef CONFIG_SOC_K3_J721E_J7200
> +#define NR_MMU_REGIONS (CONFIG_NR_DRAM_BANKS + 5)
>
> /* ToDo: Add 64bit IO */
> -struct mm_region j721e_mem_map[NR_MMU_REGIONS] = {
> +struct mm_region j7200_mem_map[NR_MMU_REGIONS] = {
Git diff seems to have gotten confused with your re-ordering, makes
this hard to review what you are actually changing here..
Also you reminded me of a patch I forgot to send from long ago, just
sent it, should make this patch a little more simple if it goes in
first.
Andrew
> {
> .virt = 0x0UL,
> .phys = 0x0UL,
> @@ -90,13 +89,13 @@ struct mm_region j721e_mem_map[NR_MMU_REGIONS] = {
> }, {
> .virt = 0xa0000000UL,
> .phys = 0xa0000000UL,
> - .size = 0x1bc00000UL,
> + .size = 0x04800000UL,
> .attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL_NC) |
> PTE_BLOCK_NON_SHARE
> }, {
> - .virt = 0xbbc00000UL,
> - .phys = 0xbbc00000UL,
> - .size = 0x44400000UL,
> + .virt = 0xa4800000UL,
> + .phys = 0xa4800000UL,
> + .size = 0x5b800000UL,
> .attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) |
> PTE_BLOCK_INNER_SHARE
> }, {
> @@ -112,26 +111,21 @@ struct mm_region j721e_mem_map[NR_MMU_REGIONS] = {
> .attrs = PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) |
> PTE_BLOCK_NON_SHARE |
> PTE_BLOCK_PXN | PTE_BLOCK_UXN
> - }, {
> - .virt = 0x4d80000000UL,
> - .phys = 0x4d80000000UL,
> - .size = 0x0002000000UL,
> - .attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL_NC) |
> - PTE_BLOCK_INNER_SHARE
> }, {
> /* List terminator */
> 0,
> }
> };
>
> -struct mm_region *mem_map = j721e_mem_map;
> -#endif /* CONFIG_TARGET_J721E_A72_EVM */
> +struct mm_region *mem_map = j7200_mem_map;
>
> -#ifdef CONFIG_TARGET_J7200_A72_EVM
> -#define NR_MMU_REGIONS (CONFIG_NR_DRAM_BANKS + 5)
> +#else /* CONFIG_SOC_K3_J721E_J7200 */
> +
> +/* NR_DRAM_BANKS + 32bit IO + 64bit IO + terminator */
> +#define NR_MMU_REGIONS (CONFIG_NR_DRAM_BANKS + 6)
>
> /* ToDo: Add 64bit IO */
> -struct mm_region j7200_mem_map[NR_MMU_REGIONS] = {
> +struct mm_region j721e_mem_map[NR_MMU_REGIONS] = {
> {
> .virt = 0x0UL,
> .phys = 0x0UL,
> @@ -148,13 +142,13 @@ struct mm_region j7200_mem_map[NR_MMU_REGIONS] = {
> }, {
> .virt = 0xa0000000UL,
> .phys = 0xa0000000UL,
> - .size = 0x04800000UL,
> + .size = 0x1bc00000UL,
> .attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL_NC) |
> PTE_BLOCK_NON_SHARE
> }, {
> - .virt = 0xa4800000UL,
> - .phys = 0xa4800000UL,
> - .size = 0x5b800000UL,
> + .virt = 0xbbc00000UL,
> + .phys = 0xbbc00000UL,
> + .size = 0x44400000UL,
> .attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) |
> PTE_BLOCK_INNER_SHARE
> }, {
> @@ -170,14 +164,20 @@ struct mm_region j7200_mem_map[NR_MMU_REGIONS] = {
> .attrs = PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) |
> PTE_BLOCK_NON_SHARE |
> PTE_BLOCK_PXN | PTE_BLOCK_UXN
> + }, {
> + .virt = 0x4d80000000UL,
> + .phys = 0x4d80000000UL,
> + .size = 0x0002000000UL,
> + .attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL_NC) |
> + PTE_BLOCK_INNER_SHARE
> }, {
> /* List terminator */
> 0,
> }
> };
>
> -struct mm_region *mem_map = j7200_mem_map;
> -#endif /* CONFIG_TARGET_J7200_A72_EVM */
> +struct mm_region *mem_map = j721e_mem_map;
> +#endif /* CONFIG_SOC_K3_J721E_J7200 */
>
> #endif /* CONFIG_SOC_K3_J721E */
>
^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH V2 09/12] arm: mach-k3: j721e: Improve support for UDA FS
2023-11-04 7:21 [PATCH V2 00/12] board: ti: j721e: cleanup Nishanth Menon
` (7 preceding siblings ...)
2023-11-04 7:21 ` [PATCH V2 08/12] arm: mach-k3: arm64-mmu: Refactor to be independent of board Nishanth Menon
@ 2023-11-04 7:21 ` Nishanth Menon
2023-11-04 7:21 ` [PATCH V2 10/12] configs: j7200: Remove HBMC_AM654 config Nishanth Menon
` (2 subsequent siblings)
11 siblings, 0 replies; 24+ messages in thread
From: Nishanth Menon @ 2023-11-04 7:21 UTC (permalink / raw)
To: Tom Rini
Cc: Heinrich Schuchardt, Sinthu Raja, Manorit Chawdhry, Reid Tonking,
Neha Malcom Francis, Andrew Davis, Simon Glass, Robert Nelson,
Jason Kridner, Nishanth Menon, u-boot
Commit 5019170970ad ("arch: arm: mach-k3: j721e: add support for UDA
FS") introduced basic UDA FS support, however, we can Take approach
similar to commit 0f1c1e8b368b ("arm: mach-k3: am625: Add support for
UDA FS"). While boot partition support with EMMC boot is useful, it is
constrained by the size of boot hardware partition itself.
In the case of K3 devices, tispl images can contain OP-TEE images that
can substantially vary in size and the u-boot image itself can vary over
time as we enable various features.
So use the CSD information in the case of EMMC_BOOT configuration being
enabled to pick boot partition or UDA FS mode operation to pick.
If EMMC_BOOT is disabled, then depend on filesystem configuration to
pick data from UDA.
Signed-off-by: Nishanth Menon <nm@ti.com>
---
arch/arm/mach-k3/j721e_init.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/arch/arm/mach-k3/j721e_init.c b/arch/arm/mach-k3/j721e_init.c
index b1f7e25ed092..bcdfbfc79c4a 100644
--- a/arch/arm/mach-k3/j721e_init.c
+++ b/arch/arm/mach-k3/j721e_init.c
@@ -294,7 +294,14 @@ u32 spl_mmc_boot_mode(struct mmc *mmc, const u32 boot_device)
{
switch (boot_device) {
case BOOT_DEVICE_MMC1:
- return (spl_mmc_emmc_boot_partition(mmc) ? MMCSD_MODE_EMMCBOOT : MMCSD_MODE_FS);
+ if (IS_ENABLED(CONFIG_SUPPORT_EMMC_BOOT)) {
+ if (spl_mmc_emmc_boot_partition(mmc))
+ return MMCSD_MODE_EMMCBOOT;
+ return MMCSD_MODE_FS;
+ }
+ if (IS_ENABLED(CONFIG_SPL_FS_FAT) || IS_ENABLED(CONFIG_SPL_FS_EXT4))
+ return MMCSD_MODE_FS;
+ return MMCSD_MODE_EMMCBOOT;
case BOOT_DEVICE_MMC2:
return MMCSD_MODE_FS;
default:
--
2.37.2
^ permalink raw reply related [flat|nested] 24+ messages in thread* [PATCH V2 10/12] configs: j7200: Remove HBMC_AM654 config
2023-11-04 7:21 [PATCH V2 00/12] board: ti: j721e: cleanup Nishanth Menon
` (8 preceding siblings ...)
2023-11-04 7:21 ` [PATCH V2 09/12] arm: mach-k3: j721e: Improve support for UDA FS Nishanth Menon
@ 2023-11-04 7:21 ` Nishanth Menon
2023-11-07 7:11 ` Neha Malcom Francis
2023-11-04 7:21 ` [PATCH V2 11/12] configs: j7200_evm_a72_defconfig: Switch to bootstd Nishanth Menon
2023-11-04 7:21 ` [PATCH V2 12/12] doc: board: ti: j721e_evm: Use board relative path for include directives Nishanth Menon
11 siblings, 1 reply; 24+ messages in thread
From: Nishanth Menon @ 2023-11-04 7:21 UTC (permalink / raw)
To: Tom Rini
Cc: Heinrich Schuchardt, Sinthu Raja, Manorit Chawdhry, Reid Tonking,
Neha Malcom Francis, Andrew Davis, Simon Glass, Robert Nelson,
Jason Kridner, Nishanth Menon, u-boot
Kernel commit 1b77265626a4 ("arm64: dts: ti: k3-j7200-mcu-wakeup: Add
HyperBus node") was merged to kernel without its dependent patch [1].
Similar fix is needed in U-Boot, and hbmc currently breaks boot. Till
this gets fixed in U-Boot, disable the config by default so that the
hbmc probe that happens in board/ti/j721e/evm.c will not take place
and lead to boot failure.
This is similar to the approach in commit 5b2671594b80 ("configs:
j721e: Remove HBMC_AM654 config"), introduced to j7200 evm platform.
[1] https://lore.kernel.org/all/20230424184810.29453-1-afd@ti.com/
Signed-off-by: Nishanth Menon <nm@ti.com>
---
configs/j7200_evm_a72_defconfig | 1 -
configs/j7200_evm_r5_defconfig | 1 -
2 files changed, 2 deletions(-)
diff --git a/configs/j7200_evm_a72_defconfig b/configs/j7200_evm_a72_defconfig
index cb4a141675da..889358afc316 100644
--- a/configs/j7200_evm_a72_defconfig
+++ b/configs/j7200_evm_a72_defconfig
@@ -138,7 +138,6 @@ CONFIG_CFI_FLASH=y
CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
CONFIG_FLASH_CFI_MTD=y
CONFIG_SYS_FLASH_CFI=y
-CONFIG_HBMC_AM654=y
CONFIG_SYS_MAX_FLASH_BANKS_DETECT=y
CONFIG_DM_SPI_FLASH=y
CONFIG_SPI_FLASH_STMICRO=y
diff --git a/configs/j7200_evm_r5_defconfig b/configs/j7200_evm_r5_defconfig
index d25dd8134b63..6452c60345fd 100644
--- a/configs/j7200_evm_r5_defconfig
+++ b/configs/j7200_evm_r5_defconfig
@@ -114,7 +114,6 @@ CONFIG_CFI_FLASH=y
CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
CONFIG_FLASH_CFI_MTD=y
CONFIG_SYS_FLASH_CFI=y
-CONFIG_HBMC_AM654=y
CONFIG_SYS_MAX_FLASH_BANKS_DETECT=y
CONFIG_DM_SPI_FLASH=y
CONFIG_SPI_FLASH_SFDP_SUPPORT=y
--
2.37.2
^ permalink raw reply related [flat|nested] 24+ messages in thread* Re: [PATCH V2 10/12] configs: j7200: Remove HBMC_AM654 config
2023-11-04 7:21 ` [PATCH V2 10/12] configs: j7200: Remove HBMC_AM654 config Nishanth Menon
@ 2023-11-07 7:11 ` Neha Malcom Francis
0 siblings, 0 replies; 24+ messages in thread
From: Neha Malcom Francis @ 2023-11-07 7:11 UTC (permalink / raw)
To: Nishanth Menon, Tom Rini
Cc: Heinrich Schuchardt, Sinthu Raja, Manorit Chawdhry, Reid Tonking,
Andrew Davis, Simon Glass, Robert Nelson, Jason Kridner, u-boot
Hi Nishanth,
On 04/11/23 12:51, Nishanth Menon wrote:
> Kernel commit 1b77265626a4 ("arm64: dts: ti: k3-j7200-mcu-wakeup: Add
> HyperBus node") was merged to kernel without its dependent patch [1].
> Similar fix is needed in U-Boot, and hbmc currently breaks boot. Till
> this gets fixed in U-Boot, disable the config by default so that the
> hbmc probe that happens in board/ti/j721e/evm.c will not take place
> and lead to boot failure.
>
> This is similar to the approach in commit 5b2671594b80 ("configs:
> j721e: Remove HBMC_AM654 config"), introduced to j7200 evm platform.
>
> [1] https://lore.kernel.org/all/20230424184810.29453-1-afd@ti.com/
>
> Signed-off-by: Nishanth Menon <nm@ti.com>
> ---
> configs/j7200_evm_a72_defconfig | 1 -
> configs/j7200_evm_r5_defconfig | 1 -
> 2 files changed, 2 deletions(-)
>
> diff --git a/configs/j7200_evm_a72_defconfig b/configs/j7200_evm_a72_defconfig
> index cb4a141675da..889358afc316 100644
> --- a/configs/j7200_evm_a72_defconfig
> +++ b/configs/j7200_evm_a72_defconfig
> @@ -138,7 +138,6 @@ CONFIG_CFI_FLASH=y
> CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
> CONFIG_FLASH_CFI_MTD=y
> CONFIG_SYS_FLASH_CFI=y
> -CONFIG_HBMC_AM654=y
> CONFIG_SYS_MAX_FLASH_BANKS_DETECT=y
> CONFIG_DM_SPI_FLASH=y
> CONFIG_SPI_FLASH_STMICRO=y
> diff --git a/configs/j7200_evm_r5_defconfig b/configs/j7200_evm_r5_defconfig
> index d25dd8134b63..6452c60345fd 100644
> --- a/configs/j7200_evm_r5_defconfig
> +++ b/configs/j7200_evm_r5_defconfig
> @@ -114,7 +114,6 @@ CONFIG_CFI_FLASH=y
> CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
> CONFIG_FLASH_CFI_MTD=y
> CONFIG_SYS_FLASH_CFI=y
> -CONFIG_HBMC_AM654=y
> CONFIG_SYS_MAX_FLASH_BANKS_DETECT=y
> CONFIG_DM_SPI_FLASH=y
> CONFIG_SPI_FLASH_SFDP_SUPPORT=y
Reviewed-by: Neha Malcom Francis <n-francis@ti.com>
--
Thanking You
Neha Malcom Francis
^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH V2 11/12] configs: j7200_evm_a72_defconfig: Switch to bootstd
2023-11-04 7:21 [PATCH V2 00/12] board: ti: j721e: cleanup Nishanth Menon
` (9 preceding siblings ...)
2023-11-04 7:21 ` [PATCH V2 10/12] configs: j7200: Remove HBMC_AM654 config Nishanth Menon
@ 2023-11-04 7:21 ` Nishanth Menon
2023-11-07 7:12 ` Neha Malcom Francis
2023-11-04 7:21 ` [PATCH V2 12/12] doc: board: ti: j721e_evm: Use board relative path for include directives Nishanth Menon
11 siblings, 1 reply; 24+ messages in thread
From: Nishanth Menon @ 2023-11-04 7:21 UTC (permalink / raw)
To: Tom Rini
Cc: Heinrich Schuchardt, Sinthu Raja, Manorit Chawdhry, Reid Tonking,
Neha Malcom Francis, Andrew Davis, Simon Glass, Robert Nelson,
Jason Kridner, Nishanth Menon, u-boot
Switch to using bootstd. Note with this change, we will stop using
distro_bootcmd and instead depend entirely on bootflow method of
starting the system up.
Signed-off-by: Nishanth Menon <nm@ti.com>
---
configs/j7200_evm_a72_defconfig | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/configs/j7200_evm_a72_defconfig b/configs/j7200_evm_a72_defconfig
index 889358afc316..b7bc9ad178f6 100644
--- a/configs/j7200_evm_a72_defconfig
+++ b/configs/j7200_evm_a72_defconfig
@@ -29,10 +29,11 @@ CONFIG_SPL_SPI=y
# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
CONFIG_SPL_LOAD_FIT=y
CONFIG_SPL_LOAD_FIT_ADDRESS=0x81000000
-CONFIG_DISTRO_DEFAULTS=y
CONFIG_OF_BOARD_SETUP=y
CONFIG_OF_SYSTEM_SETUP=y
-CONFIG_BOOTCOMMAND="run envboot; run distro_bootcmd;"
+CONFIG_BOOTSTD_FULL=y
+CONFIG_BOOTSTD_DEFAULTS=y
+CONFIG_BOOTCOMMAND="run envboot; bootflow scan -lb"
CONFIG_LOGLEVEL=7
CONFIG_SPL_MAX_SIZE=0xc0000
CONFIG_SPL_HAS_BSS_LINKER_SECTION=y
--
2.37.2
^ permalink raw reply related [flat|nested] 24+ messages in thread* Re: [PATCH V2 11/12] configs: j7200_evm_a72_defconfig: Switch to bootstd
2023-11-04 7:21 ` [PATCH V2 11/12] configs: j7200_evm_a72_defconfig: Switch to bootstd Nishanth Menon
@ 2023-11-07 7:12 ` Neha Malcom Francis
0 siblings, 0 replies; 24+ messages in thread
From: Neha Malcom Francis @ 2023-11-07 7:12 UTC (permalink / raw)
To: Nishanth Menon, Tom Rini
Cc: Heinrich Schuchardt, Sinthu Raja, Manorit Chawdhry, Reid Tonking,
Andrew Davis, Simon Glass, Robert Nelson, Jason Kridner, u-boot
Hi Nishanth,
On 04/11/23 12:51, Nishanth Menon wrote:
> Switch to using bootstd. Note with this change, we will stop using
> distro_bootcmd and instead depend entirely on bootflow method of
> starting the system up.
>
> Signed-off-by: Nishanth Menon <nm@ti.com>
> ---
> configs/j7200_evm_a72_defconfig | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/configs/j7200_evm_a72_defconfig b/configs/j7200_evm_a72_defconfig
> index 889358afc316..b7bc9ad178f6 100644
> --- a/configs/j7200_evm_a72_defconfig
> +++ b/configs/j7200_evm_a72_defconfig
> @@ -29,10 +29,11 @@ CONFIG_SPL_SPI=y
> # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
> CONFIG_SPL_LOAD_FIT=y
> CONFIG_SPL_LOAD_FIT_ADDRESS=0x81000000
> -CONFIG_DISTRO_DEFAULTS=y
> CONFIG_OF_BOARD_SETUP=y
> CONFIG_OF_SYSTEM_SETUP=y
> -CONFIG_BOOTCOMMAND="run envboot; run distro_bootcmd;"
> +CONFIG_BOOTSTD_FULL=y
> +CONFIG_BOOTSTD_DEFAULTS=y
> +CONFIG_BOOTCOMMAND="run envboot; bootflow scan -lb"
> CONFIG_LOGLEVEL=7
> CONFIG_SPL_MAX_SIZE=0xc0000
> CONFIG_SPL_HAS_BSS_LINKER_SECTION=y
Reviewed-by: Neha Malcom Francis <n-francis@ti.com>
--
Thanking You
Neha Malcom Francis
^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH V2 12/12] doc: board: ti: j721e_evm: Use board relative path for include directives
2023-11-04 7:21 [PATCH V2 00/12] board: ti: j721e: cleanup Nishanth Menon
` (10 preceding siblings ...)
2023-11-04 7:21 ` [PATCH V2 11/12] configs: j7200_evm_a72_defconfig: Switch to bootstd Nishanth Menon
@ 2023-11-04 7:21 ` Nishanth Menon
11 siblings, 0 replies; 24+ messages in thread
From: Nishanth Menon @ 2023-11-04 7:21 UTC (permalink / raw)
To: Tom Rini
Cc: Heinrich Schuchardt, Sinthu Raja, Manorit Chawdhry, Reid Tonking,
Neha Malcom Francis, Andrew Davis, Simon Glass, Robert Nelson,
Jason Kridner, Nishanth Menon, u-boot
When using include directives within a section that is included by non
TI board rst file, k3.rst and other include paths need to be relative to
doc/board/ base.
Signed-off-by: Nishanth Menon <nm@ti.com>
---
doc/board/ti/j721e_evm.rst | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/doc/board/ti/j721e_evm.rst b/doc/board/ti/j721e_evm.rst
index 344a38d37486..b012171b45ee 100644
--- a/doc/board/ti/j721e_evm.rst
+++ b/doc/board/ti/j721e_evm.rst
@@ -48,7 +48,7 @@ support. Below is the pictorial representation of boot flow:
Sources:
--------
-.. include:: k3.rst
+.. include:: ../ti/k3.rst
:start-after: .. k3_rst_include_start_boot_sources
:end-before: .. k3_rst_include_end_boot_sources
@@ -56,17 +56,17 @@ Build procedure:
----------------
0. Setup the environment variables:
-.. include:: k3.rst
+.. include:: ../ti/k3.rst
:start-after: .. k3_rst_include_start_common_env_vars_desc
:end-before: .. k3_rst_include_end_common_env_vars_desc
-.. include:: k3.rst
+.. include:: ../ti/k3.rst
:start-after: .. k3_rst_include_start_board_env_vars_desc
:end-before: .. k3_rst_include_end_board_env_vars_desc
Set the variables corresponding to this platform:
-.. include:: k3.rst
+.. include:: ../ti/k3.rst
:start-after: .. k3_rst_include_start_common_env_vars_defn
:end-before: .. k3_rst_include_end_common_env_vars_defn
.. prompt:: bash $
@@ -84,14 +84,14 @@ Set the variables corresponding to this platform:
1. Trusted Firmware-A:
-.. include:: k3.rst
+.. include:: ../ti/k3.rst
:start-after: .. k3_rst_include_start_build_steps_tfa
:end-before: .. k3_rst_include_end_build_steps_tfa
2. OP-TEE:
-.. include:: k3.rst
+.. include:: ../ti/k3.rst
:start-after: .. k3_rst_include_start_build_steps_optee
:end-before: .. k3_rst_include_end_build_steps_optee
@@ -99,13 +99,13 @@ Set the variables corresponding to this platform:
* 3.1 R5:
-.. include:: k3.rst
+.. include:: ../ti/k3.rst
:start-after: .. k3_rst_include_start_build_steps_spl_r5
:end-before: .. k3_rst_include_end_build_steps_spl_r5
* 3.2 A72:
-.. include:: k3.rst
+.. include:: ../ti/k3.rst
:start-after: .. k3_rst_include_start_build_steps_uboot
:end-before: .. k3_rst_include_end_build_steps_uboot
.. j721e_evm_rst_include_end_build_steps
@@ -248,7 +248,7 @@ detailed setup information.
environment's distribution needs to be updated, it might be necessary to
build OpenOCD from the source.
-.. include:: k3.rst
+.. include:: ../ti/k3.rst
:start-after: .. k3_rst_include_start_openocd_connect_XDS110
:end-before: .. k3_rst_include_end_openocd_connect_XDS110
--
2.37.2
^ permalink raw reply related [flat|nested] 24+ messages in thread