zephyr: Remove reference to CONFIG_MMC_VOLUME_NAME for v4.0.
Commit 07a8e3253a2d8a2076c9c83c4ed4158fa3fbb2a2 removes CONFIG_MMC_VOLUME_NAME from the Kconfig space. Instead we need to use the device tree to find the "disk-name" property of "zephyr,mmc-disk" devices. Signed-off-by: Detlev Zundel <dzu@member.fsf.org>
This commit is contained in:
parent
cd3eaad05c
commit
b83606fe33
1 changed files with 5 additions and 0 deletions
|
|
@ -30,6 +30,7 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include <zephyr/kernel.h>
|
#include <zephyr/kernel.h>
|
||||||
|
#include <zephyr/version.h>
|
||||||
#ifdef CONFIG_NETWORKING
|
#ifdef CONFIG_NETWORKING
|
||||||
#include <zephyr/net/net_context.h>
|
#include <zephyr/net/net_context.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -97,7 +98,11 @@ static void vfs_init(void) {
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
#ifdef CONFIG_DISK_DRIVER_SDMMC
|
#ifdef CONFIG_DISK_DRIVER_SDMMC
|
||||||
|
#if KERNEL_VERSION_NUMBER >= ZEPHYR_VERSION(4, 0, 0)
|
||||||
|
mp_obj_t args[] = { mp_obj_new_str_from_cstr(DT_PROP(DT_INST(0, zephyr_sdmmc_disk), disk_name)) };
|
||||||
|
#else
|
||||||
mp_obj_t args[] = { mp_obj_new_str_from_cstr(CONFIG_SDMMC_VOLUME_NAME) };
|
mp_obj_t args[] = { mp_obj_new_str_from_cstr(CONFIG_SDMMC_VOLUME_NAME) };
|
||||||
|
#endif
|
||||||
bdev = MP_OBJ_TYPE_GET_SLOT(&zephyr_disk_access_type, make_new)(&zephyr_disk_access_type, ARRAY_SIZE(args), 0, args);
|
bdev = MP_OBJ_TYPE_GET_SLOT(&zephyr_disk_access_type, make_new)(&zephyr_disk_access_type, ARRAY_SIZE(args), 0, args);
|
||||||
mount_point_str = "/sd";
|
mount_point_str = "/sd";
|
||||||
#elif defined(CONFIG_FLASH_MAP) && FIXED_PARTITION_EXISTS(storage_partition)
|
#elif defined(CONFIG_FLASH_MAP) && FIXED_PARTITION_EXISTS(storage_partition)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue