Skip to contentSkip to conversation

arm: baltos: use compressed DTB images

PATCH In review [email protected] 3 participants 5 messages Feb 17, 2020 – Feb 25, 2020

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

PATCH 1/1 arm: baltos: use compressed DTB images

From: Yegor Yefremov <[email protected]>

This reduces the size of MLO enough to fit into SRAM.

---
 arch/arm/boards/vscom-baltos/lowlevel.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
arch/arm/boards/vscom-baltos/lowlevel.c +3 -3
index 98bbbaae1..0a220f262 100644
@@ -66,7 +66,7 @@ static const struct am33xx_emif_regs ddr3_regs_256mb = {
 
 };
 
-extern char __dtb_am335x_baltos_minimal_start[];
+extern char __dtb_z_am335x_baltos_minimal_start[];
 
 /**
  * @brief The basic entry point for board initialization.
@@ -82,7 +82,7 @@ static noinline void baltos_sram_init(void)
 	uint32_t sdram_size;
 	void *fdt;
 
-	fdt = __dtb_am335x_baltos_minimal_start;
+	fdt = __dtb_z_am335x_baltos_minimal_start;
 
 	/* WDT1 is already running when the bootloader gets control
 	 * Disable it to avoid "random" resets
@@ -132,7 +132,7 @@ ENTRY_FUNCTION(start_am33xx_baltos_sdram, r0, r1, r2)
 	 */
 	__raw_writel(0x000010ff, AM33XX_PRM_RSTTIME);
 
-	fdt = __dtb_am335x_baltos_minimal_start;
+	fdt = __dtb_z_am335x_baltos_minimal_start;
 
 	fdt += get_runtime_offset();
 
Signature · 7 lines
2.17.0


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#1 lore raw
Quoted 32 lines · On Mon, Feb 17, 2020 at 03:38:17PM +0100, [email protected] wrote:

From: Yegor Yefremov <[email protected]>

This reduces the size of MLO enough to fit into SRAM.

---
 arch/arm/boards/vscom-baltos/lowlevel.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
arch/arm/boards/vscom-baltos/lowlevel.c +2 -2
index 98bbbaae1..0a220f262 100644
@@ -66,7 +66,7 @@ static const struct am33xx_emif_regs ddr3_regs_256mb = {
 
 };
 
-extern char __dtb_am335x_baltos_minimal_start[];
+extern char __dtb_z_am335x_baltos_minimal_start[];
 
 /**
  * @brief The basic entry point for board initialization.
@@ -82,7 +82,7 @@ static noinline void baltos_sram_init(void)
 	uint32_t sdram_size;
 	void *fdt;
 
-	fdt = __dtb_am335x_baltos_minimal_start;
+	fdt = __dtb_z_am335x_baltos_minimal_start;
 
 	/* WDT1 is already running when the bootloader gets control
 	 * Disable it to avoid "random" resets

arch/arm/boards/vscom-baltos/lowlevel.c ENTRY_FUNCTION(start_am33xx_baltos_sdram, r0, r1, r2) · line 135

Quoted 5 lines
arch/arm/boards/vscom-baltos/lowlevel.c +1 -1
@@ -132,7 +132,7 @@ ENTRY_FUNCTION(start_am33xx_baltos_sdram, r0, r1, r2)
 	 */
 	__raw_writel(0x000010ff, AM33XX_PRM_RSTTIME);
 
-	fdt = __dtb_am335x_baltos_minimal_start;
+	fdt = __dtb_z_am335x_baltos_minimal_start;

You have to select ARM_USE_COMPRESSED_DTB from the boards Kconfig entry to make sure the uncompressing functions are available.

Sascha

Signature · 9 lines
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#2 lore raw

Hello Sascha,

Quoted 36 lines · Sascha Hauer
Quoted 35 lines · On Mon, Feb 17, 2020 at 03:38:17PM +0100, [email protected] wrote:

From: Yegor Yefremov <[email protected]>

This reduces the size of MLO enough to fit into SRAM.

---
 arch/arm/boards/vscom-baltos/lowlevel.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
arch/arm/boards/vscom-baltos/lowlevel.c +2 -2
index 98bbbaae1..0a220f262 100644
@@ -66,7 +66,7 @@ static const struct am33xx_emif_regs ddr3_regs_256mb = {
 
 };
 
