Skip to contentSkip to conversation

vbe: Series part D

PATCH Superseded Simon Glass 4 participants 32 messages Sep 20, 2024 – Dec 7, 2024

Subsystems (5)

v2 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

v2 cover vbe: Series part D

This includes various patches towards implementing the VBE abrec bootmeth in U-Boot.

Changes in v2:
- Update this to say VPL instead of TPL
- Default this option to off to avoid TPL-code-size increases
- Drop the unnecessary interior check for CONFIG_IS_ENABLED(DM_MMC)
- Update subject to mention that a newline is added too

Simon Glass (18):
sandbox: Add missing header file
bootstd: Add stub for bootdev_setup_for_sibling_blk()
gzip: Correct function comment for gunzip()
fdtdec: Support separate BSS for all XPL builds
tiny-printf: Correct return values
tpl: Support numbered aliases in device tree
ram: Support driver model in VPL
serial: Support debug UART in TPL
armv8: Support not having separate BSS
arm: cache: Drop a stale comment
arm: Fix up a stale comment in sections.c
mmc: Support driver model in TPL
mmc: Add more debugging for SPL
mmc: Log the error when init fails
mmc: rockchip: Log some error returns
mmc: rockchip: Allow clocks to be missing
rockchip: mmc: Fix a missing colon and newline
rockchip: Provided SPL control over efuse presence

 arch/arm/cpu/armv8/u-boot-spl.lds   | 12 ++++++++++++
 arch/arm/lib/cache.c                |  2 --
 arch/arm/lib/sections.c             |  2 +-
 arch/sandbox/include/asm/sections.h |  1 +
 common/spl/spl_mmc.c                | 12 ++++++++++++
 drivers/core/Kconfig                |  8 ++++++++
 drivers/misc/Makefile               |  2 +-
 drivers/mmc/Kconfig                 | 11 +++++++++++
 drivers/mmc/mmc.c                   |  2 +-
 drivers/mmc/rockchip_dw_mmc.c       | 10 ++++------
 drivers/mmc/rockchip_sdhci.c        | 11 +++++------
 drivers/ram/Kconfig                 |  9 +++++++++
 drivers/serial/Kconfig              |  7 +++++++
 include/bootdev.h                   |  8 ++++++++
 include/gzip.h                      |  6 ++++--
 lib/fdtdec.c                        |  2 +-
 lib/tiny-printf.c                   | 15 ++++++---------
 17 files changed, 91 insertions(+), 29 deletions(-)
Signature · 1 line
2.43.0
#1 lore raw

PATCH v2 1/18 sandbox: Add missing header file

This file uses __aligned so should include the header which defines that.

---

(no changes since v1)

 arch/sandbox/include/asm/sections.h | 1 +
 1 file changed, 1 insertion(+)
arch/sandbox/include/asm/sections.h +1 -0
index 88837bb35c8..5e1577419b0 100644
@@ -10,6 +10,7 @@
 #define __SANDBOX_SECTIONS_H
 
 #include <asm-generic/sections.h>
+#include <linux/compiler_attributes.h>
 
 struct sandbox_cmdline_option;
 
Signature · 1 line
2.43.0
#2 lore raw

PATCH v2 2/18 bootstd: Add stub for bootdev_setup_for_sibling_blk()

In reply to Simon Glass

When bootstd is not enabled, bootdevs should not be set up. Add a static inline function to see to this.

---

(no changes since v1)

 include/bootdev.h | 8 ++++++++
 1 file changed, 8 insertions(+)
include/bootdev.h +8 -0
index 2cee8832d26..ad4af0d1310 100644
@@ -395,6 +395,7 @@ int bootdev_next_prio(struct bootflow_iter *iter, struct udevice **devp);
  */
 int bootdev_setup_for_dev(struct udevice *parent, const char *drv_name);
 
+#if CONFIG_IS_ENABLED(BOOTSTD)
 /**
  * bootdev_setup_for_sibling_blk() - Bind a new bootdev device for a blk device
  *
@@ -409,6 +410,13 @@ int bootdev_setup_for_dev(struct udevice *parent, const char *drv_name);
  * Return: 0 if OK, -ve on error
  */
 int bootdev_setup_for_sibling_blk(struct udevice *blk, const char *drv_name);
+#else
+static int bootdev_setup_for_sibling_blk(struct udevice *blk,
+					 const char *drv_name)
+{
+	return 0;
+}
+#endif
 
 /**
  * bootdev_get_sibling_blk() - Locate the block device for a bootdev
Signature · 1 line
2.43.0
#3 lore raw

PATCH v2 3/18 gzip: Correct function comment for gunzip()

In reply to Simon Glass

This doesn't describe the length parameter correctly. Fix it and zunzip() too.

---

(no changes since v1)

 include/gzip.h | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
include/gzip.h +4 -2
index 5e0d0ec07fb..304002ffc42 100644
@@ -28,7 +28,8 @@ int gzip_parse_header(const unsigned char *src, unsigned long len);
  * @dst: Destination for uncompressed data
  * @dstlen: Size of destination buffer
  * @src: Source data to decompress
- * @lenp: Returns length of uncompressed data
+ * @lenp: On entry, length of data at @src. On exit, number of bytes used from
+ * @src
  * Return: 0 if OK, -1 on error
  */
 int gunzip(void *dst, int dstlen, unsigned char *src, unsigned long *lenp);
@@ -39,7 +40,8 @@ int gunzip(void *dst, int dstlen, unsigned char *src, unsigned long *lenp);
  * @dst: Destination for uncompressed data
  * @dstlen: Size of destination buffer
  * @src: Source data to decompress
- * @lenp: On entry, length data at @src. On exit, number of bytes used from @src
+ * @lenp: On entry, length of data at @src. On exit, number of bytes used from
+ * @src
  * @stoponerr: 0 to continue when a decode error is found, 1 to stop
  * @offset: start offset within the src buffer
  * Return: 0 if OK, -1 on error
Signature · 1 line
2.43.0
#4 lore raw

PATCH v2 4/18 fdtdec: Support separate BSS for all XPL builds

In reply to Simon Glass

Adjust the condition so that separate BSS can be deselected for TPL and VPL.

---

(no changes since v1)

 lib/fdtdec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/fdtdec.c +1 -1
index 5edc8dd2f9f..106bb406365 100644
@@ -1232,7 +1232,7 @@ static void *fdt_find_separate(void)
 
 #ifdef CONFIG_SPL_BUILD
 	/* FDT is at end of BSS unless it is in a different memory region */
