Lines Matching +full:sector +full:- +full:count

4  * SPDX-License-Identifier: Apache-2.0
35 const struct device *dev = disk->dev; in disk_sdmmc_access_init()
36 const struct sdmmc_config *cfg = dev->config; in disk_sdmmc_access_init()
37 struct sdmmc_data *data = dev->data; in disk_sdmmc_access_init()
40 if (!sd_is_card_present(cfg->host_controller)) { in disk_sdmmc_access_init()
44 ret = sd_init(cfg->host_controller, &data->card); in disk_sdmmc_access_init()
46 data->status = SD_ERROR; in disk_sdmmc_access_init()
49 data->status = SD_OK; in disk_sdmmc_access_init()
55 const struct device *dev = disk->dev; in disk_sdmmc_access_status()
56 const struct sdmmc_config *cfg = dev->config; in disk_sdmmc_access_status()
57 struct sdmmc_data *data = dev->data; in disk_sdmmc_access_status()
59 if (!sd_is_card_present(cfg->host_controller)) { in disk_sdmmc_access_status()
62 if (data->status == SD_OK) { in disk_sdmmc_access_status()
70 uint32_t sector, uint32_t count) in disk_sdmmc_access_read() argument
72 const struct device *dev = disk->dev; in disk_sdmmc_access_read()
73 struct sdmmc_data *data = dev->data; in disk_sdmmc_access_read()
75 return sdmmc_read_blocks(&data->card, buf, sector, count); in disk_sdmmc_access_read()
79 uint32_t sector, uint32_t count) in disk_sdmmc_access_write() argument
81 const struct device *dev = disk->dev; in disk_sdmmc_access_write()
82 struct sdmmc_data *data = dev->data; in disk_sdmmc_access_write()
84 return sdmmc_write_blocks(&data->card, buf, sector, count); in disk_sdmmc_access_write()
89 const struct device *dev = disk->dev; in disk_sdmmc_access_ioctl()
90 struct sdmmc_data *data = dev->data; in disk_sdmmc_access_ioctl()
97 data->status = SD_UNINIT; in disk_sdmmc_access_ioctl()
98 return sdmmc_ioctl(&data->card, DISK_IOCTL_CTRL_DEINIT, NULL); in disk_sdmmc_access_ioctl()
100 return sdmmc_ioctl(&data->card, cmd, buf); in disk_sdmmc_access_ioctl()
116 struct sdmmc_data *data = dev->data; in disk_sdmmc_init()
118 data->status = SD_UNINIT; in disk_sdmmc_init()
120 return disk_access_register(data->disk_info); in disk_sdmmc_init()