Skip to contentSkip to conversation

dm: Return actual bools in dm_fdt_pre_reloc

PATCH New Heiko Stuebner 2 participants 8 messages Feb 23, 2017 – Mar 14, 2017

Subsystems (3)
lore
Share & tools
lore

Heiko Stuebner

author maintainer
#0 lore raw

PATCH 1/3 dm: Return actual bools in dm_fdt_pre_reloc

Documentation says that we're returning true/false, not 1/0 so adapt the function to return actual booleans.

---
 drivers/core/util.c | 12 ++++++------
 include/dm/util.h   |  2 +-
 2 files changed, 7 insertions(+), 7 deletions(-)
drivers/core/util.c +6 -6
index bd4de7acd6..5ceac8bbb1 100644
@@ -37,17 +37,17 @@ int list_count_items(struct list_head *head)
 	return count;
 }
 
-int dm_fdt_pre_reloc(const void *blob, int offset)
+bool dm_fdt_pre_reloc(const void *blob, int offset)
 {
 	if (fdt_getprop(blob, offset, "u-boot,dm-pre-reloc", NULL))
-		return 1;
+		return true;
 
 #ifdef CONFIG_TPL_BUILD
 	if (fdt_getprop(blob, offset, "u-boot,dm-tpl", NULL))
-		return 1;
+		return true;
 #elif defined(CONFIG_SPL_BUILD)
 	if (fdt_getprop(blob, offset, "u-boot,dm-spl", NULL))
-		return 1;
+		return true;
 #else
 	/*
 	 * In regular builds individual spl and tpl handling both
@@ -55,8 +55,8 @@ int dm_fdt_pre_reloc(const void *blob, int offset)
 	 */
 	if (fdt_getprop(blob, offset, "u-boot,dm-spl", NULL) ||
 	    fdt_getprop(blob, offset, "u-boot,dm-tpl", NULL))
-		return 1;
+		return true;
 #endif
 
-	return 0;
+	return false;
 }
include/dm/util.h +1 -1
index 32060ab30e..45529ce0e6 100644
@@ -72,6 +72,6 @@ static inline void dm_dump_devres(void)
  *
  * Returns true if node is needed in SPL/TL, false otherwise.
  */
-int dm_fdt_pre_reloc(const void *blob, int offset);
+bool dm_fdt_pre_reloc(const void *blob, int offset);
 
 #endif
Signature · 1 line
2.11.0
author maintainer
#1 lore raw

PATCH 2/3 rockchip: rk3188: enable TPL_LIBGENERIC for generic memset

Commit c67c8c604b6c ("board_init.c: Always use memset()") dropped the naive memset alternative from board_init_f_init_reserve.
So activate CONFIG_TPL_LIBGENERIC for that common memset implementation. We cannot use the ARCH-specific memset, as that would incur 200bytes of additional TPL size, space we do not have.

---
 arch/arm/mach-rockchip/rk3188/Kconfig | 3 +++
 configs/rock_defconfig                | 2 ++
 2 files changed, 5 insertions(+)
arch/arm/mach-rockchip/rk3188/Kconfig +3 -0
index 5afc23ad2f..d129fcda99 100644
@@ -27,6 +27,9 @@ config SPL_SERIAL_SUPPORT
 config TPL_LIBCOMMON_SUPPORT
 	default y
 
+config TPL_LIBGENERIC_SUPPORT
+	default y
+
 config TPL_SERIAL_SUPPORT
 	default y
 
configs/rock_defconfig +2 -0
index 2705909e6c..86048c8fd7 100644
@@ -34,6 +34,8 @@ CONFIG_REGMAP=y
 CONFIG_SYSCON=y
 # CONFIG_SPL_SIMPLE_BUS is not set
 # CONFIG_SPL_MMC_SUPPORT is not set
+# CONFIG_SPL_USE_ARCH_MEMSET is not set
+# CONFIG_SPL_USE_ARCH_MEMCPY is not set
 CONFIG_MMC_DW=y
 CONFIG_MMC_DW_ROCKCHIP=y
 CONFIG_CLK=y
Signature · 1 line
2.11.0
#2 lore raw

PATCH 2/3 rockchip: rk3188: enable TPL_LIBGENERIC for generic memset

Quoted 11 lines · Heiko Stuebner

Commit c67c8c604b6c ("board_init.c: Always use memset()") dropped the naive memset alternative from board_init_f_init_reserve.
So activate CONFIG_TPL_LIBGENERIC for that common memset implementation. We cannot use the ARCH-specific memset, as that would incur 200bytes of additional TPL size, space we do not have.

---
 arch/arm/mach-rockchip/rk3188/Kconfig | 3 +++
 configs/rock_defconfig                | 2 ++
 2 files changed, 5 insertions(+)
author maintainer
#3 lore raw

PATCH 3/3 rockchip: rk3188: drop CONFIG_SYS_NO_FLASH

In reply to Heiko Stuebner

Commit e856bdcfb492 ("flash: complete CONFIG_SYS_NO_FLASH move with renaming") obsoleted the CONFIG_SYS_NO_FLASH option, which still is in our rk3188_common.h header, resulting in warnings like
The following new ad-hoc CONFIG options were detected:
CONFIG_SYS_NO_FLASH

So also drop it from the rk3188 header.

---
 include/configs/rk3188_common.h | 1 -
 1 file changed, 1 deletion(-)
include/configs/rk3188_common.h +0 -1
index 445b2da496..2ff7cd7b70 100644
@@ -13,7 +13,6 @@
 #include "rockchip-common.h"
 
 #define CONFIG_SKIP_LOWLEVEL_INIT_ONLY
-#define CONFIG_SYS_NO_FLASH
 #define CONFIG_NR_DRAM_BANKS		1
 #define CONFIG_ENV_SIZE			0x2000
 #define CONFIG_SYS_MAXARGS		16
Signature · 1 line
2.11.0
#4 lore raw

PATCH 3/3 rockchip: rk3188: drop CONFIG_SYS_NO_FLASH

Quoted 6 lines · Heiko Stuebner

Commit e856bdcfb492 ("flash: complete CONFIG_SYS_NO_FLASH move with renaming") obsoleted the CONFIG_SYS_NO_FLASH option, which still is in our rk3188_common.h header, resulting in warnings like
The following new ad-hoc CONFIG options were detected:
CONFIG_SYS_NO_FLASH

Quoted 6 lines

So also drop it from the rk3188 header.

---
 include/configs/rk3188_common.h | 1 -
 1 file changed, 1 deletion(-)
#5 lore raw

PATCH 3/3 rockchip: rk3188: drop CONFIG_SYS_NO_FLASH

Quoted 7 lines · Simon Glass
Quoted 6 lines · Heiko Stuebner

Commit e856bdcfb492 ("flash: complete CONFIG_SYS_NO_FLASH move with renaming") obsoleted the CONFIG_SYS_NO_FLASH option, which still is in our rk3188_common.h header, resulting in warnings like
The following new ad-hoc CONFIG options were detected:
CONFIG_SYS_NO_FLASH

Quoted 8 lines
Quoted 6 lines

So also drop it from the rk3188 header.

---
 include/configs/rk3188_common.h | 1 -
 1 file changed, 1 deletion(-)

Applied to u-boot-rockchip, thanks!

#7 lore raw

PATCH 1/3 dm: Return actual bools in dm_fdt_pre_reloc

Quoted 11 lines · Simon Glass
Quoted 8 lines · Heiko Stuebner

Documentation says that we're returning true/false, not 1/0 so adapt the function to return actual booleans.

---
 drivers/core/util.c | 12 ++++++------
 include/dm/util.h   |  2 +-
 2 files changed, 7 insertions(+), 7 deletions(-)

Applied to u-boot-rockchip, thanks!