From: Sascha Hauer <s.hauer@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 14/22] ARM: i.MX: external NAND boot: pass boarddata
Date: Fri, 17 Jan 2014 16:03:24 +0100 [thread overview]
Message-ID: <1389971012-22977-15-git-send-email-s.hauer@pengutronix.de> (raw)
In-Reply-To: <1389971012-22977-1-git-send-email-s.hauer@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/boards/eukrea_cpuimx25/lowlevel.c | 2 +-
arch/arm/boards/eukrea_cpuimx27/lowlevel_init.S | 1 +
arch/arm/boards/eukrea_cpuimx35/lowlevel.c | 2 +-
arch/arm/boards/freescale-mx25-3-stack/lowlevel_init.S | 1 +
arch/arm/boards/freescale-mx35-3-stack/lowlevel_init.S | 1 +
arch/arm/boards/guf-cupid/lowlevel.c | 2 +-
arch/arm/boards/guf-neso/lowlevel.c | 2 +-
arch/arm/boards/karo-tx25/lowlevel.c | 2 +-
arch/arm/boards/pcm037/lowlevel.c | 2 +-
arch/arm/boards/pcm038/lowlevel.c | 2 +-
arch/arm/boards/pcm043/lowlevel.c | 2 +-
arch/arm/boards/phycard-i.MX27/lowlevel.c | 2 +-
arch/arm/mach-imx/external-nand-boot.c | 14 ++++++++------
arch/arm/mach-imx/include/mach/imx-nand.h | 10 +++++-----
14 files changed, 25 insertions(+), 20 deletions(-)
diff --git a/arch/arm/boards/eukrea_cpuimx25/lowlevel.c b/arch/arm/boards/eukrea_cpuimx25/lowlevel.c
index 11d990d..07659f5 100644
--- a/arch/arm/boards/eukrea_cpuimx25/lowlevel.c
+++ b/arch/arm/boards/eukrea_cpuimx25/lowlevel.c
@@ -131,7 +131,7 @@ void __bare_init __naked barebox_arm_reset_vector(void)
/* setup a stack to be able to call imx25_barebox_boot_nand_external() */
arm_setup_stack(STACK_BASE + STACK_SIZE - 12);
- imx25_barebox_boot_nand_external();
+ imx25_barebox_boot_nand_external(0);
#endif
out:
imx25_barebox_entry(0);
diff --git a/arch/arm/boards/eukrea_cpuimx27/lowlevel_init.S b/arch/arm/boards/eukrea_cpuimx27/lowlevel_init.S
index a85b00d..ae1391c 100644
--- a/arch/arm/boards/eukrea_cpuimx27/lowlevel_init.S
+++ b/arch/arm/boards/eukrea_cpuimx27/lowlevel_init.S
@@ -127,6 +127,7 @@ barebox_arm_reset_vector:
/* Setup a temporary stack in SDRAM */
ldr sp, =MX27_IRAM_BASE_ADDR + MX27_IRAM_SIZE - 4;
+ mov r0, #0
b imx27_barebox_boot_nand_external
#endif /* CONFIG_NAND_IMX_BOOT */
diff --git a/arch/arm/boards/eukrea_cpuimx35/lowlevel.c b/arch/arm/boards/eukrea_cpuimx35/lowlevel.c
index a667e4c..d03e110 100644
--- a/arch/arm/boards/eukrea_cpuimx35/lowlevel.c
+++ b/arch/arm/boards/eukrea_cpuimx35/lowlevel.c
@@ -140,7 +140,7 @@ void __bare_init __naked barebox_arm_reset_vector(void)
/* setup a stack to be able to call imx35_barebox_boot_nand_external() */
arm_setup_stack(MX35_IRAM_BASE_ADDR + MX35_IRAM_SIZE - 8);
- imx35_barebox_boot_nand_external();
+ imx35_barebox_boot_nand_external(0);
#endif
out:
imx35_barebox_entry(0);
diff --git a/arch/arm/boards/freescale-mx25-3-stack/lowlevel_init.S b/arch/arm/boards/freescale-mx25-3-stack/lowlevel_init.S
index 174262d..8446c6f 100644
--- a/arch/arm/boards/freescale-mx25-3-stack/lowlevel_init.S
+++ b/arch/arm/boards/freescale-mx25-3-stack/lowlevel_init.S
@@ -101,6 +101,7 @@ barebox_arm_reset_vector:
/* Setup a temporary stack in SRAM */
ldr sp, =MX25_IRAM_BASE_ADDR + MX25_IRAM_SIZE - 4
+ mov r0, #0
b imx25_barebox_boot_nand_external
#endif /* CONFIG_NAND_IMX_BOOT */
diff --git a/arch/arm/boards/freescale-mx35-3-stack/lowlevel_init.S b/arch/arm/boards/freescale-mx35-3-stack/lowlevel_init.S
index 2844465..cb9ed0a 100644
--- a/arch/arm/boards/freescale-mx35-3-stack/lowlevel_init.S
+++ b/arch/arm/boards/freescale-mx35-3-stack/lowlevel_init.S
@@ -158,6 +158,7 @@ barebox_arm_reset_vector:
/* Setup a temporary stack in internal SRAM */
ldr sp, =MX35_IRAM_BASE_ADDR + MX35_IRAM_SIZE - 4
+ mov r0, #0
b imx35_barebox_boot_nand_external
#endif /* CONFIG_NAND_IMX_BOOT */
diff --git a/arch/arm/boards/guf-cupid/lowlevel.c b/arch/arm/boards/guf-cupid/lowlevel.c
index d5298c1..d5dce16 100644
--- a/arch/arm/boards/guf-cupid/lowlevel.c
+++ b/arch/arm/boards/guf-cupid/lowlevel.c
@@ -316,7 +316,7 @@ void __bare_init __naked barebox_arm_reset_vector(void)
/* setup a stack to be able to call imx35_barebox_boot_nand_external() */
arm_setup_stack(MX35_IRAM_BASE_ADDR + MX35_IRAM_SIZE - 8);
- imx35_barebox_boot_nand_external();
+ imx35_barebox_boot_nand_external(0);
#endif
out:
imx35_barebox_entry(0);
diff --git a/arch/arm/boards/guf-neso/lowlevel.c b/arch/arm/boards/guf-neso/lowlevel.c
index 386751d..c3323ee 100644
--- a/arch/arm/boards/guf-neso/lowlevel.c
+++ b/arch/arm/boards/guf-neso/lowlevel.c
@@ -90,7 +90,7 @@ void __bare_init __naked barebox_arm_reset_vector(void)
/* setup a stack to be able to call imx27_barebox_boot_nand_external() */
arm_setup_stack(MX27_IRAM_BASE_ADDR + MX27_IRAM_SIZE - 8);
- imx27_barebox_boot_nand_external();
+ imx27_barebox_boot_nand_external(0);
#endif
out:
imx27_barebox_entry(0);
diff --git a/arch/arm/boards/karo-tx25/lowlevel.c b/arch/arm/boards/karo-tx25/lowlevel.c
index 742100d..11f4138 100644
--- a/arch/arm/boards/karo-tx25/lowlevel.c
+++ b/arch/arm/boards/karo-tx25/lowlevel.c
@@ -161,7 +161,7 @@ void __bare_init __naked barebox_arm_reset_vector(void)
/* setup a stack to be able to call imx25_barebox_boot_nand_external() */
arm_setup_stack(MX25_IRAM_BASE_ADDR + MX25_IRAM_SIZE - 8);
- imx25_barebox_boot_nand_external();
+ imx25_barebox_boot_nand_external(0);
#endif
out:
imx25_barebox_entry(0);
diff --git a/arch/arm/boards/pcm037/lowlevel.c b/arch/arm/boards/pcm037/lowlevel.c
index b81a24f..ae2d8c0 100644
--- a/arch/arm/boards/pcm037/lowlevel.c
+++ b/arch/arm/boards/pcm037/lowlevel.c
@@ -129,7 +129,7 @@ void __bare_init __naked barebox_arm_reset_vector(void)
/* setup a stack to be able to call imx31_barebox_boot_nand_external() */
arm_setup_stack(MX31_IRAM_BASE_ADDR + MX31_IRAM_SIZE - 12);
- imx31_barebox_boot_nand_external();
+ imx31_barebox_boot_nand_external(0);
#else
imx31_barebox_entry(0);
#endif
diff --git a/arch/arm/boards/pcm038/lowlevel.c b/arch/arm/boards/pcm038/lowlevel.c
index 0ea2939..bb948f1 100644
--- a/arch/arm/boards/pcm038/lowlevel.c
+++ b/arch/arm/boards/pcm038/lowlevel.c
@@ -97,7 +97,7 @@ void __bare_init __naked barebox_arm_reset_vector(void)
/* setup a stack to be able to call mx27_barebox_boot_nand_external() */
arm_setup_stack(MX27_IRAM_BASE_ADDR + MX27_IRAM_SIZE - 8);
- imx27_barebox_boot_nand_external();
+ imx27_barebox_boot_nand_external(0);
#endif
out:
imx27_barebox_entry(0);
diff --git a/arch/arm/boards/pcm043/lowlevel.c b/arch/arm/boards/pcm043/lowlevel.c
index ebd6b29..64b0382 100644
--- a/arch/arm/boards/pcm043/lowlevel.c
+++ b/arch/arm/boards/pcm043/lowlevel.c
@@ -192,7 +192,7 @@ void __bare_init __naked barebox_arm_reset_vector(void)
/* setup a stack to be able to call imx35_barebox_boot_nand_external() */
arm_setup_stack(MX35_IRAM_BASE_ADDR + MX35_IRAM_SIZE - 8);
- imx35_barebox_boot_nand_external();
+ imx35_barebox_boot_nand_external(0);
#endif
out:
imx35_barebox_entry(0);
diff --git a/arch/arm/boards/phycard-i.MX27/lowlevel.c b/arch/arm/boards/phycard-i.MX27/lowlevel.c
index 9f5dfff..33de1c0 100644
--- a/arch/arm/boards/phycard-i.MX27/lowlevel.c
+++ b/arch/arm/boards/phycard-i.MX27/lowlevel.c
@@ -100,7 +100,7 @@ void __bare_init __naked barebox_arm_reset_vector(void)
sdram_init();
#ifdef CONFIG_NAND_IMX_BOOT
- imx27_barebox_boot_nand_external();
+ imx27_barebox_boot_nand_external(0);
#else
imx27_barebox_entry(0);
#endif
diff --git a/arch/arm/mach-imx/external-nand-boot.c b/arch/arm/mach-imx/external-nand-boot.c
index a1956f0..7623c07 100644
--- a/arch/arm/mach-imx/external-nand-boot.c
+++ b/arch/arm/mach-imx/external-nand-boot.c
@@ -314,7 +314,8 @@ static inline int imx35_pagesize_2k(void)
#define DEFINE_EXTERNAL_NAND_ENTRY(soc) \
\
-BARE_INIT_FUNCTION(imx##soc##_boot_nand_external_cont)(void) \
+BARE_INIT_FUNCTION(imx##soc##_boot_nand_external_cont) \
+ (uint32_t boarddata) \
{ \
unsigned long nfc_base = MX##soc##_NFC_BASE_ADDR; \
unsigned long sdram = MX##soc##_CSD0_BASE_ADDR; \
@@ -324,10 +325,11 @@ BARE_INIT_FUNCTION(imx##soc##_boot_nand_external_cont)(void) \
(void *)nfc_base, \
imx##soc##_pagesize_2k()); \
\
- imx##soc##_barebox_entry(0); \
+ imx##soc##_barebox_entry(boarddata); \
} \
\
-BARE_INIT_FUNCTION(imx##soc##_barebox_boot_nand_external)(void) \
+BARE_INIT_FUNCTION(imx##soc##_barebox_boot_nand_external) \
+ (uint32_t boarddata) \
{ \
unsigned long nfc_base = MX##soc##_NFC_BASE_ADDR; \
unsigned long sdram = MX##soc##_CSD0_BASE_ADDR; \
@@ -335,12 +337,12 @@ BARE_INIT_FUNCTION(imx##soc##_barebox_boot_nand_external)(void) \
u32 r; \
u32 *src, *trg; \
int i; \
- void __noreturn (*fn)(void); \
+ void __noreturn (*fn)(uint32_t); \
\
/* skip NAND boot if not running from NFC space */ \
r = get_pc(); \
if (r < nfc_base || r > nfc_base + 0x800) \
- imx##soc##_barebox_entry(0); \
+ imx##soc##_barebox_entry(boarddata); \
\
src = (unsigned int *)nfc_base; \
trg = (unsigned int *)sdram; \
@@ -364,7 +366,7 @@ BARE_INIT_FUNCTION(imx##soc##_barebox_boot_nand_external)(void) \
\
fn = (void *)__fn; \
\
- fn(); \
+ fn(boarddata); \
}
#ifdef BROKEN
diff --git a/arch/arm/mach-imx/include/mach/imx-nand.h b/arch/arm/mach-imx/include/mach/imx-nand.h
index 9e6416e..972a0da 100644
--- a/arch/arm/mach-imx/include/mach/imx-nand.h
+++ b/arch/arm/mach-imx/include/mach/imx-nand.h
@@ -3,11 +3,11 @@
#include <linux/mtd/mtd.h>
-void imx21_barebox_boot_nand_external(void);
-void imx25_barebox_boot_nand_external(void);
-void imx27_barebox_boot_nand_external(void);
-void imx31_barebox_boot_nand_external(void);
-void imx35_barebox_boot_nand_external(void);
+void imx21_barebox_boot_nand_external(uint32_t boarddata);
+void imx25_barebox_boot_nand_external(uint32_t boarddata);
+void imx27_barebox_boot_nand_external(uint32_t boarddata);
+void imx31_barebox_boot_nand_external(uint32_t boarddata);
+void imx35_barebox_boot_nand_external(uint32_t boarddata);
void imx_nand_set_layout(int writesize, int datawidth);
struct imx_nand_platform_data {
--
1.8.5.2
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2014-01-17 15:04 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-17 15:03 phyCARD-i.MX27 patches Sascha Hauer
2014-01-17 15:03 ` [PATCH 01/22] ARM: Karo TX25: register external NAND boot update handler Sascha Hauer
2014-01-17 15:03 ` [PATCH 02/22] ARM: phyCARD-i.MX27: increase barebox partition Sascha Hauer
2014-01-18 19:16 ` Alexander Aring
2014-01-19 14:19 ` Alexander Aring
2014-01-20 9:28 ` Sascha Hauer
2014-01-17 15:03 ` [PATCH 03/22] ARM: phyCARD-i.MX27: register barebox update handler Sascha Hauer
2014-01-17 15:03 ` [PATCH 04/22] ARM: phyCARD-i.MX27: switch to new environment Sascha Hauer
2014-01-17 15:03 ` [PATCH 05/22] ARM: phyCARD-i.MX27: convert lowlevel init to c code Sascha Hauer
2014-01-17 15:03 ` [PATCH 06/22] ARM: i.MX27: Add missing MPLL clock sources Sascha Hauer
2014-01-17 15:03 ` [PATCH 07/22] ARM: phyCARD-i.MX27: Update defconfig Sascha Hauer
2014-01-17 15:03 ` [PATCH 08/22] ARM: Fix image size calculation for CONFIG_PBL_RELOCATABLE Sascha Hauer
2014-01-17 15:03 ` [PATCH 09/22] ARM: i.MX: external NAND boot: factor out a 2k pagesize detection function Sascha Hauer
2014-01-17 15:03 ` [PATCH 10/22] ARM: i.MX: external NAND boot: create function macro for different SoCs Sascha Hauer
2014-01-17 15:03 ` [PATCH 11/22] ARM: i.MX: external NAND boot: make it work with relocatable PBL Sascha Hauer
2014-01-17 15:03 ` [PATCH 12/22] ARM: dts: Add i.MX27 devicetree files Sascha Hauer
2014-01-17 16:35 ` Alexander Shiyan
2014-01-17 15:03 ` [PATCH 13/22] ARM: dts: Add Phytec phyCARD-i.MX27 " Sascha Hauer
2014-01-17 16:26 ` Alexander Shiyan
2014-01-17 17:56 ` Sascha Hauer
2014-01-17 15:03 ` Sascha Hauer [this message]
2014-01-17 15:03 ` [PATCH 15/22] pinctrl: Add pinctrl driver for i.MX1/21/27 Sascha Hauer
2014-01-17 15:13 ` Alexander Shiyan
2014-01-17 17:55 ` Sascha Hauer
2014-01-17 15:03 ` [PATCH 16/22] ARM: i.MX clocksource: return successful for multiple instances Sascha Hauer
2014-01-17 15:03 ` [PATCH 17/22] ARM: phycard-i.MX27: Add NAND support to dts Sascha Hauer
2014-01-17 15:03 ` [PATCH 18/22] ARM: phycard-i.MX27: Add stdout-path property Sascha Hauer
2014-01-17 15:03 ` [PATCH 19/22] ARM: dts: phycard-i.MX27: Add environment and NAND partitioning Sascha Hauer
2014-01-17 16:20 ` Alexander Shiyan
2014-01-20 9:50 ` Sascha Hauer
2014-01-17 15:03 ` [PATCH 20/22] ARM: dts: phycard-i.MX27: Add sdhc2 pinctrl Sascha Hauer
2014-01-18 18:09 ` Alexander Aring
2014-01-20 9:52 ` Sascha Hauer
2014-01-17 15:03 ` [PATCH 21/22] mci: imx: Add devicetree probe support Sascha Hauer
2014-01-17 15:03 ` [PATCH 22/22] ARM: phyCARD-i.MX27: Switch to " 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=1389971012-22977-15-git-send-email-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