mirror of
https://github.com/apache/nuttx.git
synced 2026-05-30 05:16:47 +08:00
mtd: Replace MTDIOC_XIPBASE with BIOC_XIPBASE
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
committed by
Alan Carvalho de Assis
parent
177e1ced3f
commit
6b6c11f0ad
+1
-25
@@ -506,31 +506,7 @@ static int ftl_ioctl(FAR struct inode *inode, int cmd, unsigned long arg)
|
||||
|
||||
dev = (struct ftl_struct_s *)inode->i_private;
|
||||
|
||||
/* Only one block driver ioctl command is supported by this driver (and
|
||||
* that command is just passed on to the MTD driver in a slightly
|
||||
* different form).
|
||||
*/
|
||||
|
||||
if (cmd == BIOC_XIPBASE)
|
||||
{
|
||||
/* The argument accompanying the BIOC_XIPBASE should be non-NULL. If
|
||||
* DEBUG is enabled, we will catch it here instead of in the MTD
|
||||
* driver.
|
||||
*/
|
||||
|
||||
#ifdef CONFIG_DEBUG_FEATURES
|
||||
if (arg == 0)
|
||||
{
|
||||
ferr("ERROR: BIOC_XIPBASE argument is NULL\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Change the BIOC_XIPBASE command to the MTDIOC_XIPBASE command. */
|
||||
|
||||
cmd = MTDIOC_XIPBASE;
|
||||
}
|
||||
else if (cmd == BIOC_FLUSH)
|
||||
if (cmd == BIOC_FLUSH)
|
||||
{
|
||||
#ifdef CONFIG_FTL_WRITEBUFFER
|
||||
rwb_flush(&dev->rwb);
|
||||
|
||||
Reference in New Issue
Block a user