Home
last modified time | relevance | path

Searched refs:write_block_size (Results 1 – 25 of 66) sorted by relevance

123

/Zephyr-latest/tests/drivers/flash/erase_blocks/src/
Dmain.c131 size_t write_block_size) in test_flash_write_across_page_boundary() argument
136 off_t cross_write_start_offset = page_boundary - (off_t)write_block_size; in test_flash_write_across_page_boundary()
137 size_t cross_write_size = write_block_size * 2; in test_flash_write_across_page_boundary()
150 size_t write_block_size = *((size_t *)data); in test_flash_write_across_page_boundaries() local
162 test_flash_write_across_page_boundary(info, write_block_size); in test_flash_write_across_page_boundaries()
169 size_t write_block_size = parameters->write_block_size; in ZTEST() local
172 &write_block_size); in ZTEST()
210 size_t write_block_size = parameters->write_block_size; in ZTEST() local
213 &write_block_size); in ZTEST()
/Zephyr-latest/drivers/flash/
Dsoc_flash_xmc4xxx.c9 #define FLASH_WRITE_BLK_SZ DT_PROP(DT_INST(0, infineon_xmc4xxx_nv_flash), write_block_size)
68 aligned_page[DT_PROP(DT_INST(0, infineon_xmc4xxx_nv_flash), write_block_size)];
83 if (len % dev_config->parameters.write_block_size || in flash_xmc4xxx_write()
84 offset % dev_config->parameters.write_block_size > 0) { in flash_xmc4xxx_write()
94 num_pages = len / dev_config->parameters.write_block_size; in flash_xmc4xxx_write()
101 memcpy(aligned_page, src, dev_config->parameters.write_block_size); in flash_xmc4xxx_write()
108 flash_addr += dev_config->parameters.write_block_size; in flash_xmc4xxx_write()
109 src += dev_config->parameters.write_block_size; in flash_xmc4xxx_write()
197 .parameters = {.write_block_size = FLASH_WRITE_BLK_SZ, .erase_value = 0}};
Dsoc_flash_lpc.c38 #if DT_NODE_HAS_PROP(SOC_NV_FLASH_NODE, write_block_size)
39 .write_block_size = DT_PROP(SOC_NV_FLASH_NODE, write_block_size),
41 .write_block_size = FSL_FEATURE_FLASH_PFLASH_BLOCK_WRITE_UNIT_SIZE,
72 page_size = flash_lpc_parameters.write_block_size; in flash_lpc_erase()
Dsoc_flash_numaker_rmc.c21 #define SOC_NV_FLASH_WRITE_BLOCK_SIZE DT_PROP_OR(SOC_NV_FLASH_NODE, write_block_size, 0x04)
30 .write_block_size = SOC_NV_FLASH_WRITE_BLOCK_SIZE,
171 int block_size = flash_numaker_parameters.write_block_size; in flash_numaker_write()
172 int blocks = len / flash_numaker_parameters.write_block_size; in flash_numaker_write()
186 if ((addr % flash_numaker_parameters.write_block_size) != 0) { in flash_numaker_write()
Dsoc_flash_numaker.c21 #define SOC_NV_FLASH_WRITE_BLOCK_SIZE DT_PROP_OR(SOC_NV_FLASH_NODE, write_block_size, 0x04)
30 .write_block_size = SOC_NV_FLASH_WRITE_BLOCK_SIZE,
177 int block_size = flash_numaker_parameters.write_block_size; in flash_numaker_write()
178 int blocks = (len / flash_numaker_parameters.write_block_size); in flash_numaker_write()
192 if ((addr % flash_numaker_parameters.write_block_size) != 0) { in flash_numaker_write()
Dflash_shell.c662 ssize_t write_block_size; in cmd_load() local
671 write_block_size = flash_get_write_block_size(flash_dev); in cmd_load()
674 if (size % write_block_size != 0) { in cmd_load()
675 shell_error(sh, "Size must be %zu bytes aligned", write_block_size); in cmd_load()
682 if (flash_load_buf_size < write_block_size) { in cmd_load()
684 write_block_size); in cmd_load()
689 if (flash_load_buf_size % write_block_size != 0) { in cmd_load()
690 flash_load_buf_size -= flash_load_buf_size % write_block_size; in cmd_load()
692 shell_warn(sh, "Load buffer was not aligned to %zu.", write_block_size); in cmd_load()
Dsoc_flash_mcux.c164 #if DT_NODE_HAS_PROP(SOC_NV_FLASH_NODE, write_block_size)
165 .write_block_size = DT_PROP(SOC_NV_FLASH_NODE, write_block_size),
167 .write_block_size = FSL_FEATURE_FLASH_PFLASH_BLOCK_WRITE_UNIT_SIZE,
Dflash_util.c33 if (sizeof(filler) < fparams->write_block_size) { 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()
Dflash_gd32.h17 #define SOC_NV_FLASH_PRG_SIZE DT_PROP(SOC_NV_FLASH_NODE, write_block_size)
Dflash_esp32.c10 #define FLASH_WRITE_BLK_SZ DT_PROP(SOC_NV_FLASH_NODE, write_block_size)
47 .write_block_size = FLASH_WRITE_BLK_SZ,
Dsoc_flash_nrf_mram.c23 #define WRITE_BLOCK_SIZE DT_INST_PROP_OR(0, write_block_size, MRAM_WORD_SIZE)
152 .write_block_size = WRITE_BLOCK_SIZE, in nrf_mram_get_parameters()
Dsoc_flash_b91.c33 .write_block_size = DT_PROP(DT_INST(0, soc_nv_flash), write_block_size),
Dflash_sam.c160 if (sam_flash_aligned(offset, config->parameters.write_block_size) && in sam_flash_section_is_aligned_with_write_block_size()
161 sam_flash_aligned(len, config->parameters.write_block_size)) { in sam_flash_section_is_aligned_with_write_block_size()
166 (size_t)offset, (size_t)(offset + len), config->parameters.write_block_size); in sam_flash_section_is_aligned_with_write_block_size()
517 .write_block_size = DT_PROP(SAM_FLASH_DEVICE, write_block_size), \
Dflash_max32.c156 #define GET_WRITE_BLOCK_SIZE(n) DT_PROP(n, write_block_size)
167 .write_block_size = \
Dflash_stm32wba_fm.c31 .write_block_size = FLASH_STM32_WRITE_BLOCK_SIZE,
205 flash_stm32_parameters.write_block_size); in stm32_flash_init()
Dflash_ambiq.c26 #define FLASH_WRITE_BLOCK_SIZE MAX(DT_PROP(SOC_NV_FLASH_NODE, write_block_size), MIN_WRITE_SIZE)
49 .write_block_size = FLASH_WRITE_BLOCK_SIZE,
Dflash_gecko.c29 .write_block_size = DT_PROP(SOC_NV_FLASH_NODE, write_block_size),
Dflash_ifx_cat1.c35 .write_block_size = DT_PROP(SOC_NV_FLASH_NODE, write_block_size),
Dflash_si32.c27 #define SOC_NV_FLASH_WRITE_BLOCK_SIZE DT_PROP(SOC_NV_FLASH_NODE, write_block_size)
40 .write_block_size = SOC_NV_FLASH_WRITE_BLOCK_SIZE,
/Zephyr-latest/subsys/dfu/img_util/
Dflash_img.c37 #if DT_NODE_HAS_PROP(UPLOAD_FLASH_AREA_CONTROLLER, write_block_size)
39 DT_PROP(UPLOAD_FLASH_AREA_CONTROLLER, write_block_size)
81 offset = (toff + fparams->write_block_size - 1) & in scramble_mcuboot_trailer()
82 ~(fparams->write_block_size - 1); in scramble_mcuboot_trailer()
/Zephyr-latest/subsys/storage/stream/
Dstream_flash.c149 fill_length = ctx->write_block_size; in flash_sync()
294 ctx->write_block_size = params->write_block_size; in stream_flash_init()
296 if (buf_len % ctx->write_block_size) { in stream_flash_init()
310 offset % ctx->write_block_size) { in stream_flash_init()
/Zephyr-latest/subsys/fs/nvs/
Dnvs.c91 size_t write_block_size = fs->flash_parameters->write_block_size; in nvs_al_size() local
93 if (write_block_size <= 1U) { in nvs_al_size()
96 return (len + (write_block_size - 1U)) & ~(write_block_size - 1U); in nvs_al_size()
120 blen = len & ~(fs->flash_parameters->write_block_size - 1U); in nvs_flash_al_wrt()
134 fs->flash_parameters->write_block_size - len); in nvs_flash_al_wrt()
137 fs->flash_parameters->write_block_size); in nvs_flash_al_wrt()
191 aligned_len = len & ~(fs->flash_parameters->write_block_size - 1U); in nvs_flash_data_wrt()
245 NVS_BLOCK_SIZE & ~(fs->flash_parameters->write_block_size - 1U); in nvs_flash_block_cmp()
276 NVS_BLOCK_SIZE & ~(fs->flash_parameters->write_block_size - 1U); in nvs_flash_cmp_const()
307 NVS_BLOCK_SIZE & ~(fs->flash_parameters->write_block_size - 1U); in nvs_flash_block_move()
[all …]
/Zephyr-latest/tests/subsys/settings/fcb_init/src/
Dsettings_test_fcb_init.c37 #if DT_NODE_HAS_PROP(DT_GPARENT(CODE_PARTITION_NODE), write_block_size)
39 DT_PROP(DT_GPARENT(CODE_PARTITION_NODE), write_block_size)
/Zephyr-latest/include/zephyr/storage/
Dstream_flash.h70 size_t write_block_size; /* Offset/size device write alignment */ member
/Zephyr-latest/subsys/fs/zms/
Dzms.c118 return len & ~(fs->flash_parameters->write_block_size - 1U); in zms_round_down_write_block_size()
124 return (len + (fs->flash_parameters->write_block_size - 1U)) & in zms_round_up_write_block_size()
125 ~(fs->flash_parameters->write_block_size - 1U); in zms_round_up_write_block_size()
131 size_t write_block_size = fs->flash_parameters->write_block_size; in zms_al_size() local
133 if (write_block_size <= 1U) { in zms_al_size()
182 fs->flash_parameters->write_block_size - len); in zms_flash_al_wrt()
185 fs->flash_parameters->write_block_size); in zms_flash_al_wrt()
1327 size_t write_block_size; in zms_mount() local
1338 write_block_size = fs->flash_parameters->write_block_size; in zms_mount()
1341 if (write_block_size > ZMS_BLOCK_SIZE || write_block_size == 0) { in zms_mount()

123