diff options
author | wdenk <wdenk> | 2004-04-18 17:39:38 +0000 |
---|---|---|
committer | wdenk <wdenk> | 2004-04-18 17:39:38 +0000 |
commit | 6e5923851ec5c11a36136abc77160d834537c4dd (patch) | |
tree | 1d324917e695bf3aadc0041d220304d07d09027a /common | |
parent | c26e454dfc6650428854fa2db3b1ed7f19e0ba0e (diff) | |
download | u-boot-imx-6e5923851ec5c11a36136abc77160d834537c4dd.zip u-boot-imx-6e5923851ec5c11a36136abc77160d834537c4dd.tar.gz u-boot-imx-6e5923851ec5c11a36136abc77160d834537c4dd.tar.bz2 |
* Cleanup, minor fixes
* Patch by Rune Torgersen, 16 Apr 2004:
LBA48 fixes
* Patches by Pantelis Antoniou, 16 Apr 2004:
- Fix some compile problems;
add "once" functionality for the netretry variable
Diffstat (limited to 'common')
-rw-r--r-- | common/cmd_ide.c | 5 | ||||
-rw-r--r-- | common/cmd_mem.c | 2 | ||||
-rw-r--r-- | common/cmd_net.c | 78 | ||||
-rw-r--r-- | common/cmd_pcmcia.c | 11 | ||||
-rw-r--r-- | common/command.c | 4 | ||||
-rw-r--r-- | common/console.c | 5 |
6 files changed, 47 insertions, 58 deletions
diff --git a/common/cmd_ide.c b/common/cmd_ide.c index baab871..50ada33 100644 --- a/common/cmd_ide.c +++ b/common/cmd_ide.c @@ -1186,13 +1186,12 @@ static void ide_ident (block_dev_desc_t *dev_desc) #ifdef CONFIG_LBA48 if (iop->command_set_2 & 0x0400) { /* LBA 48 support */ - dev_desc->lba48support = 1; - dev_desc->lba48 = (unsigned long long)iop->lba48_capacity[0] | + dev_desc->lba48 = 1; + dev_desc->lba = (unsigned long long)iop->lba48_capacity[0] | ((unsigned long long)iop->lba48_capacity[1] << 16) | ((unsigned long long)iop->lba48_capacity[2] << 32) | ((unsigned long long)iop->lba48_capacity[3] << 48); } else { - dev_desc->lba48support = 0; dev_desc->lba48 = 0; } #endif /* CONFIG_LBA48 */ diff --git a/common/cmd_mem.c b/common/cmd_mem.c index 8430298..aeacb8e 100644 --- a/common/cmd_mem.c +++ b/common/cmd_mem.c @@ -1001,7 +1001,7 @@ int do_mem_crc (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) ulong addr, length; ulong crc; ulong *ptr; - ulong vcrc; + ulong vcrc; int verify; int ac; char **av; diff --git a/common/cmd_net.c b/common/cmd_net.c index 85a9023..5989733 100644 --- a/common/cmd_net.c +++ b/common/cmd_net.c @@ -94,62 +94,50 @@ U_BOOT_CMD( ); #endif /* CFG_CMD_NFS */ -static void netboot_update_env(void) +static void netboot_update_env (void) { - char tmp[22] ; + char tmp[22]; - if (NetOurGatewayIP) { - ip_to_string (NetOurGatewayIP, tmp); - setenv("gatewayip", tmp); - } - - if (NetOurSubnetMask) { - ip_to_string (NetOurSubnetMask, tmp); - setenv("netmask", tmp); - } + if (NetOurGatewayIP) { + ip_to_string (NetOurGatewayIP, tmp); + setenv ("gatewayip", tmp); + } - if (NetOurHostName[0]) - setenv("hostname", NetOurHostName); + if (NetOurSubnetMask) { + ip_to_string (NetOurSubnetMask, tmp); + setenv ("netmask", tmp); + } - if (NetOurRootPath[0]) - setenv("rootpath", NetOurRootPath); + if (NetOurHostName[0]) + setenv ("hostname", NetOurHostName); - if (NetOurIP) { - ip_to_string (NetOurIP, tmp); - setenv("ipaddr", tmp); - } + if (NetOurRootPath[0]) + setenv ("rootpath", NetOurRootPath); - if (NetServerIP) { - ip_to_string (NetServerIP, tmp); - setenv("serverip", tmp); - } + if (NetOurIP) { + ip_to_string (NetOurIP, tmp); + setenv ("ipaddr", tmp); + } - if (NetOurDNSIP) { - ip_to_string (NetOurDNSIP, tmp); - setenv("dnsip", tmp); - } + if (NetServerIP) { + ip_to_string (NetServerIP, tmp); + setenv ("serverip", tmp); + } + if (NetOurDNSIP) { + ip_to_string (NetOurDNSIP, tmp); + setenv ("dnsip", tmp); + } #if (CONFIG_BOOTP_MASK & CONFIG_BOOTP_DNS2) - if (NetOurDNS2IP) { - ip_to_string (NetOurDNS2IP, tmp); - setenv("dnsip2", tmp); - } + if (NetOurDNS2IP) { + ip_to_string (NetOurDNS2IP, tmp); + setenv ("dnsip2", tmp); + } #endif - - if (NetOurNISDomain[0]) - setenv("domain", NetOurNISDomain); - - if (ntohs(NetOurVLAN) != (ushort)-1) { - VLAN_to_string(NetOurVLAN, tmp); - setenv("vlan", tmp); - } - - if (ntohs(NetOurNativeVLAN) != (ushort)-1) { - VLAN_to_string(NetOurNativeVLAN, tmp); - setenv("vlan", tmp); - } - + if (NetOurNISDomain[0]) + setenv ("domain", NetOurNISDomain); } + static int netboot_common (int proto, cmd_tbl_t *cmdtp, int argc, char *argv[]) { diff --git a/common/cmd_pcmcia.c b/common/cmd_pcmcia.c index 7a2ca9e..9ff0949 100644 --- a/common/cmd_pcmcia.c +++ b/common/cmd_pcmcia.c @@ -1,5 +1,5 @@ /* - * (C) Copyright 2000-2002 + * (C) Copyright 2000-2004 * Wolfgang Denk, DENX Software Engineering, wd@denx.de. * * See file CREDITS for list of people who contributed to this @@ -91,7 +91,7 @@ static int voltage_set(int slot, int vcc, int vpp); #if (! defined(CONFIG_I82365)) && (! defined(CONFIG_PXA_PCMCIA)) static u_int m8xx_get_graycode(u_int size); -#endif /* CONFIG_I82365 */ +#endif /* !CONFIG_I82365, !CONFIG_PXA_PCMCIA */ #if 0 static u_int m8xx_get_speed(u_int ns, u_int is_io); #endif @@ -106,9 +106,10 @@ static u_int *pcmcia_pgcrx[2] = { &((immap_t *)CFG_IMMR)->im_pcmcia.pcmc_pgcra, &((immap_t *)CFG_IMMR)->im_pcmcia.pcmc_pgcrb, }; - #define PCMCIA_PGCRX(slot) (*pcmcia_pgcrx[slot]) +#endif /* CONFIG_PXA_PCMCIA */ + #endif /* CONFIG_I82365 */ #if defined(CONFIG_IDE_8xx_PCCARD) || defined(CONFIG_PXA_PCMCIA) @@ -116,9 +117,7 @@ static void print_funcid (int func); static void print_fixed (volatile uchar *p); static int identify (volatile uchar *p); static int check_ide_device (int slot); -#endif /* CONFIG_IDE_8xx_PCCARD */ - -#endif +#endif /* CONFIG_IDE_8xx_PCCARD, CONFIG_PXA_PCMCIA */ const char *indent = "\t "; diff --git a/common/command.c b/common/command.c index 2b48a1c..64e56af 100644 --- a/common/command.c +++ b/common/command.c @@ -89,12 +89,12 @@ do_test (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) #if 0 { printf("test:"); - left = 1; + left = 1; while (argv[left]) printf(" %s", argv[left++]); } #endif - + last_expr = 0; left = argc - 1; ap = argv + 1; if (left > 0 && strcmp(ap[0], "!") == 0) { diff --git a/common/console.c b/common/console.c index f858fb3..8dbd8e3 100644 --- a/common/console.c +++ b/common/console.c @@ -412,6 +412,9 @@ int console_init_r (void) DECLARE_GLOBAL_DATA_PTR; char *stdinname, *stdoutname, *stderrname; device_t *inputdev = NULL, *outputdev = NULL, *errdev = NULL; +#ifdef CFG_CONSOLE_ENV_OVERWRITE + int i; +#endif /* CFG_CONSOLE_ENV_OVERWRITE */ /* set default handlers at first */ gd->jt[XF_getc] = serial_getc; @@ -483,7 +486,7 @@ int console_init_r (void) for (i = 0; i < 3; i++) { setenv (stdio_names[i], stdio_devices[i]->name); } -#endif /* CFG_CONSOLE_ENV_OVERWRITE */ +#endif /* CFG_CONSOLE_ENV_OVERWRITE */ #if 0 /* If nothing usable installed, use only the initial console */ |