-	if (IS_ENABLED(CONFIG_SPL_SEPARATE_BSS))
+	if (CONFIG_IS_ENABLED(SEPARATE_BSS))
 		fdt_blob = (ulong *)_image_binary_end;
 	else
 		fdt_blob = (ulong *)__bss_end;
Signature · 1 line
2.43.0
#5 lore raw

PATCH v2 5/18 tiny-printf: Correct return values

In reply to Simon Glass

The sprintf() etc. functions are supposed to return the length of the string written, but do not. Fix this by checking the amount of buffer space used.

---

(no changes since v1)

 lib/tiny-printf.c | 15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)
lib/tiny-printf.c +6 -9
index 9a70c6095b3..64dee779c4a 100644
@@ -365,16 +365,15 @@ int sprintf(char *buf, const char *fmt, ...)
 {
 	struct printf_info info;
 	va_list va;
-	int ret;
 
 	va_start(va, fmt);
 	info.outstr = buf;
 	info.putc = putc_outstr;
-	ret = _vprintf(&info, fmt, va);
+	_vprintf(&info, fmt, va);
 	va_end(va);
 	*info.outstr = '\0';
 
-	return ret;
+	return info.outstr - buf;
 }
 
 #if CONFIG_IS_ENABLED(LOG)
@@ -382,14 +381,13 @@ int sprintf(char *buf, const char *fmt, ...)
 int vsnprintf(char *buf, size_t size, const char *fmt, va_list va)
 {
 	struct printf_info info;
-	int ret;
 
 	info.outstr = buf;
 	info.putc = putc_outstr;
-	ret = _vprintf(&info, fmt, va);
+	_vprintf(&info, fmt, va);
 	*info.outstr = '\0';
 
-	return ret;
+	return info.outstr - buf;
 }
 #endif
 
@@ -398,16 +396,15 @@ int snprintf(char *buf, size_t size, const char *fmt, ...)
 {
 	struct printf_info info;
 	va_list va;
-	int ret;
 
 	va_start(va, fmt);
 	info.outstr = buf;
 	info.putc = putc_outstr;
-	ret = _vprintf(&info, fmt, va);
+	_vprintf(&info, fmt, va);
 	va_end(va);
 	*info.outstr = '\0';
 
-	return ret;
+	return info.outstr - buf;
 }
 
 void print_grouped_ull(unsigned long long int_val, int digits)
Signature · 1 line
2.43.0
#6 lore raw

PATCH v2 6/18 tpl: Support numbered aliases in device tree

In reply to Simon Glass

Add an option so that this feature can be enabled in TPL for boards which need it.

---

(no changes since v1)

 drivers/core/Kconfig | 8 ++++++++
 1 file changed, 8 insertions(+)
drivers/core/Kconfig +8 -0
index c39abe3bc94..6b4330fe4ea 100644
@@ -152,6 +152,14 @@ config SPL_DM_SEQ_ALIAS
 	  numbered devices (e.g. serial0 = &serial0). This feature can be
 	  disabled if it is not required, to save code space in SPL.
 
+config TPL_DM_SEQ_ALIAS
+	bool "Support numbered aliases in device tree in TPL"
+	depends on TPL_DM
+	help
+	  Most boards will have a '/aliases' node containing the path to
+	  numbered devices (e.g. serial0 = &serial0). This feature can be
+	  disabled if it is not required, to save code space in SPL.
+
 config VPL_DM_SEQ_ALIAS
 	bool "Support numbered aliases in device tree in VPL"
 	depends on VPL_DM
Signature · 1 line
2.43.0
#7 lore raw

PATCH v2 7/18 ram: Support driver model in VPL

In reply to Simon Glass

Some boards want to use RAM in VPL so add an option for that.

---

Changes in v2:
- Update this to say VPL instead of TPL

 drivers/ram/Kconfig | 9 +++++++++
 1 file changed, 9 insertions(+)
drivers/ram/Kconfig +9 -0
index a64d2dff68d..f7e357f24da 100644
@@ -26,6 +26,15 @@ config TPL_RAM
 	  TPL, enable this option. It might provide a cleaner interface to
 	  setting up RAM (e.g. SDRAM / DDR) within TPL.
 
+config VPL_RAM
+	bool "Enable RAM support in VPL"
+	depends on RAM && VPL
+	help
+	  The RAM subsystem adds a small amount of overhead to the image.
+	  If this is acceptable and you have a need to use RAM drivers in
+	  VPL, enable this option. It might provide a cleaner interface to
+	  setting up RAM (e.g. SDRAM / DDR) within VPL.
+
 config STM32_SDRAM
 	bool "Enable STM32 SDRAM support"
 	depends on RAM
Signature · 1 line
2.43.0
#8 lore raw

PATCH v2 8/18 serial: Support debug UART in TPL

In reply to Simon Glass

Some boards want to use the debug UART in TPL so add an option for that.

---

(no changes since v1)

 drivers/serial/Kconfig | 7 +++++++
 1 file changed, 7 insertions(+)
drivers/serial/Kconfig +7 -0
index 3a1e5a6f287..8b27ad9a77e 100644
@@ -539,6 +539,13 @@ config TPL_DEBUG_UART_BASE
 	help
 	  This is the base address of your UART for memory-mapped UARTs for TPL.
 
+config VPL_DEBUG_UART_BASE
+	hex "Base address of UART for VPL"
+	depends on VPL && DEBUG_UART
+	default DEBUG_UART_BASE
+	help
+	  This is the base address of your UART for memory-mapped UARTs for VPL.
+
 config DEBUG_UART_CLOCK
 	int "UART input clock"
 	depends on DEBUG_UART
Signature · 1 line
2.43.0
#9 lore raw

PATCH v2 9/18 armv8: Support not having separate BSS

In reply to Simon Glass

Separate BSS is current mandatory on armv8 but this is not useful for early boot phases. Add support for the combined BSS.

Use an #ifdef to avoid using CONFIG_SPL_BSS_START_ADDR which is not valid in this case.

---

(no changes since v1)

 arch/arm/cpu/armv8/u-boot-spl.lds | 12 ++++++++++++
 1 file changed, 12 insertions(+)
arch/arm/cpu/armv8/u-boot-spl.lds +12 -0
index 215cedd69a8..fed69644b55 100644
@@ -13,8 +13,10 @@
 
 MEMORY { .sram : ORIGIN = IMAGE_TEXT_BASE,
 		LENGTH = IMAGE_MAX_SIZE }
