Skip to contentSkip to conversation

Bug-fixes for a few boards

PATCH In review Simon Glass 3 participants 13 messages Jul 31, 2024 – Aug 5, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

v7 cover Bug-fixes for a few boards

This series includes fixes to get some rockchip and nvidia boards working again. It also drops the broken Beaglebone Black config and provides a devicetree fix for coral (x86).

Note that since this series fixes bugs, it is targeted at -master

Changes in v7:
- Reword the comment

Changes in v5:
- Move setting of pmugrf into the probe() function
- Drop patches previously applied

Changes in v4:
- Drop Fixes tag
- Fix 'stating' typo
- Move Binman size feature to a separate series

Changes in v3:
- Use BLOBLIST instead of OF_BLOBLIST
- Cut the patch down to bare bones
- Split out the refactoring into a separate patch

Changes in v2:
- Use 'phase' instead of 'stage'
- Add new patch to correct memory size in SPL
- Drop patch "regulator: rk8xx: Fix incorrect parameter"
- Rewrite boneblack patch to onstead drop the target and update docs

Simon Glass (8):
mkeficapsule: Add a --version argument
binman: Collect the version number for mkeficapsule
binman: Deal with mkeficapsule being missing
binman: Return failure when a usage() message is generated
binman: Keep the efi_capsule input file
fdt: Correct condition for bloblist existing
rockchip: Ensure memory size is available in RK3399 SPL
rockchip: Avoid #ifdefs in RK3399 SPL

 doc/mkeficapsule.1                  |  4 ++++
 drivers/ram/rockchip/sdram_rk3399.c | 35 ++++++++++++++---------------
 lib/fdtdec.c                        | 12 ++++++++--
 tools/binman/btool/mkeficapsule.py  |  3 ++-
 tools/binman/etype/efi_capsule.py   |  5 ++++-
 tools/mkeficapsule.c                | 10 +++++++--
 6 files changed, 45 insertions(+), 24 deletions(-)
Signature · 1 line
2.34.1
#1 lore raw

PATCH v7 1/8 mkeficapsule: Add a --version argument

Tools should have an option to obtain the version, so add this to the mkeficapsule tool.

---

(no changes since v1)

 doc/mkeficapsule.1   | 4 ++++
 tools/mkeficapsule.c | 8 +++++++-
 2 files changed, 11 insertions(+), 1 deletion(-)
doc/mkeficapsule.1 +4 -0
index c4c2057d5c7..c3d0f21488a 100644
@@ -87,6 +87,10 @@ Generate a firmware revert empty capsule
 .BI "-o\fR,\fB --capoemflag "
 Capsule OEM flag, value between 0x0000 to 0xffff
 
+.TP
+.BR -V ", " --version
+Print version information and exit.
+
 .TP
 .BR -h ", " --help
 Print a help message
tools/mkeficapsule.c +7 -1
index 6a261ff549d..c112ae2de8d 100644
@@ -21,6 +21,8 @@
 #include <gnutls/pkcs7.h>
 #include <gnutls/abstract.h>
 
+#include <version.h>
+
 #include "eficapsule.h"
 
 static const char *tool_name = "mkeficapsule";
@@ -28,7 +30,7 @@ static const char *tool_name = "mkeficapsule";
 efi_guid_t efi_guid_fm_capsule = EFI_FIRMWARE_MANAGEMENT_CAPSULE_ID_GUID;
 efi_guid_t efi_guid_cert_type_pkcs7 = EFI_CERT_TYPE_PKCS7_GUID;
 
-static const char *opts_short = "g:i:I:v:p:c:m:o:dhARD";
+static const char *opts_short = "g:i:I:v:p:c:m:o:dhARDV";
 
 enum {
 	CAPSULE_NORMAL_BLOB = 0,
@@ -70,6 +72,7 @@ static void print_usage(void)
 		"\t-R, --fw-revert  firmware revert capsule, takes no GUID, no image blob\n"
 		"\t-o, --capoemflag Capsule OEM Flag, an integer between 0x0000 and 0xffff\n"
 		"\t-D, --dump-capsule          dump the contents of the capsule headers\n"
+		"\t-V, --version               show version number\n"
 		"\t-h, --help                  print a help message\n",
 		tool_name);
 }
@@ -969,6 +972,9 @@ int main(int argc, char **argv)
 		case 'D':
 			capsule_dump = true;
 			break;
+		case 'V':
+			printf("mkeficapsule version %s\n", PLAIN_VERSION);
+			exit(EXIT_SUCCESS);
 		default:
 			print_usage();
 			exit(EXIT_SUCCESS);
Signature · 1 line
2.34.1
#2 lore raw

PATCH v7 2/8 binman: Collect the version number for mkeficapsule

In reply to Simon Glass

Now that this tool has a version number, collect it.

---

(no changes since v1)

 tools/binman/btool/mkeficapsule.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
