summaryrefslogtreecommitdiff
path: root/cesar/hal/phy/src/phy.c
diff options
context:
space:
mode:
authorNicolas Schodet2012-03-08 09:43:42 +0100
committerNicolas Schodet2012-03-20 10:24:44 +0100
commitfbae575df21ead5ee3218f518f9da04cc631201a (patch)
tree51c44229d927cac5780e8b5b64da09859636ce72 /cesar/hal/phy/src/phy.c
parentcc0e0fe768c3b7fe6588080e42d421e7bb9d6859 (diff)
cesar/hal/phy: add config item to disable access timer watchdog
This is needed to free a timer for test_phy.
Diffstat (limited to 'cesar/hal/phy/src/phy.c')
-rw-r--r--cesar/hal/phy/src/phy.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/cesar/hal/phy/src/phy.c b/cesar/hal/phy/src/phy.c
index a1ada6f797..56cfbce972 100644
--- a/cesar/hal/phy/src/phy.c
+++ b/cesar/hal/phy/src/phy.c
@@ -29,6 +29,7 @@
#include "config/phy/trace/more.h"
#include "config/phy/cap.h"
+#include "config/phy/access/watchdog.h"
#include "lib/stats.h"
#include "lib/fixed.h"
@@ -172,11 +173,13 @@ phy_isr (cyg_vector_t vector, cyg_addrword_t data)
bool call_dsr;
dbg_claim (BF_GET (LEON_ITC2_STATUS_HIGH__IP, LEON_ITC2_STATUS_HIGH));
uint it = BF_GET (LEON_ITC2_STATUS_HIGH__IRL, LEON_ITC2_STATUS_HIGH);
+#if CONFIG_PHY_ACCESS_WATCHDOG
/* Keep/reset watchdog state. */
bool watchdog_expired = !(PHY_PRATIC_TIMER_7_CTRL
& BF_MASK (PHY_PRATIC_TIMER_X_CTRL__VALID));
if (!(PHY_PRATIC_TIMER_1_CTRL & BF_MASK (PHY_PRATIC_TIMER_X_CTRL__VALID)))
PHY_PRATIC_TIMER_7_CTRL = 0;
+#endif
/* Acknowledge right now to detect all PBDMA interrupts. */
LEON_ITC2_CLEAR = 1 << it;
LEON_ITC1_CLEAR = 1 << LEON_ITC2_HIGH_PRIORITY_ITC1_IT;
@@ -234,6 +237,7 @@ phy_isr (cyg_vector_t vector, cyg_addrword_t data)
{
trace_do (u32 eff_date = PHY_PRATIC_TIMER_1_EFFECTIVE_DATE;)
PHY_TRACE (ACCESS_CB, phy_date (), eff_date);
+#if CONFIG_PHY_ACCESS_WATCHDOG
if (watchdog_expired)
{
ctx->stats.watchdog_expired++;
@@ -258,6 +262,7 @@ phy_isr (cyg_vector_t vector, cyg_addrword_t data)
dbg_fatal ("hardware freeze, no ACCESS, no RESYS");
}
else
+#endif
PHY_TRACE_DATE_WARNING (eff_date + PHY_INTERRUPT_DELAY_MAX_TCK);
call_dsr = ctx->access_cb (ctx->user_data);
/* Workaround for maria:957: if hardware has detected a preamble,