/u-boot/drivers/spi/ |
A D | spi-mem-nodm.c | 23 if (op->data.nbytes) { in spi_mem_exec_op() 30 op_len = sizeof(op->cmd.opcode) + op->addr.nbytes + op->dummy.nbytes; in spi_mem_exec_op() 39 if (op->addr.nbytes) { in spi_mem_exec_op() 40 for (i = 0; i < op->addr.nbytes; i++) in spi_mem_exec_op() 42 (8 * (op->addr.nbytes - i - 1)); 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 = sizeof(op->cmd.opcode) + op->addr.nbytes + op->dummy.nbytes; in spi_mem_adjust_op_size() 97 op->data.nbytes = min(op->data.nbytes, in spi_mem_adjust_op_size() 100 op->data.nbytes = min(op->data.nbytes, in spi_mem_adjust_op_size() [all …]
|
A D | spi-mem.c | 50 if (!op->data.nbytes) in spi_controller_dma_map_mem_op_data() 96 if (!op->data.nbytes) in spi_controller_dma_unmap_mem_op_data() 154 if (op->addr.nbytes && in spi_mem_default_supports_op() 158 if (op->dummy.nbytes && in spi_mem_default_supports_op() 295 if (op->addr.nbytes) { in spi_mem_exec_op() 311 memset(tmpbuf + op->addr.nbytes + 1, 0xff, op->dummy.nbytes); in spi_mem_exec_op() 353 op_len = sizeof(op->cmd.opcode) + op->addr.nbytes + op->dummy.nbytes; in spi_mem_exec_op() 376 if (op->dummy.nbytes) in spi_mem_exec_op() 443 op->dummy.nbytes; in spi_mem_adjust_op_size() 449 op->data.nbytes = min(op->data.nbytes, in spi_mem_adjust_op_size() [all …]
|
A D | mtk_snor.c | 152 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 D | fsl_qspi.c | 368 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 D | mtk_snfi_spi.c | 59 u32 nbytes; in mtk_snfi_adjust_op_size() local 67 nbytes = sizeof(op->cmd.opcode) + op->addr.nbytes + in mtk_snfi_adjust_op_size() 68 op->dummy.nbytes; in mtk_snfi_adjust_op_size() 70 if (nbytes + op->data.nbytes <= SNFI_GPRAM_SIZE) in mtk_snfi_adjust_op_size() 73 if (nbytes >= SNFI_GPRAM_SIZE) in mtk_snfi_adjust_op_size() 76 op->data.nbytes = SNFI_GPRAM_SIZE - nbytes; in mtk_snfi_adjust_op_size() 216 addr_sh = (op->addr.nbytes - 1) * 8; in mtk_snfi_exec_op() 223 for (i = 0; i < op->dummy.nbytes; i++) in mtk_snfi_exec_op() 229 len += op->data.nbytes; in mtk_snfi_exec_op() 236 if (op->data.nbytes && op->data.dir == SPI_MEM_DATA_IN) in mtk_snfi_exec_op() [all …]
|
A D | nxp_fspi.c | 389 if (op->addr.nbytes) in nxp_fspi_supports_op() 392 if (op->dummy.nbytes) in nxp_fspi_supports_op() 395 if (op->data.nbytes) in nxp_fspi_supports_op() 404 if (op->addr.nbytes > 4) in nxp_fspi_supports_op() 483 if (op->addr.nbytes) { in nxp_fspi_prepare_lut() 491 if (op->dummy.nbytes) { in nxp_fspi_prepare_lut() 504 if (op->data.nbytes) { in nxp_fspi_prepare_lut() 616 u32 len = op->data.nbytes; in nxp_fspi_read_ahb() 649 if (i < op->data.nbytes) { in nxp_fspi_fill_txfifo() 671 int len = op->data.nbytes; in nxp_fspi_read_rxfifo() [all …]
|
A D | spi-sifive.c | 284 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 D | stm32_qspi.c | 153 if (!op->data.nbytes) in _stm32_qspi_wait_cmd() 187 u32 len = op->data.nbytes, sr; in _stm32_qspi_poll() 219 op->data.nbytes); in stm32_qspi_mm() 228 if (!op->data.nbytes) in _stm32_qspi_tx() 256 op->addr.val, op->data.nbytes); in stm32_qspi_exec_op() 262 addr_max = op->addr.val + op->data.nbytes + 1; in stm32_qspi_exec_op() 271 if (op->data.nbytes) in stm32_qspi_exec_op() 272 writel(op->data.nbytes - 1, &priv->regs->dlr); in stm32_qspi_exec_op() 279 if (op->addr.nbytes) { in stm32_qspi_exec_op() 285 if (op->dummy.buswidth && op->dummy.nbytes) in stm32_qspi_exec_op() [all …]
|
A D | atmel-quadspi.c | 255 if (op->addr.nbytes && op->addr.buswidth != mode->addr_buswidth) in atmel_qspi_is_compatible() 283 op->dummy.nbytes == 0) in atmel_qspi_supports_op() 305 if (op->dummy.buswidth && op->dummy.nbytes) in atmel_qspi_set_cfg() 306 dummy_cycles = op->dummy.nbytes * 8 / op->dummy.buswidth; in atmel_qspi_set_cfg() 321 switch (op->addr.nbytes) { in atmel_qspi_set_cfg() 361 if (op->data.nbytes) in atmel_qspi_set_cfg() 377 if (!op->addr.nbytes && op->data.dir == SPI_MEM_DATA_IN) in atmel_qspi_set_cfg() 412 if (op->addr.val + op->data.nbytes > aq->mmap_size) in atmel_qspi_exec_op() 420 if (op->data.nbytes) { in atmel_qspi_exec_op() 427 op->data.nbytes); in atmel_qspi_exec_op() [all …]
|
A D | ca_sflash.c | 367 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()
|
A D | designware_spi.c | 575 u8 op_len = sizeof(op->cmd.opcode) + op->addr.nbytes + op->dummy.nbytes; in dw_spi_exec_op() 586 op->data.nbytes); in dw_spi_exec_op() 597 if (op->addr.nbytes) { in dw_spi_exec_op() 598 for (i = 0; i < op->addr.nbytes; i++) in dw_spi_exec_op() 600 (8 * (op->addr.nbytes - i - 1)); in dw_spi_exec_op() 602 pos += op->addr.nbytes; in dw_spi_exec_op() 604 if (op->dummy.nbytes) in dw_spi_exec_op() 605 memset(op_buf + pos, 0xff, op->dummy.nbytes); in dw_spi_exec_op() 622 priv->rx_end = priv->rx + op->data.nbytes; in dw_spi_exec_op() 631 priv->tx_end = priv->tx + op->data.nbytes; in dw_spi_exec_op() [all …]
|
A D | octeon_spi.c | 451 if (!op->data.nbytes && !op->addr.nbytes && !op->dummy.nbytes) in octeon_spi_exec_op() 459 if (op->addr.nbytes) { in octeon_spi_exec_op() 461 buf = (u8 *)calloc(1, op->addr.nbytes + op->dummy.nbytes); in octeon_spi_exec_op() 467 for (temp = 0; temp < op->addr.nbytes; temp++) in octeon_spi_exec_op() 468 buf[i++] = *(u8 *)(addr + op->addr.nbytes - 1 - temp); in octeon_spi_exec_op() 469 for (temp = 0; temp < op->dummy.nbytes; temp++) in octeon_spi_exec_op() 476 if (!op->data.nbytes) in octeon_spi_exec_op() 484 if (!op->data.nbytes) in octeon_spi_exec_op() 497 ret = octeontx2_spi_xfer(slave->dev, (op->data.nbytes * 8), tx, rx, in octeon_spi_exec_op()
|
A D | spi-sunxi.c | 347 u8 nbytes; in sun4i_spi_xfer() local 367 nbytes = min(len, (priv->variant->fifo_depth - 1)); in sun4i_spi_xfer() 370 writel(SUN4I_BURST_CNT(nbytes), SPI_REG(priv, SPI_BC)); in sun4i_spi_xfer() 371 writel(SUN4I_XMIT_CNT(nbytes), SPI_REG(priv, SPI_TC)); in sun4i_spi_xfer() 374 writel(SUN4I_BURST_CNT(nbytes), in sun4i_spi_xfer() 378 sun4i_spi_fill_fifo(priv, nbytes); in sun4i_spi_xfer() 389 SUN4I_FIFO_STA_RF_CNT_BITS) >= nbytes), in sun4i_spi_xfer() 398 sun4i_spi_drain_fifo(priv, nbytes); in sun4i_spi_xfer() 400 len -= nbytes; in sun4i_spi_xfer()
|
A D | mxc_spi.c | 323 int nbytes = DIV_ROUND_UP(bitlen, 8); in spi_xchg_single() local 360 nbytes -= cnt; in spi_xchg_single() 365 while (nbytes > 0) { in spi_xchg_single() 381 nbytes -= 4; in spi_xchg_single() 402 nbytes = DIV_ROUND_UP(bitlen, 8); in spi_xchg_single() 404 cnt = nbytes % 32; in spi_xchg_single() 415 nbytes -= cnt; in spi_xchg_single() 418 while (nbytes > 0) { in spi_xchg_single() 423 cnt = min_t(u32, nbytes, sizeof(data)); in spi_xchg_single() 428 nbytes -= cnt; in spi_xchg_single()
|
A D | ti_qspi.c | 338 if (!op->data.nbytes || op->data.dir != SPI_MEM_DATA_IN || in ti_qspi_exec_mem_op() 339 !op->addr.nbytes || op->addr.nbytes > 4) in ti_qspi_exec_mem_op() 344 if (from + op->data.nbytes > priv->mmap_size) in ti_qspi_exec_mem_op() 348 op->data.buswidth, op->addr.nbytes, in ti_qspi_exec_mem_op() 349 op->dummy.nbytes); in ti_qspi_exec_mem_op() 352 (void *)priv->memory_map + from, op->data.nbytes); in ti_qspi_exec_mem_op()
|
A D | cadence_qspi_apb.c | 443 unsigned int rxlen = op->data.nbytes; in cadence_qspi_apb_command_read() 484 unsigned int txlen = op->data.nbytes; in cadence_qspi_apb_command_write() 491 if (op->addr.nbytes == 3) in cadence_qspi_apb_command_write() 494 txlen = op->addr.nbytes; in cadence_qspi_apb_command_write() 535 unsigned int dummy_bytes = op->dummy.nbytes; in cadence_qspi_apb_read_setup() 570 reg |= (op->addr.nbytes - 1); in cadence_qspi_apb_read_setup() 665 size_t len = op->data.nbytes; in cadence_qspi_apb_read_execute() 698 reg |= (op->addr.nbytes - 1); in cadence_qspi_apb_write_setup() 782 size_t len = op->data.nbytes; in cadence_qspi_apb_write_execute()
|
A D | ich.c | 270 if (op->data.nbytes) { in ich_spi_exec_op_swseq() 273 trans->bytesin = op->data.nbytes; in ich_spi_exec_op_swseq() 276 trans->bytesout = op->data.nbytes; in ich_spi_exec_op_swseq() 308 if (op->addr.nbytes) in ich_spi_exec_op_swseq() 313 if (op->addr.nbytes) in ich_spi_exec_op_swseq() 319 if (op->addr.nbytes && !op->data.buswidth) in ich_spi_exec_op_swseq() 326 if (op->addr.nbytes) { in ich_spi_exec_op_swseq() 534 len = op->data.nbytes; in ich_spi_exec_op_hwseq() 723 unsigned int byte_count = op->data.nbytes; in ich_spi_adjust_size() 739 op->data.nbytes = min(ICH_BOUNDARY - page_offset, in ich_spi_adjust_size() [all …]
|
/u-boot/cmd/ |
A D | fpgad.c | 35 ulong nbytes; in do_fpga_md() local 67 nbytes = length * sizeof(u16); in do_fpga_md() 69 ulong linebytes = (nbytes > DISP_LINE_LEN) ? in do_fpga_md() 70 DISP_LINE_LEN : nbytes; in do_fpga_md() 82 nbytes -= linebytes; in do_fpga_md() 88 } while (nbytes > 0); in do_fpga_md()
|
A D | pci.c | 494 ulong i, nbytes, linebytes; in pci_cfg_display() local 505 nbytes = length * byte_size; in pci_cfg_display() 508 linebytes = (nbytes > DISP_LINE_LEN) ? DISP_LINE_LEN : nbytes; in pci_cfg_display() 521 nbytes -= linebytes; in pci_cfg_display() 526 } while (nbytes > 0); in pci_cfg_display() 558 int nbytes; in pci_cfg_modify() local 574 if (nbytes == 0 || (nbytes == 1 && console_buffer[0] == '-')) { in pci_cfg_modify() 580 nbytes = 1; in pci_cfg_modify() 585 else if (nbytes == -2) { in pci_cfg_modify() 593 if (nbytes) { in pci_cfg_modify() [all …]
|
A D | axi.c | 175 ulong nbytes; in do_axi_md() local 229 nbytes = length * unitsize; in do_axi_md() 231 ulong linebytes = (nbytes > DISP_LINE_LEN) ? in do_axi_md() 232 DISP_LINE_LEN : nbytes; in do_axi_md() 252 nbytes -= max(linebytes, 1UL); in do_axi_md() 257 } while (nbytes > 0); in do_axi_md()
|
/u-boot/lib/ |
A D | net_utils.c | 61 uint compute_ip_checksum(const void *vptr, uint nbytes) in compute_ip_checksum() argument 67 while (nbytes > 1) { in compute_ip_checksum() 69 nbytes -= 2; in compute_ip_checksum() 71 if (nbytes == 1) { in compute_ip_checksum() 104 int ip_checksum_ok(const void *addr, uint nbytes) in ip_checksum_ok() argument 106 return !(compute_ip_checksum(addr, nbytes) & 0xfffe); in ip_checksum_ok()
|
/u-boot/arch/x86/lib/ |
A D | string.c | 75 #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/include/ |
A D | spi-mem.h | 24 .nbytes = __nbytes, \ 33 .nbytes = __nbytes, \ 42 .nbytes = __nbytes, \ 50 .nbytes = __nbytes, \ 96 u8 nbytes; member 102 u8 nbytes; member 109 unsigned int nbytes; member
|
A D | malloc.h | 386 #define MALLOC_ZERO(charp, nbytes) \ argument 388 INTERNAL_SIZE_T mzsz = (nbytes); \ 403 #define MALLOC_COPY(dest,src,nbytes) \ argument 405 INTERNAL_SIZE_T mcsz = (nbytes); \ 425 #define MALLOC_ZERO(charp, nbytes) \ 428 long mctmp = (nbytes)/sizeof(INTERNAL_SIZE_T), mcn; \ 442 #define MALLOC_COPY(dest,src,nbytes) \ 446 long mctmp = (nbytes)/sizeof(INTERNAL_SIZE_T), mcn; \
|
/u-boot/drivers/mtd/nand/spi/ |
A D | core.c | 282 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 …]
|