]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - board/esd/cpci405/cpci405.c
Merge remote-tracking branch 'u-boot-atmel/master'
[karo-tx-uboot.git] / board / esd / cpci405 / cpci405.c
index 41b5ba0490673c737f5e76181b20ff5f82f459f6..fb082457edf4fe77e28664e247aa1a85a3584dbf 100644 (file)
@@ -697,7 +697,6 @@ U_BOOT_CMD(
  */
 int do_get_bpip(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 {
-       bd_t *bd = gd->bd;
        char *buf;
        ulong crc;
        char str[32];
@@ -730,12 +729,7 @@ int do_get_bpip(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
                /*
                 * Update whole ip-addr
                 */
-               bd->bi_ip_addr = ipaddr;
-               sprintf(str, "%ld.%ld.%ld.%ld",
-                       (bd->bi_ip_addr & 0xff000000) >> 24,
-                       (bd->bi_ip_addr & 0x00ff0000) >> 16,
-                       (bd->bi_ip_addr & 0x0000ff00) >> 8,
-                       (bd->bi_ip_addr & 0x000000ff));
+               sprintf(str, "%pI4", &ipaddr);
                setenv("ipaddr", str);
                printf("Updated ip_addr from bp_eeprom to %s!\n", str);
        }