arm: sc8830: remove build warnings
[profile/mobile/platform/kernel/u-boot-tm1.git] / arch / arm / cpu / armv7 / sc8830 / check_reboot.c
index f751d8f..7a936e4 100644 (file)
@@ -1,3 +1,4 @@
+#include <common.h>
 #include <asm/arch/sci_types.h>
 #include <asm/arch/sc_reg.h>
 #include <boot_mode.h>
 #define debugf(fmt, args...)
 #endif
 
-
 extern int hw_watchdog_rst_pending(void);
-extern inline int is_7s_reset(void);
+extern int is_7s_reset(void);
 extern int is_7s_reset_for_systemdump(void);
-extern inline int is_hw_smpl_enable(void);
+extern int is_hw_smpl_enable(void);
 __attribute__ ((gnu_inline))inline int is_smpl_bootup(void);
+extern void reset_cpu(ulong ignored);
+extern void power_down_cpu(ulong ignored);
+extern int sci_glb_set(u32 reg, u32 bit);
+extern int sprd_eic_get(unsigned offset);
+extern int sprd_eic_request(unsigned offset);
+
 unsigned check_reboot_mode(void)
 {
-       unsigned val, rst_mode= 0;
+       unsigned rst_mode= 0;
        unsigned hw_rst_mode = ANA_REG_GET(ANA_REG_GLB_POR_SRC_FLAG);
        debugf("hw_rst_mode==%x\n", hw_rst_mode);
 
@@ -120,7 +126,22 @@ unsigned check_reboot_mode(void)
 
 }
 
-int get_mode_from_gpio()
+int charger_connected(void)
+{
+       sprd_eic_request(EIC_CHG_INT);
+       udelay(3000);
+       debugf("eica status %x\n", sprd_eic_get(EIC_CHG_INT));
+#ifdef  CONFIG_SHARK_PAD_HW_V102
+       sprd_eic_request(EIC_USB_DETECT);
+       udelay(3000);
+       debugf("eica status %x\n", sprd_eic_get(EIC_USB_DETECT));
+       return (!!sprd_eic_get(EIC_USB_DETECT)) ||(!!sprd_eic_get(EIC_CHG_INT));
+#else
+       return !!sprd_eic_get(EIC_CHG_INT);
+#endif
+}
+
+int get_mode_from_gpio(void)
 {
        int ret = 0;
        unsigned hw_rst_mode;
@@ -187,21 +208,6 @@ int power_button_pressed(void)
 
 }
 
-int charger_connected(void)
-{
-       sprd_eic_request(EIC_CHG_INT);
-       udelay(3000);
-       debugf("eica status %x\n", sprd_eic_get(EIC_CHG_INT));
-#ifdef  CONFIG_SHARK_PAD_HW_V102
-       sprd_eic_request(EIC_USB_DETECT);
-       udelay(3000);
-       debugf("eica status %x\n", sprd_eic_get(EIC_USB_DETECT));
-       return (!!sprd_eic_get(EIC_USB_DETECT)) ||(!!sprd_eic_get(EIC_CHG_INT));
-#else
-       return !!sprd_eic_get(EIC_CHG_INT);
-#endif
-}
-
 int alarm_triggered(void)
 {
        //printf("ANA_RTC_INT_RSTS is 0x%x\n", ANA_RTC_INT_RSTS);