All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/7] updates for km board series
@ 2022-12-02 17:22 Holger Brunck
  2022-12-02 17:22 ` [PATCH 1/7] board/km: move ls102xa boards to environment text files Holger Brunck
                   ` (7 more replies)
  0 siblings, 8 replies; 13+ messages in thread
From: Holger Brunck @ 2022-12-02 17:22 UTC (permalink / raw)
  To: u-boot
  Cc: Niel Fourie, Heiko Schocher, Aleksandar Gerasimovski, Tom Rini,
	Holger Brunck

- migrate all boards to environment.txt files
- migrate PPC boards to DM_I2C
- some cleanup

Holger Brunck (7):
  board/km: move ls102xa boards to environment text files
  km/powerpc: migrate to env.txt file
  board/km/cent2: migrate to environment text file
  board/km/secu: migrate to use environment text files
  board/km: remove obsolete ARCH_KIRKWOOD
  km/ppc: migrate all mpc83xx to DM_I2C
  km/mpc8360: remove unused CONFIG_SYS_PAXE defines

 board/keymile/Kconfig                         |  18 +-
 board/keymile/km83xx/Makefile                 |   2 +-
 board/keymile/km83xx/km83xx.env               |  21 +++
 board/keymile/km83xx/km83xx_i2c.c             |  73 --------
 board/keymile/kmcent2/kmcent2.c               |   2 +-
 board/keymile/kmcent2/kmcent2.env             |  37 ++++
 .../keymile/pg-wcom-ls102xa/pg-wcom-expu1.env |   3 +
 .../keymile/pg-wcom-ls102xa/pg-wcom-seli8.env |   3 +
 board/keymile/secu1/socfpga_secu.env          |  50 +++++
 configs/kmcent2_defconfig                     |   2 +-
 configs/kmcoge5ne_defconfig                   |  11 +-
 configs/kmeter1_defconfig                     |  11 +-
 configs/kmopti2_defconfig                     |  10 +-
 configs/kmsupx5_defconfig                     |  10 +-
 configs/kmtepr2_defconfig                     |  10 +-
 configs/pg_wcom_expu1_defconfig               |   2 +-
 configs/pg_wcom_expu1_update_defconfig        |   2 +-
 configs/pg_wcom_seli8_defconfig               |   2 +-
 configs/pg_wcom_seli8_update_defconfig        |   2 +-
 configs/socfpga_secu1_defconfig               |   4 +-
 configs/tuge1_defconfig                       |  10 +-
 configs/tuxx1_defconfig                       |  10 +-
 include/configs/km/keymile-common.h           | 174 ------------------
 include/configs/km/km-mpc8360.h               |   7 -
 include/configs/km/km-mpc83xx.h               |  32 ----
 include/configs/km/km-powerpc.h               |  46 -----
 include/configs/km/pg-wcom-ls102xa.h          |  65 -------
 include/configs/kmcent2.h                     |  74 --------
 include/configs/kmcoge5ne.h                   |   6 -
 include/configs/kmeter1.h                     |   4 -
 include/configs/kmopti2.h                     |   7 -
 include/configs/kmsupx5.h                     |   7 -
 include/configs/kmtepr2.h                     |   7 -
 include/configs/pg-wcom-expu1.h               |   4 -
 include/configs/pg-wcom-seli8.h               |   5 -
 include/configs/socfpga_arria5_secu1.h        |  53 ------
 include/configs/tuge1.h                       |   7 -
 include/configs/tuxx1.h                       |   7 -
 include/environment/pg-wcom/common.env        |  68 +++++++
 include/environment/pg-wcom/ls102xa.env       |  29 +++
 include/environment/pg-wcom/powerpc.env       |  14 ++
 scripts/config_whitelist.txt                  |  18 --
 42 files changed, 264 insertions(+), 665 deletions(-)
 create mode 100644 board/keymile/km83xx/km83xx.env
 delete mode 100644 board/keymile/km83xx/km83xx_i2c.c
 create mode 100644 board/keymile/kmcent2/kmcent2.env
 create mode 100644 board/keymile/pg-wcom-ls102xa/pg-wcom-expu1.env
 create mode 100644 board/keymile/pg-wcom-ls102xa/pg-wcom-seli8.env
 create mode 100644 board/keymile/secu1/socfpga_secu.env
 delete mode 100644 include/configs/km/keymile-common.h
 delete mode 100644 include/configs/km/km-powerpc.h
 create mode 100644 include/environment/pg-wcom/common.env
 create mode 100644 include/environment/pg-wcom/ls102xa.env
 create mode 100644 include/environment/pg-wcom/powerpc.env

-- 
2.31.1


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

* [PATCH 1/7] board/km: move ls102xa boards to environment text files
  2022-12-02 17:22 [PATCH 0/7] updates for km board series Holger Brunck
@ 2022-12-02 17:22 ` Holger Brunck
  2022-12-13 16:36   ` Tom Rini
  2022-12-02 17:22 ` [PATCH 2/7] km/powerpc: migrate to env.txt file Holger Brunck
                   ` (6 subsequent siblings)
  7 siblings, 1 reply; 13+ messages in thread
From: Holger Brunck @ 2022-12-02 17:22 UTC (permalink / raw)
  To: u-boot
  Cc: Niel Fourie, Heiko Schocher, Aleksandar Gerasimovski, Tom Rini,
	Holger Brunck

Create a common.env which we can use later on also for other boards.

Signed-off-by: Holger Brunck <holger.brunck@hitachienergy.com>
---
 .../keymile/pg-wcom-ls102xa/pg-wcom-expu1.env |  3 +
 .../keymile/pg-wcom-ls102xa/pg-wcom-seli8.env |  3 +
 configs/pg_wcom_expu1_defconfig               |  2 +-
 configs/pg_wcom_expu1_update_defconfig        |  2 +-
 configs/pg_wcom_seli8_defconfig               |  2 +-
 configs/pg_wcom_seli8_update_defconfig        |  2 +-
 include/configs/km/pg-wcom-ls102xa.h          | 65 ------------------
 include/configs/pg-wcom-expu1.h               |  4 --
 include/configs/pg-wcom-seli8.h               |  5 --
 include/environment/pg-wcom/common.env        | 68 +++++++++++++++++++
 include/environment/pg-wcom/ls102xa.env       | 29 ++++++++
 11 files changed, 107 insertions(+), 78 deletions(-)
 create mode 100644 board/keymile/pg-wcom-ls102xa/pg-wcom-expu1.env
 create mode 100644 board/keymile/pg-wcom-ls102xa/pg-wcom-seli8.env
 create mode 100644 include/environment/pg-wcom/common.env
 create mode 100644 include/environment/pg-wcom/ls102xa.env

diff --git a/board/keymile/pg-wcom-ls102xa/pg-wcom-expu1.env b/board/keymile/pg-wcom-ls102xa/pg-wcom-expu1.env
new file mode 100644
index 0000000000..d960de6bfe
--- /dev/null
+++ b/board/keymile/pg-wcom-ls102xa/pg-wcom-expu1.env
@@ -0,0 +1,3 @@
+#include <environment/pg-wcom/ls102xa.env>
+
+hostname=EXPU1
diff --git a/board/keymile/pg-wcom-ls102xa/pg-wcom-seli8.env b/board/keymile/pg-wcom-ls102xa/pg-wcom-seli8.env
new file mode 100644
index 0000000000..4031f8bee9
--- /dev/null
+++ b/board/keymile/pg-wcom-ls102xa/pg-wcom-seli8.env
@@ -0,0 +1,3 @@
+#include <environment/pg-wcom/ls102xa.env>
+
+hostname=SELI8
diff --git a/configs/pg_wcom_expu1_defconfig b/configs/pg_wcom_expu1_defconfig
index ed55f7bfd0..94f66f7299 100644
--- a/configs/pg_wcom_expu1_defconfig
+++ b/configs/pg_wcom_expu1_defconfig
@@ -20,7 +20,6 @@ CONFIG_ENV_ADDR=0x60060000
 CONFIG_AHCI=y
 # CONFIG_DEEP_SLEEP is not set
 CONFIG_LAYERSCAPE_NS_ACCESS=y
-CONFIG_KM_DEF_NETDEV="eth2"
 CONFIG_KM_COMMON_ETH_INIT=y
 CONFIG_PIGGY_MAC_ADDRESS_OFFSET=3
 CONFIG_PG_WCOM_UBOOT_UPDATE_SUPPORTED=y
@@ -64,6 +63,7 @@ CONFIG_MTDIDS_DEFAULT="nor0=60000000.nor,nand0=68000000.flash"
 CONFIG_MTDPARTS_DEFAULT="mtdparts=60000000.nor:128k(rcw),128k(qe),128k(envred),128k(env),512k(res),1m(u-boot),128k(redenvred),128k(redenv),1m(redu-boot),-(ubi0);68000000.flash:-(ubi1)"
 CONFIG_CMD_UBI=y
 CONFIG_OF_CONTROL=y
+CONFIG_ENV_SOURCE_FILE="pg-wcom-expu1"
 CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_FLASH=y
 CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
diff --git a/configs/pg_wcom_expu1_update_defconfig b/configs/pg_wcom_expu1_update_defconfig
index 64ddaf8aa6..2eb06bd0d0 100644
--- a/configs/pg_wcom_expu1_update_defconfig
+++ b/configs/pg_wcom_expu1_update_defconfig
@@ -19,7 +19,6 @@ CONFIG_ENV_ADDR=0x60220000
 CONFIG_AHCI=y
 # CONFIG_DEEP_SLEEP is not set
 CONFIG_LAYERSCAPE_NS_ACCESS=y
-CONFIG_KM_DEF_NETDEV="eth2"
 CONFIG_KM_COMMON_ETH_INIT=y
 CONFIG_PIGGY_MAC_ADDRESS_OFFSET=3
 CONFIG_PG_WCOM_UBOOT_UPDATE_SUPPORTED=y
@@ -62,6 +61,7 @@ CONFIG_MTDIDS_DEFAULT="nor0=60000000.nor,nand0=68000000.flash"
 CONFIG_MTDPARTS_DEFAULT="mtdparts=60000000.nor:128k(rcw),128k(qe),128k(envred),128k(env),512k(res),1m(u-boot),128k(redenvred),128k(redenv),1m(redu-boot),-(ubi0);68000000.flash:-(ubi1)"
 CONFIG_CMD_UBI=y
 CONFIG_OF_CONTROL=y
+CONFIG_ENV_SOURCE_FILE="pg-wcom-expu1"
 CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_FLASH=y
 CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
diff --git a/configs/pg_wcom_seli8_defconfig b/configs/pg_wcom_seli8_defconfig
index ad08e3582e..2d92828d99 100644
--- a/configs/pg_wcom_seli8_defconfig
+++ b/configs/pg_wcom_seli8_defconfig
@@ -20,7 +20,6 @@ CONFIG_ENV_ADDR=0x60060000
 CONFIG_AHCI=y
 # CONFIG_DEEP_SLEEP is not set
 CONFIG_LAYERSCAPE_NS_ACCESS=y
-CONFIG_KM_DEF_NETDEV="eth2"
 CONFIG_KM_COMMON_ETH_INIT=y
 CONFIG_PIGGY_MAC_ADDRESS_OFFSET=3
 CONFIG_PG_WCOM_UBOOT_UPDATE_SUPPORTED=y
@@ -64,6 +63,7 @@ CONFIG_MTDIDS_DEFAULT="nor0=60000000.nor,nand0=68000000.flash"
 CONFIG_MTDPARTS_DEFAULT="mtdparts=60000000.nor:128k(rcw),128k(qe),128k(envred),128k(env),512k(res),1m(u-boot),128k(redenvred),128k(redenv),1m(redu-boot),-(ubi0);68000000.flash:-(ubi1)"
 CONFIG_CMD_UBI=y
 CONFIG_OF_CONTROL=y
+CONFIG_ENV_SOURCE_FILE="pg-wcom-seli8"
 CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_FLASH=y
 CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
diff --git a/configs/pg_wcom_seli8_update_defconfig b/configs/pg_wcom_seli8_update_defconfig
index 01a6198d72..4b84cbb956 100644
--- a/configs/pg_wcom_seli8_update_defconfig
+++ b/configs/pg_wcom_seli8_update_defconfig
@@ -19,7 +19,6 @@ CONFIG_ENV_ADDR=0x60220000
 CONFIG_AHCI=y
 # CONFIG_DEEP_SLEEP is not set
 CONFIG_LAYERSCAPE_NS_ACCESS=y
-CONFIG_KM_DEF_NETDEV="eth2"
 CONFIG_KM_COMMON_ETH_INIT=y
 CONFIG_PIGGY_MAC_ADDRESS_OFFSET=3
 CONFIG_PG_WCOM_UBOOT_UPDATE_SUPPORTED=y
@@ -62,6 +61,7 @@ CONFIG_MTDIDS_DEFAULT="nor0=60000000.nor,nand0=68000000.flash"
 CONFIG_MTDPARTS_DEFAULT="mtdparts=60000000.nor:128k(rcw),128k(qe),128k(envred),128k(env),512k(res),1m(u-boot),128k(redenvred),128k(redenv),1m(redu-boot),-(ubi0);68000000.flash:-(ubi1)"
 CONFIG_CMD_UBI=y
 CONFIG_OF_CONTROL=y
