| /openbmc/u-boot/lib/ |
| H A D | circbuf.c | 13 int buf_init (circbuf_t * buf, unsigned int size) in buf_init() argument 15 assert (buf != NULL); in buf_init() 17 buf->size = 0; in buf_init() 18 buf->totalsize = size; in buf_init() 19 buf->data = (char *) malloc (sizeof (char) * size); in buf_init() 20 assert (buf->data != NULL); in buf_init() 22 buf->top = buf->data; in buf_init() 23 buf->tail = buf->data; in buf_init() 24 buf->end = &(buf->data[size]); in buf_init() 29 int buf_free (circbuf_t * buf) in buf_free() argument [all …]
|
| /openbmc/u-boot/test/ |
| H A D | unicode_ut.c | 80 char buf[20]; in unicode_test_string16() local 83 memset(buf, 0xff, sizeof(buf)); in unicode_test_string16() 84 sprintf(buf, "%8.6ls", c2); in unicode_test_string16() 85 ut_asserteq(' ', buf[1]); in unicode_test_string16() 86 ut_assert(!strncmp(&buf[2], d2, 7)); in unicode_test_string16() 87 ut_assert(!buf[9]); in unicode_test_string16() 89 memset(buf, 0xff, sizeof(buf)); in unicode_test_string16() 90 sprintf(buf, "%8.6ls", c4); in unicode_test_string16() 91 ut_asserteq(' ', buf[4]); in unicode_test_string16() 92 ut_assert(!strncmp(&buf[5], d4, 12)); in unicode_test_string16() [all …]
|
| H A D | compression.c | 313 struct buf_state *buf) in run_test_internal() argument 318 printf("\torig_size:%lu\n", buf->orig_size); in run_test_internal() 319 memset(buf->compressed_buf, 'A', TEST_BUFFER_SIZE); in run_test_internal() 320 errcheck(compress(uts, buf->orig_buf, buf->orig_size, in run_test_internal() 321 buf->compressed_buf, buf->compressed_size, in run_test_internal() 322 &buf->compressed_size) == 0); in run_test_internal() 323 printf("\tcompressed_size:%lu\n", buf->compressed_size); in run_test_internal() 324 errcheck(buf->compressed_size > 0); in run_test_internal() 325 errcheck(buf->compressed_size < buf->orig_size); in run_test_internal() 326 errcheck(((char *)buf->compressed_buf)[buf->compressed_size - 1] != in run_test_internal() [all …]
|
| /openbmc/qemu/hw/ide/ |
| H A D | atapi.c | 39 static void padstr8(uint8_t *buf, int buf_size, const char *src) in padstr8() argument 44 buf[i] = *src++; in padstr8() 46 buf[i] = ' '; in padstr8() 50 static void lba_to_msf(uint8_t *buf, int lba) in lba_to_msf() argument 53 buf[0] = (lba / 75) / 60; in lba_to_msf() 54 buf[1] = (lba / 75) % 60; in lba_to_msf() 55 buf[2] = lba % 75; in lba_to_msf() 74 static void cd_data_to_raw(uint8_t *buf, int lba) in cd_data_to_raw() argument 77 buf[0] = 0x00; in cd_data_to_raw() 78 memset(buf + 1, 0xff, 10); in cd_data_to_raw() [all …]
|
| /openbmc/qemu/contrib/vhost-user-gpu/ |
| H A D | vugbm.c | 14 mem_alloc_bo(struct vugbm_buffer *buf) in mem_alloc_bo() argument 16 buf->mmap = g_malloc(buf->width * buf->height * 4); in mem_alloc_bo() 17 buf->stride = buf->width * 4; in mem_alloc_bo() 22 mem_free_bo(struct vugbm_buffer *buf) in mem_free_bo() argument 24 g_free(buf->mmap); in mem_free_bo() 28 mem_map_bo(struct vugbm_buffer *buf) in mem_map_bo() argument 30 return buf->mmap != NULL; in mem_map_bo() 34 mem_unmap_bo(struct vugbm_buffer *buf) in mem_unmap_bo() argument 54 udmabuf_get_size(struct vugbm_buffer *buf) in udmabuf_get_size() argument 56 return ROUND_UP(buf->width * buf->height * 4, qemu_real_host_page_size()); in udmabuf_get_size() [all …]
|
| /openbmc/u-boot/drivers/rtc/ |
| H A D | rs5c372.c | 62 rs5c372_readram(unsigned char *buf, int len) in rs5c372_readram() argument 66 ret = i2c_read(CONFIG_SYS_I2C_RTC_ADDR, 0, 0, buf, len); in rs5c372_readram() 72 if (buf[0] & STATUS_XPT) in rs5c372_readram() 81 unsigned char buf[RS5C372_RAM_SIZE + 1]; in rs5c372_enable() local 85 ret = rs5c372_readram(&buf[1], RS5C372_RAM_SIZE); in rs5c372_enable() 91 buf[0] = 0; in rs5c372_enable() 95 buf[ret - 1] = buf[ret]; in rs5c372_enable() 97 buf[8] = RATE_32768HZ; /* reg. 7 */ in rs5c372_enable() 98 buf[9] = 0; /* reg. 8 */ in rs5c372_enable() 99 buf[10] = 0; /* reg. 9 */ in rs5c372_enable() [all …]
|
| H A D | m41t62.c | 56 static void m41t62_update_rtc_time(struct rtc_time *tm, u8 *buf) in m41t62_update_rtc_time() argument 61 buf[0], buf[1], buf[2], buf[3], in m41t62_update_rtc_time() 62 buf[4], buf[5], buf[6], buf[7]); in m41t62_update_rtc_time() 64 tm->tm_sec = bcd2bin(buf[M41T62_REG_SEC] & 0x7f); in m41t62_update_rtc_time() 65 tm->tm_min = bcd2bin(buf[M41T62_REG_MIN] & 0x7f); in m41t62_update_rtc_time() 66 tm->tm_hour = bcd2bin(buf[M41T62_REG_HOUR] & 0x3f); in m41t62_update_rtc_time() 67 tm->tm_mday = bcd2bin(buf[M41T62_REG_DAY] & 0x3f); in m41t62_update_rtc_time() 68 tm->tm_wday = buf[M41T62_REG_WDAY] & 0x07; in m41t62_update_rtc_time() 69 tm->tm_mon = bcd2bin(buf[M41T62_REG_MON] & 0x1f); in m41t62_update_rtc_time() 73 tm->tm_year = bcd2bin(buf[M41T62_REG_YEAR]) + 100 + 1900; in m41t62_update_rtc_time() [all …]
|
| H A D | x1205.c | 89 u8 buf[8]; in rtc_get() local 91 i2c_read(CONFIG_SYS_I2C_RTC_ADDR, X1205_CCR_BASE, 2, buf, 8); in rtc_get() 96 buf[0], buf[1], buf[2], buf[3], in rtc_get() 97 buf[4], buf[5], buf[6], buf[7]); in rtc_get() 99 tm->tm_sec = bcd2bin(buf[CCR_SEC]); in rtc_get() 100 tm->tm_min = bcd2bin(buf[CCR_MIN]); in rtc_get() 101 tm->tm_hour = bcd2bin(buf[CCR_HOUR] & 0x3F); /* hr is 0-23 */ in rtc_get() 102 tm->tm_mday = bcd2bin(buf[CCR_MDAY]); in rtc_get() 103 tm->tm_mon = bcd2bin(buf[CCR_MONTH]); /* mon is 0-11 */ in rtc_get() 104 tm->tm_year = bcd2bin(buf[CCR_YEAR]) in rtc_get() [all …]
|
| H A D | pcf2127.c | 27 uchar buf[8]; in pcf2127_rtc_set() local 31 buf[i++] = PCF2127_REG_SC; in pcf2127_rtc_set() 34 buf[i++] = bin2bcd(tm->tm_sec); in pcf2127_rtc_set() 35 buf[i++] = bin2bcd(tm->tm_min); in pcf2127_rtc_set() 36 buf[i++] = bin2bcd(tm->tm_hour); in pcf2127_rtc_set() 37 buf[i++] = bin2bcd(tm->tm_mday); in pcf2127_rtc_set() 38 buf[i++] = tm->tm_wday & 0x07; in pcf2127_rtc_set() 41 buf[i++] = bin2bcd(tm->tm_mon + 1); in pcf2127_rtc_set() 44 buf[i++] = bin2bcd(tm->tm_year % 100); in pcf2127_rtc_set() 47 ret = dm_i2c_write(dev, PCF2127_REG_CTRL1, buf, sizeof(buf)); in pcf2127_rtc_set() [all …]
|
| /openbmc/libpldm/tests/ |
| H A D | msgbuf_generic.c | 33 uint8_t buf[1] = {0xa5}; in test_msgbuf_extract_generic_uint8() local 36 expect(pldm_msgbuf_init_errno(ctx, sizeof(buf), buf, sizeof(buf)) == 0); in test_msgbuf_extract_generic_uint8() 46 int8_t buf[1] = {-1}; in test_msgbuf_extract_generic_int8() local 49 expect(pldm_msgbuf_init_errno(ctx, sizeof(buf), buf, sizeof(buf)) == 0); in test_msgbuf_extract_generic_int8() 59 uint16_t buf[1] = {0x5aa5}; in test_msgbuf_extract_generic_uint16() local 62 expect(pldm_msgbuf_init_errno(ctx, sizeof(buf), buf, sizeof(buf)) == 0); in test_msgbuf_extract_generic_uint16() 72 int16_t buf[1] = {(int16_t)(htole16((uint16_t)INT16_MIN))}; in test_msgbuf_extract_generic_int16() local 75 expect(pldm_msgbuf_init_errno(ctx, sizeof(buf), buf, sizeof(buf)) == 0); in test_msgbuf_extract_generic_int16() 85 uint32_t buf[1] = {0x5a00ffa5}; in test_msgbuf_extract_generic_uint32() local 88 expect(pldm_msgbuf_init_errno(ctx, sizeof(buf), buf, sizeof(buf)) == 0); in test_msgbuf_extract_generic_uint32() [all …]
|
| H A D | msgbuf.cpp | 19 uint8_t buf[1] = {}; in TEST() local 21 EXPECT_NE(pldm_msgbuf_init_errno(ctx, sizeof(buf) + 1U, buf, sizeof(buf)), in TEST() 29 uint8_t buf[1] = {}; in TEST() local 31 EXPECT_NE(pldm_msgbuf_init_errno(ctx, sizeof(buf), buf, SIZE_MAX), 0); in TEST() 39 void* buf = (void*)UINTPTR_MAX; in TEST() local 41 EXPECT_NE(pldm_msgbuf_init_errno(ctx, 0, buf, 2), 0); in TEST() 48 uint8_t buf[1] = {}; in TEST() local 50 EXPECT_EQ(pldm_msgbuf_init_errno(ctx, sizeof(buf), buf, sizeof(buf)), 0); in TEST() 57 uint8_t buf[1] = {}; in TEST() local 59 ASSERT_EQ(pldm_msgbuf_init_errno(ctx, sizeof(buf), buf, sizeof(buf)), 0); in TEST() [all …]
|
| /openbmc/u-boot/test/dm/ |
| H A D | i2c.c | 48 uint8_t buf[5]; in dm_test_i2c_read_write() local 52 ut_assertok(dm_i2c_read(dev, 0, buf, 5)); in dm_test_i2c_read_write() 53 ut_assertok(memcmp(buf, "\0\0\0\0\0", sizeof(buf))); in dm_test_i2c_read_write() 55 ut_assertok(dm_i2c_read(dev, 0, buf, 5)); in dm_test_i2c_read_write() 56 ut_assertok(memcmp(buf, "\0\0AB\0", sizeof(buf))); in dm_test_i2c_read_write() 65 uint8_t buf[5]; in dm_test_i2c_speed() local 73 ut_assertok(dm_i2c_read(dev, 0, buf, 5)); in dm_test_i2c_speed() 76 ut_assertok(dm_i2c_read(dev, 0, buf, 5)); in dm_test_i2c_speed() 77 ut_asserteq(-EINVAL, dm_i2c_write(dev, 0, buf, 5)); in dm_test_i2c_speed() 87 uint8_t buf[5]; in dm_test_i2c_offset_len() local [all …]
|
| /openbmc/u-boot/drivers/power/ |
| H A D | power_i2c.c | 20 unsigned char buf[4] = { 0 }; in pmic_reg_write() local 30 buf[2] = (cpu_to_le32(val) >> 16) & 0xff; in pmic_reg_write() 31 buf[1] = (cpu_to_le32(val) >> 8) & 0xff; in pmic_reg_write() 32 buf[0] = cpu_to_le32(val) & 0xff; in pmic_reg_write() 34 buf[0] = (cpu_to_le32(val) >> 16) & 0xff; in pmic_reg_write() 35 buf[1] = (cpu_to_le32(val) >> 8) & 0xff; in pmic_reg_write() 36 buf[2] = cpu_to_le32(val) & 0xff; in pmic_reg_write() 41 buf[1] = (cpu_to_le32(val) >> 8) & 0xff; in pmic_reg_write() 42 buf[0] = cpu_to_le32(val) & 0xff; in pmic_reg_write() 44 buf[0] = (cpu_to_le32(val) >> 8) & 0xff; in pmic_reg_write() [all …]
|
| /openbmc/libpldm/src/dsp/ |
| H A D | platform.c | 268 PLDM_MSGBUF_RO_DEFINE_P(buf); in decode_set_state_effecter_states_req() 281 rc = pldm_msgbuf_init_errno(buf, in decode_set_state_effecter_states_req() 288 pldm_msgbuf_extract_p(buf, effecter_id); in decode_set_state_effecter_states_req() 289 rc = pldm_msgbuf_extract_p(buf, comp_effecter_count); in decode_set_state_effecter_states_req() 291 return pldm_xlate_errno(pldm_msgbuf_discard(buf, rc)); in decode_set_state_effecter_states_req() 295 return pldm_msgbuf_discard(buf, PLDM_ERROR_INVALID_DATA); in decode_set_state_effecter_states_req() 299 pldm_msgbuf_extract(buf, field[i].set_request); in decode_set_state_effecter_states_req() 300 pldm_msgbuf_extract(buf, field[i].effecter_state); in decode_set_state_effecter_states_req() 303 rc = pldm_msgbuf_complete(buf); in decode_set_state_effecter_states_req() 317 PLDM_MSGBUF_RO_DEFINE_P(buf); in decode_get_pdr_req() [all …]
|
| H A D | file.c | 21 PLDM_MSGBUF_RW_DEFINE_P(buf); in encode_pldm_file_df_open_req() 39 rc = pldm_msgbuf_init_errno(buf, PLDM_DF_OPEN_REQ_BYTES, msg->payload, in encode_pldm_file_df_open_req() 45 pldm_msgbuf_insert(buf, req->file_identifier); in encode_pldm_file_df_open_req() 46 pldm_msgbuf_insert(buf, req->file_attribute.value); in encode_pldm_file_df_open_req() 48 return pldm_msgbuf_complete_used(buf, *payload_length, payload_length); in encode_pldm_file_df_open_req() 56 PLDM_MSGBUF_RO_DEFINE_P(buf); in decode_pldm_file_df_open_req() 63 rc = pldm_msgbuf_init_errno(buf, PLDM_DF_OPEN_REQ_BYTES, msg->payload, in decode_pldm_file_df_open_req() 69 pldm_msgbuf_extract(buf, req->file_identifier); in decode_pldm_file_df_open_req() 70 pldm_msgbuf_extract(buf, req->file_attribute.value); in decode_pldm_file_df_open_req() 72 return pldm_msgbuf_complete_consumed(buf); in decode_pldm_file_df_open_req() [all …]
|
| H A D | firmware_update.c | 400 PLDM_MSGBUF_RO_DEFINE_P(buf); in decode_pldm_package_header_info_errno() 433 rc = pldm_msgbuf_init_errno(buf, PLDM_FWUP_PACKAGE_HEADER_FIXED_SIZE, in decode_pldm_package_header_info_errno() 439 rc = pldm_msgbuf_extract_array(buf, in decode_pldm_package_header_info_errno() 444 return pldm_msgbuf_discard(buf, rc); in decode_pldm_package_header_info_errno() 463 return pldm_msgbuf_discard(buf, -ENOTSUP); in decode_pldm_package_header_info_errno() 466 rc = pldm_msgbuf_extract(buf, hdr->package_header_format_revision); in decode_pldm_package_header_info_errno() 468 return pldm_msgbuf_discard(buf, rc); in decode_pldm_package_header_info_errno() 471 return pldm_msgbuf_discard(buf, -ENOTSUP); in decode_pldm_package_header_info_errno() 479 rc = pldm_msgbuf_extract(buf, package_header_size); in decode_pldm_package_header_info_errno() 481 return pldm_msgbuf_discard(buf, rc); in decode_pldm_package_header_info_errno() [all …]
|
| /openbmc/u-boot/board/keymile/common/ |
| H A D | ivm.c | 14 static int ivm_calc_crc(unsigned char *buf, int len) in ivm_calc_crc() argument 29 byte = buf[i]; in ivm_calc_crc() 57 static int ivm_get_value(unsigned char *buf, int len, char *name, int off, in ivm_get_value() argument 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() 135 for (; (buf[addr] != '\r') && in ivm_findinventorystring() 136 ((buf[addr] != ';') || (!stop)) && in ivm_findinventorystring() [all …]
|
| /openbmc/qemu/tests/qtest/ |
| H A D | npcm7xx_rng-test.c | 40 static void dump_buf_if_failed(const uint8_t *buf, size_t size) in dump_buf_if_failed() argument 43 qemu_hexdump(stderr, "", buf, size); in dump_buf_if_failed() 96 static double calc_monobit_p(const uint8_t *buf, unsigned int len) in calc_monobit_p() argument 107 sn += 2 * ctpop8(buf[i]) - 8; in calc_monobit_p() 121 static double calc_runs_p(const unsigned long *buf, unsigned int nr_bits) in calc_runs_p() argument 132 nr_ones += __builtin_popcountl(buf[j]); in calc_runs_p() 137 vn_obs += (test_bit(k, buf) ^ test_bit(k + 1, buf)); in calc_runs_p() 189 uint8_t buf[TEST_INPUT_BITS / BITS_PER_BYTE]; in test_continuous_monobit() local 193 for (i = 0; i < sizeof(buf); i++) { in test_continuous_monobit() 195 buf[i] = rng_readb(RNGD); in test_continuous_monobit() [all …]
|
| /openbmc/qemu/hw/misc/ |
| H A D | ibm-cffps.c | 36 uint8_t buf[32]; member 50 s->buf[s->len++] = 7; /* Byte count */ in ibm_cffps_read() 51 s->buf[s->len++] = 'F'; in ibm_cffps_read() 52 s->buf[s->len++] = 'R'; in ibm_cffps_read() 53 s->buf[s->len++] = 'U'; in ibm_cffps_read() 54 s->buf[s->len++] = '0'; in ibm_cffps_read() 55 s->buf[s->len++] = '1'; in ibm_cffps_read() 56 s->buf[s->len++] = '2'; in ibm_cffps_read() 57 s->buf[s->len++] = '3'; in ibm_cffps_read() 60 s->buf[s->len++] = 7; /* Byte count */ in ibm_cffps_read() [all …]
|
| /openbmc/u-boot/drivers/power/pmic/ |
| H A D | pmic_tps65910.c | 13 static inline int tps65910_read_reg(int addr, uchar *buf) in tps65910_read_reg() argument 16 return i2c_read(TPS65910_CTRL_I2C_ADDR, addr, 1, buf, 1); in tps65910_read_reg() 23 *buf = (uchar)rc; in tps65910_read_reg() 28 static inline int tps65910_write_reg(int addr, uchar *buf) in tps65910_write_reg() argument 31 return i2c_write(TPS65910_CTRL_I2C_ADDR, addr, 1, buf, 1); in tps65910_write_reg() 33 return dm_i2c_reg_write(tps65910_dev, addr, *buf); in tps65910_write_reg() 60 uchar buf; in tps65910_set_i2c_control() local 63 ret = tps65910_read_reg(TPS65910_DEVCTRL_REG, &buf); in tps65910_set_i2c_control() 68 buf |= TPS65910_DEVCTRL_REG_SR_CTL_I2C_SEL_CTL_I2C; in tps65910_set_i2c_control() 70 return tps65910_write_reg(TPS65910_DEVCTRL_REG, &buf); in tps65910_set_i2c_control() [all …]
|
| /openbmc/libpldm/src/oem/meta/ |
| H A D | file_io.c | 24 PLDM_MSGBUF_RO_DEFINE_P(buf); in decode_oem_meta_file_io_write_req() 35 rc = pldm_msgbuf_init_errno(buf, in decode_oem_meta_file_io_write_req() 42 pldm_msgbuf_extract(buf, req->handle); in decode_oem_meta_file_io_write_req() 43 rc = pldm_msgbuf_extract(buf, req->length); in decode_oem_meta_file_io_write_req() 45 return pldm_msgbuf_discard(buf, rc); in decode_oem_meta_file_io_write_req() 48 rc = pldm_msgbuf_extract_array(buf, req->length, req->data, in decode_oem_meta_file_io_write_req() 51 return pldm_msgbuf_discard(buf, rc); in decode_oem_meta_file_io_write_req() 54 return pldm_msgbuf_complete_consumed(buf); in decode_oem_meta_file_io_write_req() 101 PLDM_MSGBUF_RO_DEFINE_P(buf); in decode_oem_meta_file_io_read_req() 112 buf, PLDM_OEM_META_FILE_IO_READ_REQ_MIN_LENGTH, msg->payload, in decode_oem_meta_file_io_read_req() [all …]
|
| /openbmc/qemu/accel/tcg/ |
| H A D | tcg-stats.c | 21 static void dump_drift_info(GString *buf) in dump_drift_info() argument 27 g_string_append_printf(buf, "Host - Guest clock %"PRIi64" ms\n", in dump_drift_info() 30 g_string_append_printf(buf, "Max guest delay %"PRIi64" ms\n", in dump_drift_info() 32 g_string_append_printf(buf, "Max guest advance %"PRIi64" ms\n", in dump_drift_info() 35 g_string_append_printf(buf, "Max guest delay NA\n"); in dump_drift_info() 36 g_string_append_printf(buf, "Max guest advance NA\n"); in dump_drift_info() 40 static void dump_accel_info(AccelState *accel, GString *buf) in dump_accel_info() argument 46 g_string_append_printf(buf, "Accelerator settings:\n"); in dump_accel_info() 47 g_string_append_printf(buf, "one-insn-per-tb: %s\n\n", in dump_accel_info() 51 static void print_qht_statistics(struct qht_stats hst, GString *buf) in print_qht_statistics() argument [all …]
|
| /openbmc/qemu/tests/tcg/s390x/ |
| H A D | lcbb.c | 20 static char buf[0x1000] __attribute__((aligned(0x1000))); variable 35 test_lcbb(&buf[0], 0, 16, 0); in main() 36 test_lcbb(&buf[63], 0, 1, 3); in main() 37 test_lcbb(&buf[0], 1, 16, 0); in main() 38 test_lcbb(&buf[127], 1, 1, 3); in main() 39 test_lcbb(&buf[0], 2, 16, 0); in main() 40 test_lcbb(&buf[255], 2, 1, 3); in main() 41 test_lcbb(&buf[0], 3, 16, 0); in main() 42 test_lcbb(&buf[511], 3, 1, 3); in main() 43 test_lcbb(&buf[0], 4, 16, 0); in main() [all …]
|
| /openbmc/qemu/util/ |
| H A D | bufferiszero.c | 31 static bool buffer_is_zero_int_lt256(const void *buf, size_t len) in buffer_is_zero_int_lt256() argument 41 return (ldl_he_p(buf) | ldl_he_p(buf + len - 4)) == 0; in buffer_is_zero_int_lt256() 44 t = ldq_he_p(buf) | ldq_he_p(buf + len - 8); in buffer_is_zero_int_lt256() 45 p = QEMU_ALIGN_PTR_DOWN(buf + 8, 8); in buffer_is_zero_int_lt256() 46 e = QEMU_ALIGN_PTR_DOWN(buf + len - 1, 8); in buffer_is_zero_int_lt256() 55 static bool buffer_is_zero_int_ge256(const void *buf, size_t len) in buffer_is_zero_int_ge256() argument 61 uint64_t t = ldq_he_p(buf) | ldq_he_p(buf + len - 8); in buffer_is_zero_int_ge256() 62 const uint64_t *p = QEMU_ALIGN_PTR_DOWN(buf + 8, 8); in buffer_is_zero_int_ge256() 63 const uint64_t *e = QEMU_ALIGN_PTR_DOWN(buf + len - 1, 8); in buffer_is_zero_int_ge256() 89 bool buffer_is_zero_ool(const void *buf, size_t len) in buffer_is_zero_ool() argument [all …]
|
| /openbmc/u-boot/examples/standalone/ |
| H A D | atmel_df_pow2.c | 17 static int flash_cmd(struct spi_slave *slave, uchar cmd, uchar *buf, int len) in flash_cmd() argument 19 buf[0] = cmd; in flash_cmd() 20 return spi_xfer(slave, 8 * len, buf, buf, SPI_XFER_BEGIN | SPI_XFER_END); in flash_cmd() 25 uchar buf[2]; in flash_status() local 26 if (flash_cmd(slave, CMD_STAT, buf, sizeof(buf))) in flash_status() 28 return buf[1]; in flash_status() 34 uchar buf[4]; in flash_set_pow2() local 36 buf[1] = 0x2a; in flash_set_pow2() 37 buf[2] = 0x80; in flash_set_pow2() 38 buf[3] = 0xa6; in flash_set_pow2() [all …]
|