Skip to contentSkip to conversation

arm: nanopi2: Remove unused code

PATCH New Tom Rini 8 participants 31 messages Feb 4, 2021 – Apr 10, 2021

Subsystems (7)
lore
Share & tools
lore

Tom Rini

author
#0 lore raw

PATCH 1/13 arm: nanopi2: Remove unused code

This platform did not ever enable CONFIG_REVISION_TAG, so the code to set the board_rev environment variable was never enabled. This particular symbol is also only for use with the REVISION ATAG and this platform is new enough to have never supported an ATAG-based Linux Kernel.

Cc Stefan Bosch <[email protected]>

---
I'd be happy to see this patch replaced by one that enables what I think you meant to be doing and by default. Thanks!

---
 board/friendlyarm/nanopi2/board.c | 13 -------------
 1 file changed, 13 deletions(-)
board/friendlyarm/nanopi2/board.c +0 -13
index 68980536abe9..6e546853b863 100644
@@ -294,16 +294,6 @@ static void set_ether_addr(void)
 	env_set("ethaddr", ethaddr);
 }
 
-#ifdef CONFIG_REVISION_TAG
-static void set_board_rev(void)
-{
-	char info[64] = {0, };
-
-	snprintf(info, ARRAY_SIZE(info), "%02x", get_board_rev());
-	env_set("board_rev", info);
-}
-#endif
-
 static void set_dtb_name(void)
 {
 	char info[64] = {0, };
@@ -435,9 +425,6 @@ int board_late_init(void)
 {
 	bd_update_env();
 
-#ifdef CONFIG_REVISION_TAG
-	set_board_rev();
-#endif
 	set_dtb_name();
 
 	set_ether_addr();
Signature · 1 line
2.17.1
author
#1 lore raw

PATCH 2/13 arm: imx: Remove unused CONFIG_xxx_TAG support

The i.MX8 family has never possibly supported ATAGs so we can remove CONFIG_SERIAL_TAG support from that family. Furthermore, the i.MX7 family is new enough to have never supported ATAGs so remove and disable those options as well.

Cc Stefano Babic <[email protected]>
Cc Fabio Estevam <[email protected]>
Cc NXP i.MX U-Boot Team <[email protected]>

---
While I strongly suspect i.MX5 and older have board-file based Linux kernel support, I don't know where i.MX6 falls. Especially if you consider non-Linux OSes, so I didn't remove that. But I would like to know if we can also delete this code from there, or not. Thanks!

---
 arch/arm/mach-imx/imx8/cpu.c   | 31 -------------------------
 arch/arm/mach-imx/mx7/soc.c    | 41 ----------------------------------
 arch/arm/mach-imx/mx7ulp/soc.c |  7 ------
 include/configs/mx7ulp_com.h   |  4 ----
 include/configs/mx7ulp_evk.h   |  5 -----
 include/configs/warp7.h        |  3 ---
 6 files changed, 91 deletions(-)
arch/arm/mach-imx/imx8/cpu.c +0 -31
index 911d6a51d1e4..31fbe63496bf 100644
@@ -171,37 +171,6 @@ enum boot_device get_boot_device(void)
 	return boot_dev;
 }
 
-#ifdef CONFIG_SERIAL_TAG
-#define FUSE_UNIQUE_ID_WORD0 16
-#define FUSE_UNIQUE_ID_WORD1 17
-void get_board_serial(struct tag_serialnr *serialnr)
-{
-	sc_err_t err;
-	u32 val1 = 0, val2 = 0;
-	u32 word1, word2;
-
-	if (!serialnr)
-		return;
-
-	word1 = FUSE_UNIQUE_ID_WORD0;
-	word2 = FUSE_UNIQUE_ID_WORD1;
-
-	err = sc_misc_otp_fuse_read(-1, word1, &val1);
-	if (err != SC_ERR_NONE) {
-		printf("%s fuse %d read error: %d\n", __func__, word1, err);
-		return;
-	}
-
-	err = sc_misc_otp_fuse_read(-1, word2, &val2);
-	if (err != SC_ERR_NONE) {
-		printf("%s fuse %d read error: %d\n", __func__, word2, err);
-		return;
-	}
-	serialnr->low = val1;
-	serialnr->high = val2;
-}
-#endif /*CONFIG_SERIAL_TAG*/
-
 #ifdef CONFIG_ENV_IS_IN_MMC
 __weak int board_mmc_get_env_dev(int devno)
 {
arch/arm/mach-imx/mx7/soc.c +0 -41

53 lines not on this page · raw message

arch/arm/mach-imx/mx7ulp/soc.c +0 -7
index 8dd6b4d40e77..c0e7c399bfc4 100644
@@ -49,13 +49,6 @@ u32 get_cpu_rev(void)
 	return (MXC_CPU_MX7ULP << 12) | (rom_version & 0xFF);
 }
 
-#ifdef CONFIG_REVISION_TAG
-u32 __weak get_board_rev(void)
-{
-	return get_cpu_rev();
-}
-#endif
-
 enum bt_mode get_boot_mode(void)
 {
 	u32 bt0_cfg = 0;
include/configs/mx7ulp_com.h +0 -4
index 28672c4f94c4..7ac445d02cd0 100644
@@ -32,10 +32,6 @@
 
 #define CONFIG_SYS_HZ_CLOCK		1000000 /* Fixed at 1MHz from TSTMR */
 
-#define CONFIG_INITRD_TAG
-#define CONFIG_CMDLINE_TAG
-#define CONFIG_SETUP_MEMORY_TAGS
-
 /* Size of malloc() pool */
 #define CONFIG_SYS_MALLOC_LEN		(8 * SZ_1M)
 
include/configs/mx7ulp_evk.h +0 -5
index 0c3103082cc8..78b41c789808 100644
@@ -22,11 +22,6 @@
 
 #define CONFIG_SYS_HZ_CLOCK		1000000 /* Fixed@1Mhz from TSTMR */
 
-#define CONFIG_INITRD_TAG
-#define CONFIG_CMDLINE_TAG
-#define CONFIG_SETUP_MEMORY_TAGS
-/*#define CONFIG_REVISION_TAG*/
-
 /* Size of malloc() pool */
 #define CONFIG_SYS_MALLOC_LEN		(8 * SZ_1M)
 
include/configs/warp7.h +0 -3
index 8eb106027440..3ab42ffc2d48 100644
@@ -21,9 +21,6 @@
 #define CONFIG_SYS_FSL_ESDHC_HAS_DDR_MODE
 #define CONFIG_SYS_MMC_IMG_LOAD_PART	1
 
-/* Switch on SERIAL_TAG */
-#define CONFIG_SERIAL_TAG
-
 #define CONFIG_DFU_ENV_SETTINGS \
 	"dfu_alt_info=boot raw 0x2 0x1000 mmcpart 1\0" \
 
Signature · 1 line
2.17.1
reviewer
#2 lore raw

PATCH 2/13 arm: imx: Remove unused CONFIG_xxx_TAG support

Hi Tom,

Quoted 2 lines · Tom Rini

The i.MX8 family has never possibly supported ATAGs so we can remove

Yes, we don't need ATAGs for the i.MX family as we use devicetree for all i.MX members.

Quoted 1 line

CONFIG_SERIAL_TAG support from that family. Furthermore, the i.MX7

but reading serial identification via fuses is still supported and I am not sure why this gets removed.

I am confused with this patch, as I don't understand the relationship between ATAG and CONFIG_SERIAL_TAG.

Quoted 7 lines

family is new enough to have never supported ATAGs so remove and disable those options as well.

Cc Stefano Babic <[email protected]>
Cc Fabio Estevam <[email protected]>
Cc NXP i.MX U-Boot Team <[email protected]>
Quoted 5 lines

---
While I strongly suspect i.MX5 and older have board-file based Linux kernel support, I don't know where i.MX6 falls. Especially if you consider non-Linux OSes, so I didn't remove that. But I would like to know if we can also delete this code from there, or not. Thanks!

You can assume that all i.MX devices boot only via DT.

author
#3 lore raw

PATCH 2/13 arm: imx: Remove unused CONFIG_xxx_TAG support

Quoted 9 lines · Fabio Estevam

Hi Tom,

Quoted 2 lines · Tom Rini

The i.MX8 family has never possibly supported ATAGs so we can remove

Yes, we don't need ATAGs for the i.MX family as we use devicetree for all i.MX members.

Quoted 7 lines
Quoted 1 line

CONFIG_SERIAL_TAG support from that family. Furthermore, the i.MX7

but reading serial identification via fuses is still supported and I am not sure why this gets removed.

I am confused with this patch, as I don't understand the relationship between ATAG and CONFIG_SERIAL_TAG.

CONFIG_SERIAL_TAG is only used to configure the ATAG serial record. It does nothing else. On i.MX8* this is already being discarded. On i.MX7 we see things like:
warp7 : all -144 rodata +32 text -176
u-boot: add: 0/-2, grow: 0/-2 bytes: 0/-160 (-160)
function old new delta
params 4 - -4
get_board_serial 20 - -20
board_late_init 96 56 -40
boot_prep_linux 156 60 -96

Quoted 13 lines
Quoted 7 lines

family is new enough to have never supported ATAGs so remove and disable those options as well.

Cc Stefano Babic <[email protected]>
Cc Fabio Estevam <[email protected]>
Cc NXP i.MX U-Boot Team <[email protected]>
Quoted 5 lines

---
While I strongly suspect i.MX5 and older have board-file based Linux kernel support, I don't know where i.MX6 falls. Especially if you consider non-Linux OSes, so I didn't remove that. But I would like to know if we can also delete this code from there, or not. Thanks!

Quoted 1 line

You can assume that all i.MX devices boot only via DT.

Currently, yes. Historically ever? Or even if so, you're OK just removing all of that code as well? Thanks.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210203/79d86e8c/attachment.sig>
reviewer
#4 lore raw

PATCH 2/13 arm: imx: Remove unused CONFIG_xxx_TAG support

Hi Tom,

[Adding Bryan]

Quoted 10 lines · Tom Rini

CONFIG_SERIAL_TAG is only used to configure the ATAG serial record. It does nothing else. On i.MX8* this is already being discarded. On i.MX7 we see things like:
warp7 : all -144 rodata +32 text -176
u-boot: add: 0/-2, grow: 0/-2 bytes: 0/-160 (-160)
function old new delta
params 4 - -4
get_board_serial 20 - -20
board_late_init 96 56 -40
boot_prep_linux 156 60 -96

But then it will remove the support of reading serial number via fuses which was added by:

commit 852cc548b3fdf6d5b46e2a96f876d14608ccdcf4

Author: Bryan O'Donoghue <[email protected]>
Date:   Mon Mar 26 15:27:34 2018 +0100

warp7: Set u-boot serial# based on OTP value

u-boot has a standard "serial#" environment variable that is suitable for storing the iSerial number we will supply via the USB device descriptor. serial# is automatically picked up by the disk subsystem in u-boot - thus providing a handy unique identifier in /dev/disk/by-id as detailed below.

Storing the hardware serial identifier in serial# means we can change the serial# if we want before USB enumeration - thus making iSerial automatic via OTP but overridable if necessary.

This patch reads the defined OTP fuse and sets environment variable "serial#" to the value read.

With this patch in place the USB mass storage device will appear in /dev/disk/by-id with a unique name based on the OTP value. For example

/dev/disk/by-id/usb-Linux_UMS_disk_0_WaRP7-0xf42400d3000001d4-0:0

Cc Fabio Estevam <[email protected]>
Cc Rui Miguel Silva <[email protected]>
Cc Ryan Harkin <[email protected]>
Quoted 2 lines

Currently, yes. Historically ever? Or even if so, you're OK just removing all of that code as well? Thanks.

mx5 and mx6 used to boot board files in the past (NXP kernel 2.6.35 for mx5 or 3.0.x for mx6).

Such kernels are not even maintained by the NXP, so we should not worry about booting non-DT with i.MX.

author
#5 lore raw

PATCH 2/13 arm: imx: Remove unused CONFIG_xxx_TAG support

Quoted 42 lines · Fabio Estevam

Hi Tom,

[Adding Bryan]

Quoted 10 lines · Tom Rini

CONFIG_SERIAL_TAG is only used to configure the ATAG serial record. It does nothing else. On i.MX8* this is already being discarded. On i.MX7 we see things like:
warp7 : all -144 rodata +32 text -176
u-boot: add: 0/-2, grow: 0/-2 bytes: 0/-160 (-160)
function old new delta
params 4 - -4
get_board_serial 20 - -20
board_late_init 96 56 -40
boot_prep_linux 156 60 -96

But then it will remove the support of reading serial number via fuses which was added by:

commit 852cc548b3fdf6d5b46e2a96f876d14608ccdcf4

Author: Bryan O'Donoghue <[email protected]>
Date:   Mon Mar 26 15:27:34 2018 +0100

warp7: Set u-boot serial# based on OTP value

u-boot has a standard "serial#" environment variable that is suitable for storing the iSerial number we will supply via the USB device descriptor. serial# is automatically picked up by the disk subsystem in u-boot - thus providing a handy unique identifier in /dev/disk/by-id as detailed below.

Storing the hardware serial identifier in serial# means we can change the serial# if we want before USB enumeration - thus making iSerial automatic via OTP but overridable if necessary.

This patch reads the defined OTP fuse and sets environment variable "serial#" to the value read.

With this patch in place the USB mass storage device will appear in /dev/disk/by-id with a unique name based on the OTP value. For example

Quoted 7 lines

/dev/disk/by-id/usb-Linux_UMS_disk_0_WaRP7-0xf42400d3000001d4-0:0

Cc Fabio Estevam <[email protected]>
Cc Rui Miguel Silva <[email protected]>
Cc Ryan Harkin <[email protected]>

I did miss that one. I'm not sure if that's abusing a symbol or clever use of the symbol. I will have to v2 this one then.

Quoted 8 lines
Quoted 2 lines

Currently, yes. Historically ever? Or even if so, you're OK just removing all of that code as well? Thanks.

mx5 and mx6 used to boot board files in the past (NXP kernel 2.6.35 for mx5 or 3.0.x for mx6).

Such kernels are not even maintained by the NXP, so we should not worry about booting non-DT with i.MX.

So you're OK with removing ATAGs support from i.MX5/6 from mainline? But there's the unresolved question of the best way to populate "serial#". Yes? Thanks.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210204/2371e635/attachment.sig>
author
#6 lore raw

PATCH 2/13 arm: imx: Remove unused CONFIG_xxx_TAG support

Quoted 45 lines · Tom Rini
Quoted 44 lines · Fabio Estevam

Hi Tom,

[Adding Bryan]

Quoted 10 lines · Tom Rini

CONFIG_SERIAL_TAG is only used to configure the ATAG serial record. It does nothing else. On i.MX8* this is already being discarded. On i.MX7 we see things like:
warp7 : all -144 rodata +32 text -176
u-boot: add: 0/-2, grow: 0/-2 bytes: 0/-160 (-160)
function old new delta
params 4 - -4
get_board_serial 20 - -20
board_late_init 96 56 -40
boot_prep_linux 156 60 -96

But then it will remove the support of reading serial number via fuses which was added by:

commit 852cc548b3fdf6d5b46e2a96f876d14608ccdcf4

Author: Bryan O'Donoghue <[email protected]>
Date:   Mon Mar 26 15:27:34 2018 +0100

warp7: Set u-boot serial# based on OTP value

u-boot has a standard "serial#" environment variable that is suitable for storing the iSerial number we will supply via the USB device descriptor. serial# is automatically picked up by the disk subsystem in u-boot - thus providing a handy unique identifier in /dev/disk/by-id as detailed below.

Storing the hardware serial identifier in serial# means we can change the serial# if we want before USB enumeration - thus making iSerial automatic via OTP but overridable if necessary.

This patch reads the defined OTP fuse and sets environment variable "serial#" to the value read.

With this patch in place the USB mass storage device will appear in /dev/disk/by-id with a unique name based on the OTP value. For example

/dev/disk/by-id/usb-Linux_UMS_disk_0_WaRP7-0xf42400d3000001d4-0:0

Quoted 8 lines
Quoted 5 lines
Cc Fabio Estevam <[email protected]>
Cc Rui Miguel Silva <[email protected]>
Cc Ryan Harkin <[email protected]>

I did miss that one. I'm not sure if that's abusing a symbol or clever use of the symbol. I will have to v2 this one then.

This should end up under CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG someway or another. I'm going to make an attempt at it, but the biggest hurdle is that most often "serial#" is just the fuse(s) value and not prepended by a board-specific string (OR if it is, it's just in the fdt property we read and set from).

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210204/ff6f289c/attachment.sig>
author
#7 lore raw

PATCH 2/13 arm: imx: Remove unused CONFIG_xxx_TAG support

Quoted 52 lines · Tom Rini
Quoted 51 lines · Tom Rini
Quoted 49 lines · Fabio Estevam

Hi Tom,

[Adding Bryan]

Quoted 10 lines · Tom Rini

CONFIG_SERIAL_TAG is only used to configure the ATAG serial record. It does nothing else. On i.MX8* this is already being discarded. On i.MX7 we see things like:
warp7 : all -144 rodata +32 text -176
u-boot: add: 0/-2, grow: 0/-2 bytes: 0/-160 (-160)
function old new delta
params 4 - -4
get_board_serial 20 - -20
board_late_init 96 56 -40
boot_prep_linux 156 60 -96

But then it will remove the support of reading serial number via fuses which was added by:

commit 852cc548b3fdf6d5b46e2a96f876d14608ccdcf4

Author: Bryan O'Donoghue <[email protected]>
Date:   Mon Mar 26 15:27:34 2018 +0100

warp7: Set u-boot serial# based on OTP value

u-boot has a standard "serial#" environment variable that is suitable for storing the iSerial number we will supply via the USB device descriptor. serial# is automatically picked up by the disk subsystem in u-boot - thus providing a handy unique identifier in /dev/disk/by-id as detailed below.

Storing the hardware serial identifier in serial# means we can change the serial# if we want before USB enumeration - thus making iSerial automatic via OTP but overridable if necessary.

This patch reads the defined OTP fuse and sets environment variable "serial#" to the value read.

With this patch in place the USB mass storage device will appear in /dev/disk/by-id with a unique name based on the OTP value. For example

/dev/disk/by-id/usb-Linux_UMS_disk_0_WaRP7-0xf42400d3000001d4-0:0

Cc Fabio Estevam <[email protected]>
Cc Rui Miguel Silva <[email protected]>
Cc Ryan Harkin <[email protected]>
Quoted 8 lines
Quoted 2 lines

I did miss that one. I'm not sure if that's abusing a symbol or clever use of the symbol. I will have to v2 this one then.

This should end up under CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG someway or another. I'm going to make an attempt at it, but the biggest hurdle is that most often "serial#" is just the fuse(s) value and not prepended by a board-specific string (OR if it is, it's just in the fdt property we read and set from).