+CONFIG_ENV_SOURCE_FILE="pg-wcom-seli8"
 CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_FLASH=y
 CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
diff --git a/include/configs/km/pg-wcom-ls102xa.h b/include/configs/km/pg-wcom-ls102xa.h
index 0613b77e96..b7da2b67b2 100644
--- a/include/configs/km/pg-wcom-ls102xa.h
+++ b/include/configs/km/pg-wcom-ls102xa.h
@@ -6,9 +6,6 @@
 #ifndef __CONFIG_PG_WCOM_LS102XA_H
 #define __CONFIG_PG_WCOM_LS102XA_H
 
-/* include common defines/options for all Keymile boards */
-#include "keymile-common.h"
-
 #define CONFIG_SYS_INIT_RAM_ADDR	OCRAM_BASE_ADDR
 #define CONFIG_SYS_INIT_RAM_SIZE	OCRAM_SIZE
 
@@ -177,68 +174,6 @@
 
 #define CONFIG_LS102XA_STREAM_ID
 
-/*
- * Environment
- */
-
-#define CONFIG_ENV_TOTAL_SIZE		0x40000
-#define ENV_DEL_ADDR		CONFIG_ENV_ADDR_REDUND  /* direct for newenv */
-
-#ifndef CONFIG_KM_DEF_ENV		/* if not set by keymile-common.h */
-#define CONFIG_KM_DEF_ENV
-#endif
-
-#ifndef CONFIG_KM_DEF_BOOT_ARGS_CPU
-#define CONFIG_KM_DEF_BOOT_ARGS_CPU		""
-#endif
-
-#define CONFIG_KM_DEF_ENV_CPU						\
-	"boot=bootm ${load_addr_r} - ${fdt_addr_r}\0"			\
-	"cramfsloadfdt="						\
-		"cramfsload ${fdt_addr_r} "				\
-		"fdt_0x${IVM_BoardId}_0x${IVM_HWKey}.dtb\0"		\
-	"u-boot=" CONFIG_HOSTNAME "/u-boot.bin\0"			\
-	"update=protect off " __stringify(CONFIG_SYS_MONITOR_BASE)	\
-		" +${filesize} && "					\
-		"erase " __stringify(CONFIG_SYS_MONITOR_BASE)		\
-		" +${filesize} && "					\
-		"cp.b ${load_addr_r} "					\
-		__stringify(CONFIG_SYS_MONITOR_BASE) " ${filesize} && "	\
-		"protect on " __stringify(CONFIG_SYS_MONITOR_BASE)	\
-		" +${filesize}\0"					\
-	"update-nor=protect off " __stringify(CONFIG_SYS_FLASH_BASE)	\
-		" +${filesize} && "					\
-		"erase " __stringify(CONFIG_SYS_FLASH_BASE)		\
-		" +${filesize} && "					\
-		"cp.b ${load_addr_r} "					\
-		__stringify(CONFIG_SYS_FLASH_BASE) " ${filesize} && "	\
-		"protect on " __stringify(CONFIG_SYS_MONITOR_BASE)	\
-		" +" __stringify(CONFIG_SYS_MONITOR_LEN)"\0"		\
-	"set_fdthigh=true\0"			\
-	"checkfdt=true\0"						\
-	""
-
-#define CONFIG_KM_NEW_ENV						\
-	"newenv=protect off " __stringify(ENV_DEL_ADDR)			\
-		" +" __stringify(CONFIG_ENV_TOTAL_SIZE) " && "		\
-		"erase " __stringify(ENV_DEL_ADDR)			\
-		" +" __stringify(CONFIG_ENV_TOTAL_SIZE) " && "		\
-		"protect on " __stringify(ENV_DEL_ADDR)			\
-		" +" __stringify(CONFIG_ENV_TOTAL_SIZE) "\0"
-
-#define CONFIG_HW_ENV_SETTINGS						\
-	"hwconfig=devdis:esdhc,usb3,usb2,sata,sec,dcu,duart2,qspi,"	\
-			"can1,can2_4,ftm2_8,i2c2_3,sai1_4,lpuart2_6,"	\
-			"asrc,spdif,lpuart1,ftm1\0"
-
-#define CONFIG_EXTRA_ENV_SETTINGS					\
-	CONFIG_KM_NEW_ENV						\
-	CONFIG_KM_DEF_ENV						\
-	CONFIG_HW_ENV_SETTINGS						\
-	"EEprom_ivm=pca9547:70:9\0"					\
-	"ethrotate=no\0"						\
-	""
-
 #define CONFIG_SYS_BOOTMAPSZ	(256 << 20) /* Increase map for Linux */
 
 #endif
diff --git a/include/configs/pg-wcom-expu1.h b/include/configs/pg-wcom-expu1.h
index e08d941412..e7c6cd926e 100644
--- a/include/configs/pg-wcom-expu1.h
+++ b/include/configs/pg-wcom-expu1.h
@@ -7,10 +7,6 @@
 #define __CONFIG_PG_WCOM_EXPU1_H
 
 #define WCOM_EXPU1
-#define CONFIG_HOSTNAME				"EXPU1"
-
-#define CONFIG_KM_UBI_PARTITION_NAME_BOOT	"ubi0"
-#define CONFIG_KM_UBI_PARTITION_NAME_APP	"ubi1"
 
 /* CLIPS FPGA Definitions */
 #define CONFIG_SYS_CSPR3_EXT	(0x00)
diff --git a/include/configs/pg-wcom-seli8.h b/include/configs/pg-wcom-seli8.h
index 9a7669c940..0113309f23 100644
--- a/include/configs/pg-wcom-seli8.h
+++ b/include/configs/pg-wcom-seli8.h
@@ -6,11 +6,6 @@
 #ifndef __CONFIG_PG_WCOM_SELI8_H
 #define __CONFIG_PG_WCOM_SELI8_H
 
-#define CONFIG_HOSTNAME			"SELI8"
-
-#define CONFIG_KM_UBI_PARTITION_NAME_BOOT	"ubi0"
-#define CONFIG_KM_UBI_PARTITION_NAME_APP	"ubi1"
-
 /* PAXK FPGA Definitions */
 #define CONFIG_SYS_CSPR3_EXT	(0x00)
 #define CONFIG_SYS_CSPR3	(CSPR_PHYS_ADDR(CONFIG_SYS_PAX_BASE) | \
diff --git a/include/environment/pg-wcom/common.env b/include/environment/pg-wcom/common.env
new file mode 100644
index 0000000000..4b660cebd6
--- /dev/null
+++ b/include/environment/pg-wcom/common.env
@@ -0,0 +1,68 @@
+
+#ifndef WCOM_UBI_PARTITION_APP
+/* one flash chip only called boot */
+# define WCOM_UBI_LINUX_MTD	ubi.mtd=ubi0
+ubiattach=ubi part ubi0
+#else /* WCOM_UBI_PARTITION_APP */
+/* two flash chips called boot and app */
+# define WCOM_UBI_LINUX_MTD	ubi.mtd=ubi0 ubi.mtd=ubi1
+ubiattach=if test ${boot_bank} -eq 0;
+          then;
+		ubi part ubi0;
+	  else;
+		ubi part ubi1;
+	  fi
+#endif /* WCOMC_UBI_PARTITION_APP */
+
+actual_bank=0
+
+add_default=setenv bootargs ${bootargs} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}:${netdev}:off:
+		console=ttyS0,${baudrate} mem=${kernelmem} init=${init}
+		phram.phram=phvar,${varaddr},CONFIG_KM_PHRAM
+		WCOM_UBI_LINUX_MTD
+
+addpanic=setenv bootargs ${bootargs} panic=1 panic_on_oops=1
+altbootcmd=run bootcmd
+backup_bank=0
+boot=bootm ${load_addr_r} - ${fdt_addr_r}
+
+bootcmd=km_checkbidhwk &&
+	setenv bootcmd 'if km_checktestboot;
+			then;
+				setenv boot_bank ${test_bank};
+			else;
+				setenv boot_bank ${actual_bank};
+			fi;
+			run ${subbootcmds}; reset' &&
+	setenv altbootcmd 'setenv boot_bank ${backup_bank};
+			   run ${subbootcmds};
+			   reset' &&
+	saveenv &&
+	saveenv &&
+	boot
+
+cramfsaddr=CONFIG_KM_CRAMFS_ADDR
+cramfsloadfdt=cramfsload ${fdt_addr_r} fdt_0x${IVM_BoardId}_0x${IVM_HWKey}.dtb
+cramfsloadkernel=cramfsload ${load_addr_r} ${uimage}
+
+develop=tftp ${load_addr_r} scripts/develop-${arch}.txt &&
+	env import -t ${load_addr_r} ${filesize} &&
+	run setup_debug_env
+
+env_version=1
+fdt_addr_r=CONFIG_KM_FDT_ADDR
+flashargs=setenv bootargs root=mtdblock:rootfs${boot_bank} rootfstype=squashfs ro
+init=/sbin/init-overlay.sh
+load=tftpboot ${load_addr_r} ${hostname}/u-boot.bin
+load_addr_r=CONFIG_KM_KERNEL_ADDR
+pnvramsize=CONFIG_KM_PNVRAM
+
+ramfs=tftp ${load_addr_r} scripts/ramfs-${arch}.txt &&
+      env import -t ${load_addr_r} ${filesize} &&
+      run setup_debug_env
+
+release=run newenv; reset
+subbootcmds=ubiattach ubicopy checkfdt cramfsloadfdt set_fdthigh
+                      cramfsloadkernel flashargs add_default addpanic boot
+testbootcmd=setenv boot_bank ${test_bank}; run ${subbootcmds}; reset
+ubicopy=ubi read ${cramfsaddr} bootfs${boot_bank}
diff --git a/include/environment/pg-wcom/ls102xa.env b/include/environment/pg-wcom/ls102xa.env
new file mode 100644
index 0000000000..5b5bda95e2
--- /dev/null
+++ b/include/environment/pg-wcom/ls102xa.env
@@ -0,0 +1,29 @@
+#define WCOM_UBI_PARTITION_APP
+
+#include <environment/pg-wcom/common.env>
+
+EEprom_ivm=pca9547:70:9
+boot=bootm $load_addr_r - $fdt_addr_r
+checkfdt=true
+cramfsloadfdt=cramfsload $fdt_addr_r fdt_0x${IVM_BoardId}_0x${IVM_HWKey}.dtb
+ethrotate=no
+hwconfig=devdis:esdhc,usb3,usb2,sata,sec,dcu,duart2,qspi,can1,can2_4,ftm2_8,i2c2_3,sai1_4,lpuart2_6,asrc,spdif,lpuart1,ftm1
+netdev=eth2
+
+newenv=protect off CONFIG_ENV_ADDR_REDUND +0x40000 &&
+       erase CONFIG_ENV_ADDR_REDUND +0x40000 &&
+       protect on CONFIG_ENV_ADDR_REDUND +0x40000
+
+set_fdthigh=true
+
+update=protect off CONFIG_SYS_MONITOR_BASE +${filesize} &&
+       erase CONFIG_SYS_MONITOR_BASE +${filesize} &&
+       cp.b ${load_addr_r} CONFIG_SYS_MONITOR_BASE ${filesize} &&
+       protect on CONFIG_SYS_MONITOR_BASE +${filesize}
+
+update-nor=protect off CONFIG_SYS_FLASH_BASE +${filesize} &&
+	   erase CONFIG_SYS_FLASH_BASE +${filesize} &&
+	   cp.b ${load_addr_r} CONFIG_SYS_FLASH_BASE ${filesize} &&
+	   protect on CONFIG_SYS_MONITOR_BASE +0x100000
+
+uimage=uImage
-- 
2.31.1


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