+#ifdef CONFIG_SPL_SEPARATE_BSS
 MEMORY { .sdram : ORIGIN = CONFIG_SPL_BSS_START_ADDR,
 		LENGTH = CONFIG_SPL_BSS_MAX_SIZE }
+#endif
 
 OUTPUT_FORMAT("elf64-littleaarch64", "elf64-littleaarch64", "elf64-littleaarch64")
 OUTPUT_ARCH(aarch64)
@@ -56,12 +58,22 @@ SECTIONS
 	_end = .;
 	_image_binary_end = .;
 
+#ifdef CONFIG_SPL_SEPARATE_BSS
 	.bss : {
 		__bss_start = .;
 		*(.bss*)
 		. = ALIGN(8);
 		__bss_end = .;
 	} >.sdram
+#else
+	.bss (NOLOAD) : {
+		__bss_start = .;
+		*(.bss*)
+		 . = ALIGN(8);
+		__bss_end = .;
+	} >.sram
+#endif
+	__bss_size = __bss_end - __bss_start;
 
 	/DISCARD/ : { *(.rela*) }
 	/DISCARD/ : { *(.dynsym) }
Signature · 1 line
2.43.0
#10 lore raw

Re: [PATCH v2 09/18] armv8: Support not having separate BSS

Hi Simon,

Quoted 39 lines · Simon Glass

Separate BSS is current mandatory on armv8 but this is not useful for early boot phases. Add support for the combined BSS.

Use an #ifdef to avoid using CONFIG_SPL_BSS_START_ADDR which is not valid in this case.

---

(no changes since v1)

 arch/arm/cpu/armv8/u-boot-spl.lds | 12 ++++++++++++
 1 file changed, 12 insertions(+)
arch/arm/cpu/armv8/u-boot-spl.lds +3 -0
index 215cedd69a8..fed69644b55 100644
@@ -13,8 +13,10 @@
 
 MEMORY { .sram : ORIGIN = IMAGE_TEXT_BASE,
                LENGTH = IMAGE_MAX_SIZE }
+#ifdef CONFIG_SPL_SEPARATE_BSS
 MEMORY { .sdram : ORIGIN = CONFIG_SPL_BSS_START_ADDR,
                LENGTH = CONFIG_SPL_BSS_MAX_SIZE }
+#endif
 
 OUTPUT_FORMAT("elf64-littleaarch64", "elf64-littleaarch64", "elf64-littleaarch64")
 OUTPUT_ARCH(aarch64)
@@ -56,12 +58,22 @@ SECTIONS
        _end = .;
        _image_binary_end = .;
 
+#ifdef CONFIG_SPL_SEPARATE_BSS
        .bss : {
                __bss_start = .;
                *(.bss*)
                . = ALIGN(8);

arch/arm/cpu/armv8/u-boot-spl.lds SECTIONS · line 75

Quoted 10 lines
arch/arm/cpu/armv8/u-boot-spl.lds +8 -0
                __bss_end = .;
        } >.sdram
+#else
+       .bss (NOLOAD) : {
+               __bss_start = .;
+               *(.bss*)
+                . = ALIGN(8);
+               __bss_end = .;
+       } >.sram
+#endif

This is still going to be separate. The only difference isn't that it's not loaded. If you want to combine it with a region, you got to do something similar to what we have in armv7, where it overlaps with rel.dyn

Thanks
/Ilias

Quoted 7 lines
arch/arm/cpu/armv8/u-boot-spl.lds +1 -1
+       __bss_size = __bss_end - __bss_start;
 
        /DISCARD/ : { *(.rela*) }
        /DISCARD/ : { *(.dynsym) }
--

2.43.0

#11 lore raw

Re: [PATCH v2 09/18] armv8: Support not having separate BSS

Hi Ilias,

Quoted 50 lines · Ilias Apalodimas

Hi Simon,

Quoted 46 lines · Simon Glass

Separate BSS is current mandatory on armv8 but this is not useful for early boot phases. Add support for the combined BSS.

Use an #ifdef to avoid using CONFIG_SPL_BSS_START_ADDR which is not valid in this case.

---

(no changes since v1)

 arch/arm/cpu/armv8/u-boot-spl.lds | 12 ++++++++++++
 1 file changed, 12 insertions(+)
arch/arm/cpu/armv8/u-boot-spl.lds +8 -0
index 215cedd69a8..fed69644b55 100644
@@ -13,8 +13,10 @@
 
 MEMORY { .sram : ORIGIN = IMAGE_TEXT_BASE,
                LENGTH = IMAGE_MAX_SIZE }
+#ifdef CONFIG_SPL_SEPARATE_BSS
 MEMORY { .sdram : ORIGIN = CONFIG_SPL_BSS_START_ADDR,
                LENGTH = CONFIG_SPL_BSS_MAX_SIZE }
+#endif
 
 OUTPUT_FORMAT("elf64-littleaarch64", "elf64-littleaarch64", "elf64-littleaarch64")
 OUTPUT_ARCH(aarch64)
@@ -56,12 +58,22 @@ SECTIONS
        _end = .;
        _image_binary_end = .;
 
+#ifdef CONFIG_SPL_SEPARATE_BSS
        .bss : {
                __bss_start = .;
                *(.bss*)
                . = ALIGN(8);
                __bss_end = .;
        } >.sdram
+#else
+       .bss (NOLOAD) : {
+               __bss_start = .;
+               *(.bss*)
+                . = ALIGN(8);
Quoted 8 lines

arch/arm/cpu/armv8/u-boot-spl.lds SECTIONS · line 75

Quoted 3 lines
arch/arm/cpu/armv8/u-boot-spl.lds +3 -0
+               __bss_end = .;
+       } >.sram
+#endif

This is still going to be separate. The only difference isn't that it's not loaded. If you want to combine it with a region, you got to do something similar to what we have in armv7, where it overlaps with rel.dyn

I don't mind about combining it with a region, But SPL doesn't have relocation data, right?

My meaning of 'separate' is as described in CONFIG_SPL_SEPARATE_BSS, i.e. being kept in SDRAM.

Quoted 10 lines

Thanks
/Ilias

Quoted 7 lines
arch/arm/cpu/armv8/u-boot-spl.lds +1 -1
+       __bss_size = __bss_end - __bss_start;
 
        /DISCARD/ : { *(.rela*) }
        /DISCARD/ : { *(.dynsym) }
--

2.43.0

Regards,
Simon

Reviewed-by
#12 lore raw

Re: [PATCH v2 09/18] armv8: Support not having separate BSS

Hi Simon,