So, I see 3 options here:
1. In arch/arm/mach-imx/mx7/soc.c and board/warp7/warp7.c switch from CONFIG_SERIAL_TAG to CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG (and migrate from warp7.h to defconfig to enable). This won't break existing users / documentation where the device showing up by serial number WITH "WaRP7" in the name is expected. The serial ATAG is defined regardless of CONFIG_SERIAL_TAG so it'll still be available, and we're not likely to remove ATAG support globally for some time yet.
2. Adjust arch/arm/mach-imx/mx7/soc.c to follow the common practice of arch_misc_init() calling the function to read the fuse(s) and set "serial#" to match that, without other identifiers. This would enable the feature for all imx7 boards but change the value on new/re-initialized WaRP7 boards and probably break documentation.
3. Do nothing. WaRP7 works as-is, using CONFIG_SERIAL_TAG is something I think was a bit too clever, but I can also see why it was used since after-all it's using the serial tag record, etc.

Option 3 is my least preferred choice, but, if the relevant custodians like that the most, that's fine with me.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210204/382d62d1/attachment.sig>
reviewer
#8 lore raw

PATCH 2/13 arm: imx: Remove unused CONFIG_xxx_TAG support

Quoted 17 lines · Tom Rini

So, I see 3 options here:
1. In arch/arm/mach-imx/mx7/soc.c and board/warp7/warp7.c switch from CONFIG_SERIAL_TAG to CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG (and migrate from warp7.h to defconfig to enable). This won't break existing users / documentation where the device showing up by serial number WITH "WaRP7" in the name is expected. The serial ATAG is defined regardless of CONFIG_SERIAL_TAG so it'll still be available, and we're not likely to remove ATAG support globally for some time yet.
2. Adjust arch/arm/mach-imx/mx7/soc.c to follow the common practice of arch_misc_init() calling the function to read the fuse(s) and set "serial#" to match that, without other identifiers. This would enable the feature for all imx7 boards but change the value on new/re-initialized WaRP7 boards and probably break documentation.
3. Do nothing. WaRP7 works as-is, using CONFIG_SERIAL_TAG is something I think was a bit too clever, but I can also see why it was used since after-all it's using the serial tag record, etc.

