The SAMA5D4-EK NSH and NxWM configurations now have the auto-mounter configured to automatically mount the FAT file system on HSMCI0 at /mnt/sdcard

This commit is contained in:
Gregory Nutt 2014-07-29 16:36:15 -06:00
parent 3d49eadc80
commit a826adb679
4 changed files with 25 additions and 12 deletions

View File

@ -417,6 +417,12 @@ CONFIG_SAMA5D4_MB_REVC=y
# CONFIG_SAMA5D4EK_396MHZ is not set # CONFIG_SAMA5D4EK_396MHZ is not set
CONFIG_SAMA5D4EK_528MHZ=y CONFIG_SAMA5D4EK_528MHZ=y
CONFIG_SAMA5D4EK_DRAM_BOOT=y CONFIG_SAMA5D4EK_DRAM_BOOT=y
CONFIG_SAMA5D4EK_HSMCI0_AUTOMOUNT=y
CONFIG_SAMA5D4EK_HSMCI0_AUTOMOUNT_FSTYPE="vfat"
CONFIG_SAMA5D4EK_HSMCI0_AUTOMOUNT_BLKDEV="/dev/mmcsd0"
CONFIG_SAMA5D4EK_HSMCI0_AUTOMOUNT_MOUNTPOINT="/mnt/sdcard"
CONFIG_SAMA5D4EK_HSMCI0_AUTOMOUNT_DDELAY=1000
CONFIG_SAMA5D4EK_HSMCI0_AUTOMOUNT_UDELAY=2000
CONFIG_SAMA5D4EK_MXT_I2CFREQUENCY=400000 CONFIG_SAMA5D4EK_MXT_I2CFREQUENCY=400000
CONFIG_SAMA5D4EK_MXT_DEVMINOR=0 CONFIG_SAMA5D4EK_MXT_DEVMINOR=0
@ -811,6 +817,7 @@ CONFIG_NET_ETHERNET=y
# File system configuration # File system configuration
# #
# CONFIG_DISABLE_MOUNTPOINT is not set # CONFIG_DISABLE_MOUNTPOINT is not set
CONFIG_FS_AUTOMOUNTER=y
# CONFIG_DISABLE_PSEUDOFS_OPERATIONS is not set # CONFIG_DISABLE_PSEUDOFS_OPERATIONS is not set
CONFIG_FS_READABLE=y CONFIG_FS_READABLE=y
CONFIG_FS_WRITABLE=y CONFIG_FS_WRITABLE=y

View File

@ -411,6 +411,11 @@ CONFIG_NSH_MMCSDSLOTNO=0
# CONFIG_SAMA5D4EK_396MHZ is not set # CONFIG_SAMA5D4EK_396MHZ is not set
CONFIG_SAMA5D4EK_528MHZ=y CONFIG_SAMA5D4EK_528MHZ=y
CONFIG_SAMA5D4EK_DRAM_BOOT=y CONFIG_SAMA5D4EK_DRAM_BOOT=y
CONFIG_SAMA5D4EK_HSMCI0_AUTOMOUNT_FSTYPE="vfat"
CONFIG_SAMA5D4EK_HSMCI0_AUTOMOUNT_BLKDEV="/dev/mmcsd0"
CONFIG_SAMA5D4EK_HSMCI0_AUTOMOUNT_MOUNTPOINT="/mnt/sdcard"
CONFIG_SAMA5D4EK_HSMCI0_AUTOMOUNT_DDELAY=1000
CONFIG_SAMA5D4EK_HSMCI0_AUTOMOUNT_UDELAY=2000
CONFIG_SAMA5D4EK_MXT_I2CFREQUENCY=400000 CONFIG_SAMA5D4EK_MXT_I2CFREQUENCY=400000
CONFIG_SAMA5D4EK_MXT_DEVMINOR=0 CONFIG_SAMA5D4EK_MXT_DEVMINOR=0
@ -807,6 +812,7 @@ CONFIG_NET_ETHERNET=y
# File system configuration # File system configuration
# #
# CONFIG_DISABLE_MOUNTPOINT is not set # CONFIG_DISABLE_MOUNTPOINT is not set
CONFIG_FS_AUTOMOUNTER=y
# CONFIG_DISABLE_PSEUDOFS_OPERATIONS is not set # CONFIG_DISABLE_PSEUDOFS_OPERATIONS is not set
CONFIG_FS_READABLE=y CONFIG_FS_READABLE=y
CONFIG_FS_WRITABLE=y CONFIG_FS_WRITABLE=y

View File