* [PATCH 2/7] km/powerpc: migrate to env.txt file
  2022-12-02 17:22 [PATCH 0/7] updates for km board series Holger Brunck
  2022-12-02 17:22 ` [PATCH 1/7] board/km: move ls102xa boards to environment text files Holger Brunck
@ 2022-12-02 17:22 ` Holger Brunck
  2022-12-02 17:22 ` [PATCH 3/7] board/km/cent2: migrate to environment text file Holger Brunck
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 13+ messages in thread
From: Holger Brunck @ 2022-12-02 17:22 UTC (permalink / raw)
  To: u-boot
  Cc: Niel Fourie, Heiko Schocher, Aleksandar Gerasimovski, Tom Rini,
	Holger Brunck

Use already present common.env file and add a powerpc specific env
so that we can move all the environment defines to text files.

Signed-off-by: Holger Brunck <holger.brunck@hitachienergy.com>
---
 board/keymile/km83xx/km83xx.env         | 21 +++++++++++
 configs/kmcoge5ne_defconfig             |  2 +-
 configs/kmeter1_defconfig               |  2 +-
 configs/kmopti2_defconfig               |  1 +
 configs/kmsupx5_defconfig               |  1 +
 configs/kmtepr2_defconfig               |  1 +
 configs/tuge1_defconfig                 |  1 +
 configs/tuxx1_defconfig                 |  1 +
 include/configs/km/km-mpc83xx.h         | 24 -------------
 include/configs/km/km-powerpc.h         | 46 -------------------------
 include/configs/kmcoge5ne.h             |  6 ----
 include/configs/kmeter1.h               |  4 ---
 include/configs/kmopti2.h               |  7 ----
 include/configs/kmsupx5.h               |  7 ----
 include/configs/kmtepr2.h               |  7 ----
 include/configs/tuge1.h                 |  7 ----
 include/configs/tuxx1.h                 |  7 ----
 include/environment/pg-wcom/powerpc.env | 14 ++++++++
 18 files changed, 42 insertions(+), 117 deletions(-)
 create mode 100644 board/keymile/km83xx/km83xx.env
 delete mode 100644 include/configs/km/km-powerpc.h
 create mode 100644 include/environment/pg-wcom/powerpc.env

diff --git a/board/keymile/km83xx/km83xx.env b/board/keymile/km83xx/km83xx.env
new file mode 100644
index 0000000000..ed2487c028
--- /dev/null
+++ b/board/keymile/km83xx/km83xx.env
@@ -0,0 +1,21 @@
+#if CONFIG_TARGET_KMCOGE5NE
+#define WCOM_UBI_PARTITION_APP
+hostname=kmcoge5ne
+netdev=eth1
+uimage=ecc_bch_uImage
+#elif CONFIG_TARGET_KMETER1
+hostname=kmeter1
+netdev=eth2
+uimage=uImage
+#else
+hostname=kmeter1
+netdev=eth0
+uimage=uImage
+#endif
+
+#include <environment/pg-wcom/common.env>
+#include <environment/pg-wcom/powerpc.env>
+
+#if CONFIG_TARGET_KMCOGE5NE
+add_default+= eccmode=bch
+#endif
diff --git a/configs/kmcoge5ne_defconfig b/configs/kmcoge5ne_defconfig
index 298ff16b7e..389800795d 100644
--- a/configs/kmcoge5ne_defconfig
+++ b/configs/kmcoge5ne_defconfig
@@ -159,7 +159,6 @@ CONFIG_LCRR_DBYP_PLL_BYPASSED=y
 CONFIG_LCRR_EADC_2=y
 CONFIG_LCRR_CLKDIV_4=y
 CONFIG_83XX_PCICLK=0x3ef1480
-CONFIG_KM_DEF_NETDEV="eth1"
 CONFIG_SYS_MONITOR_LEN=786432
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
@@ -196,6 +195,7 @@ CONFIG_MTDIDS_DEFAULT="nor0=boot,nand0=app"
 CONFIG_MTDPARTS_DEFAULT="mtdparts=boot:768k(u-boot),128k(env),128k(envred),-(ubi0);app:-(ubi1);"
 CONFIG_CMD_UBI=y
 # CONFIG_CMD_UBIFS is not set
+CONFIG_ENV_SOURCE_FILE="km83xx"
 CONFIG_ENV_OVERWRITE=y
 CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
 CONFIG_ENV_ADDR_REDUND=0xF00E0000
diff --git a/configs/kmeter1_defconfig b/configs/kmeter1_defconfig
index 9386f2c512..257b6a4546 100644
--- a/configs/kmeter1_defconfig
+++ b/configs/kmeter1_defconfig
@@ -129,7 +129,6 @@ CONFIG_ACR_PARKM_USB_I2C1_BOOT=y
 CONFIG_LCRR_DBYP_PLL_BYPASSED=y
 CONFIG_LCRR_EADC_2=y
 CONFIG_LCRR_CLKDIV_4=y
-CONFIG_KM_DEF_NETDEV="eth2"
 CONFIG_SYS_MONITOR_LEN=786432
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
@@ -165,6 +164,7 @@ CONFIG_MTDIDS_DEFAULT="nor0=boot"
 CONFIG_MTDPARTS_DEFAULT="mtdparts=boot:768k(u-boot),128k(env),128k(envred),-(ubi0);"
 CONFIG_CMD_UBI=y
 # CONFIG_CMD_UBIFS is not set
+CONFIG_ENV_SOURCE_FILE="km83xx"
 CONFIG_ENV_OVERWRITE=y
 CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
 CONFIG_ENV_ADDR_REDUND=0xF00E0000
diff --git a/configs/kmopti2_defconfig b/configs/kmopti2_defconfig
index 173306668f..53d37fa020 100644
--- a/configs/kmopti2_defconfig
+++ b/configs/kmopti2_defconfig
@@ -177,6 +177,7 @@ CONFIG_MTDIDS_DEFAULT="nor0=boot"
 CONFIG_MTDPARTS_DEFAULT="mtdparts=boot:768k(u-boot),128k(env),128k(envred),-(ubi0);"
 CONFIG_CMD_UBI=y
 # CONFIG_CMD_UBIFS is not set
+CONFIG_ENV_SOURCE_FILE="km83xx"
 CONFIG_ENV_OVERWRITE=y
 CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
 CONFIG_ENV_ADDR_REDUND=0xF00E0000
diff --git a/configs/kmsupx5_defconfig b/configs/kmsupx5_defconfig
index c281611dd4..95b8518bdb 100644
--- a/configs/kmsupx5_defconfig
+++ b/configs/kmsupx5_defconfig
@@ -156,6 +156,7 @@ CONFIG_MTDIDS_DEFAULT="nor0=boot"
 CONFIG_MTDPARTS_DEFAULT="mtdparts=boot:768k(u-boot),128k(env),128k(envred),-(ubi0);"
 CONFIG_CMD_UBI=y
 # CONFIG_CMD_UBIFS is not set
+CONFIG_ENV_SOURCE_FILE="km83xx"
 CONFIG_ENV_OVERWRITE=y
 CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
 CONFIG_ENV_ADDR_REDUND=0xF00E0000
diff --git a/configs/kmtepr2_defconfig b/configs/kmtepr2_defconfig
index e099f74de1..0ebb049cfe 100644
--- a/configs/kmtepr2_defconfig
+++ b/configs/kmtepr2_defconfig
@@ -176,6 +176,7 @@ CONFIG_MTDIDS_DEFAULT="nor0=boot"
 CONFIG_MTDPARTS_DEFAULT="mtdparts=boot:768k(u-boot),128k(env),128k(envred),-(ubi0);"
 CONFIG_CMD_UBI=y
 # CONFIG_CMD_UBIFS is not set
+CONFIG_ENV_SOURCE_FILE="km83xx"
 CONFIG_ENV_OVERWRITE=y
 CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
 CONFIG_ENV_ADDR_REDUND=0xF00E0000
diff --git a/configs/tuge1_defconfig b/configs/tuge1_defconfig
index 3b8560f3e0..6758b59d95 100644
--- a/configs/tuge1_defconfig
+++ b/configs/tuge1_defconfig
@@ -156,6 +156,7 @@ CONFIG_MTDIDS_DEFAULT="nor0=boot"
 CONFIG_MTDPARTS_DEFAULT="mtdparts=boot:768k(u-boot),128k(env),128k(envred),-(ubi0);"
 CONFIG_CMD_UBI=y
 # CONFIG_CMD_UBIFS is not set
+CONFIG_ENV_SOURCE_FILE="km83xx"
 CONFIG_ENV_OVERWRITE=y
 CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
 CONFIG_ENV_ADDR_REDUND=0xF00E0000
diff --git a/configs/tuxx1_defconfig b/configs/tuxx1_defconfig
index 04ce0b3afe..0db4cee27b 100644
--- a/configs/tuxx1_defconfig
+++ b/configs/tuxx1_defconfig
@@ -178,6 +178,7 @@ CONFIG_MTDIDS_DEFAULT="nor0=boot"
 CONFIG_MTDPARTS_DEFAULT="mtdparts=boot:768k(u-boot),128k(env),128k(envred),-(ubi0);"
 CONFIG_CMD_UBI=y
 # CONFIG_CMD_UBIFS is not set
+CONFIG_ENV_SOURCE_FILE="km83xx"
 CONFIG_ENV_OVERWRITE=y
 CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
 CONFIG_ENV_ADDR_REDUND=0xF00E0000
diff --git a/include/configs/km/km-mpc83xx.h b/include/configs/km/km-mpc83xx.h
index 181ed1b8fa..17e596a687 100644
--- a/include/configs/km/km-mpc83xx.h
+++ b/include/configs/km/km-mpc83xx.h
@@ -69,30 +69,6 @@
  */
 #define CONFIG_SYS_BOOTMAPSZ		(8 << 20)
 
-/*
- * Environment
- */
-
-/*
- * Environment Configuration
- */
-#ifndef CONFIG_KM_DEF_ENV		/* if not set by keymile-common.h */
-#define CONFIG_KM_DEF_ENV "km-common=empty\0"
-#endif
-
-#ifndef CONFIG_KM_DEF_ARCH
-#define CONFIG_KM_DEF_ARCH	"arch=ppc_82xx\0"
-#endif
-
-#define CONFIG_EXTRA_ENV_SETTINGS \
-	CONFIG_KM_DEF_ENV						 \
-	CONFIG_KM_DEF_ARCH						 \
-	"newenv="							 \
-		"prot off " __stringify(CONFIG_ENV_ADDR) " +0x40000 && " \
-		"era " __stringify(CONFIG_ENV_ADDR) " +0x40000\0"	 \
-	"unlock=yes\0"							 \
-	""
-
 /*
  * QE UEC ethernet configuration
  */
diff --git a/include/configs/km/km-powerpc.h b/include/configs/km/km-powerpc.h
deleted file mode 100644
index 424caa0df9..0000000000
--- a/include/configs/km/km-powerpc.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0+ */
-/*
- * (C) Copyright 2011
- * Heiko Schocher, DENX Software Engineering, hs@denx.de.
- */
-
-#ifndef __CONFIG_KEYMILE_POWERPC_H
-#define __CONFIG_KEYMILE_POWERPC_H
-
-/* Do boardspecific init for all boards */
-
-/* Increase max size of compressed kernel */
-
-/******************************************************************************
- * (PRAM usage)
- * ... -------------------------------------------------------
- * ... |ROOTFSSIZE | PNVRAM |PHRAM |RESERVED_PRAM | END_OF_RAM
- * ... |<------------------- pram -------------------------->|
- * ... -------------------------------------------------------
- * @END_OF_RAM:
- * @CONFIG_KM_RESERVED_PRAM: reserved pram for special purpose
- * @CONFIG_KM_PHRAM: address for /var
- * @CONFIG_KM_PNVRAM: address for PNVRAM (for the application)
- */
-
-/* set the default PRAM value to at least PNVRAM + PHRAM when pram env variable
- * is not valid yet, which is the case for when u-boot copies itself to RAM */
-#define CONFIG_PRAM		((CONFIG_KM_PNVRAM + CONFIG_KM_PHRAM)>>10)
-
-/* architecture specific default bootargs */
-#define CONFIG_KM_DEF_BOOT_ARGS_CPU		""
-
-#define CONFIG_KM_DEF_ENV_CPU						\
-	"u-boot="CONFIG_HOSTNAME "/u-boot.bin\0"		\
-	"update="							\
-		"protect off " __stringify(BOOTFLASH_START) " +${filesize} && "\
-		"erase " __stringify(BOOTFLASH_START) "  +${filesize} && "\
-		"cp.b ${load_addr_r} " __stringify(BOOTFLASH_START)	\
-		"  ${filesize} && "					\
-		"protect on " __stringify(BOOTFLASH_START) "  +${filesize}\0"\
-	"set_fdthigh=true\0"						\
-	"checkfdt=true\0"						\
-	"bootm_mapsize=" __stringify(CONFIG_SYS_BOOTM_LEN) "\0"		\
-	""
-
-#endif /* __CONFIG_KEYMILE_POWERPC_H */
diff --git a/include/configs/kmcoge5ne.h b/include/configs/kmcoge5ne.h
index d6b60d8139..bcf4c7345b 100644
--- a/include/configs/kmcoge5ne.h
+++ b/include/configs/kmcoge5ne.h
@@ -8,18 +8,12 @@
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
-#define CONFIG_HOSTNAME		"kmcoge5ne"
 #define CONFIG_NAND_ECC_BCH
 #define CONFIG_NAND_KMETER1
 #define NAND_MAX_CHIPS				1
 #define CONFIG_SYS_NAND_BASE CONFIG_SYS_KMBEC_FPGA_BASE /* PRIO_BASE_ADDRESS */
 
-#define CONFIG_KM_UBI_PARTITION_NAME_BOOT	"ubi0"
-#define CONFIG_KM_UBI_PARTITION_NAME_APP	"ubi1"
-
 /* include common defines/options for all Keymile boards */
-#include "km/keymile-common.h"
-#include "km/km-powerpc.h"
 #include "km/km-mpc83xx.h"
 #include "km/km-mpc8360.h"
 
diff --git a/include/configs/kmeter1.h b/include/configs/kmeter1.h
index 4245875e39..321a187c7d 100644
--- a/include/configs/kmeter1.h
+++ b/include/configs/kmeter1.h
@@ -8,11 +8,7 @@
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
-#define CONFIG_HOSTNAME		"kmeter1"
-
 /* include common defines/options for all Keymile boards */
-#include "km/keymile-common.h"
-#include "km/km-powerpc.h"
 #include "km/km-mpc83xx.h"
 #include "km/km-mpc8360.h"
 
diff --git a/include/configs/kmopti2.h b/include/configs/kmopti2.h
index 5050c70303..d6a3844bcc 100644
--- a/include/configs/kmopti2.h
+++ b/include/configs/kmopti2.h
@@ -20,14 +20,7 @@
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
-/*
- * High Level Configuration Options
- */
-#define CONFIG_HOSTNAME		"kmopti2"
-
 /* include common defines/options for all Keymile boards */
-#include "km/keymile-common.h"
-#include "km/km-powerpc.h"
 #include "km/km-mpc83xx.h"
 #include "km/km-mpc832x.h"
 
diff --git a/include/configs/kmsupx5.h b/include/configs/kmsupx5.h
index e3de6c61e7..d6a3844bcc 100644
--- a/include/configs/kmsupx5.h
+++ b/include/configs/kmsupx5.h
@@ -20,14 +20,7 @@
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
-/*
- * High Level Configuration Options
- */
-#define CONFIG_HOSTNAME		"kmsupx5"
-
 /* include common defines/options for all Keymile boards */
-#include "km/keymile-common.h"
-#include "km/km-powerpc.h"
 #include "km/km-mpc83xx.h"
 #include "km/km-mpc832x.h"
 
diff --git a/include/configs/kmtepr2.h b/include/configs/kmtepr2.h
index a4ceb1c50d..d6a3844bcc 100644
--- a/include/configs/kmtepr2.h
+++ b/include/configs/kmtepr2.h
@@ -20,14 +20,7 @@
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
-/*
- * High Level Configuration Options
- */
-#define CONFIG_HOSTNAME         "kmtepr2"
-
 /* include common defines/options for all Keymile boards */
-#include "km/keymile-common.h"
-#include "km/km-powerpc.h"
 #include "km/km-mpc83xx.h"
 #include "km/km-mpc832x.h"
 
diff --git a/include/configs/tuge1.h b/include/configs/tuge1.h
index d43ccbe8dd..d6a3844bcc 100644
--- a/include/configs/tuge1.h
+++ b/include/configs/tuge1.h
@@ -20,14 +20,7 @@
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
-/*
- * High Level Configuration Options
- */
-#define CONFIG_HOSTNAME		"tuge1"
-
 /* include common defines/options for all Keymile boards */
-#include "km/keymile-common.h"
-#include "km/km-powerpc.h"
 #include "km/km-mpc83xx.h"
 #include "km/km-mpc832x.h"
 
diff --git a/include/configs/tuxx1.h b/include/configs/tuxx1.h
index 7eed31c35f..d6a3844bcc 100644
--- a/include/configs/tuxx1.h
+++ b/include/configs/tuxx1.h
@@ -20,14 +20,7 @@
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
-/*
- * High Level Configuration Options
- */
-#define CONFIG_HOSTNAME		"tuxx1"
-
 /* include common defines/options for all Keymile boards */
-#include "km/keymile-common.h"
-#include "km/km-powerpc.h"
 #include "km/km-mpc83xx.h"
 #include "km/km-mpc832x.h"
 
diff --git a/include/environment/pg-wcom/powerpc.env b/include/environment/pg-wcom/powerpc.env
new file mode 100644
index 0000000000..a57fd93092
--- /dev/null
+++ b/include/environment/pg-wcom/powerpc.env
@@ -0,0 +1,14 @@
+arch=ppc_82xx
+bootm_mapsize=CONFIG_SYS_BOOTM_LEN
+checkfdt=true
+set_fdthigh=true
+
+update=protect off BOOTFLASH_START +${filesize} &&
+       erase BOOTFLASH_START +${filesize} &&
+       cp.b ${load_addr_r} BOOTFLASH_START ${filesize} &&
+       protect on BOOTFLASH_START +${filesize}
+
+newenv=prot off CONFIG_ENV_ADDR +0x40000 &&
+       era CONFIG_ENV_ADDR +0x40000
+
+unlock=yes
-- 
2.31.1


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

* [PATCH 3/7] board/km/cent2: migrate to environment text file
  2022-12-02 17:22 [PATCH 0/7] updates for km board series Holger Brunck
  2022-12-02 17:22 ` [PATCH 1/7] board/km: move ls102xa boards to environment text files Holger Brunck
  2022-12-02 17:22 ` [PATCH 2/7] km/powerpc: migrate to env.txt file Holger Brunck
@ 2022-12-02 17:22 ` Holger Brunck
  2022-12-02 17:22 ` [PATCH 4/7] board/km/secu: migrate to use environment text files Holger Brunck
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 13+ messages in thread
From: Holger Brunck @ 2022-12-02 17:22 UTC (permalink / raw)
  To: u-boot
  Cc: Niel Fourie, Heiko Schocher, Aleksandar Gerasimovski, Tom Rini,
	Holger Brunck

Use like the other boards a text file for the environment.
As this is the last user of keymile-common.h we can now remove this
file completely.

Signed-off-by: Holger Brunck <holger.brunck@hitachienergy.com>
---
 board/keymile/Kconfig               |  12 --
 board/keymile/kmcent2/kmcent2.c     |   2 +-
 board/keymile/kmcent2/kmcent2.env   |  37 ++++++
 configs/kmcent2_defconfig           |   2 +-
 include/configs/km/keymile-common.h | 174 ----------------------------
 include/configs/kmcent2.h           |  74 ------------
 scripts/config_whitelist.txt        |  15 ---
 7 files changed, 39 insertions(+), 277 deletions(-)
 create mode 100644 board/keymile/kmcent2/kmcent2.env
 delete mode 100644 include/configs/km/keymile-common.h

diff --git a/board/keymile/Kconfig b/board/keymile/Kconfig
index b8f0578a28..46d0897108 100644
--- a/board/keymile/Kconfig
+++ b/board/keymile/Kconfig
@@ -77,18 +77,6 @@ config SYS_CLIPS_BASE
 	help
 	  IFC Base Address for CLIPS FPGA.
 
-config KM_CONSOLE_TTY
-	string "KM Console"
-	default "ttyS0"
-	help
-	  TTY console to use on board.
-
-config KM_DEF_NETDEV
-	string "Default Netdevice"
-	default "eth0"
-	help
-	  Default netdevice for debug interface
-
 config KM_COMMON_ETH_INIT
 	bool "Common Ethernet Initialization"
 	default y if ARCH_KIRKWOOD || MPC83xx
diff --git a/board/keymile/kmcent2/kmcent2.c b/board/keymile/kmcent2/kmcent2.c
index 6a1711092b..32fb509dbc 100644
--- a/board/keymile/kmcent2/kmcent2.c
+++ b/board/keymile/kmcent2/kmcent2.c
@@ -34,7 +34,7 @@ static uchar ivm_content[CONFIG_SYS_IVM_EEPROM_MAX_LEN];
 
 int checkboard(void)
 {
-	printf("Board: Hitachi Power Grids %s\n", KM_BOARD_NAME);
+	printf("Board: Hitachi Power Grids kmcent2\n");
 
 	return 0;
 }
diff --git a/board/keymile/kmcent2/kmcent2.env b/board/keymile/kmcent2/kmcent2.env
new file mode 100644
index 0000000000..7c8f8306c5
--- /dev/null
+++ b/board/keymile/kmcent2/kmcent2.env
@@ -0,0 +1,37 @@
+#include <environment/pg-wcom/common.env>
+
+EEprom_ivm=pca9547:70:9
+arch=ppc_82xx
+boot=bootm ${load_addr_r} - ${fdt_addr_r}
+checkfdt=true
+cramfsloadfdt=cramfsload ${fdt_addr_r} fdt_0x${IVM_BoardId}_0x${IVM_HWKey}.dtb
+fpgacfg=true
+hostname=kmcent2
+hwconfig=fsl_ddr:ctlr_intlv=cacheline
+netdev=eth2
+
+newenv=protect off ENV_DEL_ADDR +CONFIG_ENV_TOTAL_SIZE  &&
+       erase ENV_DEL_ADDR +CONFIG_ENV_TOTAL_SIZE &&
+       protect on ENV_DEL_ADDR +CONFIG_ENV_TOTAL_SIZE
+
+set_fdthigh=true
+uimage=uImage
+
+update=protect off CONFIG_SYS_MONITOR_BASE +${filesize} &&
+       erase CONFIG_SYS_MONITOR_BASE +${filesize} &&
+       cp.b ${load_addr_r} CONFIG_SYS_MONITOR_BASE ${filesize} &&
+       protect on CONFIG_SYS_MONITOR_BASE +${filesize}
+       update-nor=protect off CONFIG_SYS_FLASH_BASE +${filesize} &&
+       erase CONFIG_SYS_FLASH_BASE +${filesize} &&
+       cp.b ${load_addr_r} CONFIG_SYS_FLASH_BASE ${filesize} &&
+       protect on CONFIG_SYS_MONITOR_BASE +CONFIG_SYS_MONITOR_LEN
+
+usb_phy_type=utmi
+usb_dr_mode=host
+
+/*
+ * The Linux fsl_fman driver needs to be able to process frames with more
+ * than just the VLAN tag (i.e. eDSA tag). It is passed as a kernel boot
+ * parameters
+ */
+add_default+= fsl_dpaa_fman.fsl_fm_max_frm=1558
diff --git a/configs/kmcent2_defconfig b/configs/kmcent2_defconfig
index 48ac85b699..249568df6a 100644
--- a/configs/kmcent2_defconfig
+++ b/configs/kmcent2_defconfig
@@ -17,7 +17,6 @@ CONFIG_SYS_CACHE_STASHING=y
 # CONFIG_DEEP_SLEEP is not set
 CONFIG_PCIE1=y
 CONFIG_SYS_FSL_NUM_CC_PLLS=2
-CONFIG_KM_DEF_NETDEV="eth2"
 CONFIG_KM_IVM_BUS=2
 CONFIG_SYS_MONITOR_LEN=786432
 CONFIG_MP=y
@@ -54,6 +53,7 @@ CONFIG_MTDPARTS_DEFAULT="mtdparts=fe8000000.nor:128k(RCW),128k(fman),128k(QE),12
 CONFIG_CMD_UBI=y
 # CONFIG_CMD_UBIFS is not set
 CONFIG_OF_CONTROL=y
+CONFIG_ENV_SOURCE_FILE="kmcent2"
 CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_FLASH=y
 CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
diff --git a/include/configs/km/keymile-common.h b/include/configs/km/keymile-common.h
deleted file mode 100644
index 35cf27a2eb..0000000000
--- a/include/configs/km/keymile-common.h
+++ /dev/null
@@ -1,174 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0+ */
-/*
- * (C) Copyright 2008-2011
- * Heiko Schocher, DENX Software Engineering, hs@denx.de.
- */
-
-#ifndef __CONFIG_KEYMILE_H
-#define __CONFIG_KEYMILE_H
-
-#include <linux/stringify.h>
-
-/*
- * Miscellaneous configurable options
- */
-
-#define CONFIG_SYS_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200, 230400 }
-
-#ifndef CONFIG_KM_DEF_ENV_BOOTPARAMS
-#define CONFIG_KM_DEF_ENV_BOOTPARAMS \
-	"actual_bank=0\0"
-#endif
-
-#ifndef CONFIG_KM_UBI_PARTITION_NAME_BOOT
-#define CONFIG_KM_UBI_PARTITION_NAME_BOOT	"ubi0"
-#endif /* CONFIG_KM_UBI_PARTITION_NAME_BOOT */
-
-#ifndef CONFIG_KM_UBI_PART_BOOT_OPTS
-#define CONFIG_KM_UBI_PART_BOOT_OPTS		""
-#endif /* CONFIG_KM_UBI_PART_BOOT_OPTS */
-
-#ifndef CONFIG_KM_UBI_PARTITION_NAME_APP
-/* one flash chip only called boot */
-/* boot: CONFIG_KM_UBI_PARTITION_NAME_BOOT */
-# define CONFIG_KM_UBI_LINUX_MTD					\
-	"ubi.mtd=" CONFIG_KM_UBI_PARTITION_NAME_BOOT			\
-	CONFIG_KM_UBI_PART_BOOT_OPTS
-# define CONFIG_KM_DEV_ENV_FLASH_BOOT_UBI				\
-	"ubiattach=ubi part " CONFIG_KM_UBI_PARTITION_NAME_BOOT "\0"
-#else /* CONFIG_KM_UBI_PARTITION_NAME_APP */
-/* two flash chips called boot and app */
-/* boot: CONFIG_KM_UBI_PARTITION_NAME_BOOT */
-/* app:  CONFIG_KM_UBI_PARTITION_NAME_APP */
-# define CONFIG_KM_UBI_LINUX_MTD					\
-	"ubi.mtd=" CONFIG_KM_UBI_PARTITION_NAME_BOOT			\
-	CONFIG_KM_UBI_PART_BOOT_OPTS " "				\
-	"ubi.mtd=" CONFIG_KM_UBI_PARTITION_NAME_APP
-# define CONFIG_KM_DEV_ENV_FLASH_BOOT_UBI				\
-	"ubiattach=if test ${boot_bank} -eq 0; then; "			\
-	"ubi part " CONFIG_KM_UBI_PARTITION_NAME_BOOT "; else; "	\
-	"ubi part " CONFIG_KM_UBI_PARTITION_NAME_APP "; fi\0"
-#endif /* CONFIG_KM_UBI_PARTITION_NAME_APP */
-
-#ifdef CONFIG_NAND_ECC_BCH
-#define CONFIG_KM_UIMAGE_NAME "ecc_bch_uImage\0"
-#define CONFIG_KM_ECC_MODE    " eccmode=bch"
-#else
-#define CONFIG_KM_UIMAGE_NAME "uImage\0"
-#define CONFIG_KM_ECC_MODE
-#endif
-
-/*
- * boottargets
- * - set 'subbootcmds'
- * - set 'bootcmd' and 'altbootcmd'
- * available targets:
- * - 'release': for a standalone system		kernel/rootfs from flash
- */
-#define CONFIG_KM_DEF_ENV_BOOTTARGETS					\
-	"subbootcmds=ubiattach ubicopy checkfdt cramfsloadfdt "		\
-		"set_fdthigh cramfsloadkernel flashargs add_default "	\
-		"addpanic boot\0"					\
-	"develop="							\
-		"tftp ${load_addr_r} scripts/develop-${arch}.txt && "	\
-		"env import -t ${load_addr_r} ${filesize} && "		\
-		"run setup_debug_env\0"					\
-	"ramfs="							\
-		"tftp ${load_addr_r} scripts/ramfs-${arch}.txt && "	\
-		"env import -t ${load_addr_r} ${filesize} && "		\
-		"run setup_debug_env\0"					\
-	""
-
-/*
- * bootargs
- * - modify 'bootargs'
- *
- * - 'add_default': default bootargs common for all arm/ppc boards
- * - 'addpanic': add kernel panic options
- * - 'flashargs': defaults arguments for flash base boot
- *
- */
-#define CONFIG_KM_DEF_ENV_BOOTARGS					\
-	"add_default="							\
-		"setenv bootargs ${bootargs} "				\
-		"ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}"	\
-		":${hostname}:${netdev}:off:"				\
-		" console=" CONFIG_KM_CONSOLE_TTY ",${baudrate}"	\
-		" mem=${kernelmem} init=${init}"			\
-		CONFIG_KM_ECC_MODE					\
-		" phram.phram=phvar,${varaddr}," __stringify(CONFIG_KM_PHRAM)\
-		" " CONFIG_KM_UBI_LINUX_MTD " "				\
-		CONFIG_KM_DEF_BOOT_ARGS_CPU				\
-		"\0"							\
-	"addpanic="							\
-		"setenv bootargs ${bootargs} panic=1 panic_on_oops=1\0"	\
-	"flashargs="							\
-		"setenv bootargs "					\
-		"root=mtdblock:rootfs${boot_bank} "			\
-		"rootfstype=squashfs ro\0"				\
-	""
-
-/*
- * flash_boot
- * - commands for booting from flash
- *
- * - 'cramfsloadkernel': copy kernel from a cramfs to ram
- * - 'ubiattach': attach ubi partition
- * - 'ubicopy': copy ubi volume to ram
- *              - volume names: bootfs0, bootfs1, bootfs2, ...
- *
- * processor specific settings
- * - 'cramfsloadfdt': copy fdt from a cramfs to ram
- */
-#define CONFIG_KM_DEF_ENV_FLASH_BOOT					\
-	"cramfsaddr=" __stringify(CONFIG_KM_CRAMFS_ADDR) "\0"		\
-	"cramfsloadkernel=cramfsload ${load_addr_r} ${uimage}\0"	\
-	"ubicopy=ubi read ${cramfsaddr} bootfs${boot_bank}\0"		\
-	"uimage=" CONFIG_KM_UIMAGE_NAME					\
-	CONFIG_KM_DEV_ENV_FLASH_BOOT_UBI
-
-/*
- * constants
- * - KM specific constants and commands
- *
- * - 'default': setup default environment
- */
-#define CONFIG_KM_DEF_ENV_CONSTANTS					\
-	"backup_bank=0\0"						\
-	"release=run newenv; reset\0"					\
-	"pnvramsize=" __stringify(CONFIG_KM_PNVRAM) "\0"		\
-	"testbootcmd=setenv boot_bank ${test_bank}; "			\
-		"run ${subbootcmds}; reset\0"				\
-	"env_version=1\0"						\
-	""
-
-#ifndef CONFIG_KM_DEF_ENV
-#define CONFIG_KM_DEF_ENV	\
-	CONFIG_KM_DEF_ENV_BOOTPARAMS					\
-	"netdev=" __stringify(CONFIG_KM_DEF_NETDEV) "\0"		\
-	CONFIG_KM_DEF_ENV_CPU						\
-	CONFIG_KM_DEF_ENV_BOOTTARGETS					\
-	CONFIG_KM_DEF_ENV_BOOTARGS					\
-	CONFIG_KM_DEF_ENV_FLASH_BOOT					\
-	CONFIG_KM_DEF_ENV_CONSTANTS					\
-	"altbootcmd=run bootcmd\0"					\
-	"boot=bootm ${load_addr_r} - ${fdt_addr_r}\0"			\
-	"bootcmd=km_checkbidhwk &&  "					\
-		"setenv bootcmd \'if km_checktestboot; then; "          \
-				"setenv boot_bank ${test_bank}; else; " \
-				"setenv boot_bank ${actual_bank}; fi;"  \
-			"run ${subbootcmds}; reset\' && "		\
-		"setenv altbootcmd \'setenv boot_bank ${backup_bank}; "	\
-			"run ${subbootcmds}; reset\' && "		\
-		"saveenv && saveenv && boot\0"				\
-	"cramfsloadfdt="						\
-		"cramfsload ${fdt_addr_r} "				\
-		"fdt_0x${IVM_BoardId}_0x${IVM_HWKey}.dtb\0"		\
-	"fdt_addr_r=" __stringify(CONFIG_KM_FDT_ADDR) "\0"		\
-	"init=/sbin/init-overlay.sh\0"					\
-	"load_addr_r=" __stringify(CONFIG_KM_KERNEL_ADDR) "\0"		\
-	"load=tftpboot ${load_addr_r} ${u-boot}\0"			\
-	""
-#endif /* CONFIG_KM_DEF_ENV */
-
-#endif /* __CONFIG_KEYMILE_H */
diff --git a/include/configs/kmcent2.h b/include/configs/kmcent2.h
index 2e1459e3e4..54102331a6 100644
--- a/include/configs/kmcent2.h
+++ b/include/configs/kmcent2.h
@@ -8,18 +8,6 @@
 #ifndef __KMCENT2_H
 #define __KMCENT2_H
 
-#define CONFIG_HOSTNAME		"kmcent2"
-#define KM_BOARD_NAME	CONFIG_HOSTNAME
-
-/*
- * The Linux fsl_fman driver needs to be able to process frames with more
- * than just the VLAN tag (i.e. eDSA tag). It is passed as a kernel boot
- * parameters
- */
-#define CONFIG_KM_DEF_BOOT_ARGS_CPU	"fsl_dpaa_fman.fsl_fm_max_frm=1558"
-
-#include "km/keymile-common.h"
-
 /* Application IFC chip selects */
 #define SYS_LAWAPP_BASE		0xc0000000
 #define SYS_LAWAPP_BASE_PHYS	(0xf00000000ull | SYS_LAWAPP_BASE)
@@ -394,66 +382,4 @@ int get_scl(void);
  */
 #define CONFIG_SYS_BOOTMAPSZ	(64 << 20)	/* Initial map for Linux*/
 
-/*
- * Environment Configuration
- */
-#ifndef CONFIG_KM_DEF_ENV		/* if not set by keymile-common.h */
-#define CONFIG_KM_DEF_ENV
-#endif
-
-#define __USB_PHY_TYPE	utmi
-
-#define CONFIG_KM_DEF_ENV_CPU						\
-	"boot=bootm ${load_addr_r} - ${fdt_addr_r}\0"			\
-	"cramfsloadfdt="						\
-		"cramfsload ${fdt_addr_r} "				\
-		"fdt_0x${IVM_BoardId}_0x${IVM_HWKey}.dtb\0"		\
-	"u-boot=" CONFIG_HOSTNAME "/u-boot.bin\0"		\
-	"update=protect off " __stringify(CONFIG_SYS_MONITOR_BASE)	\
-		" +${filesize} && "					\
-		"erase " __stringify(CONFIG_SYS_MONITOR_BASE)		\
-		" +${filesize} && "					\
-		"cp.b ${load_addr_r} "					\
-		__stringify(CONFIG_SYS_MONITOR_BASE) " ${filesize} && "	\
-		"protect on " __stringify(CONFIG_SYS_MONITOR_BASE)	\
-		" +${filesize}\0"					\
-	"update-nor=protect off " __stringify(CONFIG_SYS_FLASH_BASE)	\
-		" +${filesize} && "					\
-		"erase " __stringify(CONFIG_SYS_FLASH_BASE)		\
-		" +${filesize} && "					\
-		"cp.b ${load_addr_r} "					\
-		__stringify(CONFIG_SYS_FLASH_BASE) " ${filesize} && "	\
-		"protect on " __stringify(CONFIG_SYS_MONITOR_BASE)	\
-		" +" __stringify(CONFIG_SYS_MONITOR_LEN) "\0"		\
-	"set_fdthigh=true\0"						\
-	"checkfdt=true\0"						\
-	"fpgacfg=true\0"						\
-	""
-
-#define CONFIG_HW_ENV_SETTINGS						\
-	"hwconfig=fsl_ddr:ctlr_intlv=cacheline\0"			\
-	"usb_phy_type=" __stringify(__USB_PHY_TYPE) "\0"		\
-	"usb_dr_mode=host\0"
-
-#define CONFIG_KM_NEW_ENV						\
-	"newenv=protect off " __stringify(ENV_DEL_ADDR)			\
-		" +" __stringify(CONFIG_ENV_TOTAL_SIZE) " && "		\
-		"erase " __stringify(ENV_DEL_ADDR)			\
-		" +" __stringify(CONFIG_ENV_TOTAL_SIZE) " && "		\
-		"protect on " __stringify(ENV_DEL_ADDR)			\
-		" +" __stringify(CONFIG_ENV_TOTAL_SIZE) "\0"
-
-/* ppc_82xx is the equivalent to ppc_6xx, the generic ppc toolchain */
-#ifndef CONFIG_KM_DEF_ARCH
-#define CONFIG_KM_DEF_ARCH	"arch=ppc_82xx\0"
-#endif
-
-#define CONFIG_EXTRA_ENV_SETTINGS					\
-	CONFIG_KM_DEF_ENV						\
-	CONFIG_KM_DEF_ARCH						\
-	CONFIG_KM_NEW_ENV						\
-	CONFIG_HW_ENV_SETTINGS						\
-	"EEprom_ivm=pca9547:70:9\0"					\
-	""
-
 #endif	/* __KMCENT2_H */
diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt
index c0f55e41a5..02295c74dd 100644
--- a/scripts/config_whitelist.txt
+++ b/scripts/config_whitelist.txt
@@ -91,23 +91,8 @@ CONFIG_IRAM_BASE
 CONFIG_IRAM_END
 CONFIG_IRAM_SIZE
 CONFIG_IRAM_TOP
-CONFIG_KM_DEF_ARCH
-CONFIG_KM_DEF_BOOT_ARGS_CPU
-CONFIG_KM_DEF_ENV
-CONFIG_KM_DEF_ENV_BOOTARGS
-CONFIG_KM_DEF_ENV_BOOTPARAMS
 CONFIG_KM_DEF_ENV_BOOTTARGETS
-CONFIG_KM_DEF_ENV_CONSTANTS
-CONFIG_KM_DEF_ENV_CPU
-CONFIG_KM_DEF_ENV_FLASH_BOOT
-CONFIG_KM_DEV_ENV_FLASH_BOOT_UBI
-CONFIG_KM_ECC_MODE
 CONFIG_KM_NEW_ENV
-CONFIG_KM_UBI_LINUX_MTD
-CONFIG_KM_UBI_PARTITION_NAME_APP
-CONFIG_KM_UBI_PARTITION_NAME_BOOT
-CONFIG_KM_UBI_PART_BOOT_OPTS
-CONFIG_KM_UIMAGE_NAME
 CONFIG_KSNET_CPSW_NUM_PORTS
 CONFIG_KSNET_MAC_ID_BASE
 CONFIG_KSNET_MDIO_PHY_CONFIG_ENABLE
-- 
2.31.1


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

* [PATCH 4/7] board/km/secu: migrate to use environment text files
  2022-12-02 17:22 [PATCH 0/7] updates for km board series Holger Brunck
                   ` (2 preceding siblings ...)
  2022-12-02 17:22 ` [PATCH 3/7] board/km/cent2: migrate to environment text file Holger Brunck
@ 2022-12-02 17:22 ` Holger Brunck
  2022-12-02 17:22 ` [PATCH 5/7] board/km: remove obsolete ARCH_KIRKWOOD Holger Brunck
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 13+ messages in thread
From: Holger Brunck @ 2022-12-02 17:22 UTC (permalink / raw)
  To: u-boot
  Cc: Niel Fourie, Heiko Schocher, Aleksandar Gerasimovski, Tom Rini,
	Holger Brunck

Instead of having these defines in a header file, move them to
a simple text file.

Signed-off-by: Holger Brunck <holger.brunck@hitachienergy.com>
---
 board/keymile/secu1/socfpga_secu.env   | 50 ++++++++++++++++++++++++
 configs/socfpga_secu1_defconfig        |  4 +-
 include/configs/socfpga_arria5_secu1.h | 53 --------------------------
 scripts/config_whitelist.txt           |  2 -
 4 files changed, 52 insertions(+), 57 deletions(-)
 create mode 100644 board/keymile/secu1/socfpga_secu.env

diff --git a/board/keymile/secu1/socfpga_secu.env b/board/keymile/secu1/socfpga_secu.env
new file mode 100644
index 0000000000..147c4170ef
--- /dev/null
+++ b/board/keymile/secu1/socfpga_secu.env
@@ -0,0 +1,50 @@
+altbootcmd=run bootcmd;
+bootlimit=6
+bootnum=1
+bootretry=CONFIG_BOOT_RETRY_TIME
+
+develop=tftp 0x200000 scripts/develop-secu.txt &&
+	env import -t 0x200000 ${filesize} &&
+	saveenv &&
+	reset
+
+fdt_addr=CONFIG_KM_FDT_ADDR
+load=tftpboot ${loadaddr} u-boot-with-nand-spl.sfp
+loadaddr=CONFIG_KM_KERNEL_ADDR
+newenv=nand erase 0x100000 0x40000
+release=run newenv; reset
+socfpga_legacy_reset_compat=1
+update=nand erase 0x0 0x00100000 && nand write ${loadaddr} 0x0 ${filesize}
+
+userload=ubi part nand.ubi &&
+	 ubi check rootfs$bootnum &&
+	 ubi read $fdt_addr dtb$bootnum &&
+	 ubi read $loadaddr kernel$bootnum
+
+userboot=setenv bootargs console=ttyS0,115200 ubi.fm_autoconvert=1 uio_pdrv_genirq.of_id="idq,regbank"
+			 ubi.mtd=1 ubi.block=0,rootfs$bootnum root=/dev/ubiblock0_$ubivolid ro
+			 rootfstype=squashfs init=sbin/preinit;
+		bootz ${loadaddr} - ${fdt_addr}
+
+verify=y
+
+/*
+ * FPGA Remote Update related environment
+ *
+ * Note that since those commands access the FPGA, the HPS-to-FPGA bridges
+ * MUST have been previously enabled (for example with 'bridge enable').
+ */
+rmtu_page=0xFF29000C
+rmtu_reconfig=0xFF290018
+fpga_safebase=0x0
+fpga_userbase=0x2000000
+
+_fpga_loaduser=echo "Loading FPGA USER image..." &&
+	       mw ${rmtu_page} ${fpga_userbase} &&
+	       mw ${rmtu_reconfig} 1
+
+_fpga_loadsafe=echo "Loading FPGA SAFE image..." &&
+	       mw ${rmtu_page} ${fpga_safebase} &&
+	       mw ${rmtu_reconfig} 1
+
+
diff --git a/configs/socfpga_secu1_defconfig b/configs/socfpga_secu1_defconfig
index debe22f30a..c5c86a4515 100644
--- a/configs/socfpga_secu1_defconfig
+++ b/configs/socfpga_secu1_defconfig
@@ -3,7 +3,7 @@ CONFIG_SYS_L2_PL310=y
 CONFIG_ARCH_SOCFPGA=y
 CONFIG_SYS_MALLOC_LEN=0x4000000
 CONFIG_SYS_MALLOC_F_LEN=0x800
-CONFIG_ENV_SIZE=0x1000
+CONFIG_ENV_SIZE=0x2000
 CONFIG_ENV_OFFSET=0x100000
 CONFIG_DM_GPIO=y
 CONFIG_DEFAULT_DEVICE_TREE="socfpga_arria5_secu1"
@@ -24,7 +24,6 @@ CONFIG_BOOT_RETRY=y
 CONFIG_BOOT_RETRY_TIME=45
 CONFIG_RESET_TO_RETRY=y
 CONFIG_USE_BOOTARGS=y
-CONFIG_BOOTARGS="console=ttyS0,115200 ubi.fm_autoconvert=1 uio_pdrv_genirq.of_id=\"idq,regbank\""
 CONFIG_BOOTCOMMAND="setenv bootcmd 'bridge enable; if test ${bootnum} = 'b'; then run _fpga_loadsafe; else if test ${bootcount} -eq 4; then echo 'Switching copy...'; setexpr x $bootnum % 2 && setexpr bootnum $x + 1; saveenv; fi; run _fpga_loaduser; fi;echo 'Booting bank $bootnum' && run userload && run userboot;' && setenv altbootcmd 'setenv bootnum b && saveenv && boot;' && saveenv && saveenv && boot;"
 CONFIG_DEFAULT_FDT_FILE="socfpga_arria5_secu1.dtb"
 CONFIG_SYS_CONSOLE_IS_IN_ENV=y
@@ -65,6 +64,7 @@ CONFIG_CMD_UBI=y
 # CONFIG_CMD_UBIFS is not set
 # CONFIG_ISO_PARTITION is not set
 # CONFIG_EFI_PARTITION is not set
+CONFIG_ENV_SOURCE_FILE="socfpga_secu"
 CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_NAND=y
 CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
diff --git a/include/configs/socfpga_arria5_secu1.h b/include/configs/socfpga_arria5_secu1.h
index 261ae56c1d..e5d742115c 100644
--- a/include/configs/socfpga_arria5_secu1.h
+++ b/include/configs/socfpga_arria5_secu1.h
@@ -7,7 +7,6 @@
 #define __CONFIG_SOCFPGA_SECU1_H__
 
 #include <asm/arch/base_addr_ac5.h>
-#include <linux/stringify.h>
 
 /* Eternal oscillator */
 #define CONFIG_SYS_TIMER_RATE	40000000
@@ -23,58 +22,6 @@
  */
 #define CONFIG_SYS_I2C_RTC_ADDR         0x68
 
-/* Environment settings */
-
-/*
- * FPGA Remote Update related environment
- *
- * Note that since those commands access the FPGA, the HPS-to-FPGA
- * bridges MUST have been previously enabled (for example
- * with 'bridge enable').
- */
-#define FPGA_RMTU_ENV \
-	"rmtu_page=0xFF29000C\0" \
-	"rmtu_reconfig=0xFF290018\0" \
-	"fpga_safebase=0x0\0" \
-	"fpga_userbase=0x2000000\0" \
-	"_fpga_loaduser=echo Loading FPGA USER image..." \
-		" && mw ${rmtu_page} ${fpga_userbase} && mw ${rmtu_reconfig} 1\0" \
-	"_fpga_loadsafe=echo Loading FPGA SAFE image..." \
-		" && mw ${rmtu_page} ${fpga_safebase} && mw ${rmtu_reconfig} 1\0" \
-
-#define CONFIG_KM_NEW_ENV \
-	"newenv=" \
-		"nand erase 0x100000 0x40000\0"
-
-#define CONFIG_KM_DEF_ENV_BOOTTARGETS \
-	"release=" \
-		"run newenv; reset\0" \
-	"develop=" \
-		"tftp 0x200000 scripts/develop-secu.txt && env import -t 0x200000 ${filesize} && saveenv && reset\0"
-
-#define CONFIG_EXTRA_ENV_SETTINGS \
-	FPGA_RMTU_ENV \
-	CONFIG_KM_DEF_ENV_BOOTTARGETS \
-	CONFIG_KM_NEW_ENV \
-	"socfpga_legacy_reset_compat=1\0"	\
-	"altbootcmd=run bootcmd;\0"	\
-	"bootlimit=6\0"	\
-	"bootnum=1\0" \
-	"bootretry=" __stringify(CONFIG_BOOT_RETRY_TIME) "\0" \
-	"fdt_addr=" __stringify(CONFIG_KM_FDT_ADDR) "\0" \
-	"load=tftpboot ${loadaddr} u-boot-with-nand-spl.sfp\0" \
-	"loadaddr=" __stringify(CONFIG_KM_KERNEL_ADDR) "\0" \
-	"update=nand erase 0x0 0x00100000 && nand write ${loadaddr} 0x0 ${filesize}\0" \
-	"userload=ubi part nand.ubi &&" \
-		"ubi check rootfs$bootnum &&" \
-		"ubi read $fdt_addr dtb$bootnum &&" \
-		"ubi read $loadaddr kernel$bootnum\0" \
-	"userboot=setenv bootargs " CONFIG_BOOTARGS \
-		" ubi.mtd=1 ubi.block=0,rootfs$bootnum root=/dev/ubiblock0_$ubivolid"	\
-		" ro rootfstype=squashfs init=sbin/preinit;" \
-		"bootz ${loadaddr} - ${fdt_addr}\0" \
-	"verify=y\0"
-
 /* The rest of the configuration is shared */
 #include <configs/socfpga_common.h>
 
diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt
index 02295c74dd..8cef41dace 100644
--- a/scripts/config_whitelist.txt
+++ b/scripts/config_whitelist.txt
@@ -91,8 +91,6 @@ CONFIG_IRAM_BASE
 CONFIG_IRAM_END
 CONFIG_IRAM_SIZE
 CONFIG_IRAM_TOP
-CONFIG_KM_DEF_ENV_BOOTTARGETS
-CONFIG_KM_NEW_ENV
 CONFIG_KSNET_CPSW_NUM_PORTS
 CONFIG_KSNET_MAC_ID_BASE
 CONFIG_KSNET_MDIO_PHY_CONFIG_ENABLE
-- 
2.31.1


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

* [PATCH 5/7] board/km: remove obsolete ARCH_KIRKWOOD
  2022-12-02 17:22 [PATCH 0/7] updates for km board series Holger Brunck
                   ` (3 preceding siblings ...)
  2022-12-02 17:22 ` [PATCH 4/7] board/km/secu: migrate to use environment text files Holger Brunck
@ 2022-12-02 17:22 ` Holger Brunck
  2022-12-02 17:22 ` [PATCH 6/7] km/ppc: migrate all mpc83xx to DM_I2C Holger Brunck
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 13+ messages in thread
From: Holger Brunck @ 2022-12-02 17:22 UTC (permalink / raw)
  To: u-boot
  Cc: Niel Fourie, Heiko Schocher, Aleksandar Gerasimovski, Tom Rini,
	Holger Brunck

We already removed the support for these boards.

Signed-off-by: Holger Brunck <holger.brunck@hitachienergy.com>
---
 board/keymile/Kconfig | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/board/keymile/Kconfig b/board/keymile/Kconfig
index 46d0897108..cd8a06e278 100644
--- a/board/keymile/Kconfig
+++ b/board/keymile/Kconfig
@@ -34,7 +34,6 @@ config KM_PHRAM
 
 config KM_RESERVED_PRAM
 	hex "Reserved RAM"
-	default 0x801000 if ARCH_KIRKWOOD
 	default 0x0 if MPC83xx
 	default 0x1000 if MPC85xx || ARCH_LS1021A
 	depends on !ARCH_SOCFPGA
@@ -79,7 +78,7 @@ config SYS_CLIPS_BASE
 
 config KM_COMMON_ETH_INIT
 	bool "Common Ethernet Initialization"
-	default y if ARCH_KIRKWOOD || MPC83xx
+	default y if MPC83xx
 	default n if MPC85xx || ARCH_SOCFPGA || ARCH_LS1021A
 	help
 	  Use the Ethernet initialization implemented in common code that
@@ -101,7 +100,7 @@ config KM_MVEXTSW_ADDR
 config KM_IVM_BUS
 	int "IVM I2C Bus"
 	default 0 if ARCH_SOCFPGA
-	default 1 if ARCH_KIRKWOOD || MPC85xx || ARCH_LS1021A
+	default 1 if MPC85xx || ARCH_LS1021A
 	default 2 if MPC83xx
 	help
 	  Identifier number of I2C bus, where the inventory EEPROM is connected to.
-- 
2.31.1


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

* [PATCH 6/7] km/ppc: migrate all mpc83xx to DM_I2C
  2022-12-02 17:22 [PATCH 0/7] updates for km board series Holger Brunck
                   ` (4 preceding siblings ...)
  2022-12-02 17:22 ` [PATCH 5/7] board/km: remove obsolete ARCH_KIRKWOOD Holger Brunck
@ 2022-12-02 17:22 ` Holger Brunck
  2022-12-02 17:22 ` [PATCH 7/7] km/mpc8360: remove unused CONFIG_SYS_PAXE defines Holger Brunck
  2022-12-06 21:36 ` [PATCH 0/7] updates for km board series Tom Rini
  7 siblings, 0 replies; 13+ messages in thread
