Lines Matching refs:vpd
39 static struct vpd_cache vpd; variable
576 struct vpd_cache *vpd = (struct vpd_cache *)userdata; in vpd_callback() local
580 vpd->product_id = data[0]; in vpd_callback()
584 vpd->has |= VPD_HAS_MAC1; in vpd_callback()
585 memcpy(vpd->mac1, data, VPD_MAC_ADDRESS_LENGTH); in vpd_callback()
588 vpd->has |= VPD_HAS_MAC2; in vpd_callback()
589 memcpy(vpd->mac2, data + 6, VPD_MAC_ADDRESS_LENGTH); in vpd_callback()
596 static void process_vpd(struct vpd_cache *vpd) in process_vpd() argument
601 switch (vpd->product_id) { in process_vpd()
619 if (fec_index >= 0 && (vpd->has & VPD_HAS_MAC1)) in process_vpd()
620 eth_env_set_enetaddr_by_index("eth", fec_index, vpd->mac1); in process_vpd()
622 if (i210_index >= 0 && (vpd->has & VPD_HAS_MAC2)) in process_vpd()
623 eth_env_set_enetaddr_by_index("eth", i210_index, vpd->mac2); in process_vpd()
645 memset(&vpd, 0, sizeof(vpd)); in read_vpd()
646 vpd_reader(size, data, &vpd, vpd_callback); in read_vpd()
696 static void set_confidx(const struct vpd_cache* vpd) in set_confidx() argument
698 switch (vpd->product_id) { in set_confidx()
719 set_confidx(&vpd); in board_init()
800 process_vpd(&vpd); in board_late_init()