[U-Boot] [PATCH] arm: imx: Fix conflicting definition types of 'get_reset_cause'

Otavio Salvador otavio at ossystems.com.br
Mon Mar 2 19:10:58 CET 2015


The common i.MX definition of 'get_reset_cause' function is non-static
so the overriden ones should follow it. This fixes following error:

,----
|  arch/arm/imx-common/cpu.c:29:14: error: static declaration
|   of 'get_reset_cause' follows non-static declaration
|   static char *get_reset_cause(void)
`----

The fix has been done in all i.MX based SoCs plus vf610.

Fixes [YOCTO: #7384].

Signed-off-by: Otavio Salvador <otavio at ossystems.com.br>
---

 arch/arm/cpu/arm1136/mx31/generic.c   | 2 +-
 arch/arm/cpu/arm1136/mx35/generic.c   | 2 +-
 arch/arm/cpu/arm926ejs/mx25/generic.c | 2 +-
 arch/arm/cpu/armv7/vf610/generic.c    | 2 +-
 arch/arm/imx-common/cpu.c             | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/arch/arm/cpu/arm1136/mx31/generic.c b/arch/arm/cpu/arm1136/mx31/generic.c
index 060d46b..df8ebfc 100644
--- a/arch/arm/cpu/arm1136/mx31/generic.c
+++ b/arch/arm/cpu/arm1136/mx31/generic.c
@@ -180,7 +180,7 @@ u32 get_cpu_rev(void)
 	return srev | 0x8000;
 }
 
-static char *get_reset_cause(void)
+char *get_reset_cause(void)
 {
 	/* read RCSR register from CCM module */
 	struct clock_control_regs *ccm =
diff --git a/arch/arm/cpu/arm1136/mx35/generic.c b/arch/arm/cpu/arm1136/mx35/generic.c
index bc98edd..6dd8116 100644
--- a/arch/arm/cpu/arm1136/mx35/generic.c
+++ b/arch/arm/cpu/arm1136/mx35/generic.c
@@ -396,7 +396,7 @@ U_BOOT_CMD(
 );
 
 #if defined(CONFIG_DISPLAY_CPUINFO)
-static char *get_reset_cause(void)
+char *get_reset_cause(void)
 {
 	/* read RCSR register from CCM module */
 	struct ccm_regs *ccm =
diff --git a/arch/arm/cpu/arm926ejs/mx25/generic.c b/arch/arm/cpu/arm926ejs/mx25/generic.c
index 8912098..9f37f4d 100644
--- a/arch/arm/cpu/arm926ejs/mx25/generic.c
+++ b/arch/arm/cpu/arm926ejs/mx25/generic.c
@@ -149,7 +149,7 @@ u32 get_cpu_rev(void)
 }
 
 #if defined(CONFIG_DISPLAY_CPUINFO)
-static char *get_reset_cause(void)
+char *get_reset_cause(void)
 {
 	/* read RCSR register from CCM module */
 	struct ccm_regs *ccm =
diff --git a/arch/arm/cpu/armv7/vf610/generic.c b/arch/arm/cpu/armv7/vf610/generic.c
index 92aaad9..aea0c0d 100644
--- a/arch/arm/cpu/armv7/vf610/generic.c
+++ b/arch/arm/cpu/armv7/vf610/generic.c
@@ -258,7 +258,7 @@ void imx_get_mac_from_fuse(int dev_id, unsigned char *mac)
 #endif
 
 #if defined(CONFIG_DISPLAY_CPUINFO)
-static char *get_reset_cause(void)
+char *get_reset_cause(void)
 {
 	u32 cause;
 	struct src *src_regs = (struct src *)SRC_BASE_ADDR;
diff --git a/arch/arm/imx-common/cpu.c b/arch/arm/imx-common/cpu.c
index 067d08f..b985f18 100644
--- a/arch/arm/imx-common/cpu.c
+++ b/arch/arm/imx-common/cpu.c
@@ -26,7 +26,7 @@
 
 static u32 reset_cause = -1;
 
-static char *get_reset_cause(void)
+char *get_reset_cause(void)
 {
 	u32 cause;
 	struct src *src_regs = (struct src *)SRC_BASE_ADDR;
-- 
2.1.4



More information about the U-Boot mailing list