Home
last modified time | relevance | path

Searched full:disk (Results 1 – 25 of 161) sorted by relevance

1234567

/Zephyr-Core-3.4.0/subsys/disk/
Ddisk_access.c18 LOG_MODULE_REGISTER(disk);
28 struct disk_info *disk = NULL, *itr; in disk_access_get_di() local
45 /* Check for disk name match */ in disk_access_get_di()
47 disk = itr; in disk_access_get_di()
53 return disk; in disk_access_get_di()
58 struct disk_info *disk = disk_access_get_di(pdrv); in disk_access_init() local
61 if ((disk != NULL) && (disk->ops != NULL) && in disk_access_init()
62 (disk->ops->init != NULL)) { in disk_access_init()
63 rc = disk->ops->init(disk); in disk_access_init()
71 struct disk_info *disk = disk_access_get_di(pdrv); in disk_access_status() local
[all …]
DKconfig5 bool "Disk Interface"
8 Enable disk access over a supported media backend like FLASH or RAM
12 module = DISK
13 module-str = disk
/Zephyr-Core-3.4.0/include/zephyr/drivers/
Ddisk.h10 * @brief Disk Driver Interface
12 * This file contains interface for disk access. Apart from disks, various
22 * @brief Disk Driver Interface
23 * @defgroup disk_driver_interface Disk Driver Interface
40 /** Get the number of sectors in the disk */
42 /** Get the size of a disk SECTOR in bytes */
48 /** Commit any cached read/writes to disk */
55 /** Disk status okay */
57 /** Disk status uninitialized */
59 /** Disk status no media */
[all …]
/Zephyr-Core-3.4.0/include/zephyr/storage/
Ddisk_access.h9 * @brief Disk Access layer API
11 * This file contains APIs for disk access.
26 * @brief Disk Access APIs
27 * @defgroup disk_access_interface Disk Access Interface
32 #include <zephyr/drivers/disk.h>
42 * disk or the backing device can do any initialization.
44 * @param[in] pdrv Disk name
51 * @brief Get the status of disk
53 * This call is used to get the status of the disk
55 * @param[in] pdrv Disk name
[all …]
/Zephyr-Core-3.4.0/drivers/disk/nvme/
Dnvme_disk.c14 static int nvme_disk_init(struct disk_info *disk) in nvme_disk_init() argument
19 static int nvme_disk_status(struct disk_info *disk) in nvme_disk_status() argument
24 static int nvme_disk_read(struct disk_info *disk, in nvme_disk_read() argument
29 struct nvme_namespace *ns = CONTAINER_OF(disk->name, in nvme_disk_read()
37 nvme_lock(disk->dev); in nvme_disk_read()
58 LOG_WRN("Reading at sector %u (count %d) on disk %s failed", in nvme_disk_read()
63 nvme_unlock(disk->dev); in nvme_disk_read()
67 static int nvme_disk_write(struct disk_info *disk, in nvme_disk_write() argument
72 struct nvme_namespace *ns = CONTAINER_OF(disk->name, in nvme_disk_write()
80 nvme_lock(disk->dev); in nvme_disk_write()
[all …]
/Zephyr-Core-3.4.0/drivers/disk/
DKconfig5 bool "Disk drivers"
7 Disk Driver configuration
11 source "drivers/disk/Kconfig.ram"
12 source "drivers/disk/Kconfig.flash"
13 source "drivers/disk/Kconfig.sdmmc"
14 source "drivers/disk/Kconfig.mmc"
DKconfig.ram5 bool "RAM Disk"
7 RAM buffer used to emulate storage disk.
14 int "RAM Disk size in kilobytes"
17 Size of the RAM Disk.
20 string "RAM Disk mount point or drive name"
23 Disk name as per file system naming guidelines.
Dmmc_subsys.c8 * MMC disk driver using zephyr SD subsystem
13 #include <zephyr/drivers/disk.h>
33 static int disk_mmc_access_init(struct disk_info *disk) in disk_mmc_access_init() argument
35 const struct device *dev = disk->dev; in disk_mmc_access_init()
54 static int disk_mmc_access_status(struct disk_info *disk) in disk_mmc_access_status() argument
56 const struct device *dev = disk->dev; in disk_mmc_access_status()
66 static int disk_mmc_access_read(struct disk_info *disk, uint8_t *buf, in disk_mmc_access_read() argument
69 const struct device *dev = disk->dev; in disk_mmc_access_read()
75 static int disk_mmc_access_write(struct disk_info *disk, const uint8_t *buf, in disk_mmc_access_write() argument
78 const struct device *dev = disk->dev; in disk_mmc_access_write()
[all …]
Dsdmmc_subsys.c8 * SDMMC disk driver using zephyr SD subsystem
13 #include <zephyr/drivers/disk.h>
33 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()
58 static int disk_sdmmc_access_status(struct disk_info *disk) in disk_sdmmc_access_status() argument
60 const struct device *dev = disk->dev; in disk_sdmmc_access_status()
74 static int disk_sdmmc_access_read(struct disk_info *disk, uint8_t *buf, in disk_sdmmc_access_read() argument
77 const struct device *dev = disk->dev; in disk_sdmmc_access_read()
83 static int disk_sdmmc_access_write(struct disk_info *disk, const uint8_t *buf, in disk_sdmmc_access_write() argument
86 const struct device *dev = disk->dev; in disk_sdmmc_access_write()
[all …]
Dramdisk.c10 #include <zephyr/drivers/disk.h>
29 static int disk_ram_access_status(struct disk_info *disk) in disk_ram_access_status() argument
34 static int disk_ram_access_init(struct disk_info *disk) in disk_ram_access_init() argument
39 static int disk_ram_access_read(struct disk_info *disk, uint8_t *buff, in disk_ram_access_read() argument
55 static int disk_ram_access_write(struct disk_info *disk, const uint8_t *buff, in disk_ram_access_write() argument
71 static int disk_ram_access_ioctl(struct disk_info *disk, uint8_t cmd, void *buff) in disk_ram_access_ioctl() argument
/Zephyr-Core-3.4.0/tests/drivers/disk/disk_access/
DREADME.txt1 Disk Access Test
4 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
Dtestcase.yaml3 tags: disk
5 drivers.disk.usdhc:
16 drivers.disk.ram:
20 drivers.disk.nvme:
/Zephyr-Core-3.4.0/tests/drivers/disk/disk_access/src/
Dmain.c8 * WARNING: This test will overwrite data on any disk utilized. Do not run
9 * this test with an disk that has useful data
26 #error "No disk device defined, is your board supported?"
47 /* Sets up test by initializing disk */
54 zassert_equal(rc, 0, "Disk access initialization failed"); in test_setup()
57 zassert_equal(rc, DISK_STATUS_OK, "Disk status is not OK"); in test_setup()
60 zassert_equal(rc, 0, "Disk ioctl get sector count failed"); in test_setup()
62 TC_PRINT("Disk reports %u sectors\n", cmd_buf); in test_setup()
66 zassert_equal(rc, 0, "Disk ioctl get sector size failed"); in test_setup()
67 TC_PRINT("Disk reports sector size %u\n", cmd_buf); in test_setup()
[all …]
/Zephyr-Core-3.4.0/doc/services/storage/disk/
Dnvme.rst8 NVMe controllers and disks are supported. Disks can be accessed via the :ref:`Disk Access API <disk…
15 - NVMe controller :zephyr_file:`drivers/disk/nvme/nvme_controller.c`
16 - NVMe commands :zephyr_file:`drivers/disk/nvme/nvme_cmd.c`
17 - NVMe namespace :zephyr_file:`drivers/disk/nvme/nvme_namespace.c`
23 accessing each ones through the Disk Access API :zephyr_file:`drivers/disk/nvme/nvme_disk.c`.
25 If a controller exposes more than 1 namespace (disk), it will be possible to raise the amount of bu…
28 Each exposed disk, via it's related disk_info structure, will be distinguished by its name which is…
29 it's related namespace. As such, the disk name follows NVMe naming which is nvme<k>n<n> where k is …
30 and n the namespame number. Most of the time, if only one NVMe disk is plugged into the system, one…
31 an exposed disk.
[all …]
Daccess.rst3 Disk Access
9 The disk access API provides access to storage devices.
15 SD cards via SPI. These drivers use disk driver interface and a file system
16 can access the SD cards via disk access API.
29 Zephyr supports SD memory cards via the disk driver API, or via the SDMMC
30 subsystem. This subsystem can be used transparently via the disk driver API,
54 compatible = "zephyr,sdmmc-disk";
78 compatible = "zephyr,flash-disk";
80 disk-name = "NAND";
85 The cache size specified in :dtcompatible:`zephyr,flash-disk` node should be
[all …]
/Zephyr-Core-3.4.0/dts/bindings/sd/
Dzephyr,sdmmc-disk.yaml2 Zephyr MMC disk node. A binding with this compatible present within an SD
3 host controller device node indicates that an SDMMC disk is attached to that
4 SD bus. This binding will enable that disk to be used with the disk driver
7 compatible: "zephyr,sdmmc-disk"
Dzephyr,mmc-disk.yaml2 Zephyr MMC disk node. A binding with this compatible present within an SD
4 SD bus. This binding will enable that to be used with the disk driver
7 compatible: "zephyr,mmc-disk"
/Zephyr-Core-3.4.0/tests/drivers/disk/disk_performance/
DREADME.txt1 Disk Performance Test
4 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
Dtestcase.yaml3 tags: disk
5 drivers.disk.disk_performance.sdhc:
14 drivers.disk_performance.disk.nvme:
/Zephyr-Core-3.4.0/tests/drivers/disk/disk_performance/src/
Dmain.c24 #error "No disk device defined, is your board supported?"
57 /* Sets up test by initializing disk */
64 zassert_equal(rc, 0, "Disk access initialization failed"); in test_setup()
67 zassert_equal(rc, DISK_STATUS_OK, "Disk status is not OK"); in test_setup()
70 zassert_equal(rc, 0, "Disk ioctl get sector count failed"); in test_setup()
72 TC_PRINT("Disk reports %u sectors\n", cmd_buf); in test_setup()
76 zassert_equal(rc, 0, "Disk ioctl get sector size failed"); in test_setup()
77 TC_PRINT("Disk reports sector size %u\n", cmd_buf); in test_setup()
102 /* Read from start of disk */ in read_helper()
107 zassert_equal(rc, 0, "disk read failed"); in read_helper()
[all …]
/Zephyr-Core-3.4.0/samples/subsys/usb/mass/
DKconfig16 bool "Use RAM disk as block device"
20 bool "Use RAM disk and FAT file system"
26 bool "Use FLASH disk and FAT file system"
32 bool "Use FLASH disk and LittleFS"
/Zephyr-Core-3.4.0/tests/subsys/fs/fat_fs_dual_drive/src/
Ddisk_access_test_drv.c17 /* A 96KB RAM Disk, which meets ELM FAT fs's minimum block requirement. Fit for
31 static int disk_ram_access_status(struct disk_info *disk) in disk_ram_access_status() argument
36 static int disk_ram_access_init(struct disk_info *disk) in disk_ram_access_init() argument
41 static int disk_ram_access_read(struct disk_info *disk, uint8_t *buff, in disk_ram_access_read() argument
49 static int disk_ram_access_write(struct disk_info *disk, const uint8_t *buff, in disk_ram_access_write() argument
57 static int disk_ram_access_ioctl(struct disk_info *disk, uint8_t cmd, void *buff) in disk_ram_access_ioctl() argument
/Zephyr-Core-3.4.0/samples/subsys/fs/format/
DREADME.rst13 * FAT file system on RAM disk
21 The RAM disk scenario is supported on the mimxrt1064_evk board.
22 To build the RAM disk sample, the configuration `prj_ram.conf` needs to be used by setting `CONF_FI…
32 The RAM disk sample for the MIMXRT1064-EVK board can be build as follow:
47 I: LittleFS version 2.4, disk version 2.0
/Zephyr-Core-3.4.0/subsys/usb/device/class/
DKconfig.msc13 string "Mass storage disk or drive name"
16 Mass storage device disk or drive name
27 default "ZEPHYR USB DISK "
51 Stack size for mass storage disk operations thread
/Zephyr-Core-3.4.0/samples/subsys/fs/fat_fs/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";

1234567