From: "Benoît Thébaudeau" <benoit.thebaudeau@advansee.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 4/4] mx5: Mark lowlevel_init board-specific code
Date: Tue, 14 Aug 2012 16:44:33 +0200 (CEST) [thread overview]
Message-ID: <633607689.2402754.1344955473539.JavaMail.root@advansee.com> (raw)
In-Reply-To: <1488400768.2402688.1344955435673.JavaMail.root@advansee.com>
The mx5 lowlevel_init.S contains board-specific code based on the reference
design. Let's keep it since it avoids creating new lowlevel_init files and it
may be used by many boards. But add a config to make it optional in order not to
cause issues on boards not following this part of the reference design.
Signed-off-by: Beno?t Th?baudeau <benoit.thebaudeau@advansee.com>
Cc: Stefano Babic <sbabic@denx.de>
---
.../arch/arm/cpu/armv7/mx5/lowlevel_init.S | 2 +-
.../doc/README.imx5 | 5 +++++
.../include/configs/efikamx.h | 1 +
.../include/configs/mx51evk.h | 1 +
.../include/configs/vision2.h | 1 +
5 files changed, 9 insertions(+), 1 deletion(-)
diff --git u-boot-4d3c95f.orig/arch/arm/cpu/armv7/mx5/lowlevel_init.S u-boot-4d3c95f/arch/arm/cpu/armv7/mx5/lowlevel_init.S
index d0f75fa..b25b3a7 100644
--- u-boot-4d3c95f.orig/arch/arm/cpu/armv7/mx5/lowlevel_init.S
+++ u-boot-4d3c95f/arch/arm/cpu/armv7/mx5/lowlevel_init.S
@@ -330,7 +330,7 @@ ENTRY(lowlevel_init)
mov r10, lr
mov r4, #0 /* Fix R4 to 0 */
-#if defined(CONFIG_MX51)
+#if defined(CONFIG_SYS_MAIN_PWR_ON)
ldr r0, =GPIO1_BASE_ADDR
ldr r1, [r0, #0x0]
orr r1, r1, #1 << 23
diff --git u-boot-4d3c95f.orig/doc/README.imx5 u-boot-4d3c95f/doc/README.imx5
index 938d3da..85d476f 100644
--- u-boot-4d3c95f.orig/doc/README.imx5
+++ u-boot-4d3c95f/doc/README.imx5
@@ -20,3 +20,8 @@ i.MX5x SoCs.
mode), which causes the effect of this failure to be much lower (in terms
of frequency deviation), avoiding system failure, or@least decreasing
the likelihood of system failure.
+
+1.3 CONFIG_SYS_MAIN_PWR_ON: Trigger MAIN_PWR_ON upon startup.
+ This option should be enabled for boards having a SYS_ON_OFF_CTL signal
+ connected to GPIO1[23] and triggering the MAIN_PWR_ON signal like in the
+ reference designs.
diff --git u-boot-4d3c95f.orig/include/configs/efikamx.h u-boot-4d3c95f/include/configs/efikamx.h
index 143b0f0..792b51b 100644
--- u-boot-4d3c95f.orig/include/configs/efikamx.h
+++ u-boot-4d3c95f/include/configs/efikamx.h
@@ -270,5 +270,6 @@
#define CONFIG_SYS_DDR_CLKSEL 0
#define CONFIG_SYS_CLKTL_CBCDR 0x59E35145
+#define CONFIG_SYS_MAIN_PWR_ON
#endif
diff --git u-boot-4d3c95f.orig/include/configs/mx51evk.h u-boot-4d3c95f/include/configs/mx51evk.h
index e975f54..6867f7b 100644
--- u-boot-4d3c95f.orig/include/configs/mx51evk.h
+++ u-boot-4d3c95f/include/configs/mx51evk.h
@@ -242,6 +242,7 @@
#define CONFIG_SYS_DDR_CLKSEL 0
#define CONFIG_SYS_CLKTL_CBCDR 0x59E35100
+#define CONFIG_SYS_MAIN_PWR_ON
/*-----------------------------------------------------------------------
* FLASH and environment organization
diff --git u-boot-4d3c95f.orig/include/configs/vision2.h u-boot-4d3c95f/include/configs/vision2.h
index ed004a6..3ce4906 100644
--- u-boot-4d3c95f.orig/include/configs/vision2.h
+++ u-boot-4d3c95f/include/configs/vision2.h
@@ -203,6 +203,7 @@
/* 166 MHz DDR RAM */
#define CONFIG_SYS_DDR_CLKSEL 0
#define CONFIG_SYS_CLKTL_CBCDR 0x19239100
+#define CONFIG_SYS_MAIN_PWR_ON
#define CONFIG_SYS_NO_FLASH
next prev parent reply other threads:[~2012-08-14 14:44 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-14 14:43 [U-Boot] [PATCH 1/4] mx5: cosmetic: Clean up lowlevel_init Benoît Thébaudeau
2012-08-14 14:44 ` [U-Boot] [PATCH 2/4] mx5: Optimize lowlevel_init code size Benoît Thébaudeau
2012-08-14 14:52 ` Otavio Salvador
2012-08-14 15:19 ` [U-Boot] [PATCH v2 " Benoît Thébaudeau
2012-09-30 12:47 ` Stefano Babic
2012-09-30 12:49 ` Stefano Babic
2012-08-14 14:44 ` [U-Boot] [PATCH 3/4] mx5: Optimize lowlevel_init for TO 3 Benoît Thébaudeau
2012-08-14 14:56 ` Otavio Salvador
2012-08-14 15:19 ` [U-Boot] [PATCH v2 " Benoît Thébaudeau
2012-08-20 8:20 ` Stefano Babic
2012-08-20 10:12 ` Benoît Thébaudeau
2012-08-14 14:44 ` Benoît Thébaudeau [this message]
2012-08-15 14:34 ` [U-Boot] [PATCH 4/4] mx5: Mark lowlevel_init board-specific code Benoît Thébaudeau
2012-11-05 20:07 ` [U-Boot] [PATCH v2] " Benoît Thébaudeau
2012-11-07 14:29 ` Stefano Babic
2012-11-16 22:42 ` Benoît Thébaudeau
2012-11-19 7:42 ` Stefano Babic
2012-11-19 7:57 ` Stefano Babic
2012-08-14 14:51 ` [U-Boot] [PATCH 1/4] mx5: cosmetic: Clean up lowlevel_init Otavio Salvador
2012-08-14 15:18 ` [U-Boot] [PATCH v2 " Benoît Thébaudeau
2012-08-17 11:41 ` Stefano Babic
2012-08-20 7:56 ` Stefano Babic
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=633607689.2402754.1344955473539.JavaMail.root@advansee.com \
--to=benoit.thebaudeau@advansee.com \
--cc=u-boot@lists.denx.de \
/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