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:
Detlev Zundel 2025-02-06 16:40:14 +01:00 committed by Damien George
parent cd3eaad05c
commit b83606fe33

View file

@ -30,6 +30,7 @@
#include <string.h>
#include <zephyr/kernel.h>
#include <zephyr/version.h>
#ifdef CONFIG_NETWORKING
#include <zephyr/net/net_context.h>
#endif
@ -97,7 +98,11 @@ static void vfs_init(void) {
int ret = 0;
#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) };
#endif
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";
#elif defined(CONFIG_FLASH_MAP) && FIXED_PARTITION_EXISTS(storage_partition)