Quoted 64 lines · Simon Glass

Hi Ilias,

Quoted 50 lines · Ilias Apalodimas

Hi Simon,

Quoted 46 lines · Simon Glass

Separate BSS is current mandatory on armv8 but this is not useful for early boot phases. Add support for the combined BSS.

Use an #ifdef to avoid using CONFIG_SPL_BSS_START_ADDR which is not valid in this case.

---

(no changes since v1)

 arch/arm/cpu/armv8/u-boot-spl.lds | 12 ++++++++++++
 1 file changed, 12 insertions(+)
arch/arm/cpu/armv8/u-boot-spl.lds +8 -0
index 215cedd69a8..fed69644b55 100644
@@ -13,8 +13,10 @@
 
 MEMORY { .sram : ORIGIN = IMAGE_TEXT_BASE,
                LENGTH = IMAGE_MAX_SIZE }
+#ifdef CONFIG_SPL_SEPARATE_BSS
 MEMORY { .sdram : ORIGIN = CONFIG_SPL_BSS_START_ADDR,
                LENGTH = CONFIG_SPL_BSS_MAX_SIZE }
+#endif
 
 OUTPUT_FORMAT("elf64-littleaarch64", "elf64-littleaarch64", "elf64-littleaarch64")
 OUTPUT_ARCH(aarch64)
@@ -56,12 +58,22 @@ SECTIONS
        _end = .;
        _image_binary_end = .;
 
+#ifdef CONFIG_SPL_SEPARATE_BSS
        .bss : {
                __bss_start = .;
                *(.bss*)
                . = ALIGN(8);
                __bss_end = .;
        } >.sdram
+#else
+       .bss (NOLOAD) : {
+               __bss_start = .;
+               *(.bss*)
+                . = ALIGN(8);
Quoted 8 lines

arch/arm/cpu/armv8/u-boot-spl.lds SECTIONS · line 75

Quoted 3 lines
arch/arm/cpu/armv8/u-boot-spl.lds +3 -0
+               __bss_end = .;
+       } >.sram
+#endif

This is still going to be separate. The only difference isn't that it's not loaded. If you want to combine it with a region, you got to do something similar to what we have in armv7, where it overlaps with rel.dyn

Quoted 5 lines

I don't mind about combining it with a region, But SPL doesn't have relocation data, right?

My meaning of 'separate' is as described in CONFIG_SPL_SEPARATE_BSS, i.e. being kept in SDRAM.

Ok, is the NOLOAD really needed? I would prefer the ifdef around .sdram/.sram

In any case

Quoted 14 lines
Quoted 11 lines

Thanks
/Ilias

Quoted 7 lines
arch/arm/cpu/armv8/u-boot-spl.lds +1 -1
+       __bss_size = __bss_end - __bss_start;
 
        /DISCARD/ : { *(.rela*) }
        /DISCARD/ : { *(.dynsym) }
--

2.43.0

Regards,
Simon

#13 lore raw

Re: [PATCH v2 09/18] armv8: Support not having separate BSS

Hi Ilias,

Quoted 71 lines · Ilias Apalodimas

Hi Simon,

Quoted 67 lines · Simon Glass

Hi Ilias,

Quoted 50 lines · Ilias Apalodimas

Hi Simon,

Quoted 46 lines · Simon Glass

Separate BSS is current mandatory on armv8 but this is not useful for early boot phases. Add support for the combined BSS.

Use an #ifdef to avoid using CONFIG_SPL_BSS_START_ADDR which is not valid in this case.

---

(no changes since v1)

 arch/arm/cpu/armv8/u-boot-spl.lds | 12 ++++++++++++
 1 file changed, 12 insertions(+)
arch/arm/cpu/armv8/u-boot-spl.lds +8 -0
index 215cedd69a8..fed69644b55 100644
@@ -13,8 +13,10 @@
 
 MEMORY { .sram : ORIGIN = IMAGE_TEXT_BASE,
                LENGTH = IMAGE_MAX_SIZE }
+#ifdef CONFIG_SPL_SEPARATE_BSS
 MEMORY { .sdram : ORIGIN = CONFIG_SPL_BSS_START_ADDR,
                LENGTH = CONFIG_SPL_BSS_MAX_SIZE }
+#endif
 
 OUTPUT_FORMAT("elf64-littleaarch64", "elf64-littleaarch64", "elf64-littleaarch64")
 OUTPUT_ARCH(aarch64)
@@ -56,12 +58,22 @@ SECTIONS
        _end = .;
        _image_binary_end = .;
 
+#ifdef CONFIG_SPL_SEPARATE_BSS
        .bss : {
                __bss_start = .;
                *(.bss*)
                . = ALIGN(8);
                __bss_end = .;
        } >.sdram
+#else
+       .bss (NOLOAD) : {
+               __bss_start = .;
+               *(.bss*)
+                . = ALIGN(8);
Quoted 8 lines

arch/arm/cpu/armv8/u-boot-spl.lds SECTIONS · line 75

Quoted 3 lines
arch/arm/cpu/armv8/u-boot-spl.lds +3 -0
+               __bss_end = .;
+       } >.sram
+#endif

This is still going to be separate. The only difference isn't that it's not loaded. If you want to combine it with a region, you got to do something similar to what we have in armv7, where it overlaps with rel.dyn

I don't mind about combining it with a region, But SPL doesn't have relocation data, right?

Quoted 7 lines
Quoted 2 lines

My meaning of 'separate' is as described in CONFIG_SPL_SEPARATE_BSS, i.e. being kept in SDRAM.

Ok, is the NOLOAD really needed? I would prefer the ifdef around .sdram/.sram

In any case

Oh I see... well the NOLOAD stops it writing zero data into the image, as I understand it. Actually I wonder why we don't have NOLOAD for the separate-BSS case? If we can use NOLOAD for both then we can indeed shrink the #ifdef

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

Thanks
/Ilias

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
arch/arm/cpu/armv8/u-boot-spl.lds +1 -1
+       __bss_size = __bss_end - __bss_start;
 
        /DISCARD/ : { *(.rela*) }
        /DISCARD/ : { *(.dynsym) }
--

2.43.0

Regards,
Simon

#14 lore raw

Re: [PATCH v2 09/18] armv8: Support not having separate BSS

Quoted 79 lines · Simon Glass

Hi Ilias,

Quoted 74 lines · Ilias Apalodimas

Hi Simon,

Quoted 69 lines · Simon Glass

Hi Ilias,

Quoted 50 lines · Ilias Apalodimas

Hi Simon,