From: Holger Brunck @ 2022-12-02 17:22 UTC (permalink / raw)
  To: u-boot
  Cc: Niel Fourie, Heiko Schocher, Aleksandar Gerasimovski, Tom Rini,
	Holger Brunck

Enable DM_I2C and I2C mux to get rid of the usage of the legacy
i2c driver.

Signed-off-by: Holger Brunck <holger.brunck@hitachienergy.com>
---
 board/keymile/Kconfig             |  3 +-
 board/keymile/km83xx/Makefile     |  2 +-
 board/keymile/km83xx/km83xx_i2c.c | 73 -------------------------------
 configs/kmcoge5ne_defconfig       |  9 ++--
 configs/kmeter1_defconfig         |  9 ++--
 configs/kmopti2_defconfig         |  9 ++--
 configs/kmsupx5_defconfig         |  9 ++--
 configs/kmtepr2_defconfig         |  9 ++--
 configs/tuge1_defconfig           |  9 ++--
 configs/tuxx1_defconfig           |  9 ++--
 include/configs/km/km-mpc83xx.h   |  8 ----
 11 files changed, 23 insertions(+), 126 deletions(-)
 delete mode 100644 board/keymile/km83xx/km83xx_i2c.c

diff --git a/board/keymile/Kconfig b/board/keymile/Kconfig
index cd8a06e278..e5d7c80a86 100644
--- a/board/keymile/Kconfig
+++ b/board/keymile/Kconfig
@@ -100,8 +100,7 @@ config KM_MVEXTSW_ADDR
 config KM_IVM_BUS
 	int "IVM I2C Bus"
 	default 0 if ARCH_SOCFPGA
