Home
last modified time | relevance | path

Searched refs:buf (Results 1 – 25 of 1014) sorted by relevance

12345678910>>...41

/u-boot/test/lib/
A Dabuf.c20 struct abuf buf; in lib_test_abuf_set() local
25 abuf_init(&buf); in lib_test_abuf_set()
53 struct abuf buf; in lib_test_abuf_map_sysmem() local
56 abuf_init(&buf); in lib_test_abuf_map_sysmem()
71 struct abuf buf; in lib_test_abuf_realloc() local
83 abuf_init(&buf); in lib_test_abuf_realloc()
96 ptr = buf.data; in lib_test_abuf_realloc()
132 struct abuf buf; in lib_test_abuf_realloc_size() local
137 abuf_init(&buf); in lib_test_abuf_realloc_size()
192 ptr = buf.data; in lib_test_abuf_large()
[all …]
A Dstring.c41 buf[i] = i ^ mask; in init_buffer()
61 ut_asserteq(i, buf[i]); in test_memset()
79 u8 buf[BUFLEN]; in lib_memset() local
85 init_buffer(buf, 0); in lib_memset()
174 u8 buf[BUFLEN]; in lib_memmove() local
181 init_buffer(buf, 0); in lib_memmove()
182 ptr = memmove(buf + offset2, buf + offset1, in lib_memmove()
202 char buf[BUFLEN]; in lib_memdup() local
211 p = memdup(buf, 0); in lib_memdup()
215 strcpy(buf, TEST_STR); in lib_memdup()
[all …]
/u-boot/lib/
A Dcircbuf.c18 buf->size = 0; in buf_init()
23 buf->top = buf->data; in buf_init()
24 buf->tail = buf->data; in buf_init()
25 buf->end = &(buf->data[size]); in buf_init()
49 p = buf->top; in buf_pop()
64 buf->top = p; in buf_pop()
79 p = buf->tail; in buf_push()
87 if (buf->size < buf->totalsize) { in buf_push()
90 buf->top++; in buf_push()
91 if (buf->top == buf->end) { in buf_push()
[all …]
A Dvsprintf.c85 return buf; in put_dec_trunc()
127 return buf; in put_dec_full()
137 buf = put_dec_full(buf, rem); in put_dec()
256 return buf; in number()
276 return buf; in string()
290 *buf = 0; in string16()
300 *buf = 0; in string16()
308 return buf; in string16()
327 return buf; in device_path_string()
545 str = buf; in vsnprintf_internal()
[all …]
/u-boot/test/
A Dbootm.c28 char buf[BUF_SIZE]; in bootm_test_nop() local
30 *buf = '\0'; in bootm_test_nop()
34 strcpy(buf, "test"); in bootm_test_nop()
45 char buf[BUF_SIZE]; in bootm_test_nospace() local
48 *buf = '\0'; in bootm_test_nospace()
72 char buf[BUF_SIZE]; in bootm_test_silent() local
89 *buf = '\0'; in bootm_test_silent()
94 *buf = '\0'; in bootm_test_silent()
99 *buf = '\0'; in bootm_test_silent()
103 *buf = '\0'; in bootm_test_silent()
[all …]
A Dunicode_ut.c114 memset(buf, 0xff, sizeof(buf)); in unicode_test_string16()
120 memset(buf, 0xff, sizeof(buf)); in unicode_test_string16()
126 memset(buf, 0xff, sizeof(buf)); in unicode_test_string16()
133 memset(buf, 0xff, sizeof(buf)); in unicode_test_string16()
137 memset(buf, 0xff, sizeof(buf)); in unicode_test_string16()
141 memset(buf, 0xff, sizeof(buf)); in unicode_test_string16()
366 memset(buf, 0, sizeof(buf)); in unicode_test_utf8_utf16_strncpy()
373 memset(buf, 0, sizeof(buf)); in unicode_test_utf8_utf16_strncpy()
380 memset(buf, 0, sizeof(buf)); in unicode_test_utf8_utf16_strncpy()
387 memset(buf, 0, sizeof(buf)); in unicode_test_utf8_utf16_strncpy()
[all …]
A Dprint_ut.c72 u8 *pos = buf; in print_efi_ut()
170 u8 *buf; in print_display_buffer() local
231 buf[1] = 31; in print_display_buffer()
232 buf[2] = 32; in print_display_buffer()
233 buf[3] = 33; in print_display_buffer()
236 buf[8] = 255; in print_display_buffer()
250 u8 *buf; in print_hexdump_line() local
275 u8 *buf; in print_do_hex_dump() local
333 buf[1] = 31; in print_do_hex_dump()
334 buf[2] = 32; in print_do_hex_dump()
[all …]
A Dcompression.c383 buf->compressed_buf, buf->compressed_size, in run_test_internal()
387 ut_assert(buf->compressed_size < buf->orig_size); in run_test_internal()
398 ut_asserteq_mem(buf->orig_buf, buf->uncompressed_buf, buf->orig_size); in run_test_internal()
403 buf->uncompressed_buf, buf->orig_size, in run_test_internal()
406 ut_asserteq_mem(buf->orig_buf, buf->uncompressed_buf, buf->orig_size); in run_test_internal()
415 ut_asserteq_mem(buf->orig_buf, buf->uncompressed_buf, buf->orig_size); in run_test_internal()
419 ret = compress(uts, buf->orig_buf, buf->orig_size, in run_test_internal()
420 buf->compare_buf, buf->compressed_size - 1, in run_test_internal()
429 buf->compare_buf, buf->uncompressed_size - 1, in run_test_internal()
453 buf->compressed_buf = malloc(buf->compressed_size); in run_test()
[all …]
/u-boot/test/cmd/
A Dmem_search.c23 u8 *buf; in mem_test_ms_b() local
27 buf[0x0] = 0x12; in mem_test_ms_b()
28 buf[0x31] = 0x12; in mem_test_ms_b()
52 u16 *buf; in mem_test_ms_w() local
77 u32 *buf; in mem_test_ms_l() local
113 u8 *buf; in mem_test_ms_cont() local
163 u8 *buf; in mem_test_ms_cont_end() local
206 char *buf; in mem_test_ms_mult() local
236 char *buf; in mem_test_ms_s() local
277 u8 *buf; in mem_test_ms_limit() local
[all …]
A Dsetexpr.c24 u8 *buf; in setexpr_test_int() local
30 buf[0x0] = 0x12; in setexpr_test_int()
72 char *buf; in setexpr_test_plus() local
78 buf[0x0] = 0x12; in setexpr_test_plus()
79 buf[0x10] = 0x34; in setexpr_test_plus()
114 char *buf; in setexpr_test_oper() local
157 char *buf, *val; in setexpr_test_regex() local
271 buf); in setexpr_test_backref()
292 char *buf; in setexpr_test_str() local
328 char *buf; in setexpr_test_str_oper() local
[all …]
/u-boot/drivers/usb/gadget/
A Du_os_desc.h39 return buf + offset; in __usb_ext_prop_ptr()
42 static inline u8 *usb_ext_prop_size_ptr(u8 *buf) in usb_ext_prop_size_ptr() argument
44 return __usb_ext_prop_ptr(buf, USB_EXT_PROP_DW_SIZE); in usb_ext_prop_size_ptr()
47 static inline u8 *usb_ext_prop_type_ptr(u8 *buf) in usb_ext_prop_type_ptr() argument
52 static inline u8 *usb_ext_prop_name_len_ptr(u8 *buf) in usb_ext_prop_name_len_ptr() argument
57 static inline u8 *usb_ext_prop_name_ptr(u8 *buf) in usb_ext_prop_name_ptr() argument
64 return __usb_ext_prop_ptr(buf, in usb_ext_prop_data_len_ptr()
75 put_unaligned_le32(dw_size, usb_ext_prop_size_ptr(buf)); in usb_ext_prop_put_size()
80 put_unaligned_le32(type, usb_ext_prop_type_ptr(buf)); in usb_ext_prop_put_type()
87 put_unaligned_le16(pnl, usb_ext_prop_name_len_ptr(buf)); in usb_ext_prop_put_name()
[all …]
/u-boot/test/dm/
A Di2c.c52 ut_asserteq_mem(buf, "\0\0\0\0\0", sizeof(buf)); in dm_test_i2c_read_write()
55 ut_asserteq_mem(buf, "\0\0AB\0", sizeof(buf)); in dm_test_i2c_read_write()
124 ut_asserteq_mem(buf, "\0\0\0\0\0", sizeof(buf)); in dm_test_i2c_bytewise()
138 ut_asserteq_mem(buf, "\0\0\0\0\0", sizeof(buf)); in dm_test_i2c_bytewise()
160 ut_asserteq_mem(buf, "\0\0AB\0\0", sizeof(buf)); in dm_test_i2c_bytewise()
187 ut_asserteq_mem("AB\0\0\0\0", buf, sizeof(buf)); in dm_test_i2c_offset()
196 ut_asserteq_mem("ABAB\0", buf, sizeof(buf)); in dm_test_i2c_offset()
209 ut_asserteq_mem("ABCAB", buf, sizeof(buf)); in dm_test_i2c_offset()
217 ut_asserteq_mem("AB\0\0\0", buf, sizeof(buf)); in dm_test_i2c_offset()
225 ut_asserteq_mem("AB\0\0\0", buf, sizeof(buf)); in dm_test_i2c_offset()
[all …]
/u-boot/drivers/power/
A Dpower_i2c.c22 unsigned char buf[4] = { 0 }; in pmic_reg_write() local
46 buf[0] = cpu_to_le32(val) & 0xff; in pmic_reg_write()
50 buf[2] = cpu_to_le32(val) & 0xff; in pmic_reg_write()
56 buf[0] = cpu_to_le32(val) & 0xff; in pmic_reg_write()
63 buf[0] = cpu_to_le32(val) & 0xff; in pmic_reg_write()
79 unsigned char buf[4] = { 0 }; in pmic_reg_read() local
108 | buf[1] << 8 | buf[0]); in pmic_reg_read()
111 buf[1] << 8 | buf[2]); in pmic_reg_read()
115 ret_val = le32_to_cpu(buf[1] << 8 | buf[0]); in pmic_reg_read()
117 ret_val = le32_to_cpu(buf[0] << 8 | buf[1]); in pmic_reg_read()
[all …]
/u-boot/board/keymile/common/
A Divm.c30 byte = buf[i]; in ivm_calc_crc()
63 if (buf[off + 0] != buf[off + 2] && in ivm_get_value()
64 buf[off + 2] != buf[off + 4]) { in ivm_get_value()
68 val = buf[off + 0] + (buf[off + 1] << 8); in ivm_get_value()
102 unsigned char *buf) in ivm_findinventorystring() argument
124 if (buf[addr] == '\r') in ivm_findinventorystring()
194 unsigned long val = (buf[4] << 16) + (buf[5] << 8) + buf[6]; in process_mac()
199 memcpy(mac, buf + 1, 6); in process_mac()
229 (buf[11] << 16) + in ivm_analyze_block2()
230 (buf[12] << 8) + in ivm_analyze_block2()
[all …]
/u-boot/drivers/power/pmic/
A Dpmic_tps65910.c23 *buf = (uchar)rc; in tps65910_read_reg()
60 uchar buf; in tps65910_set_i2c_control() local
81 uchar buf; in tps65910_voltage_update() local
91 ret = tps65910_read_reg(reg_offset, &buf); in tps65910_voltage_update()
95 buf &= ~TPS65910_OP_REG_CMD_MASK; in tps65910_voltage_update()
97 ret = tps65910_write_reg(reg_offset, &buf); in tps65910_voltage_update()
102 ret = tps65910_read_reg(reg_offset, &buf); in tps65910_voltage_update()
106 buf &= ~TPS65910_OP_REG_SEL_MASK; in tps65910_voltage_update()
107 buf |= vddx_op_vol_sel; in tps65910_voltage_update()
109 ret = tps65910_write_reg(reg_offset, &buf); in tps65910_voltage_update()
[all …]
/u-boot/drivers/rtc/
A Dm41t62.c70 buf[0], buf[1], buf[2], buf[3], in m41t62_update_rtc_time()
71 buf[4], buf[5], buf[6], buf[7]); in m41t62_update_rtc_time()
99 buf[M41T62_REG_SEC] = in m41t62_set_rtc_buf()
101 buf[M41T62_REG_MIN] = in m41t62_set_rtc_buf()
103 buf[M41T62_REG_HOUR] = in m41t62_set_rtc_buf()
105 buf[M41T62_REG_WDAY] = in m41t62_set_rtc_buf()
107 buf[M41T62_REG_DAY] = in m41t62_set_rtc_buf()
109 buf[M41T62_REG_MON] = in m41t62_set_rtc_buf()
121 ret = dm_i2c_read(dev, 0, buf, sizeof(buf)); in m41t62_rtc_get()
135 ret = dm_i2c_read(dev, 0, buf, sizeof(buf)); in m41t62_rtc_set()
[all …]
A Dsandbox_rtc.c18 u8 buf[7]; in sandbox_rtc_get() local
21 ret = dm_i2c_read(dev, REG_SEC, buf, sizeof(buf)); in sandbox_rtc_get()
25 time->tm_sec = buf[REG_SEC - REG_SEC]; in sandbox_rtc_get()
26 time->tm_min = buf[REG_MIN - REG_SEC]; in sandbox_rtc_get()
27 time->tm_hour = buf[REG_HOUR - REG_SEC]; in sandbox_rtc_get()
28 time->tm_mday = buf[REG_MDAY - REG_SEC]; in sandbox_rtc_get()
29 time->tm_mon = buf[REG_MON - REG_SEC]; in sandbox_rtc_get()
38 u8 buf[7]; in sandbox_rtc_set() local
41 buf[REG_SEC - REG_SEC] = time->tm_sec; in sandbox_rtc_set()
42 buf[REG_MIN - REG_SEC] = time->tm_min; in sandbox_rtc_set()
[all …]
A Dds3232.c64 u8 buf; in ds3232_rtc_read8() local
74 ret = dm_i2c_read(dev, reg, &buf, sizeof(buf)); in ds3232_rtc_read8()
78 return buf; in ds3232_rtc_read8()
83 u8 buf = (u8)val; in ds3232_rtc_write8() local
93 return dm_i2c_write(dev, reg, &buf, sizeof(buf)); in ds3232_rtc_write8()
143 u8 buf[RTC_DATE_TIME_REG_SIZE]; in ds3232_rtc_set() local
159 return dm_i2c_write(dev, 0, buf, sizeof(buf)); in ds3232_rtc_set()
165 u8 buf[RTC_DATE_TIME_REG_SIZE]; in ds3232_rtc_get() local
174 ret = dm_i2c_read(dev, 0, buf, sizeof(buf)); in ds3232_rtc_get()
180 is_pm = buf[RTC_HR_REG_ADDR] & 0x20; in ds3232_rtc_get()
[all …]
A Dpcf2127.c41 msg.buf = buffer; in pcf2127_rtc_read()
54 uchar buf[7] = {0}; in pcf2127_rtc_set() local
58 buf[i++] = bin2bcd(tm->tm_sec); in pcf2127_rtc_set()
59 buf[i++] = bin2bcd(tm->tm_min); in pcf2127_rtc_set()
60 buf[i++] = bin2bcd(tm->tm_hour); in pcf2127_rtc_set()
61 buf[i++] = bin2bcd(tm->tm_mday); in pcf2127_rtc_set()
62 buf[i++] = tm->tm_wday & 0x07; in pcf2127_rtc_set()
65 buf[i++] = bin2bcd(tm->tm_mon); in pcf2127_rtc_set()
68 buf[i++] = bin2bcd(tm->tm_year % 100); in pcf2127_rtc_set()
81 ret = pcf2127_rtc_read(dev, PCF2127_REG_CTRL1, buf, sizeof(buf)); in pcf2127_rtc_get()
[all …]
/u-boot/lib/efi_loader/
A Defi_var_file.c66 if (!buf) in efi_var_collect()
68 var = buf->var; in efi_var_collect()
87 free(buf); in efi_var_collect()
99 free(buf); in efi_var_collect()
111 buf->crc32 = crc32(0, (u8 *)buf->var, in efi_var_collect()
114 *bufp = buf; in efi_var_collect()
151 free(buf); in efi_var_to_file()
164 if (buf->reserved || buf->magic != EFI_VAR_FILE_MAGIC || in efi_var_restore()
165 buf->crc32 != crc32(0, (u8 *)buf->var, in efi_var_restore()
221 if (!buf) { in efi_var_from_file()
[all …]
/u-boot/examples/standalone/
A Datmel_df_pow2.c20 buf[0] = cmd; in flash_cmd()
26 uchar buf[2]; in flash_status() local
27 if (flash_cmd(slave, CMD_STAT, buf, sizeof(buf))) in flash_status()
29 return buf[1]; in flash_status()
35 uchar buf[4]; in flash_set_pow2() local
37 buf[1] = 0x2a; in flash_set_pow2()
38 buf[2] = 0x80; in flash_set_pow2()
39 buf[3] = 0xa6; in flash_set_pow2()
41 ret = flash_cmd(slave, CMD_CFG, buf, sizeof(buf)); in flash_set_pow2()
58 uchar buf[4]; in flash_check() local
[all …]
/u-boot/board/st/common/
A Dstm32mp_dfu.c42 len = strlen(buf); in board_get_alt_info_mmc()
44 if (buf[0] != '\0') in board_get_alt_info_mmc()
45 len += snprintf(buf + len, in board_get_alt_info_mmc()
80 len = strlen(buf); in board_get_alt_info_mtd()
82 if (buf[0] != '\0') in board_get_alt_info_mtd()
113 memset(buf, 0, sizeof(buf)); in set_dfu_alt_info()
115 snprintf(buf, DFU_ALT_BUF_LEN, in set_dfu_alt_info()
120 board_get_alt_info_mmc(dev, buf); in set_dfu_alt_info()
158 env_set("dfu_alt_info", buf); in set_dfu_alt_info()
216 void *buf, long *len) in dfu_read_medium_virt() argument
[all …]
/u-boot/lib/zlib/
A Dadler32.c15 #define DO1(buf,i) {adler += (buf)[i]; sum2 += adler;} argument
16 #define DO2(buf,i) DO1(buf,i); DO1(buf,i+1); argument
17 #define DO4(buf,i) DO2(buf,i); DO2(buf,i+2); argument
18 #define DO8(buf,i) DO4(buf,i); DO4(buf,i+4); argument
19 #define DO16(buf) DO8(buf,0); DO8(buf,8); argument
68 adler += buf[0]; in adler32()
78 if (buf == Z_NULL) in adler32()
84 adler += *buf++; in adler32()
99 buf += 16; in adler32()
109 DO16(buf); in adler32()
[all …]
/u-boot/drivers/bootcount/
A Dbootcount_ext.c24 bootcount_ext_t *buf; in bootcount_store() local
39 buf->magic = BC_MAGIC; in bootcount_store()
40 buf->version = BC_VERSION; in bootcount_store()
41 buf->bootcount = (a & 0xff); in bootcount_store()
42 buf->upgrade_available = upgrade_available; in bootcount_store()
43 unmap_sysmem(buf); in bootcount_store()
54 bootcount_ext_t *buf; in bootcount_load() local
72 if (buf->magic == BC_MAGIC && buf->version == BC_VERSION) { in bootcount_load()
73 upgrade_available = buf->upgrade_available; in bootcount_load()
75 ret = buf->bootcount; in bootcount_load()
[all …]
/u-boot/board/congatec/conga-qeval20-qa3-e3845/
A Dconga-qeval20-qa3.c34 u8 buf[8]; in board_late_init() local
48 dm_i2c_read(dev, 0x00, buf, 1); in board_late_init()
55 buf[0] = 0x93; in board_late_init()
56 dm_i2c_write(dev, 0x06, buf, 1); in board_late_init()
58 buf[0] = 0xaa; in board_late_init()
59 dm_i2c_write(dev, 0xf8, buf, 1); in board_late_init()
61 buf[0] = 0x0f; in board_late_init()
62 dm_i2c_write(dev, 0xfa, buf, 1); in board_late_init()
64 buf[0] = 0x01; in board_late_init()
65 dm_i2c_write(dev, 0xff, buf, 1); in board_late_init()

Completed in 57 milliseconds

12345678910>>...41