Quoted 46 lines · Simon Glass

Separate BSS is current mandatory on armv8 but this is not useful for early boot phases. Add support for the combined BSS.

Use an #ifdef to avoid using CONFIG_SPL_BSS_START_ADDR which is not valid in this case.

---

(no changes since v1)

 arch/arm/cpu/armv8/u-boot-spl.lds | 12 ++++++++++++
 1 file changed, 12 insertions(+)
arch/arm/cpu/armv8/u-boot-spl.lds +8 -0
index 215cedd69a8..fed69644b55 100644
@@ -13,8 +13,10 @@
 
 MEMORY { .sram : ORIGIN = IMAGE_TEXT_BASE,
                LENGTH = IMAGE_MAX_SIZE }
+#ifdef CONFIG_SPL_SEPARATE_BSS
 MEMORY { .sdram : ORIGIN = CONFIG_SPL_BSS_START_ADDR,
                LENGTH = CONFIG_SPL_BSS_MAX_SIZE }
+#endif
 
 OUTPUT_FORMAT("elf64-littleaarch64", "elf64-littleaarch64", "elf64-littleaarch64")
 OUTPUT_ARCH(aarch64)
@@ -56,12 +58,22 @@ SECTIONS
        _end = .;
        _image_binary_end = .;
 
+#ifdef CONFIG_SPL_SEPARATE_BSS
        .bss : {
                __bss_start = .;
                *(.bss*)
                . = ALIGN(8);
                __bss_end = .;
        } >.sdram
+#else
+       .bss (NOLOAD) : {
+               __bss_start = .;
+               *(.bss*)
+                . = ALIGN(8);
Quoted 8 lines

arch/arm/cpu/armv8/u-boot-spl.lds SECTIONS · line 75

Quoted 3 lines
arch/arm/cpu/armv8/u-boot-spl.lds +3 -0
+               __bss_end = .;
+       } >.sram
+#endif

This is still going to be separate. The only difference isn't that it's not loaded. If you want to combine it with a region, you got to do something similar to what we have in armv7, where it overlaps with rel.dyn

I don't mind about combining it with a region, But SPL doesn't have relocation data, right?

My meaning of 'separate' is as described in CONFIG_SPL_SEPARATE_BSS, i.e. being kept in SDRAM.

Quoted 7 lines
Quoted 4 lines

Ok, is the NOLOAD really needed? I would prefer the ifdef around .sdram/.sram

In any case

Oh I see... well the NOLOAD stops it writing zero data into the image, as I understand it.

It doesn't load that section into memory.

Quoted 3 lines

Actually I wonder why we don't have NOLOAD for the
separate-BSS case? If we can use NOLOAD for both then we can indeed shrink the #ifdef

If .bss is zero'ed out properly (which I think it is) we can use NOLOAD on both

Thanks
/Ilias

Quoted 17 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines

Thanks
/Ilias

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
arch/arm/cpu/armv8/u-boot-spl.lds +1 -1
+       __bss_size = __bss_end - __bss_start;
 
        /DISCARD/ : { *(.rela*) }
        /DISCARD/ : { *(.dynsym) }
--

2.43.0

Regards,
Simon

#15 lore raw

PATCH v2 10/18 arm: cache: Drop a stale comment

In reply to Simon Glass

This header includes more than just dummy functions, so drop this comment.

---

(no changes since v1)

 arch/arm/lib/cache.c | 2 --
 1 file changed, 2 deletions(-)
arch/arm/lib/cache.c +0 -2
index b2ae74a59f1..648edf308f6 100644
@@ -4,8 +4,6 @@
  * Wolfgang Denk, DENX Software Engineering, [email protected].
  */
 
-/* for now: just dummy functions to satisfy the linker */
-
 #include <config.h>
 #include <cpu_func.h>
 #include <log.h>
Signature · 1 line
2.43.0
#16 lore raw

PATCH v2 11/18 arm: Fix up a stale comment in sections.c

In reply to Simon Glass

There are currently four symbols here, so drop the word 'two'.

---

(no changes since v1)

 arch/arm/lib/sections.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/lib/sections.c +1 -1
index 07efabaa7dc..8955aa6111c 100644
@@ -5,7 +5,7 @@
 #include <linux/compiler.h>
 
 /**
- * These two symbols are declared in a C file so that the linker
+ * These symbols are declared in a C file so that the linker
  * uses R_ARM_RELATIVE relocation, rather than the R_ARM_ABS32 one
  * it would use if the symbols were defined in the linker file.
  * Using only R_ARM_RELATIVE relocation ensures that references to
Signature · 1 line
2.43.0
Acked-by on v2 11/18
#17 lore raw

Re: [PATCH v2 11/18] arm: Fix up a stale comment in sections.c

Quoted 25 lines · Simon Glass

There are currently four symbols here, so drop the word 'two'.

---

(no changes since v1)

 arch/arm/lib/sections.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/lib/sections.c +1 -2
index 07efabaa7dc..8955aa6111c 100644
@@ -5,7 +5,7 @@
 #include <linux/compiler.h>
 
 /**
- * These two symbols are declared in a C file so that the linker
+ * These symbols are declared in a C file so that the linker
  * uses R_ARM_RELATIVE relocation, rather than the R_ARM_ABS32 one
  * it would use if the symbols were defined in the linker file.
  * Using only R_ARM_RELATIVE relocation ensures that references to
--
Quoted 2 lines

2.43.0

#18 lore raw

PATCH v2 12/18 mmc: Support driver model in TPL

In reply to Simon Glass

Some boards want to use DM_MMC in TPL so add an option for that.

---

Changes in v2:
- Default this option to off to avoid TPL-code-size increases

 drivers/mmc/Kconfig | 11 +++++++++++
 1 file changed, 11 insertions(+)
drivers/mmc/Kconfig +11 -0
index 982e84dc3bc..22c65681f0a 100644
@@ -61,6 +61,17 @@ config SPL_DM_MMC
 	  appear as block devices in U-Boot and can support filesystems such
 	  as EXT4 and FAT.
 
+config TPL_DM_MMC
+	bool "Enable MMC controllers using Driver Model in TPL"
+	depends on TPL_DM && DM_MMC
+	select TPL_BLK
+	help
+	  This enables the MultiMediaCard (MMC) uclass which supports MMC and
+	  Secure Digital I/O (SDIO) cards. Both removable (SD, micro-SD, etc.)
+	  and non-removable (e.g. eMMC chip) devices are supported. These
+	  appear as block devices in U-Boot and can support filesystems such
+	  as EXT4 and FAT.
+
 if MMC
 
 config MMC_SDHCI_ADMA_HELPERS
Signature · 1 line
2.43.0
#19 lore raw

PATCH v2 13/18 mmc: Add more debugging for SPL

In reply to Simon Glass

When MMC booting fails it is sometimes hard to figure out what went wrong as there is no error code. It isn't even clear which MMC device was chosen, since SPL can have its own numbering.

Add some debugging to help with this.

---

Changes in v2:
- Drop the unnecessary interior check for CONFIG_IS_ENABLED(DM_MMC)

 common/spl/spl_mmc.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)
common/spl/spl_mmc.c +12 -0
index 1337596eca0..1f696593216 100644
@@ -50,6 +50,7 @@ int mmc_load_image_raw_sector(struct spl_image_info *spl_image,
 	ret = spl_load(spl_image, bootdev, &load, 0, sector << bd->log2blksz);
 	if (ret) {
 		puts("mmc_load_image_raw_sector: mmc block read error\n");
+		log_debug("(error=%d)\n", ret);
 		return ret;
 	}
 
@@ -76,6 +77,12 @@ static int spl_mmc_find_device(struct mmc **mmcp, int mmc_dev)
 	int ret;
 
 #if CONFIG_IS_ENABLED(DM_MMC)
+	struct udevice *dev;
+	struct uclass *uc;
+
+	log_debug("Selecting MMC dev %d; seqs:\n", mmc_dev);
+	uclass_id_foreach_dev(UCLASS_MMC, dev, uc)
+		log_debug("%d: %s\n", dev_seq(dev), dev->name);
 	ret = mmc_init_device(mmc_dev);
 #else
 	ret = mmc_initialize(NULL);
@@ -91,6 +98,9 @@ static int spl_mmc_find_device(struct mmc **mmcp, int mmc_dev)
 		       mmc_dev, ret);
 		return ret;
 	}
+#if CONFIG_IS_ENABLED(DM_MMC)
+	log_debug("mmc %d: %s\n", mmc_dev, (*mmcp)->dev->name);
+#endif
 
 	return 0;
 }
@@ -342,6 +352,8 @@ int spl_mmc_load(struct spl_image_info *spl_image,
 
 	/* Perform peripheral init only once for an mmc device */
 	mmc_dev = spl_mmc_get_device_index(bootdev->boot_device);
