drivers: disk: sdmmc_subsys: remove CONFIG_SDMMC_VOLUME_NAME
Remove CONFIG_SDMMC_VOLUME_NAME, and set the disk name based on the ``disk-name`` property. This aligns with other disk drivers, and allows for multiple instances of the sdmmc_subsys disk driver to be registered. Add disk-name properties for all in tree definitions for the sdmmc-subsys disk driver, and change all in tree usage of the disk name Fixes #75004 Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
This commit is contained in:
parent
87bb0b9212
commit
a1dc0b8b3e
58 changed files with 77 additions and 40 deletions
|
@ -11,6 +11,7 @@ sdhc@0 {
|
|||
|
||||
sdmmc {
|
||||
compatible = "zephyr,sdmmc-disk";
|
||||
disk-name = "SD";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
#endif
|
||||
|
||||
#if defined(CONFIG_DISK_DRIVER_SDMMC)
|
||||
#define DISK_NAME_PHYS CONFIG_SDMMC_VOLUME_NAME
|
||||
#define DISK_NAME_PHYS "SD"
|
||||
#elif defined(CONFIG_DISK_DRIVER_MMC)
|
||||
#define DISK_NAME_PHYS CONFIG_MMC_VOLUME_NAME
|
||||
#elif defined(CONFIG_DISK_DRIVER_FLASH)
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
#include <zephyr/random/random.h>
|
||||
|
||||
#if defined(CONFIG_DISK_DRIVER_SDMMC)
|
||||
#define DISK_NAME CONFIG_SDMMC_VOLUME_NAME
|
||||
#define DISK_NAME "SD"
|
||||
#elif defined(CONFIG_DISK_DRIVER_MMC)
|
||||
#define DISK_NAME CONFIG_MMC_VOLUME_NAME
|
||||
#elif defined(CONFIG_NVME)
|
||||
|
|
|
@ -4,12 +4,6 @@
|
|||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
&sdmmc1 {
|
||||
sdmmc {
|
||||
compatible = "zephyr,sdmmc-disk";
|
||||
};
|
||||
};
|
||||
|
||||
/delete-node/ &storage_partition;
|
||||
|
||||
&flash0 {
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
#ifdef CONFIG_FS_LITTLEFS_BLK_DEV
|
||||
|
||||
#ifdef CONFIG_DISK_DRIVER_SDMMC
|
||||
#define DISK_NAME CONFIG_SDMMC_VOLUME_NAME
|
||||
#define DISK_NAME "SD"
|
||||
#elif defined(CONFIG_DISK_DRIVER_MMC)
|
||||
#define DISK_NAME CONFIG_MMC_VOLUME_NAME
|
||||
#else
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
status = "okay";
|
||||
mmc {
|
||||
compatible = "zephyr,sdmmc-disk";
|
||||
disk-name = "SD";
|
||||
status = "okay";
|
||||
};
|
||||
spi-max-frequency = <20000000>;
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
#elif CONFIG_DISK_DRIVER_FLASH
|
||||
#define STORAGE_DEVICE "NAND"
|
||||
#elif CONFIG_DISK_DRIVER_SDMMC
|
||||
#define STORAGE_DEVICE "SDMMC"
|
||||
#define STORAGE_DEVICE "SD"
|
||||
#endif
|
||||
|
||||
/* All tests must use this structure to mount file system. After each test this structure is cleaned
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
#elif defined(CONFIG_DISK_DRIVER_FLASH)
|
||||
#define DISK_NAME DT_PROP(DT_NODELABEL(test_disk), disk_name)
|
||||
#elif defined(CONFIG_DISK_DRIVER_SDMMC)
|
||||
#define DISK_NAME CONFIG_SDMMC_VOLUME_NAME
|
||||
#define DISK_NAME "SD"
|
||||
#elif defined(CONFIG_DISK_DRIVER_MMC)
|
||||
#define DISK_NAME CONFIG_MMC_VOLUME_NAME
|
||||
#else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue