mirror of
https://github.com/apache/nuttx.git
synced 2026-05-27 11:26:12 +08:00
Updated README file, cosmetic changes to comments and debug output
This commit is contained in:
@@ -1592,7 +1592,10 @@ HSMCI Card Slots
|
|||||||
Auto-Mounter
|
Auto-Mounter
|
||||||
============
|
============
|
||||||
|
|
||||||
NuttX implements an auto-mounter than can make working with SD cards easier. With the auto-mounter, the file system will be automatically mounted when the SD card in the SD card is inserted into the HSMCI slot and automatically unmounted when the SD card is removed.
|
NuttX implements an auto-mounter than can make working with SD cards
|
||||||
|
easier. With the auto-mounter, the file system will be automatically
|
||||||
|
mounted when the SD card is inserted into the HSMCI slot and automatically
|
||||||
|
unmounted when the SD card is removed.
|
||||||
|
|
||||||
Here is a sample configuration for the auto-mounter:
|
Here is a sample configuration for the auto-mounter:
|
||||||
|
|
||||||
@@ -1607,6 +1610,13 @@ Auto-Mounter
|
|||||||
CONFIG_SAMA5D4EK_HSMCI0_AUTOMOUNT_DDELAY=1000
|
CONFIG_SAMA5D4EK_HSMCI0_AUTOMOUNT_DDELAY=1000
|
||||||
CONFIG_SAMA5D4EK_HSMCI0_AUTOMOUNT_UDELAY=2000
|
CONFIG_SAMA5D4EK_HSMCI0_AUTOMOUNT_UDELAY=2000
|
||||||
|
|
||||||
|
WARNING: SD cards should never be removed without first unmounting
|
||||||
|
them. This is to avoid data and possible corruption of the file
|
||||||
|
system. Certainly this is the case if you are writing to the SD card
|
||||||
|
at the time of the removal. If you use the SD card for read-only access,
|
||||||
|
however, then I cannot think of any reason why removing the card without
|
||||||
|
mounting would be harmful.
|
||||||
|
|
||||||
USB Ports
|
USB Ports
|
||||||
=========
|
=========
|
||||||
|
|
||||||
@@ -3786,12 +3796,6 @@ Configurations
|
|||||||
disabled; there was a problem at one time but that has probably
|
disabled; there was a problem at one time but that has probably
|
||||||
been fixed. HSCMI with TX DMA re-enabled needs to be verified.
|
been fixed. HSCMI with TX DMA re-enabled needs to be verified.
|
||||||
|
|
||||||
There does seem to be an issue with removing then re-inserting
|
|
||||||
an SD card. In that case, the SD card will fail to mount the
|
|
||||||
when the card is re-inserted. Hopefully this problem will be
|
|
||||||
fixed before you read this (in which case, I forgot to remove
|
|
||||||
this note).
|
|
||||||
|
|
||||||
13. Networking is supported via EMAC0. See the "Networking" section
|
13. Networking is supported via EMAC0. See the "Networking" section
|
||||||
above for detailed configuration settings. DHCP is not used in
|
above for detailed configuration settings. DHCP is not used in
|
||||||
this configuration; rather, a hard-coded IP address of 10.0.0.2 is
|
this configuration; rather, a hard-coded IP address of 10.0.0.2 is
|
||||||
@@ -4225,7 +4229,8 @@ To-Do List
|
|||||||
to be verified by re-enabled HSMCI TX DMA.
|
to be verified by re-enabled HSMCI TX DMA.
|
||||||
|
|
||||||
Also, CONFIG_MMCSD_MULTIBLOCK_DISABLE=y is set to disable multi-block
|
Also, CONFIG_MMCSD_MULTIBLOCK_DISABLE=y is set to disable multi-block
|
||||||
transfers.
|
transfers. The is very low priority to me but might be important to you
|
||||||
|
if you are need very high performance SD card accesses.
|
||||||
|
|
||||||
3) There is a kludge in place in the Ethernet code to work around a problem
|
3) There is a kludge in place in the Ethernet code to work around a problem
|
||||||
that I see. The problem that I see is as follows:
|
that I see. The problem that I see is as follows:
|
||||||
|
|||||||
@@ -1477,6 +1477,7 @@ static ssize_t mmcsd_readmultiple(FAR struct mmcsd_state_s *priv,
|
|||||||
|
|
||||||
SDIO_BLOCKSETUP(priv->dev, priv->blocksize, nblocks);
|
SDIO_BLOCKSETUP(priv->dev, priv->blocksize, nblocks);
|
||||||
SDIO_WAITENABLE(priv->dev, SDIOWAIT_TRANSFERDONE|SDIOWAIT_TIMEOUT|SDIOWAIT_ERROR);
|
SDIO_WAITENABLE(priv->dev, SDIOWAIT_TRANSFERDONE|SDIOWAIT_TIMEOUT|SDIOWAIT_ERROR);
|
||||||
|
|
||||||
#ifdef CONFIG_SDIO_DMA
|
#ifdef CONFIG_SDIO_DMA
|
||||||
if (priv->dma)
|
if (priv->dma)
|
||||||
{
|
{
|
||||||
@@ -1878,7 +1879,6 @@ static ssize_t mmcsd_writemultiple(FAR struct mmcsd_state_s *priv,
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Wait for the transfer to complete */
|
/* Wait for the transfer to complete */
|
||||||
|
|
||||||
ret = mmcsd_eventwait(priv, SDIOWAIT_TIMEOUT|SDIOWAIT_ERROR, nblocks * MMCSD_BLOCK_WDATADELAY);
|
ret = mmcsd_eventwait(priv, SDIOWAIT_TIMEOUT|SDIOWAIT_ERROR, nblocks * MMCSD_BLOCK_WDATADELAY);
|
||||||
@@ -2606,7 +2606,7 @@ static int mmcsd_sdinitialize(FAR struct mmcsd_state_s *priv)
|
|||||||
|
|
||||||
/* Send CMD9, SEND_CSD, in standby state/data-transfer mode to obtain the
|
/* Send CMD9, SEND_CSD, in standby state/data-transfer mode to obtain the
|
||||||
* Card Specific Data (CSD) register. The argument is the RCA that we
|
* Card Specific Data (CSD) register. The argument is the RCA that we
|
||||||
* just obtained from CMD3. The card stays in standy state/data-transfer
|
* just obtained from CMD3. The card stays in standby state/data-transfer
|
||||||
* mode.
|
* mode.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -3264,7 +3264,7 @@ int mmcsd_slotinitialize(int minor, FAR struct sdio_dev_s *dev)
|
|||||||
|
|
||||||
SDIO_CALLBACKENABLE(priv->dev, SDIOMEDIA_INSERTED);
|
SDIO_CALLBACKENABLE(priv->dev, SDIOMEDIA_INSERTED);
|
||||||
|
|
||||||
fdbg("MMC/SD slot is empty\n");
|
fvdbg("MMC/SD slot is empty\n");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
+3
-3
@@ -387,7 +387,7 @@ static void automount_timeout(int argc, uint32_t arg1, ...)
|
|||||||
ret = work_queue(LPWORK, &priv->work, automount_worker, priv, 0);
|
ret = work_queue(LPWORK, &priv->work, automount_worker, priv, 0);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
{
|
{
|
||||||
/* NOTE: Currently, work_cancel only returns success */
|
/* NOTE: Currently, work_queue only returns success */
|
||||||
|
|
||||||
fdbg("ERROR: Failed to schedule work: %d\n", ret);
|
fdbg("ERROR: Failed to schedule work: %d\n", ret);
|
||||||
}
|
}
|
||||||
@@ -501,7 +501,7 @@ static int automount_interrupt(FAR const struct automount_lower_s *lower,
|
|||||||
priv->lower->ddelay);
|
priv->lower->ddelay);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
{
|
{
|
||||||
/* NOTE: Currently, work_cancel only returns success */
|
/* NOTE: Currently, work_queue only returns success */
|
||||||
|
|
||||||
fdbg("ERROR: Failed to schedule work: %d\n", ret);
|
fdbg("ERROR: Failed to schedule work: %d\n", ret);
|
||||||
}
|
}
|
||||||
@@ -579,7 +579,7 @@ FAR void *automount_initialize(FAR const struct automount_lower_s *lower)
|
|||||||
priv->lower->ddelay);
|
priv->lower->ddelay);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
{
|
{
|
||||||
/* NOTE: Currently, work_cancel only returns success */
|
/* NOTE: Currently, work_queue only returns success */
|
||||||
|
|
||||||
fdbg("ERROR: Failed to schedule work: %d\n", ret);
|
fdbg("ERROR: Failed to schedule work: %d\n", ret);
|
||||||
}
|
}
|
||||||
|
|||||||
+6
-6
@@ -246,7 +246,7 @@ int mount(FAR const char *source, FAR const char *target,
|
|||||||
ret = find_blockdriver(source, mountflags, &blkdrvr_inode);
|
ret = find_blockdriver(source, mountflags, &blkdrvr_inode);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
{
|
{
|
||||||
fdbg("Failed to find block driver %s\n", source);
|
fdbg("ERROR: Failed to find block driver %s\n", source);
|
||||||
errcode = -ret;
|
errcode = -ret;
|
||||||
goto errout;
|
goto errout;
|
||||||
}
|
}
|
||||||
@@ -260,7 +260,7 @@ int mount(FAR const char *source, FAR const char *target,
|
|||||||
else
|
else
|
||||||
#endif /* NONBDFS_SUPPORT */
|
#endif /* NONBDFS_SUPPORT */
|
||||||
{
|
{
|
||||||
fdbg("Failed to find file system %s\n", filesystemtype);
|
fdbg("ERROR: Failed to find file system %s\n", filesystemtype);
|
||||||
errcode = ENODEV;
|
errcode = ENODEV;
|
||||||
goto errout;
|
goto errout;
|
||||||
}
|
}
|
||||||
@@ -281,7 +281,7 @@ int mount(FAR const char *source, FAR const char *target,
|
|||||||
* -ENOMEM - Failed to allocate in-memory resources for the operation
|
* -ENOMEM - Failed to allocate in-memory resources for the operation
|
||||||
*/
|
*/
|
||||||
|
|
||||||
fdbg("Failed to reserve inode\n");
|
fdbg("ERROR: Failed to reserve inode\n");
|
||||||
errcode = -ret;
|
errcode = -ret;
|
||||||
goto errout_with_semaphore;
|
goto errout_with_semaphore;
|
||||||
}
|
}
|
||||||
@@ -295,7 +295,7 @@ int mount(FAR const char *source, FAR const char *target,
|
|||||||
{
|
{
|
||||||
/* The filesystem does not support the bind operation ??? */
|
/* The filesystem does not support the bind operation ??? */
|
||||||
|
|
||||||
fdbg("Filesystem does not support bind\n");
|
fdbg("ERROR: Filesystem does not support bind\n");
|
||||||
errcode = EINVAL;
|
errcode = EINVAL;
|
||||||
goto errout_with_mountpt;
|
goto errout_with_mountpt;
|
||||||
}
|
}
|
||||||
@@ -325,7 +325,7 @@ int mount(FAR const char *source, FAR const char *target,
|
|||||||
* error.
|
* error.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
fdbg("Bind method failed: %d\n", ret);
|
fdbg("ERROR: Bind method failed: %d\n", ret);
|
||||||
#ifdef BDFS_SUPPORT
|
#ifdef BDFS_SUPPORT
|
||||||
#ifdef NONBDFS_SUPPORT
|
#ifdef NONBDFS_SUPPORT
|
||||||
if (blkdrvr_inode)
|
if (blkdrvr_inode)
|
||||||
@@ -400,7 +400,7 @@ errout:
|
|||||||
return ERROR;
|
return ERROR;
|
||||||
|
|
||||||
#else
|
#else
|
||||||
fdbg("No filesystems enabled\n");
|
fdbg("ERROR: No filesystems enabled\n");
|
||||||
set_errno(ENOSYS);
|
set_errno(ENOSYS);
|
||||||
return ERROR;
|
return ERROR;
|
||||||
#endif /* BDFS_SUPPORT || NONBDFS_SUPPORT */
|
#endif /* BDFS_SUPPORT || NONBDFS_SUPPORT */
|
||||||
|
|||||||
Reference in New Issue
Block a user