kernel/prism: care and feeding of the watchdog

It seems like we are being neglectful: Pet the watchdog once again
before the SPI flash is initialized since we seem to be cutting it
pretty close to the timeout still.

Change-Id: I4f6a50b2a1bbdc43a2c98f76bd340da9d840b846
diff --git a/arch/arm/plat-feroceon/mv_hal/sflash/mvSFlash.c b/arch/arm/plat-feroceon/mv_hal/sflash/mvSFlash.c
index bd1dc5f..71e0abf 100755
--- a/arch/arm/plat-feroceon/mv_hal/sflash/mvSFlash.c
+++ b/arch/arm/plat-feroceon/mv_hal/sflash/mvSFlash.c
@@ -69,6 +69,9 @@
 #include "mvSFlashSpec.h"
 #include "mvSysSFlash.h"
 
+#include "cntmr/mvCntmr.h"
+#include <plat/orion_wdt.h>
+#include <boardEnv/mvBoardEnvLib.h>
 
 /*#define MV_DEBUG*/
 #ifdef MV_DEBUG
@@ -604,6 +607,16 @@
     MV_U32 indx;
     MV_U8 cmd;
     MV_BOOL detectFlag = MV_FALSE;
+    MV_U32 mvTclk;
+    MV_U32 wdt_time_remaining;
+
+    /* Pet the watchdog. */
+    mvTclk = mvBoardTclkGet();
+    wdt_time_remaining = mvCntmrRead(WATCHDOG);
+    printk("Orion wdt: %d seconds remaining\n", wdt_time_remaining/mvTclk);
+    mvCntmrWrite(WATCHDOG, 0xffffffff);
+    wdt_time_remaining = mvCntmrRead(WATCHDOG);
+    printk("Orion wdt: reset to %d seconds\n", wdt_time_remaining/mvTclk);
 
     /* check for NULL pointer */
     if (pFlinfo == NULL) {