+	log_debug("boot_device=%d, mmc_dev=%d\n", bootdev->boot_device,
+		  mmc_dev);
 	if (!mmc || spl_mmc_get_mmc_devnum(mmc) != mmc_dev) {
 		ret = spl_mmc_find_device(&mmc, mmc_dev);
 		if (ret)
Signature · 1 line
2.43.0
#20 lore raw

Re: [PATCH v2 13/18] mmc: Add more debugging for SPL

Quoted 7 lines · Simon Glass

When MMC booting fails it is sometimes hard to figure out what went wrong as there is no error code. It isn't even clear which MMC device was chosen, since SPL can have its own numbering.

Add some debugging to help with this.

[snip]

common/spl/spl_mmc.c static int spl_mmc_find_device(struct mmc **mmcp, int mmc_dev) · line 88

Quoted 13 lines
common/spl/spl_mmc.c +6 -0
@@ -76,6 +77,12 @@ static int spl_mmc_find_device(struct mmc **mmcp, int mmc_dev)
 	int ret;
 
 #if CONFIG_IS_ENABLED(DM_MMC)
+	struct udevice *dev;
+	struct uclass *uc;
+
+	log_debug("Selecting MMC dev %d; seqs:\n", mmc_dev);
+	uclass_id_foreach_dev(UCLASS_MMC, dev, uc)
+		log_debug("%d: %s\n", dev_seq(dev), dev->name);
 	ret = mmc_init_device(mmc_dev);
 #else
 	ret = mmc_initialize(NULL);

For the record, this change, even with debugging not enabled (and LOG not enabled) is not size change free and does not get optimized away by the compiler. I'm not sure off-hand if there's a clever way to fix that, so I'm not blocking the series on this.

Signature · 1 line
Tom
#21 lore raw

Re: [PATCH v2 13/18] mmc: Add more debugging for SPL

Hi Tom,

Quoted 14 lines · Tom Rini
Quoted 7 lines · Simon Glass

When MMC booting fails it is sometimes hard to figure out what went wrong as there is no error code. It isn't even clear which MMC device was chosen, since SPL can have its own numbering.

Add some debugging to help with this.

[snip]

Quoted 3 lines
common/spl/spl_mmc.c +0 -0
@@ -76,6 +77,12 @@ static int spl_mmc_find_device(struct mmc **mmcp, int mmc_dev)
      int ret;
 
Quoted 15 lines

common/spl/spl_mmc.c static int spl_mmc_find_device(struct mmc **mmcp, int mmc_dev) · line 88

Quoted 10 lines
common/spl/spl_mmc.c +6 -0
 #if CONFIG_IS_ENABLED(DM_MMC)
+     struct udevice *dev;
+     struct uclass *uc;
+
+     log_debug("Selecting MMC dev %d; seqs:\n", mmc_dev);
+     uclass_id_foreach_dev(UCLASS_MMC, dev, uc)
+             log_debug("%d: %s\n", dev_seq(dev), dev->name);
      ret = mmc_init_device(mmc_dev);
 #else
      ret = mmc_initialize(NULL);

For the record, this change, even with debugging not enabled (and LOG not enabled) is not size change free and does not get optimized away by the compiler. I'm not sure off-hand if there's a clever way to fix that, so I'm not blocking the series on this.

Yes, I can depend on _DEBUG so I'll add that patch to the vbe series.

Regards,
Simon

#22 lore raw

PATCH v2 14/18 mmc: Log the error when init fails

In reply to Simon Glass

Add an error-return log to the call in mmc_init_device()

---

(no changes since v1)

 drivers/mmc/mmc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mmc/mmc.c +1 -1
index 7e702c3ae85..e8870e30689 100644
@@ -3188,7 +3188,7 @@ int mmc_init_device(int num)
 	if (uclass_get_device_by_seq(UCLASS_MMC, num, &dev)) {
 		ret = uclass_get_device(UCLASS_MMC, num, &dev);
 		if (ret)
-			return ret;
+			return log_msg_ret("ini", ret);
 	}
 
 	m = mmc_get_mmc_dev(dev);
Signature · 1 line
2.43.0
#23 lore raw

PATCH v2 15/18 mmc: rockchip: Log some error returns

In reply to Simon Glass

Add a little logging to some places in this driver, to aid debugging when something goes wrong.

---

(no changes since v1)

 drivers/mmc/rockchip_dw_mmc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/mmc/rockchip_dw_mmc.c +2 -2
index fb77b049834..7e341665aa3 100644
@@ -80,7 +80,7 @@ static int rockchip_dwmmc_of_to_plat(struct udevice *dev)
 	priv->fifo_depth = dev_read_u32_default(dev, "fifo-depth", 0);
 
 	if (priv->fifo_depth < 0)
-		return -EINVAL;
+		return log_msg_ret("rkp", -EINVAL);
 	priv->fifo_mode = dev_read_bool(dev, "fifo-mode");
 
 #ifdef CONFIG_SPL_BUILD
@@ -96,7 +96,7 @@ static int rockchip_dwmmc_of_to_plat(struct udevice *dev)
 		int val = dev_read_u32_default(dev, "max-frequency", -EINVAL);
 
 		if (val < 0)
-			return val;
+			return log_msg_ret("rkc", val);
 
 		priv->minmax[0] = 400000;  /* 400 kHz */
 		priv->minmax[1] = val;
Signature · 1 line
2.43.0
#24 lore raw

PATCH v2 16/18 mmc: rockchip: Allow clocks to be missing

In reply to Simon Glass

Allow MMC init when clock support is not enabled in a particular phase.

Refactor the setting of priv->emmc_clk so it is a bit clearer.

---

(no changes since v1)

 drivers/mmc/rockchip_dw_mmc.c | 6 ++----
 drivers/mmc/rockchip_sdhci.c  | 9 ++++-----
 2 files changed, 6 insertions(+), 9 deletions(-)
drivers/mmc/rockchip_dw_mmc.c +2 -4
index 7e341665aa3..5ba99d68b7d 100644
@@ -131,13 +131,11 @@ static int rockchip_dwmmc_probe(struct udevice *dev)
 	priv->minmax[1] = dtplat->max_frequency;
 
 	ret = clk_get_by_phandle(dev, &dtplat->clocks[1], &priv->clk);
-	if (ret < 0)
-		return ret;
 #else
 	ret = clk_get_by_index(dev, 1, &priv->clk);
-	if (ret < 0)
-		return ret;
 #endif
+	if (ret < 0 && ret != -ENOSYS)
+		return log_msg_ret("clk", ret);
 	host->fifo_depth = priv->fifo_depth;
 	host->fifo_mode = priv->fifo_mode;
 
drivers/mmc/rockchip_sdhci.c +4 -5
index 35667b86b50..15b4a39770a 100644
@@ -571,20 +571,19 @@ static int rockchip_sdhci_probe(struct udevice *dev)
 	struct rockchip_sdhc *priv = dev_get_priv(dev);
 	struct mmc_config *cfg = &plat->cfg;
 	struct sdhci_host *host = &priv->host;
-	struct clk clk;
+	struct clk *clk = &priv->emmc_clk;
 	int ret;
 
 	host->max_clk = cfg->f_max;
-	ret = clk_get_by_index(dev, 0, &clk);
+	ret = clk_get_by_index(dev, 0, clk);
 	if (!ret) {
-		ret = clk_set_rate(&clk, host->max_clk);
+		ret = clk_set_rate(clk, host->max_clk);
 		if (IS_ERR_VALUE(ret))
 			printf("%s clk set rate fail!\n", __func__);
-	} else {
+	} else if (ret != -ENOSYS) {
 		printf("%s fail to get clk\n", __func__);
 	}
 
-	priv->emmc_clk = clk;
 	priv->dev = dev;
 
 	if (data->get_phy) {
Signature · 1 line
2.43.0
#25 lore raw

PATCH v2 17/18 rockchip: mmc: Fix a missing colon and newline

In reply to Simon Glass

Add a missing colon and newline in rk3399_emmc_get_phy().

---

Changes in v2:
- Update subject to mention that a newline is added too

 drivers/mmc/rockchip_sdhci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mmc/rockchip_sdhci.c +1 -1
index 15b4a39770a..4ea3307ed9c 100644
@@ -230,7 +230,7 @@ static int rk3399_emmc_get_phy(struct udevice *dev)
 
 	grf_base = syscon_get_first_range(ROCKCHIP_SYSCON_GRF);
 	if (IS_ERR_OR_NULL(grf_base)) {
-		printf("%s Get syscon grf failed", __func__);
+		printf("%s: Get syscon grf failed\n", __func__);
 		return -ENODEV;
 	}
 	grf_phy_offset = ofnode_read_u32_default(phy_node, "reg", 0);
Signature · 1 line
2.43.0
#26 lore raw

PATCH v2 18/18 rockchip: Provided SPL control over efuse presence

In reply to Simon Glass

This driver should not generally be present in SPL, even if misc devices are enabled. Update the Makefile rule accordingly.

---

(no changes since v1)

 drivers/misc/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/misc/Makefile +1 -1
index e53d52c47b3..ff984d7b191 100644
@@ -68,7 +68,7 @@ obj-$(CONFIG_QFW_MMIO) += qfw_mmio.o
 obj-$(CONFIG_QFW_SMBIOS) += qfw_smbios.o
 obj-$(CONFIG_SANDBOX) += qfw_sandbox.o
 endif
-obj-$(CONFIG_ROCKCHIP_EFUSE) += rockchip-efuse.o
+obj-$(CONFIG_$(SPL_TPL_)ROCKCHIP_EFUSE) += rockchip-efuse.o
 obj-$(CONFIG_ROCKCHIP_OTP) += rockchip-otp.o
 obj-$(CONFIG_$(SPL_TPL_)ROCKCHIP_IODOMAIN) += rockchip-io-domain.o
 obj-$(CONFIG_SANDBOX) += syscon_sandbox.o misc_sandbox.o
Signature · 1 line
2.43.0
#27 lore raw

Re: [PATCH v2 18/18] rockchip: Provided SPL control over efuse presence

Hi Simon,

Quoted 16 lines · Simon Glass

This driver should not generally be present in SPL, even if misc devices are enabled. Update the Makefile rule accordingly.

---

(no changes since v1)

 drivers/misc/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/misc/Makefile +0 -0
index e53d52c47b3..ff984d7b191 100644

drivers/misc/Makefile obj-$(CONFIG_QFW_MMIO) += qfw_mmio.o · line 72

Quoted 6 lines
drivers/misc/Makefile +1 -1
@@ -68,7 +68,7 @@ obj-$(CONFIG_QFW_MMIO) += qfw_mmio.o
 obj-$(CONFIG_QFW_SMBIOS) += qfw_smbios.o
 obj-$(CONFIG_SANDBOX) += qfw_sandbox.o
 endif
-obj-$(CONFIG_ROCKCHIP_EFUSE) += rockchip-efuse.o
+obj-$(CONFIG_$(SPL_TPL_)ROCKCHIP_EFUSE) += rockchip-efuse.o
 obj-$(CONFIG_ROCKCHIP_OTP) += rockchip-otp.o

Please also include similar change for ROCKCHIP_OTP, the EFUSE and OTP drivers provide same functionality, just for different Rockchip SoCs.

Regards,
Jonas

Quoted 2 lines
drivers/misc/Makefile +0 -0
 obj-$(CONFIG_$(SPL_TPL_)ROCKCHIP_IODOMAIN) += rockchip-io-domain.o
 obj-$(CONFIG_SANDBOX) += syscon_sandbox.o misc_sandbox.o
#28 lore raw

Re: [PATCH v2 18/18] rockchip: Provided SPL control over efuse presence

Quoted 14 lines · Jonas Karlman

Hi Simon,

Quoted 11 lines · Simon Glass

This driver should not generally be present in SPL, even if misc devices are enabled. Update the Makefile rule accordingly.

---

(no changes since v1)

 drivers/misc/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 14 lines

drivers/misc/Makefile obj-$(CONFIG_QFW_MMIO) += qfw_mmio.o · line 72

Quoted 11 lines
drivers/misc/Makefile +1 -1
index e53d52c47b3..ff984d7b191 100644
@@ -68,7 +68,7 @@ obj-$(CONFIG_QFW_MMIO) += qfw_mmio.o
 obj-$(CONFIG_QFW_SMBIOS) += qfw_smbios.o
 obj-$(CONFIG_SANDBOX) += qfw_sandbox.o
 endif
-obj-$(CONFIG_ROCKCHIP_EFUSE) += rockchip-efuse.o
+obj-$(CONFIG_$(SPL_TPL_)ROCKCHIP_EFUSE) += rockchip-efuse.o
 obj-$(CONFIG_ROCKCHIP_OTP) += rockchip-otp.o

Please also include similar change for ROCKCHIP_OTP, the EFUSE and OTP drivers provide same functionality, just for different Rockchip SoCs.

This is reasonable as a clean-up I believe (and possibly post "xPL" series being merged), to reduce churn.

Signature · 1 line
Tom
#29 lore raw

Re: [PATCH v2 18/18] rockchip: Provided SPL control over efuse presence

Hi Tom,

Quoted 30 lines · Tom Rini
Quoted 14 lines · Jonas Karlman

Hi Simon,

Quoted 11 lines · Simon Glass

This driver should not generally be present in SPL, even if misc devices are enabled. Update the Makefile rule accordingly.

---

(no changes since v1)

 drivers/misc/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 14 lines

drivers/misc/Makefile obj-$(CONFIG_QFW_MMIO) += qfw_mmio.o · line 72

Quoted 11 lines
drivers/misc/Makefile +1 -1
index e53d52c47b3..ff984d7b191 100644
@@ -68,7 +68,7 @@ obj-$(CONFIG_QFW_MMIO) += qfw_mmio.o
 obj-$(CONFIG_QFW_SMBIOS) += qfw_smbios.o
 obj-$(CONFIG_SANDBOX) += qfw_sandbox.o
 endif
-obj-$(CONFIG_ROCKCHIP_EFUSE) += rockchip-efuse.o
+obj-$(CONFIG_$(SPL_TPL_)ROCKCHIP_EFUSE) += rockchip-efuse.o
 obj-$(CONFIG_ROCKCHIP_OTP) += rockchip-otp.o

Please also include similar change for ROCKCHIP_OTP, the EFUSE and OTP drivers provide same functionality, just for different Rockchip SoCs.

Quoted 3 lines

This is reasonable as a clean-up I believe (and possibly post "xPL" series being merged), to reduce churn.

I was to quick before reading this and have already sent a fix to keep these two drivers in sync.

https://lore.kernel.org/r/[email protected]/

Regards,
Jonas

#30 lore raw

Re: [PATCH v2 18/18] rockchip: Provided SPL control over efuse presence

Quoted 33 lines · Jonas Karlman

Hi Tom,

Quoted 30 lines · Tom Rini
Quoted 28 lines · Jonas Karlman

Hi Simon,

Quoted 16 lines · Simon Glass

This driver should not generally be present in SPL, even if misc devices are enabled. Update the Makefile rule accordingly.

---

(no changes since v1)

 drivers/misc/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/misc/Makefile +0 -0
index e53d52c47b3..ff984d7b191 100644

drivers/misc/Makefile obj-$(CONFIG_QFW_MMIO) += qfw_mmio.o · line 72

Quoted 6 lines
drivers/misc/Makefile +1 -1
@@ -68,7 +68,7 @@ obj-$(CONFIG_QFW_MMIO) += qfw_mmio.o
 obj-$(CONFIG_QFW_SMBIOS) += qfw_smbios.o
 obj-$(CONFIG_SANDBOX) += qfw_sandbox.o
 endif
-obj-$(CONFIG_ROCKCHIP_EFUSE) += rockchip-efuse.o
+obj-$(CONFIG_$(SPL_TPL_)ROCKCHIP_EFUSE) += rockchip-efuse.o
 obj-$(CONFIG_ROCKCHIP_OTP) += rockchip-otp.o

Please also include similar change for ROCKCHIP_OTP, the EFUSE and OTP drivers provide same functionality, just for different Rockchip SoCs.

Quoted 8 lines
Quoted 3 lines

This is reasonable as a clean-up I believe (and possibly post "xPL" series being merged), to reduce churn.

I was to quick before reading this and have already sent a fix to keep these two drivers in sync.

https://lore.kernel.org/r/[email protected]/

Ah, thanks.

Signature · 1 line
Tom
#31 lore raw
In reply to Simon Glass
Quoted 10 lines · Simon Glass

This includes various patches towards implementing the VBE abrec bootmeth in U-Boot.

Changes in v2:
- Update this to say VPL instead of TPL
- Default this option to off to avoid TPL-code-size increases
- Drop the unnecessary interior check for CONFIG_IS_ENABLED(DM_MMC)
- Update subject to mention that a newline is added too

[...]

Applied to u-boot/next, thanks!

Signature · 1 line
Tom