-	default 1 if MPC85xx || ARCH_LS1021A
-	default 2 if MPC83xx
+	default 1 if PPC || ARCH_LS1021A
 	help
 	  Identifier number of I2C bus, where the inventory EEPROM is connected to.
 
diff --git a/board/keymile/km83xx/Makefile b/board/keymile/km83xx/Makefile
index 0aef654987..bdb358e2d2 100644
--- a/board/keymile/km83xx/Makefile
+++ b/board/keymile/km83xx/Makefile
@@ -3,4 +3,4 @@
 # (C) Copyright 2006
 # Wolfgang Denk, DENX Software Engineering, wd@denx.de.
 
-obj-y	+= km83xx.o ../common/common.o ../common/ivm.o km83xx_i2c.o
+obj-y	+= km83xx.o ../common/common.o ../common/ivm.o
diff --git a/board/keymile/km83xx/km83xx_i2c.c b/board/keymile/km83xx/km83xx_i2c.c
deleted file mode 100644
index b80672d1b4..0000000000
--- a/board/keymile/km83xx/km83xx_i2c.c
+++ /dev/null
@@ -1,73 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0+
-/*
- * (C) Copyright 2011
- * Holger Brunck, Keymile GmbH Hannover, holger.brunck@keymile.com
- */
-
-#include <common.h>
-#include <i2c.h>
-#include <asm/io.h>
-#include <linux/ctype.h>
-#include <linux/delay.h>
-#include "../common/common.h"
-
-static void i2c_write_start_seq(void)
-{
-	struct fsl_i2c_base *base;
-	base = (struct fsl_i2c_base *)(CONFIG_SYS_IMMR +
-			CONFIG_SYS_FSL_I2C_OFFSET);
-	udelay(DELAY_ABORT_SEQ);
-	out_8(&base->cr, (I2C_CR_MEN | I2C_CR_MSTA));
-	udelay(DELAY_ABORT_SEQ);
-	out_8(&base->cr, (I2C_CR_MEN));
-}
-
-int i2c_make_abort(void)
-{
-	struct fsl_i2c_base *base;
-	base = (struct fsl_i2c_base *)(CONFIG_SYS_IMMR +
-			CONFIG_SYS_FSL_I2C_OFFSET);
-	uchar   last;
-	int     nbr_read = 0;
-	int     i = 0;
-	int	    ret = 0;
-
-	/* wait after each operation to finsh with a delay */
-	out_8(&base->cr, (I2C_CR_MSTA));
-	udelay(DELAY_ABORT_SEQ);
-	out_8(&base->cr, (I2C_CR_MEN | I2C_CR_MSTA));
-	udelay(DELAY_ABORT_SEQ);
-	in_8(&base->dr);
-	udelay(DELAY_ABORT_SEQ);
-	last = in_8(&base->dr);
-	nbr_read++;
-
-	/*
-	 * do read until the last bit is 1, but stop if the full eeprom is
-	 * read.
-	 */
-	while (((last & 0x01) != 0x01) &&
-		(nbr_read < CONFIG_SYS_IVM_EEPROM_MAX_LEN)) {
-		udelay(DELAY_ABORT_SEQ);
-		last = in_8(&base->dr);
-		nbr_read++;
-	}
-	if ((last & 0x01) != 0x01)
-		ret = -2;
-	if ((last != 0xff) || (nbr_read > 1))
-		printf("[INFO] i2c abort after %d bytes (0x%02x)\n",
-			nbr_read, last);
-	udelay(DELAY_ABORT_SEQ);
-	out_8(&base->cr, (I2C_CR_MEN));
-	udelay(DELAY_ABORT_SEQ);
-	/* clear status reg */
-	out_8(&base->sr, 0);
-
-	for (i = 0; i < 5; i++)
-		i2c_write_start_seq();
-	if (ret != 0)
-		printf("[ERROR] i2c abort failed after %d bytes (0x%02x)\n",
-			nbr_read, last);
-
-	return ret;
-}
diff --git a/configs/kmcoge5ne_defconfig b/configs/kmcoge5ne_defconfig
index 389800795d..26db5a9d3b 100644
--- a/configs/kmcoge5ne_defconfig
+++ b/configs/kmcoge5ne_defconfig
@@ -218,13 +218,10 @@ CONFIG_SYS_OR3_PRELIM=0xF0000E25
 CONFIG_SYS_BR4_PRELIM_BOOL=y
 CONFIG_SYS_BR4_PRELIM=0xB0000801
 CONFIG_SYS_OR4_PRELIM=0xF0000E25
