phy62xx:support MTDIOC_ERASESTATE
Signed-off-by: 田昕 <tianxin7@xiaomi.com>
This commit is contained in:
parent
a7b3217c37
commit
521f870965
@ -43,6 +43,12 @@
|
|||||||
#include <nuttx/fs/ioctl.h>
|
#include <nuttx/fs/ioctl.h>
|
||||||
#include <nuttx/mtd/mtd.h>
|
#include <nuttx/mtd/mtd.h>
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Pre-processor Definitions
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
#define MTD_ERASED_STATE (0xff)
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Types
|
* Private Types
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
@ -312,6 +318,14 @@ static int pplus_fls_ioctl(struct mtd_dev_s *dev,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case MTDIOC_ERASESTATE:
|
||||||
|
{
|
||||||
|
uint8_t *result = (uint8_t *)arg;
|
||||||
|
*result = MTD_ERASED_STATE;
|
||||||
|
ret = OK;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
ret = -ENOTTY; /* Bad/unsupported command */
|
ret = -ENOTTY; /* Bad/unsupported command */
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user