Skip to content

Commit b83606f

Browse files
laodzudpgeorge
authored andcommitted
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>
1 parent cd3eaad commit b83606f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

ports/zephyr/main.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
#include <string.h>
3131

3232
#include <zephyr/kernel.h>
33+
#include <zephyr/version.h>
3334
#ifdef CONFIG_NETWORKING
3435
#include <zephyr/net/net_context.h>
3536
#endif
@@ -97,7 +98,11 @@ static void vfs_init(void) {
9798
int ret = 0;
9899

99100
#ifdef CONFIG_DISK_DRIVER_SDMMC
101+
#if KERNEL_VERSION_NUMBER >= ZEPHYR_VERSION(4, 0, 0)
102+
mp_obj_t args[] = { mp_obj_new_str_from_cstr(DT_PROP(DT_INST(0, zephyr_sdmmc_disk), disk_name)) };
103+
#else
100104
mp_obj_t args[] = { mp_obj_new_str_from_cstr(CONFIG_SDMMC_VOLUME_NAME) };
105+
#endif
101106
bdev = MP_OBJ_TYPE_GET_SLOT(&zephyr_disk_access_type, make_new)(&zephyr_disk_access_type, ARRAY_SIZE(args), 0, args);
102107
mount_point_str = "/sd";
103108
#elif defined(CONFIG_FLASH_MAP) && FIXED_PARTITION_EXISTS(storage_partition)

0 commit comments

Comments
 (0)