southbridge/intel/bd82x6x: refactor rtc failure checking

In order to prepare for checking RTC failure in the early boot
paths move the rtc failure calculation to early_pch_common.c and
add a helper function to determine if failure occurred.

BUG=b:63054105

Change-Id: I710d99551cfb6455244f66b47fcbecc790ae770f
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/21558
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
diff --git a/src/southbridge/intel/bd82x6x/pch.h b/src/southbridge/intel/bd82x6x/pch.h
index dcd7b2e..51f3b94 100644
--- a/src/southbridge/intel/bd82x6x/pch.h
+++ b/src/southbridge/intel/bd82x6x/pch.h
@@ -103,6 +103,9 @@
 early_usb_init (const struct southbridge_usb_port *portmap);
 
 #endif
+
+/* Return non-zero when RTC failure happened. */
+int rtc_failure(void);
 #endif
 
 #define MAINBOARD_POWER_OFF	0