diff options
| -rw-r--r-- | README | 8 | ||||
| -rw-r--r-- | common/bootstage.c | 17 | ||||
| -rw-r--r-- | drivers/mtd/spr_smi.c | 5 | ||||
| -rw-r--r-- | include/bootstage.h | 7 | ||||
| -rw-r--r-- | include/common.h | 7 | ||||
| -rw-r--r-- | include/configs/EB+MCF-EV123.h | 3 | ||||
| -rw-r--r-- | lib/time.c | 17 | ||||
| -rw-r--r-- | tools/mkenvimage.c | 4 | 
8 files changed, 31 insertions, 37 deletions
| @@ -3499,7 +3499,7 @@ is done by typing:  	make NAME_config  where "NAME_config" is the name of one of the existing configu- -rations; see the main Makefile for supported names. +rations; see boards.cfg for supported names.  Note: for some board special configuration names may exist; check if        additional information is available from the board vendor; for @@ -3554,10 +3554,8 @@ to port U-Boot to your hardware platform. To do this, follow these  steps:  1.  Add a new configuration option for your board to the toplevel -    "Makefile" and to the "MAKEALL" script, using the existing -    entries as examples. Note that here and at many other places -    boards and other names are listed in alphabetical sort order. Please -    keep this order. +    "boards.cfg" file, using the existing entries as examples. +    Follow the instructions there to keep the boards in order.  2.  Create a new directory to hold your board specific code. Add any      files you need. In your board directory, you will need at least      the "Makefile", a "<board>.c", "flash.c" and "u-boot.lds". diff --git a/common/bootstage.c b/common/bootstage.c index d2bbe635e..4e01d9207 100644 --- a/common/bootstage.c +++ b/common/bootstage.c @@ -156,3 +156,20 @@ void bootstage_report(void)  			"- please increase CONFIG_BOOTSTAGE_USER_COUNT\n",  		       next_id - BOOTSTAGE_ID_COUNT);  } + +ulong __timer_get_boot_us(void) +{ +	static ulong base_time; + +	/* +	 * We can't implement this properly. Return 0 on the first call and +	 * larger values after that. +	 */ +	if (base_time) +		return get_timer(base_time) * 1000; +	base_time = get_timer(0); +	return 0; +} + +ulong timer_get_boot_us(void) +	__attribute__((weak, alias("__timer_get_boot_us"))); diff --git a/drivers/mtd/spr_smi.c b/drivers/mtd/spr_smi.c index 9a70a199c..6d4257a3f 100644 --- a/drivers/mtd/spr_smi.c +++ b/drivers/mtd/spr_smi.c @@ -322,24 +322,19 @@ static int smi_write(unsigned int *src_addr, unsigned int *dst_addr,  		     unsigned int length, ulong bank_addr)  {  	int banknum; -	unsigned int WM;  	switch (bank_addr) {  	case SMIBANK0_BASE:  		banknum = BANK0; -		WM = WM0;  		break;  	case SMIBANK1_BASE:  		banknum = BANK1; -		WM = WM1;  		break;  	case SMIBANK2_BASE:  		banknum = BANK2; -		WM = WM2;  		break;  	case SMIBANK3_BASE:  		banknum = BANK3; -		WM = WM3;  		break;  	default:  		return -1; diff --git a/include/bootstage.h b/include/bootstage.h index 06ab2c8ef..a00053888 100644 --- a/include/bootstage.h +++ b/include/bootstage.h @@ -204,6 +204,13 @@ enum bootstage_id {  };  /* + * Return the time since boot in microseconds, This is needed for bootstage + * and should be defined in CPU- or board-specific code. If undefined then + * millisecond resolution will be used (the standard get_timer()). + */ +ulong timer_get_boot_us(void); + +/*   * Board code can implement show_boot_progress() if needed.   *   * @param val	Progress state (enum bootstage_id), or -id if an error diff --git a/include/common.h b/include/common.h index 74d97046a..4b5841ef4 100644 --- a/include/common.h +++ b/include/common.h @@ -207,13 +207,6 @@ typedef void (interrupt_handler_t)(void *);  #endif /* CONFIG_SERIAL_MULTI */  /* - * Return the time since boot in microseconds, This is needed for bootstage - * and should be defined in CPU- or board-specific code. If undefined then - * millisecond resolution will be used (the standard get_timer()). - */ -ulong timer_get_boot_us(void); - -/*   * General Purpose Utilities   */  #define min(X, Y)				\ diff --git a/include/configs/EB+MCF-EV123.h b/include/configs/EB+MCF-EV123.h index 1f774a932..346b49cf4 100644 --- a/include/configs/EB+MCF-EV123.h +++ b/include/configs/EB+MCF-EV123.h @@ -90,7 +90,8 @@  #define CONFIG_BOOTDELAY	5 -#define CONFIG_HUSH_PARSER +#define CONFIG_SYS_HUSH_PARSER +#define CONFIG_SYS_PROMPT_HUSH_PS2	"> "  #define CONFIG_SYS_PROMPT	"\nEV123 U-Boot> "  #define	CONFIG_SYS_LONGHELP	1 diff --git a/lib/time.c b/lib/time.c index 69edc3d39..6e2937b8e 100644 --- a/lib/time.c +++ b/lib/time.c @@ -47,20 +47,3 @@ void mdelay(unsigned long msec)  	while (msec--)  		udelay(1000);  } - -ulong __timer_get_boot_us(void) -{ -	static ulong base_time; - -	/* -	 * We can't implement this properly. Return 0 on the first call and -	 * larger values after that. -	 */ -	if (base_time) -		return get_timer(base_time) * 1000; -	base_time = get_timer(0); -	return 0; -} - -ulong timer_get_boot_us(void) -	__attribute__((weak, alias("__timer_get_boot_us"))); diff --git a/tools/mkenvimage.c b/tools/mkenvimage.c index 9dbb3b210..bfc4eb636 100644 --- a/tools/mkenvimage.c +++ b/tools/mkenvimage.c @@ -213,7 +213,7 @@ int main(int argc, char **argv)  		filebuf = mmap(NULL, sizeof(*envptr) * filesize, PROT_READ,  			       MAP_PRIVATE, txt_fd, 0);  		if (filebuf == MAP_FAILED) { -			fprintf(stderr, "mmap (%ld bytes) failed: %s\n", +			fprintf(stderr, "mmap (%zu bytes) failed: %s\n",  					sizeof(*envptr) * filesize,  					strerror(errno));  			fprintf(stderr, "Falling back to read()\n"); @@ -221,7 +221,7 @@ int main(int argc, char **argv)  			filebuf = malloc(sizeof(*envptr) * filesize);  			ret = read(txt_fd, filebuf, sizeof(*envptr) * filesize);  			if (ret != sizeof(*envptr) * filesize) { -				fprintf(stderr, "Can't read the whole input file (%ld bytes): %s\n", +				fprintf(stderr, "Can't read the whole input file (%zu bytes): %s\n",  					sizeof(*envptr) * filesize,  					strerror(errno)); |