Quoted 2 lines

Option 3 is my least preferred choice, but, if the relevant custodians like that the most, that's fine with me.

Option 1 is the less intrusive one IMHO, so I would prefer it.

Thanks

reviewer
#9 lore raw

PATCH 2/13 arm: imx: Remove unused CONFIG_xxx_TAG support

In reply to Tom Rini

Hi Tom,

Quoted 1 line · Tom Rini

So you're OK with removing ATAGs support from i.MX5/6 from mainline?

Yes, I am in favor of this.

Quoted 2 lines

But there's the unresolved question of the best way to populate "serial#". Yes? Thanks.

Correct, I just don't want to lose the capability of reading serial identification information via fuses from im7/imx8, etc.

Thanks

author
#10 lore raw

PATCH 2/13 arm: imx: Remove unused CONFIG_xxx_TAG support

Quoted 6 lines · Fabio Estevam

Hi Tom,

Quoted 1 line · Tom Rini

So you're OK with removing ATAGs support from i.MX5/6 from mainline?

Quoted 7 lines

Yes, I am in favor of this.

Quoted 2 lines

But there's the unresolved question of the best way to populate "serial#". Yes? Thanks.

Correct, I just don't want to lose the capability of reading serial identification information via fuses from im7/imx8, etc.

Fixing imx8 is the easiest, as it's not used today so we can follow the common path of arch_misc_init() calls something like setup_serial_number() and does so. imx7 is harder and I'm going to follow up with 3 ideas in that side of the thread in a moment.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210204/66ceb186/attachment.sig>
author
#11 lore raw

