Skip to content

Commit 719395f

Browse files
Yossi LevyYossi Levy
authored andcommitted
fixing FAT mount failure in kvstore FILESYSTEM
1 parent 388da7f commit 719395f

File tree

2 files changed

+9
-26
lines changed

2 files changed

+9
-26
lines changed

features/storage/kvstore/conf/kv_config.cpp

Lines changed: 9 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -217,16 +217,16 @@ int _get_addresses(BlockDevice *bd, bd_addr_t start_address, bd_size_t size, bd_
217217
return 0;
218218
}
219219

220-
FileSystem *_get_filesystem_FAT(BlockDevice *bd, const char *mount)
220+
FileSystem *_get_filesystem_FAT(const char *mount)
221221
{
222-
static FATFileSystem sdcard(mount, bd);
222+
static FATFileSystem sdcard(mount);
223223
return &sdcard;
224224

225225
}
226226

227-
FileSystem *_get_filesystem_LITTLE(BlockDevice *bd, const char *mount)
227+
FileSystem *_get_filesystem_LITTLE(const char *mount)
228228
{
229-
static LittleFileSystem flash(mount, bd);
229+
static LittleFileSystem flash(mount);
230230
return &flash;
231231
}
232232

@@ -236,12 +236,12 @@ FileSystemStore *_get_file_system_store(FileSystem *fs)
236236
return &fss;
237237
}
238238

239-
FileSystem *_get_filesystem_default(BlockDevice *bd, const char *mount)
239+
FileSystem *_get_filesystem_default(const char *mount)
240240
{
241241
#if COMPONENT_QSPIF || COMPONENT_SPIF || COMPONENT_DATAFLASH
242-
return _get_filesystem_LITTLE(bd, mount);
242+
return _get_filesystem_LITTLE(mount);
243243
#elif COMPONENT_SD
244-
return _get_filesystem_FAT(bd, mount);
244+
return _get_filesystem_FAT(mount);
245245
#else
246246
return NULL;
247247
#endif
@@ -845,12 +845,6 @@ int _storage_config_tdb_external_common()
845845
static TDBStore tdb_external(kvstore_config.external_bd);
846846
kvstore_config.external_store = &tdb_external;
847847

848-
ret = kvstore_config.external_store->init();
849-
if (ret != MBED_SUCCESS) {
850-
tr_error("KV Config: Fail to init external TDBStore");
851-
return ret;
852-
}
853-
854848
//Create SecureStore and initialize it
855849
static SecureStore secst(kvstore_config.external_store, kvstore_config.internal_store);
856850

@@ -955,8 +949,7 @@ int _storage_config_FILESYSTEM()
955949
//component block device configured in the system. The priority is:
956950
//QSPI -> SPI -> DATAFLASH == LITTLE
957951
//SD == FAT
958-
kvstore_config.external_fs = GET_FILESYSTEM(MBED_CONF_STORAGE_FILESYSTEM_FILESYSTEM, kvstore_config.external_bd,
959-
mount_point);
952+
kvstore_config.external_fs = GET_FILESYSTEM(MBED_CONF_STORAGE_FILESYSTEM_FILESYSTEM, mount_point);
960953
if (kvstore_config.external_fs == NULL) {
961954
tr_error("KV Config: Fail to get FileSystem");
962955
return MBED_ERROR_FAILED_OPERATION ;
@@ -990,8 +983,7 @@ int _storage_config_FILESYSTEM_NO_RBP()
990983
//component block device configured in the system. The priority is:
991984
//QSPI -> SPI -> DATAFLASH == LITTLE
992985
//SD == FAT
993-
kvstore_config.external_fs = GET_FILESYSTEM(MBED_CONF_STORAGE_FILESYSTEM_NO_RBP_FILESYSTEM, kvstore_config.external_bd,
994-
mount_point);
986+
kvstore_config.external_fs = GET_FILESYSTEM(MBED_CONF_STORAGE_FILESYSTEM_NO_RBP_FILESYSTEM, mount_point);
995987
if (kvstore_config.external_fs == NULL) {
996988
tr_error("KV Config: Fail to get FileSystem");
997989
return MBED_ERROR_FAILED_OPERATION ;
@@ -1026,12 +1018,6 @@ int _storage_config_filesystem_common()
10261018
return MBED_ERROR_FAILED_OPERATION ;
10271019
}
10281020

1029-
ret = kvstore_config.external_store->init();
1030-
if (ret != MBED_SUCCESS) {
1031-
tr_error("KV Config: Fail to init FileSystemStore");
1032-
return ret;
1033-
}
1034-
10351021
//Create SecureStore and set it as main KVStore
10361022
static SecureStore secst(kvstore_config.external_store, kvstore_config.internal_store);
10371023

features/storage/kvstore/conf/mbed_lib.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@
1111
}
1212
},
1313
"target_overrides": {
14-
"K64F": {
15-
"storage_type": "FILESYSTEM"
16-
},
1714
"FUTURE_SEQUANA_M0_PSA": {
1815
"storage_type": "TDB_INTERNAL"
1916
},

0 commit comments

Comments
 (0)