From 13292c70c2859067156034350c767d9f871c165f Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Mon, 21 Apr 2014 19:32:15 -0600 Subject: [PATCH] Misc SAM4S-related changes from Bob Doison --- arch/arm/src/sam34/sam_hsmci.c | 5 +++++ arch/arm/src/sam34/sam_wdt.c | 18 +++++++++--------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/arch/arm/src/sam34/sam_hsmci.c b/arch/arm/src/sam34/sam_hsmci.c index 728bc0e04f..94d052bd16 100644 --- a/arch/arm/src/sam34/sam_hsmci.c +++ b/arch/arm/src/sam34/sam_hsmci.c @@ -159,6 +159,11 @@ * HSMCI_INT_RINDE Response Index Error */ +#define HSMCI_STATUS_ERRORS \ + (HSMCI_INT_UNRE | HSMCI_INT_OVRE | HSMCI_INT_BLKOVRE | HSMCI_INT_CSTOE | \ + HSMCI_INT_DTOE | HSMCI_INT_DCRCE | HSMCI_INT_RTOE | HSMCI_INT_RENDE | \ + HSMCI_INT_RCRCE | HSMCI_INT_RDIRE | HSMCI_INT_RINDE) + /* Response errors: * * HSMCI_INT_CSTOE Completion signal time-out error (see HSMCI_CSTOR) diff --git a/arch/arm/src/sam34/sam_wdt.c b/arch/arm/src/sam34/sam_wdt.c index cac3f99079..4fce57a571 100644 --- a/arch/arm/src/sam34/sam_wdt.c +++ b/arch/arm/src/sam34/sam_wdt.c @@ -413,7 +413,6 @@ static int sam34_getstatus(FAR struct watchdog_lowerhalf_s *lower, { FAR struct sam34_lowerhalf_s *priv = (FAR struct sam34_lowerhalf_s *)lower; uint32_t elapsed; - uint16_t reload; wdvdbg("Entry\n"); DEBUGASSERT(priv); @@ -470,7 +469,6 @@ static int sam34_settimeout(FAR struct watchdog_lowerhalf_s *lower, { FAR struct sam34_lowerhalf_s *priv = (FAR struct sam34_lowerhalf_s *)lower; uint32_t reload; - uint16_t regval; DEBUGASSERT(priv); wdvdbg("Entry: timeout=%d\n", timeout); @@ -538,6 +536,7 @@ static int sam34_settimeout(FAR struct watchdog_lowerhalf_s *lower, static xcpt_t sam34_capture(FAR struct watchdog_lowerhalf_s *lower, xcpt_t handler) { +#if 0 // TODO FAR struct sam34_lowerhalf_s *priv = (FAR struct sam34_lowerhalf_s *)lower; irqstate_t flags; xcpt_t oldhandler; @@ -548,7 +547,6 @@ static xcpt_t sam34_capture(FAR struct watchdog_lowerhalf_s *lower, /* Get the old handler return value */ flags = irqsave(); -#if 0 // TODO oldhandler = priv->handler; /* Save the new handler */ @@ -577,9 +575,11 @@ static xcpt_t sam34_capture(FAR struct watchdog_lowerhalf_s *lower, up_disable_irq(STM32_IRQ_WWDG); } -#endif irqrestore(flags); return oldhandler; +#endif + ASSERT(0); + return NULL; } /**************************************************************************** @@ -617,8 +617,8 @@ static int sam34_ioctl(FAR struct watchdog_lowerhalf_s *lower, int cmd, */ if (cmd == WDIOC_MINTIME) - { - uint32_t mintime = (uint32_t)arg; + { + uint32_t mintime = (uint32_t)arg; ret = -EINVAL; if (priv->started) @@ -626,9 +626,9 @@ static int sam34_ioctl(FAR struct watchdog_lowerhalf_s *lower, int cmd, ret = -ENOSYS; /* can't write the MR more than once! */ } - /* The minimum time should be strictly less than the total delay - * which, in turn, will be less than or equal to WDT_CR_MAX - */ + /* The minimum time should be strictly less than the total delay + * which, in turn, will be less than or equal to WDT_CR_MAX + */ else if (mintime < priv->timeout) {