PATCH 3/13 arm: layerscape: Disable ATAG support on some platforms

In reply to Tom Rini

The layerscape platforms are new enough to have never supported ATAGs, so disable that support.

Cc Alison Wang <[email protected]>
Cc Feng Li <[email protected]>
Cc Mingkai Hu <[email protected]>
Cc Rajesh Bhagat <[email protected]>
Cc Sumit Garg <[email protected]>
---
 include/configs/ls1021aiot.h | 2 --
 include/configs/ls1021aqds.h | 2 --
 include/configs/ls1021atwr.h | 2 --
 include/configs/ls1043aqds.h | 6 ------
 include/configs/ls1046aqds.h | 2 --
 5 files changed, 14 deletions(-)
include/configs/ls1021aiot.h +0 -2
index cf4d60ad6032..cf49cc1c10c5 100644
@@ -175,8 +175,6 @@
 #define CONFIG_PCI_SCAN_SHOW
 #endif
 
-#define CONFIG_CMDLINE_TAG
-
 #define CONFIG_PEN_ADDR_BIG_ENDIAN
 #define CONFIG_LAYERSCAPE_NS_ACCESS
 #define CONFIG_SMP_PEN_ADDR		0x01ee0200
include/configs/ls1021aqds.h +0 -2
index eb6f1c1e5be6..26b8f8710c6c 100644
@@ -422,8 +422,6 @@ unsigned long get_board_ddr_clk(void);
 #define CONFIG_PCI_SCAN_SHOW
 #endif
 
-#define CONFIG_CMDLINE_TAG
-
 #define CONFIG_PEN_ADDR_BIG_ENDIAN
 #define CONFIG_LAYERSCAPE_NS_ACCESS
 #define CONFIG_SMP_PEN_ADDR		0x01ee0200
include/configs/ls1021atwr.h +0 -2
index 3e85bb3850b7..dd088500b08b 100644
@@ -260,8 +260,6 @@
 #define CONFIG_PCI_SCAN_SHOW
 #endif
 
-#define CONFIG_CMDLINE_TAG
-
 #define CONFIG_PEN_ADDR_BIG_ENDIAN
 #define CONFIG_LAYERSCAPE_NS_ACCESS
 #define CONFIG_SMP_PEN_ADDR		0x01ee0200
include/configs/ls1043aqds.h +0 -6
index 1636f0bb8ff0..f2addaca6019 100644
@@ -391,12 +391,6 @@ unsigned long get_board_ddr_clk(void);
 #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE    /* start of monitor */
 #endif
 
-/*
- * Environment
- */
-
-#define CONFIG_CMDLINE_TAG
-
 #include <asm/fsl_secure_boot.h>
 
 #endif /* __LS1043AQDS_H__ */
include/configs/ls1046aqds.h +0 -2
index 9102c812b5bc..06e54db8d834 100644
@@ -410,8 +410,6 @@ unsigned long get_board_ddr_clk(void);
  * Environment
  */
 
-#define CONFIG_CMDLINE_TAG
-
 #undef CONFIG_BOOTCOMMAND
 #ifdef CONFIG_TFABOOT
 #define IFC_NAND_BOOTCOMMAND "run distro_bootcmd; run nand_bootcmd; "	\
Signature · 1 line
2.17.1
author
#12 lore raw

PATCH 4/13 bcmstb: Disable ATAGs support

In reply to Tom Rini

This platform never supported ATAG-based Linux kernels, so disable.

Cc Thomas Fitzsimmons <[email protected]>

---
I am assuming, please correct me if wrong.

---
 board/broadcom/bcmstb/bcmstb.c | 5 -----
 include/configs/bcmstb.h       | 6 ------
 2 files changed, 11 deletions(-)
board/broadcom/bcmstb/bcmstb.c +0 -5
index add4285db31d..efdc9c46dc84 100644
@@ -37,11 +37,6 @@ int board_init(void)
 	return 0;
 }
 
-u32 get_board_rev(void)
-{
-	return 0;
-}
-
 void reset_cpu(ulong ignored)
 {
 }
include/configs/bcmstb.h +0 -6
index 2660d18f35a9..5dbef0e17f6a 100644
@@ -117,12 +117,6 @@ extern phys_addr_t prior_stage_fdt_address;
  */
 #define CONFIG_SYS_BAUDRATE_TABLE	{4800, 9600, 19200, 38400, 57600, \
 					 115200}
-
-/*
- * Informational display configuration.
- */
-#define CONFIG_REVISION_TAG
-
 /*
  * Command configuration.
  */
Signature · 1 line
2.17.1
author
#13 lore raw

PATCH 5/13 arm: puma_rk3399: Disable ATAGs support

In reply to Tom Rini

This platform never supported an ATAGs-based Linux kernel, so remove.

Cc Philipp Tomsich <[email protected]>
Cc Klaus Goger <[email protected]>

---
I'm assuming, please correct me if I'm wrong.

---
 .../theobroma-systems/puma_rk3399/puma-rk3399.c  | 16 ----------------
 include/configs/puma_rk3399.h                    |  2 --
 2 files changed, 18 deletions(-)
board/theobroma-systems/puma_rk3399/puma-rk3399.c +0 -16
index deeba3084a80..3237a6aa2e1e 100644
@@ -136,19 +136,3 @@ int misc_init_r(void)
 
 	return 0;
 }
-
-#ifdef CONFIG_SERIAL_TAG
-void get_board_serial(struct tag_serialnr *serialnr)
-{
-	char *serial_string;
-	u64 serial = 0;
-
-	serial_string = env_get("serial#");
-
-	if (serial_string)
-		serial = simple_strtoull(serial_string, NULL, 16);
-
-	serialnr->high = (u32)(serial >> 32);
-	serialnr->low = (u32)(serial & 0xffffffff);
-}
-#endif
include/configs/puma_rk3399.h +0 -2
index f52ea014b5d6..23de326e7208 100644
@@ -10,6 +10,4 @@
 
 #define SDRAM_BANK_SIZE			(2UL << 30)
 
-#define CONFIG_SERIAL_TAG
-
 #endif
Signature · 1 line
2.17.1
author
#14 lore raw

PATCH 6/13 arm: goni: Disable CONFIG_REVISION_TAG

In reply to Tom Rini

Rather than provide an empty revision tag here, remove the code to generate an empty one and disable the feature.

Cc Robert Baldyga <[email protected]>

---
I do not know if this platform ever had to support an ATAG-based Linux kernel and if not, there is more cleanup that could be done here.

---
 board/samsung/goni/goni.c  | 5 -----
 include/configs/s5p_goni.h | 1 -
 2 files changed, 6 deletions(-)
