mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Teresa Remmet <t.remmet@phytec.de>
To: barebox@lists.infradead.org
Subject: [PATCH 7/7] ARM: AM335x: Make use of ARM_USE_COMPRESSED_DTB
Date: Tue, 16 Feb 2016 11:45:02 +0100	[thread overview]
Message-ID: <1455619502-19908-8-git-send-email-t.remmet@phytec.de> (raw)
In-Reply-To: <1455619502-19908-1-git-send-email-t.remmet@phytec.de>

Use ARM_USE_COMPRESSED_DTB for all AM335x based board,
to reduce the image size even more.

Saves about 9kB in MLO image and 20kB in barebox image.

Signed-off-by: Teresa Remmet <t.remmet@phytec.de>
---
 arch/arm/boards/afi-gf/lowlevel.c            |  6 +++---
 arch/arm/boards/beaglebone/lowlevel.c        | 12 ++++++------
 arch/arm/boards/phytec-som-am335x/lowlevel.c |  8 ++++----
 arch/arm/mach-omap/Kconfig                   |  1 +
 4 files changed, 14 insertions(+), 13 deletions(-)

diff --git a/arch/arm/boards/afi-gf/lowlevel.c b/arch/arm/boards/afi-gf/lowlevel.c
index efe15ec..91b4b68 100644
--- a/arch/arm/boards/afi-gf/lowlevel.c
+++ b/arch/arm/boards/afi-gf/lowlevel.c
@@ -196,7 +196,7 @@ static const struct module_pin_mux board_can_pin_mux[] = {
 	{-1},
 };
 
