Skip to contentSkip to conversation

ARM: rmobile: Enable multi-DTB fit LZO compression

PATCH New Marek Vasut 1 participant 1 message Apr 9, 2019

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

PATCH 1/1 ARM: rmobile: Enable multi-DTB fit LZO compression

Enable LZO compression of the multi-DTB fitImages, since the U-Boot with multiple DTs enabled is becoming quite large and the DTs can be well compressed. The LZO compression saves almost 200 kiB on the Salvator-X(S) and ULCB targets.

Cc Nobuhiro Iwamatsu <[email protected]>
---
 arch/arm/mach-rmobile/Kconfig.64      | 17 +++++++++++++++++
 configs/r8a7795_salvator-x_defconfig  |  4 ++--
 configs/r8a7795_ulcb_defconfig        |  3 ++-
 configs/r8a77965_salvator-x_defconfig |  3 ++-
 configs/r8a7796_salvator-x_defconfig  |  3 ++-
 configs/r8a7796_ulcb_defconfig        |  3 ++-
 6 files changed, 27 insertions(+), 6 deletions(-)
arch/arm/mach-rmobile/Kconfig.64 +17 -0
index b2ac1cdad7..e8f16d798b 100644
@@ -55,6 +55,9 @@ config TARGET_SALVATOR_X
 	bool "Salvator-X board"
 	imply R8A7795
 	imply R8A7796
+	imply SYS_MALLOC_F
+	imply MULTI_DTB_FIT
+	imply MULTI_DTB_FIT_USER_DEFINED_AREA
 	help
           Support for Renesas R-Car Gen3 platform
 
@@ -62,6 +65,9 @@ config TARGET_ULCB
 	bool "ULCB board"
 	imply R8A7795
 	imply R8A7796
+	imply SYS_MALLOC_F
+	imply MULTI_DTB_FIT
+	imply MULTI_DTB_FIT_USER_DEFINED_AREA
 	help
           Support for Renesas R-Car Gen3 ULCB platform
 
@@ -76,4 +82,15 @@ source "board/renesas/ebisu/Kconfig"
 source "board/renesas/salvator-x/Kconfig"
 source "board/renesas/ulcb/Kconfig"
 
+config MULTI_DTB_FIT_UNCOMPRESS_SZ
+	default 0x80000 if TARGET_SALVATOR_X
+	default 0x80000 if TARGET_ULCB
+
+config MULTI_DTB_FIT_USER_DEF_ADDR
+	default 0x49000000 if TARGET_SALVATOR_X
+	default 0x49000000 if TARGET_ULCB
+
+config SYS_MALLOC_F_LEN
+	default 0x8000 if RCAR_GEN3
+
 endif
configs/r8a7795_salvator-x_defconfig +2 -2
index 019e72eac1..8c5c9ed0c4 100644
@@ -1,7 +1,6 @@
 CONFIG_ARM=y
 CONFIG_ARCH_RMOBILE=y
 CONFIG_SYS_TEXT_BASE=0x50000000
-CONFIG_SYS_MALLOC_F_LEN=0x2000
 CONFIG_RCAR_GEN3=y
 CONFIG_TARGET_SALVATOR_X=y
 CONFIG_SMBIOS_PRODUCT_NAME=""
@@ -29,7 +28,8 @@ CONFIG_CMD_FS_GENERIC=y
 CONFIG_OF_CONTROL=y
 CONFIG_DEFAULT_DEVICE_TREE="r8a7795-salvator-x-u-boot"
 CONFIG_OF_LIST="r8a7795-salvator-x-u-boot r8a7796-salvator-x-u-boot r8a77965-salvator-x-u-boot"
-CONFIG_MULTI_DTB_FIT=y
+CONFIG_MULTI_DTB_FIT_LZO=y
+CONFIG_MULTI_DTB_FIT_USER_DEFINED_AREA=y
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_REGMAP=y
 CONFIG_SYSCON=y
configs/r8a7795_ulcb_defconfig +2 -1
index b2f1dfe50b..5383e8bc26 100644
@@ -29,7 +29,8 @@ CONFIG_CMD_FS_GENERIC=y
 CONFIG_OF_CONTROL=y
 CONFIG_DEFAULT_DEVICE_TREE="r8a7795-h3ulcb-u-boot"
 CONFIG_OF_LIST="r8a7795-h3ulcb-u-boot r8a7796-m3ulcb-u-boot"
-CONFIG_MULTI_DTB_FIT=y
+CONFIG_MULTI_DTB_FIT_LZO=y
+CONFIG_MULTI_DTB_FIT_USER_DEFINED_AREA=y
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_REGMAP=y
 CONFIG_SYSCON=y
configs/r8a77965_salvator-x_defconfig +2 -1
index b34fddda1c..228d848c23 100644
@@ -29,7 +29,8 @@ CONFIG_CMD_FS_GENERIC=y
 CONFIG_OF_CONTROL=y
 CONFIG_DEFAULT_DEVICE_TREE="r8a77965-salvator-x-u-boot"
 CONFIG_OF_LIST="r8a7795-salvator-x-u-boot r8a7796-salvator-x-u-boot r8a77965-salvator-x-u-boot"
-CONFIG_MULTI_DTB_FIT=y
+CONFIG_MULTI_DTB_FIT_LZO=y
+CONFIG_MULTI_DTB_FIT_USER_DEFINED_AREA=y
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_REGMAP=y
 CONFIG_SYSCON=y
configs/r8a7796_salvator-x_defconfig +2 -1
index 6a9c1bdc0c..67d3b517f4 100644
@@ -29,7 +29,8 @@ CONFIG_CMD_FS_GENERIC=y
 CONFIG_OF_CONTROL=y
 CONFIG_DEFAULT_DEVICE_TREE="r8a7796-salvator-x-u-boot"
 CONFIG_OF_LIST="r8a7795-salvator-x-u-boot r8a7796-salvator-x-u-boot r8a77965-salvator-x-u-boot"
-CONFIG_MULTI_DTB_FIT=y
+CONFIG_MULTI_DTB_FIT_LZO=y
+CONFIG_MULTI_DTB_FIT_USER_DEFINED_AREA=y
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_REGMAP=y
 CONFIG_SYSCON=y
configs/r8a7796_ulcb_defconfig +2 -1
index aff4c9cb61..6315fefddf 100644
@@ -29,7 +29,8 @@ CONFIG_CMD_FS_GENERIC=y
 CONFIG_OF_CONTROL=y
 CONFIG_DEFAULT_DEVICE_TREE="r8a7796-m3ulcb-u-boot"
 CONFIG_OF_LIST="r8a7795-h3ulcb-u-boot r8a7796-m3ulcb-u-boot"
-CONFIG_MULTI_DTB_FIT=y
+CONFIG_MULTI_DTB_FIT_LZO=y
+CONFIG_MULTI_DTB_FIT_USER_DEFINED_AREA=y
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_REGMAP=y
 CONFIG_SYSCON=y
Signature · 1 line
2.20.1