]> git.sur5r.net Git - u-boot/commitdiff
MX31: Make get_reset_cause() static and drop unreachable code
authorStefano Babic <sbabic@denx.de>
Tue, 17 May 2011 11:45:41 +0000 (13:45 +0200)
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>
Mon, 23 May 2011 06:36:46 +0000 (08:36 +0200)
get_reset_cause() should not be exported. Drop code in the function
after return statement that can generate warnings due to unreachable code.

Signed-off-by: Stefano Babic <sbabic@denx.de>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
arch/arm/cpu/arm1136/mx31/generic.c

index fccd2cdaa85485366eb76ead7c573bc48f6d8519..4ebf38d7656532e66e688d7a658b381462db9e80 100644 (file)
@@ -133,7 +133,7 @@ u32 get_cpu_rev(void)
        return srev | 0x8000;
 }
 
-char *get_reset_cause(void)
+static char *get_reset_cause(void)
 {
        /* read RCSR register from CCM module */
        struct clock_control_regs *ccm =
@@ -144,16 +144,12 @@ char *get_reset_cause(void)
        switch (cause) {
        case 0x0000:
                return "POR";
-               break;
        case 0x0001:
                return "RST";
-               break;
        case 0x0002:
                return "WDOG";
-               break;
        case 0x0006:
                return "JTAG";
-               break;
        default:
                return "unknown reset";
        }