Home
last modified time | relevance | path

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

12345678

/Zephyr-Core-3.5.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.5.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.5.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.5.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()
44 LOG_DBG("disk read: (start:%d, num:%d) (ret: %d)", start, num, rc); 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()
[all …]
/Zephyr-Core-3.5.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()
42 nvme_lock(disk->dev); in nvme_disk_read()
63 LOG_WRN("Reading at sector %u (count %d) on disk %s failed", in nvme_disk_read()
69 nvme_unlock(disk->dev); in nvme_disk_read()
73 static int nvme_disk_write(struct disk_info *disk, in nvme_disk_write() argument
78 struct nvme_namespace *ns = CONTAINER_OF(disk->name, in nvme_disk_write()
91 nvme_lock(disk->dev); in nvme_disk_write()
[all …]
/Zephyr-Core-3.5.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"
Dmmc_subsys.c8 * MMC disk driver using zephyr SD subsystem
13 #include <zephyr/drivers/disk.h>
34 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()
55 static int disk_mmc_access_status(struct disk_info *disk) in disk_mmc_access_status() argument
57 const struct device *dev = disk->dev; in disk_mmc_access_status()
67 static int disk_mmc_access_read(struct disk_info *disk, uint8_t *buf, in disk_mmc_access_read() argument
70 const struct device *dev = disk->dev; in disk_mmc_access_read()
76 static int disk_mmc_access_write(struct disk_info *disk, const uint8_t *buf, in disk_mmc_access_write() argument
79 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>
39 static int disk_ram_access_status(struct disk_info *disk) in disk_ram_access_status() argument
44 static int disk_ram_access_init(struct disk_info *disk) in disk_ram_access_init() argument
49 static int disk_ram_access_read(struct disk_info *disk, uint8_t *buff, in disk_ram_access_read() argument
52 const struct device *dev = disk->dev; in disk_ram_access_read()
67 static int disk_ram_access_write(struct disk_info *disk, const uint8_t *buff, in disk_ram_access_write() argument
70 const struct device *dev = disk->dev; in disk_ram_access_write()
85 static int disk_ram_access_ioctl(struct disk_info *disk, uint8_t cmd, void *buff) in disk_ram_access_ioctl() argument
87 const struct ram_disk_config *config = disk->dev->config; in disk_ram_access_ioctl()
133 "Disk size is smaller than memory region"); \
/Zephyr-Core-3.5.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:
18 drivers.disk.nvme:
/Zephyr-Core-3.5.0/dts/bindings/disk/
Dzephyr,ram-disk.yaml4 description: RAM disk
6 compatible: "zephyr,ram-disk"
11 disk-name:
15 Disk name.
22 Disk sector size in bytes.
33 Optional phandle to the memory region to be used as a RAM disk,
34 if not used a local buffer is defined for each disk instance.
/Zephyr-Core-3.5.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?"
48 /* Sets up test by initializing disk */
55 zassert_equal(rc, 0, "Disk access initialization failed"); in test_setup()
58 zassert_equal(rc, DISK_STATUS_OK, "Disk status is not OK"); in test_setup()
61 zassert_equal(rc, 0, "Disk ioctl get sector count failed"); in test_setup()
63 TC_PRINT("Disk reports %u sectors\n", cmd_buf); in test_setup()
67 zassert_equal(rc, 0, "Disk ioctl get sector size failed"); in test_setup()
68 TC_PRINT("Disk reports sector size %u\n", cmd_buf); in test_setup()
[all …]
/Zephyr-Core-3.5.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"
/Zephyr-Core-3.5.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.disk_performance.disk.nvme:
/Zephyr-Core-3.5.0/doc/services/storage/disk/
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";
71 Zephyr also has support for eMMC devices using the Disk Access API.
86 compatible = "zephyr,flash-disk";
88 disk-name = "NAND";
[all …]
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 …]
/Zephyr-Core-3.5.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.5.0/tests/drivers/disk/disk_performance/src/
Dmain.c22 #error "No disk device defined, is your board supported?"
55 /* Sets up test by initializing disk */
62 zassert_equal(rc, 0, "Disk access initialization failed"); in test_setup()
65 zassert_equal(rc, DISK_STATUS_OK, "Disk status is not OK"); in test_setup()
68 zassert_equal(rc, 0, "Disk ioctl get sector count failed"); in test_setup()
70 TC_PRINT("Disk reports %u sectors\n", cmd_buf); in test_setup()
74 zassert_equal(rc, 0, "Disk ioctl get sector size failed"); in test_setup()
75 TC_PRINT("Disk reports sector size %u\n", cmd_buf); in test_setup()
100 /* Read from start of disk */ in read_helper()
105 zassert_equal(rc, 0, "disk read failed"); in read_helper()
[all …]
/Zephyr-Core-3.5.0/samples/subsys/usb/mass/
DKconfig16 bool "Use RAM disk as block device"
19 bool "Use RAM disk and FAT file system"
24 bool "Use FLASH disk and FAT file system"
30 bool "Use FLASH disk and LittleFS"
/Zephyr-Core-3.5.0/samples/subsys/fs/format/
DREADME.rst14 * FAT file system on RAM disk
22 The RAM disk scenario is supported on the mimxrt1064_evk board.
23 To build the RAM disk sample, the configuration `prj_ram.conf` needs to be used by setting `CONF_FI…
33 The RAM disk sample for the MIMXRT1064-EVK board can be build as follow:
48 I: LittleFS version 2.4, disk version 2.0
/Zephyr-Core-3.5.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.5.0/tests/subsys/fs/ext2/src/
Dutils.c13 static int sectors_info(const char *disk, uint32_t *ss, uint32_t *sc) in sectors_info() argument
17 rc = disk_access_ioctl(disk, DISK_IOCTL_GET_SECTOR_COUNT, sc); in sectors_info()
19 TC_PRINT("Disk access (sector count) error: %d", rc); in sectors_info()
23 rc = disk_access_ioctl(disk, DISK_IOCTL_GET_SECTOR_SIZE, ss); in sectors_info()
25 TC_PRINT("Disk access (sector size) error: %d", rc); in sectors_info()

12345678