-CONFIG_SYS_I2C_LEGACY=y
+CONFIG_DM_I2C=y
 CONFIG_SYS_I2C_FSL=y
-CONFIG_SYS_FSL_I2C_OFFSET=0x3000
-CONFIG_SYS_FSL_HAS_I2C2_OFFSET=y
-CONFIG_SYS_FSL_I2C2_OFFSET=0x3100
-CONFIG_SYS_I2C_SLAVE=0x7F
-CONFIG_SYS_I2C_SPEED=200000
+CONFIG_I2C_MUX=y
+CONFIG_I2C_MUX_PCA954x=y
 # CONFIG_MMC is not set
 CONFIG_MTD=y
 CONFIG_MTD_NOR_FLASH=y
diff --git a/configs/kmeter1_defconfig b/configs/kmeter1_defconfig
index 257b6a4546..36a242b491 100644
--- a/configs/kmeter1_defconfig
+++ b/configs/kmeter1_defconfig
@@ -184,13 +184,10 @@ CONFIG_SYS_OR1_PRELIM=0xFC000E25
 CONFIG_SYS_BR3_PRELIM_BOOL=y
 CONFIG_SYS_BR3_PRELIM=0xA0000801
 CONFIG_SYS_OR3_PRELIM=0xF0000E25
-CONFIG_SYS_I2C_LEGACY=y
+CONFIG_DM_I2C=y
 CONFIG_SYS_I2C_FSL=y
