Home
last modified time | relevance | path

Searched refs:nbytes (Results 1 – 25 of 58) sorted by relevance

123

/u-boot/drivers/spi/
A Dspi-mem-nodm.c23 if (op->data.nbytes) { in spi_mem_exec_op()
30 op_len = op->cmd.nbytes + op->addr.nbytes + op->dummy.nbytes; in spi_mem_exec_op()
39 if (op->addr.nbytes) { in spi_mem_exec_op()
44 pos += op->addr.nbytes; in spi_mem_exec_op()
47 if (op->dummy.nbytes) in spi_mem_exec_op()
92 len = op->cmd.nbytes + op->addr.nbytes + op->dummy.nbytes; in spi_mem_adjust_op_size()
98 op->data.nbytes = min(op->data.nbytes, in spi_mem_adjust_op_size()
101 op->data.nbytes = min(op->data.nbytes, in spi_mem_adjust_op_size()
105 if (!op->data.nbytes) in spi_mem_adjust_op_size()
151 if (op->addr.nbytes && in spi_mem_supports_op()
[all …]
A Dspi-mem.c52 if (!op->data.nbytes) in spi_controller_dma_map_mem_op_data()
98 if (!op->data.nbytes) in spi_controller_dma_unmap_mem_op_data()
178 if (op->addr.nbytes && op->addr.buswidth == 8 && op->addr.nbytes % 2) in spi_mem_dtr_supports_op()
181 if (op->dummy.nbytes && op->dummy.buswidth == 8 && op->dummy.nbytes % 2) in spi_mem_dtr_supports_op()
311 tmpbufsize = op->cmd.nbytes + op->addr.nbytes + op->dummy.nbytes; in spi_mem_exec_op()
348 memset(tmpbuf + op->addr.nbytes + 1, 0xff, op->dummy.nbytes); in spi_mem_exec_op()
390 op_len = op->cmd.nbytes + op->addr.nbytes + op->dummy.nbytes; in spi_mem_exec_op()
479 len = op->cmd.nbytes + op->addr.nbytes + op->dummy.nbytes; in spi_mem_adjust_op_size()
485 op->data.nbytes = min(op->data.nbytes, in spi_mem_adjust_op_size()
488 op->data.nbytes = min(op->data.nbytes, in spi_mem_adjust_op_size()
[all …]
A Dmtk_spim.c365 if (op->addr.nbytes && op->dummy.nbytes && in mtk_spim_supports_op()
369 if (op->addr.nbytes + op->dummy.nbytes > 16) in mtk_spim_supports_op()
457 if (op->addr.nbytes || op->dummy.nbytes) in mtk_spim_exec_op()
458 reg_val |= (op->addr.nbytes + op->dummy.nbytes) << in mtk_spim_exec_op()
471 if (op->addr.nbytes || op->dummy.nbytes) { in mtk_spim_exec_op()
497 tx_size = 1 + op->addr.nbytes + op->dummy.nbytes; in mtk_spim_exec_op()
518 if (op->dummy.nbytes) in mtk_spim_exec_op()
523 memcpy(tx_tmp_buf + op->dummy.nbytes + op->addr.nbytes + 1, in mtk_spim_exec_op()
604 if (!op->data.nbytes) in mtk_spim_adjust_op_size()
608 opcode_len = 1 + op->addr.nbytes + op->dummy.nbytes; in mtk_spim_adjust_op_size()
[all …]
A Dmtk_snor.c152 if (op->addr.nbytes == 4) { in mtk_snor_set_addr()
168 if (!op->data.nbytes) in mtk_snor_adjust_op_size()
171 if (op->addr.nbytes == 3 || op->addr.nbytes == 4) { in mtk_snor_adjust_op_size()
175 op->data.nbytes = 0x400000; in mtk_snor_adjust_op_size()
178 op->data.nbytes = 1; in mtk_snor_adjust_op_size()
188 op->data.nbytes = 1; in mtk_snor_adjust_op_size()
212 if (op->addr.nbytes == 4) in mtk_snor_setup_bus()
271 rdlen = op->data.nbytes; in mtk_snor_read_bounce()
395 tx_len = 1 + op->addr.nbytes + op->dummy.nbytes; in mtk_snor_cmd_program()
398 tx_len += op->data.nbytes; in mtk_snor_cmd_program()
[all …]
A Dnpcm_fiu_spi.c244 1, op->addr.nbytes, op->dummy.nbytes, op->data.nbytes); in npcm_fiu_uma_operation()
254 if (op->addr.nbytes) { in npcm_fiu_uma_operation()
260 if (op->dummy.nbytes) in npcm_fiu_uma_operation()
276 if (nbytes) in npcm_fiu_uma_operation()
278 if (nbytes > DW_SIZE) in npcm_fiu_uma_operation()
280 if (nbytes > DW_SIZE * 2) in npcm_fiu_uma_operation()
282 if (nbytes > DW_SIZE * 3) in npcm_fiu_uma_operation()
297 if (nbytes) in npcm_fiu_uma_operation()
299 if (nbytes > DW_SIZE) in npcm_fiu_uma_operation()
301 if (nbytes > DW_SIZE * 2) in npcm_fiu_uma_operation()
[all …]
A Dmtk_snfi_spi.c59 u32 nbytes; in mtk_snfi_adjust_op_size() local
67 nbytes = op->cmd.nbytes + op->addr.nbytes + op->dummy.nbytes; in mtk_snfi_adjust_op_size()
69 if (nbytes + op->data.nbytes <= SNFI_GPRAM_SIZE) in mtk_snfi_adjust_op_size()
72 if (nbytes >= SNFI_GPRAM_SIZE) in mtk_snfi_adjust_op_size()
75 op->data.nbytes = SNFI_GPRAM_SIZE - nbytes; in mtk_snfi_adjust_op_size()
215 addr_sh = (op->addr.nbytes - 1) * 8; in mtk_snfi_exec_op()
222 for (i = 0; i < op->dummy.nbytes; i++) in mtk_snfi_exec_op()
226 if (op->data.nbytes && op->data.dir == SPI_MEM_DATA_OUT) { in mtk_snfi_exec_op()
228 len += op->data.nbytes; in mtk_snfi_exec_op()
235 if (op->data.nbytes && op->data.dir == SPI_MEM_DATA_IN) in mtk_snfi_exec_op()
[all …]
A Dfsl_qspi.c368 if (op->addr.nbytes) in fsl_qspi_supports_op()
371 if (op->dummy.nbytes) in fsl_qspi_supports_op()
374 if (op->data.nbytes) in fsl_qspi_supports_op()
384 if (op->addr.nbytes + in fsl_qspi_supports_op()
390 if (op->dummy.nbytes && in fsl_qspi_supports_op()
419 if (op->addr.nbytes) { in fsl_qspi_prepare_lut()
441 if (op->dummy.nbytes) { in fsl_qspi_prepare_lut()
449 if (op->data.nbytes) { in fsl_qspi_prepare_lut()
538 if (op->addr.nbytes) in fsl_qspi_read_ahb()
647 if (op->addr.nbytes) in fsl_qspi_exec_op()
[all …]
A Dnxp_fspi.c402 if (op->addr.nbytes) in nxp_fspi_supports_op()
405 if (op->dummy.nbytes) in nxp_fspi_supports_op()
408 if (op->data.nbytes) in nxp_fspi_supports_op()
417 if (op->addr.nbytes > 4) in nxp_fspi_supports_op()
496 if (op->addr.nbytes) { in nxp_fspi_prepare_lut()
504 if (op->dummy.nbytes) { in nxp_fspi_prepare_lut()
517 if (op->data.nbytes) { in nxp_fspi_prepare_lut()
629 u32 len = op->data.nbytes; in nxp_fspi_read_ahb()
662 if (i < op->data.nbytes) { in nxp_fspi_fill_txfifo()
684 int len = op->data.nbytes; in nxp_fspi_read_rxfifo()
[all …]
A Drockchip_sfc.c325 if (unlikely(op->dummy.nbytes && !op->addr.nbytes)) { in rockchip_sfc_adjust_op_work()
330 op->addr.nbytes = op->dummy.nbytes; in rockchip_sfc_adjust_op_work()
334 op->dummy.nbytes = 0; in rockchip_sfc_adjust_op_work()
373 if (op->addr.nbytes) { in rockchip_sfc_xfer_setup()
374 if (op->addr.nbytes == 4) { in rockchip_sfc_xfer_setup()
376 } else if (op->addr.nbytes == 3) { in rockchip_sfc_xfer_setup()
387 if (op->dummy.nbytes) { in rockchip_sfc_xfer_setup()
407 if (!len && op->addr.nbytes) in rockchip_sfc_xfer_setup()
415 op->addr.nbytes, op->addr.buswidth, in rockchip_sfc_xfer_setup()
422 if (op->addr.nbytes) in rockchip_sfc_xfer_setup()
[all …]
A Dmicrochip_coreqspi.c199 cmd_bytes = op->cmd.nbytes + op->addr.nbytes; in mchp_coreqspi_config_op()
200 total_bytes = cmd_bytes + op->data.nbytes; in mchp_coreqspi_config_op()
326 qspi->tx_len = op->cmd.nbytes; in mchp_coreqspi_exec_op()
332 if (op->addr.nbytes) { in mchp_coreqspi_exec_op()
333 for (i = 0; i < op->addr.nbytes; i++) in mchp_coreqspi_exec_op()
337 qspi->tx_len = op->addr.nbytes; in mchp_coreqspi_exec_op()
342 if (op->data.nbytes) { in mchp_coreqspi_exec_op()
347 qspi->tx_len = op->data.nbytes; in mchp_coreqspi_exec_op()
352 qspi->rx_len = op->data.nbytes; in mchp_coreqspi_exec_op()
394 if (op->data.nbytes > MAX_DATA_CMD_LEN) in mchp_coreqspi_adjust_op_size()
[all …]
A Dspi-sifive.c284 if (!op->addr.nbytes && !op->dummy.nbytes && !op->data.nbytes) in sifive_spi_exec_op()
296 op_len = op->addr.nbytes + op->dummy.nbytes; in sifive_spi_exec_op()
300 if (op->addr.nbytes) { in sifive_spi_exec_op()
302 for (i = 0; i < op->addr.nbytes; i++) in sifive_spi_exec_op()
304 (8 * (op->addr.nbytes - i - 1)); in sifive_spi_exec_op()
306 pos += op->addr.nbytes; in sifive_spi_exec_op()
309 if (op->dummy.nbytes) in sifive_spi_exec_op()
310 memset(op_buf + pos, 0xff, op->dummy.nbytes); in sifive_spi_exec_op()
313 if (!op->data.nbytes) in sifive_spi_exec_op()
326 if (op->data.nbytes) { in sifive_spi_exec_op()
[all …]
A Dspi-mxic.c293 unsigned int nbytes = len - pos; in mxic_spi_data_xfer() local
298 if (nbytes > 4) in mxic_spi_data_xfer()
299 nbytes = 4; in mxic_spi_data_xfer()
325 data >>= (8 * (4 - nbytes)); in mxic_spi_data_xfer()
333 pos += nbytes; in mxic_spi_data_xfer()
346 if (op->addr.nbytes > 7) in mxic_spi_mem_supports_op()
378 if (op->addr.nbytes) in mxic_spi_mem_exec_op()
387 if (op->dummy.nbytes) { in mxic_spi_mem_exec_op()
388 dummy_bytes = op->dummy.nbytes / in mxic_spi_mem_exec_op()
394 if (op->data.nbytes) { in mxic_spi_mem_exec_op()
[all …]
A Datmel-quadspi.c534 if (op->data.nbytes) in atmel_qspi_set_cfg()
579 if (op->data.nbytes) { in atmel_qspi_transfer()
589 op->data.nbytes); in atmel_qspi_transfer()
666 if (op->data.nbytes) { in atmel_qspi_sama7g5_set_cfg()
668 if (op->addr.nbytes) in atmel_qspi_sama7g5_set_cfg()
688 if (op->addr.nbytes && !op->data.nbytes) in atmel_qspi_sama7g5_set_cfg()
695 if (op->data.nbytes) in atmel_qspi_sama7g5_set_cfg()
712 if (!op->data.nbytes) { in atmel_qspi_sama7g5_transfer()
729 if (op->addr.nbytes) { in atmel_qspi_sama7g5_transfer()
738 op->data.nbytes); in atmel_qspi_sama7g5_transfer()
[all …]
A Dstm32_qspi.c180 u32 len = op->data.nbytes, sr; in _stm32_qspi_poll()
212 op->data.nbytes); in stm32_qspi_mm()
221 if (!op->data.nbytes) in _stm32_qspi_tx()
249 op->addr.val, op->data.nbytes); in stm32_qspi_exec_op()
251 addr_max = op->addr.val + op->data.nbytes + 1; in stm32_qspi_exec_op()
260 if (op->data.nbytes) in stm32_qspi_exec_op()
261 writel(op->data.nbytes - 1, &priv->regs->dlr); in stm32_qspi_exec_op()
268 if (op->addr.nbytes) { in stm32_qspi_exec_op()
274 if (op->dummy.buswidth && op->dummy.nbytes) in stm32_qspi_exec_op()
275 ccr |= (op->dummy.nbytes * 8 / op->dummy.buswidth in stm32_qspi_exec_op()
[all …]
A Dxilinx_spi.c308 if (op->addr.nbytes) { in xilinx_spi_mem_exec_op()
312 for (i = 0; i < op->addr.nbytes; i++) in xilinx_spi_mem_exec_op()
314 (8 * (op->addr.nbytes - i - 1)); in xilinx_spi_mem_exec_op()
317 op->addr.nbytes); in xilinx_spi_mem_exec_op()
321 if (op->dummy.nbytes) { in xilinx_spi_mem_exec_op()
322 dummy_len = (op->dummy.nbytes * op->data.buswidth) / in xilinx_spi_mem_exec_op()
329 if (op->data.nbytes) { in xilinx_spi_mem_exec_op()
332 op->data.buf.in, op->data.nbytes); in xilinx_spi_mem_exec_op()
335 NULL, op->data.nbytes); in xilinx_spi_mem_exec_op()
372 if (op->addr.nbytes && in xilinx_qspi_mem_exec_op()
[all …]
A Dca_sflash.c367 unsigned int data_cnt = op->data.nbytes; in _ca_sflash_access_data()
369 u8 addr_cnt = op->addr.nbytes; in _ca_sflash_access_data()
422 u8 dummy_cnt = op->dummy.nbytes; in _ca_sflash_issue_cmd()
423 u8 addr_cnt = op->addr.nbytes; in _ca_sflash_issue_cmd()
425 unsigned int data_cnt = op->data.nbytes; in _ca_sflash_issue_cmd()
495 op->addr.nbytes, op->data.nbytes, op->data.dir); in ca_sflash_exec_op()
497 if (op->data.nbytes == 0 && op->addr.nbytes == 0) { in ca_sflash_exec_op()
499 } else if (op->data.nbytes == 0 && op->addr.nbytes > 0) { in ca_sflash_exec_op()
501 } else if (op->data.nbytes > 0) { in ca_sflash_exec_op()
/u-boot/cmd/
A Dfpgad.c36 ulong nbytes; in do_fpga_md() local
68 nbytes = length * sizeof(u16); in do_fpga_md()
70 ulong linebytes = (nbytes > DISP_LINE_LEN) ? in do_fpga_md()
71 DISP_LINE_LEN : nbytes; in do_fpga_md()
83 nbytes -= linebytes; in do_fpga_md()
89 } while (nbytes > 0); in do_fpga_md()
A Dpci.c353 ulong i, nbytes, linebytes; in pci_cfg_display() local
367 nbytes = length * byte_size; in pci_cfg_display()
370 linebytes = (nbytes > DISP_LINE_LEN) ? DISP_LINE_LEN : nbytes; in pci_cfg_display()
379 nbytes -= linebytes; in pci_cfg_display()
386 if (rc == 0 && nbytes > 0) in pci_cfg_display()
396 int nbytes; in pci_cfg_modify() local
411 if (nbytes == 0 || (nbytes == 1 && console_buffer[0] == '-')) { in pci_cfg_modify()
417 nbytes = 1; in pci_cfg_modify()
422 else if (nbytes == -2) { in pci_cfg_modify()
430 if (nbytes) { in pci_cfg_modify()
[all …]
A Daxi.c176 ulong nbytes; in do_axi_md() local
230 nbytes = length * unitsize; in do_axi_md()
232 ulong linebytes = (nbytes > DISP_LINE_LEN) ? in do_axi_md()
233 DISP_LINE_LEN : nbytes; in do_axi_md()
253 nbytes -= max(linebytes, 1UL); in do_axi_md()
258 } while (nbytes > 0); in do_axi_md()
/u-boot/include/
A Dspi-mem.h20 .nbytes = 1, \
25 .nbytes = __nbytes, \
34 .nbytes = __nbytes, \
43 .nbytes = __nbytes, \
51 .nbytes = __nbytes, \
98 u8 nbytes; member
105 u8 nbytes; member
112 u8 nbytes; member
121 unsigned int nbytes; member
A Dmalloc.h387 #define MALLOC_ZERO(charp, nbytes) \ argument
389 INTERNAL_SIZE_T mzsz = (nbytes); \
404 #define MALLOC_COPY(dest,src,nbytes) \ argument
406 INTERNAL_SIZE_T mcsz = (nbytes); \
426 #define MALLOC_ZERO(charp, nbytes) \
429 long mctmp = (nbytes)/sizeof(INTERNAL_SIZE_T), mcn; \
443 #define MALLOC_COPY(dest,src,nbytes) \
447 long mctmp = (nbytes)/sizeof(INTERNAL_SIZE_T), mcn; \
/u-boot/arch/x86/lib/
A Dstring.c75 #define BYTE_COPY_FWD(dst_bp, src_bp, nbytes) \ argument
85 "0" (dst_bp), "1" (src_bp), "2" (nbytes) : \
89 #define WORD_COPY_FWD(dst_bp, src_bp, nbytes_left, nbytes) \ argument
99 "0" (dst_bp), "1" (src_bp), "2" ((nbytes) / 4) : \
101 (nbytes_left) = (nbytes) % 4; \
/u-boot/common/
A Dcli.c135 int nbytes; in run_commandf() local
143 nbytes = vsnprintf(console_buffer, CONFIG_SYS_CBSIZE, fmt, args); in run_commandf()
146 if (nbytes < 0) { in run_commandf()
149 } else if (nbytes >= CONFIG_SYS_CBSIZE) { in run_commandf()
151 nbytes, CONFIG_SYS_CBSIZE); in run_commandf()
/u-boot/lib/
A Dnet_utils.c170 uint compute_ip_checksum(const void *vptr, uint nbytes) in compute_ip_checksum() argument
176 while (nbytes > 1) { in compute_ip_checksum()
178 nbytes -= 2; in compute_ip_checksum()
180 if (nbytes == 1) { in compute_ip_checksum()
213 int ip_checksum_ok(const void *addr, uint nbytes) in ip_checksum_ok() argument
215 return !(compute_ip_checksum(addr, nbytes) & 0xfffe); in ip_checksum_ok()
/u-boot/drivers/mtd/nand/spi/
A Dcore.c282 while (nbytes) { in spinand_read_from_cache_op()
284 op.data.nbytes = nbytes; in spinand_read_from_cache_op()
294 nbytes -= op.data.nbytes; in spinand_read_from_cache_op()
371 while (nbytes) { in spinand_write_to_cache_op()
373 op.data.nbytes = nbytes; in spinand_write_to_cache_op()
384 nbytes -= op.data.nbytes; in spinand_write_to_cache_op()
392 if (nbytes) { in spinand_write_to_cache_op()
887 while (nbytes) { in spinand_select_op_variant()
888 op.data.nbytes = nbytes; in spinand_select_op_variant()
896 nbytes -= op.data.nbytes; in spinand_select_op_variant()
[all …]

Completed in 67 milliseconds

123