board/samsung/goni/goni.c +0 -5
index 2f0ef22c4171..d13347c93ff5 100644
@@ -23,11 +23,6 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
-u32 get_board_rev(void)
-{
-	return 0;
-}
-
 int board_init(void)
 {
 	/* Set Initial global variables */
include/configs/s5p_goni.h +0 -1
index 9688bdc4c035..ca9edaa43855 100644
@@ -28,7 +28,6 @@
 
 #define CONFIG_SETUP_MEMORY_TAGS
 #define CONFIG_CMDLINE_TAG
-#define CONFIG_REVISION_TAG
 #define CONFIG_INITRD_TAG
 
 /* Size of malloc() pool before and after relocation */
Signature · 1 line
2.17.1
#15 lore raw

PATCH 6/13 arm: goni: Disable CONFIG_REVISION_TAG

Hi Tom,

Quoted 8 lines · Tom Rini

Rather than provide an empty revision tag here, remove the code to generate an empty one and disable the feature.

Cc Robert Baldyga <[email protected]>

---
I do not know if this platform ever had to support an ATAG-based Linux kernel and if not, there is more cleanup that could be done here.

Sorry for late because of holidays. I will check whether it's ATAG-based Linux kernel or not.

Best Regards,
Jaehoon Chung

Quoted 34 lines
---
 board/samsung/goni/goni.c  | 5 -----
 include/configs/s5p_goni.h | 1 -
 2 files changed, 6 deletions(-)
board/samsung/goni/goni.c +0 -5
index 2f0ef22c4171..d13347c93ff5 100644
@@ -23,11 +23,6 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
-u32 get_board_rev(void)
-{
-	return 0;
-}
-
 int board_init(void)
 {
 	/* Set Initial global variables */
include/configs/s5p_goni.h +0 -1
index 9688bdc4c035..ca9edaa43855 100644
@@ -28,7 +28,6 @@
 
 #define CONFIG_SETUP_MEMORY_TAGS
 #define CONFIG_CMDLINE_TAG
-#define CONFIG_REVISION_TAG
 #define CONFIG_INITRD_TAG
 
 /* Size of malloc() pool before and after relocation */
author
#16 lore raw

PATCH 7/13 arm: aspeed: Disable ATAGs support

In reply to Tom Rini

This platform never had to support an ATAGs-based Linux kernel, so remove the support for it.

Cc Ryan Chen <[email protected]>
Cc Chia-Wei Wang <[email protected]>
Cc Aspeed BMC SW team <[email protected]>

---
I'm assuming, please correct me if I'm wrong.

---
 include/configs/aspeed-common.h | 5 -----
 1 file changed, 5 deletions(-)
include/configs/aspeed-common.h +0 -5
index df0f5d2e76f7..8d666c6ed415 100644
@@ -12,11 +12,6 @@
 
 #include <asm/arch/platform.h>
 
-/* Misc CPU related */
-#define CONFIG_CMDLINE_TAG
-#define CONFIG_SETUP_MEMORY_TAGS
-#define CONFIG_INITRD_TAG
-
 #define CONFIG_SYS_SDRAM_BASE		ASPEED_DRAM_BASE
 
 #ifdef CONFIG_PRE_CON_BUF_SZ
Signature · 1 line
2.17.1
#17 lore raw

PATCH 7/13 arm: aspeed: Disable ATAGs support

Hi Tom,

I have tested this patch with Aspeed SDK as well as the U-Boot mainline codebase on AST2500/AST2600 EVBs. Both AST2500/AST2600 can boot to kernel normally. Thanks.

Chiawei

Quoted 40 lines

-----Original Message-----
From: Tom Rini <[email protected]>
Sent: Thursday, February 4, 2021 10:24 AM
To: u-boot at lists.denx.de
Cc: Ryan Chen <[email protected]>; ChiaWei Wang <[email protected]>; BMC-SW <[email protected]>
Subject: [PATCH 07/13] arm: aspeed: Disable ATAGs support

This platform never had to support an ATAGs-based Linux kernel, so remove the support for it.

Cc Ryan Chen <[email protected]>
Cc Chia-Wei Wang <[email protected]>
Cc Aspeed BMC SW team <[email protected]>

---
I'm assuming, please correct me if I'm wrong.

---
 include/configs/aspeed-common.h | 5 -----
 1 file changed, 5 deletions(-)
(quoted diff) +0 -0

b/include/configs/aspeed-common.h index df0f5d2e76f7..8d666c6ed415 100644

include/configs/aspeed-common.h +0 -6
@@ -12,11 +12,6 @@
 
 #include <asm/arch/platform.h>
 
-/* Misc CPU related */
-#define CONFIG_CMDLINE_TAG
-#define CONFIG_SETUP_MEMORY_TAGS
-#define CONFIG_INITRD_TAG
-
 #define CONFIG_SYS_SDRAM_BASE		ASPEED_DRAM_BASE
 
 #ifdef CONFIG_PRE_CON_BUF_SZ
--

2.17.1

author
#18 lore raw

PATCH 8/13 arm: mediatek: Disable ATAGs support

In reply to Tom Rini

These platforms never had to support an ATAGs-based Linux Kernel, so remove the options.

Cc Ryder Lee <[email protected]>
Cc Weijie Gao <[email protected]>

---
I'm assuming, please correct me if I'm wrong.

---
 include/configs/mt7623.h | 4 ----
 include/configs/mt7629.h | 4 ----
 2 files changed, 8 deletions(-)
include/configs/mt7623.h +0 -4
index 9895279749db..613e96e49235 100644
@@ -12,10 +12,6 @@
 #include <linux/sizes.h>
 
 /* Miscellaneous configurable options */
-#define CONFIG_SETUP_MEMORY_TAGS
-#define CONFIG_INITRD_TAG
-#define CONFIG_CMDLINE_TAG
-
 #define CONFIG_SYS_MAXARGS		8
 #define CONFIG_SYS_BOOTM_LEN		SZ_64M
 #define CONFIG_SYS_CBSIZE		SZ_1K
include/configs/mt7629.h +0 -4
index 08a4d01f5524..af9a5bbb6f19 100644
@@ -12,10 +12,6 @@
 #include <linux/sizes.h>
 
 /* Miscellaneous configurable options */
-#define CONFIG_SETUP_MEMORY_TAGS
-#define CONFIG_INITRD_TAG
-#define CONFIG_CMDLINE_TAG
-
 #define CONFIG_SYS_MAXARGS		8
 #define CONFIG_SYS_BOOTM_LEN		SZ_64M
 #define CONFIG_SYS_CBSIZE		SZ_1K
Signature · 1 line
2.17.1
author
#19 lore raw

PATCH 9/13 arm: mvebu: Disable ATAGs support on some platforms

In reply to Tom Rini

These platforms never had to support an ATAGs-based Linux Kernel, so remove the options.

Cc Stefan Roese <[email protected]>
Cc Marek Beh?n <[email protected]>

---
I'm assuming, please correct me if I'm wrong.

---
 include/configs/mvebu_armada-37xx.h | 9 ---------
 include/configs/mvebu_armada-8k.h   | 9 ---------
 include/configs/turris_mox.h        | 9 ---------
 3 files changed, 27 deletions(-)
include/configs/mvebu_armada-37xx.h +0 -9
index 0d585606a73a..84772d9fa075 100644
@@ -20,15 +20,6 @@
 #define CONFIG_SYS_BAUDRATE_TABLE	{ 9600, 19200, 38400, 57600, \
 					  115200, 230400, 460800, 921600 }
 
-/*
- * For booting Linux, the board info and command line data
- * have to be in the first 8 MB of memory, since this is
- * the maximum mapped by the Linux kernel during initialization.
- */
-#define CONFIG_CMDLINE_TAG		/* enable passing of ATAGs  */
-#define CONFIG_INITRD_TAG		/* enable INITRD tag */
-#define CONFIG_SETUP_MEMORY_TAGS	/* enable memory tag */
-
 #define	CONFIG_SYS_CBSIZE	1024	/* Console I/O Buff Size */
 
 /*
include/configs/mvebu_armada-8k.h +0 -9
index 38f50468c543..fc42cfd1fb07 100644
@@ -19,15 +19,6 @@
 #define CONFIG_SYS_BAUDRATE_TABLE	{ 9600, 19200, 38400, 57600, \
 					  115200, 230400, 460800, 921600 }
 
-/*
- * For booting Linux, the board info and command line data
- * have to be in the first 8 MB of memory, since this is
- * the maximum mapped by the Linux kernel during initialization.
- */
-#define CONFIG_CMDLINE_TAG		/* enable passing of ATAGs  */
-#define CONFIG_INITRD_TAG		/* enable INITRD tag */
-#define CONFIG_SETUP_MEMORY_TAGS	/* enable memory tag */
-
 #define	CONFIG_SYS_CBSIZE	1024	/* Console I/O Buff Size */
 
 /*
include/configs/turris_mox.h +0 -9
index 51445ec60ae1..721a78b9baa4 100644
@@ -25,15 +25,6 @@
 #define CONFIG_SYS_BAUDRATE_TABLE	{ 9600, 19200, 38400, 57600, \
 					  115200, 230400, 460800, 921600 }
 
-/*
- * For booting Linux, the board info and command line data
- * have to be in the first 8 MB of memory, since this is
- * the maximum mapped by the Linux kernel during initialization.
- */
-#define CONFIG_CMDLINE_TAG		/* enable passing of ATAGs  */
-#define CONFIG_INITRD_TAG		/* enable INITRD tag */
-#define CONFIG_SETUP_MEMORY_TAGS	/* enable memory tag */
-
 #define	CONFIG_SYS_CBSIZE	1024	/* Console I/O Buff Size */
 
 /*
Signature · 1 line
2.17.1
#20 lore raw

PATCH 9/13 arm: mvebu: Disable ATAGs support on some platforms

Quoted 8 lines · Tom Rini

These platforms never had to support an ATAGs-based Linux Kernel, so remove the options.

Cc Stefan Roese <[email protected]>
Cc Marek Beh?n <[email protected]>

---
I'm assuming, please correct me if I'm wrong.

Looks good:

Thanks,
Stefan

Quoted 57 lines
---
  include/configs/mvebu_armada-37xx.h | 9 ---------
  include/configs/mvebu_armada-8k.h   | 9 ---------
  include/configs/turris_mox.h        | 9 ---------
  3 files changed, 27 deletions(-)
include/configs/mvebu_armada-37xx.h +0 -9
index 0d585606a73a..84772d9fa075 100644
@@ -20,15 +20,6 @@
  #define CONFIG_SYS_BAUDRATE_TABLE	{ 9600, 19200, 38400, 57600, \
  					  115200, 230400, 460800, 921600 }
 
-/*
- * For booting Linux, the board info and command line data
- * have to be in the first 8 MB of memory, since this is
- * the maximum mapped by the Linux kernel during initialization.
- */
-#define CONFIG_CMDLINE_TAG		/* enable passing of ATAGs  */
-#define CONFIG_INITRD_TAG		/* enable INITRD tag */
-#define CONFIG_SETUP_MEMORY_TAGS	/* enable memory tag */
-
  #define	CONFIG_SYS_CBSIZE	1024	/* Console I/O Buff Size */
 
  /*
include/configs/mvebu_armada-8k.h +0 -9
index 38f50468c543..fc42cfd1fb07 100644
@@ -19,15 +19,6 @@
  #define CONFIG_SYS_BAUDRATE_TABLE	{ 9600, 19200, 38400, 57600, \
  					  115200, 230400, 460800, 921600 }
 
-/*
- * For booting Linux, the board info and command line data
- * have to be in the first 8 MB of memory, since this is
- * the maximum mapped by the Linux kernel during initialization.
- */
-#define CONFIG_CMDLINE_TAG		/* enable passing of ATAGs  */
-#define CONFIG_INITRD_TAG		/* enable INITRD tag */
-#define CONFIG_SETUP_MEMORY_TAGS	/* enable memory tag */
-
  #define	CONFIG_SYS_CBSIZE	1024	/* Console I/O Buff Size */
 
  /*
include/configs/turris_mox.h +0 -2
index 51445ec60ae1..721a78b9baa4 100644
@@ -25,15 +25,6 @@
  #define CONFIG_SYS_BAUDRATE_TABLE	{ 9600, 19200, 38400, 57600, \
  					  115200, 230400, 460800, 921600 }
 
-/*
- * For booting Linux, the board info and command line data

include/configs/turris_mox.h line 30

Quoted 10 lines
include/configs/turris_mox.h +0 -7
- * have to be in the first 8 MB of memory, since this is
- * the maximum mapped by the Linux kernel during initialization.
- */
-#define CONFIG_CMDLINE_TAG		/* enable passing of ATAGs  */
-#define CONFIG_INITRD_TAG		/* enable INITRD tag */
-#define CONFIG_SETUP_MEMORY_TAGS	/* enable memory tag */
-
  #define	CONFIG_SYS_CBSIZE	1024	/* Console I/O Buff Size */
 
  /*

Viele Gr??e,
Stefan

Signature · 3 lines
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: sr at denx.de
author
#21 lore raw

PATCH 10/13 arm: rcar2/3: Disable ATAGs support

In reply to Tom Rini

These platforms never had to support an ATAGs-based Linux Kernel, so remove the options.

---
I'm assuming, please correct me if I'm wrong.

---
 include/configs/grpeach.h          | 1 -
 include/configs/rcar-gen2-common.h | 4 ----
 include/configs/rcar-gen3-common.h | 6 ------
 3 files changed, 11 deletions(-)
include/configs/grpeach.h +0 -1
index 4d5eab09f09b..3087cab44c04 100644
@@ -13,7 +13,6 @@
 
 /* Miscellaneous */
 #define CONFIG_SYS_PBSIZE	256
-#define CONFIG_CMDLINE_TAG
 
 /* Internal RAM Size (RZ/A1=3M, RZ/A1M=5M, RZ/A1H=10M) */
 #define CONFIG_SYS_SDRAM_BASE		0x20000000
include/configs/rcar-gen2-common.h +0 -4
index f94e9d89799f..6634fe4d3cd9 100644
@@ -10,10 +10,6 @@
 
 #include <asm/arch/rmobile.h>
 
-#define CONFIG_CMDLINE_TAG
-#define CONFIG_SETUP_MEMORY_TAGS
-#define CONFIG_INITRD_TAG
-
 #ifdef CONFIG_SPL
 #define CONFIG_SPL_TARGET	"spl/u-boot-spl.srec"
 #endif
include/configs/rcar-gen3-common.h +0 -6
index b9762f5bebbd..34f3005f97cb 100644
@@ -17,12 +17,6 @@
 #define CONFIG_SPL_TARGET	"spl/u-boot-spl.scif"
 #endif
 
-/* boot option */
-
-#define CONFIG_CMDLINE_TAG
-#define CONFIG_SETUP_MEMORY_TAGS
-#define CONFIG_INITRD_TAG
-
 /* Generic Interrupt Controller Definitions */
 #define CONFIG_GICV2
 #define GICD_BASE	0xF1010000
Signature · 1 line
2.17.1
author
#22 lore raw

PATCH 11/13 arm: s32v234: Disable ATAGs support

In reply to Tom Rini

These platforms never had to support an ATAGs-based Linux Kernel, so remove the options.

Cc Eddy Petri?or <[email protected]>

---
I'm assuming, please correct me if I'm wrong.

---
 include/configs/s32v234evb.h | 3 ---
 1 file changed, 3 deletions(-)
include/configs/s32v234evb.h +0 -3
index 275d92eff783..b6fba3191584 100644
@@ -34,9 +34,6 @@
 
 #define CONFIG_SKIP_LOWLEVEL_INIT
 
-/* Enable passing of ATAGs */
-#define CONFIG_CMDLINE_TAG
-
 /* SMP Spin Table Definitions */
 #define CPU_RELEASE_ADDR                (CONFIG_SYS_SDRAM_BASE + 0x7fff0)
 
Signature · 1 line
2.17.1
author
#23 lore raw

PATCH 12/13 arm: socfpga: arria5_secu1: Disable ATAGs support

In reply to Tom Rini

These platforms never had to support an ATAGs-based Linux Kernel, so remove the options.

Cc Holger Brunck <[email protected]>

---
I'm assuming, please correct me if I'm wrong.

---
 include/configs/socfpga_arria5_secu1.h | 1 -
 1 file changed, 1 deletion(-)
include/configs/socfpga_arria5_secu1.h +0 -1
index c25d6bd82be2..90d4bb55a3f1 100644
@@ -43,7 +43,6 @@
 	"setenv altbootcmd 'setenv bootnum b && saveenv && boot;' && " \
 	"saveenv && saveenv && boot;"
 
-#define CONFIG_CMDLINE_TAG
 #define CONFIG_SYS_BOOTM_LEN		(64 << 20)
 
 /* Environment settings */
Signature · 1 line
2.17.1
author
#25 lore raw

PATCH 13/13 arm: stm32: Disable ATAGs support

In reply to Tom Rini

These platforms never had to support an ATAGs-based Linux Kernel, so remove the options.

Cc Kamil Lulko <[email protected]>
Cc Patrick Delaunay <[email protected]>
Cc Patrice Chotard <[email protected]>
Cc Vikas Manocha <[email protected]>
Cc Marek Vasut <[email protected]>

---
I'm assuming, please correct me if I'm wrong.

---
 include/configs/stm32f429-discovery.h  | 5 -----
 include/configs/stm32f429-evaluation.h | 5 -----
 include/configs/stm32f469-discovery.h  | 5 -----
 include/configs/stm32f746-disco.h      | 5 -----
 include/configs/stm32h743-disco.h      | 5 -----
 include/configs/stm32h743-eval.h       | 5 -----
 include/configs/stm32mp1.h             | 5 -----
 7 files changed, 35 deletions(-)
include/configs/stm32f429-discovery.h +0 -5
index 9d029fbcc6f0..dbbce494759f 100644
@@ -27,11 +27,6 @@
 
 #define CONFIG_SYS_HZ_CLOCK		1000000	/* Timer is clocked at 1MHz */
 
-#define CONFIG_CMDLINE_TAG
-#define CONFIG_SETUP_MEMORY_TAGS
-#define CONFIG_INITRD_TAG
-#define CONFIG_REVISION_TAG
-
 #define CONFIG_SYS_CBSIZE		1024
 
 #define CONFIG_SYS_MALLOC_LEN		(2 << 20)
include/configs/stm32f429-evaluation.h +0 -5
index fefdb2dd1525..29a41e80676a 100644
@@ -29,11 +29,6 @@
 
 #define CONFIG_SYS_HZ_CLOCK		1000000	/* Timer is clocked at 1MHz */
 
-#define CONFIG_CMDLINE_TAG
-#define CONFIG_SETUP_MEMORY_TAGS
-#define CONFIG_INITRD_TAG
-#define CONFIG_REVISION_TAG
-
 #define CONFIG_SYS_CBSIZE		1024
 
 #define CONFIG_SYS_MALLOC_LEN		(1 * 1024 * 1024)
include/configs/stm32f469-discovery.h +0 -5
index ba9f05a61b40..b9b932c65107 100644
@@ -29,11 +29,6 @@
 
 #define CONFIG_SYS_HZ_CLOCK		1000000	/* Timer is clocked at 1MHz */
 
-#define CONFIG_CMDLINE_TAG
-#define CONFIG_SETUP_MEMORY_TAGS
-#define CONFIG_INITRD_TAG
-#define CONFIG_REVISION_TAG
-
 #define CONFIG_SYS_CBSIZE		1024
 
 #define CONFIG_SYS_MALLOC_LEN		(1 * 1024 * 1024)
include/configs/stm32f746-disco.h +0 -5
index 08d050adfa51..b72b989c2c21 100644
@@ -36,11 +36,6 @@
 
 #define CONFIG_SYS_HZ_CLOCK		1000000	/* Timer is clocked@1MHz */
 
-#define CONFIG_CMDLINE_TAG
-#define CONFIG_SETUP_MEMORY_TAGS
-#define CONFIG_INITRD_TAG
-#define CONFIG_REVISION_TAG
-
 #define CONFIG_SYS_CBSIZE		1024
 
 #define CONFIG_SYS_MALLOC_LEN		(1 * 1024 * 1024)
include/configs/stm32h743-disco.h +0 -5
index 6e10dbdfe945..e5bb08eec719 100644
@@ -24,11 +24,6 @@
 
 #define CONFIG_SYS_HZ_CLOCK		1000000
 
-#define CONFIG_CMDLINE_TAG
-#define CONFIG_SETUP_MEMORY_TAGS
-#define CONFIG_INITRD_TAG
-#define CONFIG_REVISION_TAG
-
 #define CONFIG_SYS_MAXARGS		16
 #define CONFIG_SYS_MALLOC_LEN		(1 * 1024 * 1024)
 
include/configs/stm32h743-eval.h +0 -5
index 268d39c7ad6a..89169f85d5ba 100644
@@ -24,11 +24,6 @@
 
 #define CONFIG_SYS_HZ_CLOCK		1000000
 
-#define CONFIG_CMDLINE_TAG
-#define CONFIG_SETUP_MEMORY_TAGS
-#define CONFIG_INITRD_TAG
-#define CONFIG_REVISION_TAG
-
 #define CONFIG_SYS_MAXARGS		16
 #define CONFIG_SYS_MALLOC_LEN		(1 * 1024 * 1024)
 
include/configs/stm32mp1.h +0 -5
index 863b652ca4f7..e2e8a5d1a325 100644
@@ -33,11 +33,6 @@
 #define CONFIG_LOADADDR			0xc2000000
 #define CONFIG_SYS_LOAD_ADDR		CONFIG_LOADADDR
 
-/* ATAGs */
-#define CONFIG_CMDLINE_TAG
-#define CONFIG_SETUP_MEMORY_TAGS
-#define CONFIG_INITRD_TAG
-
 /*
  * For booting Linux, use the first 256 MB of memory, since this is
  * the maximum mapped by the Linux kernel during initialization.
Signature · 1 line
2.17.1
#26 lore raw

PATCH 13/13 arm: stm32: Disable ATAGs support

Hi Tom,

Quoted 11 lines · Tom Rini

These platforms never had to support an ATAGs-based Linux Kernel, so remove the options.

Cc Kamil Lulko <[email protected]>
Cc Patrick Delaunay <[email protected]>
Cc Patrice Chotard <[email protected]>
Cc Vikas Manocha <[email protected]>
Cc Marek Vasut <[email protected]>

---
I'm assuming, please correct me if I'm wrong.

Quoted 10 lines
---
  include/configs/stm32f429-discovery.h  | 5 -----
  include/configs/stm32f429-evaluation.h | 5 -----
  include/configs/stm32f469-discovery.h  | 5 -----
  include/configs/stm32f746-disco.h      | 5 -----
  include/configs/stm32h743-disco.h      | 5 -----
  include/configs/stm32h743-eval.h       | 5 -----
  include/configs/stm32mp1.h             | 5 -----
  7 files changed, 35 deletions(-)

Yes you are right.

It is inherited of the first U-boot porting (before full DM and FDT support).

For information the initialization parts can be removed in boards support (as no more used):

??? gd->bd->bi_boot_params = gd->bd->bi_dram[0].start + 0x100;

??? in ??? ./board/st/

??? - stm32f429-evaluation/stm32f429-evaluation.c:54:
??? - stm32h743-disco/stm32h743-disco.c:55:
??? - stm32f429-discovery/stm32f429-discovery.c:60:
??? - stm32mp1/stm32mp1.c:644:
??? - stm32f746-disco/stm32f746-disco.c:129:
??? - stm32f469-discovery/stm32f469-discovery.c:54:
??? - stm32h743-eval/stm32h743-eval.c:55:

But I will push a separate patch for this point.

Just one question for other part of generic code which can be removed....

bi_boot_params should be under compilation BOOTM_ENABLE_TAGS flags ?

In include/asm-generic/u-boot.h:70
 ??? struct bd_info {

??? ....
??? ??? ulong??? ??????? bi_boot_params;??? /* where this board expects
params */

??? ...

??? };

