You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2020/12/11 02:31:26 UTC

[incubator-nuttx] branch master updated (b599823 -> 6244924)

This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git.


    from b599823  arch: armv7-a: Remove unnecessary #ifdef CONFIG_SMP in arm_unblocktask.c
     new 2a9dab2  xtensa/esp32: allows the rtc wdt to be configured in bootloader and used later
     new 6244924  Removed initconf from esp32_wtd_ops_s

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 arch/xtensa/src/esp32/esp32_wtd.c           | 42 -----------------------------
 arch/xtensa/src/esp32/esp32_wtd.h           |  2 --
 arch/xtensa/src/esp32/esp32_wtd_lowerhalf.c |  4 ---
 3 files changed, 48 deletions(-)


[incubator-nuttx] 01/02: xtensa/esp32: allows the rtc wdt to be configured in bootloader and used later

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 2a9dab2e5db62a9c60de99ca6cd127de30dbaa01
Author: Sara Souza <sa...@espressif.com>
AuthorDate: Wed Dec 9 16:27:03 2020 -0300

    xtensa/esp32: allows the rtc wdt to be configured in bootloader and used later
---
 arch/xtensa/src/esp32/esp32_wtd.c           | 42 -----------------------------
 arch/xtensa/src/esp32/esp32_wtd.h           |  1 -
 arch/xtensa/src/esp32/esp32_wtd_lowerhalf.c |  4 ---
 3 files changed, 47 deletions(-)

diff --git a/arch/xtensa/src/esp32/esp32_wtd.c b/arch/xtensa/src/esp32/esp32_wtd.c
index e86c7dd..9bd7aa5 100644
--- a/arch/xtensa/src/esp32/esp32_wtd.c
+++ b/arch/xtensa/src/esp32/esp32_wtd.c
@@ -71,7 +71,6 @@ static int esp32_wtd_start(FAR struct esp32_wtd_dev_s *dev);
 static int esp32_wtd_stop(FAR struct esp32_wtd_dev_s *dev);
 static int esp32_wtd_enablewp(FAR struct esp32_wtd_dev_s *dev);
 static int esp32_wtd_disablewp(FAR struct esp32_wtd_dev_s *dev);
-static int esp32_wtd_initconf(FAR struct esp32_wtd_dev_s *dev);
 static int esp32_wtd_pre(FAR struct esp32_wtd_dev_s *dev, uint16_t value);
 static int esp32_wtd_settimeout(FAR struct esp32_wtd_dev_s *dev,
                                 uint32_t value, uint8_t stage);