-CONFIG_SYS_FSL_I2C_OFFSET=0x3000
-CONFIG_SYS_FSL_HAS_I2C2_OFFSET=y
-CONFIG_SYS_FSL_I2C2_OFFSET=0x3100
-CONFIG_SYS_I2C_SLAVE=0x7F
-CONFIG_SYS_I2C_SPEED=200000
+CONFIG_I2C_MUX=y
+CONFIG_I2C_MUX_PCA954x=y
 # CONFIG_MMC is not set
 CONFIG_MTD=y
 CONFIG_MTD_NOR_FLASH=y
diff --git a/configs/kmopti2_defconfig b/configs/kmopti2_defconfig
index 53d37fa020..0148d340d7 100644
--- a/configs/kmopti2_defconfig
+++ b/configs/kmopti2_defconfig
@@ -199,13 +199,10 @@ CONFIG_SYS_OR2_PRELIM=0xF0000C25
 CONFIG_SYS_BR3_PRELIM_BOOL=y
 CONFIG_SYS_BR3_PRELIM=0xB0001001
 CONFIG_SYS_OR3_PRELIM=0xF0000040
-CONFIG_SYS_I2C_LEGACY=y
+CONFIG_DM_I2C=y
 CONFIG_SYS_I2C_FSL=y
-CONFIG_SYS_FSL_I2C_OFFSET=0x3000
-CONFIG_SYS_FSL_HAS_I2C2_OFFSET=y
-CONFIG_SYS_FSL_I2C2_OFFSET=0x3100
-CONFIG_SYS_I2C_SLAVE=0x7F
-CONFIG_SYS_I2C_SPEED=200000
+CONFIG_I2C_MUX=y
+CONFIG_I2C_MUX_PCA954x=y
 # CONFIG_MMC is not set
 CONFIG_MTD=y
 CONFIG_MTD_NOR_FLASH=y
diff --git a/configs/kmsupx5_defconfig b/configs/kmsupx5_defconfig
index 95b8518bdb..3822666618 100644
--- a/configs/kmsupx5_defconfig
+++ b/configs/kmsupx5_defconfig
@@ -176,13 +176,10 @@ CONFIG_SYS_OR1_PRELIM=0xF8000E25
 CONFIG_SYS_BR2_PRELIM_BOOL=y
 CONFIG_SYS_BR2_PRELIM=0xA0000801
 CONFIG_SYS_OR2_PRELIM=0xF0000C25
-CONFIG_SYS_I2C_LEGACY=y
+CONFIG_DM_I2C=y
 CONFIG_SYS_I2C_FSL=y
-CONFIG_SYS_FSL_I2C_OFFSET=0x3000
-CONFIG_SYS_FSL_HAS_I2C2_OFFSET=y
-CONFIG_SYS_FSL_I2C2_OFFSET=0x3100
-CONFIG_SYS_I2C_SLAVE=0x7F
-CONFIG_SYS_I2C_SPEED=200000
+CONFIG_I2C_MUX=y
+CONFIG_I2C_MUX_PCA954x=y
 # CONFIG_MMC is not set
 CONFIG_MTD=y
 CONFIG_MTD_NOR_FLASH=y
diff --git a/configs/kmtepr2_defconfig b/configs/kmtepr2_defconfig
index 0ebb049cfe..452902c77d 100644
--- a/configs/kmtepr2_defconfig
+++ b/configs/kmtepr2_defconfig
@@ -198,13 +198,10 @@ CONFIG_SYS_OR2_PRELIM=0xF0000C25
 CONFIG_SYS_BR3_PRELIM_BOOL=y
 CONFIG_SYS_BR3_PRELIM=0xB0001001
 CONFIG_SYS_OR3_PRELIM=0xF0000040
-CONFIG_SYS_I2C_LEGACY=y
+CONFIG_DM_I2C=y
 CONFIG_SYS_I2C_FSL=y
-CONFIG_SYS_FSL_I2C_OFFSET=0x3000
-CONFIG_SYS_FSL_HAS_I2C2_OFFSET=y
-CONFIG_SYS_FSL_I2C2_OFFSET=0x3100
-CONFIG_SYS_I2C_SLAVE=0x7F
-CONFIG_SYS_I2C_SPEED=200000
+CONFIG_I2C_MUX=y
+CONFIG_I2C_MUX_PCA954x=y
 # CONFIG_MMC is not set
 CONFIG_MTD=y
 CONFIG_MTD_NOR_FLASH=y
diff --git a/configs/tuge1_defconfig b/configs/tuge1_defconfig
index 6758b59d95..8c9204f173 100644
--- a/configs/tuge1_defconfig
+++ b/configs/tuge1_defconfig
@@ -176,13 +176,10 @@ CONFIG_SYS_OR1_PRELIM=0xF8000E25
 CONFIG_SYS_BR2_PRELIM_BOOL=y
 CONFIG_SYS_BR2_PRELIM=0xA0000801
 CONFIG_SYS_OR2_PRELIM=0xF0000C25
-CONFIG_SYS_I2C_LEGACY=y
+CONFIG_DM_I2C=y
 CONFIG_SYS_I2C_FSL=y
-CONFIG_SYS_FSL_I2C_OFFSET=0x3000
-CONFIG_SYS_FSL_HAS_I2C2_OFFSET=y
-CONFIG_SYS_FSL_I2C2_OFFSET=0x3100
-CONFIG_SYS_I2C_SLAVE=0x7F
-CONFIG_SYS_I2C_SPEED=200000
+CONFIG_I2C_MUX=y
+CONFIG_I2C_MUX_PCA954x=y
 # CONFIG_MMC is not set
 CONFIG_MTD=y
 CONFIG_MTD_NOR_FLASH=y
diff --git a/configs/tuxx1_defconfig b/configs/tuxx1_defconfig
index 0db4cee27b..ae26736deb 100644
--- a/configs/tuxx1_defconfig
+++ b/configs/tuxx1_defconfig
@@ -200,13 +200,10 @@ CONFIG_SYS_OR2_PRELIM=0xF0000C25
 CONFIG_SYS_BR3_PRELIM_BOOL=y
 CONFIG_SYS_BR3_PRELIM=0xB0000801
 CONFIG_SYS_OR3_PRELIM=0xF0000E24
-CONFIG_SYS_I2C_LEGACY=y
+CONFIG_DM_I2C=y
 CONFIG_SYS_I2C_FSL=y
-CONFIG_SYS_FSL_I2C_OFFSET=0x3000
-CONFIG_SYS_FSL_HAS_I2C2_OFFSET=y
-CONFIG_SYS_FSL_I2C2_OFFSET=0x3100
-CONFIG_SYS_I2C_SLAVE=0x7F
-CONFIG_SYS_I2C_SPEED=200000
+CONFIG_I2C_MUX=y
+CONFIG_I2C_MUX_PCA954x=y
 # CONFIG_MMC is not set
 CONFIG_MTD=y
 CONFIG_MTD_NOR_FLASH=y
