diff options
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 baab8715c..50ada33e8 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 8430298a3..aeacb8eb2 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 85a902373..5989733f9 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 7a2ca9e45..9ff094960 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 2b48a1c91..64e56af13 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 f858fb3d4..8dbd8e389 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 */ |