tools/binman/btool/mkeficapsule.py +2 -1
index ef1da638df1..f7e5a886849 100644
@@ -33,7 +33,8 @@ class Bintoolmkeficapsule(bintool.Bintool):
     commandline, or through a config file.
     """
     def __init__(self, name):
-        super().__init__(name, 'mkeficapsule tool for generating capsules')
+        super().__init__(name, 'mkeficapsule tool for generating capsules',
+                         r'mkeficapsule version (.*)')
 
     def generate_capsule(self, image_index, image_guid, hardware_instance,
                          payload, output_fname, priv_key, pub_key,
Signature · 1 line
2.34.1
#3 lore raw

PATCH v7 3/8 binman: Deal with mkeficapsule being missing

In reply to Simon Glass

Tools cannot be assumed to be present. Add a check for this with the mkeficpasule tool.

Fixes b617611b27a ("binman: capsule: Add support for generating...")

---

(no changes since v1)

 tools/binman/etype/efi_capsule.py | 4 ++++
 1 file changed, 4 insertions(+)
tools/binman/etype/efi_capsule.py +4 -0
index 751f654bf31..1c4d1bb0e2a 100644
@@ -150,6 +150,10 @@ class Entry_efi_capsule(Entry_section):
         if ret is not None:
             os.remove(payload)
             return tools.read_file(capsule_fname)
+        else:
+            # Bintool is missing; just use the input data as the output
+            self.record_missing_bintool(self.mkeficapsule)
+            return data
 
     def AddBintools(self, btools):
         self.mkeficapsule = self.AddBintool(btools, 'mkeficapsule')
Signature · 1 line
2.34.1
#4 lore raw

PATCH v7 4/8 binman: Return failure when a usage() message is generated

In reply to Simon Glass

The tool must return an error code when invalid arguments are provided, otherwise binman has no way of knowing that anything went wrong.

Correct this.

Fixes fab430be2f4 ("tools: add mkeficapsule command for UEFI...")

---

(no changes since v1)

 tools/mkeficapsule.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/mkeficapsule.c +1 -1
index c112ae2de8d..f28008a0829 100644
@@ -977,7 +977,7 @@ int main(int argc, char **argv)
 			exit(EXIT_SUCCESS);
 		default:
 			print_usage();
-			exit(EXIT_SUCCESS);
+			exit(EXIT_FAILURE);
 		}
 	}
 
Signature · 1 line
2.34.1
#5 lore raw

PATCH v7 5/8 binman: Keep the efi_capsule input file

In reply to Simon Glass

There is no need to remove input files. It makes it harder to diagnose failures. Keep the payload file.

There is no test for this condition, but one could be added.

---

(no changes since v4)

Changes in v4:
- Drop Fixes tag

 tools/binman/etype/efi_capsule.py | 1 -
 1 file changed, 1 deletion(-)
tools/binman/etype/efi_capsule.py +0 -1
index 1c4d1bb0e2a..5941545d0b2 100644
@@ -148,7 +148,6 @@ class Entry_efi_capsule(Entry_section):
                                                  self.fw_version,
                                                  self.oem_flags)
         if ret is not None:
-            os.remove(payload)
             return tools.read_file(capsule_fname)
         else:
             # Bintool is missing; just use the input data as the output
Signature · 1 line
2.34.1
#6 lore raw

PATCH v7 6/8 fdt: Correct condition for bloblist existing

In reply to Simon Glass

On some boards, the bloblist is created in SPL once SDRAM is ready. It cannot be accessed until that point, so is not available early in SPL.

Add a condition to avoid a hang in this case.

This fixes a hang in chromebook_coral

Fixes 70fe2385943 ("fdt: Allow the devicetree to come from a bloblist")

---

Changes in v7:
- Reword the comment

Changes in v3:
- Use BLOBLIST instead of OF_BLOBLIST

Changes in v2:
- Use 'phase' instead of 'stage'

 lib/fdtdec.c | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)
lib/fdtdec.c +10 -2
index 5b3b26df968..6865f78c70d 100644
@@ -1668,8 +1668,16 @@ int fdtdec_setup(void)
 {
 	int ret = -ENOENT;
 
-	/* If allowing a bloblist, check that first */
-	if (CONFIG_IS_ENABLED(BLOBLIST)) {
+	/*
+	 * If allowing a bloblist, check that first. There was discussion about
+	 * adding an OF_BLOBLIST Kconfig, but this was rejected.
+	 *
+	 * The necessary test is whether the previous phase passed a bloblist,
+	 * not whether this phase creates one.
+	 */
+	if (CONFIG_IS_ENABLED(BLOBLIST) &&
+	    (spl_prev_phase() != PHASE_TPL ||
+	     !IS_ENABLED(CONFIG_TPL_BLOBLIST))) {
 		ret = bloblist_maybe_init();
 		if (!ret) {
 			gd->fdt_blob = bloblist_find(BLOBLISTT_CONTROL_FDT, 0);
Signature · 1 line
2.34.1
#7 lore raw

PATCH v7 7/8 rockchip: Ensure memory size is available in RK3399 SPL

In reply to Simon Glass

At present gd->ram_size is 0 in SPL, meaning that it is not possible to enable the cache. Correct this by always populating the RAM size correctly.

This increases code size by about 500 bytes in SPL, since it must call the rather large rockchip_sdram_size() function.

---

(no changes since v3)

Changes in v3:
- Cut the patch down to bare bones

Changes in v2:
- Add new patch to correct memory size in SPL

 drivers/ram/rockchip/sdram_rk3399.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/ram/rockchip/sdram_rk3399.c +4 -4
index ef9a1824b2b..bc79c034808 100644
@@ -3142,19 +3142,19 @@ static int rk3399_dmc_init(struct udevice *dev)
 
 static int rk3399_dmc_probe(struct udevice *dev)
 {
+	struct dram_info *priv = dev_get_priv(dev);
+
 #if defined(CONFIG_TPL_BUILD) || \
 	(!defined(CONFIG_TPL) && defined(CONFIG_SPL_BUILD))
 	if (rk3399_dmc_init(dev))
 		return 0;
-#else
-	struct dram_info *priv = dev_get_priv(dev);
-
+#endif
 	priv->pmugrf = syscon_get_first_range(ROCKCHIP_SYSCON_PMUGRF);
 	debug("%s: pmugrf = %p\n", __func__, priv->pmugrf);
 	priv->info.base = CFG_SYS_SDRAM_BASE;
 	priv->info.size =
 		rockchip_sdram_size((phys_addr_t)&priv->pmugrf->os_reg2);
-#endif
+
 	return 0;
 }
 
Signature · 1 line
2.34.1
#8 lore raw

PATCH v7 8/8 rockchip: Avoid #ifdefs in RK3399 SPL

In reply to Simon Glass

The code here is confusing due to large blocks which are #ifdefed out. Add a function phase_sdram_init() which returns whether SDRAM init should happen in the current phase, using that as needed to control the code flow.

This increases code size by about 500 bytes in SPL when the cache is on, since it must call the rather large rockchip_sdram_size() function.

- Drop the non-dcache optimisation, since the cache should normally be on

---

(no changes since v5)

Changes in v5:
- Move setting of pmugrf into the probe() function
- Drop patches previously applied

Changes in v4:
- Fix 'stating' typo
- Move Binman size feature to a separate series

Changes in v3:
- Split out the refactoring into a separate patch

Changes in v2:
- Drop patch "regulator: rk8xx: Fix incorrect parameter"
- Rewrite boneblack patch to onstead drop the target and update docs

 drivers/ram/rockchip/sdram_rk3399.c | 33 ++++++++++++++---------------
 1 file changed, 16 insertions(+), 17 deletions(-)
drivers/ram/rockchip/sdram_rk3399.c +16 -17
index bc79c034808..8a7cbb1849f 100644
@@ -13,6 +13,7 @@
 #include <log.h>
 #include <ram.h>
 #include <regmap.h>
+#include <spl.h>
 #include <syscon.h>
 #include <asm/arch-rockchip/clock.h>
 #include <asm/arch-rockchip/cru.h>
@@ -63,8 +64,6 @@ struct chan_info {
 };
 
 struct dram_info {
-#if defined(CONFIG_TPL_BUILD) || \
-	(!defined(CONFIG_TPL) && defined(CONFIG_SPL_BUILD))
 	u32 pwrup_srefresh_exit[2];
 	struct chan_info chan[2];
 	struct clk ddr_clk;
@@ -75,7 +74,6 @@ struct dram_info {
 	struct rk3399_pmusgrf_regs *pmusgrf;
 	struct rk3399_ddr_cic_regs *cic;
 	const struct sdram_rk3399_ops *ops;
-#endif
 	struct ram_info info;
 	struct rk3399_pmugrf_regs *pmugrf;
 };
@@ -92,9 +90,6 @@ struct sdram_rk3399_ops {
 					struct rk3399_sdram_params *params);
 };
 
-#if defined(CONFIG_TPL_BUILD) || \
-	(!defined(CONFIG_TPL) && defined(CONFIG_SPL_BUILD))
-
 struct rockchip_dmc_plat {
 #if CONFIG_IS_ENABLED(OF_PLATDATA)
 	struct dtd_rockchip_rk3399_dmc dtplat;
@@ -191,6 +186,17 @@ struct io_setting {
 	},
 };
 
+/**
+ * phase_sdram_init() - Check if this is the phase where SDRAM init happens
+ *
+ * Returns: true to do SDRAM init in this phase, false to not
+ */
+static bool phase_sdram_init(void)
+{
+	return spl_phase() == PHASE_TPL ||
+	    (!IS_ENABLED(CONFIG_TPL) && !spl_in_proper());
+}
+
 static struct io_setting *
 lpddr4_get_io_settings(const struct rk3399_sdram_params *params, u32 mr5)
 {
@@ -3024,7 +3030,7 @@ static int rk3399_dmc_of_to_plat(struct udevice *dev)
 	struct rockchip_dmc_plat *plat = dev_get_plat(dev);
 	int ret;
 
-	if (!CONFIG_IS_ENABLED(OF_REAL))
+	if (!CONFIG_IS_ENABLED(OF_REAL) || !phase_sdram_init())
 		return 0;
 
 	ret = dev_read_u32_array(dev, "rockchip,sdram-params",
@@ -3093,7 +3099,6 @@ static int rk3399_dmc_init(struct udevice *dev)
 	priv->cic = syscon_get_first_range(ROCKCHIP_SYSCON_CIC);
 	priv->grf = syscon_get_first_range(ROCKCHIP_SYSCON_GRF);
 	priv->pmu = syscon_get_first_range(ROCKCHIP_SYSCON_PMU);
-	priv->pmugrf = syscon_get_first_range(ROCKCHIP_SYSCON_PMUGRF);
 	priv->pmusgrf = syscon_get_first_range(ROCKCHIP_SYSCON_PMUSGRF);
 	priv->pmucru = rockchip_get_pmucru();
 	priv->cru = rockchip_get_cru();
@@ -3138,19 +3143,16 @@ static int rk3399_dmc_init(struct udevice *dev)
 
 	return 0;
 }
-#endif
 
 static int rk3399_dmc_probe(struct udevice *dev)
 {
 	struct dram_info *priv = dev_get_priv(dev);
 
-#if defined(CONFIG_TPL_BUILD) || \
-	(!defined(CONFIG_TPL) && defined(CONFIG_SPL_BUILD))
-	if (rk3399_dmc_init(dev))
-		return 0;
-#endif
 	priv->pmugrf = syscon_get_first_range(ROCKCHIP_SYSCON_PMUGRF);
 	debug("%s: pmugrf = %p\n", __func__, priv->pmugrf);
+	if (phase_sdram_init() && rk3399_dmc_init(dev))
+		return 0;
+
 	priv->info.base = CFG_SYS_SDRAM_BASE;
 	priv->info.size =
 		rockchip_sdram_size((phys_addr_t)&priv->pmugrf->os_reg2);
@@ -3181,10 +3183,7 @@ U_BOOT_DRIVER(dmc_rk3399) = {
 	.id = UCLASS_RAM,
 	.of_match = rk3399_dmc_ids,
 	.ops = &rk3399_dmc_ops,
-#if defined(CONFIG_TPL_BUILD) || \
-	(!defined(CONFIG_TPL) && defined(CONFIG_SPL_BUILD))
 	.of_to_plat = rk3399_dmc_of_to_plat,
-#endif
 	.probe = rk3399_dmc_probe,
 	.priv_auto	= sizeof(struct dram_info),
 #if defined(CONFIG_TPL_BUILD) || \
Signature · 1 line
2.34.1
#9 lore raw

Re: [PATCH v7 8/8] rockchip: Avoid #ifdefs in RK3399 SPL

Hi Simon,

Quoted 7 lines · Simon Glass

The code here is confusing due to large blocks which are #ifdefed out. Add a function phase_sdram_init() which returns whether SDRAM init should happen in the current phase, using that as needed to control the code flow.

This increases code size by about 500 bytes in SPL when the cache is on, since it must call the rather large rockchip_sdram_size() function.

I am guessing this size increase only is related to kevin/bob since all other RK3399 boards already use rockchip_sdram_size() in SPL.

Quoted 2 lines

- Drop the non-dcache optimisation, since the cache should normally be on

Is this referencing to something that is still done in this patch?

Quoted 66 lines

---

(no changes since v5)

Changes in v5:
- Move setting of pmugrf into the probe() function
- Drop patches previously applied

Changes in v4:
- Fix 'stating' typo
- Move Binman size feature to a separate series

Changes in v3:
- Split out the refactoring into a separate patch

Changes in v2:
- Drop patch "regulator: rk8xx: Fix incorrect parameter"
- Rewrite boneblack patch to onstead drop the target and update docs

 drivers/ram/rockchip/sdram_rk3399.c | 33 ++++++++++++++---------------
 1 file changed, 16 insertions(+), 17 deletions(-)
drivers/ram/rockchip/sdram_rk3399.c +1 -6
index bc79c034808..8a7cbb1849f 100644
@@ -13,6 +13,7 @@
 #include <log.h>
 #include <ram.h>
 #include <regmap.h>
+#include <spl.h>
 #include <syscon.h>
 #include <asm/arch-rockchip/clock.h>
 #include <asm/arch-rockchip/cru.h>
@@ -63,8 +64,6 @@ struct chan_info {
 };
 
 struct dram_info {
-#if defined(CONFIG_TPL_BUILD) || \
-	(!defined(CONFIG_TPL) && defined(CONFIG_SPL_BUILD))
 	u32 pwrup_srefresh_exit[2];
 	struct chan_info chan[2];
 	struct clk ddr_clk;
@@ -75,7 +74,6 @@ struct dram_info {
 	struct rk3399_pmusgrf_regs *pmusgrf;
 	struct rk3399_ddr_cic_regs *cic;
 	const struct sdram_rk3399_ops *ops;
-#endif
 	struct ram_info info;
 	struct rk3399_pmugrf_regs *pmugrf;
 };
@@ -92,9 +90,6 @@ struct sdram_rk3399_ops {
 					struct rk3399_sdram_params *params);
 };
 
-#if defined(CONFIG_TPL_BUILD) || \
-	(!defined(CONFIG_TPL) && defined(CONFIG_SPL_BUILD))
-
 struct rockchip_dmc_plat {
 #if CONFIG_IS_ENABLED(OF_PLATDATA)
 	struct dtd_rockchip_rk3399_dmc dtplat;
@@ -191,6 +186,17 @@ struct io_setting {
 	},
 };

drivers/ram/rockchip/sdram_rk3399.c struct io_setting { · line 197

Quoted 10 lines
drivers/ram/rockchip/sdram_rk3399.c +9 -0
 
+/**
+ * phase_sdram_init() - Check if this is the phase where SDRAM init happens
+ *
+ * Returns: true to do SDRAM init in this phase, false to not
+ */
+static bool phase_sdram_init(void)
+{
+	return spl_phase() == PHASE_TPL ||
+	    (!IS_ENABLED(CONFIG_TPL) && !spl_in_proper());

This is still wrong, please consider ROCKCHIP_EXTERNAL_TPL or this function fail to do what you document it to do.

See our prior thread about this:
https://lore.kernel.org/u-boot/CAFLszThg5xohR-9AgSMHVrW5Dp_tN39nC7rq1Z4ZMnqOQqJa1w@mail.gmail.com/

Regards,
Jonas

Quoted 56 lines
drivers/ram/rockchip/sdram_rk3399.c +6 -11
+}
+
 static struct io_setting *
 lpddr4_get_io_settings(const struct rk3399_sdram_params *params, u32 mr5)
 {
@@ -3024,7 +3030,7 @@ static int rk3399_dmc_of_to_plat(struct udevice *dev)
 	struct rockchip_dmc_plat *plat = dev_get_plat(dev);
 	int ret;
 
-	if (!CONFIG_IS_ENABLED(OF_REAL))
+	if (!CONFIG_IS_ENABLED(OF_REAL) || !phase_sdram_init())
 		return 0;
 
 	ret = dev_read_u32_array(dev, "rockchip,sdram-params",
@@ -3093,7 +3099,6 @@ static int rk3399_dmc_init(struct udevice *dev)
 	priv->cic = syscon_get_first_range(ROCKCHIP_SYSCON_CIC);
 	priv->grf = syscon_get_first_range(ROCKCHIP_SYSCON_GRF);
 	priv->pmu = syscon_get_first_range(ROCKCHIP_SYSCON_PMU);
-	priv->pmugrf = syscon_get_first_range(ROCKCHIP_SYSCON_PMUGRF);
 	priv->pmusgrf = syscon_get_first_range(ROCKCHIP_SYSCON_PMUSGRF);
 	priv->pmucru = rockchip_get_pmucru();
 	priv->cru = rockchip_get_cru();
@@ -3138,19 +3143,16 @@ static int rk3399_dmc_init(struct udevice *dev)
 
 	return 0;
 }
-#endif
 
 static int rk3399_dmc_probe(struct udevice *dev)
 {
 	struct dram_info *priv = dev_get_priv(dev);
 
-#if defined(CONFIG_TPL_BUILD) || \
-	(!defined(CONFIG_TPL) && defined(CONFIG_SPL_BUILD))
-	if (rk3399_dmc_init(dev))
-		return 0;
-#endif
 	priv->pmugrf = syscon_get_first_range(ROCKCHIP_SYSCON_PMUGRF);
 	debug("%s: pmugrf = %p\n", __func__, priv->pmugrf);
+	if (phase_sdram_init() && rk3399_dmc_init(dev))
+		return 0;
+
 	priv->info.base = CFG_SYS_SDRAM_BASE;
 	priv->info.size =
 		rockchip_sdram_size((phys_addr_t)&priv->pmugrf->os_reg2);
@@ -3181,10 +3183,7 @@ U_BOOT_DRIVER(dmc_rk3399) = {
 	.id = UCLASS_RAM,
 	.of_match = rk3399_dmc_ids,
 	.ops = &rk3399_dmc_ops,
-#if defined(CONFIG_TPL_BUILD) || \
-	(!defined(CONFIG_TPL) && defined(CONFIG_SPL_BUILD))
 	.of_to_plat = rk3399_dmc_of_to_plat,
-#endif
 	.probe = rk3399_dmc_probe,
 	.priv_auto	= sizeof(struct dram_info),
 #if defined(CONFIG_TPL_BUILD) || \
#10 lore raw

Re: [PATCH v7 8/8] rockchip: Avoid #ifdefs in RK3399 SPL

Hi Jonas,

Quoted 9 lines · Jonas Karlman

Hi Simon,

Quoted 5 lines · Simon Glass

The code here is confusing due to large blocks which are #ifdefed out. Add a function phase_sdram_init() which returns whether SDRAM init should happen in the current phase, using that as needed to control the code flow.

Quoted 5 lines
Quoted 2 lines

This increases code size by about 500 bytes in SPL when the cache is on, since it must call the rather large rockchip_sdram_size() function.

I am guessing this size increase only is related to kevin/bob since all other RK3399 boards already use rockchip_sdram_size() in SPL.

That's not what I am seeing:

buildman -b bugs8 rk3399 -sS
Summary of 9 commits for 29 boards (29 threads, 2 jobs per thread) 01: Merge patch series "led: implement software blinking"
aarch64: w+ roc-pc-mezzanine-rk3399 roc-pc-rk3399 chromebook_bob
chromebook_kevin pinebook-pro-rk3399 pinephone-pro-rk3399 rockpro64-rk3399 rock-4c-plus-rk3399 rock-4se-rk3399 rock-pi-4-rk3399 rock-pi-4c-rk3399 eaidk-610-rk3399 evb-rk3399 firefly-rk3399 khadas-edge-captain-rk3399 khadas-edge-rk3399 khadas-edge-v-rk3399 leez-rk3399 nanopc-t4-rk3399 nanopi-m4-2gb-rk3399 nanopi-m4-rk3399 nanopi-m4b-rk3399 nanopi-neo4-rk3399 nanopi-r4s-rk3399 orangepi-rk3399 rock-pi-n10-rk3399pro puma-rk3399 ficus-rk3399 rock960-rk3399 02: mkeficapsule: Add a --version argument
03: binman: Collect the version number for mkeficapsule
04: binman: Deal with mkeficapsule being missing
05: binman: Return failure when a usage() message is generated 06: binman: Keep the efi_capsule input file
07: fdt: Correct condition for bloblist existing
08: rockchip: Ensure memory size is available in RK3399 SPL
aarch64: (for 29/29 boards) spl/u-boot-spl:all +33.1
spl/u-boot-spl:text +33.1 tpl/u-boot-tpl:all +446.9 tpl/u-boot-tpl:text +446.9
09: rockchip: Avoid #ifdefs in RK3399 SPL
aarch64: (for 29/29 boards) all +69.2 bss +5.2 spl/u-boot-spl:all
+24.0 spl/u-boot-spl:text +24.0 text +64.0 tpl/u-boot-tpl:all +21.5 tpl/u-boot-tpl:text +21.5
✔ ~/u [bugs8 ↓·18↑·8|…2⚑ 1001]
15:48 $ buildman -b bugs8 rk3399 -sSB
Summary of 9 commits for 29 boards (29 threads, 2 jobs per thread) 01: Merge patch series "led: implement software blinking"
aarch64: w+ roc-pc-mezzanine-rk3399 roc-pc-rk3399 chromebook_bob
chromebook_kevin pinebook-pro-rk3399 pinephone-pro-rk3399 rockpro64-rk3399 rock-4c-plus-rk3399 rock-4se-rk3399 rock-pi-4-rk3399 rock-pi-4c-rk3399 eaidk-610-rk3399 evb-rk3399 firefly-rk3399 khadas-edge-captain-rk3399 khadas-edge-rk3399 khadas-edge-v-rk3399 leez-rk3399 nanopc-t4-rk3399 nanopi-m4-2gb-rk3399 nanopi-m4-rk3399 nanopi-m4b-rk3399 nanopi-neo4-rk3399 nanopi-r4s-rk3399 orangepi-rk3399 rock-pi-n10-rk3399pro puma-rk3399 ficus-rk3399 rock960-rk3399 02: mkeficapsule: Add a --version argument
03: binman: Collect the version number for mkeficapsule
04: binman: Deal with mkeficapsule being missing
05: binman: Return failure when a usage() message is generated 06: binman: Keep the efi_capsule input file
07: fdt: Correct condition for bloblist existing
08: rockchip: Ensure memory size is available in RK3399 SPL
aarch64: (for 29/29 boards) spl/u-boot-spl:all +33.1
spl/u-boot-spl:text +33.1 tpl/u-boot-tpl:all +446.9 tpl/u-boot-tpl:text +446.9

            roc-pc-mezzanine-rk3399: tpl/u-boot-tpl:all +480
tpl/u-boot-tpl:text +480
               tpl-u-boot-tpl: add: 1/0, grow: 1/0 bytes: 480/0 (480)
                 function                                   old     new   delta
                 rockchip_sdram_size                          -     432    +432
                 rk3399_dmc_probe                          4120    4168     +48
            roc-pc-rk3399  : tpl/u-boot-tpl:all +480 tpl/u-boot-tpl:text +480
               tpl-u-boot-tpl: add: 1/0, grow: 1/0 bytes: 480/0 (480)
                 function                                   old     new   delta
                 rockchip_sdram_size                          -     432    +432
                 rk3399_dmc_probe                          4120    4168     +48
            chromebook_bob : spl/u-boot-spl:all +480 spl/u-boot-spl:text +480
               spl-u-boot-spl: add: 1/0, grow: 1/0 bytes: 480/0 (480)
                 function                                   old     new   delta
                 rockchip_sdram_size                          -     432    +432
                 rk3399_dmc_probe                          4304    4352     +48
            chromebook_kevin: spl/u-boot-spl:all +480 spl/u-boot-spl:text +480
               spl-u-boot-spl: add: 1/0, grow: 1/0 bytes: 480/0 (480)
                 function                                   old     new   delta
                 rockchip_sdram_size                          -     432    +432
                 rk3399_dmc_probe                          4304    4352     +48
            pinebook-pro-rk3399: tpl/u-boot-tpl:all +480
tpl/u-boot-tpl:text +480
               tpl-u-boot-tpl: add: 1/0, grow: 1/0 bytes: 480/0 (480)
                 function                                   old     new   delta
                 rockchip_sdram_size                          -     432    +432
                 rk3399_dmc_probe                          4164    4212     +48
            pinephone-pro-rk3399: tpl/u-boot-tpl:all +480
tpl/u-boot-tpl:text +480
               tpl-u-boot-tpl: add: 1/0, grow: 1/0 bytes: 480/0 (480)
                 function                                   old     new   delta
                 rockchip_sdram_size                          -     432    +432
                 rk3399_dmc_probe                          4164    4212     +48
            rockpro64-rk3399: tpl/u-boot-tpl:all +480 tpl/u-boot-tpl:text +480
               tpl-u-boot-tpl: add: 1/0, grow: 1/0 bytes: 480/0 (480)
                 function                                   old     new   delta
                 rockchip_sdram_size                          -     432    +432
                 rk3399_dmc_probe                          4164    4212     +48
            rock-4c-plus-rk3399: tpl/u-boot-tpl:all +480
tpl/u-boot-tpl:text +480
               tpl-u-boot-tpl: add: 1/0, grow: 1/0 bytes: 480/0 (480)
                 function                                   old     new   delta
                 rockchip_sdram_size                          -     432    +432
                 rk3399_dmc_probe                          4164    4212     +48
            rock-4se-rk3399: tpl/u-boot-tpl:all +480 tpl/u-boot-tpl:text +480
               tpl-u-boot-tpl: add: 1/0, grow: 1/0 bytes: 480/0 (480)
                 function                                   old     new   delta
                 rockchip_sdram_size                          -     432    +432
                 rk3399_dmc_probe                          4164    4212     +48
            rock-pi-4-rk3399: tpl/u-boot-tpl:all +480 tpl/u-boot-tpl:text +480
               tpl-u-boot-tpl: add: 1/0, grow: 1/0 bytes: 480/0 (480)
                 function                                   old     new   delta
                 rockchip_sdram_size                          -     432    +432
                 rk3399_dmc_probe                          4164    4212     +48
            rock-pi-4c-rk3399: tpl/u-boot-tpl:all +480 tpl/u-boot-tpl:text +480
               tpl-u-boot-tpl: add: 1/0, grow: 1/0 bytes: 480/0 (480)
                 function                                   old     new   delta
                 rockchip_sdram_size                          -     432    +432
                 rk3399_dmc_probe                          4164    4212     +48
            eaidk-610-rk3399: tpl/u-boot-tpl:all +480 tpl/u-boot-tpl:text +480
               tpl-u-boot-tpl: add: 1/0, grow: 1/0 bytes: 480/0 (480)
                 function                                   old     new   delta
                 rockchip_sdram_size                          -     432    +432
                 rk3399_dmc_probe                          4304    4352     +48
            evb-rk3399     : tpl/u-boot-tpl:all +480 tpl/u-boot-tpl:text +480
               tpl-u-boot-tpl: add: 1/0, grow: 1/0 bytes: 480/0 (480)
                 function                                   old     new   delta
                 rockchip_sdram_size                          -     432    +432
                 rk3399_dmc_probe                          4304    4352     +48
            firefly-rk3399 : tpl/u-boot-tpl:all +480 tpl/u-boot-tpl:text +480
               tpl-u-boot-tpl: add: 1/0, grow: 1/0 bytes: 480/0 (480)
                 function                                   old     new   delta
                 rockchip_sdram_size                          -     432    +432
                 rk3399_dmc_probe                          4304    4352     +48
            khadas-edge-captain-rk3399: tpl/u-boot-tpl:all +480
tpl/u-boot-tpl:text +480
               tpl-u-boot-tpl: add: 1/0, grow: 1/0 bytes: 480/0 (480)
                 function                                   old     new   delta
                 rockchip_sdram_size                          -     432    +432
                 rk3399_dmc_probe                          4164    4212     +48
            khadas-edge-rk3399: tpl/u-boot-tpl:all +480 tpl/u-boot-tpl:text +480
               tpl-u-boot-tpl: add: 1/0, grow: 1/0 bytes: 480/0 (480)
                 function                                   old     new   delta
                 rockchip_sdram_size                          -     432    +432
                 rk3399_dmc_probe                          4164    4212     +48
            khadas-edge-v-rk3399: tpl/u-boot-tpl:all +480
tpl/u-boot-tpl:text +480
               tpl-u-boot-tpl: add: 1/0, grow: 1/0 bytes: 480/0 (480)
                 function                                   old     new   delta
                 rockchip_sdram_size                          -     432    +432
                 rk3399_dmc_probe                          4164    4212     +48
            leez-rk3399    : tpl/u-boot-tpl:all +480 tpl/u-boot-tpl:text +480
               tpl-u-boot-tpl: add: 1/0, grow: 1/0 bytes: 480/0 (480)
                 function                                   old     new   delta
                 rockchip_sdram_size                          -     432    +432
                 rk3399_dmc_probe                          4164    4212     +48
            nanopc-t4-rk3399: tpl/u-boot-tpl:all +480 tpl/u-boot-tpl:text +480
               tpl-u-boot-tpl: add: 1/0, grow: 1/0 bytes: 480/0 (480)
                 function                                   old     new   delta
                 rockchip_sdram_size                          -     432    +432
                 rk3399_dmc_probe                          4304    4352     +48
            nanopi-m4-2gb-rk3399: tpl/u-boot-tpl:all +480
tpl/u-boot-tpl:text +480
               tpl-u-boot-tpl: add: 1/0, grow: 1/0 bytes: 480/0 (480)
                 function                                   old     new   delta
                 rockchip_sdram_size                          -     432    +432
                 rk3399_dmc_probe                          4304    4352     +48
            nanopi-m4-rk3399: tpl/u-boot-tpl:all +480 tpl/u-boot-tpl:text +480
               tpl-u-boot-tpl: add: 1/0, grow: 1/0 bytes: 480/0 (480)
                 function                                   old     new   delta
                 rockchip_sdram_size                          -     432    +432
                 rk3399_dmc_probe                          4304    4352     +48
            nanopi-m4b-rk3399: tpl/u-boot-tpl:all +480 tpl/u-boot-tpl:text +480
               tpl-u-boot-tpl: add: 1/0, grow: 1/0 bytes: 480/0 (480)
                 function                                   old     new   delta
                 rockchip_sdram_size                          -     432    +432
                 rk3399_dmc_probe                          4304    4352     +48
            nanopi-neo4-rk3399: tpl/u-boot-tpl:all +480 tpl/u-boot-tpl:text +480
               tpl-u-boot-tpl: add: 1/0, grow: 1/0 bytes: 480/0 (480)
                 function                                   old     new   delta
                 rockchip_sdram_size                          -     432    +432
                 rk3399_dmc_probe                          4304    4352     +48
            nanopi-r4s-rk3399: tpl/u-boot-tpl:all +480 tpl/u-boot-tpl:text +480
               tpl-u-boot-tpl: add: 1/0, grow: 1/0 bytes: 480/0 (480)
                 function                                   old     new   delta
                 rockchip_sdram_size                          -     432    +432
                 rk3399_dmc_probe                          4164    4212     +48
            orangepi-rk3399: tpl/u-boot-tpl:all +480 tpl/u-boot-tpl:text +480
               tpl-u-boot-tpl: add: 1/0, grow: 1/0 bytes: 480/0 (480)
                 function                                   old     new   delta
                 rockchip_sdram_size                          -     432    +432
                 rk3399_dmc_probe                          4304    4352     +48
            rock-pi-n10-rk3399pro: tpl/u-boot-tpl:all +480
tpl/u-boot-tpl:text +480
               tpl-u-boot-tpl: add: 1/0, grow: 1/0 bytes: 480/0 (480)
                 function                                   old     new   delta
                 rockchip_sdram_size                          -     432    +432
                 rk3399_dmc_probe                          4248    4296     +48
            puma-rk3399    : tpl/u-boot-tpl:all +480 tpl/u-boot-tpl:text +480
               tpl-u-boot-tpl: add: 1/0, grow: 1/0 bytes: 480/0 (480)
                 function                                   old     new   delta
                 rockchip_sdram_size                          -     432    +432
                 rk3399_dmc_probe                          4304    4352     +48
            ficus-rk3399   : tpl/u-boot-tpl:all +480 tpl/u-boot-tpl:text +480
               tpl-u-boot-tpl: add: 1/0, grow: 1/0 bytes: 480/0 (480)
                 function                                   old     new   delta
                 rockchip_sdram_size                          -     432    +432
                 rk3399_dmc_probe                          4304    4352     +48
            rock960-rk3399 : tpl/u-boot-tpl:all +480 tpl/u-boot-tpl:text +480
               tpl-u-boot-tpl: add: 1/0, grow: 1/0 bytes: 480/0 (480)
                 function                                   old     new   delta
                 rockchip_sdram_size                          -     432    +432
                 rk3399_dmc_probe                          4304    4352     +48

09: rockchip: Avoid #ifdefs in RK3399 SPL
aarch64: (for 29/29 boards) all +69.2 bss +5.2 spl/u-boot-spl:all
+24.0 spl/u-boot-spl:text +24.0 text +64.0 tpl/u-boot-tpl:all +21.5 tpl/u-boot-tpl:text +21.5

            rock-4c-plus-rk3399: all +120 bss +56 spl/u-boot-spl:all

+24 spl/u-boot-spl:text +24 text +64 tpl/u-boot-tpl:all +24 tpl/u-boot-tpl:text +24
tpl-u-boot-tpl: add: 0/0, grow: 1/0 bytes: 24/0 (24)
function old new delta
rk3399_dmc_probe 4212 4236 +24
u-boot: add: 1/0, grow: 1/0 bytes: 40/0 (40)
function old new delta
rk3399_dmc_of_to_plat - 32 +32
rk3399_dmc_probe 64 72 +8
spl-u-boot-spl: add: 1/0, grow: 0/0 bytes: 24/0 (24)
function old new delta
rk3399_dmc_of_to_plat - 24 +24
nanopc-t4-rk3399: all +120 bss +56 spl/u-boot-spl:all +24
spl/u-boot-spl:text +24 text +64 tpl/u-boot-tpl:all +24 tpl/u-boot-tpl:text +24
tpl-u-boot-tpl: add: 0/0, grow: 1/0 bytes: 24/0 (24)
function old new delta
rk3399_dmc_probe 4352 4376 +24
u-boot: add: 1/0, grow: 1/0 bytes: 40/0 (40)
function old new delta
rk3399_dmc_of_to_plat - 32 +32
rk3399_dmc_probe 64 72 +8
spl-u-boot-spl: add: 1/0, grow: 0/0 bytes: 24/0 (24)
function old new delta
rk3399_dmc_of_to_plat - 24 +24
nanopi-r4s-rk3399: all +120 bss +56 spl/u-boot-spl:all +24
spl/u-boot-spl:text +24 text +64 tpl/u-boot-tpl:all +24 tpl/u-boot-tpl:text +24
tpl-u-boot-tpl: add: 0/0, grow: 1/0 bytes: 24/0 (24)
function old new delta
rk3399_dmc_probe 4212 4236 +24
u-boot: add: 1/0, grow: 1/0 bytes: 40/0 (40)
function old new delta
rk3399_dmc_of_to_plat - 32 +32
rk3399_dmc_probe 64 72 +8
spl-u-boot-spl: add: 1/0, grow: 0/0 bytes: 24/0 (24)
function old new delta
rk3399_dmc_of_to_plat - 24 +24
rockpro64-rk3399: all +72 bss +8 spl/u-boot-spl:all +24
spl/u-boot-spl:text +24 text +64 tpl/u-boot-tpl:all +24 tpl/u-boot-tpl:text +24
tpl-u-boot-tpl: add: 0/0, grow: 1/0 bytes: 24/0 (24)
function old new delta
rk3399_dmc_probe 4212 4236 +24
u-boot: add: 1/0, grow: 1/0 bytes: 40/0 (40)
function old new delta
rk3399_dmc_of_to_plat - 32 +32
rk3399_dmc_probe 64 72 +8
spl-u-boot-spl: add: 1/0, grow: 0/0 bytes: 24/0 (24)
function old new delta
rk3399_dmc_of_to_plat - 24 +24
nanopi-m4-2gb-rk3399: all +72 bss +8 spl/u-boot-spl:all
+24 spl/u-boot-spl:text +24 text +64 tpl/u-boot-tpl:all +24 tpl/u-boot-tpl:text +24
tpl-u-boot-tpl: add: 0/0, grow: 1/0 bytes: 24/0 (24)
function old new delta
rk3399_dmc_probe 4352 4376 +24
u-boot: add: 1/0, grow: 1/0 bytes: 40/0 (40)
function old new delta
rk3399_dmc_of_to_plat - 32 +32
rk3399_dmc_probe 64 72 +8
spl-u-boot-spl: add: 1/0, grow: 0/0 bytes: 24/0 (24)
function old new delta
rk3399_dmc_of_to_plat - 24 +24
nanopi-m4-rk3399: all +72 bss +8 spl/u-boot-spl:all +24
spl/u-boot-spl:text +24 text +64 tpl/u-boot-tpl:all +24 tpl/u-boot-tpl:text +24
tpl-u-boot-tpl: add: 0/0, grow: 1/0 bytes: 24/0 (24)
function old new delta
rk3399_dmc_probe 4352 4376 +24
u-boot: add: 1/0, grow: 1/0 bytes: 40/0 (40)
function old new delta
rk3399_dmc_of_to_plat - 32 +32
rk3399_dmc_probe 64 72 +8
spl-u-boot-spl: add: 1/0, grow: 0/0 bytes: 24/0 (24)
function old new delta
rk3399_dmc_of_to_plat - 24 +24
nanopi-m4b-rk3399: all +72 bss +8 spl/u-boot-spl:all +24
spl/u-boot-spl:text +24 text +64 tpl/u-boot-tpl:all +24 tpl/u-boot-tpl:text +24
tpl-u-boot-tpl: add: 0/0, grow: 1/0 bytes: 24/0 (24)
function old new delta
rk3399_dmc_probe 4352 4376 +24
u-boot: add: 1/0, grow: 1/0 bytes: 40/0 (40)
function old new delta
rk3399_dmc_of_to_plat - 32 +32
rk3399_dmc_probe 64 72 +8
spl-u-boot-spl: add: 1/0, grow: 0/0 bytes: 24/0 (24)
function old new delta
rk3399_dmc_of_to_plat - 24 +24
puma-rk3399 : all +72 bss +8 spl/u-boot-spl:all +24
spl/u-boot-spl:text +24 text +64 tpl/u-boot-tpl:all +24 tpl/u-boot-tpl:text +24
tpl-u-boot-tpl: add: 0/0, grow: 1/0 bytes: 24/0 (24)
function old new delta
rk3399_dmc_probe 4352 4376 +24
u-boot: add: 1/0, grow: 1/0 bytes: 40/0 (40)
function old new delta
rk3399_dmc_of_to_plat - 32 +32
rk3399_dmc_probe 64 72 +8
spl-u-boot-spl: add: 1/0, grow: 0/0 bytes: 24/0 (24)
function old new delta
rk3399_dmc_of_to_plat - 24 +24
eaidk-610-rk3399: all +64 spl/u-boot-spl:all +24
spl/u-boot-spl:text +24 text +64 tpl/u-boot-tpl:all +24 tpl/u-boot-tpl:text +24
tpl-u-boot-tpl: add: 0/0, grow: 1/0 bytes: 24/0 (24)
function old new delta
rk3399_dmc_probe 4352 4376 +24
u-boot: add: 1/0, grow: 1/0 bytes: 40/0 (40)
function old new delta
rk3399_dmc_of_to_plat - 32 +32
rk3399_dmc_probe 64 72 +8
spl-u-boot-spl: add: 1/0, grow: 0/0 bytes: 24/0 (24)
function old new delta
rk3399_dmc_of_to_plat - 24 +24
firefly-rk3399 : all +64 spl/u-boot-spl:all +24
spl/u-boot-spl:text +24 text +64 tpl/u-boot-tpl:all +24 tpl/u-boot-tpl:text +24
tpl-u-boot-tpl: add: 0/0, grow: 1/0 bytes: 24/0 (24)
function old new delta
rk3399_dmc_probe 4352 4376 +24
u-boot: add: 1/0, grow: 1/0 bytes: 40/0 (40)
function old new delta
rk3399_dmc_of_to_plat - 32 +32
rk3399_dmc_probe 64 72 +8
spl-u-boot-spl: add: 1/0, grow: 0/0 bytes: 24/0 (24)
function old new delta
rk3399_dmc_of_to_plat - 24 +24
khadas-edge-captain-rk3399: all +64 spl/u-boot-spl:all +24
spl/u-boot-spl:text +24 text +64 tpl/u-boot-tpl:all +24 tpl/u-boot-tpl:text +24
tpl-u-boot-tpl: add: 0/0, grow: 1/0 bytes: 24/0 (24)
function old new delta
rk3399_dmc_probe 4212 4236 +24
u-boot: add: 1/0, grow: 1/0 bytes: 40/0 (40)
function old new delta
rk3399_dmc_of_to_plat - 32 +32
rk3399_dmc_probe 64 72 +8
spl-u-boot-spl: add: 1/0, grow: 0/0 bytes: 24/0 (24)
function old new delta
rk3399_dmc_of_to_plat - 24 +24
khadas-edge-rk3399: all +64 spl/u-boot-spl:all +24
spl/u-boot-spl:text +24 text +64 tpl/u-boot-tpl:all +24 tpl/u-boot-tpl:text +24
tpl-u-boot-tpl: add: 0/0, grow: 1/0 bytes: 24/0 (24)
function old new delta
rk3399_dmc_probe 4212 4236 +24
u-boot: add: 1/0, grow: 1/0 bytes: 40/0 (40)
function old new delta
rk3399_dmc_of_to_plat - 32 +32
rk3399_dmc_probe 64 72 +8
spl-u-boot-spl: add: 1/0, grow: 0/0 bytes: 24/0 (24)
function old new delta
rk3399_dmc_of_to_plat - 24 +24
khadas-edge-v-rk3399: all +64 spl/u-boot-spl:all +24
spl/u-boot-spl:text +24 text +64 tpl/u-boot-tpl:all +24 tpl/u-boot-tpl:text +24
tpl-u-boot-tpl: add: 0/0, grow: 1/0 bytes: 24/0 (24)
function old new delta
rk3399_dmc_probe 4212 4236 +24
u-boot: add: 1/0, grow: 1/0 bytes: 40/0 (40)
function old new delta
rk3399_dmc_of_to_plat - 32 +32
rk3399_dmc_probe 64 72 +8
spl-u-boot-spl: add: 1/0, grow: 0/0 bytes: 24/0 (24)
function old new delta
rk3399_dmc_of_to_plat - 24 +24
leez-rk3399 : all +64 spl/u-boot-spl:all +24
spl/u-boot-spl:text +24 text +64 tpl/u-boot-tpl:all +24 tpl/u-boot-tpl:text +24
tpl-u-boot-tpl: add: 0/0, grow: 1/0 bytes: 24/0 (24)
function old new delta
rk3399_dmc_probe 4212 4236 +24
u-boot: add: 1/0, grow: 1/0 bytes: 40/0 (40)
function old new delta
rk3399_dmc_of_to_plat - 32 +32
rk3399_dmc_probe 64 72 +8
spl-u-boot-spl: add: 1/0, grow: 0/0 bytes: 24/0 (24)
function old new delta
rk3399_dmc_of_to_plat - 24 +24
orangepi-rk3399: all +64 spl/u-boot-spl:all +24
spl/u-boot-spl:text +24 text +64 tpl/u-boot-tpl:all +24 tpl/u-boot-tpl:text +24
tpl-u-boot-tpl: add: 0/0, grow: 1/0 bytes: 24/0 (24)
function old new delta
rk3399_dmc_probe 4352 4376 +24
u-boot: add: 1/0, grow: 1/0 bytes: 40/0 (40)
function old new delta
rk3399_dmc_of_to_plat - 32 +32
rk3399_dmc_probe 64 72 +8
spl-u-boot-spl: add: 1/0, grow: 0/0 bytes: 24/0 (24)
function old new delta
rk3399_dmc_of_to_plat - 24 +24
rock-pi-n10-rk3399pro: all +72 bss +8 spl/u-boot-spl:all
+24 spl/u-boot-spl:text +24 text +64 tpl/u-boot-tpl:all +16 tpl/u-boot-tpl:text +16
tpl-u-boot-tpl: add: 0/0, grow: 1/0 bytes: 16/0 (16)
function old new delta
rk3399_dmc_probe 4296 4312 +16
u-boot: add: 1/0, grow: 1/0 bytes: 40/0 (40)
function old new delta
rk3399_dmc_of_to_plat - 32 +32
rk3399_dmc_probe 64 72 +8
spl-u-boot-spl: add: 1/0, grow: 0/0 bytes: 24/0 (24)
function old new delta
rk3399_dmc_of_to_plat - 24 +24
ficus-rk3399 : all +64 spl/u-boot-spl:all +24
spl/u-boot-spl:text +24 text +64 tpl/u-boot-tpl:all +24 tpl/u-boot-tpl:text +24
tpl-u-boot-tpl: add: 0/0, grow: 1/0 bytes: 24/0 (24)
function old new delta
rk3399_dmc_probe 4352 4376 +24
u-boot: add: 1/0, grow: 1/0 bytes: 40/0 (40)
function old new delta
rk3399_dmc_of_to_plat - 32 +32
rk3399_dmc_probe 64 72 +8
spl-u-boot-spl: add: 1/0, grow: 0/0 bytes: 24/0 (24)
function old new delta
rk3399_dmc_of_to_plat - 24 +24
pinebook-pro-rk3399: all +56 bss -8 spl/u-boot-spl:all +24
spl/u-boot-spl:text +24 text +64 tpl/u-boot-tpl:all +24 tpl/u-boot-tpl:text +24
tpl-u-boot-tpl: add: 0/0, grow: 1/0 bytes: 24/0 (24)
function old new delta
rk3399_dmc_probe 4212 4236 +24
u-boot: add: 1/0, grow: 1/0 bytes: 40/0 (40)
function old new delta
rk3399_dmc_of_to_plat - 32 +32
rk3399_dmc_probe 64 72 +8
spl-u-boot-spl: add: 1/0, grow: 0/0 bytes: 24/0 (24)
function old new delta
rk3399_dmc_of_to_plat - 24 +24
pinephone-pro-rk3399: all +56 bss -8 spl/u-boot-spl:all
+24 spl/u-boot-spl:text +24 text +64 tpl/u-boot-tpl:all +24 tpl/u-boot-tpl:text +24
tpl-u-boot-tpl: add: 0/0, grow: 1/0 bytes: 24/0 (24)
function old new delta
rk3399_dmc_probe 4212 4236 +24
u-boot: add: 1/0, grow: 1/0 bytes: 40/0 (40)
function old new delta
rk3399_dmc_of_to_plat - 32 +32
rk3399_dmc_probe 64 72 +8
spl-u-boot-spl: add: 1/0, grow: 0/0 bytes: 24/0 (24)
function old new delta
rk3399_dmc_of_to_plat - 24 +24
rock-4se-rk3399: all +56 bss -8 spl/u-boot-spl:all +24
spl/u-boot-spl:text +24 text +64 tpl/u-boot-tpl:all +24 tpl/u-boot-tpl:text +24
tpl-u-boot-tpl: add: 0/0, grow: 1/0 bytes: 24/0 (24)
function old new delta
rk3399_dmc_probe 4212 4236 +24
u-boot: add: 1/0, grow: 1/0 bytes: 40/0 (40)
function old new delta
rk3399_dmc_of_to_plat - 32 +32
rk3399_dmc_probe 64 72 +8
spl-u-boot-spl: add: 1/0, grow: 0/0 bytes: 24/0 (24)
function old new delta
rk3399_dmc_of_to_plat - 24 +24
rock-pi-4-rk3399: all +56 bss -8 spl/u-boot-spl:all +24
spl/u-boot-spl:text +24 text +64 tpl/u-boot-tpl:all +24 tpl/u-boot-tpl:text +24
tpl-u-boot-tpl: add: 0/0, grow: 1/0 bytes: 24/0 (24)
function old new delta
rk3399_dmc_probe 4212 4236 +24
u-boot: add: 1/0, grow: 1/0 bytes: 40/0 (40)
function old new delta
rk3399_dmc_of_to_plat - 32 +32
rk3399_dmc_probe 64 72 +8
spl-u-boot-spl: add: 1/0, grow: 0/0 bytes: 24/0 (24)
function old new delta
rk3399_dmc_of_to_plat - 24 +24
rock-pi-4c-rk3399: all +56 bss -8 spl/u-boot-spl:all +24
spl/u-boot-spl:text +24 text +64 tpl/u-boot-tpl:all +24 tpl/u-boot-tpl:text +24
tpl-u-boot-tpl: add: 0/0, grow: 1/0 bytes: 24/0 (24)
function old new delta
rk3399_dmc_probe 4212 4236 +24
u-boot: add: 1/0, grow: 1/0 bytes: 40/0 (40)
function old new delta
rk3399_dmc_of_to_plat - 32 +32
rk3399_dmc_probe 64 72 +8
spl-u-boot-spl: add: 1/0, grow: 0/0 bytes: 24/0 (24)
function old new delta
rk3399_dmc_of_to_plat - 24 +24
evb-rk3399 : all +56 bss -8 spl/u-boot-spl:all +24
spl/u-boot-spl:text +24 text +64 tpl/u-boot-tpl:all +24 tpl/u-boot-tpl:text +24
tpl-u-boot-tpl: add: 0/0, grow: 1/0 bytes: 24/0 (24)
function old new delta
rk3399_dmc_probe 4352 4376 +24
u-boot: add: 1/0, grow: 1/0 bytes: 40/0 (40)
function old new delta
rk3399_dmc_of_to_plat - 32 +32
rk3399_dmc_probe 64 72 +8
spl-u-boot-spl: add: 1/0, grow: 0/0 bytes: 24/0 (24)
function old new delta
rk3399_dmc_of_to_plat - 24 +24
nanopi-neo4-rk3399: all +56 bss -8 spl/u-boot-spl:all +24
spl/u-boot-spl:text +24 text +64 tpl/u-boot-tpl:all +24 tpl/u-boot-tpl:text +24
tpl-u-boot-tpl: add: 0/0, grow: 1/0 bytes: 24/0 (24)
function old new delta
rk3399_dmc_probe 4352 4376 +24
u-boot: add: 1/0, grow: 1/0 bytes: 40/0 (40)
function old new delta
rk3399_dmc_of_to_plat - 32 +32
rk3399_dmc_probe 64 72 +8
spl-u-boot-spl: add: 1/0, grow: 0/0 bytes: 24/0 (24)
function old new delta
rk3399_dmc_of_to_plat - 24 +24
rock960-rk3399 : all +56 bss -8 spl/u-boot-spl:all +24
spl/u-boot-spl:text +24 text +64 tpl/u-boot-tpl:all +24 tpl/u-boot-tpl:text +24
tpl-u-boot-tpl: add: 0/0, grow: 1/0 bytes: 24/0 (24)
function old new delta
rk3399_dmc_probe 4352 4376 +24
u-boot: add: 1/0, grow: 1/0 bytes: 40/0 (40)
function old new delta
rk3399_dmc_of_to_plat - 32 +32
rk3399_dmc_probe 64 72 +8
spl-u-boot-spl: add: 1/0, grow: 0/0 bytes: 24/0 (24)
function old new delta
rk3399_dmc_of_to_plat - 24 +24
roc-pc-mezzanine-rk3399: all +56 bss -8 spl/u-boot-spl:all
+24 spl/u-boot-spl:text +24 text +64 tpl/u-boot-tpl:all +16 tpl/u-boot-tpl:text +16
tpl-u-boot-tpl: add: 0/0, grow: 1/0 bytes: 16/0 (16)
function old new delta
rk3399_dmc_probe 4168 4184 +16
u-boot: add: 1/0, grow: 1/0 bytes: 40/0 (40)
function old new delta
rk3399_dmc_of_to_plat - 32 +32
rk3399_dmc_probe 64 72 +8
spl-u-boot-spl: add: 1/0, grow: 0/0 bytes: 24/0 (24)
function old new delta
rk3399_dmc_of_to_plat - 24 +24
roc-pc-rk3399 : all +56 bss -8 spl/u-boot-spl:all +24
spl/u-boot-spl:text +24 text +64 tpl/u-boot-tpl:all +16 tpl/u-boot-tpl:text +16
tpl-u-boot-tpl: add: 0/0, grow: 1/0 bytes: 16/0 (16)
function old new delta
rk3399_dmc_probe 4168 4184 +16
u-boot: add: 1/0, grow: 1/0 bytes: 40/0 (40)
function old new delta
rk3399_dmc_of_to_plat - 32 +32
rk3399_dmc_probe 64 72 +8
spl-u-boot-spl: add: 1/0, grow: 0/0 bytes: 24/0 (24)
function old new delta
rk3399_dmc_of_to_plat - 24 +24
chromebook_bob : all +72 bss +8 spl/u-boot-spl:all +24
spl/u-boot-spl:text +24 text +64
u-boot: add: 1/0, grow: 1/0 bytes: 40/0 (40)
function old new delta
rk3399_dmc_of_to_plat - 32 +32
rk3399_dmc_probe 64 72 +8
spl-u-boot-spl: add: 0/0, grow: 1/0 bytes: 24/0 (24)
function old new delta
rk3399_dmc_probe 4352 4376 +24
chromebook_kevin: all +72 bss +8 spl/u-boot-spl:all +24
spl/u-boot-spl:text +24 text +64
u-boot: add: 1/0, grow: 1/0 bytes: 40/0 (40)
function old new delta
rk3399_dmc_of_to_plat - 32 +32
rk3399_dmc_probe 64 72 +8
spl-u-boot-spl: add: 0/0, grow: 1/0 bytes: 24/0 (24)
function old new delta
rk3399_dmc_probe 4352 4376 +24

Quoted 5 lines
Quoted 3 lines

- Drop the non-dcache optimisation, since the cache should normally be on

Is this referencing to something that is still done in this patch?

No, it is attached to v5, but I had a blank line in the way. Will fix.

Quoted 81 lines
Quoted 67 lines

---

(no changes since v5)

Changes in v5:
- Move setting of pmugrf into the probe() function
- Drop patches previously applied

Changes in v4:
- Fix 'stating' typo
- Move Binman size feature to a separate series

Changes in v3:
- Split out the refactoring into a separate patch

Changes in v2:
- Drop patch "regulator: rk8xx: Fix incorrect parameter"
- Rewrite boneblack patch to onstead drop the target and update docs

 drivers/ram/rockchip/sdram_rk3399.c | 33 ++++++++++++++---------------
 1 file changed, 16 insertions(+), 17 deletions(-)
drivers/ram/rockchip/sdram_rk3399.c +1 -6
index bc79c034808..8a7cbb1849f 100644
@@ -13,6 +13,7 @@
 #include <log.h>
 #include <ram.h>
 #include <regmap.h>
+#include <spl.h>
 #include <syscon.h>
 #include <asm/arch-rockchip/clock.h>
 #include <asm/arch-rockchip/cru.h>
@@ -63,8 +64,6 @@ struct chan_info {
 };
 
 struct dram_info {
-#if defined(CONFIG_TPL_BUILD) || \
-     (!defined(CONFIG_TPL) && defined(CONFIG_SPL_BUILD))
      u32 pwrup_srefresh_exit[2];
      struct chan_info chan[2];
      struct clk ddr_clk;
@@ -75,7 +74,6 @@ struct dram_info {
      struct rk3399_pmusgrf_regs *pmusgrf;
      struct rk3399_ddr_cic_regs *cic;
      const struct sdram_rk3399_ops *ops;
-#endif
      struct ram_info info;
      struct rk3399_pmugrf_regs *pmugrf;
 };
@@ -92,9 +90,6 @@ struct sdram_rk3399_ops {
                                      struct rk3399_sdram_params *params);
 };
 
-#if defined(CONFIG_TPL_BUILD) || \
-     (!defined(CONFIG_TPL) && defined(CONFIG_SPL_BUILD))
-
 struct rockchip_dmc_plat {
 #if CONFIG_IS_ENABLED(OF_PLATDATA)
      struct dtd_rockchip_rk3399_dmc dtplat;
@@ -191,6 +186,17 @@ struct io_setting {
      },
 };

drivers/ram/rockchip/sdram_rk3399.c struct io_setting { · line 197

Quoted 10 lines
drivers/ram/rockchip/sdram_rk3399.c +9 -0
 
+/**
+ * phase_sdram_init() - Check if this is the phase where SDRAM init happens
+ *
+ * Returns: true to do SDRAM init in this phase, false to not
+ */
+static bool phase_sdram_init(void)
+{
+     return spl_phase() == PHASE_TPL ||
+         (!IS_ENABLED(CONFIG_TPL) && !spl_in_proper());

This is still wrong, please consider ROCKCHIP_EXTERNAL_TPL or this function fail to do what you document it to do.

Quoted 2 lines

See our prior thread about this:
https://lore.kernel.org/u-boot/CAFLszThg5xohR-9AgSMHVrW5Dp_tN39nC7rq1Z4ZMnqOQqJa1w@mail.gmail.com/

Oh yes, I was looking at that earlier and then forgot about it.

Regards,
Simon

Quoted 61 lines

Regards,
Jonas

Quoted 56 lines
drivers/ram/rockchip/sdram_rk3399.c +6 -11
+}
+
 static struct io_setting *
 lpddr4_get_io_settings(const struct rk3399_sdram_params *params, u32 mr5)
 {
@@ -3024,7 +3030,7 @@ static int rk3399_dmc_of_to_plat(struct udevice *dev)
      struct rockchip_dmc_plat *plat = dev_get_plat(dev);
      int ret;
 
-     if (!CONFIG_IS_ENABLED(OF_REAL))
+     if (!CONFIG_IS_ENABLED(OF_REAL) || !phase_sdram_init())
              return 0;
 
      ret = dev_read_u32_array(dev, "rockchip,sdram-params",
@@ -3093,7 +3099,6 @@ static int rk3399_dmc_init(struct udevice *dev)
      priv->cic = syscon_get_first_range(ROCKCHIP_SYSCON_CIC);
      priv->grf = syscon_get_first_range(ROCKCHIP_SYSCON_GRF);
      priv->pmu = syscon_get_first_range(ROCKCHIP_SYSCON_PMU);
-     priv->pmugrf = syscon_get_first_range(ROCKCHIP_SYSCON_PMUGRF);
      priv->pmusgrf = syscon_get_first_range(ROCKCHIP_SYSCON_PMUSGRF);
      priv->pmucru = rockchip_get_pmucru();
      priv->cru = rockchip_get_cru();
@@ -3138,19 +3143,16 @@ static int rk3399_dmc_init(struct udevice *dev)
 
      return 0;
 }
-#endif
 
 static int rk3399_dmc_probe(struct udevice *dev)
 {
      struct dram_info *priv = dev_get_priv(dev);
 
-#if defined(CONFIG_TPL_BUILD) || \
-     (!defined(CONFIG_TPL) && defined(CONFIG_SPL_BUILD))
-     if (rk3399_dmc_init(dev))
-             return 0;
-#endif
      priv->pmugrf = syscon_get_first_range(ROCKCHIP_SYSCON_PMUGRF);
      debug("%s: pmugrf = %p\n", __func__, priv->pmugrf);
+     if (phase_sdram_init() && rk3399_dmc_init(dev))
+             return 0;
+
      priv->info.base = CFG_SYS_SDRAM_BASE;
      priv->info.size =
              rockchip_sdram_size((phys_addr_t)&priv->pmugrf->os_reg2);
@@ -3181,10 +3183,7 @@ U_BOOT_DRIVER(dmc_rk3399) = {
      .id = UCLASS_RAM,
      .of_match = rk3399_dmc_ids,
      .ops = &rk3399_dmc_ops,
-#if defined(CONFIG_TPL_BUILD) || \
-     (!defined(CONFIG_TPL) && defined(CONFIG_SPL_BUILD))
      .of_to_plat = rk3399_dmc_of_to_plat,
-#endif
      .probe = rk3399_dmc_probe,
      .priv_auto      = sizeof(struct dram_info),
 #if defined(CONFIG_TPL_BUILD) || \
#11 lore raw

Re: [PATCH v7 8/8] rockchip: Avoid #ifdefs in RK3399 SPL

Hi Simon,

Quoted 12 lines · Simon Glass

Hi Jonas,

Quoted 9 lines · Jonas Karlman

Hi Simon,

Quoted 5 lines · Simon Glass

The code here is confusing due to large blocks which are #ifdefed out. Add a function phase_sdram_init() which returns whether SDRAM init should happen in the current phase, using that as needed to control the code flow.

Quoted 7 lines
Quoted 5 lines
Quoted 2 lines

This increases code size by about 500 bytes in SPL when the cache is on, since it must call the rather large rockchip_sdram_size() function.

I am guessing this size increase only is related to kevin/bob since all other RK3399 boards already use rockchip_sdram_size() in SPL.

That's not what I am seeing:

Ahh, this is adding the rockchip_sdram_size() call to TPL for all other RK3399 boards that has no need for it, hence the size increase on all other boards beside bob and kevin.

This should be adjusted to only be called in SPL, as there is no point for it to be called/used in TPL, in TPL we only initialize DRAM, write the DRAM size to the os reg and finally jump back to BROM to load next stage, SPL.

Regards,
Jonas

Quoted 734 lines

buildman -b bugs8 rk3399 -sS
Summary of 9 commits for 29 boards (29 threads, 2 jobs per thread) 01: Merge patch series "led: implement software blinking"
aarch64: w+ roc-pc-mezzanine-rk3399 roc-pc-rk3399 chromebook_bob
chromebook_kevin pinebook-pro-rk3399 pinephone-pro-rk3399 rockpro64-rk3399 rock-4c-plus-rk3399 rock-4se-rk3399 rock-pi-4-rk3399 rock-pi-4c-rk3399 eaidk-610-rk3399 evb-rk3399 firefly-rk3399 khadas-edge-captain-rk3399 khadas-edge-rk3399 khadas-edge-v-rk3399 leez-rk3399 nanopc-t4-rk3399 nanopi-m4-2gb-rk3399 nanopi-m4-rk3399 nanopi-m4b-rk3399 nanopi-neo4-rk3399 nanopi-r4s-rk3399 orangepi-rk3399 rock-pi-n10-rk3399pro puma-rk3399 ficus-rk3399 rock960-rk3399 02: mkeficapsule: Add a --version argument
03: binman: Collect the version number for mkeficapsule
04: binman: Deal with mkeficapsule being missing
05: binman: Return failure when a usage() message is generated 06: binman: Keep the efi_capsule input file
07: fdt: Correct condition for bloblist existing
08: rockchip: Ensure memory size is available in RK3399 SPL
aarch64: (for 29/29 boards) spl/u-boot-spl:all +33.1
spl/u-boot-spl:text +33.1 tpl/u-boot-tpl:all +446.9 tpl/u-boot-tpl:text +446.9
09: rockchip: Avoid #ifdefs in RK3399 SPL
aarch64: (for 29/29 boards) all +69.2 bss +5.2 spl/u-boot-spl:all
+24.0 spl/u-boot-spl:text +24.0 text +64.0 tpl/u-boot-tpl:all +21.5 tpl/u-boot-tpl:text +21.5
✔ ~/u [bugs8 ↓·18↑·8|…2⚑ 1001]
15:48 $ buildman -b bugs8 rk3399 -sSB
Summary of 9 commits for 29 boards (29 threads, 2 jobs per thread) 01: Merge patch series "led: implement software blinking"
aarch64: w+ roc-pc-mezzanine-rk3399 roc-pc-rk3399 chromebook_bob
chromebook_kevin pinebook-pro-rk3399 pinephone-pro-rk3399 rockpro64-rk3399 rock-4c-plus-rk3399 rock-4se-rk3399 rock-pi-4-rk3399 rock-pi-4c-rk3399 eaidk-610-rk3399 evb-rk3399 firefly-rk3399 khadas-edge-captain-rk3399 khadas-edge-rk3399 khadas-edge-v-rk3399 leez-rk3399 nanopc-t4-rk3399 nanopi-m4-2gb-rk3399 nanopi-m4-rk3399 nanopi-m4b-rk3399 nanopi-neo4-rk3399 nanopi-r4s-rk3399 orangepi-rk3399 rock-pi-n10-rk3399pro puma-rk3399 ficus-rk3399 rock960-rk3399 02: mkeficapsule: Add a --version argument
03: binman: Collect the version number for mkeficapsule
04: binman: Deal with mkeficapsule being missing
05: binman: Return failure when a usage() message is generated 06: binman: Keep the efi_capsule input file
07: fdt: Correct condition for bloblist existing
08: rockchip: Ensure memory size is available in RK3399 SPL
aarch64: (for 29/29 boards) spl/u-boot-spl:all +33.1
spl/u-boot-spl:text +33.1 tpl/u-boot-tpl:all +446.9 tpl/u-boot-tpl:text +446.9

            roc-pc-mezzanine-rk3399: tpl/u-boot-tpl:all +480
tpl/u-boot-tpl:text +480
               tpl-u-boot-tpl: add: 1/0, grow: 1/0 bytes: 480/0 (480)
                 function                                   old     new   delta
                 rockchip_sdram_size                          -     432    +432
                 rk3399_dmc_probe                          4120    4168     +48
            roc-pc-rk3399  : tpl/u-boot-tpl:all +480 tpl/u-boot-tpl:text +480
               tpl-u-boot-tpl: add: 1/0, grow: 1/0 bytes: 480/0 (480)
                 function                                   old     new   delta
                 rockchip_sdram_size                          -     432    +432
                 rk3399_dmc_probe                          4120    4168     +48
            chromebook_bob : spl/u-boot-spl:all +480 spl/u-boot-spl:text +480
               spl-u-boot-spl: add: 1/0, grow: 1/0 bytes: 480/0 (480)
                 function                                   old     new   delta
                 rockchip_sdram_size                          -     432    +432
                 rk3399_dmc_probe                          4304    4352     +48
            chromebook_kevin: spl/u-boot-spl:all +480 spl/u-boot-spl:text +480
               spl-u-boot-spl: add: 1/0, grow: 1/0 bytes: 480/0 (480)
                 function                                   old     new   delta
                 rockchip_sdram_size                          -     432    +432
                 rk3399_dmc_probe                          4304    4352     +48
            pinebook-pro-rk3399: tpl/u-boot-tpl:all +480
tpl/u-boot-tpl:text +480
               tpl-u-boot-tpl: add: 1/0, grow: 1/0 bytes: 480/0 (480)
                 function                                   old     new   delta
                 rockchip_sdram_size                          -     432    +432
                 rk3399_dmc_probe                          4164    4212     +48
            pinephone-pro-rk3399: tpl/u-boot-tpl:all +480
tpl/u-boot-tpl:text +480
               tpl-u-boot-tpl: add: 1/0, grow: 1/0 bytes: 480/0 (480)
                 function                                   old     new   delta
                 rockchip_sdram_size                          -     432    +432
                 rk3399_dmc_probe                          4164    4212     +48
            rockpro64-rk3399: tpl/u-boot-tpl:all +480 tpl/u-boot-tpl:text +480
               tpl-u-boot-tpl: add: 1/0, grow: 1/0 bytes: 480/0 (480)
                 function                                   old     new   delta
                 rockchip_sdram_size                          -     432    +432
                 rk3399_dmc_probe                          4164    4212     +48
            rock-4c-plus-rk3399: tpl/u-boot-tpl:all +480
tpl/u-boot-tpl:text +480
               tpl-u-boot-tpl: add: 1/0, grow: 1/0 bytes: 480/0 (480)
                 function                                   old     new   delta
                 rockchip_sdram_size                          -     432    +432
                 rk3399_dmc_probe                          4164    4212     +48
            rock-4se-rk3399: tpl/u-boot-tpl:all +480 tpl/u-boot-tpl:text +480
               tpl-u-boot-tpl: add: 1/0, grow: 1/0 bytes: 480/0 (480)
                 function                                   old     new   delta
                 rockchip_sdram_size                          -     432    +432
                 rk3399_dmc_probe                          4164    4212     +48
            rock-pi-4-rk3399: tpl/u-boot-tpl:all +480 tpl/u-boot-tpl:text +480
               tpl-u-boot-tpl: add: 1/0, grow: 1/0 bytes: 480/0 (480)
                 function                                   old     new   delta
                 rockchip_sdram_size                          -     432    +432
                 rk3399_dmc_probe                          4164    4212     +48
            rock-pi-4c-rk3399: tpl/u-boot-tpl:all +480 tpl/u-boot-tpl:text +480
               tpl-u-boot-tpl: add: 1/0, grow: 1/0 bytes: 480/0 (480)
                 function                                   old     new   delta
                 rockchip_sdram_size                          -     432    +432
                 rk3399_dmc_probe                          4164    4212     +48
            eaidk-610-rk3399: tpl/u-boot-tpl:all +480 tpl/u-boot-tpl:text +480
               tpl-u-boot-tpl: add: 1/0, grow: 1/0 bytes: 480/0 (480)
                 function                                   old     new   delta
                 rockchip_sdram_size                          -     432    +432
                 rk3399_dmc_probe                          4304    4352     +48
            evb-rk3399     : tpl/u-boot-tpl:all +480 tpl/u-boot-tpl:text +480
               tpl-u-boot-tpl: add: 1/0, grow: 1/0 bytes: 480/0 (480)
                 function                                   old     new   delta
                 rockchip_sdram_size                          -     432    +432
                 rk3399_dmc_probe                          4304    4352     +48
            firefly-rk3399 : tpl/u-boot-tpl:all +480 tpl/u-boot-tpl:text +480
               tpl-u-boot-tpl: add: 1/0, grow: 1/0 bytes: 480/0 (480)
                 function                                   old     new   delta
                 rockchip_sdram_size                          -     432    +432
                 rk3399_dmc_probe                          4304    4352     +48
            khadas-edge-captain-rk3399: tpl/u-boot-tpl:all +480
tpl/u-boot-tpl:text +480
               tpl-u-boot-tpl: add: 1/0, grow: 1/0 bytes: 480/0 (480)
                 function                                   old     new   delta
                 rockchip_sdram_size                          -     432    +432
                 rk3399_dmc_probe                          4164    4212     +48
            khadas-edge-rk3399: tpl/u-boot-tpl:all +480 tpl/u-boot-tpl:text +480
               tpl-u-boot-tpl: add: 1/0, grow: 1/0 bytes: 480/0 (480)
                 function                                   old     new   delta
                 rockchip_sdram_size                          -     432    +432
                 rk3399_dmc_probe                          4164    4212     +48
            khadas-edge-v-rk3399: tpl/u-boot-tpl:all +480
tpl/u-boot-tpl:text +480
               tpl-u-boot-tpl: add: 1/0, grow: 1/0 bytes: 480/0 (480)
                 function                                   old     new   delta
                 rockchip_sdram_size                          -     432    +432
                 rk3399_dmc_probe                          4164    4212     +48
            leez-rk3399    : tpl/u-boot-tpl:all +480 tpl/u-boot-tpl:text +480
               tpl-u-boot-tpl: add: 1/0, grow: 1/0 bytes: 480/0 (480)
                 function                                   old     new   delta
                 rockchip_sdram_size                          -     432    +432
                 rk3399_dmc_probe                          4164    4212     +48
            nanopc-t4-rk3399: tpl/u-boot-tpl:all +480 tpl/u-boot-tpl:text +480
               tpl-u-boot-tpl: add: 1/0, grow: 1/0 bytes: 480/0 (480)
                 function                                   old     new   delta
                 rockchip_sdram_size                          -     432    +432
                 rk3399_dmc_probe                          4304    4352     +48
            nanopi-m4-2gb-rk3399: tpl/u-boot-tpl:all +480
tpl/u-boot-tpl:text +480
               tpl-u-boot-tpl: add: 1/0, grow: 1/0 bytes: 480/0 (480)
                 function                                   old     new   delta
                 rockchip_sdram_size                          -     432    +432
                 rk3399_dmc_probe                          4304    4352     +48
            nanopi-m4-rk3399: tpl/u-boot-tpl:all +480 tpl/u-boot-tpl:text +480
               tpl-u-boot-tpl: add: 1/0, grow: 1/0 bytes: 480/0 (480)
                 function                                   old     new   delta
                 rockchip_sdram_size                          -     432    +432
                 rk3399_dmc_probe                          4304    4352     +48
            nanopi-m4b-rk3399: tpl/u-boot-tpl:all +480 tpl/u-boot-tpl:text +480
               tpl-u-boot-tpl: add: 1/0, grow: 1/0 bytes: 480/0 (480)
                 function                                   old     new   delta
                 rockchip_sdram_size                          -     432    +432
                 rk3399_dmc_probe                          4304    4352     +48
            nanopi-neo4-rk3399: tpl/u-boot-tpl:all +480 tpl/u-boot-tpl:text +480
               tpl-u-boot-tpl: add: 1/0, grow: 1/0 bytes: 480/0 (480)
                 function                                   old     new   delta
                 rockchip_sdram_size                          -     432    +432
                 rk3399_dmc_probe                          4304    4352     +48
            nanopi-r4s-rk3399: tpl/u-boot-tpl:all +480 tpl/u-boot-tpl:text +480
               tpl-u-boot-tpl: add: 1/0, grow: 1/0 bytes: 480/0 (480)
                 function                                   old     new   delta
                 rockchip_sdram_size                          -     432    +432
                 rk3399_dmc_probe                          4164    4212     +48
            orangepi-rk3399: tpl/u-boot-tpl:all +480 tpl/u-boot-tpl:text +480
               tpl-u-boot-tpl: add: 1/0, grow: 1/0 bytes: 480/0 (480)
                 function                                   old     new   delta
                 rockchip_sdram_size                          -     432    +432
                 rk3399_dmc_probe                          4304    4352     +48
            rock-pi-n10-rk3399pro: tpl/u-boot-tpl:all +480
tpl/u-boot-tpl:text +480
               tpl-u-boot-tpl: add: 1/0, grow: 1/0 bytes: 480/0 (480)
                 function                                   old     new   delta
                 rockchip_sdram_size                          -     432    +432
                 rk3399_dmc_probe                          4248    4296     +48
            puma-rk3399    : tpl/u-boot-tpl:all +480 tpl/u-boot-tpl:text +480
               tpl-u-boot-tpl: add: 1/0, grow: 1/0 bytes: 480/0 (480)
                 function                                   old     new   delta
                 rockchip_sdram_size                          -     432    +432
                 rk3399_dmc_probe                          4304    4352     +48
            ficus-rk3399   : tpl/u-boot-tpl:all +480 tpl/u-boot-tpl:text +480
               tpl-u-boot-tpl: add: 1/0, grow: 1/0 bytes: 480/0 (480)
                 function                                   old     new   delta
                 rockchip_sdram_size                          -     432    +432
                 rk3399_dmc_probe                          4304    4352     +48
            rock960-rk3399 : tpl/u-boot-tpl:all +480 tpl/u-boot-tpl:text +480
               tpl-u-boot-tpl: add: 1/0, grow: 1/0 bytes: 480/0 (480)
                 function                                   old     new   delta
                 rockchip_sdram_size                          -     432    +432
                 rk3399_dmc_probe                          4304    4352     +48

09: rockchip: Avoid #ifdefs in RK3399 SPL
aarch64: (for 29/29 boards) all +69.2 bss +5.2 spl/u-boot-spl:all
+24.0 spl/u-boot-spl:text +24.0 text +64.0 tpl/u-boot-tpl:all +21.5 tpl/u-boot-tpl:text +21.5

            rock-4c-plus-rk3399: all +120 bss +56 spl/u-boot-spl:all

+24 spl/u-boot-spl:text +24 text +64 tpl/u-boot-tpl:all +24 tpl/u-boot-tpl:text +24
tpl-u-boot-tpl: add: 0/0, grow: 1/0 bytes: 24/0 (24)
function old new delta
rk3399_dmc_probe 4212 4236 +24
u-boot: add: 1/0, grow: 1/0 bytes: 40/0 (40)
function old new delta
rk3399_dmc_of_to_plat - 32 +32
rk3399_dmc_probe 64 72 +8
spl-u-boot-spl: add: 1/0, grow: 0/0 bytes: 24/0 (24)
function old new delta
rk3399_dmc_of_to_plat - 24 +24
nanopc-t4-rk3399: all +120 bss +56 spl/u-boot-spl:all +24
spl/u-boot-spl:text +24 text +64 tpl/u-boot-tpl:all +24 tpl/u-boot-tpl:text +24
tpl-u-boot-tpl: add: 0/0, grow: 1/0 bytes: 24/0 (24)
function old new delta
rk3399_dmc_probe 4352 4376 +24
u-boot: add: 1/0, grow: 1/0 bytes: 40/0 (40)
function old new delta
rk3399_dmc_of_to_plat - 32 +32
rk3399_dmc_probe 64 72 +8
spl-u-boot-spl: add: 1/0, grow: 0/0 bytes: 24/0 (24)
function old new delta
rk3399_dmc_of_to_plat - 24 +24
nanopi-r4s-rk3399: all +120 bss +56 spl/u-boot-spl:all +24
spl/u-boot-spl:text +24 text +64 tpl/u-boot-tpl:all +24 tpl/u-boot-tpl:text +24
tpl-u-boot-tpl: add: 0/0, grow: 1/0 bytes: 24/0 (24)
function old new delta
rk3399_dmc_probe 4212 4236 +24
u-boot: add: 1/0, grow: 1/0 bytes: 40/0 (40)
function old new delta
rk3399_dmc_of_to_plat - 32 +32
rk3399_dmc_probe 64 72 +8
spl-u-boot-spl: add: 1/0, grow: 0/0 bytes: 24/0 (24)
function old new delta
rk3399_dmc_of_to_plat - 24 +24
rockpro64-rk3399: all +72 bss +8 spl/u-boot-spl:all +24
spl/u-boot-spl:text +24 text +64 tpl/u-boot-tpl:all +24 tpl/u-boot-tpl:text +24
tpl-u-boot-tpl: add: 0/0, grow: 1/0 bytes: 24/0 (24)
function old new delta
rk3399_dmc_probe 4212 4236 +24
u-boot: add: 1/0, grow: 1/0 bytes: 40/0 (40)
function old new delta
rk3399_dmc_of_to_plat - 32 +32
rk3399_dmc_probe 64 72 +8
spl-u-boot-spl: add: 1/0, grow: 0/0 bytes: 24/0 (24)
function old new delta
rk3399_dmc_of_to_plat - 24 +24
nanopi-m4-2gb-rk3399: all +72 bss +8 spl/u-boot-spl:all
+24 spl/u-boot-spl:text +24 text +64 tpl/u-boot-tpl:all +24 tpl/u-boot-tpl:text +24
tpl-u-boot-tpl: add: 0/0, grow: 1/0 bytes: 24/0 (24)
function old new delta
rk3399_dmc_probe 4352 4376 +24
u-boot: add: 1/0, grow: 1/0 bytes: 40/0 (40)
function old new delta
rk3399_dmc_of_to_plat - 32 +32
rk3399_dmc_probe 64 72 +8
spl-u-boot-spl: add: 1/0, grow: 0/0 bytes: 24/0 (24)
function old new delta
rk3399_dmc_of_to_plat - 24 +24
nanopi-m4-rk3399: all +72 bss +8 spl/u-boot-spl:all +24
spl/u-boot-spl:text +24 text +64 tpl/u-boot-tpl:all +24 tpl/u-boot-tpl:text +24
tpl-u-boot-tpl: add: 0/0, grow: 1/0 bytes: 24/0 (24)
function old new delta
rk3399_dmc_probe 4352 4376 +24
u-boot: add: 1/0, grow: 1/0 bytes: 40/0 (40)
function old new delta
rk3399_dmc_of_to_plat - 32 +32
rk3399_dmc_probe 64 72 +8
spl-u-boot-spl: add: 1/0, grow: 0/0 bytes: 24/0 (24)
function old new delta
rk3399_dmc_of_to_plat - 24 +24
nanopi-m4b-rk3399: all +72 bss +8 spl/u-boot-spl:all +24
spl/u-boot-spl:text +24 text +64 tpl/u-boot-tpl:all +24 tpl/u-boot-tpl:text +24
tpl-u-boot-tpl: add: 0/0, grow: 1/0 bytes: 24/0 (24)
function old new delta
rk3399_dmc_probe 4352 4376 +24
u-boot: add: 1/0, grow: 1/0 bytes: 40/0 (40)
function old new delta
rk3399_dmc_of_to_plat - 32 +32
rk3399_dmc_probe 64 72 +8
spl-u-boot-spl: add: 1/0, grow: 0/0 bytes: 24/0 (24)
function old new delta
rk3399_dmc_of_to_plat - 24 +24
puma-rk3399 : all +72 bss +8 spl/u-boot-spl:all +24
spl/u-boot-spl:text +24 text +64 tpl/u-boot-tpl:all +24 tpl/u-boot-tpl:text +24
tpl-u-boot-tpl: add: 0/0, grow: 1/0 bytes: 24/0 (24)
function old new delta
rk3399_dmc_probe 4352 4376 +24
u-boot: add: 1/0, grow: 1/0 bytes: 40/0 (40)
function old new delta
rk3399_dmc_of_to_plat - 32 +32
rk3399_dmc_probe 64 72 +8
spl-u-boot-spl: add: 1/0, grow: 0/0 bytes: 24/0 (24)
function old new delta
rk3399_dmc_of_to_plat - 24 +24
eaidk-610-rk3399: all +64 spl/u-boot-spl:all +24
spl/u-boot-spl:text +24 text +64 tpl/u-boot-tpl:all +24 tpl/u-boot-tpl:text +24
tpl-u-boot-tpl: add: 0/0, grow: 1/0 bytes: 24/0 (24)
function old new delta
rk3399_dmc_probe 4352 4376 +24
u-boot: add: 1/0, grow: 1/0 bytes: 40/0 (40)
function old new delta
rk3399_dmc_of_to_plat - 32 +32
rk3399_dmc_probe 64 72 +8
spl-u-boot-spl: add: 1/0, grow: 0/0 bytes: 24/0 (24)
function old new delta
rk3399_dmc_of_to_plat - 24 +24
firefly-rk3399 : all +64 spl/u-boot-spl:all +24
spl/u-boot-spl:text +24 text +64 tpl/u-boot-tpl:all +24 tpl/u-boot-tpl:text +24
tpl-u-boot-tpl: add: 0/0, grow: 1/0 bytes: 24/0 (24)
function old new delta
rk3399_dmc_probe 4352 4376 +24
u-boot: add: 1/0, grow: 1/0 bytes: 40/0 (40)
function old new delta
rk3399_dmc_of_to_plat - 32 +32
rk3399_dmc_probe 64 72 +8
spl-u-boot-spl: add: 1/0, grow: 0/0 bytes: 24/0 (24)
function old new delta
rk3399_dmc_of_to_plat - 24 +24
khadas-edge-captain-rk3399: all +64 spl/u-boot-spl:all +24
spl/u-boot-spl:text +24 text +64 tpl/u-boot-tpl:all +24 tpl/u-boot-tpl:text +24
tpl-u-boot-tpl: add: 0/0, grow: 1/0 bytes: 24/0 (24)
function old new delta
rk3399_dmc_probe 4212 4236 +24
u-boot: add: 1/0, grow: 1/0 bytes: 40/0 (40)
function old new delta
rk3399_dmc_of_to_plat - 32 +32
rk3399_dmc_probe 64 72 +8
spl-u-boot-spl: add: 1/0, grow: 0/0 bytes: 24/0 (24)
function old new delta
rk3399_dmc_of_to_plat - 24 +24
khadas-edge-rk3399: all +64 spl/u-boot-spl:all +24
spl/u-boot-spl:text +24 text +64 tpl/u-boot-tpl:all +24 tpl/u-boot-tpl:text +24
tpl-u-boot-tpl: add: 0/0, grow: 1/0 bytes: 24/0 (24)
function old new delta
rk3399_dmc_probe 4212 4236 +24
u-boot: add: 1/0, grow: 1/0 bytes: 40/0 (40)
function old new delta
rk3399_dmc_of_to_plat - 32 +32
rk3399_dmc_probe 64 72 +8
spl-u-boot-spl: add: 1/0, grow: 0/0 bytes: 24/0 (24)
function old new delta
rk3399_dmc_of_to_plat - 24 +24
khadas-edge-v-rk3399: all +64 spl/u-boot-spl:all +24
spl/u-boot-spl:text +24 text +64 tpl/u-boot-tpl:all +24 tpl/u-boot-tpl:text +24
tpl-u-boot-tpl: add: 0/0, grow: 1/0 bytes: 24/0 (24)
function old new delta
rk3399_dmc_probe 4212 4236 +24
u-boot: add: 1/0, grow: 1/0 bytes: 40/0 (40)
function old new delta
rk3399_dmc_of_to_plat - 32 +32
rk3399_dmc_probe 64 72 +8
spl-u-boot-spl: add: 1/0, grow: 0/0 bytes: 24/0 (24)
function old new delta
rk3399_dmc_of_to_plat - 24 +24
leez-rk3399 : all +64 spl/u-boot-spl:all +24
spl/u-boot-spl:text +24 text +64 tpl/u-boot-tpl:all +24 tpl/u-boot-tpl:text +24
tpl-u-boot-tpl: add: 0/0, grow: 1/0 bytes: 24/0 (24)
function old new delta
rk3399_dmc_probe 4212 4236 +24
u-boot: add: 1/0, grow: 1/0 bytes: 40/0 (40)
function old new delta
rk3399_dmc_of_to_plat - 32 +32
rk3399_dmc_probe 64 72 +8
spl-u-boot-spl: add: 1/0, grow: 0/0 bytes: 24/0 (24)
function old new delta
rk3399_dmc_of_to_plat - 24 +24
orangepi-rk3399: all +64 spl/u-boot-spl:all +24
spl/u-boot-spl:text +24 text +64 tpl/u-boot-tpl:all +24 tpl/u-boot-tpl:text +24
tpl-u-boot-tpl: add: 0/0, grow: 1/0 bytes: 24/0 (24)
function old new delta
rk3399_dmc_probe 4352 4376 +24
u-boot: add: 1/0, grow: 1/0 bytes: 40/0 (40)
function old new delta
rk3399_dmc_of_to_plat - 32 +32
rk3399_dmc_probe 64 72 +8
spl-u-boot-spl: add: 1/0, grow: 0/0 bytes: 24/0 (24)
function old new delta
rk3399_dmc_of_to_plat - 24 +24
rock-pi-n10-rk3399pro: all +72 bss +8 spl/u-boot-spl:all
+24 spl/u-boot-spl:text +24 text +64 tpl/u-boot-tpl:all +16 tpl/u-boot-tpl:text +16
tpl-u-boot-tpl: add: 0/0, grow: 1/0 bytes: 16/0 (16)
function old new delta
rk3399_dmc_probe 4296 4312 +16
u-boot: add: 1/0, grow: 1/0 bytes: 40/0 (40)
function old new delta
rk3399_dmc_of_to_plat - 32 +32
rk3399_dmc_probe 64 72 +8
spl-u-boot-spl: add: 1/0, grow: 0/0 bytes: 24/0 (24)
function old new delta
rk3399_dmc_of_to_plat - 24 +24
ficus-rk3399 : all +64 spl/u-boot-spl:all +24
spl/u-boot-spl:text +24 text +64 tpl/u-boot-tpl:all +24 tpl/u-boot-tpl:text +24
tpl-u-boot-tpl: add: 0/0, grow: 1/0 bytes: 24/0 (24)
function old new delta
rk3399_dmc_probe 4352 4376 +24
u-boot: add: 1/0, grow: 1/0 bytes: 40/0 (40)
function old new delta
rk3399_dmc_of_to_plat - 32 +32
rk3399_dmc_probe 64 72 +8
spl-u-boot-spl: add: 1/0, grow: 0/0 bytes: 24/0 (24)
function old new delta
rk3399_dmc_of_to_plat - 24 +24
pinebook-pro-rk3399: all +56 bss -8 spl/u-boot-spl:all +24
spl/u-boot-spl:text +24 text +64 tpl/u-boot-tpl:all +24 tpl/u-boot-tpl:text +24
tpl-u-boot-tpl: add: 0/0, grow: 1/0 bytes: 24/0 (24)
function old new delta
rk3399_dmc_probe 4212 4236 +24
u-boot: add: 1/0, grow: 1/0 bytes: 40/0 (40)
function old new delta
rk3399_dmc_of_to_plat - 32 +32
rk3399_dmc_probe 64 72 +8
spl-u-boot-spl: add: 1/0, grow: 0/0 bytes: 24/0 (24)
function old new delta
rk3399_dmc_of_to_plat - 24 +24
pinephone-pro-rk3399: all +56 bss -8 spl/u-boot-spl:all
+24 spl/u-boot-spl:text +24 text +64 tpl/u-boot-tpl:all +24 tpl/u-boot-tpl:text +24
tpl-u-boot-tpl: add: 0/0, grow: 1/0 bytes: 24/0 (24)
function old new delta
rk3399_dmc_probe 4212 4236 +24
u-boot: add: 1/0, grow: 1/0 bytes: 40/0 (40)
function old new delta
rk3399_dmc_of_to_plat - 32 +32
rk3399_dmc_probe 64 72 +8
spl-u-boot-spl: add: 1/0, grow: 0/0 bytes: 24/0 (24)
function old new delta
rk3399_dmc_of_to_plat - 24 +24
rock-4se-rk3399: all +56 bss -8 spl/u-boot-spl:all +24
spl/u-boot-spl:text +24 text +64 tpl/u-boot-tpl:all +24 tpl/u-boot-tpl:text +24
tpl-u-boot-tpl: add: 0/0, grow: 1/0 bytes: 24/0 (24)
function old new delta
rk3399_dmc_probe 4212 4236 +24
u-boot: add: 1/0, grow: 1/0 bytes: 40/0 (40)
function old new delta
rk3399_dmc_of_to_plat - 32 +32
rk3399_dmc_probe 64 72 +8
spl-u-boot-spl: add: 1/0, grow: 0/0 bytes: 24/0 (24)
function old new delta
rk3399_dmc_of_to_plat - 24 +24
rock-pi-4-rk3399: all +56 bss -8 spl/u-boot-spl:all +24
spl/u-boot-spl:text +24 text +64 tpl/u-boot-tpl:all +24 tpl/u-boot-tpl:text +24
tpl-u-boot-tpl: add: 0/0, grow: 1/0 bytes: 24/0 (24)
function old new delta
rk3399_dmc_probe 4212 4236 +24
u-boot: add: 1/0, grow: 1/0 bytes: 40/0 (40)
function old new delta
rk3399_dmc_of_to_plat - 32 +32
rk3399_dmc_probe 64 72 +8
spl-u-boot-spl: add: 1/0, grow: 0/0 bytes: 24/0 (24)
function old new delta
rk3399_dmc_of_to_plat - 24 +24
rock-pi-4c-rk3399: all +56 bss -8 spl/u-boot-spl:all +24
spl/u-boot-spl:text +24 text +64 tpl/u-boot-tpl:all +24 tpl/u-boot-tpl:text +24
tpl-u-boot-tpl: add: 0/0, grow: 1/0 bytes: 24/0 (24)
function old new delta
rk3399_dmc_probe 4212 4236 +24
u-boot: add: 1/0, grow: 1/0 bytes: 40/0 (40)
function old new delta
rk3399_dmc_of_to_plat - 32 +32
rk3399_dmc_probe 64 72 +8
spl-u-boot-spl: add: 1/0, grow: 0/0 bytes: 24/0 (24)
function old new delta
rk3399_dmc_of_to_plat - 24 +24
evb-rk3399 : all +56 bss -8 spl/u-boot-spl:all +24
spl/u-boot-spl:text +24 text +64 tpl/u-boot-tpl:all +24 tpl/u-boot-tpl:text +24
tpl-u-boot-tpl: add: 0/0, grow: 1/0 bytes: 24/0 (24)
function old new delta
rk3399_dmc_probe 4352 4376 +24
u-boot: add: 1/0, grow: 1/0 bytes: 40/0 (40)
function old new delta
rk3399_dmc_of_to_plat - 32 +32
rk3399_dmc_probe 64 72 +8
spl-u-boot-spl: add: 1/0, grow: 0/0 bytes: 24/0 (24)
function old new delta
rk3399_dmc_of_to_plat - 24 +24
nanopi-neo4-rk3399: all +56 bss -8 spl/u-boot-spl:all +24
spl/u-boot-spl:text +24 text +64 tpl/u-boot-tpl:all +24 tpl/u-boot-tpl:text +24
tpl-u-boot-tpl: add: 0/0, grow: 1/0 bytes: 24/0 (24)
function old new delta
rk3399_dmc_probe 4352 4376 +24
u-boot: add: 1/0, grow: 1/0 bytes: 40/0 (40)
function old new delta
rk3399_dmc_of_to_plat - 32 +32
rk3399_dmc_probe 64 72 +8
spl-u-boot-spl: add: 1/0, grow: 0/0 bytes: 24/0 (24)
function old new delta
rk3399_dmc_of_to_plat - 24 +24
rock960-rk3399 : all +56 bss -8 spl/u-boot-spl:all +24
spl/u-boot-spl:text +24 text +64 tpl/u-boot-tpl:all +24 tpl/u-boot-tpl:text +24
tpl-u-boot-tpl: add: 0/0, grow: 1/0 bytes: 24/0 (24)
function old new delta
rk3399_dmc_probe 4352 4376 +24
u-boot: add: 1/0, grow: 1/0 bytes: 40/0 (40)
function old new delta
rk3399_dmc_of_to_plat - 32 +32
rk3399_dmc_probe 64 72 +8
spl-u-boot-spl: add: 1/0, grow: 0/0 bytes: 24/0 (24)
function old new delta
rk3399_dmc_of_to_plat - 24 +24
roc-pc-mezzanine-rk3399: all +56 bss -8 spl/u-boot-spl:all
+24 spl/u-boot-spl:text +24 text +64 tpl/u-boot-tpl:all +16 tpl/u-boot-tpl:text +16
tpl-u-boot-tpl: add: 0/0, grow: 1/0 bytes: 16/0 (16)
function old new delta
rk3399_dmc_probe 4168 4184 +16
u-boot: add: 1/0, grow: 1/0 bytes: 40/0 (40)
function old new delta
rk3399_dmc_of_to_plat - 32 +32
rk3399_dmc_probe 64 72 +8
spl-u-boot-spl: add: 1/0, grow: 0/0 bytes: 24/0 (24)
function old new delta
rk3399_dmc_of_to_plat - 24 +24
roc-pc-rk3399 : all +56 bss -8 spl/u-boot-spl:all +24
spl/u-boot-spl:text +24 text +64 tpl/u-boot-tpl:all +16 tpl/u-boot-tpl:text +16
tpl-u-boot-tpl: add: 0/0, grow: 1/0 bytes: 16/0 (16)
function old new delta
rk3399_dmc_probe 4168 4184 +16
u-boot: add: 1/0, grow: 1/0 bytes: 40/0 (40)
function old new delta
rk3399_dmc_of_to_plat - 32 +32
rk3399_dmc_probe 64 72 +8
spl-u-boot-spl: add: 1/0, grow: 0/0 bytes: 24/0 (24)
function old new delta
rk3399_dmc_of_to_plat - 24 +24
chromebook_bob : all +72 bss +8 spl/u-boot-spl:all +24
spl/u-boot-spl:text +24 text +64
u-boot: add: 1/0, grow: 1/0 bytes: 40/0 (40)
function old new delta
rk3399_dmc_of_to_plat - 32 +32
rk3399_dmc_probe 64 72 +8
spl-u-boot-spl: add: 0/0, grow: 1/0 bytes: 24/0 (24)
function old new delta
rk3399_dmc_probe 4352 4376 +24
chromebook_kevin: all +72 bss +8 spl/u-boot-spl:all +24
spl/u-boot-spl:text +24 text +64
u-boot: add: 1/0, grow: 1/0 bytes: 40/0 (40)
function old new delta
rk3399_dmc_of_to_plat - 32 +32
rk3399_dmc_probe 64 72 +8
spl-u-boot-spl: add: 0/0, grow: 1/0 bytes: 24/0 (24)
function old new delta
rk3399_dmc_probe 4352 4376 +24

Quoted 5 lines
Quoted 3 lines

- Drop the non-dcache optimisation, since the cache should normally be on

Is this referencing to something that is still done in this patch?

No, it is attached to v5, but I had a blank line in the way. Will fix.

Quoted 81 lines
Quoted 67 lines

---

(no changes since v5)

Changes in v5:
- Move setting of pmugrf into the probe() function
- Drop patches previously applied

Changes in v4:
- Fix 'stating' typo
- Move Binman size feature to a separate series

Changes in v3:
- Split out the refactoring into a separate patch

Changes in v2:
- Drop patch "regulator: rk8xx: Fix incorrect parameter"
- Rewrite boneblack patch to onstead drop the target and update docs

 drivers/ram/rockchip/sdram_rk3399.c | 33 ++++++++++++++---------------
 1 file changed, 16 insertions(+), 17 deletions(-)
drivers/ram/rockchip/sdram_rk3399.c +1 -6
index bc79c034808..8a7cbb1849f 100644
@@ -13,6 +13,7 @@
 #include <log.h>
 #include <ram.h>
 #include <regmap.h>
+#include <spl.h>
 #include <syscon.h>
 #include <asm/arch-rockchip/clock.h>
 #include <asm/arch-rockchip/cru.h>
@@ -63,8 +64,6 @@ struct chan_info {
 };
 
 struct dram_info {
-#if defined(CONFIG_TPL_BUILD) || \
-     (!defined(CONFIG_TPL) && defined(CONFIG_SPL_BUILD))
      u32 pwrup_srefresh_exit[2];
      struct chan_info chan[2];
      struct clk ddr_clk;
@@ -75,7 +74,6 @@ struct dram_info {
      struct rk3399_pmusgrf_regs *pmusgrf;
      struct rk3399_ddr_cic_regs *cic;
      const struct sdram_rk3399_ops *ops;
-#endif
      struct ram_info info;
      struct rk3399_pmugrf_regs *pmugrf;
 };
@@ -92,9 +90,6 @@ struct sdram_rk3399_ops {
                                      struct rk3399_sdram_params *params);
 };
 
-#if defined(CONFIG_TPL_BUILD) || \
-     (!defined(CONFIG_TPL) && defined(CONFIG_SPL_BUILD))
-
 struct rockchip_dmc_plat {
 #if CONFIG_IS_ENABLED(OF_PLATDATA)
      struct dtd_rockchip_rk3399_dmc dtplat;
@@ -191,6 +186,17 @@ struct io_setting {
      },
 };

drivers/ram/rockchip/sdram_rk3399.c struct io_setting { · line 197

Quoted 10 lines
drivers/ram/rockchip/sdram_rk3399.c +9 -0
 
+/**
+ * phase_sdram_init() - Check if this is the phase where SDRAM init happens
+ *
+ * Returns: true to do SDRAM init in this phase, false to not
+ */
+static bool phase_sdram_init(void)
+{
+     return spl_phase() == PHASE_TPL ||
+         (!IS_ENABLED(CONFIG_TPL) && !spl_in_proper());

This is still wrong, please consider ROCKCHIP_EXTERNAL_TPL or this function fail to do what you document it to do.

Quoted 2 lines

See our prior thread about this:
https://lore.kernel.org/u-boot/CAFLszThg5xohR-9AgSMHVrW5Dp_tN39nC7rq1Z4ZMnqOQqJa1w@mail.gmail.com/

Oh yes, I was looking at that earlier and then forgot about it.

Regards,
Simon

Quoted 61 lines

Regards,
Jonas

Quoted 56 lines
drivers/ram/rockchip/sdram_rk3399.c +6 -11
+}
+
 static struct io_setting *
 lpddr4_get_io_settings(const struct rk3399_sdram_params *params, u32 mr5)
 {
@@ -3024,7 +3030,7 @@ static int rk3399_dmc_of_to_plat(struct udevice *dev)
      struct rockchip_dmc_plat *plat = dev_get_plat(dev);
      int ret;
 
-     if (!CONFIG_IS_ENABLED(OF_REAL))
+     if (!CONFIG_IS_ENABLED(OF_REAL) || !phase_sdram_init())
              return 0;
 
      ret = dev_read_u32_array(dev, "rockchip,sdram-params",
@@ -3093,7 +3099,6 @@ static int rk3399_dmc_init(struct udevice *dev)
      priv->cic = syscon_get_first_range(ROCKCHIP_SYSCON_CIC);
      priv->grf = syscon_get_first_range(ROCKCHIP_SYSCON_GRF);
      priv->pmu = syscon_get_first_range(ROCKCHIP_SYSCON_PMU);
-     priv->pmugrf = syscon_get_first_range(ROCKCHIP_SYSCON_PMUGRF);
      priv->pmusgrf = syscon_get_first_range(ROCKCHIP_SYSCON_PMUSGRF);
      priv->pmucru = rockchip_get_pmucru();
      priv->cru = rockchip_get_cru();
@@ -3138,19 +3143,16 @@ static int rk3399_dmc_init(struct udevice *dev)
 
      return 0;
 }
-#endif
 
 static int rk3399_dmc_probe(struct udevice *dev)
 {
      struct dram_info *priv = dev_get_priv(dev);
 
-#if defined(CONFIG_TPL_BUILD) || \
-     (!defined(CONFIG_TPL) && defined(CONFIG_SPL_BUILD))
-     if (rk3399_dmc_init(dev))
-             return 0;
-#endif
      priv->pmugrf = syscon_get_first_range(ROCKCHIP_SYSCON_PMUGRF);
      debug("%s: pmugrf = %p\n", __func__, priv->pmugrf);
+     if (phase_sdram_init() && rk3399_dmc_init(dev))
+             return 0;
+
      priv->info.base = CFG_SYS_SDRAM_BASE;
      priv->info.size =
              rockchip_sdram_size((phys_addr_t)&priv->pmugrf->os_reg2);
@@ -3181,10 +3183,7 @@ U_BOOT_DRIVER(dmc_rk3399) = {
      .id = UCLASS_RAM,
      .of_match = rk3399_dmc_ids,
      .ops = &rk3399_dmc_ops,
-#if defined(CONFIG_TPL_BUILD) || \
-     (!defined(CONFIG_TPL) && defined(CONFIG_SPL_BUILD))
      .of_to_plat = rk3399_dmc_of_to_plat,
-#endif
      .probe = rk3399_dmc_probe,
      .priv_auto      = sizeof(struct dram_info),
 #if defined(CONFIG_TPL_BUILD) || \
#12 lore raw
In reply to Simon Glass
Quoted 10 lines · Simon Glass

This series includes fixes to get some rockchip and nvidia boards working again. It also drops the broken Beaglebone Black config and provides a devicetree fix for coral (x86).

Note that since this series fixes bugs, it is targeted at -master

Changes in v7:
- Reword the comment

[...]

Applied to u-boot/master, thanks!

Signature · 1 line
Tom