From: Sascha Hauer <s.hauer@pengutronix.de>
To: Barebox List <barebox@lists.infradead.org>
Subject: [PATCH 2/2] ARM: i.MX: GuF Vincell: Make pbl smaller
Date: Tue, 20 Nov 2018 08:49:01 +0100 [thread overview]
Message-ID: <20181120074901.22338-2-s.hauer@pengutronix.de> (raw)
In-Reply-To: <20181120074901.22338-1-s.hauer@pengutronix.de>
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@pengutronix.de>
---
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@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
prev parent reply other threads:[~2018-11-20 7:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-20 7:49 [PATCH 1/2] ARM: i.MX: GuF Vincell: Use DCD table to setup SDRAM Sascha Hauer
2018-11-20 7:49 ` Sascha Hauer [this message]
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=20181120074901.22338-2-s.hauer@pengutronix.de \
--to=s.hauer@pengutronix.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