-extern char __dtb_am335x_baltos_minimal_start[];
+extern char __dtb_z_am335x_baltos_minimal_start[];
 
 /**
  * @brief The basic entry point for board initialization.
@@ -82,7 +82,7 @@ static noinline void baltos_sram_init(void)
 	uint32_t sdram_size;
 	void *fdt;
 
-	fdt = __dtb_am335x_baltos_minimal_start;
+	fdt = __dtb_z_am335x_baltos_minimal_start;
 
 	/* WDT1 is already running when the bootloader gets control
 	 * Disable it to avoid "random" resets
@@ -132,7 +132,7 @@ ENTRY_FUNCTION(start_am33xx_baltos_sdram, r0, r1, r2)
 	 */
 	__raw_writel(0x000010ff, AM33XX_PRM_RSTTIME);
 
Quoted 5 lines

arch/arm/boards/vscom-baltos/lowlevel.c ENTRY_FUNCTION(start_am33xx_baltos_sdram, r0, r1, r2) · line 135

Quoted 2 lines
arch/arm/boards/vscom-baltos/lowlevel.c +1 -1
-	fdt = __dtb_am335x_baltos_minimal_start;
+	fdt = __dtb_z_am335x_baltos_minimal_start;

You have to select ARM_USE_COMPRESSED_DTB from the boards Kconfig entry to make sure the uncompressing functions are available.

ARM_USE_COMPRESSED_DTB is enabled transitively because ARCH_AM33XX selects it.

Quoted 3 lines

Sascha

Signature · 9 lines
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | https://www.pengutronix.de/ |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#3 lore raw
Quoted 40 lines · Ahmad Fatoum

Hello Sascha,

Quoted 36 lines · Sascha Hauer
Quoted 35 lines · On Mon, Feb 17, 2020 at 03:38:17PM +0100, [email protected] wrote:

From: Yegor Yefremov <[email protected]>

This reduces the size of MLO enough to fit into SRAM.

---
 arch/arm/boards/vscom-baltos/lowlevel.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
arch/arm/boards/vscom-baltos/lowlevel.c +2 -2
index 98bbbaae1..0a220f262 100644
@@ -66,7 +66,7 @@ static const struct am33xx_emif_regs ddr3_regs_256mb = {
 
 };
 
-extern char __dtb_am335x_baltos_minimal_start[];
+extern char __dtb_z_am335x_baltos_minimal_start[];
 
 /**
  * @brief The basic entry point for board initialization.
@@ -82,7 +82,7 @@ static noinline void baltos_sram_init(void)
     uint32_t sdram_size;
     void *fdt;
 
-    fdt = __dtb_am335x_baltos_minimal_start;
+    fdt = __dtb_z_am335x_baltos_minimal_start;
 
     /* WDT1 is already running when the bootloader gets control
      * Disable it to avoid "random" resets
@@ -132,7 +132,7 @@ ENTRY_FUNCTION(start_am33xx_baltos_sdram, r0, r1, r2)
      */
     __raw_writel(0x000010ff, AM33XX_PRM_RSTTIME);
 
Quoted 8 lines
Quoted 5 lines

arch/arm/boards/vscom-baltos/lowlevel.c ENTRY_FUNCTION(start_am33xx_baltos_sdram, r0, r1, r2) · line 135

Quoted 2 lines
arch/arm/boards/vscom-baltos/lowlevel.c +1 -1
-    fdt = __dtb_am335x_baltos_minimal_start;
+    fdt = __dtb_z_am335x_baltos_minimal_start;

You have to select ARM_USE_COMPRESSED_DTB from the boards Kconfig entry to make sure the uncompressing functions are available.

ARM_USE_COMPRESSED_DTB is enabled transitively because ARCH_AM33XX selects it.

So, no changes required then?

Yegor

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

#4 lore raw
Quoted 11 lines · Yegor Yefremov
Quoted 8 lines · Ahmad Fatoum

Hello Sascha,

Quoted 2 lines

You have to select ARM_USE_COMPRESSED_DTB from the boards Kconfig entry to make sure the uncompressing functions are available.

ARM_USE_COMPRESSED_DTB is enabled transitively because ARCH_AM33XX selects it.

So, no changes required then?

No. Applied, thanks

Sascha

Signature · 9 lines
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox