mtd:add dhara compatiblity layer

to support dhara ftl for fatfs

Signed-off-by: guohao15 <guohao15@xiaomi.com>
This commit is contained in:
guohao15
2023-04-03 15:11:09 +08:00
committed by Xiang Xiao
parent e2166eca55
commit d4cebd5d77
4 changed files with 875 additions and 0 deletions
+34
View File
@@ -723,6 +723,40 @@ int rpmsgmtd_register(FAR const char *remotecpu, FAR const char *remotepath,
int rpmsgmtd_server_init(void);
#endif
/****************************************************************************
* Name: dhara_initialize
*
* Description:
* Initialize to provide a block driver wrapper around an MTD interface
*
* Input Parameters:
* minor - The minor device number. The MTD block device will be
* registered as as /dev/mtdblockN where N is the minor number.
* mtd - The MTD device that supports the FLASH interface.
*
****************************************************************************/
#ifdef CONFIG_MTD_DHARA
int dhara_initialize(int minor, FAR struct mtd_dev_s *mtd);
#endif
/****************************************************************************
* Name: dhara_initialize_by_path
*
* Description:
* Initialize to provide a block driver wrapper around an MTD interface
*
* Input Parameters:
* path - The block device path.
* mtd - The MTD device that supports the FLASH interface.
*
****************************************************************************/
#ifdef CONFIG_MTD_DHARA
int dhara_initialize_by_path(FAR const char *path,
FAR struct mtd_dev_s *mtd);
#endif
#undef EXTERN
#ifdef __cplusplus
}