diff options
author | Wolfgang Denk <wd@pollux.denx.de> | 2005-08-05 11:22:28 +0200 |
---|---|---|
committer | Wolfgang Denk <wd@pollux.denx.de> | 2005-08-05 11:22:28 +0200 |
commit | cbf9c117282b8729bdb86071997b58fcab58c444 (patch) | |
tree | ff9175f1d987c49ef8b3b334bffae4f35ca8b759 /common | |
parent | a99a0a98b9fcf78ee2ceda893e8d4bd9b11e427a (diff) | |
parent | 2c61f14c60ccc5a1c90205991bf555872887a831 (diff) | |
download | u-boot-imx-cbf9c117282b8729bdb86071997b58fcab58c444.zip u-boot-imx-cbf9c117282b8729bdb86071997b58fcab58c444.tar.gz u-boot-imx-cbf9c117282b8729bdb86071997b58fcab58c444.tar.bz2 |
Merge with /home/wd/git/u-boot/master
Diffstat (limited to 'common')
-rw-r--r-- | common/cmd_flash.c | 8 | ||||
-rw-r--r-- | common/cmd_scsi.c | 19 | ||||
-rw-r--r-- | common/environment.c | 5 | ||||
-rw-r--r-- | common/usb.c | 16 | ||||
-rw-r--r-- | common/usb_storage.c | 15 |
5 files changed, 53 insertions, 10 deletions
diff --git a/common/cmd_flash.c b/common/cmd_flash.c index 162d1ff..3972082 100644 --- a/common/cmd_flash.c +++ b/common/cmd_flash.c @@ -116,12 +116,13 @@ abbrev_spec (char *str, flash_info_t ** pinfo, int *psf, int *psl) static int addr_spec(char *arg1, char *arg2, ulong *addr_first, ulong *addr_last) { + char len_used = 0; /* indicates if the "start +length" form used */ char *ep; + *addr_first = simple_strtoul(arg1, &ep, 16); if (ep == arg1 || *ep != '\0') return -1; - char len_used = 0; /* indicates if the "start +length" form used */ if (arg2 && *arg2 == '+'){ len_used = 1; ++arg2; @@ -132,6 +133,9 @@ addr_spec(char *arg1, char *arg2, ulong *addr_first, ulong *addr_last) return -1; if (len_used){ + char found = 0; + ulong bank; + /* * *addr_last has the length, compute correct *addr_last * XXX watch out for the integer overflow! Right now it is @@ -146,8 +150,6 @@ addr_spec(char *arg1, char *arg2, ulong *addr_first, ulong *addr_last) */ /* find the end addr of the sector where the *addr_last is */ - char found = 0; - ulong bank; for (bank = 0; bank < CFG_MAX_FLASH_BANKS && !found; ++bank){ int i; flash_info_t *info = &flash_info[bank]; diff --git a/common/cmd_scsi.c b/common/cmd_scsi.c index 7ee9d8e..ec53790 100644 --- a/common/cmd_scsi.c +++ b/common/cmd_scsi.c @@ -585,4 +585,23 @@ void scsi_setup_inquiry(ccb * pccb) pccb->msgout[0]=SCSI_IDENTIFY; /* NOT USED */ } + +U_BOOT_CMD( + scsi, 5, 1, do_scsi, + "scsi - SCSI sub-system\n", + "reset - reset SCSI controller\n" + "scsi info - show available SCSI devices\n" + "scsi scan - (re-)scan SCSI bus\n" + "scsi device [dev] - show or set current device\n" + "scsi part [dev] - print partition table of one or all SCSI devices\n" + "scsi read addr blk# cnt - read `cnt' blocks starting at block `blk#'\n" + " to memory address `addr'\n" +); + +U_BOOT_CMD( + scsiboot, 3, 1, do_scsiboot, + "scsiboot- boot from SCSI device\n", + "loadAddr dev:part\n" +); + #endif /* #if (CONFIG_COMMANDS & CFG_CMD_SCSI) */ diff --git a/common/environment.c b/common/environment.c index 61a8d24..c7f54c6 100644 --- a/common/environment.c +++ b/common/environment.c @@ -21,7 +21,12 @@ * MA 02111-1307 USA */ +#ifndef __ASSEMBLY__ +#define __ASSEMBLY__ /* Dirty trick to get only #defines */ +#endif +#define __ASM_STUB_PROCESSOR_H__ /* don't include asm/processor. */ #include <config.h> +#undef __ASSEMBLY__ #include <environment.h> /* diff --git a/common/usb.c b/common/usb.c index 03eccf8..d9515e6 100644 --- a/common/usb.c +++ b/common/usb.c @@ -1,9 +1,19 @@ /* - * (C) Copyright 2001 - * Denis Peter, MPL AG Switzerland * * Most of this source has been derived from the Linux USB - * project. + * project: + * (C) Copyright Linus Torvalds 1999 + * (C) Copyright Johannes Erdfelt 1999-2001 + * (C) Copyright Andreas Gal 1999 + * (C) Copyright Gregory P. Smith 1999 + * (C) Copyright Deti Fliegl 1999 (new USB architecture) + * (C) Copyright Randy Dunlap 2000 + * (C) Copyright David Brownell 2000 (kernel hotplug, usb_device_id) + * (C) Copyright Yggdrasil Computing, Inc. 2000 + * (usb_device_id matching changes by Adam J. Richter) + * + * Adapted for U-Boot: + * (C) Copyright 2001 Denis Peter, MPL AG Switzerland * * See file CREDITS for list of people who contributed to this * project. diff --git a/common/usb_storage.c b/common/usb_storage.c index 6cf62e4..69d195a 100644 --- a/common/usb_storage.c +++ b/common/usb_storage.c @@ -1,12 +1,19 @@ /* - * (C) Copyright 2001 - * Denis Peter, MPL AG Switzerland + * Most of this source has been derived from the Linux USB + * project: + * (c) 1999-2002 Matthew Dharm (mdharm-usb@one-eyed-alien.net) + * (c) 2000 David L. Brown, Jr. (usb-storage@davidb.org) + * (c) 1999 Michael Gee (michael@linuxspecific.com) + * (c) 2000 Yggdrasil Computing, Inc. + * + * + * Adapted for U-Boot: + * (C) Copyright 2001 Denis Peter, MPL AG Switzerland * * For BBB support (C) Copyright 2003 * Gary Jennejohn, DENX Software Engineering <gj@denx.de> * - * Most of this source has been derived from the Linux USB - * project. BBB support based on /sys/dev/usb/umass.c from + * BBB support based on /sys/dev/usb/umass.c from * FreeBSD. * * See file CREDITS for list of people who contributed to this |