diff --git a/include/configs/km/km-mpc83xx.h b/include/configs/km/km-mpc83xx.h
index 17e596a687..1c5611c493 100644
--- a/include/configs/km/km-mpc83xx.h
+++ b/include/configs/km/km-mpc83xx.h
@@ -49,14 +49,6 @@
 
 #define CONFIG_SYS_FLASH_BANKS_LIST { CONFIG_SYS_FLASH_BASE }
 
-/* I2C */
-#define CONFIG_SYS_NUM_I2C_BUSES	4
-#define CONFIG_SYS_I2C_MAX_HOPS		1
-#define CONFIG_SYS_I2C_BUSES	{{0, {I2C_NULL_HOP} }, \
-		{0, {{I2C_MUX_PCA9547, 0x70, 2} } }, \
-		{0, {{I2C_MUX_PCA9547, 0x70, 1} } }, \
-		{1, {I2C_NULL_HOP} } }
-
 #if defined(CONFIG_CMD_NAND)
 #define CONFIG_NAND_KMETER1
 #define CONFIG_SYS_NAND_BASE		CONFIG_SYS_KMBEC_FPGA_BASE
-- 
2.31.1


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

* [PATCH 7/7] km/mpc8360: remove unused CONFIG_SYS_PAXE defines
  2022-12-02 17:22 [PATCH 0/7] updates for km board series Holger Brunck
                   ` (5 preceding siblings ...)
  2022-12-02 17:22 ` [PATCH 6/7] km/ppc: migrate all mpc83xx to DM_I2C Holger Brunck
@ 2022-12-02 17:22 ` Holger Brunck
  2022-12-06 21:36 ` [PATCH 0/7] updates for km board series Tom Rini
  7 siblings, 0 replies; 13+ messages in thread
From: Holger Brunck @ 2022-12-02 17:22 UTC (permalink / raw)
  To: u-boot
  Cc: Niel Fourie, Heiko Schocher, Aleksandar Gerasimovski, Tom Rini,
	Holger Brunck

These are unused defines and can be dropped.

Signed-off-by: Holger Brunck <holger.brunck@hitachienergy.com>
---
 include/configs/km/km-mpc8360.h | 7 -------
 scripts/config_whitelist.txt    | 1 -
 2 files changed, 8 deletions(-)

diff --git a/include/configs/km/km-mpc8360.h b/include/configs/km/km-mpc8360.h
index 92e046d02d..185bf9f7ce 100644
--- a/include/configs/km/km-mpc8360.h
+++ b/include/configs/km/km-mpc8360.h
@@ -66,10 +66,3 @@
 
 #define CONFIG_SYS_DDR_TIMING_3			0x00000000
 
-/* EEprom support */
-
-/*
- * PAXE on the local bus CS3
- */
-#define CONFIG_SYS_PAXE_BASE		0xA0000000
-#define CONFIG_SYS_PAXE_SIZE		256
diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt
index 8cef41dace..44d1b29e44 100644
--- a/scripts/config_whitelist.txt
+++ b/scripts/config_whitelist.txt
@@ -688,7 +688,6 @@ CONFIG_SYS_PAGE_SIZE
 CONFIG_SYS_PAMU_ADDR
 CONFIG_SYS_PASPAR
 CONFIG_SYS_PAXE_BASE
-CONFIG_SYS_PAXE_SIZE
 CONFIG_SYS_PBCNT
 CONFIG_SYS_PBDAT
 CONFIG_SYS_PBDDR
-- 
2.31.1


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

* Re: [PATCH 0/7] updates for km board series
  2022-12-02 17:22 [PATCH 0/7] updates for km board series Holger Brunck
                   ` (6 preceding siblings ...)
  2022-12-02 17:22 ` [PATCH 7/7] km/mpc8360: remove unused CONFIG_SYS_PAXE defines Holger Brunck
@ 2022-12-06 21:36 ` Tom Rini
  2022-12-07 14:27   ` Holger Brunck
  7 siblings, 1 reply; 13+ messages in thread
From: Tom Rini @ 2022-12-06 21:36 UTC (permalink / raw)
  To: Holger Brunck
  Cc: u-boot, Niel Fourie, Heiko Schocher, Aleksandar Gerasimovski,
	Simon Glass

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

On Fri, Dec 02, 2022 at 06:22:36PM +0100, Holger Brunck wrote:

> - migrate all boards to environment.txt files
> - migrate PPC boards to DM_I2C
> - some cleanup
> 
> Holger Brunck (7):
>   board/km: move ls102xa boards to environment text files
>   km/powerpc: migrate to env.txt file
>   board/km/cent2: migrate to environment text file
>   board/km/secu: migrate to use environment text files
>   board/km: remove obsolete ARCH_KIRKWOOD
>   km/ppc: migrate all mpc83xx to DM_I2C
>   km/mpc8360: remove unused CONFIG_SYS_PAXE defines

Thanks for doing this. As this is the first in my mind big environment
conversion, do you have any further feedback on the mechanism, things
that would make this easier / more useful, etc?

-- 
Tom

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

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

* RE: [PATCH 0/7] updates for km board series
  2022-12-06 21:36 ` [PATCH 0/7] updates for km board series Tom Rini
@ 2022-12-07 14:27   ` Holger Brunck
  2022-12-07 16:02     ` Tom Rini
  0 siblings, 1 reply; 13+ messages in thread
From: Holger Brunck @ 2022-12-07 14:27 UTC (permalink / raw)
  To: Tom Rini; +Cc: u-boot, Heiko Schocher, Aleksandar Gerasimovski, Simon Glass

> > - migrate all boards to environment.txt files
> > - migrate PPC boards to DM_I2C
> > - some cleanup
> >
> > Holger Brunck (7):
> >   board/km: move ls102xa boards to environment text files
> >   km/powerpc: migrate to env.txt file
> >   board/km/cent2: migrate to environment text file
> >   board/km/secu: migrate to use environment text files
> >   board/km: remove obsolete ARCH_KIRKWOOD
> >   km/ppc: migrate all mpc83xx to DM_I2C
> >   km/mpc8360: remove unused CONFIG_SYS_PAXE defines
> 
> Thanks for doing this. As this is the first in my mind big environment conversion,
> do you have any further feedback on the mechanism, things that would make
> this easier / more useful, etc?
> 

it was quite straight forward and especially for board series which use a
hierarchical structure as we do it is easy to use and afterwards much easier to
read and to maintain.

I only struggled about the strings I had defined  in Kconfig as discussed in another
thread about double quoted strings. I removed them from there in the end.

What would maybe be helpful to have a small script which converts the
generated include/generated/environment.h into a textfile which then looks
like the environment in your u-boot if you dump it. Then you can quickly do
a diff between a dump from your old and your textfile to see if your
newly migrated environment is identical.

Best regards
Holger


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

* Re: [PATCH 0/7] updates for km board series
  2022-12-07 14:27   ` Holger Brunck
@ 2022-12-07 16:02     ` Tom Rini
  2022-12-07 16:22       ` Holger Brunck
  0 siblings, 1 reply; 13+ messages in thread
From: Tom Rini @ 2022-12-07 16:02 UTC (permalink / raw)
  To: Holger Brunck
  Cc: u-boot, Heiko Schocher, Aleksandar Gerasimovski, Simon Glass

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

On Wed, Dec 07, 2022 at 02:27:37PM +0000, Holger Brunck wrote:
> > > - migrate all boards to environment.txt files
> > > - migrate PPC boards to DM_I2C
> > > - some cleanup
> > >
> > > Holger Brunck (7):
> > >   board/km: move ls102xa boards to environment text files
> > >   km/powerpc: migrate to env.txt file
> > >   board/km/cent2: migrate to environment text file
> > >   board/km/secu: migrate to use environment text files
> > >   board/km: remove obsolete ARCH_KIRKWOOD
> > >   km/ppc: migrate all mpc83xx to DM_I2C
> > >   km/mpc8360: remove unused CONFIG_SYS_PAXE defines
> > 
> > Thanks for doing this. As this is the first in my mind big environment conversion,
> > do you have any further feedback on the mechanism, things that would make
> > this easier / more useful, etc?
> > 
> 
> it was quite straight forward and especially for board series which use a
> hierarchical structure as we do it is easy to use and afterwards much easier to
> read and to maintain.
> 
> I only struggled about the strings I had defined  in Kconfig as discussed in another
> thread about double quoted strings. I removed them from there in the end.
> 
> What would maybe be helpful to have a small script which converts the
> generated include/generated/environment.h into a textfile which then looks
> like the environment in your u-boot if you dump it. Then you can quickly do
> a diff between a dump from your old and your textfile to see if your
> newly migrated environment is identical.

Ah good.  Perhaps
https://patchwork.ozlabs.org/project/uboot/patch/20221128084122.3456680-2-max.oss.09@gmail.com/
and some documentation / guide around that would help then?

-- 
Tom

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

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

* RE: [PATCH 0/7] updates for km board series
  2022-12-07 16:02     ` Tom Rini
@ 2022-12-07 16:22       ` Holger Brunck
  0 siblings, 0 replies; 13+ messages in thread
From: Holger Brunck @ 2022-12-07 16:22 UTC (permalink / raw)
  To: Tom Rini; +Cc: u-boot, Heiko Schocher, Aleksandar Gerasimovski, Simon Glass


> On Wed, Dec 07, 2022 at 02:27:37PM +0000, Holger Brunck wrote:
> > > > - migrate all boards to environment.txt files
> > > > - migrate PPC boards to DM_I2C
> > > > - some cleanup
> > > >
> > > > Holger Brunck (7):
> > > >   board/km: move ls102xa boards to environment text files
> > > >   km/powerpc: migrate to env.txt file
> > > >   board/km/cent2: migrate to environment text file
> > > >   board/km/secu: migrate to use environment text files
> > > >   board/km: remove obsolete ARCH_KIRKWOOD
> > > >   km/ppc: migrate all mpc83xx to DM_I2C
> > > >   km/mpc8360: remove unused CONFIG_SYS_PAXE defines
> > >
> > > Thanks for doing this. As this is the first in my mind big
> > > environment conversion, do you have any further feedback on the
> > > mechanism, things that would make this easier / more useful, etc?
> > >
> >
> > it was quite straight forward and especially for board series which
> > use a hierarchical structure as we do it is easy to use and afterwards
> > much easier to read and to maintain.
> >
> > I only struggled about the strings I had defined  in Kconfig as
> > discussed in another thread about double quoted strings. I removed them
> from there in the end.
> >
> > What would maybe be helpful to have a small script which converts the
> > generated include/generated/environment.h into a textfile which then
> > looks like the environment in your u-boot if you dump it. Then you can
> > quickly do a diff between a dump from your old and your textfile to
> > see if your newly migrated environment is identical.
> 
> Ah good.  Perhaps
> https://patchwork.ozlabs.org/project/uboot/patch/20221128084122.3456680
> -2-max.oss.09@gmail.com/
> and some documentation / guide around that would help then?
> 

yes this would have been helpful for me.

Best regards
Holger


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

* Re: [PATCH 1/7] board/km: move ls102xa boards to environment text files
  2022-12-02 17:22 ` [PATCH 1/7] board/km: move ls102xa boards to environment text files Holger Brunck
@ 2022-12-13 16:36   ` Tom Rini
  0 siblings, 0 replies; 13+ messages in thread
From: Tom Rini @ 2022-12-13 16:36 UTC (permalink / raw)
  To: Holger Brunck
  Cc: u-boot, Niel Fourie, Heiko Schocher, Aleksandar Gerasimovski

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

On Fri, Dec 02, 2022 at 06:22:37PM +0100, Holger Brunck wrote:

> Create a common.env which we can use later on also for other boards.
> 
> Signed-off-by: Holger Brunck <holger.brunck@hitachienergy.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] 13+ messages in thread

end of thread, other threads:[~2022-12-13 16:36 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-02 17:22 [PATCH 0/7] updates for km board series Holger Brunck
2022-12-02 17:22 ` [PATCH 1/7] board/km: move ls102xa boards to environment text files Holger Brunck
2022-12-13 16:36   ` Tom Rini
2022-12-02 17:22 ` [PATCH 2/7] km/powerpc: migrate to env.txt file Holger Brunck
2022-12-02 17:22 ` [PATCH 3/7] board/km/cent2: migrate to environment text file Holger Brunck
2022-12-02 17:22 ` [PATCH 4/7] board/km/secu: migrate to use environment text files Holger Brunck
2022-12-02 17:22 ` [PATCH 5/7] board/km: remove obsolete ARCH_KIRKWOOD Holger Brunck
2022-12-02 17:22 ` [PATCH 6/7] km/ppc: migrate all mpc83xx to DM_I2C Holger Brunck
2022-12-02 17:22 ` [PATCH 7/7] km/mpc8360: remove unused CONFIG_SYS_PAXE defines Holger Brunck
2022-12-06 21:36 ` [PATCH 0/7] updates for km board series Tom Rini
2022-12-07 14:27   ` Holger Brunck
2022-12-07 16:02     ` Tom Rini
2022-12-07 16:22       ` Holger Brunck

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.