-extern char __dtb_am335x_afi_gf_start[];
+extern char __dtb_z_am335x_afi_gf_start[];
 
 /**
  * @brief The basic entry point for board initialization.
@@ -211,7 +211,7 @@ static noinline int gf_sram_init(void)
 {
 	void *fdt;
 
-	fdt = __dtb_am335x_afi_gf_start;
+	fdt = __dtb_z_am335x_afi_gf_start;
 
 	/* WDT1 is already running when the bootloader gets control
 	 * Disable it to avoid "random" resets
@@ -258,7 +258,7 @@ ENTRY_FUNCTION(start_am33xx_afi_gf_sdram, r0, r1, r2)
 {
 	void *fdt;
 
-	fdt = __dtb_am335x_afi_gf_start - get_runtime_offset();
+	fdt = __dtb_z_am335x_afi_gf_start - get_runtime_offset();
 
 	putc_ll('>');
 
diff --git a/arch/arm/boards/beaglebone/lowlevel.c b/arch/arm/boards/beaglebone/lowlevel.c
index 79d5985..100f64f 100644
--- a/arch/arm/boards/beaglebone/lowlevel.c
+++ b/arch/arm/boards/beaglebone/lowlevel.c
@@ -103,9 +103,9 @@ static const struct am33xx_emif_regs ddr3_regs = {
 	.sdram_ref_ctrl		= 0xC30,
 };
 
-extern char __dtb_am335x_boneblack_start[];
-extern char __dtb_am335x_bone_common_start[];
-extern char __dtb_am335x_bone_start[];
+extern char __dtb_z_am335x_boneblack_start[];
+extern char __dtb_z_am335x_bone_common_start[];
+extern char __dtb_z_am335x_bone_start[];
 
 /**
  * @brief The basic entry point for board initialization.
@@ -121,7 +121,7 @@ static noinline int beaglebone_sram_init(void)
 	uint32_t sdram_size;
 	void *fdt;
 
-	fdt = __dtb_am335x_bone_common_start;
+	fdt = __dtb_z_am335x_bone_common_start;
 
 	if (is_beaglebone_black())
 		sdram_size = SZ_512M;
@@ -176,10 +176,10 @@ ENTRY_FUNCTION(start_am33xx_beaglebone_sdram, r0, r1, r2)
 
 	if (is_beaglebone_black()) {
 		sdram_size = SZ_512M;
-		fdt = __dtb_am335x_boneblack_start;
+		fdt = __dtb_z_am335x_boneblack_start;
 	} else {
 		sdram_size = SZ_256M;
-		fdt = __dtb_am335x_bone_start;
+		fdt = __dtb_z_am335x_bone_start;
 	}
 
 	fdt -= get_runtime_offset();
diff --git a/arch/arm/boards/phytec-som-am335x/lowlevel.c b/arch/arm/boards/phytec-som-am335x/lowlevel.c
index 4240f40..73e75eb 100644
--- a/arch/arm/boards/phytec-som-am335x/lowlevel.c
+++ b/arch/arm/boards/phytec-som-am335x/lowlevel.c
@@ -102,8 +102,8 @@ static noinline void physom_board_entry(unsigned long bootinfo, int sdram, void
 #define PHYTEC_ENTRY_MLO(name, fdt_name, sdram)			\
 	ENTRY_FUNCTION(name, bootinfo, r1, r2)			\
 	{							\
-		extern char __dtb_##fdt_name##_start[];		\
-		void *fdt =__dtb_##fdt_name##_start -		\
+		extern char __dtb_z_##fdt_name##_start[];		\
+		void *fdt = __dtb_z_##fdt_name##_start -		\
 			get_runtime_offset();			\
 		physom_board_entry(bootinfo, sdram, fdt);	\
 	}
@@ -111,8 +111,8 @@ static noinline void physom_board_entry(unsigned long bootinfo, int sdram, void
 #define PHYTEC_ENTRY(name, fdt_name)				\
 	ENTRY_FUNCTION(name, r0, r1, r2)			\
 	{							\
-		extern char __dtb_##fdt_name##_start[];		\
-		void *fdt =__dtb_##fdt_name##_start -		\
+		extern char __dtb_z_##fdt_name##_start[];		\
+		void *fdt = __dtb_z_##fdt_name##_start -		\
 			get_runtime_offset();			\
 		am335x_barebox_entry(fdt);			\
 	}
diff --git a/arch/arm/mach-omap/Kconfig b/arch/arm/mach-omap/Kconfig
index 5c68062..d7c863c 100644
--- a/arch/arm/mach-omap/Kconfig
+++ b/arch/arm/mach-omap/Kconfig
@@ -44,6 +44,7 @@ config ARCH_AM33XX
 	select GENERIC_GPIO
 	select OFTREE
 	select OMAP_CLOCK_SOURCE_DMTIMER
+	select ARM_USE_COMPRESSED_DTB
 	help
 	  Say Y here if you are using Texas Instrument's AM33xx based platform
 
-- 
1.9.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  parent reply	other threads:[~2016-02-16 10:47 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-16 10:44 [PATCH 0/7] AM335x related patches Teresa Remmet
2016-02-16 10:44 ` [PATCH 1/7] ARM: am335x_defconfig: Enable NANDTEST command Teresa Remmet
2016-02-16 10:44 ` [PATCH 2/7] ARM: am335x_defconfig: Enable watchdog support Teresa Remmet
2016-02-16 10:44 ` [PATCH 3/7] ARM: dts: am335x-phytec: eeprom name Teresa Remmet
2016-02-16 10:44 ` [PATCH 4/7] ARM: board: phytec-som-am335x: RAM timings for phyCORE-AM335x-R2 Teresa Remmet
2016-02-16 10:45 ` [PATCH 5/7] ARM: boards: phytec-som-am335x: New RAM Timings " Teresa Remmet
2016-02-16 10:45 ` [PATCH 6/7] ARM: dts: beaglebone: Strip clocks in MLO device tree Teresa Remmet
2016-02-16 10:45 ` Teresa Remmet [this message]
2016-02-17  7:21 ` [PATCH 0/7] AM335x related patches Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1455619502-19908-8-git-send-email-t.remmet@phytec.de \
    --to=t.remmet@phytec.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox