summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2012-05-20 22:33:44 +0200
committerWolfgang Denk <wd@denx.de>2012-05-20 22:33:44 +0200
commit8bd07c9aaf4628931ab8da6eb0f83e517d9381a7 (patch)
treea0b3d31f7b56426cef184f8e6c21fff2aedf49ce /common
parentee3a55fdf00b54391e406217e53674449e70d78b (diff)
parentde30122bb58fee7b0f94bcfabab595b6ad757336 (diff)
downloadu-boot-imx-8bd07c9aaf4628931ab8da6eb0f83e517d9381a7.zip
u-boot-imx-8bd07c9aaf4628931ab8da6eb0f83e517d9381a7.tar.gz
u-boot-imx-8bd07c9aaf4628931ab8da6eb0f83e517d9381a7.tar.bz2
Merge branch 'master' of git://git.denx.de/u-boot-net
* 'master' of git://git.denx.de/u-boot-net: net: move bootfile init into eth_initialize net: punt bd->bi_ip_addr net: cosmetic: netconsole.c checkpatch compliance net: cosmetic: tftp.* checkpatch compliance net: cosmetic: sntp.* checkpatch compliance net: cosmetic: rarp.* checkpatch compliance net: cosmetic: nfs.* checkpatch compliance net: cosmetic: net.c checkpatch compliance net: cosmetic: eth.c checkpatch compliance net: cosmetic: bootp.* checkpatch compliance net: cosmetic: net.h checkpatch compliance net: Remove volatile from net API
Diffstat (limited to 'common')
-rw-r--r--common/cmd_bdinfo.c28
-rw-r--r--common/cmd_nvedit.c16
-rw-r--r--common/main.c1
3 files changed, 15 insertions, 30 deletions
diff --git a/common/cmd_bdinfo.c b/common/cmd_bdinfo.c
index 3ab285b..42f08fd 100644
--- a/common/cmd_bdinfo.c
+++ b/common/cmd_bdinfo.c
@@ -147,7 +147,7 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
#ifdef CONFIG_HERMES
print_mhz("ethspeed", bd->bi_ethspeed);
#endif
- printf("IP addr = %pI4\n", &bd->bi_ip_addr);
+ printf("IP addr = %s\n", getenv("ipaddr"));
printf("baudrate = %6ld bps\n", bd->bi_baudrate);
print_num("relocaddr", gd->relocaddr);
return 0;
@@ -172,7 +172,7 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
#if defined(CONFIG_CMD_NET)
print_eth(0);
- printf("ip_addr = %pI4\n", &bd->bi_ip_addr);
+ printf("ip_addr = %s\n", getenv("ipaddr"));
#endif
printf("baudrate = %ld bps\n", bd->bi_baudrate);
@@ -196,7 +196,7 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
#endif
#if defined(CONFIG_CMD_NET)
print_eth(0);
- printf("ip_addr = %pI4\n", &bd->bi_ip_addr);
+ printf("ip_addr = %s\n", getenv("ipaddr"));
#endif
printf("baudrate = %ld bps\n", (ulong)bd->bi_baudrate);
return 0;
@@ -229,7 +229,7 @@ int do_bdinfo(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
#if defined(CONFIG_CMD_NET)
print_eth(0);
- printf("ip_addr = %pI4\n", &bd->bi_ip_addr);
+ printf("ip_addr = %s\n", getenv("ipaddr"));
#endif
printf("baudrate = %6ld bps\n", bd->bi_baudrate);
return 0;
@@ -275,7 +275,7 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
print_eth(3);
#endif
- printf("ip_addr = %pI4\n", &bd->bi_ip_addr);
+ printf("ip_addr = %s\n", getenv("ipaddr"));
#endif
printf("baudrate = %ld bps\n", bd->bi_baudrate);
@@ -303,7 +303,7 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
print_num("flashoffset", (ulong)bd->bi_flashoffset);
print_eth(0);
- printf("ip_addr = %pI4\n", &bd->bi_ip_addr);
+ printf("ip_addr = %s\n", getenv("ipaddr"));
printf("baudrate = %d bps\n", bd->bi_baudrate);
return 0;
@@ -323,7 +323,7 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
print_num("flashoffset", (ulong)bd->bi_flashoffset);
print_eth(0);
- printf("ip_addr = %pI4\n", &bd->bi_ip_addr);
+ printf("ip_addr = %s\n", getenv("ipaddr"));
printf("baudrate = %d bps\n", bd->bi_baudrate);
return 0;
@@ -343,7 +343,7 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
print_num("flashoffset", (ulong)bd->bi_flashoffset);
print_eth(0);
- printf("ip_addr = %pI4\n", &bd->bi_ip_addr);
+ printf("ip_addr = %s\n", getenv("ipaddr"));
printf("baudrate = %lu bps\n", bd->bi_baudrate);
return 0;
@@ -367,7 +367,7 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
#if defined(CONFIG_CMD_NET)
print_eth(0);
- printf("ip_addr = %pI4\n", &bd->bi_ip_addr);
+ printf("ip_addr = %s\n", getenv("ipaddr"));
#endif
printf("baudrate = %d bps\n", bd->bi_baudrate);
#if !(defined(CONFIG_SYS_ICACHE_OFF) && defined(CONFIG_SYS_DCACHE_OFF))
@@ -403,7 +403,7 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
#if defined(CONFIG_CMD_NET)
print_eth(0);
- printf("ip_addr = %pI4\n", &bd->bi_ip_addr);
+ printf("ip_addr = %s\n", getenv("ipaddr"));
#endif
printf("baudrate = %ld bps\n", (ulong)bd->bi_baudrate);
return 0;
@@ -436,7 +436,7 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
#if defined(CONFIG_CMD_NET)
print_eth(0);
- printf("ip_addr = %pI4\n", &bd->bi_ip_addr);
+ printf("ip_addr = %s\n", getenv("ipaddr"));
print_mhz("ethspeed", bd->bi_ethspeed);
#endif
printf("baudrate = %d bps\n", bd->bi_baudrate);
@@ -461,7 +461,7 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
#if defined(CONFIG_CMD_NET)
print_eth(0);
- printf("ip_addr = %pI4\n", &bd->bi_ip_addr);
+ printf("ip_addr = %s\n", getenv("ipaddr"));
#endif
print_num("FB base ", gd->fb_base);
return 0;
@@ -485,7 +485,7 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
#if defined(CONFIG_CMD_NET)
print_eth(0);
- printf("ip_addr = %pI4\n", &bd->bi_ip_addr);
+ printf("ip_addr = %s\n", getenv("ipaddr"));
#endif
printf("baudrate = %d bps\n", bd->bi_baudrate);
@@ -506,7 +506,7 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
#if defined(CONFIG_CMD_NET)
print_eth(0);
- printf("ip_addr = %pI4\n", &bd->bi_ip_addr);
+ printf("ip_addr = %s\n", getenv("ipaddr"));
#endif
printf("baudrate = %ld bps\n", bd->bi_baudrate);
diff --git a/common/cmd_nvedit.c b/common/cmd_nvedit.c
index e1ccdd8..5999cb8 100644
--- a/common/cmd_nvedit.c
+++ b/common/cmd_nvedit.c
@@ -343,21 +343,7 @@ int _do_env_set(int flag, int argc, char * const argv[])
* Some variables should be updated when the corresponding
* entry in the environment is changed
*/
- if (strcmp(name, "ipaddr") == 0) {
- char *s = argv[2]; /* always use only one arg */
- char *e;
- unsigned long addr;
- bd->bi_ip_addr = 0;
- for (addr = 0, i = 0; i < 4; ++i) {
- ulong val = s ? simple_strtoul(s, &e, 10) : 0;
- addr <<= 8;
- addr |= val & 0xFF;
- if (s)
- s = *e ? e + 1 : e;
- }
- bd->bi_ip_addr = htonl(addr);
- return 0;
- } else if (strcmp(argv[1], "loadaddr") == 0) {
+ if (strcmp(argv[1], "loadaddr") == 0) {
load_addr = simple_strtoul(argv[2], NULL, 16);
return 0;
}
diff --git a/common/main.c b/common/main.c
index 3b9e39a..a933357 100644
--- a/common/main.c
+++ b/common/main.c
@@ -973,7 +973,6 @@ int readline_into_buffer(const char *const prompt, char *buffer, int timeout)
#ifdef CONFIG_SHOW_ACTIVITY
while (!tstc()) {
- extern void show_activity(int arg);
show_activity(0);
WATCHDOG_RESET();
}