Lines Matching +full:fill +full:- +full:level
4 * SPDX-License-Identifier: Apache-2.0
28 (const struct flash_driver_api *)dev->api; in z_impl_flash_fill()
29 const struct flash_parameters *fparams = api->get_parameters(dev); in z_impl_flash_fill()
33 if (sizeof(filler) < fparams->write_block_size) { in z_impl_flash_fill()
35 return -EINVAL; in z_impl_flash_fill()
42 * are correct, as such info is only available at the level of in z_impl_flash_fill()
47 return -EINVAL; in z_impl_flash_fill()
49 if ((size | (size_t)offset) & (fparams->write_block_size - 1)) { in z_impl_flash_fill()
51 fparams->write_block_size); in z_impl_flash_fill()
52 return -EINVAL; in z_impl_flash_fill()
58 size_t chunk = MIN(sizeof(filler), size - stored); in z_impl_flash_fill()
60 rc = api->write(dev, offset + stored, filler, chunk); in z_impl_flash_fill()
62 LOG_DBG("Fill to dev %p failed at offset 0x%zx\n", in z_impl_flash_fill()
74 (const struct flash_driver_api *)dev->api; in z_impl_flash_flatten()
75 __maybe_unused const struct flash_parameters *params = api->get_parameters(dev); in z_impl_flash_flatten()
79 api->erase != NULL) { in z_impl_flash_flatten()
80 return api->erase(dev, offset, size); in z_impl_flash_flatten()
85 return flash_fill(dev, params->erase_value, offset, size); in z_impl_flash_flatten()
87 return -ENOSYS; in z_impl_flash_flatten()
135 return -EINVAL; in z_impl_flash_copy()
144 return -EINVAL; in z_impl_flash_copy()
150 return -ENODEV; in z_impl_flash_copy()
155 return -ENODEV; in z_impl_flash_copy()
162 return -EINVAL; in z_impl_flash_copy()
166 offs += bytes_read, bytes_left -= bytes_read) { in z_impl_flash_copy()
170 (const struct flash_driver_api *)dst_dev->api; in z_impl_flash_copy()
171 const struct flash_parameters *params = api->get_parameters(dst_dev); in z_impl_flash_copy()
173 memset(buf, params->erase_value, write_size); in z_impl_flash_copy()