@ -397,7 +397,7 @@ static void automount_timeout(int argc, uint32_t arg1, ...)
* Name: automount_worker * Name: automount_worker
* *
* Description: * Description:
* Performs automount actions on the worker thread. * Performs auto-mount actions on the worker thread.
* *
* Input Parameters: * Input Parameters:
* arg - Work argument set by work_queue() * arg - Work argument set by work_queue()
@ -450,7 +450,7 @@ static void automount_worker(FAR void *arg)
* *
* Input Parameters: * Input Parameters:
* lower - Persistent board configuration data * lower - Persistent board configuration data
* arg - Data associated with the automounter * arg - Data associated with the auto-mounter
* inserted - True: Media has been inserted. False: media has been removed * inserted - True: Media has been inserted. False: media has been removed
* *
* Returned Value: * Returned Value:
@ -523,13 +523,13 @@ static int automount_interrupt(FAR const struct automount_lower_s *lower,
* Name: automount_initialize * Name: automount_initialize
* *
* Description: * Description:
* Configure the automounter. * Configure the auto mounter.
* *
* Input Parameters: * Input Parameters:
* lower - Persistent board configuration data * lower - Persistent board configuration data
* *
* Returned Value: * Returned Value:
* A void* handle. The only use for this handle is with auto_uninitialize(). * A void* handle. The only use for this handle is with automount_uninitialize().
* NULL is returned on any failure. * NULL is returned on any failure.
* *
****************************************************************************/ ****************************************************************************/
@ -542,7 +542,7 @@ FAR void *automount_initialize(FAR const struct automount_lower_s *lower)
fvdbg("lower=%p\n", lower); fvdbg("lower=%p\n", lower);
DEBUGASSERT(lower); DEBUGASSERT(lower);
/* Allocate an automounter state structure */ /* Allocate an auto-mounter state structure */
priv = (FAR struct automounter_state_s *) priv = (FAR struct automounter_state_s *)
kzalloc(sizeof(struct automounter_state_s)); kzalloc(sizeof(struct automounter_state_s));
@ -563,7 +563,7 @@ FAR void *automount_initialize(FAR const struct automount_lower_s *lower)
if (!priv->wdog) if (!priv->wdog)
{ {
fdbg("ERROR: Failed to create a timer\n"); fdbg("ERROR: Failed to create a timer\n");
auto_uninitialize(priv); automount_uninitialize(priv);
return NULL; return NULL;
} }
@ -590,7 +590,7 @@ FAR void *automount_initialize(FAR const struct automount_lower_s *lower)
if (ret < 0) if (ret < 0)
{ {
fdbg("ERROR: Failed to attach automount interrupt: %d\n", ret); fdbg("ERROR: Failed to attach automount interrupt: %d\n", ret);
auto_uninitialize(priv); automount_uninitialize(priv);
return NULL; return NULL;
} }
@ -599,7 +599,7 @@ FAR void *automount_initialize(FAR const struct automount_lower_s *lower)
} }
/**************************************************************************** /****************************************************************************
* Name: auto_uninitialize * Name: automount_uninitialize
* *
* Description: * Description:
* Stop the automounter and free resources that it used. NOTE that the * Stop the automounter and free resources that it used. NOTE that the
@ -613,7 +613,7 @@ FAR void *automount_initialize(FAR const struct automount_lower_s *lower)
* *
****************************************************************************/ ****************************************************************************/
void auto_uninitialize(FAR void *handle) void automount_uninitialize(FAR void *handle)
{ {
FAR struct automounter_state_s *priv = (FAR struct automounter_state_s *)handle; FAR struct automounter_state_s *priv = (FAR struct automounter_state_s *)handle;
FAR const struct automount_lower_s *lower; FAR const struct automount_lower_s *lower;

View File

@ -161,7 +161,7 @@ extern "C"
* lower - Persistent board configuration data * lower - Persistent board configuration data
* *
* Returned Value: * Returned Value:
* A void* handle. The only use for this handle is with auto_uninitialize(). * A void* handle. The only use for this handle is with automount_uninitialize().
* NULL is returned on any failure. * NULL is returned on any failure.
* *
****************************************************************************/ ****************************************************************************/
@ -169,7 +169,7 @@ extern "C"
FAR void *automount_initialize(FAR const struct automount_lower_s *lower); FAR void *automount_initialize(FAR const struct automount_lower_s *lower);
/**************************************************************************** /****************************************************************************
* Name: auto_uninitialize * Name: automount_uninitialize
* *
* Description: * Description:
* Stop the automounter and free resources that it used. NOTE that the * Stop the automounter and free resources that it used. NOTE that the
@ -183,7 +183,7 @@ FAR void *automount_initialize(FAR const struct automount_lower_s *lower);
* *
****************************************************************************/ ****************************************************************************/
void auto_uninitialize(FAR void *handle); void automount_uninitialize(FAR void *handle);
#undef EXTERN #undef EXTERN
#ifdef __cplusplus #ifdef __cplusplus