[PATCH 2/2] ARM: i.MX: GuF Vincell: Make pbl smaller

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The PBL unnecessarily contains two dtb files when only one is needed. Be
a bit more smart and compile in only one.

Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>
---
 arch/arm/boards/guf-vincell/lowlevel.c | 20 +++++++++-----------
 1 file changed, 9 insertions(+), 11 deletions(-)

diff --git a/arch/arm/boards/guf-vincell/lowlevel.c b/arch/arm/boards/guf-vincell/lowlevel.c
index cd887df17c..b211b59ada 100644
--- a/arch/arm/boards/guf-vincell/lowlevel.c
+++ b/arch/arm/boards/guf-vincell/lowlevel.c
@@ -16,11 +16,10 @@
 extern char __dtb_imx53_guf_vincell_lt_start[];
 extern char __dtb_imx53_guf_vincell_start[];
 
-static noinline void imx53_guf_vincell_init(int is_lt)
+static noinline void imx53_guf_vincell_init(void *fdt)
 {
 	void __iomem *ccm = (void *)MX53_CCM_BASE_ADDR;
 	void __iomem *uart = IOMEM(MX53_UART2_BASE_ADDR);
-	void *fdt;
 	u32 r;
 	enum bootsource src;
 	int instance;
@@ -39,15 +38,10 @@ static noinline void imx53_guf_vincell_init(int is_lt)
 	pbl_set_putc(imx_uart_putc, uart);
 	pr_debug("GuF Vincell\n");
 
-	if (is_lt)
-		fdt = __dtb_imx53_guf_vincell_lt_start;
-	else
-		fdt = __dtb_imx53_guf_vincell_start;
-
 	imx53_barebox_entry(fdt);
 }
 
-static void __imx53_guf_vincell_init(int is_lt)
+static noinline void __imx53_guf_vincell_init(void *fdt)
 {
 	arm_early_mmu_cache_invalidate();
 	imx5_cpu_lowlevel_init();
@@ -55,15 +49,19 @@ static void __imx53_guf_vincell_init(int is_lt)
 	setup_c();
 	barrier();
 
-	imx53_guf_vincell_init(is_lt);
+	imx53_guf_vincell_init(fdt);
 }
 
 ENTRY_FUNCTION(start_imx53_guf_vincell_lt, r0, r1, r2)
 {
-	__imx53_guf_vincell_init(1);
+	void *fdt = __dtb_imx53_guf_vincell_lt_start + get_runtime_offset();
+
+	__imx53_guf_vincell_init(fdt);
 }
 
 ENTRY_FUNCTION(start_imx53_guf_vincell, r0, r1, r2)
 {
-	__imx53_guf_vincell_init(0);
+	void *fdt = __dtb_imx53_guf_vincell_start + get_runtime_offset();
+
+	__imx53_guf_vincell_init(fdt);
 }
-- 
2.19.1


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



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux