summaryrefslogtreecommitdiff
path: root/arch/arm/cpu/arm926ejs/mx25
diff options
context:
space:
mode:
authorFabio Estevam <fabio.estevam@freescale.com>2011-09-23 05:13:22 +0000
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>2011-09-30 22:01:05 +0200
commite6ec1761cd3c88631dd3d4e9e688e9abdf472cc9 (patch)
tree4e564c368a022d0b24d9f865986e43c2f1161c91 /arch/arm/cpu/arm926ejs/mx25
parent9ba24f17b290d1a20475125f5e04b0d9ba74a1a1 (diff)
zmx25: Fix build warning due to 'get_reset_cause' defined but not used
When building the zmx25 target we get: Configuring for zmx25 board... generic.c:108: warning: 'get_reset_cause' defined but not used Fix this warning by defining get_reset_cause only if CONFIG_DISPLAY_CPUINFO is defined. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Acked-by: Stefano Babic <sbabic@denx.de>
Diffstat (limited to 'arch/arm/cpu/arm926ejs/mx25')
-rw-r--r--arch/arm/cpu/arm926ejs/mx25/generic.c46
1 files changed, 23 insertions, 23 deletions
diff --git a/arch/arm/cpu/arm926ejs/mx25/generic.c b/arch/arm/cpu/arm926ejs/mx25/generic.c
index 126164020f..8e60a262eb 100644
--- a/arch/arm/cpu/arm926ejs/mx25/generic.c
+++ b/arch/arm/cpu/arm926ejs/mx25/generic.c
@@ -105,29 +105,6 @@ ulong imx_get_perclk (int clk)
return lldiv (fref, div);
}
-static char *get_reset_cause(void)
-{
- /* read RCSR register from CCM module */
- struct ccm_regs *ccm =
- (struct ccm_regs *)IMX_CCM_BASE;
-
- u32 cause = readl(&ccm->rcsr) & 0x0f;
-
- if (cause == 0)
- return "POR";
- else if (cause == 1)
- return "RST";
- else if ((cause & 2) == 2)
- return "WDOG";
- else if ((cause & 4) == 4)
- return "SW RESET";
- else if ((cause & 8) == 8)
- return "JTAG";
- else
- return "unknown reset";
-
-}
-
u32 get_cpu_rev(void)
{
u32 srev;
@@ -153,6 +130,29 @@ u32 get_cpu_rev(void)
}
#if defined(CONFIG_DISPLAY_CPUINFO)
+static char *get_reset_cause(void)
+{
+ /* read RCSR register from CCM module */
+ struct ccm_regs *ccm =
+ (struct ccm_regs *)IMX_CCM_BASE;
+
+ u32 cause = readl(&ccm->rcsr) & 0x0f;
+
+ if (cause == 0)
+ return "POR";
+ else if (cause == 1)
+ return "RST";
+ else if ((cause & 2) == 2)
+ return "WDOG";
+ else if ((cause & 4) == 4)
+ return "SW RESET";
+ else if ((cause & 8) == 8)
+ return "JTAG";
+ else
+ return "unknown reset";
+
+}
+
int print_cpuinfo (void)
{
char buf[32];