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 2023/01/13 04:18:44 UTC

[nuttx] branch master updated (cf987238c0 -> 6c5cb98e7d)

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/nuttx.git


    from cf987238c0 sim/hci: add depends on config for SIM_HCISOCKET to fix compile break
     new 45ed6f657c arch/arm/cxd56xx: do not clear enabled callback event on card insertion
     new 74d5c3948d boards/arm/cxd56xx/spresense: fix card detect status reading
     new 6c5cb98e7d fs/mount: fix logging macro in FS automount

The 3 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/arm/src/cxd56xx/cxd56_sdhci.c              |  5 -----
 boards/arm/cxd56xx/spresense/src/cxd56_sdcard.c | 27 ++++++++++---------------
 fs/mount/fs_automount.c                         | 14 ++++++-------
 3 files changed, 18 insertions(+), 28 deletions(-)


[nuttx] 03/03: fs/mount: fix logging macro in FS automount

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/nuttx.git

commit 6c5cb98e7d382b34d540f074aa1502f24576895b
Author: Petro Karashchenko <pe...@gmail.com>
AuthorDate: Thu Jan 12 23:30:36 2023 +0200

    fs/mount: fix logging macro in FS automount
    
    Signed-off-by: Petro Karashchenko <pe...@gmail.com>
---
 fs/mount/fs_automount.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/fs/mount/fs_automount.c b/fs/mount/fs_automount.c
index fd6dd81399..0f22f46cc4 100644
--- a/fs/mount/fs_automount.c
+++ b/fs/mount/fs_automount.c
@@ -167,7 +167,7 @@ static void automount_notify(FAR struct automounter_state_s *priv)
   ret = nxmutex_lock(&priv->lock);
   if (ret < 0)
     {
-      ierr("ERROR: nxmutex_lock failed: %d\n", ret);
+      ferr("ERROR: nxmutex_lock failed: %d\n", ret);
       return;
     }
 
@@ -207,7 +207,7 @@ static int automount_open(FAR struct file *filep)
   ret = nxmutex_lock(&priv->lock);
   if (ret < 0)
     {
-      ierr("ERROR: nxmutex_lock failed: %d\n", ret);
+      ferr("ERROR: nxmutex_lock failed: %d\n", ret);
       return ret;
     }
 
@@ -217,7 +217,7 @@ static int automount_open(FAR struct file *filep)
       sizeof(struct automounter_open_s));
   if (opriv == NULL)
     {
-      ierr("ERROR: Failed to allocate open structure\n");
+      ferr("ERROR: Failed to allocate open structure\n");
       ret = -ENOMEM;
       goto errout_with_lock;
     }
@@ -261,7 +261,7 @@ static int automount_close(FAR struct file *filep)
   ret = nxmutex_lock(&priv->lock);
   if (ret < 0)
     {
-      ierr("ERROR: nxmutex_lock failed: %d\n", ret);
+      ferr("ERROR: nxmutex_lock failed: %d\n", ret);
       return ret;
     }
 
@@ -274,7 +274,7 @@ static int automount_close(FAR struct file *filep)
   DEBUGASSERT(curr);
   if (curr == NULL)
     {
-      ierr("ERROR: Failed to find open entry\n");
+      ferr("ERROR: Failed to find open entry\n");
       ret = -ENOENT;
       goto errout_with_lock;
     }
