Lines Matching refs:buf

20 static void board_get_alt_info_mmc(struct udevice *dev, char *buf)  in board_get_alt_info_mmc()  argument
42 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()
47 len += snprintf(buf + len, DFU_ALT_BUF_LEN - len, in board_get_alt_info_mmc()
51 len += snprintf(buf + len, DFU_ALT_BUF_LEN - len, in board_get_alt_info_mmc()
54 len += snprintf(buf + len, DFU_ALT_BUF_LEN - len, in board_get_alt_info_mmc()
64 len += snprintf(buf + len, DFU_ALT_BUF_LEN - len, ";"); in board_get_alt_info_mmc()
66 len += snprintf(buf + len, DFU_ALT_BUF_LEN - len, in board_get_alt_info_mmc()
72 static void board_get_alt_info_mtd(struct mtd_info *mtd, char *buf) in board_get_alt_info_mtd() argument
80 len = strlen(buf); in board_get_alt_info_mtd()
82 if (buf[0] != '\0') in board_get_alt_info_mtd()
83 len += snprintf(buf + len, DFU_ALT_BUF_LEN - len, "&"); in board_get_alt_info_mtd()
84 len += snprintf(buf + len, DFU_ALT_BUF_LEN - len, in board_get_alt_info_mtd()
87 len += snprintf(buf + len, DFU_ALT_BUF_LEN - len, in board_get_alt_info_mtd()
94 len += snprintf(buf + len, DFU_ALT_BUF_LEN - len, ";"); in board_get_alt_info_mtd()
97 len += snprintf(buf + len, DFU_ALT_BUF_LEN - len, in board_get_alt_info_mtd()
108 ALLOC_CACHE_ALIGN_BUFFER(char, buf, DFU_ALT_BUF_LEN); in set_dfu_alt_info()
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()
123 board_get_alt_info_mmc(dev, buf); in set_dfu_alt_info()
134 board_get_alt_info_mtd(mtd, buf); in set_dfu_alt_info()
139 board_get_alt_info_mtd(mtd, buf); in set_dfu_alt_info()
143 board_get_alt_info_mtd(mtd, buf); in set_dfu_alt_info()
148 strncat(buf, "&virt 0=OTP", DFU_ALT_BUF_LEN); in set_dfu_alt_info()
151 strncat(buf, "&virt 1=PMIC", DFU_ALT_BUF_LEN); 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
216 return dfu_otp_read(offset, buf, len); in dfu_read_medium_virt()
218 return dfu_pmic_read(offset, buf, len); in dfu_read_medium_virt()
223 return stm32prog_read_medium_virt(dfu, offset, buf, len); in dfu_read_medium_virt()
230 void *buf, long *len) in dfu_write_medium_virt() argument
234 return stm32prog_write_medium_virt(dfu, offset, buf, len); in dfu_write_medium_virt()