@@ -95,7 +94,6 @@ struct esp32_wtd_ops_s esp32_mwtd_ops =
 {
   .start         = esp32_wtd_start,
   .stop          = esp32_wtd_stop,
-  .initconf      = esp32_wtd_initconf,
   .enablewp      = esp32_wtd_enablewp,
   .disablewp     = esp32_wtd_disablewp,
   .pre           = esp32_wtd_pre,
@@ -113,7 +111,6 @@ struct esp32_wtd_ops_s esp32_rwtd_ops =
 {
   .start         = esp32_wtd_start,
   .stop          = esp32_wtd_stop,
-  .initconf      = esp32_wtd_initconf,
   .enablewp      = esp32_wtd_enablewp,
   .disablewp     = esp32_wtd_disablewp,
   .pre           = NULL,
@@ -475,45 +472,6 @@ static int esp32_wtd_disablewp(FAR struct esp32_wtd_dev_s *dev)
 }
 
 /****************************************************************************
- * Name: esp32_wtd_initconf
- *
- * Description:
- *   It turn off all the stages and ensure Flash Boot Protection is disabled.
- *   In case of RWDT, it also turns off the WDT, in case it was already
- *   turned on before. NOTE: The main system reset does not reset RTC, so
- *   all the registers values are kept.
- *
- ****************************************************************************/
-
-static int esp32_wtd_initconf(FAR struct esp32_wtd_dev_s *dev)
-{
-  uint32_t mask = 0;
-
-  DEBUGASSERT(dev);
-
-  /* If it is a RWDT */
-
-  if (((struct esp32_wtd_priv_s *)dev)->base == RTC_CNTL_WDTCONFIG0_REG)
-    {
-      mask = RTC_CNTL_WDT_INT_ENA_M | RTC_CNTL_WDT_STG0_M
-       | RTC_CNTL_WDT_STG1_M | RTC_CNTL_WDT_STG2_M | RTC_CNTL_WDT_STG3_M
-       | RTC_CNTL_WDT_FLASHBOOT_MOD_EN_M;
-      esp32_wtd_modifyreg32(dev, RWDT_CONFIG0_OFFSET, mask, 0);
-    }
-
-  /* If it is a MWDT */
-
-  else
-    {
-      mask = TIMG_WDT_STG0_M | TIMG_WDT_STG1_M | TIMG_WDT_STG2_M
-       | TIMG_WDT_STG3_M | TIMG_WDT_FLASHBOOT_MOD_EN_M;
-      esp32_wtd_modifyreg32(dev, MWDT_CONFIG0_OFFSET, mask, 0);
-    }
-
-  return OK;
-}
-
-/****************************************************************************
  * Name: esp32_wtd_pre
  *
  * Description:
diff --git a/arch/xtensa/src/esp32/esp32_wtd.h b/arch/xtensa/src/esp32/esp32_wtd.h
index 1b3daf4..f652331 100644
--- a/arch/xtensa/src/esp32/esp32_wtd.h
+++ b/arch/xtensa/src/esp32/esp32_wtd.h
@@ -41,7 +41,6 @@
 #define ESP32_WTD_STOP(d)                       ((d)->ops->stop(d))
 #define ESP32_WTD_LOCK(d)                       ((d)->ops->enablewp(d))
 #define ESP32_WTD_UNLOCK(d)                     ((d)->ops->disablewp(d))
-#define ESP32_WTD_INITCONF(d)                   ((d)->ops->initconf(d))
 #define ESP32_WTD_PRE(d, v)                     ((d)->ops->pre(d, v))
 #define ESP32_WTD_STO(d, v, s)                  ((d)->ops->settimeout(d, v, s))
 #define ESP32_WTD_FEED(d)                       ((d)->ops->feed(d))
diff --git a/arch/xtensa/src/esp32/esp32_wtd_lowerhalf.c b/arch/xtensa/src/esp32/esp32_wtd_lowerhalf.c
index 35ca89e..208f372 100644
--- a/arch/xtensa/src/esp32/esp32_wtd_lowerhalf.c
+++ b/arch/xtensa/src/esp32/esp32_wtd_lowerhalf.c
@@ -679,10 +679,6 @@ int esp32_wtd_initialize(FAR const char *devpath, uint8_t wdt)
 
   ESP32_WTD_UNLOCK(lower->wtd);
 
-  /* Ensure stages are disabled and Flash boot protection was disabled */
-
-  ESP32_WTD_INITCONF(lower->wtd);
-
   /* If it is a Main System Watchdog Timer configure the Prescale to
    * have a 500us period.
    */


[incubator-nuttx] 02/02: Removed initconf from esp32_wtd_ops_s

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 6244924c3ef47dd14ea9a6b2860caa67b399cd97
Author: Sara Souza <sa...@espressif.com>
AuthorDate: Thu Dec 10 16:46:17 2020 -0300

    Removed initconf from esp32_wtd_ops_s
---
 arch/xtensa/src/esp32/esp32_wtd.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/xtensa/src/esp32/esp32_wtd.h b/arch/xtensa/src/esp32/esp32_wtd.h
index f652331..282d768 100644
--- a/arch/xtensa/src/esp32/esp32_wtd.h
+++ b/arch/xtensa/src/esp32/esp32_wtd.h
@@ -77,7 +77,6 @@ struct esp32_wtd_ops_s
 
   CODE int (*enablewp)(FAR struct esp32_wtd_dev_s *dev);
   CODE int (*disablewp)(FAR struct esp32_wtd_dev_s *dev);
-  CODE int (*initconf)(FAR struct esp32_wtd_dev_s *dev);
   CODE int (*pre)(FAR struct esp32_wtd_dev_s *dev, uint16_t value);
   CODE int (*settimeout)(FAR struct esp32_wtd_dev_s *dev,
                          uint32_t value, uint8_t stage);