and also params global variables, only used in setup_XXX functions ?

??? arch/arm/lib/bootm.c:44:
??? ??? static struct tag *params;

Regards

Thanks

Patrick

author
#27 lore raw

PATCH 13/13 arm: stm32: Disable ATAGs support

On Mon, Feb 08, 2021 at 05:34:50PM +0100, Patrick DELAUNAY wrote:

[snip]

Quoted 13 lines

Just one question for other part of generic code which can be removed....

bi_boot_params should be under compilation BOOTM_ENABLE_TAGS flags ?

In include/asm-generic/u-boot.h:70
??? struct bd_info {

??? ....
??? ??? ulong??? ??????? bi_boot_params;??? /* where this board expects params */

??? ...

Quoted 7 lines

??? };

and also params global variables, only used in setup_XXX functions ?

??? arch/arm/lib/bootm.c:44:
??? ??? static struct tag *params;

With some further cleanup work to introduce a single symbol to say yes/no to ATAGS support, we could then cleanly condition out a few more bits of code and save some space, yes.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210210/8e42ecc7/attachment-0001.sig>
#28 lore raw

PATCH 1/13 arm: nanopi2: Remove unused code

In reply to Tom Rini

Hi,

thanks for the info, I'll have a look at this.

Regards
Stefan

Quoted 47 lines · Tom Rini