@@ -328,7 +328,7 @@ static int automount_ioctl(FAR struct file *filep, int cmd,
   ret = nxmutex_lock(&priv->lock);
   if (ret < 0)
     {
-      ierr("ERROR: nxmutex_lock failed: %d\n", ret);
+      ferr("ERROR: nxmutex_lock failed: %d\n", ret);
       return ret;
     }
 
@@ -365,7 +365,7 @@ static int automount_ioctl(FAR struct file *filep, int cmd,
         break;
 
       default:
-        ierr("ERROR: Unrecognized command: %d\n", cmd);
+        ferr("ERROR: Unrecognized command: %d\n", cmd);
         ret = -ENOTTY;
         break;
     }


[nuttx] 02/03: boards/arm/cxd56xx/spresense: fix card detect status reading

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/nuttx.git

commit 74d5c3948d654358cd68b86604970fe5b152e0c8
Author: Petro Karashchenko <pe...@gmail.com>
AuthorDate: Thu Jan 12 23:28:49 2023 +0200

    boards/arm/cxd56xx/spresense: fix card detect status reading
    
    Signed-off-by: Petro Karashchenko <pe...@gmail.com>
---
 boards/arm/cxd56xx/spresense/src/cxd56_sdcard.c | 27 ++++++++++---------------
 1 file changed, 11 insertions(+), 16 deletions(-)

diff --git a/boards/arm/cxd56xx/spresense/src/cxd56_sdcard.c b/boards/arm/cxd56xx/spresense/src/cxd56_sdcard.c
index fc9afa9406..152eb1502a 100644
--- a/boards/arm/cxd56xx/spresense/src/cxd56_sdcard.c
+++ b/boards/arm/cxd56xx/spresense/src/cxd56_sdcard.c
@@ -174,17 +174,15 @@ static void board_sdcard_enable(void *arg)
         {
           g_sdhci.cb(true);
         }
+#else
+      /* Let the automounter know about the insertion event */
+
+      board_automount_event(0, board_sdcard_inserted(0));
 #endif /* CONFIG_CXD56_SDCARD_AUTOMOUNT */
 
       g_sdhci.initialized = true;
     }
 
-#ifdef CONFIG_CXD56_SDCARD_AUTOMOUNT
-  /* Let the automounter know about the insertion event */
-
-  board_automount_event(0, board_sdcard_inserted(0));
-#endif /* CONFIG_CXD56_SDCARD_AUTOMOUNT */
-
 release_frequency_lock:
 
   /* Release frequency lock */
@@ -229,14 +227,14 @@ static void board_sdcard_disable(void *arg)
 
       cxd56_sdhci_finalize(0);
 
-      g_sdhci.initialized = false;
-    }
-
 #ifdef CONFIG_CXD56_SDCARD_AUTOMOUNT
-  /* Let the automounter know about the insertion event */
+      /* Let the automounter know about the removal event */
 
-  board_automount_event(0, board_sdcard_inserted(0));
+      board_automount_event(0, board_sdcard_inserted(0));
 #endif /* CONFIG_CXD56_SDCARD_AUTOMOUNT */
+
+      g_sdhci.initialized = false;
+    }
 }
 
 #ifdef CONFIG_MMCSD_HAVE_CARDDETECT
@@ -344,16 +342,13 @@ int board_sdcard_initialize(void)
   /* Configure Interrupt pin with internal pull-up */
 
   cxd56_pin_config(PINCONF_SDIO_CD_GPIO);
+  cxd56_gpioint_config(PIN_SDIO_CD, GPIOINT_PSEUDO_EDGE_BOTH,
+                       board_sdcard_detect_int, NULL);
 
   /* Handle the case when SD card is already inserted */
 
   board_sdcard_detect_int(PIN_SDIO_CD, NULL, NULL);
 
-  /* Configure Interrupt pin with internal pull-up */
-
-  cxd56_gpioint_config(PIN_SDIO_CD, GPIOINT_PSEUDO_EDGE_BOTH,
-                       board_sdcard_detect_int, NULL);
-
   /* Enabling Interrupt */
 
   cxd56_gpioint_enable(PIN_SDIO_CD);


[nuttx] 01/03: arch/arm/cxd56xx: do not clear enabled callback event on card insertion

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/nuttx.git

commit 45ed6f657cac767382f966b6f8e18f7d5a372385
Author: Petro Karashchenko <pe...@gmail.com>
AuthorDate: Thu Jan 12 23:26:39 2023 +0200

    arch/arm/cxd56xx: do not clear enabled callback event on card insertion
    
    Signed-off-by: Petro Karashchenko <pe...@gmail.com>
---
 arch/arm/src/cxd56xx/cxd56_sdhci.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/arch/arm/src/cxd56xx/cxd56_sdhci.c b/arch/arm/src/cxd56xx/cxd56_sdhci.c
index 65b4fe5e85..c59574cc27 100644
--- a/arch/arm/src/cxd56xx/cxd56_sdhci.c
+++ b/arch/arm/src/cxd56xx/cxd56_sdhci.c
@@ -3360,11 +3360,6 @@ void cxd56_sdhci_mediachange(struct sdio_dev_s *dev)
 
   if (cdstatus != priv->cdstatus)
     {
-      if (priv->cdstatus & SDIO_STATUS_PRESENT)
-        {
-          priv->cbevents &= SDIOMEDIA_INSERTED;
-        }
-
       mediachange = 1;
     }