Home
last modified time | relevance | path

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

12345678910>>...36

/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()
244 ADDCH(buf, c); in number()
255 return buf; in number()
275 return buf; in string()
298 return buf; in string16()
315 buf = string16(buf, end, str, field_width, precision, flags); in device_path_string()
317 return buf; in device_path_string()
531 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.c102 memset(buf, 0xff, sizeof(buf)); in unicode_test_string16()
108 memset(buf, 0xff, sizeof(buf)); in unicode_test_string16()
114 memset(buf, 0xff, sizeof(buf)); in unicode_test_string16()
121 memset(buf, 0xff, sizeof(buf)); in unicode_test_string16()
125 memset(buf, 0xff, sizeof(buf)); in unicode_test_string16()
129 memset(buf, 0xff, sizeof(buf)); in unicode_test_string16()
324 memset(buf, 0, sizeof(buf)); in unicode_test_utf8_utf16_strncpy()
331 memset(buf, 0, sizeof(buf)); in unicode_test_utf8_utf16_strncpy()
338 memset(buf, 0, sizeof(buf)); in unicode_test_utf8_utf16_strncpy()
345 memset(buf, 0, sizeof(buf)); in unicode_test_utf8_utf16_strncpy()
[all …]
A Dcompression.c325 buf->compressed_buf, buf->compressed_size, in run_test_internal()
329 errcheck(buf->compressed_size < buf->orig_size); in run_test_internal()
336 buf->uncompressed_buf, buf->uncompressed_size, in run_test_internal()
339 errcheck(buf->uncompressed_size == buf->orig_size); in run_test_internal()
346 buf->uncompressed_buf, buf->orig_size, in run_test_internal()
348 errcheck(buf->uncompressed_size == buf->orig_size); in run_test_internal()
355 ret = compress(uts, buf->orig_buf, buf->orig_size, in run_test_internal()
356 buf->compare_buf, buf->compressed_size - 1, in run_test_internal()
365 buf->compare_buf, buf->uncompressed_size - 1, in run_test_internal()
392 buf->compressed_buf = malloc(buf->compressed_size); in run_test()
[all …]
/u-boot/drivers/rtc/
A Drs5c372.c72 if (buf[0] & STATUS_XPT) in rs5c372_readram()
91 buf[0] = 0; in rs5c372_enable()
95 buf[ret - 1] = buf[ret]; in rs5c372_enable()
98 buf[9] = 0; /* reg. 8 */ in rs5c372_enable()
99 buf[10] = 0; /* reg. 9 */ in rs5c372_enable()
100 buf[11] = 0; /* reg. 10 */ in rs5c372_enable()
101 buf[12] = 0; /* reg. 11 */ in rs5c372_enable()
167 memset(buf, 0, sizeof(buf)); in rtc_get()
204 memset(buf, 0, sizeof(buf)); in rtc_set()
211 reg15 = buf[0]; in rtc_set()
[all …]
A Dx1205.c90 u8 buf[8]; in rtc_get() local
97 buf[0], buf[1], buf[2], buf[3], in rtc_get()
98 buf[4], buf[5], buf[6], buf[7]); in rtc_get()
100 tm->tm_sec = bcd2bin(buf[CCR_SEC]); in rtc_get()
101 tm->tm_min = bcd2bin(buf[CCR_MIN]); in rtc_get()
106 + (bcd2bin(buf[CCR_Y2K]) * 100); in rtc_get()
107 tm->tm_wday = buf[CCR_WDAY]; in rtc_get()
121 u8 buf[8]; in rtc_set() local
127 buf[CCR_SEC] = bin2bcd(tm->tm_sec); in rtc_set()
128 buf[CCR_MIN] = bin2bcd(tm->tm_min); in rtc_set()
[all …]
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 Dm41t94.c38 u8 buf[8]; /* write cmd + 7 registers */ in rtc_set() local
51 buf[M41T94_REG_SECONDS] = bin2bcd(tm->tm_sec); in rtc_set()
52 buf[M41T94_REG_MINUTES] = bin2bcd(tm->tm_min); in rtc_set()
53 buf[M41T94_REG_HOURS] = bin2bcd(tm->tm_hour); in rtc_set()
58 buf[M41T94_REG_HOURS] |= M41T94_BIT_CEB; in rtc_set()
60 buf[M41T94_REG_HOURS] |= M41T94_BIT_CB; in rtc_set()
70 u8 buf[2]; in rtc_get() local
87 buf[0] = 0x80 | M41T94_REG_HT; in rtc_get()
88 buf[1] = ret & ~M41T94_BIT_HALT; in rtc_get()
97 buf[0] = 0x80 | M41T94_REG_SECONDS; in rtc_get()
[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()
63 unmap_sysmem(buf); 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()
294 char *buf; in setexpr_test_str() 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/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/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/lib/efi_loader/
A Defi_var_file.c59 if (!buf) in efi_var_collect()
61 var = buf->var; in efi_var_collect()
80 free(buf); in efi_var_collect()
92 free(buf); in efi_var_collect()
104 buf->crc32 = crc32(0, (u8 *)buf->var, in efi_var_collect()
107 *bufp = buf; in efi_var_collect()
144 free(buf); in efi_var_to_file()
156 if (buf->reserved || buf->magic != EFI_VAR_FILE_MAGIC || in efi_var_restore()
157 buf->crc32 != crc32(0, (u8 *)buf->var, in efi_var_restore()
202 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()
154 env_set("dfu_alt_info", buf); in set_dfu_alt_info()
212 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()
/u-boot/board/emulation/common/
A Dqemu_dfu.c14 static void board_get_alt_info(struct mtd_info *mtd, char *buf) in board_get_alt_info() argument
22 len = strlen(buf); in board_get_alt_info()
24 if (buf[0] != '\0') in board_get_alt_info()
25 len += snprintf(buf + len, DFU_ALT_BUF_LEN - len, "&"); in board_get_alt_info()
26 len += snprintf(buf + len, DFU_ALT_BUF_LEN - len, in board_get_alt_info()
32 len += snprintf(buf + len, DFU_ALT_BUF_LEN - len, ";"); in board_get_alt_info()
35 len += snprintf(buf + len, DFU_ALT_BUF_LEN - len, in board_get_alt_info()
45 ALLOC_CACHE_ALIGN_BUFFER(char, buf, DFU_ALT_BUF_LEN); in set_dfu_alt_info()
50 memset(buf, 0, sizeof(buf)); in set_dfu_alt_info()
63 board_get_alt_info(mtd, buf); in set_dfu_alt_info()
[all …]

Completed in 148 milliseconds

12345678910>>...36