diff options
| author | Wolfgang Denk <wd@pollux.denx.de> | 2005-10-05 01:51:29 +0200 | 
|---|---|---|
| committer | Wolfgang Denk <wd@pollux.denx.de> | 2005-10-05 01:51:29 +0200 | 
| commit | 080bdb7f3a0227bc2f34a3b2d4e6f573dab3ca3a (patch) | |
| tree | 25724dfd8332f647b9a7765d204112dcadf83e63 /board/mp2usb/flash.c | |
| parent | 29ca46c4453c41e0617b76248cae3be628e03cc2 (diff) | |
| download | olio-uboot-2014.01-080bdb7f3a0227bc2f34a3b2d4e6f573dab3ca3a.tar.xz olio-uboot-2014.01-080bdb7f3a0227bc2f34a3b2d4e6f573dab3ca3a.zip | |
* Move dm9161.c and lxt972.c into cpu/arm920t/at91rm9200
  Patch by Anders Larsen, 29 Apr 2005
* Fix problems introduced by Patch by Steven Scholz, 02 Mar 2005
  (8e2be51de8dd03c1ce4d06cbb18ad06133d47cd5)
Diffstat (limited to 'board/mp2usb/flash.c')
| -rw-r--r-- | board/mp2usb/flash.c | 15 | 
1 files changed, 5 insertions, 10 deletions
| diff --git a/board/mp2usb/flash.c b/board/mp2usb/flash.c index 070dbf62c..89ced163b 100644 --- a/board/mp2usb/flash.c +++ b/board/mp2usb/flash.c @@ -237,7 +237,7 @@ static ulong flash_get_size (FPW *addr, flash_info_t *info)  int flash_erase (flash_info_t *info, int s_first, int s_last)  { -	int flag, prot, sect; +	int prot, sect;  	ulong type, start, last;  	int rcode = 0;  	int cflag, iflag; @@ -284,10 +284,8 @@ int flash_erase (flash_info_t *info, int s_first, int s_last)  	 */  	cflag = icache_status ();  	icache_disable (); -	iflag = disable_interrupts (); -  	/* Disable interrupts which might cause a timeout here */ -/*	flag = disable_interrupts (); */ +	iflag = disable_interrupts ();  	/* Start erase on unprotected sectors */  	for (sect = s_first; sect <= s_last; sect++) { @@ -314,8 +312,8 @@ int flash_erase (flash_info_t *info, int s_first, int s_last)  				}  			} -			*addr = INTEL_CLEAR;	/* clear status register cmd.   */ -			*addr = INTEL_RESET;	/* resest to read mode          */ +			*addr = (FPWV)INTEL_CLEAR;	/* clear status register cmd.   */ +			*addr = (FPWV)INTEL_RESET;	/* resest to read mode          */  			printf (" done\n");  		} @@ -425,7 +423,6 @@ static int write_data (flash_info_t *info, ulong dest, FPW data)  	FPWV *addr = (FPWV *) dest;  	ulong status;  	int cflag, iflag; -	int flag;  	/* Check if Flash is (sufficiently) erased */  	if ((*addr & data) != data) { @@ -441,10 +438,8 @@ static int write_data (flash_info_t *info, ulong dest, FPW data)  	 */  	cflag = icache_status ();  	icache_disable (); -	iflag = disable_interrupts (); -  	/* Disable interrupts which might cause a timeout here */ -	/*flag = disable_interrupts (); */ +	iflag = disable_interrupts ();  	*addr = (FPW) INTEL_PROG;	/* write setup */  	*addr = data; |