Home
last modified time | relevance | path

Searched refs:disk (Results 1 – 25 of 169) sorted by relevance

1234567

/Zephyr-Core-3.7.0/subsys/disk/
Ddisk_access.c19 LOG_MODULE_REGISTER(disk);
29 struct disk_info *disk = NULL, *itr; in disk_access_get_di() local
48 disk = itr; in disk_access_get_di()
54 return disk; in disk_access_get_di()
59 struct disk_info *disk = disk_access_get_di(pdrv); in disk_access_init() local
62 if ((disk != NULL) && (disk->refcnt == 0U)) { in disk_access_init()
64 if ((disk->ops != NULL) && (disk->ops->init != NULL)) { in disk_access_init()
65 rc = disk->ops->init(disk); in disk_access_init()
68 disk->refcnt++; in disk_access_init()
71 } else if ((disk != NULL) && (disk->refcnt < UINT16_MAX)) { in disk_access_init()
[all …]
/Zephyr-Core-3.7.0/subsys/fs/ext2/
Dext2_disk_access.c24 struct disk_data *disk = fs->backend; in disk_access_device_size() local
26 return disk->sector_count * disk->sector_size; in disk_access_device_size()
31 struct disk_data *disk = fs->backend; in disk_access_write_size() local
33 return disk->sector_size; in disk_access_write_size()
36 static int disk_read(const char *disk, uint8_t *buf, uint32_t start, uint32_t num) in disk_read() argument
41 rc = disk_access_ioctl(disk, DISK_IOCTL_CTRL_SYNC, NULL); in disk_read()
43 rc = disk_access_read(disk, buf, start, num); in disk_read()
50 static int disk_write(const char *disk, const uint8_t *buf, uint32_t start, uint32_t num) in disk_write() argument
55 rc = disk_access_ioctl(disk, DISK_IOCTL_CTRL_SYNC, NULL); in disk_write()
57 rc = disk_access_write(disk, buf, start, num); in disk_write()
[all …]
/Zephyr-Core-3.7.0/drivers/disk/nvme/
Dnvme_disk.c14 static int nvme_disk_status(struct disk_info *disk) in nvme_disk_status() argument
19 static int nvme_disk_read(struct disk_info *disk, in nvme_disk_read() argument
24 struct nvme_namespace *ns = CONTAINER_OF(disk->name, in nvme_disk_read()
37 nvme_lock(disk->dev); in nvme_disk_read()
64 nvme_unlock(disk->dev); in nvme_disk_read()
68 static int nvme_disk_write(struct disk_info *disk, in nvme_disk_write() argument
73 struct nvme_namespace *ns = CONTAINER_OF(disk->name, in nvme_disk_write()
86 nvme_lock(disk->dev); in nvme_disk_write()
113 nvme_unlock(disk->dev); in nvme_disk_write()
145 static int nvme_disk_ioctl(struct disk_info *disk, uint8_t cmd, void *buff) in nvme_disk_ioctl() argument
[all …]
/Zephyr-Core-3.7.0/include/zephyr/drivers/
Ddisk.h106 int (*init)(struct disk_info *disk);
107 int (*status)(struct disk_info *disk);
108 int (*read)(struct disk_info *disk, uint8_t *data_buf,
110 int (*write)(struct disk_info *disk, const uint8_t *data_buf,
112 int (*ioctl)(struct disk_info *disk, uint8_t cmd, void *buff);
122 int disk_access_register(struct disk_info *disk);
131 int disk_access_unregister(struct disk_info *disk);
/Zephyr-Core-3.7.0/drivers/disk/
Dsdmmc_subsys.c33 static int disk_sdmmc_access_init(struct disk_info *disk) in disk_sdmmc_access_init() argument
35 const struct device *dev = disk->dev; in disk_sdmmc_access_init()
53 static int disk_sdmmc_access_status(struct disk_info *disk) in disk_sdmmc_access_status() argument
55 const struct device *dev = disk->dev; in disk_sdmmc_access_status()
69 static int disk_sdmmc_access_read(struct disk_info *disk, uint8_t *buf, in disk_sdmmc_access_read() argument
72 const struct device *dev = disk->dev; in disk_sdmmc_access_read()
78 static int disk_sdmmc_access_write(struct disk_info *disk, const uint8_t *buf, in disk_sdmmc_access_write() argument
81 const struct device *dev = disk->dev; in disk_sdmmc_access_write()
87 static int disk_sdmmc_access_ioctl(struct disk_info *disk, uint8_t cmd, void *buf) in disk_sdmmc_access_ioctl() argument
89 const struct device *dev = disk->dev; in disk_sdmmc_access_ioctl()
[all …]
DKconfig11 source "drivers/disk/Kconfig.ram"
12 source "drivers/disk/Kconfig.flash"
13 source "drivers/disk/Kconfig.sdmmc"
14 source "drivers/disk/Kconfig.mmc"
15 source "drivers/disk/Kconfig.loopback"
Dmmc_subsys.c34 static int disk_mmc_access_init(struct disk_info *disk) in disk_mmc_access_init() argument
36 const struct device *dev = disk->dev; in disk_mmc_access_init()
50 static int disk_mmc_access_status(struct disk_info *disk) in disk_mmc_access_status() argument
52 const struct device *dev = disk->dev; in disk_mmc_access_status()
62 static int disk_mmc_access_read(struct disk_info *disk, uint8_t *buf, in disk_mmc_access_read() argument
65 const struct device *dev = disk->dev; in disk_mmc_access_read()
71 static int disk_mmc_access_write(struct disk_info *disk, const uint8_t *buf, in disk_mmc_access_write() argument
74 const struct device *dev = disk->dev; in disk_mmc_access_write()
80 static int disk_mmc_access_ioctl(struct disk_info *disk, uint8_t cmd, void *buf) in disk_mmc_access_ioctl() argument
82 const struct device *dev = disk->dev; in disk_mmc_access_ioctl()
[all …]
Dloopback_disk.c25 static int loopback_disk_access_status(struct disk_info *disk) in loopback_disk_access_status() argument
29 static int loopback_disk_access_read(struct disk_info *disk, uint8_t *data_buf, in loopback_disk_access_read() argument
32 struct loopback_disk_access *ctx = get_ctx(disk); in loopback_disk_access_read()
62 static int loopback_disk_access_write(struct disk_info *disk, const uint8_t *data_buf, in loopback_disk_access_write() argument
65 struct loopback_disk_access *ctx = get_ctx(disk); in loopback_disk_access_write()
97 static int loopback_disk_access_ioctl(struct disk_info *disk, uint8_t cmd, void *buff) in loopback_disk_access_ioctl() argument
99 struct loopback_disk_access *ctx = get_ctx(disk); in loopback_disk_access_ioctl()
119 static int loopback_disk_access_init(struct disk_info *disk) in loopback_disk_access_init() argument
121 return loopback_disk_access_ioctl(disk, DISK_IOCTL_CTRL_INIT, NULL); in loopback_disk_access_init()
Dramdisk.c39 static int disk_ram_access_status(struct disk_info *disk) in disk_ram_access_status() argument
44 static int disk_ram_access_read(struct disk_info *disk, uint8_t *buff, in disk_ram_access_read() argument
47 const struct device *dev = disk->dev; in disk_ram_access_read()
62 static int disk_ram_access_write(struct disk_info *disk, const uint8_t *buff, in disk_ram_access_write() argument
65 const struct device *dev = disk->dev; in disk_ram_access_write()
80 static int disk_ram_access_ioctl(struct disk_info *disk, uint8_t cmd, void *buff) in disk_ram_access_ioctl() argument
82 const struct ram_disk_config *config = disk->dev->config; in disk_ram_access_ioctl()
106 static int disk_ram_access_init(struct disk_info *disk) in disk_ram_access_init() argument
108 return disk_ram_access_ioctl(disk, DISK_IOCTL_CTRL_INIT, NULL); in disk_ram_access_init()
/Zephyr-Core-3.7.0/tests/subsys/fs/fat_fs_dual_drive/
Dapp.overlay9 compatible = "zephyr,ram-disk";
10 disk-name = "RAM";
16 compatible = "zephyr,ram-disk";
17 disk-name = "CF";
/Zephyr-Core-3.7.0/doc/services/storage/disk/
Daccess.rst9 The disk access API provides access to storage devices.
14 Since many disk devices (such as SD cards) are hotpluggable, the disk access
15 API provides IOCTLs to initialize and de-initialize the disk. They are
18 * :c:macro:`DISK_IOCTL_CTRL_INIT`: Initialize the disk. Must be called before
19 additional I/O operations can be run on the disk device. Equivalent to
22 * :c:macro:`DISK_IOCTL_CTRL_DEINIT`: De-initialize the disk. Once this IOCTL
24 the disk can be used for addition I/O operations.
26 Init/deinit IOCTL calls are balanced, so a disk will not de-initialize until
29 It is also possible to force a disk de-initialization by passing a
32 each disk driver may handle differently, but it will always return
[all …]
Dnvme.rst16 - NVMe controller: :zephyr_file:`drivers/disk/nvme/nvme_controller.c`
17 - NVMe commands: :zephyr_file:`drivers/disk/nvme/nvme_cmd.c`
18 - NVMe namespace: :zephyr_file:`drivers/disk/nvme/nvme_namespace.c`
24 accessing each ones through the Disk Access API :zephyr_file:`drivers/disk/nvme/nvme_disk.c`.
26 If a controller exposes more than 1 namespace (disk), it will be possible to raise the amount of bu…
29 Each exposed disk, via it's related disk_info structure, will be distinguished by its name which is…
30 it's related namespace. As such, the disk name follows NVMe naming which is nvme<k>n<n> where k is …
31 and n the namespame number. Most of the time, if only one NVMe disk is plugged into the system, one…
32 an exposed disk.
40 Any board exposing an NVMe disk should provide a DTS overlay to enable its use within Zephyr
/Zephyr-Core-3.7.0/tests/drivers/disk/disk_access/boards/
Dnative_sim.overlay27 compatible = "zephyr,flash-disk";
29 disk-name = "NAND";
34 compatible = "zephyr,ram-disk";
35 disk-name = "RAM";
/Zephyr-Core-3.7.0/tests/drivers/disk/disk_performance/
DREADME.txt4 This test is intended to test the performance of disk devices under Zephyr. It
5 was tested with SD cards, but can be used for other disk devices as well.
8 * Setup test: simply sets up the disk, and reads data such as the sector count
14 * Random read test: This test performs random reads across the disk, each one
20 * Random write test: This test performs random writes across the disk, each one
/Zephyr-Core-3.7.0/tests/drivers/disk/disk_access/
DREADME.txt4 This test is intended to verify the functionality of disk devices in Zephyr.
5 It is designed to test the NXP USDHC disk driver, but can be used for other
6 disk devices as well. The test has the following phases:
8 * Setup test: Verifies that disk initialization works, as well as testing
9 disk_access_ioctl by querying the disk for its sector size and sector count.
17 The test deliberately will read sectors beyond the end of the disk, and if
24 disk and reads it back to verify correctness. The test first performs writes
26 writes that would be outside the bounds of the disk), then performs multiple
/Zephyr-Core-3.7.0/samples/subsys/usb/cdc_acm/
Dramdisk.overlay9 compatible = "zephyr,ram-disk";
10 disk-name = "RAM";
/Zephyr-Core-3.7.0/samples/subsys/usb/mass/
Dramdisk.overlay9 compatible = "zephyr,ram-disk";
10 disk-name = "RAM";
/Zephyr-Core-3.7.0/tests/posix/fs/
Dapp.overlay9 compatible = "zephyr,ram-disk";
10 disk-name = "RAM";
/Zephyr-Core-3.7.0/tests/subsys/fs/fat_fs_api/
Dramdisk.overlay9 compatible = "zephyr,ram-disk";
10 disk-name = "RAM";
/Zephyr-Core-3.7.0/tests/subsys/fs/ext2/
Dramdisk_big.overlay9 compatible = "zephyr,ram-disk";
10 disk-name = "RAM";
Dramdisk_small.overlay9 compatible = "zephyr,ram-disk";
10 disk-name = "RAM";
/Zephyr-Core-3.7.0/samples/subsys/fs/format/
Dramdisk.overlay9 compatible = "zephyr,ram-disk";
10 disk-name = "RAM";
/Zephyr-Core-3.7.0/tests/subsys/fs/multi-fs/
Dramdisk.overlay9 compatible = "zephyr,ram-disk";
10 disk-name = "RAM";
/Zephyr-Core-3.7.0/samples/subsys/fs/fs_sample/boards/
Dnrf52840dk_nrf52840_qspi.overlay8 * altered here as external_partition used by the disk is defined
29 compatible = "zephyr,flash-disk";
31 disk-name = "SD";
/Zephyr-Core-3.7.0/include/zephyr/usb/class/
Dusbd_msc.h20 const char *disk; member
47 .disk = STRINGIFY(disk_name), \

1234567