| /rk3399_rockchip-uboot/drivers/net/ |
| H A D | xilinx_ll_temac_fifo.c | 50 int i, length = 0; in ll_temac_recv_fifo() local 79 length = in_be32(&fifo_ctrl->rlf) & LL_FIFO_RLF_MASK; in ll_temac_recv_fifo() 86 if (length > PKTSIZE_ALIGN) { in ll_temac_recv_fifo() 88 __func__, length); in ll_temac_recv_fifo() 93 for (i = 0; i < length; i += 4) in ll_temac_recv_fifo() 96 net_process_received_packet(net_rx_packets[0], length); in ll_temac_recv_fifo() 102 int ll_temac_send_fifo(struct eth_device *dev, void *packet, int length) in ll_temac_send_fifo() argument 109 if (length < LL_FIFO_TLF_MIN) { in ll_temac_send_fifo() 111 __func__, length); in ll_temac_send_fifo() 115 if (length > LL_FIFO_TLF_MAX) { in ll_temac_send_fifo() [all …]
|
| H A D | sandbox-raw.c | 42 static int sb_eth_raw_send(struct udevice *dev, void *packet, int length) in sb_eth_raw_send() argument 46 debug("eth_sandbox_raw: Send packet %d\n", length); in sb_eth_raw_send() 63 length -= ETHER_HDR_SIZE; in sb_eth_raw_send() 65 return sandbox_eth_raw_os_send(packet, length, priv); in sb_eth_raw_send() 73 int length; in sb_eth_raw_recv() local 99 length = ARP_HDR_SIZE; in sb_eth_raw_recv() 105 retval = sandbox_eth_raw_os_recv(pktptr, &length, priv); in sb_eth_raw_recv() 108 if (!retval && length) { in sb_eth_raw_recv() 117 length += ETHER_HDR_SIZE; in sb_eth_raw_recv() 121 length); in sb_eth_raw_recv() [all …]
|
| H A D | e1000_spi.c | 323 unsigned int length = 0; in do_e1000_spi_show() local 337 length = simple_strtoul(argv[1], NULL, 0); in do_e1000_spi_show() 339 length = (hw->eeprom.word_size << 1) - offset; in do_e1000_spi_show() 342 if (!length) { in do_e1000_spi_show() 346 if ((0x10000 < length) || (0x10000 - length < offset)) { in do_e1000_spi_show() 352 buffer = malloc(length); in do_e1000_spi_show() 364 err = e1000_spi_eeprom_dump(hw, buffer, offset, length, true); in do_e1000_spi_show() 374 hw->name, offset, offset + length - 1); in do_e1000_spi_show() 375 for (i = 0; i < length; i++) { in do_e1000_spi_show() 392 unsigned int length; in do_e1000_spi_dump() local [all …]
|
| H A D | lan91c96.c | 309 int length; in smc_send_packet() local 318 length = ETH_ZLEN < packet_length ? packet_length : ETH_ZLEN; in smc_send_packet() 332 numPages = ((length & 0xfffe) + 6); in smc_send_packet() 388 dev->name, length); in smc_send_packet() 392 print_packet (buf, length); in smc_send_packet() 398 SMC_outl(dev, (length + 6) << 16, LAN91C96_DATA_HIGH); in smc_send_packet() 402 SMC_outw(dev, (length + 6), LAN91C96_DATA_HIGH); in smc_send_packet() 413 SMC_outsl(dev, LAN91C96_DATA_HIGH, buf, length >> 2); in smc_send_packet() 414 if (length & 0x2) in smc_send_packet() 415 SMC_outw(dev, *((word *) (buf + (length & 0xFFFFFFFC))), in smc_send_packet() [all …]
|
| /rk3399_rockchip-uboot/lib/ |
| H A D | lz4.c | 111 size_t length; in LZ4_decompress_generic() local 116 if ((length=(token>>ML_BITS)) == RUN_MASK) in LZ4_decompress_generic() 122 length += s; in LZ4_decompress_generic() 125 …if ((safeDecode) && unlikely((size_t)(op+length)<(size_t)(op))) goto _output_error; /* overflow … in LZ4_decompress_generic() 126 …if ((safeDecode) && unlikely((size_t)(ip+length)<(size_t)(ip))) goto _output_error; /* overflow … in LZ4_decompress_generic() 130 cpy = op+length; in LZ4_decompress_generic() 131 …if (((endOnInput) && ((cpy>(partialDecoding?oexit:oend-MFLIMIT)) || (ip+length>iend-(2+1+LASTLITER… in LZ4_decompress_generic() 137 …if ((endOnInput) && (ip+length > iend)) goto _output_error; /* Error : read attempt beyond end o… in LZ4_decompress_generic() 142 …if ((endOnInput) && ((ip+length != iend) || (cpy > oend))) goto _output_error; /* Error : input … in LZ4_decompress_generic() 144 memcpy(op, ip, length); in LZ4_decompress_generic() [all …]
|
| /rk3399_rockchip-uboot/drivers/mtd/nand/raw/ |
| H A D | fsmc_nand.c | 50 {.offset = 15, .length = 3}, 51 {.offset = 31, .length = 3}, 52 {.offset = 47, .length = 3}, 53 {.offset = 63, .length = 3}, 54 {.offset = 79, .length = 3}, 55 {.offset = 95, .length = 3}, 56 {.offset = 111, .length = 3}, 57 {.offset = 127, .length = 1} 86 {.offset = 15, .length = 3}, 87 {.offset = 31, .length = 3}, [all …]
|
| H A D | nand_util.c | 75 erase_length = lldiv(opts->length + mtd->erasesize - 1, in nand_erase_opts() 310 int nand_unlock(struct mtd_info *mtd, loff_t start, size_t length, in nand_unlock() argument 320 allexcept ? " (allexcept)" : "", start, length); in nand_unlock() 350 if (length == 0 || (length & (mtd->erasesize - 1)) != 0) { in nand_unlock() 361 length -= mtd->erasesize; in nand_unlock() 367 page += (int)(length >> chip->page_shift); in nand_unlock() 409 static int check_skip_len(struct mtd_info *mtd, loff_t offset, size_t length, in check_skip_len() argument 415 while (len_excl_bad < length) { in check_skip_len() 436 if (len_excl_bad > length) in check_skip_len() 437 *used -= (len_excl_bad - length); in check_skip_len() [all …]
|
| /rk3399_rockchip-uboot/arch/x86/lib/ |
| H A D | acpi_table.c | 38 rsdp->length = sizeof(struct acpi_rsdp); in acpi_write_rsdp() 76 header->length = sizeof(struct acpi_rsdt); in acpi_write_rsdt() 92 header->length = sizeof(struct acpi_xsdt); in acpi_write_xsdt() 135 rsdt->header.length = sizeof(struct acpi_table_header) + in acpi_add_table() 141 rsdt->header.length); in acpi_add_table() 152 xsdt->header.length = sizeof(struct acpi_table_header) + in acpi_add_table() 158 xsdt->header.length); in acpi_add_table() 167 facs->length = sizeof(struct acpi_facs); in acpi_create_facs() 181 lapic->length = sizeof(struct acpi_madt_lapic); in acpi_create_madt_lapic() 186 return lapic->length; in acpi_create_madt_lapic() [all …]
|
| /rk3399_rockchip-uboot/drivers/net/fm/ |
| H A D | fdt.c | 24 unsigned int length; in fdt_fixup_fman_firmware() local 48 length = fdt32_to_cpu(hdr->length); in fdt_fixup_fman_firmware() 57 if (length > CONFIG_SYS_QE_FMAN_FW_LENGTH) { in fdt_fixup_fman_firmware() 59 fmanfw, length); in fdt_fixup_fman_firmware() 63 length -= sizeof(u32); /* Subtract the size of the CRC */ in fdt_fixup_fman_firmware() 64 crc = fdt32_to_cpu(*(u32 *)((void *)fmanfw + length)); in fdt_fixup_fman_firmware() 65 if (crc != crc32_no_comp(0, (void *)fmanfw, length)) { in fdt_fixup_fman_firmware() 70 length += sizeof(u32); in fdt_fixup_fman_firmware() 73 rc = fdt_increase_size(blob, length); in fdt_fixup_fman_firmware() 106 rc = fdt_setprop(blob, fwnode, "fsl,firmware", fmanfw, length); in fdt_fixup_fman_firmware()
|
| /rk3399_rockchip-uboot/fs/jffs2/ |
| H A D | mini_inflate.c | 110 unsigned int length; in decompress_none() local 113 length = *(stream->data++); in decompress_none() 114 length += *(stream->data++) << 8; in decompress_none() 117 stream->decoded += length; in decompress_none() 118 stream->memcpy(dest, stream->data, length); in decompress_none() 119 stream->data += length; in decompress_none() 146 int symbol, length, dist, i; in decompress_huffman() local 156 if (symbol < 265) length = symbol - 254; in decompress_huffman() 157 else if (symbol == 285) length = 258; in decompress_huffman() 159 length = pull_bits(stream, (symbol - 261) >> 2); in decompress_huffman() [all …]
|
| /rk3399_rockchip-uboot/cmd/ddr_tool/ |
| H A D | ddr_tool_common.c | 20 void write_buf_to_ddr(u32 *buf, u32 buf_len, ulong start_adr, ulong length) in write_buf_to_ddr() argument 28 for (i = 0, j = 0; i < length / sizeof(p[0]); i++) { in write_buf_to_ddr() 35 ulong cmp_buf_data(u32 *buf, u32 buf_len, ulong start_adr, ulong length, in cmp_buf_data() argument 48 for (i = 0, j = 0; i < length / sizeof(p[0]); i++) { in cmp_buf_data() 81 void get_print_available_addr(ulong *start_adr, ulong *length, int print_en) in get_print_available_addr() argument 118 length[i] = 0; in get_print_available_addr() 123 length[i] = post_dram[i].size; in get_print_available_addr() 126 if (start_adr[i] == 0 && length[i] > 0x00700000) { in get_print_available_addr() 128 length[i] -= 0x00700000; in get_print_available_addr() 133 length[sp_bank] = (gd->start_addr_sp - RESERVED_SP_SIZE - in get_print_available_addr() [all …]
|
| H A D | ddr_tool_common.h | 13 void write_buf_to_ddr(u32 *buf, u32 buf_len, ulong start_adr, ulong length); 15 ulong length, u32 prt_en); 17 void get_print_available_addr(ulong *start_adr, ulong *length, int print_en); 18 int judge_test_addr(ulong *arg, ulong *start_adr, ulong *length);
|
| /rk3399_rockchip-uboot/board/corscience/tricorder/ |
| H A D | tricorder-eeprom.c | 23 uint16_t length; in handle_eeprom_v0() member 34 if (be16_to_cpu(eeprom->length) != sizeof(eepromv0)) { in handle_eeprom_v0() 36 be16_to_cpu(eeprom->length)); in handle_eeprom_v0() 63 if (be16_to_cpu(eeprom->length) != TRICORDER_EEPROM_SIZE) { in handle_eeprom_v1() 65 be16_to_cpu(eeprom->length)); in handle_eeprom_v1() 132 size_t length; in tricorder_eeprom_write() local 142 eeprom.length = cpu_to_be16(TRICORDER_EEPROM_SIZE); in tricorder_eeprom_write() 145 length = min(sizeof(eeprom.board_name), strlen(name)); in tricorder_eeprom_write() 146 strncpy(eeprom.board_name, name, length); in tricorder_eeprom_write() 148 length = min(sizeof(eeprom.board_version), strlen(version)); in tricorder_eeprom_write() [all …]
|
| /rk3399_rockchip-uboot/drivers/usb/emul/ |
| H A D | usb-emul-uclass.c | 15 static int copy_to_unicode(char *buff, int length, const char *str) in copy_to_unicode() argument 20 if (length < 2) in copy_to_unicode() 23 for (ptr = 2, i = 0; ptr + 1 < length && *str; i++, ptr += 2) { in copy_to_unicode() 33 char *buff, int length) in usb_emul_get_string() argument 48 return copy_to_unicode(buff, length, ptr->s); in usb_emul_get_string() 81 void *buffer, int length) in usb_emul_get_descriptor() argument 91 length); in usb_emul_get_descriptor() 100 for (upto = 0; *ptr && upto < length; ptr++, upto += todo) { in usb_emul_get_descriptor() 101 todo = min(length - upto, (int)(*ptr)->bLength); in usb_emul_get_descriptor() 106 return upto ? upto : length ? -EIO : 0; in usb_emul_get_descriptor() [all …]
|
| /rk3399_rockchip-uboot/tools/ |
| H A D | mksunxiboot.c | 25 uint32_t length; in gen_check_sum() local 31 length = le32_to_cpu(head_p->length); in gen_check_sum() 32 if ((length & 0x3) != 0) /* must 4-byte-aligned */ in gen_check_sum() 36 loop = length >> 2; in gen_check_sum() 146 img.header.length = in main() 149 img.header.length = cpu_to_le32(img.header.length); in main() 168 count = write(fd_out, &img, le32_to_cpu(img.header.length)); in main() 169 if (count != le32_to_cpu(img.header.length)) { in main()
|
| /rk3399_rockchip-uboot/include/ |
| H A D | smbios.h | 38 u8 length; member 63 u8 length; member 82 u8 length; member 100 u8 length; member 120 u8 length; member 148 u8 length; member 181 u8 length; member 190 u8 length; member 197 u8 length; member 212 int length, int handle) in fill_smbios_header() argument [all …]
|
| /rk3399_rockchip-uboot/drivers/fpga/ |
| H A D | xilinx.c | 30 unsigned int length; in fpga_loadbitstream() local 44 length = (*dataptr << 8) + *(dataptr + 1); in fpga_loadbitstream() 46 dataptr += length; in fpga_loadbitstream() 49 length = (*dataptr << 8) + *(dataptr + 1); in fpga_loadbitstream() 57 length = (*dataptr << 8) + *(dataptr + 1); in fpga_loadbitstream() 60 dataptr += length; in fpga_loadbitstream() 69 length = (*dataptr << 8) + *(dataptr + 1); in fpga_loadbitstream() 86 dataptr += length; in fpga_loadbitstream() 95 length = (*dataptr << 8) + *(dataptr+1); in fpga_loadbitstream() 98 dataptr += length; in fpga_loadbitstream() [all …]
|
| /rk3399_rockchip-uboot/drivers/i2c/ |
| H A D | lpc32xx_i2c.c | 112 int alen, u8 *data, int length) in __i2c_read() argument 140 if (length) { in __i2c_read() 143 wlen = length; in __i2c_read() 145 while (length | wlen) { in __i2c_read() 157 if ((length > 0) in __i2c_read() 159 length--; in __i2c_read() 179 int alen, u8 *data, int length) in __i2c_write() argument 188 if (alen | length) in __i2c_write() 200 if (!(alen | length)) in __i2c_write() 206 while (length) { in __i2c_write() [all …]
|
| /rk3399_rockchip-uboot/drivers/usb/host/ |
| H A D | xhci-ring.c | 560 union xhci_trb *event, int length) in record_transfer_result() argument 562 udev->act_len = min(length, length - in record_transfer_result() 567 BUG_ON(udev->act_len != length); in record_transfer_result() 598 int length, void *buffer) in xhci_bulk_tx() argument 623 udev, pipe, buffer, length); in xhci_bulk_tx() 649 if (running_total != 0 || length == 0) in xhci_bulk_tx() 653 while (running_total < length) { in xhci_bulk_tx() 679 total_packet_count = DIV_ROUND_UP(length, maxpacketsize); in xhci_bulk_tx() 690 if (trb_buff_len > length) in xhci_bulk_tx() 691 trb_buff_len = length; in xhci_bulk_tx() [all …]
|
| /rk3399_rockchip-uboot/scripts/dtc/libfdt/ |
| H A D | fdt_ro.c | 570 int length, count = 0; in fdt_stringlist_count() local 572 list = fdt_getprop(fdt, nodeoffset, property, &length); in fdt_stringlist_count() 574 return length; in fdt_stringlist_count() 576 end = list + length; in fdt_stringlist_count() 579 length = strnlen(list, end - list) + 1; in fdt_stringlist_count() 582 if (list + length > end) in fdt_stringlist_count() 585 list += length; in fdt_stringlist_count() 595 int length, len, idx = 0; in fdt_stringlist_search() local 598 list = fdt_getprop(fdt, nodeoffset, property, &length); in fdt_stringlist_search() 600 return length; in fdt_stringlist_search() [all …]
|
| /rk3399_rockchip-uboot/drivers/misc/ |
| H A D | atsha204a-i2c.c | 185 if (resp->length > 4) { in atsha204a_recv_resp() 186 if (resp->length > sizeof(*resp)) in atsha204a_recv_resp() 189 res = atsha204a_recv(dev, p + 4, resp->length - 4); in atsha204a_recv_resp() 194 resp_crc = (u16) p[resp->length - 2] in atsha204a_recv_resp() 195 | (((u16) p[resp->length - 1]) << 8); in atsha204a_recv_resp() 196 computed_crc = atsha204a_crc16(p, resp->length - 2); in atsha204a_recv_resp() 272 res = atsha204a_send(dev, (u8 *) req, req->length + 1); in atsha204a_transaction() 302 u16 *crc_ptr = (u16 *) &p[req->length - 1]; in atsha204a_req_crc32() 305 computed_crc = atsha204a_crc16(p + 1, req->length - 2); in atsha204a_req_crc32() 318 req.length = 7; in atsha204a_read() [all …]
|
| /rk3399_rockchip-uboot/cmd/ |
| H A D | load.c | 318 int i, c, reclen, checksum, length; in save_serial() local 342 length = 4 + reclen + 1; in save_serial() 346 checksum += (length >> (8*i)) & 0xff; in save_serial() 356 sprintf(record, SREC3_FORMAT, length, address, data, checksum); in save_serial() 696 int length = 3; in handle_send_packet() local 714 a_b[++length] = tochar(94); in handle_send_packet() 719 a_b[++length] = tochar(1); in handle_send_packet() 725 a_b[++length] = tochar(0); in handle_send_packet() 731 a_b[++length] = 0x40; /* He should ignore this */ in handle_send_packet() 737 a_b[++length] = tochar(END_CHAR); in handle_send_packet() [all …]
|
| /rk3399_rockchip-uboot/drivers/usb/musb/ |
| H A D | am35x.c | 118 void read_fifo(u8 ep, u32 length, void *fifo_data) in read_fifo() argument 127 if (length > 4) { in read_fifo() 128 for (i = 0; i < (length >> 2); i++) { in read_fifo() 133 length %= 4; in read_fifo() 135 if (length > 0) { in read_fifo() 137 memcpy(data, &val, length); in read_fifo()
|
| /rk3399_rockchip-uboot/common/ |
| H A D | kgdb.c | 319 int length; in handle_exception() local 411 length = kgdb_getregs(regs, remcomRegBuffer, BUFMAX); in handle_exception() 412 mem2hex(remcomRegBuffer, remcomOutBuffer, length); in handle_exception() 416 length = strlen(ptr); in handle_exception() 417 if ((length & 1) != 0) kgdb_error(KGDBERR_BADPARAMS); in handle_exception() 418 hex2mem(ptr, remcomRegBuffer, length/2); in handle_exception() 419 kgdb_putregs(regs, remcomRegBuffer, length/2); in handle_exception() 428 && hexToInt(&ptr, &length)) { in handle_exception() 429 mem2hex((char *)addr, remcomOutBuffer, length); in handle_exception() 440 && hexToInt(&ptr, &length) in handle_exception() [all …]
|
| /rk3399_rockchip-uboot/lib/libfdt/ |
| H A D | fdt_ro.c | 572 int length, count = 0; in fdt_stringlist_count() local 574 list = fdt_getprop(fdt, nodeoffset, property, &length); in fdt_stringlist_count() 576 return length; in fdt_stringlist_count() 578 end = list + length; in fdt_stringlist_count() 581 length = strnlen(list, end - list) + 1; in fdt_stringlist_count() 584 if (list + length > end) in fdt_stringlist_count() 587 list += length; in fdt_stringlist_count() 597 int length, len, idx = 0; in fdt_stringlist_search() local 600 list = fdt_getprop(fdt, nodeoffset, property, &length); in fdt_stringlist_search() 602 return length; in fdt_stringlist_search() [all …]
|