X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=board%2Fsiemens%2Fcommon%2Ffactoryset.c;h=81bbb5758d0b0d1bf70ea24dd6ddf800f85d4f0c;hb=a95aee6af70d8815547b81329125f2800c8ee37c;hp=7baac3dda6da55777e01b5413d593c11a7cc7628;hpb=fc9b0b80435cda721fbdbe507c9e4f388b0ea62b;p=u-boot diff --git a/board/siemens/common/factoryset.c b/board/siemens/common/factoryset.c index 7baac3dda6..81bbb5758d 100644 --- a/board/siemens/common/factoryset.c +++ b/board/siemens/common/factoryset.c @@ -144,9 +144,9 @@ int factoryset_read_eeprom(int i2c_addr) unsigned char eeprom_buf[0x3c00], hdr[4], buf[MAX_STRING_LENGTH]; unsigned char *cp, *cp1; -#if defined(CONFIG_DFU_FUNCTION) - factory_dat.usb_vendor_id = CONFIG_G_DNL_VENDOR_NUM; - factory_dat.usb_product_id = CONFIG_G_DNL_PRODUCT_NUM; +#if defined(CONFIG_USB_FUNCTION_DFU) + factory_dat.usb_vendor_id = CONFIG_USB_GADGET_VENDOR_NUM; + factory_dat.usb_product_id = CONFIG_USB_GADGET_PRODUCT_NUM; #endif if (i2c_probe(i2c_addr)) goto err; @@ -202,7 +202,7 @@ int factoryset_read_eeprom(int i2c_addr) cp1 += 3; } -#if defined(CONFIG_DFU_FUNCTION) +#if defined(CONFIG_USB_FUNCTION_DFU) /* read vid and pid for dfu mode */ if (0 <= get_factory_record_val(cp, size, (uchar *)"USBD1", (uchar *)"vid", buf, @@ -266,12 +266,12 @@ err: static struct ctrl_dev *cdev = (struct ctrl_dev *)CTRL_DEVICE_BASE; -static int factoryset_mac_setenv(void) +static int factoryset_mac_env_set(void) { uint8_t mac_addr[6]; debug("FactorySet: Set mac address\n"); - if (is_valid_ether_addr(factory_dat.mac)) { + if (is_valid_ethaddr(factory_dat.mac)) { memcpy(mac_addr, factory_dat.mac, 6); } else { uint32_t mac_hi, mac_lo; @@ -286,21 +286,21 @@ static int factoryset_mac_setenv(void) mac_addr[3] = (mac_hi & 0xFF000000) >> 24; mac_addr[4] = mac_lo & 0xFF; mac_addr[5] = (mac_lo & 0xFF00) >> 8; - if (!is_valid_ether_addr(mac_addr)) { + if (!is_valid_ethaddr(mac_addr)) { printf("Warning: ethaddr not set by FactorySet or E-fuse. Set variable to overcome this.\n"); return -1; } } - eth_setenv_enetaddr("ethaddr", mac_addr); + eth_env_set_enetaddr("ethaddr", mac_addr); return 0; } -int factoryset_setenv(void) +int factoryset_env_set(void) { int ret = 0; - if (factoryset_mac_setenv() < 0) + if (factoryset_mac_env_set() < 0) ret = -1; return ret;