From: Sascha Hauer <s.hauer@pengutronix.de>
To: Barebox List <barebox@lists.infradead.org>
Subject: [PATCH 1/6] ARM: i.MX Phytec phycard i.MX27: get fdt in common init function
Date: Tue, 18 Feb 2020 16:37:27 +0100 [thread overview]
Message-ID: <20200218153732.14845-2-s.hauer@pengutronix.de> (raw)
In-Reply-To: <20200218153732.14845-1-s.hauer@pengutronix.de>
No need to get the fdt pointer in the entry functions, we can do this
later.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
.../boards/phytec-phycard-imx27/lowlevel.c | 21 +++++++------------
1 file changed, 8 insertions(+), 13 deletions(-)
diff --git a/arch/arm/boards/phytec-phycard-imx27/lowlevel.c b/arch/arm/boards/phytec-phycard-imx27/lowlevel.c
index bd46df0962..ded85ee80f 100644
--- a/arch/arm/boards/phytec-phycard-imx27/lowlevel.c
+++ b/arch/arm/boards/phytec-phycard-imx27/lowlevel.c
@@ -77,8 +77,11 @@ static void sdram_init(int sdram)
MX27_ESDCTL_BASE_ADDR + IMX_ESDCTL0);
}
-static void __bare_init __naked phytec_phycard_imx27_common_init(void *fdt, int sdram)
+extern char __dtb_imx27_phytec_phycard_s_rdk_bb_start[];
+
+static void __bare_init __naked phytec_phycard_imx27_common_init(int sdram)
{
+ void *fdt;
unsigned long r;
arm_cpu_lowlevel_init();
@@ -89,6 +92,8 @@ static void __bare_init __naked phytec_phycard_imx27_common_init(void *fdt, int
writel(0x00000000, MX27_AIPI_BASE_ADDR + MX27_AIPI2_PSR0);
writel(0xffffffff, MX27_AIPI_BASE_ADDR + MX27_AIPI2_PSR1);
+ fdt = __dtb_imx27_phytec_phycard_s_rdk_bb_start + get_runtime_offset();
+
/* Skip SDRAM initialization if we run from RAM */
r = get_pc();
if (r > 0xa0000000 && r < 0xc0000000)
@@ -120,26 +125,16 @@ static void __bare_init __naked phytec_phycard_imx27_common_init(void *fdt, int
imx27_barebox_boot_nand_external(fdt);
}
-extern char __dtb_imx27_phytec_phycard_s_rdk_bb_start[];
-
ENTRY_FUNCTION(start_phytec_phycard_imx27_64mb, r0, r1, r2)
{
- void *fdt;
-
arm_setup_stack(MX27_IRAM_BASE_ADDR + MX27_IRAM_SIZE);
- fdt = __dtb_imx27_phytec_phycard_s_rdk_bb_start + get_runtime_offset();
-
- phytec_phycard_imx27_common_init(fdt, PHYCARD_MICRON_64MB);
+ phytec_phycard_imx27_common_init(PHYCARD_MICRON_64MB);
}
ENTRY_FUNCTION(start_phytec_phycard_imx27_128mb, r0, r1, r2)
{
- void *fdt;
-
arm_setup_stack(MX27_IRAM_BASE_ADDR + MX27_IRAM_SIZE);
- fdt = __dtb_imx27_phytec_phycard_s_rdk_bb_start + get_runtime_offset();
-
- phytec_phycard_imx27_common_init(fdt, PHYCARD_MICRON_128MB);
+ phytec_phycard_imx27_common_init(PHYCARD_MICRON_128MB);
}
--
2.25.0
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2020-02-18 15:37 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-18 15:37 [PATCH 0/6] i.MX: Fix external NAND boot Sascha Hauer
2020-02-18 15:37 ` Sascha Hauer [this message]
2020-02-18 15:37 ` [PATCH 2/6] ARM: i.MX Phytec phycard i.MX27: replace __naked with noinline Sascha Hauer
2020-02-18 15:37 ` [PATCH 3/6] ARM: i.MX Phytec phycore " Sascha Hauer
2020-02-18 15:37 ` [PATCH 4/6] ARM: i.MX: external NAND boot: remove unnecessary arguments from imx*_nand_load_image Sascha Hauer
2020-02-18 15:37 ` [PATCH 5/6] ARM: i.MX: external NAND boot: Leave icache disabled Sascha Hauer
2020-02-19 6:23 ` Oleksij Rempel
2020-02-19 8:27 ` Sascha Hauer
2020-02-19 11:53 ` Lucas Stach
2020-02-18 15:37 ` [PATCH 6/6] ARM: i.MX: external NAND boot: Fix passing boarddata 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=20200218153732.14845-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