arch/: Remove support for CONFIG_FS_WRITABLE

Remove support for CONFIG_FS_WRITABLE from some MMC drivers.
This commit is contained in:
Gregory Nutt 2020-03-21 10:06:50 -06:00 committed by Xiang Xiao
parent f7e11fb2a6
commit 7dc4ae4772
2 changed files with 6 additions and 16 deletions

View File

@ -88,7 +88,7 @@ static int cxd56_emmc_close(FAR struct inode *inode);
static ssize_t cxd56_emmc_read(FAR struct inode *inode,
unsigned char *buffer, size_t start_sector,
unsigned int nsectors);
#if defined(CONFIG_FS_WRITABLE) && !defined(CONFIG_MMCSD_READONLY)
#if !defined(CONFIG_MMCSD_READONLY)
static ssize_t cxd56_emmc_write(FAR struct inode *inode,
const unsigned char *buffer,
size_t start_sector,
@ -103,7 +103,7 @@ static const struct block_operations g_bops =
cxd56_emmc_open, /* open */
cxd56_emmc_close, /* close */
cxd56_emmc_read, /* read */
#if defined(CONFIG_FS_WRITABLE)
#if !defined(CONFIG_MMCSD_READONLY)
cxd56_emmc_write, /* write */
#else
NULL, /* write */
@ -164,7 +164,7 @@ static void emmc_reset(uint32_t reg, uint32_t bits)
while (val & bits);
}
#if defined(CONFIG_FS_WRITABLE) && !defined(CONFIG_MMCSD_READONLY)
#if !defined(CONFIG_MMCSD_READONLY)
static void emmc_flushwritefifo(void)
{
/* eMMC host controller has a problem that invalid data is still remained
@ -723,7 +723,7 @@ static int cxd56_emmc_readsectors(FAR struct cxd56_emmc_state_s *priv,
return ret;
}
#if defined(CONFIG_FS_WRITABLE) && !defined(CONFIG_MMCSD_READONLY)
#if !defined(CONFIG_MMCSD_READONLY)
static int cxd56_emmc_writesectors(FAR struct cxd56_emmc_state_s *priv,
const void *buf, size_t start_sector,
unsigned int nsectors)
@ -848,7 +848,7 @@ static ssize_t cxd56_emmc_read(FAR struct inode *inode, unsigned char *buffer,
return nsectors;
}
#if defined(CONFIG_FS_WRITABLE) && !defined(CONFIG_MMCSD_READONLY)
#if !defined(CONFIG_MMCSD_READONLY)
static ssize_t cxd56_emmc_write(FAR struct inode *inode,
const unsigned char *buffer,
size_t start_sector,
@ -884,7 +884,7 @@ static int cxd56_emmc_geometry(FAR struct inode *inode,
geometry->geo_available = true;
geometry->geo_mediachanged = false;
#if defined(CONFIG_FS_WRITABLE)
#if !defined(CONFIG_MMCSD_READONLY)
geometry->geo_writeenabled = true;
#else
geometry->geo_writeenabled = false;

View File

@ -92,11 +92,7 @@ static const struct block_operations g_bops =
mmcl_open, /* open */
mmcl_close, /* close */
mmcl_read, /* read */
#ifdef CONFIG_FS_WRITABLE
mmcl_write, /* write */
#else
NULL, /* write */
#endif
mmcl_geometry, /* geometry */
mmcl_ioctl /* ioctl */
};
@ -167,7 +163,6 @@ static ssize_t mmcl_read(FAR struct inode *inode, unsigned char *buffer,
*
****************************************************************************/
#ifdef CONFIG_FS_WRITABLE
static ssize_t mmcl_write(FAR struct inode *inode, const unsigned char *buffer,
size_t start_sector, unsigned int nsectors)
{
@ -189,7 +184,6 @@ static ssize_t mmcl_write(FAR struct inode *inode, const unsigned char *buffer,
return nwrite;
}
#endif
/****************************************************************************
* Name: mmcl_geometry
@ -210,11 +204,7 @@ static int mmcl_geometry(FAR struct inode *inode, struct geometry *geometry)
dev = (struct mmcl_dev_s *)inode->i_private;
geometry->geo_available = true;
geometry->geo_mediachanged = false;
#ifdef CONFIG_FS_WRITABLE
geometry->geo_writeenabled = true;
#else
geometry->geo_writeenabled = false;
#endif
geometry->geo_nsectors = dev->geo.neraseblocks;
geometry->geo_sectorsize = dev->geo.blocksize;