This platform did not ever enable CONFIG_REVISION_TAG, so the code to set the board_rev environment variable was never enabled. This particular symbol is also only for use with the REVISION ATAG and this platform is new enough to have never supported an ATAG-based Linux Kernel.

Cc Stefan Bosch <[email protected]>

---
I'd be happy to see this patch replaced by one that enables what I think you meant to be doing and by default. Thanks!

---
  board/friendlyarm/nanopi2/board.c | 13 -------------
  1 file changed, 13 deletions(-)
board/friendlyarm/nanopi2/board.c +0 -13
index 68980536abe9..6e546853b863 100644
@@ -294,16 +294,6 @@ static void set_ether_addr(void)
  	env_set("ethaddr", ethaddr);
  }
 
-#ifdef CONFIG_REVISION_TAG
-static void set_board_rev(void)
-{
-	char info[64] = {0, };
-
-	snprintf(info, ARRAY_SIZE(info), "%02x", get_board_rev());
-	env_set("board_rev", info);
-}
-#endif
-
  static void set_dtb_name(void)
  {
  	char info[64] = {0, };
@@ -435,9 +425,6 @@ int board_late_init(void)
  {
  	bd_update_env();
 
-#ifdef CONFIG_REVISION_TAG
-	set_board_rev();
-#endif
  	set_dtb_name();
 
  	set_ether_addr();
#29 lore raw

PATCH 1/13 arm: nanopi2: Remove unused code

In reply to Tom Rini

Hi Tom,

CONFIG_REVISION_TAG has originally been defined in s5p4418_nanopi2.h. But this gets lost sometime in the past. Below my proposal for a patch which uses CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG instead.

Regards
Stefan

---

  board/friendlyarm/nanopi2/board.c | 4 ++--
  configs/s5p4418_nanopi2_defconfig | 1 +
  2 files changed, 3 insertions(+), 2 deletions(-)
(quoted diff) +0 -0

b/board/friendlyarm/nanopi2/board.c
index c0fe2d546f..9e724e1095 100644

board/friendlyarm/nanopi2/board.c +2 -2
@@ -295,7 +295,7 @@ static void set_ether_addr(void)
  	env_set("ethaddr", ethaddr);
  }
 
-#ifdef CONFIG_REVISION_TAG
+#ifdef CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
  static void set_board_rev(void)
  {
  	char info[64] = {0, };
@@ -436,7 +436,7 @@ int board_late_init(void)
  {
  	bd_update_env();
 
-#ifdef CONFIG_REVISION_TAG
+#ifdef CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
  	set_board_rev();
  #endif
  	set_dtb_name();
(quoted diff) +0 -0

b/configs/s5p4418_nanopi2_defconfig
index c5537bac34..82b057751d 100644

configs/s5p4418_nanopi2_defconfig +1 -0
@@ -57,3 +57,4 @@ CONFIG_SPLASH_SCREEN_ALIGN=y
  CONFIG_SPLASH_SOURCE=y
  CONFIG_BMP_24BPP=y
  CONFIG_ERRNO_STR=y
+CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
Signature · 1 line
2.17.1
Quoted 47 lines · Tom Rini

This platform did not ever enable CONFIG_REVISION_TAG, so the code to set the board_rev environment variable was never enabled. This particular symbol is also only for use with the REVISION ATAG and this platform is new enough to have never supported an ATAG-based Linux Kernel.

Cc Stefan Bosch <[email protected]>

---
I'd be happy to see this patch replaced by one that enables what I think you meant to be doing and by default. Thanks!

---
  board/friendlyarm/nanopi2/board.c | 13 -------------
  1 file changed, 13 deletions(-)
board/friendlyarm/nanopi2/board.c +0 -13
index 68980536abe9..6e546853b863 100644
@@ -294,16 +294,6 @@ static void set_ether_addr(void)
  	env_set("ethaddr", ethaddr);
  }
 
-#ifdef CONFIG_REVISION_TAG
-static void set_board_rev(void)
-{
-	char info[64] = {0, };
-
-	snprintf(info, ARRAY_SIZE(info), "%02x", get_board_rev());
-	env_set("board_rev", info);
-}
-#endif
-
  static void set_dtb_name(void)
  {
  	char info[64] = {0, };
@@ -435,9 +425,6 @@ int board_late_init(void)
  {
  	bd_update_env();
 
-#ifdef CONFIG_REVISION_TAG
-	set_board_rev();
-#endif
  	set_dtb_name();
 
  	set_ether_addr();
author
#30 lore raw

PATCH 1/13 arm: nanopi2: Remove unused code

Quoted 11 lines · Stefan Bosch

Hi Tom,

CONFIG_REVISION_TAG has originally been defined in s5p4418_nanopi2.h. But this gets lost sometime in the past. Below my proposal for a patch which uses CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG instead.

Regards
Stefan

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210410/ca2c0545/attachment.sig>