mirror of
				https://github.com/Stichting-MINIX-Research-Foundation/u-boot.git
				synced 2025-11-04 03:04:52 -05:00 
			
		
		
		
	* Get (mostly) rid of CFG_MONITOR_LEN definition; compute real length
instead CFG_MONITOR_LEN is now only used to determine _at_compile_ _time_ (!) if the environment is embedded within the U-Boot image, or in a separate flash sector. * Cleanup CFG_DER #defines in config files (wd maintained only)
This commit is contained in:
		
							parent
							
								
									f07771cc28
								
							
						
					
					
						commit
						3b57fe0a70
					
				@ -2,6 +2,13 @@
 | 
				
			|||||||
Changes since U-Boot 0.3.1:
 | 
					Changes since U-Boot 0.3.1:
 | 
				
			||||||
======================================================================
 | 
					======================================================================
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					* Get (mostly) rid of CFG_MONITOR_LEN definition; compute real length
 | 
				
			||||||
 | 
					  instead CFG_MONITOR_LEN is now only used to determine  _at_compile_
 | 
				
			||||||
 | 
					  _time_  (!) if the environment is embedded within the U-Boot image,
 | 
				
			||||||
 | 
					  or in a separate flash sector.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					* Cleanup CFG_DER #defines in config files (wd maintained only)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
* Fix data abort exception handling for arm920t CPU
 | 
					* Fix data abort exception handling for arm920t CPU
 | 
				
			||||||
 | 
					
 | 
				
			||||||
* Fix alignment problems with flash driver for TRAB board
 | 
					* Fix alignment problems with flash driver for TRAB board
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										19
									
								
								README
									
									
									
									
									
								
							
							
						
						
									
										19
									
								
								README
									
									
									
									
									
								
							@ -1183,13 +1183,13 @@ The following options need to be configured:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	Note:
 | 
						Note:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		In the current implementation, the local variables
 | 
					                In the current implementation, the local variables
 | 
				
			||||||
		space and global environment variables space are
 | 
					                space and global environment variables space are
 | 
				
			||||||
		separated. Local variables are those you define by
 | 
					                separated. Local variables are those you define by
 | 
				
			||||||
		simply typing like `name=value'. To access a local
 | 
					                simply typing `name=value'. To access a local
 | 
				
			||||||
		variable later on, you have write `$name' or
 | 
					                variable later on, you have write `$name' or
 | 
				
			||||||
		`${name}'; variable directly by typing say `$name' at
 | 
					                `${name}'; to execute the contents of a variable
 | 
				
			||||||
		the command prompt.
 | 
					                directly type `$name' at the command prompt.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		Global environment variables are those you use
 | 
							Global environment variables are those you use
 | 
				
			||||||
		setenv/printenv to work with. To run a command stored
 | 
							setenv/printenv to work with. To run a command stored
 | 
				
			||||||
@ -1389,7 +1389,10 @@ Configuration Settings:
 | 
				
			|||||||
		CFG_FLASH_BASE when booting from flash.
 | 
							CFG_FLASH_BASE when booting from flash.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
- CFG_MONITOR_LEN:
 | 
					- CFG_MONITOR_LEN:
 | 
				
			||||||
		Size of memory reserved for monitor code
 | 
					                Size of memory reserved for monitor code, used to
 | 
				
			||||||
 | 
					                determine _at_compile_time_ (!) if the environment is
 | 
				
			||||||
 | 
					                embedded within the U-Boot image, or in a separate
 | 
				
			||||||
 | 
					                flash sector.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
- CFG_MALLOC_LEN:
 | 
					- CFG_MALLOC_LEN:
 | 
				
			||||||
		Size of DRAM reserved for malloc() use.
 | 
							Size of DRAM reserved for malloc() use.
 | 
				
			||||||
 | 
				
			|||||||
@ -118,7 +118,7 @@ flash_init (void)
 | 
				
			|||||||
  /* monitor protection ON by default */
 | 
					  /* monitor protection ON by default */
 | 
				
			||||||
  flash_protect (FLAG_PROTECT_SET,
 | 
					  flash_protect (FLAG_PROTECT_SET,
 | 
				
			||||||
		 CFG_MONITOR_BASE,
 | 
							 CFG_MONITOR_BASE,
 | 
				
			||||||
		 CFG_MONITOR_BASE + CFG_MONITOR_LEN-1,
 | 
							 CFG_MONITOR_BASE + monitor_flash_len-1,
 | 
				
			||||||
		 &flash_info[0]);
 | 
							 &flash_info[0]);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
  
 | 
					  
 | 
				
			||||||
 | 
				
			|||||||
@ -120,7 +120,7 @@ unsigned long flash_init (void)
 | 
				
			|||||||
		/* monitor protection ON by default */
 | 
							/* monitor protection ON by default */
 | 
				
			||||||
		flash_protect(FLAG_PROTECT_SET,
 | 
							flash_protect(FLAG_PROTECT_SET,
 | 
				
			||||||
			      CFG_MONITOR_BASE,
 | 
								      CFG_MONITOR_BASE,
 | 
				
			||||||
			      CFG_MONITOR_BASE + CFG_MONITOR_LEN - 1,
 | 
								      CFG_MONITOR_BASE + monitor_flash_len - 1,
 | 
				
			||||||
			      &flash_info[0]);
 | 
								      &flash_info[0]);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -64,7 +64,7 @@ unsigned long flash_init (void)
 | 
				
			|||||||
	/* monitor protection ON by default */
 | 
						/* monitor protection ON by default */
 | 
				
			||||||
	flash_protect(FLAG_PROTECT_SET,
 | 
						flash_protect(FLAG_PROTECT_SET,
 | 
				
			||||||
		      CFG_MONITOR_BASE,
 | 
							      CFG_MONITOR_BASE,
 | 
				
			||||||
		      CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
 | 
							      CFG_MONITOR_BASE+monitor_flash_len-1,
 | 
				
			||||||
		      &flash_info[0]);
 | 
							      &flash_info[0]);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -85,7 +85,7 @@ unsigned long flash_init (void)
 | 
				
			|||||||
	/* monitor protection ON by default */
 | 
						/* monitor protection ON by default */
 | 
				
			||||||
	flash_protect(FLAG_PROTECT_SET,
 | 
						flash_protect(FLAG_PROTECT_SET,
 | 
				
			||||||
		      CFG_MONITOR_BASE,
 | 
							      CFG_MONITOR_BASE,
 | 
				
			||||||
		      CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
 | 
							      CFG_MONITOR_BASE+monitor_flash_len-1,
 | 
				
			||||||
		      &flash_info[0]);
 | 
							      &flash_info[0]);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -73,7 +73,7 @@ unsigned long flash_init (void)
 | 
				
			|||||||
	/* monitor protection ON by default */
 | 
						/* monitor protection ON by default */
 | 
				
			||||||
	flash_protect(FLAG_PROTECT_SET,
 | 
						flash_protect(FLAG_PROTECT_SET,
 | 
				
			||||||
		      CFG_MONITOR_BASE,
 | 
							      CFG_MONITOR_BASE,
 | 
				
			||||||
		      CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
 | 
							      CFG_MONITOR_BASE+monitor_flash_len-1,
 | 
				
			||||||
		      &flash_info[0]);
 | 
							      &flash_info[0]);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -91,7 +91,7 @@ unsigned long flash_init (void)
 | 
				
			|||||||
	/* monitor protection ON by default */
 | 
						/* monitor protection ON by default */
 | 
				
			||||||
	flash_protect(FLAG_PROTECT_SET,
 | 
						flash_protect(FLAG_PROTECT_SET,
 | 
				
			||||||
		      CFG_MONITOR_BASE,
 | 
							      CFG_MONITOR_BASE,
 | 
				
			||||||
		      CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
 | 
							      CFG_MONITOR_BASE+monitor_flash_len-1,
 | 
				
			||||||
		      flash_get_info(CFG_MONITOR_BASE));
 | 
							      flash_get_info(CFG_MONITOR_BASE));
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -219,7 +219,7 @@ flash_init(void)
 | 
				
			|||||||
#if CFG_MONITOR_BASE >= CFG_FLASH_BASE
 | 
					#if CFG_MONITOR_BASE >= CFG_FLASH_BASE
 | 
				
			||||||
    flash_protect(FLAG_PROTECT_SET,
 | 
					    flash_protect(FLAG_PROTECT_SET,
 | 
				
			||||||
		CFG_MONITOR_BASE,
 | 
							CFG_MONITOR_BASE,
 | 
				
			||||||
		CFG_MONITOR_BASE + CFG_MONITOR_LEN - 1,
 | 
							CFG_MONITOR_BASE + monitor_flash_len - 1,
 | 
				
			||||||
		&flash_info[0]);
 | 
							&flash_info[0]);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -91,7 +91,7 @@ unsigned long flash_init (void)
 | 
				
			|||||||
	/* monitor protection ON by default */
 | 
						/* monitor protection ON by default */
 | 
				
			||||||
	flash_protect(FLAG_PROTECT_SET,
 | 
						flash_protect(FLAG_PROTECT_SET,
 | 
				
			||||||
		      CFG_MONITOR_BASE,
 | 
							      CFG_MONITOR_BASE,
 | 
				
			||||||
		      CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
 | 
							      CFG_MONITOR_BASE+monitor_flash_len-1,
 | 
				
			||||||
		      &flash_info[0]);
 | 
							      &flash_info[0]);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -118,7 +118,7 @@ unsigned long flash_init (void)
 | 
				
			|||||||
		/* monitor protection ON by default */
 | 
							/* monitor protection ON by default */
 | 
				
			||||||
		flash_protect(FLAG_PROTECT_SET,
 | 
							flash_protect(FLAG_PROTECT_SET,
 | 
				
			||||||
			      CFG_MONITOR_BASE,
 | 
								      CFG_MONITOR_BASE,
 | 
				
			||||||
			      CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
 | 
								      CFG_MONITOR_BASE+monitor_flash_len-1,
 | 
				
			||||||
			      &flash_info[1]);
 | 
								      &flash_info[1]);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -106,7 +106,7 @@ unsigned long flash_init (void)
 | 
				
			|||||||
	/* monitor protection ON by default */
 | 
						/* monitor protection ON by default */
 | 
				
			||||||
	flash_protect(FLAG_PROTECT_SET,
 | 
						flash_protect(FLAG_PROTECT_SET,
 | 
				
			||||||
		      CFG_MONITOR_BASE,
 | 
							      CFG_MONITOR_BASE,
 | 
				
			||||||
		      CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
 | 
							      CFG_MONITOR_BASE+monitor_flash_len-1,
 | 
				
			||||||
		      &flash_info[0]);
 | 
							      &flash_info[0]);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -323,7 +323,7 @@ flash_init(void)
 | 
				
			|||||||
#if CFG_MONITOR_BASE == CFG_FLASH_BASE
 | 
					#if CFG_MONITOR_BASE == CFG_FLASH_BASE
 | 
				
			||||||
	flash_protect(FLAG_PROTECT_SET,
 | 
						flash_protect(FLAG_PROTECT_SET,
 | 
				
			||||||
		      CFG_MONITOR_BASE,
 | 
							      CFG_MONITOR_BASE,
 | 
				
			||||||
		      CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
 | 
							      CFG_MONITOR_BASE+monitor_flash_len-1,
 | 
				
			||||||
		      &flash_info[0]);
 | 
							      &flash_info[0]);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -132,12 +132,12 @@ unsigned long flash_init(void)
 | 
				
			|||||||
#if CFG_MONITOR_BASE >= CFG_FLASH_BASE + FLASH_BANK_SIZE
 | 
					#if CFG_MONITOR_BASE >= CFG_FLASH_BASE + FLASH_BANK_SIZE
 | 
				
			||||||
    flash_protect(FLAG_PROTECT_SET,
 | 
					    flash_protect(FLAG_PROTECT_SET,
 | 
				
			||||||
              CFG_MONITOR_BASE,
 | 
					              CFG_MONITOR_BASE,
 | 
				
			||||||
              CFG_MONITOR_BASE + CFG_MONITOR_LEN - 1,
 | 
					              CFG_MONITOR_BASE + monitor_flash_len - 1,
 | 
				
			||||||
              &flash_info[1]);
 | 
					              &flash_info[1]);
 | 
				
			||||||
#else
 | 
					#else
 | 
				
			||||||
    flash_protect(FLAG_PROTECT_SET,
 | 
					    flash_protect(FLAG_PROTECT_SET,
 | 
				
			||||||
              CFG_MONITOR_BASE,
 | 
					              CFG_MONITOR_BASE,
 | 
				
			||||||
              CFG_MONITOR_BASE + CFG_MONITOR_LEN - 1,
 | 
					              CFG_MONITOR_BASE + monitor_flash_len - 1,
 | 
				
			||||||
              &flash_info[0]);
 | 
					              &flash_info[0]);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
				
			|||||||
@ -218,14 +218,14 @@ unsigned long flash_init (void)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
		flash_protect  (FLAG_PROTECT_SET,
 | 
							flash_protect  (FLAG_PROTECT_SET,
 | 
				
			||||||
				CFG_MONITOR_BASE,
 | 
									CFG_MONITOR_BASE,
 | 
				
			||||||
				CFG_MONITOR_BASE + CFG_MONITOR_LEN - 1, &flash_info[1]
 | 
									CFG_MONITOR_BASE + monitor_flash_len - 1, &flash_info[1]
 | 
				
			||||||
		);
 | 
							);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
#else
 | 
					#else
 | 
				
			||||||
#if CFG_MONITOR_BASE >= CFG_FLASH_BASE
 | 
					#if CFG_MONITOR_BASE >= CFG_FLASH_BASE
 | 
				
			||||||
	flash_protect (FLAG_PROTECT_SET,
 | 
						flash_protect (FLAG_PROTECT_SET,
 | 
				
			||||||
		       CFG_MONITOR_BASE,
 | 
							       CFG_MONITOR_BASE,
 | 
				
			||||||
		       CFG_MONITOR_BASE + CFG_MONITOR_LEN - 1, &flash_info[0]
 | 
							       CFG_MONITOR_BASE + monitor_flash_len - 1, &flash_info[0]
 | 
				
			||||||
	);
 | 
						);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
				
			|||||||
@ -73,7 +73,7 @@ ulong flash_init(void)
 | 
				
			|||||||
    */
 | 
					    */
 | 
				
			||||||
   flash_protect(FLAG_PROTECT_SET,
 | 
					   flash_protect(FLAG_PROTECT_SET,
 | 
				
			||||||
                  CFG_FLASH_BASE,
 | 
					                  CFG_FLASH_BASE,
 | 
				
			||||||
                  CFG_FLASH_BASE + _armboot_end_data - _armboot_start,
 | 
					                  CFG_FLASH_BASE + monitor_flash_len - 1,
 | 
				
			||||||
                  &flash_info[0]);
 | 
					                  &flash_info[0]);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
   flash_protect(FLAG_PROTECT_SET,
 | 
					   flash_protect(FLAG_PROTECT_SET,
 | 
				
			||||||
 | 
				
			|||||||
@ -88,7 +88,7 @@ unsigned long flash_init (void)
 | 
				
			|||||||
	    /* Monitor protection ON by default */
 | 
						    /* Monitor protection ON by default */
 | 
				
			||||||
	    (void)flash_protect(FLAG_PROTECT_SET,
 | 
						    (void)flash_protect(FLAG_PROTECT_SET,
 | 
				
			||||||
				FLASH_BASE0_PRELIM,
 | 
									FLASH_BASE0_PRELIM,
 | 
				
			||||||
				FLASH_BASE0_PRELIM+CFG_MONITOR_LEN-1,
 | 
									FLASH_BASE0_PRELIM+monitor_flash_len-1,
 | 
				
			||||||
				&flash_info[0]);
 | 
									&flash_info[0]);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
	    size_b1 = 0 ;
 | 
						    size_b1 = 0 ;
 | 
				
			||||||
 | 
				
			|||||||
@ -74,7 +74,7 @@ ulong flash_init(void)
 | 
				
			|||||||
	/* Protect monitor and environment sectors */
 | 
						/* Protect monitor and environment sectors */
 | 
				
			||||||
	flash_protect(FLAG_PROTECT_SET,
 | 
						flash_protect(FLAG_PROTECT_SET,
 | 
				
			||||||
			CFG_FLASH_BASE,
 | 
								CFG_FLASH_BASE,
 | 
				
			||||||
			CFG_FLASH_BASE + _armboot_end_data - _armboot_start,
 | 
								CFG_FLASH_BASE + monitor_flash_len - 1,
 | 
				
			||||||
			&flash_info[0]);
 | 
								&flash_info[0]);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	flash_protect(FLAG_PROTECT_SET,
 | 
						flash_protect(FLAG_PROTECT_SET,
 | 
				
			||||||
 | 
				
			|||||||
@ -125,12 +125,12 @@ unsigned long flash_init(void)
 | 
				
			|||||||
#if CFG_MONITOR_BASE >= CFG_FLASH_BASE + FLASH_BANK_SIZE
 | 
					#if CFG_MONITOR_BASE >= CFG_FLASH_BASE + FLASH_BANK_SIZE
 | 
				
			||||||
    flash_protect(FLAG_PROTECT_SET,
 | 
					    flash_protect(FLAG_PROTECT_SET,
 | 
				
			||||||
              CFG_MONITOR_BASE,
 | 
					              CFG_MONITOR_BASE,
 | 
				
			||||||
              CFG_MONITOR_BASE + CFG_MONITOR_LEN - 1,
 | 
					              CFG_MONITOR_BASE + monitor_flash_len - 1,
 | 
				
			||||||
              &flash_info[1]);
 | 
					              &flash_info[1]);
 | 
				
			||||||
#else
 | 
					#else
 | 
				
			||||||
    flash_protect(FLAG_PROTECT_SET,
 | 
					    flash_protect(FLAG_PROTECT_SET,
 | 
				
			||||||
              CFG_MONITOR_BASE,
 | 
					              CFG_MONITOR_BASE,
 | 
				
			||||||
              CFG_MONITOR_BASE + CFG_MONITOR_LEN - 1,
 | 
					              CFG_MONITOR_BASE + monitor_flash_len - 1,
 | 
				
			||||||
              &flash_info[0]);
 | 
					              &flash_info[0]);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
				
			|||||||
@ -84,7 +84,7 @@ unsigned long flash_init (void)
 | 
				
			|||||||
     */
 | 
					     */
 | 
				
			||||||
    flash_protect(FLAG_PROTECT_SET,
 | 
					    flash_protect(FLAG_PROTECT_SET,
 | 
				
			||||||
		  CFG_FLASH_BASE,
 | 
							  CFG_FLASH_BASE,
 | 
				
			||||||
		  CFG_FLASH_BASE + _armboot_end_data - _armboot_start,
 | 
							  CFG_FLASH_BASE + monitor_flash_len  - 1,
 | 
				
			||||||
		  &flash_info[0]);
 | 
							  &flash_info[0]);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    flash_protect(FLAG_PROTECT_SET,
 | 
					    flash_protect(FLAG_PROTECT_SET,
 | 
				
			||||||
 | 
				
			|||||||
@ -83,21 +83,21 @@ unsigned long flash_init (void)
 | 
				
			|||||||
    {
 | 
					    {
 | 
				
			||||||
        (void)flash_protect(FLAG_PROTECT_SET,
 | 
					        (void)flash_protect(FLAG_PROTECT_SET,
 | 
				
			||||||
                FLASH_BASE0_PRELIM,
 | 
					                FLASH_BASE0_PRELIM,
 | 
				
			||||||
                FLASH_BASE0_PRELIM+CFG_MONITOR_LEN-1,
 | 
					                FLASH_BASE0_PRELIM+monitor_flash_len-1,
 | 
				
			||||||
                &flash_info[0]);
 | 
					                &flash_info[0]);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    if (size2 == 512*1024)
 | 
					    if (size2 == 512*1024)
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        (void)flash_protect(FLAG_PROTECT_SET,
 | 
					        (void)flash_protect(FLAG_PROTECT_SET,
 | 
				
			||||||
                FLASH_BASE1_PRELIM,
 | 
					                FLASH_BASE1_PRELIM,
 | 
				
			||||||
                FLASH_BASE1_PRELIM+CFG_MONITOR_LEN-1,
 | 
					                FLASH_BASE1_PRELIM+monitor_flash_len-1,
 | 
				
			||||||
                &flash_info[1]);
 | 
					                &flash_info[1]);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    if (size2 == 4*1024*1024)
 | 
					    if (size2 == 4*1024*1024)
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        (void)flash_protect(FLAG_PROTECT_SET,
 | 
					        (void)flash_protect(FLAG_PROTECT_SET,
 | 
				
			||||||
                CFG_FLASH_BASE,
 | 
					                CFG_FLASH_BASE,
 | 
				
			||||||
                CFG_FLASH_BASE+CFG_MONITOR_LEN-1,
 | 
					                CFG_FLASH_BASE+monitor_flash_len-1,
 | 
				
			||||||
                &flash_info[1]);
 | 
					                &flash_info[1]);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -83,21 +83,21 @@ unsigned long flash_init (void)
 | 
				
			|||||||
    {
 | 
					    {
 | 
				
			||||||
        (void)flash_protect(FLAG_PROTECT_SET,
 | 
					        (void)flash_protect(FLAG_PROTECT_SET,
 | 
				
			||||||
                FLASH_BASE0_PRELIM,
 | 
					                FLASH_BASE0_PRELIM,
 | 
				
			||||||
                FLASH_BASE0_PRELIM+CFG_MONITOR_LEN-1,
 | 
					                FLASH_BASE0_PRELIM+monitor_flash_len-1,
 | 
				
			||||||
                &flash_info[0]);
 | 
					                &flash_info[0]);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    if (size2 == 512*1024)
 | 
					    if (size2 == 512*1024)
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        (void)flash_protect(FLAG_PROTECT_SET,
 | 
					        (void)flash_protect(FLAG_PROTECT_SET,
 | 
				
			||||||
                FLASH_BASE1_PRELIM,
 | 
					                FLASH_BASE1_PRELIM,
 | 
				
			||||||
                FLASH_BASE1_PRELIM+CFG_MONITOR_LEN-1,
 | 
					                FLASH_BASE1_PRELIM+monitor_flash_len-1,
 | 
				
			||||||
                &flash_info[1]);
 | 
					                &flash_info[1]);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    if (size2 == 4*1024*1024)
 | 
					    if (size2 == 4*1024*1024)
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        (void)flash_protect(FLAG_PROTECT_SET,
 | 
					        (void)flash_protect(FLAG_PROTECT_SET,
 | 
				
			||||||
                CFG_FLASH_BASE,
 | 
					                CFG_FLASH_BASE,
 | 
				
			||||||
                CFG_FLASH_BASE+CFG_MONITOR_LEN-1,
 | 
					                CFG_FLASH_BASE+monitor_flash_len-1,
 | 
				
			||||||
                &flash_info[1]);
 | 
					                &flash_info[1]);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -92,7 +92,7 @@ unsigned long flash_init (void)
 | 
				
			|||||||
	/* monitor protection ON by default */
 | 
						/* monitor protection ON by default */
 | 
				
			||||||
	(void)flash_protect(FLAG_PROTECT_SET,
 | 
						(void)flash_protect(FLAG_PROTECT_SET,
 | 
				
			||||||
			    CFG_FLASH_BASE,
 | 
								    CFG_FLASH_BASE,
 | 
				
			||||||
			    CFG_FLASH_BASE+CFG_MONITOR_LEN-1,
 | 
								    CFG_FLASH_BASE+monitor_flash_len-1,
 | 
				
			||||||
			    &flash_info[0]);
 | 
								    &flash_info[0]);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	flash_info[0].size = size_b0;
 | 
						flash_info[0].size = size_b0;
 | 
				
			||||||
 | 
				
			|||||||
@ -61,7 +61,7 @@ ulong flash_init (void)
 | 
				
			|||||||
	 */
 | 
						 */
 | 
				
			||||||
	flash_protect ( FLAG_PROTECT_SET,
 | 
						flash_protect ( FLAG_PROTECT_SET,
 | 
				
			||||||
			CFG_FLASH_BASE,
 | 
								CFG_FLASH_BASE,
 | 
				
			||||||
			CFG_FLASH_BASE + _armboot_end_data - _armboot_start,
 | 
								CFG_FLASH_BASE + monitor_flash_len - 1,
 | 
				
			||||||
			&flash_info[0]);
 | 
								&flash_info[0]);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	flash_protect ( FLAG_PROTECT_SET,
 | 
						flash_protect ( FLAG_PROTECT_SET,
 | 
				
			||||||
 | 
				
			|||||||
@ -140,7 +140,7 @@ unsigned long flash_init (void)
 | 
				
			|||||||
#if CFG_MONITOR_BASE >= CFG_FLASH0_BASE
 | 
					#if CFG_MONITOR_BASE >= CFG_FLASH0_BASE
 | 
				
			||||||
    flash_protect(FLAG_PROTECT_SET,
 | 
					    flash_protect(FLAG_PROTECT_SET,
 | 
				
			||||||
		  CFG_MONITOR_BASE,
 | 
							  CFG_MONITOR_BASE,
 | 
				
			||||||
		  CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
 | 
							  CFG_MONITOR_BASE+monitor_flash_len-1,
 | 
				
			||||||
		  &flash_info[0]);
 | 
							  &flash_info[0]);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -83,13 +83,13 @@ unsigned long flash_init (void)
 | 
				
			|||||||
	    /* Monitor protection ON by default */
 | 
						    /* Monitor protection ON by default */
 | 
				
			||||||
#if 0	    /* sand: */
 | 
					#if 0	    /* sand: */
 | 
				
			||||||
	    (void)flash_protect(FLAG_PROTECT_SET,
 | 
						    (void)flash_protect(FLAG_PROTECT_SET,
 | 
				
			||||||
				FLASH_BASE0_PRELIM-CFG_MONITOR_LEN+size_b0,
 | 
									FLASH_BASE0_PRELIM-monitor_flash_len+size_b0,
 | 
				
			||||||
				FLASH_BASE0_PRELIM-1+size_b0,
 | 
									FLASH_BASE0_PRELIM-1+size_b0,
 | 
				
			||||||
				&flash_info[0]);
 | 
									&flash_info[0]);
 | 
				
			||||||
#else
 | 
					#else
 | 
				
			||||||
	    (void)flash_protect(FLAG_PROTECT_SET,
 | 
						    (void)flash_protect(FLAG_PROTECT_SET,
 | 
				
			||||||
		      		CFG_MONITOR_BASE,
 | 
							      		CFG_MONITOR_BASE,
 | 
				
			||||||
		      		CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
 | 
							      		CFG_MONITOR_BASE+monitor_flash_len-1,
 | 
				
			||||||
		      		&flash_info[0]);
 | 
							      		&flash_info[0]);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
	    size_b1 = 0 ;
 | 
						    size_b1 = 0 ;
 | 
				
			||||||
@ -132,13 +132,13 @@ unsigned long flash_init (void)
 | 
				
			|||||||
	    /* monitor protection ON by default */
 | 
						    /* monitor protection ON by default */
 | 
				
			||||||
#if 0	    /* sand: */
 | 
					#if 0	    /* sand: */
 | 
				
			||||||
	    (void)flash_protect(FLAG_PROTECT_SET,
 | 
						    (void)flash_protect(FLAG_PROTECT_SET,
 | 
				
			||||||
				FLASH_BASE0_PRELIM-CFG_MONITOR_LEN+size_b0,
 | 
									FLASH_BASE0_PRELIM-monitor_flash_len+size_b0,
 | 
				
			||||||
				FLASH_BASE0_PRELIM-1+size_b0,
 | 
									FLASH_BASE0_PRELIM-1+size_b0,
 | 
				
			||||||
				&flash_info[0]);
 | 
									&flash_info[0]);
 | 
				
			||||||
#else
 | 
					#else
 | 
				
			||||||
	    (void)flash_protect(FLAG_PROTECT_SET,
 | 
						    (void)flash_protect(FLAG_PROTECT_SET,
 | 
				
			||||||
		      		CFG_MONITOR_BASE,
 | 
							      		CFG_MONITOR_BASE,
 | 
				
			||||||
		      		CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
 | 
							      		CFG_MONITOR_BASE+monitor_flash_len-1,
 | 
				
			||||||
		      		&flash_info[0]);
 | 
							      		&flash_info[0]);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -150,12 +150,12 @@ unsigned long flash_init (void)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	      /* monitor protection ON by default */
 | 
						      /* monitor protection ON by default */
 | 
				
			||||||
	      (void)flash_protect(FLAG_PROTECT_SET,
 | 
						      (void)flash_protect(FLAG_PROTECT_SET,
 | 
				
			||||||
				  base_b1+size_b1-CFG_MONITOR_LEN,
 | 
									  base_b1+size_b1-monitor_flash_len,
 | 
				
			||||||
				  base_b1+size_b1-1,
 | 
									  base_b1+size_b1-1,
 | 
				
			||||||
				  &flash_info[1]);
 | 
									  &flash_info[1]);
 | 
				
			||||||
	      /* monitor protection OFF by default (one is enough) */
 | 
						      /* monitor protection OFF by default (one is enough) */
 | 
				
			||||||
	      (void)flash_protect(FLAG_PROTECT_CLEAR,
 | 
						      (void)flash_protect(FLAG_PROTECT_CLEAR,
 | 
				
			||||||
				  base_b0+size_b0-CFG_MONITOR_LEN,
 | 
									  base_b0+size_b0-monitor_flash_len,
 | 
				
			||||||
				  base_b0+size_b0-1,
 | 
									  base_b0+size_b0-1,
 | 
				
			||||||
				  &flash_info[0]);
 | 
									  &flash_info[0]);
 | 
				
			||||||
	    } else {
 | 
						    } else {
 | 
				
			||||||
 | 
				
			|||||||
@ -80,7 +80,7 @@ unsigned long flash_init (void)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	/* monitor protection ON by default */
 | 
						/* monitor protection ON by default */
 | 
				
			||||||
	flash_protect(FLAG_PROTECT_SET,
 | 
						flash_protect(FLAG_PROTECT_SET,
 | 
				
			||||||
		      FLASH_BASE0_PRELIM+size_b0-CFG_MONITOR_LEN,
 | 
							      FLASH_BASE0_PRELIM+size_b0-monitor_flash_len,
 | 
				
			||||||
		      FLASH_BASE0_PRELIM+size_b0-1,
 | 
							      FLASH_BASE0_PRELIM+size_b0-1,
 | 
				
			||||||
		      &flash_info[0]);
 | 
							      &flash_info[0]);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -93,12 +93,12 @@ unsigned long flash_init (void)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
		/* monitor protection ON by default */
 | 
							/* monitor protection ON by default */
 | 
				
			||||||
		flash_protect(FLAG_PROTECT_SET,
 | 
							flash_protect(FLAG_PROTECT_SET,
 | 
				
			||||||
			      FLASH_BASE0_PRELIM+size_b0+size_b1-CFG_MONITOR_LEN,
 | 
								      FLASH_BASE0_PRELIM+size_b0+size_b1-monitor_flash_len,
 | 
				
			||||||
			      FLASH_BASE0_PRELIM+size_b0+size_b1-1,
 | 
								      FLASH_BASE0_PRELIM+size_b0+size_b1-1,
 | 
				
			||||||
			      &flash_info[1]);
 | 
								      &flash_info[1]);
 | 
				
			||||||
                /* monitor protection OFF by default (one is enough) */
 | 
					                /* monitor protection OFF by default (one is enough) */
 | 
				
			||||||
                flash_protect(FLAG_PROTECT_CLEAR,
 | 
					                flash_protect(FLAG_PROTECT_CLEAR,
 | 
				
			||||||
			      FLASH_BASE0_PRELIM+size_b0-CFG_MONITOR_LEN,
 | 
								      FLASH_BASE0_PRELIM+size_b0-monitor_flash_len,
 | 
				
			||||||
			      FLASH_BASE0_PRELIM+size_b0-1,
 | 
								      FLASH_BASE0_PRELIM+size_b0-1,
 | 
				
			||||||
			      &flash_info[0]);
 | 
								      &flash_info[0]);
 | 
				
			||||||
	} else {
 | 
						} else {
 | 
				
			||||||
 | 
				
			|||||||
@ -94,7 +94,7 @@ unsigned long flash_init (void)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	/* monitor protection ON by default */
 | 
						/* monitor protection ON by default */
 | 
				
			||||||
	(void)flash_protect(FLAG_PROTECT_SET,
 | 
						(void)flash_protect(FLAG_PROTECT_SET,
 | 
				
			||||||
			    base_b0+size_b0-CFG_MONITOR_LEN,
 | 
								    base_b0+size_b0-monitor_flash_len,
 | 
				
			||||||
			    base_b0+size_b0-1,
 | 
								    base_b0+size_b0-1,
 | 
				
			||||||
			    &flash_info[0]);
 | 
								    &flash_info[0]);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -106,12 +106,12 @@ unsigned long flash_init (void)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
		/* monitor protection ON by default */
 | 
							/* monitor protection ON by default */
 | 
				
			||||||
		(void)flash_protect(FLAG_PROTECT_SET,
 | 
							(void)flash_protect(FLAG_PROTECT_SET,
 | 
				
			||||||
				    base_b1+size_b1-CFG_MONITOR_LEN,
 | 
									    base_b1+size_b1-monitor_flash_len,
 | 
				
			||||||
				    base_b1+size_b1-1,
 | 
									    base_b1+size_b1-1,
 | 
				
			||||||
				    &flash_info[1]);
 | 
									    &flash_info[1]);
 | 
				
			||||||
                /* monitor protection OFF by default (one is enough) */
 | 
					                /* monitor protection OFF by default (one is enough) */
 | 
				
			||||||
                (void)flash_protect(FLAG_PROTECT_CLEAR,
 | 
					                (void)flash_protect(FLAG_PROTECT_CLEAR,
 | 
				
			||||||
                                    base_b0+size_b0-CFG_MONITOR_LEN,
 | 
					                                    base_b0+size_b0-monitor_flash_len,
 | 
				
			||||||
                                    base_b0+size_b0-1,
 | 
					                                    base_b0+size_b0-1,
 | 
				
			||||||
                                    &flash_info[0]);
 | 
					                                    &flash_info[0]);
 | 
				
			||||||
	} else {
 | 
						} else {
 | 
				
			||||||
 | 
				
			|||||||
@ -74,7 +74,7 @@ unsigned long flash_init (void)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        /* Monitor protection ON by default */
 | 
					        /* Monitor protection ON by default */
 | 
				
			||||||
        (void)flash_protect(FLAG_PROTECT_SET,
 | 
					        (void)flash_protect(FLAG_PROTECT_SET,
 | 
				
			||||||
                            -CFG_MONITOR_LEN,
 | 
					                            -monitor_flash_len,
 | 
				
			||||||
                            0xffffffff,
 | 
					                            0xffffffff,
 | 
				
			||||||
                            &flash_info[0]);
 | 
					                            &flash_info[0]);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -125,7 +125,7 @@ unsigned long flash_init (void)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	/* monitor protection ON by default */
 | 
						/* monitor protection ON by default */
 | 
				
			||||||
	flash_protect (FLAG_PROTECT_SET,
 | 
						flash_protect (FLAG_PROTECT_SET,
 | 
				
			||||||
			base_b0 + size_b0 - CFG_MONITOR_LEN,
 | 
								base_b0 + size_b0 - monitor_flash_len,
 | 
				
			||||||
			base_b0 + size_b0 - 1, &flash_info[0]);
 | 
								base_b0 + size_b0 - 1, &flash_info[0]);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (size_b1) {
 | 
						if (size_b1) {
 | 
				
			||||||
@ -136,11 +136,11 @@ unsigned long flash_init (void)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
		/* monitor protection ON by default */
 | 
							/* monitor protection ON by default */
 | 
				
			||||||
		flash_protect (FLAG_PROTECT_SET,
 | 
							flash_protect (FLAG_PROTECT_SET,
 | 
				
			||||||
				base_b1 + size_b1 - CFG_MONITOR_LEN,
 | 
									base_b1 + size_b1 - monitor_flash_len,
 | 
				
			||||||
				base_b1 + size_b1 - 1, &flash_info[1]);
 | 
									base_b1 + size_b1 - 1, &flash_info[1]);
 | 
				
			||||||
		/* monitor protection OFF by default (one is enough) */
 | 
							/* monitor protection OFF by default (one is enough) */
 | 
				
			||||||
		flash_protect (FLAG_PROTECT_CLEAR,
 | 
							flash_protect (FLAG_PROTECT_CLEAR,
 | 
				
			||||||
				base_b0 + size_b0 - CFG_MONITOR_LEN,
 | 
									base_b0 + size_b0 - monitor_flash_len,
 | 
				
			||||||
				base_b0 + size_b0 - 1, &flash_info[0]);
 | 
									base_b0 + size_b0 - 1, &flash_info[0]);
 | 
				
			||||||
	} else {
 | 
						} else {
 | 
				
			||||||
		flash_info[1].flash_id = FLASH_UNKNOWN;
 | 
							flash_info[1].flash_id = FLASH_UNKNOWN;
 | 
				
			||||||
 | 
				
			|||||||
@ -200,7 +200,7 @@ unsigned long flash_init (void)
 | 
				
			|||||||
#if 0 /* test-only */
 | 
					#if 0 /* test-only */
 | 
				
			||||||
	/* Monitor protection ON by default */
 | 
						/* Monitor protection ON by default */
 | 
				
			||||||
#if (CFG_MONITOR_BASE >= CFG_FLASH_BASE)
 | 
					#if (CFG_MONITOR_BASE >= CFG_FLASH_BASE)
 | 
				
			||||||
	for(i=0; flash_info[0].start[i] < CFG_MONITOR_BASE+CFG_MONITOR_LEN-1; i++)
 | 
						for(i=0; flash_info[0].start[i] < CFG_MONITOR_BASE+monitor_flash_len-1; i++)
 | 
				
			||||||
		(void)flash_real_protect(&flash_info[0], i, 1);
 | 
							(void)flash_real_protect(&flash_info[0], i, 1);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
				
			|||||||
@ -74,7 +74,7 @@ unsigned long flash_init (void)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        /* Monitor protection ON by default */
 | 
					        /* Monitor protection ON by default */
 | 
				
			||||||
        (void)flash_protect(FLAG_PROTECT_SET,
 | 
					        (void)flash_protect(FLAG_PROTECT_SET,
 | 
				
			||||||
                            -CFG_MONITOR_LEN,
 | 
					                            -monitor_flash_len,
 | 
				
			||||||
                            0xffffffff,
 | 
					                            0xffffffff,
 | 
				
			||||||
                            &flash_info[0]);
 | 
					                            &flash_info[0]);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -67,7 +67,7 @@ unsigned long flash_init (void)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        /* Monitor protection ON by default */
 | 
					        /* Monitor protection ON by default */
 | 
				
			||||||
        (void)flash_protect(FLAG_PROTECT_SET,
 | 
					        (void)flash_protect(FLAG_PROTECT_SET,
 | 
				
			||||||
                            -CFG_MONITOR_LEN,
 | 
					                            -monitor_flash_len,
 | 
				
			||||||
                            0xffffffff,
 | 
					                            0xffffffff,
 | 
				
			||||||
                            &flash_info[0]);
 | 
					                            &flash_info[0]);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -94,7 +94,7 @@ unsigned long flash_init (void)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	/* monitor protection ON by default */
 | 
						/* monitor protection ON by default */
 | 
				
			||||||
	flash_protect (FLAG_PROTECT_SET,
 | 
						flash_protect (FLAG_PROTECT_SET,
 | 
				
			||||||
			base_b0 + size_b0 - CFG_MONITOR_LEN,
 | 
								base_b0 + size_b0 - monitor_flash_len,
 | 
				
			||||||
			base_b0 + size_b0 - 1, &flash_info[0]);
 | 
								base_b0 + size_b0 - 1, &flash_info[0]);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (size_b1) {
 | 
						if (size_b1) {
 | 
				
			||||||
@ -105,11 +105,11 @@ unsigned long flash_init (void)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
		/* monitor protection ON by default */
 | 
							/* monitor protection ON by default */
 | 
				
			||||||
		flash_protect (FLAG_PROTECT_SET,
 | 
							flash_protect (FLAG_PROTECT_SET,
 | 
				
			||||||
				base_b1 + size_b1 - CFG_MONITOR_LEN,
 | 
									base_b1 + size_b1 - monitor_flash_len,
 | 
				
			||||||
				base_b1 + size_b1 - 1, &flash_info[1]);
 | 
									base_b1 + size_b1 - 1, &flash_info[1]);
 | 
				
			||||||
		/* monitor protection OFF by default (one is enough) */
 | 
							/* monitor protection OFF by default (one is enough) */
 | 
				
			||||||
		flash_protect (FLAG_PROTECT_CLEAR,
 | 
							flash_protect (FLAG_PROTECT_CLEAR,
 | 
				
			||||||
				base_b0 + size_b0 - CFG_MONITOR_LEN,
 | 
									base_b0 + size_b0 - monitor_flash_len,
 | 
				
			||||||
				base_b0 + size_b0 - 1, &flash_info[0]);
 | 
									base_b0 + size_b0 - 1, &flash_info[0]);
 | 
				
			||||||
	} else {
 | 
						} else {
 | 
				
			||||||
		flash_info[1].flash_id = FLASH_UNKNOWN;
 | 
							flash_info[1].flash_id = FLASH_UNKNOWN;
 | 
				
			||||||
 | 
				
			|||||||
@ -127,7 +127,7 @@ unsigned long flash_init (void)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	/* monitor protection ON by default */
 | 
						/* monitor protection ON by default */
 | 
				
			||||||
	flash_protect (FLAG_PROTECT_SET,
 | 
						flash_protect (FLAG_PROTECT_SET,
 | 
				
			||||||
			base_b0 + size_b0 - CFG_MONITOR_LEN,
 | 
								base_b0 + size_b0 - monitor_flash_len,
 | 
				
			||||||
			base_b0 + size_b0 - 1, &flash_info[0]);
 | 
								base_b0 + size_b0 - 1, &flash_info[0]);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (size_b1) {
 | 
						if (size_b1) {
 | 
				
			||||||
@ -138,11 +138,11 @@ unsigned long flash_init (void)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
		/* monitor protection ON by default */
 | 
							/* monitor protection ON by default */
 | 
				
			||||||
		flash_protect (FLAG_PROTECT_SET,
 | 
							flash_protect (FLAG_PROTECT_SET,
 | 
				
			||||||
				base_b1 + size_b1 - CFG_MONITOR_LEN,
 | 
									base_b1 + size_b1 - monitor_flash_len,
 | 
				
			||||||
				base_b1 + size_b1 - 1, &flash_info[1]);
 | 
									base_b1 + size_b1 - 1, &flash_info[1]);
 | 
				
			||||||
		/* monitor protection OFF by default (one is enough) */
 | 
							/* monitor protection OFF by default (one is enough) */
 | 
				
			||||||
		flash_protect (FLAG_PROTECT_CLEAR,
 | 
							flash_protect (FLAG_PROTECT_CLEAR,
 | 
				
			||||||
				base_b0 + size_b0 - CFG_MONITOR_LEN,
 | 
									base_b0 + size_b0 - monitor_flash_len,
 | 
				
			||||||
				base_b0 + size_b0 - 1, &flash_info[0]);
 | 
									base_b0 + size_b0 - 1, &flash_info[0]);
 | 
				
			||||||
	} else {
 | 
						} else {
 | 
				
			||||||
		flash_info[1].flash_id = FLASH_UNKNOWN;
 | 
							flash_info[1].flash_id = FLASH_UNKNOWN;
 | 
				
			||||||
 | 
				
			|||||||
@ -91,7 +91,7 @@ unsigned long flash_init (void)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        /* Monitor protection ON by default */
 | 
					        /* Monitor protection ON by default */
 | 
				
			||||||
        (void)flash_protect(FLAG_PROTECT_SET,
 | 
					        (void)flash_protect(FLAG_PROTECT_SET,
 | 
				
			||||||
                            -CFG_MONITOR_LEN,
 | 
					                            -monitor_flash_len,
 | 
				
			||||||
                            0xffffffff,
 | 
					                            0xffffffff,
 | 
				
			||||||
                            &flash_info[0]);
 | 
					                            &flash_info[0]);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -104,7 +104,7 @@ unsigned long flash_init (void)
 | 
				
			|||||||
	/* monitor protection ON by default */
 | 
						/* monitor protection ON by default */
 | 
				
			||||||
	(void)flash_protect(FLAG_PROTECT_SET,
 | 
						(void)flash_protect(FLAG_PROTECT_SET,
 | 
				
			||||||
			    CFG_MONITOR_BASE,
 | 
								    CFG_MONITOR_BASE,
 | 
				
			||||||
			    CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
 | 
								    CFG_MONITOR_BASE+monitor_flash_len-1,
 | 
				
			||||||
			    &flash_info[0]);
 | 
								    &flash_info[0]);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -124,7 +124,7 @@ unsigned long flash_init (void)
 | 
				
			|||||||
		/* monitor protection ON by default */
 | 
							/* monitor protection ON by default */
 | 
				
			||||||
		(void)flash_protect(FLAG_PROTECT_SET,
 | 
							(void)flash_protect(FLAG_PROTECT_SET,
 | 
				
			||||||
				    CFG_MONITOR_BASE,
 | 
									    CFG_MONITOR_BASE,
 | 
				
			||||||
				    CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
 | 
									    CFG_MONITOR_BASE+monitor_flash_len-1,
 | 
				
			||||||
				    &flash_info[1]);
 | 
									    &flash_info[1]);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
	} else {
 | 
						} else {
 | 
				
			||||||
 | 
				
			|||||||
@ -91,7 +91,7 @@ unsigned long flash_init (void)
 | 
				
			|||||||
	/* monitor protection ON by default */
 | 
						/* monitor protection ON by default */
 | 
				
			||||||
	flash_protect(FLAG_PROTECT_SET,
 | 
						flash_protect(FLAG_PROTECT_SET,
 | 
				
			||||||
		      CFG_MONITOR_BASE,
 | 
							      CFG_MONITOR_BASE,
 | 
				
			||||||
		      CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
 | 
							      CFG_MONITOR_BASE+monitor_flash_len-1,
 | 
				
			||||||
		      &flash_info[0]);
 | 
							      &flash_info[0]);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -115,7 +115,7 @@ unsigned long flash_init (void)
 | 
				
			|||||||
		/* monitor protection ON by default */
 | 
							/* monitor protection ON by default */
 | 
				
			||||||
		flash_protect(FLAG_PROTECT_SET,
 | 
							flash_protect(FLAG_PROTECT_SET,
 | 
				
			||||||
			      CFG_MONITOR_BASE,
 | 
								      CFG_MONITOR_BASE,
 | 
				
			||||||
			      CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
 | 
								      CFG_MONITOR_BASE+monitor_flash_len-1,
 | 
				
			||||||
			      &flash_info[1]);
 | 
								      &flash_info[1]);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
	} else {
 | 
						} else {
 | 
				
			||||||
 | 
				
			|||||||
@ -112,7 +112,7 @@ unsigned long flash_init (void)
 | 
				
			|||||||
		/* monitor protection ON by default */
 | 
							/* monitor protection ON by default */
 | 
				
			||||||
		flash_protect(FLAG_PROTECT_SET,
 | 
							flash_protect(FLAG_PROTECT_SET,
 | 
				
			||||||
			      CFG_MONITOR_BASE,
 | 
								      CFG_MONITOR_BASE,
 | 
				
			||||||
			      CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
 | 
								      CFG_MONITOR_BASE+monitor_flash_len-1,
 | 
				
			||||||
			      &flash_info[i]);
 | 
								      &flash_info[i]);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -77,7 +77,7 @@ unsigned long flash_init (void)
 | 
				
			|||||||
	/* monitor protection ON by default */
 | 
						/* monitor protection ON by default */
 | 
				
			||||||
	flash_protect(FLAG_PROTECT_SET,
 | 
						flash_protect(FLAG_PROTECT_SET,
 | 
				
			||||||
		      CFG_MONITOR_BASE,
 | 
							      CFG_MONITOR_BASE,
 | 
				
			||||||
		      CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
 | 
							      CFG_MONITOR_BASE+monitor_flash_len-1,
 | 
				
			||||||
		      &flash_info[0]);
 | 
							      &flash_info[0]);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -157,7 +157,7 @@ flash_init (void)
 | 
				
			|||||||
	 */
 | 
						 */
 | 
				
			||||||
	flash_protect(FLAG_PROTECT_SET,
 | 
						flash_protect(FLAG_PROTECT_SET,
 | 
				
			||||||
		      	  CFG_MONITOR_BASE,
 | 
							      	  CFG_MONITOR_BASE,
 | 
				
			||||||
		      	  CFG_MONITOR_BASE + CFG_MONITOR_LEN - 1,
 | 
							      	  CFG_MONITOR_BASE + monitor_flash_len - 1,
 | 
				
			||||||
		      	  &flash_info[0]);
 | 
							      	  &flash_info[0]);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -55,7 +55,7 @@ unsigned long flash_init (void)
 | 
				
			|||||||
	/* Monitor protection ON by default */
 | 
						/* Monitor protection ON by default */
 | 
				
			||||||
	flash_protect(FLAG_PROTECT_SET,
 | 
						flash_protect(FLAG_PROTECT_SET,
 | 
				
			||||||
		      CFG_MONITOR_BASE,
 | 
							      CFG_MONITOR_BASE,
 | 
				
			||||||
		      CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
 | 
							      CFG_MONITOR_BASE+monitor_flash_len-1,
 | 
				
			||||||
		      &flash_info[0]);
 | 
							      &flash_info[0]);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -102,7 +102,7 @@ unsigned long flash_init (void)
 | 
				
			|||||||
	  /* monitor protection ON by default */
 | 
						  /* monitor protection ON by default */
 | 
				
			||||||
	  (void)flash_protect(FLAG_PROTECT_SET,
 | 
						  (void)flash_protect(FLAG_PROTECT_SET,
 | 
				
			||||||
			    CFG_MONITOR_BASE,
 | 
								    CFG_MONITOR_BASE,
 | 
				
			||||||
			    CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
 | 
								    CFG_MONITOR_BASE+monitor_flash_len-1,
 | 
				
			||||||
			    &flash_info[0]);
 | 
								    &flash_info[0]);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -121,7 +121,7 @@ unsigned long flash_init (void)
 | 
				
			|||||||
		/* monitor protection ON by default */
 | 
							/* monitor protection ON by default */
 | 
				
			||||||
		(void)flash_protect(FLAG_PROTECT_SET,
 | 
							(void)flash_protect(FLAG_PROTECT_SET,
 | 
				
			||||||
				    CFG_MONITOR_BASE,
 | 
									    CFG_MONITOR_BASE,
 | 
				
			||||||
				    CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
 | 
									    CFG_MONITOR_BASE+monitor_flash_len-1,
 | 
				
			||||||
				    &flash_info[1]);
 | 
									    &flash_info[1]);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
				
			|||||||
@ -96,7 +96,7 @@ unsigned long flash_init (void)
 | 
				
			|||||||
#if CFG_MONITOR_BASE >= CFG_FLASH0_BASE
 | 
					#if CFG_MONITOR_BASE >= CFG_FLASH0_BASE
 | 
				
			||||||
    flash_protect(FLAG_PROTECT_SET,
 | 
					    flash_protect(FLAG_PROTECT_SET,
 | 
				
			||||||
		  CFG_MONITOR_BASE,
 | 
							  CFG_MONITOR_BASE,
 | 
				
			||||||
		  CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
 | 
							  CFG_MONITOR_BASE+monitor_flash_len-1,
 | 
				
			||||||
		  &flash_info[0]);
 | 
							  &flash_info[0]);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -71,7 +71,7 @@ unsigned long flash_init (void)
 | 
				
			|||||||
	/* monitor protection ON by default */
 | 
						/* monitor protection ON by default */
 | 
				
			||||||
	flash_protect(FLAG_PROTECT_SET,
 | 
						flash_protect(FLAG_PROTECT_SET,
 | 
				
			||||||
		      CFG_MONITOR_BASE,
 | 
							      CFG_MONITOR_BASE,
 | 
				
			||||||
		      CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
 | 
							      CFG_MONITOR_BASE+monitor_flash_len-1,
 | 
				
			||||||
		      &flash_info[0]);
 | 
							      &flash_info[0]);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -321,7 +321,7 @@ flash_init(void)
 | 
				
			|||||||
#if CFG_MONITOR_BASE == CFG_FLASH_BASE
 | 
					#if CFG_MONITOR_BASE == CFG_FLASH_BASE
 | 
				
			||||||
	(void)flash_protect(FLAG_PROTECT_SET,
 | 
						(void)flash_protect(FLAG_PROTECT_SET,
 | 
				
			||||||
		      CFG_MONITOR_BASE,
 | 
							      CFG_MONITOR_BASE,
 | 
				
			||||||
		      CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
 | 
							      CFG_MONITOR_BASE+monitor_flash_len-1,
 | 
				
			||||||
		      &flash_info[0]);
 | 
							      &flash_info[0]);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -104,7 +104,7 @@ unsigned long flash_init (void)
 | 
				
			|||||||
	/* monitor protection ON by default */
 | 
						/* monitor protection ON by default */
 | 
				
			||||||
	flash_protect(FLAG_PROTECT_SET,
 | 
						flash_protect(FLAG_PROTECT_SET,
 | 
				
			||||||
		      CFG_MONITOR_BASE,
 | 
							      CFG_MONITOR_BASE,
 | 
				
			||||||
		      CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
 | 
							      CFG_MONITOR_BASE+monitor_flash_len-1,
 | 
				
			||||||
		      &flash_info[0]);
 | 
							      &flash_info[0]);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -72,7 +72,7 @@ ulong flash_init(void)
 | 
				
			|||||||
     */
 | 
					     */
 | 
				
			||||||
    flash_protect(FLAG_PROTECT_SET,
 | 
					    flash_protect(FLAG_PROTECT_SET,
 | 
				
			||||||
		  CFG_FLASH_BASE,
 | 
							  CFG_FLASH_BASE,
 | 
				
			||||||
		  CFG_FLASH_BASE + _armboot_end_data - _armboot_start,
 | 
							  CFG_FLASH_BASE + monitor_flash_len - 1,
 | 
				
			||||||
		  &flash_info[0]);
 | 
							  &flash_info[0]);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    flash_protect(FLAG_PROTECT_SET,
 | 
					    flash_protect(FLAG_PROTECT_SET,
 | 
				
			||||||
 | 
				
			|||||||
@ -100,7 +100,7 @@ unsigned long flash_init (void)
 | 
				
			|||||||
	/* monitor protection ON by default */
 | 
						/* monitor protection ON by default */
 | 
				
			||||||
	flash_protect(FLAG_PROTECT_SET,
 | 
						flash_protect(FLAG_PROTECT_SET,
 | 
				
			||||||
		      CFG_MONITOR_BASE,
 | 
							      CFG_MONITOR_BASE,
 | 
				
			||||||
		      CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
 | 
							      CFG_MONITOR_BASE+monitor_flash_len-1,
 | 
				
			||||||
		      flash_get_info(CFG_MONITOR_BASE));
 | 
							      flash_get_info(CFG_MONITOR_BASE));
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -90,7 +90,7 @@ unsigned long flash_init (void)
 | 
				
			|||||||
	/* monitor protection ON by default */
 | 
						/* monitor protection ON by default */
 | 
				
			||||||
	flash_protect(FLAG_PROTECT_SET,
 | 
						flash_protect(FLAG_PROTECT_SET,
 | 
				
			||||||
		      CFG_MONITOR_BASE,
 | 
							      CFG_MONITOR_BASE,
 | 
				
			||||||
		      CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
 | 
							      CFG_MONITOR_BASE+monitor_flash_len-1,
 | 
				
			||||||
		      &flash_info[0]);
 | 
							      &flash_info[0]);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -71,7 +71,7 @@ unsigned long flash_init (void)
 | 
				
			|||||||
		/* monitor protection ON by default */
 | 
							/* monitor protection ON by default */
 | 
				
			||||||
		flash_protect(FLAG_PROTECT_SET,
 | 
							flash_protect(FLAG_PROTECT_SET,
 | 
				
			||||||
			      CFG_MONITOR_BASE,
 | 
								      CFG_MONITOR_BASE,
 | 
				
			||||||
			      CFG_MONITOR_BASE + CFG_MONITOR_LEN - 1,
 | 
								      CFG_MONITOR_BASE + monitor_flash_len - 1,
 | 
				
			||||||
			      flash_info + bank);
 | 
								      flash_info + bank);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -87,7 +87,7 @@ unsigned long flash_init (void)
 | 
				
			|||||||
	/* monitor protection ON by default */
 | 
						/* monitor protection ON by default */
 | 
				
			||||||
	flash_protect(FLAG_PROTECT_SET,
 | 
						flash_protect(FLAG_PROTECT_SET,
 | 
				
			||||||
		      CFG_MONITOR_BASE,
 | 
							      CFG_MONITOR_BASE,
 | 
				
			||||||
		      CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
 | 
							      CFG_MONITOR_BASE+monitor_flash_len-1,
 | 
				
			||||||
		      &flash_info[0]);
 | 
							      &flash_info[0]);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -74,7 +74,7 @@ unsigned long flash_init (void)
 | 
				
			|||||||
	/* monitor protection ON by default */
 | 
						/* monitor protection ON by default */
 | 
				
			||||||
	flash_protect(FLAG_PROTECT_SET,
 | 
						flash_protect(FLAG_PROTECT_SET,
 | 
				
			||||||
		      CFG_MONITOR_BASE,
 | 
							      CFG_MONITOR_BASE,
 | 
				
			||||||
		      CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
 | 
							      CFG_MONITOR_BASE+monitor_flash_len-1,
 | 
				
			||||||
		      &flash_info[0]);
 | 
							      &flash_info[0]);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -134,7 +134,7 @@ unsigned long flash_init (void)
 | 
				
			|||||||
	/* monitor protection ON by default */
 | 
						/* monitor protection ON by default */
 | 
				
			||||||
	flash_protect(FLAG_PROTECT_SET,
 | 
						flash_protect(FLAG_PROTECT_SET,
 | 
				
			||||||
		      CFG_MONITOR_BASE,
 | 
							      CFG_MONITOR_BASE,
 | 
				
			||||||
		      CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
 | 
							      CFG_MONITOR_BASE+monitor_flash_len-1,
 | 
				
			||||||
		      &flash_info[0]);
 | 
							      &flash_info[0]);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -166,7 +166,7 @@ unsigned long flash_init (void)
 | 
				
			|||||||
		/* monitor protection ON by default */
 | 
							/* monitor protection ON by default */
 | 
				
			||||||
		flash_protect(FLAG_PROTECT_SET,
 | 
							flash_protect(FLAG_PROTECT_SET,
 | 
				
			||||||
			      CFG_MONITOR_BASE,
 | 
								      CFG_MONITOR_BASE,
 | 
				
			||||||
			      CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
 | 
								      CFG_MONITOR_BASE+monitor_flash_len-1,
 | 
				
			||||||
			      &flash_info[1]);
 | 
								      &flash_info[1]);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -105,7 +105,7 @@ ulong flash_init(void)
 | 
				
			|||||||
     */
 | 
					     */
 | 
				
			||||||
    flash_protect(FLAG_PROTECT_SET,
 | 
					    flash_protect(FLAG_PROTECT_SET,
 | 
				
			||||||
		  CFG_FLASH_BASE,
 | 
							  CFG_FLASH_BASE,
 | 
				
			||||||
		  CFG_FLASH_BASE + _armboot_end_data - _armboot_start,
 | 
							  CFG_FLASH_BASE + monitor_flash_len - 1,
 | 
				
			||||||
		  &flash_info[0]);
 | 
							  &flash_info[0]);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    flash_protect(FLAG_PROTECT_SET,
 | 
					    flash_protect(FLAG_PROTECT_SET,
 | 
				
			||||||
 | 
				
			|||||||
@ -86,7 +86,7 @@ unsigned long flash_init (void)
 | 
				
			|||||||
	 */
 | 
						 */
 | 
				
			||||||
	flash_protect ( FLAG_PROTECT_SET,
 | 
						flash_protect ( FLAG_PROTECT_SET,
 | 
				
			||||||
			CFG_FLASH_BASE,
 | 
								CFG_FLASH_BASE,
 | 
				
			||||||
			CFG_FLASH_BASE + _armboot_end_data - _armboot_start,
 | 
								CFG_FLASH_BASE + monitor_flash_len - 1,
 | 
				
			||||||
			&flash_info[0] );
 | 
								&flash_info[0] );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	flash_protect ( FLAG_PROTECT_SET,
 | 
						flash_protect ( FLAG_PROTECT_SET,
 | 
				
			||||||
 | 
				
			|||||||
@ -123,7 +123,7 @@ unsigned long flash_init (void)
 | 
				
			|||||||
	/* monitor protection ON by default */
 | 
						/* monitor protection ON by default */
 | 
				
			||||||
	flash_protect(FLAG_PROTECT_SET,
 | 
						flash_protect(FLAG_PROTECT_SET,
 | 
				
			||||||
		      CFG_MONITOR_BASE,
 | 
							      CFG_MONITOR_BASE,
 | 
				
			||||||
		      CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
 | 
							      CFG_MONITOR_BASE+monitor_flash_len-1,
 | 
				
			||||||
		      &flash_info[0]);
 | 
							      &flash_info[0]);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -156,7 +156,7 @@ unsigned long flash_init (void)
 | 
				
			|||||||
		/* monitor protection ON by default */
 | 
							/* monitor protection ON by default */
 | 
				
			||||||
		flash_protect(FLAG_PROTECT_SET,
 | 
							flash_protect(FLAG_PROTECT_SET,
 | 
				
			||||||
			      CFG_MONITOR_BASE,
 | 
								      CFG_MONITOR_BASE,
 | 
				
			||||||
			      CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
 | 
								      CFG_MONITOR_BASE+monitor_flash_len-1,
 | 
				
			||||||
			      &flash_info[1]);
 | 
								      &flash_info[1]);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -79,7 +79,7 @@ unsigned long flash_init (void)
 | 
				
			|||||||
    /* monitor protection ON by default */
 | 
					    /* monitor protection ON by default */
 | 
				
			||||||
    flash_protect(FLAG_PROTECT_SET,
 | 
					    flash_protect(FLAG_PROTECT_SET,
 | 
				
			||||||
		  CFG_MONITOR_BASE,
 | 
							  CFG_MONITOR_BASE,
 | 
				
			||||||
		  CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
 | 
							  CFG_MONITOR_BASE+monitor_flash_len-1,
 | 
				
			||||||
		  &flash_info[0]);
 | 
							  &flash_info[0]);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -100,7 +100,7 @@ unsigned long flash_init (void)
 | 
				
			|||||||
	/* monitor protection ON by default */
 | 
						/* monitor protection ON by default */
 | 
				
			||||||
	flash_protect(FLAG_PROTECT_SET,
 | 
						flash_protect(FLAG_PROTECT_SET,
 | 
				
			||||||
		      CFG_MONITOR_BASE,
 | 
							      CFG_MONITOR_BASE,
 | 
				
			||||||
		      CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
 | 
							      CFG_MONITOR_BASE+monitor_flash_len-1,
 | 
				
			||||||
		      &flash_info[0]);
 | 
							      &flash_info[0]);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -101,7 +101,7 @@ unsigned long flash_init (void)
 | 
				
			|||||||
	/* monitor protection ON by default */
 | 
						/* monitor protection ON by default */
 | 
				
			||||||
	flash_protect(FLAG_PROTECT_SET,
 | 
						flash_protect(FLAG_PROTECT_SET,
 | 
				
			||||||
		      CFG_MONITOR_BASE,
 | 
							      CFG_MONITOR_BASE,
 | 
				
			||||||
		      CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
 | 
							      CFG_MONITOR_BASE+monitor_flash_len-1,
 | 
				
			||||||
		      &flash_info[0]);
 | 
							      &flash_info[0]);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -102,7 +102,7 @@ unsigned long flash_init (void)
 | 
				
			|||||||
#if CFG_MONITOR_BASE >= CFG_FLASH_BASE
 | 
					#if CFG_MONITOR_BASE >= CFG_FLASH_BASE
 | 
				
			||||||
	flash_protect(FLAG_PROTECT_SET,
 | 
						flash_protect(FLAG_PROTECT_SET,
 | 
				
			||||||
			CFG_MONITOR_BASE,
 | 
								CFG_MONITOR_BASE,
 | 
				
			||||||
			CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
 | 
								CFG_MONITOR_BASE+monitor_flash_len-1,
 | 
				
			||||||
			&flash_info[0]);
 | 
								&flash_info[0]);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
	size_b1 = 0 ;
 | 
						size_b1 = 0 ;
 | 
				
			||||||
 | 
				
			|||||||
@ -113,7 +113,7 @@ ulong flash_init(void)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    flash_protect(FLAG_PROTECT_SET,
 | 
					    flash_protect(FLAG_PROTECT_SET,
 | 
				
			||||||
		  CFG_FLASH_BASE,
 | 
							  CFG_FLASH_BASE,
 | 
				
			||||||
		  CFG_FLASH_BASE + _armboot_end - _armboot_start,
 | 
							  CFG_FLASH_BASE + monitor_flash_len - 1,
 | 
				
			||||||
		  &flash_info[0]);
 | 
							  &flash_info[0]);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    flash_protect(FLAG_PROTECT_SET,
 | 
					    flash_protect(FLAG_PROTECT_SET,
 | 
				
			||||||
 | 
				
			|||||||
@ -146,11 +146,11 @@ unsigned long flash_init (void)
 | 
				
			|||||||
	flash_info[0].size = size_b0;
 | 
						flash_info[0].size = size_b0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#if CFG_MONITOR_BASE >= CFG_FLASH_BASE
 | 
					#if CFG_MONITOR_BASE >= CFG_FLASH_BASE
 | 
				
			||||||
	DEBUGF("protect monitor %x @ %x\n", CFG_MONITOR_BASE, CFG_MONITOR_LEN);
 | 
						DEBUGF("protect monitor %x @ %x\n", CFG_MONITOR_BASE, monitor_flash_len);
 | 
				
			||||||
	/* monitor protection ON by default */
 | 
						/* monitor protection ON by default */
 | 
				
			||||||
	flash_protect(FLAG_PROTECT_SET,
 | 
						flash_protect(FLAG_PROTECT_SET,
 | 
				
			||||||
		      CFG_MONITOR_BASE,
 | 
							      CFG_MONITOR_BASE,
 | 
				
			||||||
		      CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
 | 
							      CFG_MONITOR_BASE+monitor_flash_len-1,
 | 
				
			||||||
		      &flash_info[0]);
 | 
							      &flash_info[0]);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -171,7 +171,7 @@ unsigned long flash_init (void)
 | 
				
			|||||||
		/* monitor protection ON by default */
 | 
							/* monitor protection ON by default */
 | 
				
			||||||
		flash_protect(FLAG_PROTECT_SET,
 | 
							flash_protect(FLAG_PROTECT_SET,
 | 
				
			||||||
			      CFG_MONITOR_BASE,
 | 
								      CFG_MONITOR_BASE,
 | 
				
			||||||
			      CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
 | 
								      CFG_MONITOR_BASE+monitor_flash_len-1,
 | 
				
			||||||
			      &flash_info[1]);
 | 
								      &flash_info[1]);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -115,7 +115,7 @@ unsigned long flash_init (void)
 | 
				
			|||||||
	/* monitor protection ON by default */
 | 
						/* monitor protection ON by default */
 | 
				
			||||||
	flash_protect(FLAG_PROTECT_SET,
 | 
						flash_protect(FLAG_PROTECT_SET,
 | 
				
			||||||
		      CFG_FLASH_BASE,
 | 
							      CFG_FLASH_BASE,
 | 
				
			||||||
		      CFG_FLASH_BASE+CFG_MONITOR_LEN-1,
 | 
							      CFG_FLASH_BASE+monitor_flash_len-1,
 | 
				
			||||||
		      &flash_info[0]);
 | 
							      &flash_info[0]);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (size_b1) {
 | 
						if (size_b1) {
 | 
				
			||||||
@ -136,7 +136,7 @@ unsigned long flash_init (void)
 | 
				
			|||||||
		/* monitor protection ON by default */
 | 
							/* monitor protection ON by default */
 | 
				
			||||||
		flash_protect(FLAG_PROTECT_SET,
 | 
							flash_protect(FLAG_PROTECT_SET,
 | 
				
			||||||
			      CFG_FLASH_BASE,
 | 
								      CFG_FLASH_BASE,
 | 
				
			||||||
			      CFG_FLASH_BASE+CFG_MONITOR_LEN-1,
 | 
								      CFG_FLASH_BASE+monitor_flash_len-1,
 | 
				
			||||||
			      &flash_info[1]);
 | 
								      &flash_info[1]);
 | 
				
			||||||
	} else {
 | 
						} else {
 | 
				
			||||||
		memctl->memc_br1 = 0;		/* invalidate bank */
 | 
							memctl->memc_br1 = 0;		/* invalidate bank */
 | 
				
			||||||
 | 
				
			|||||||
@ -66,7 +66,7 @@ unsigned long flash_init(void)
 | 
				
			|||||||
	flash_get_offsets(CFG_FLASH_BASE, &flash_info[0]);
 | 
						flash_get_offsets(CFG_FLASH_BASE, &flash_info[0]);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* monitor protection ON by default */
 | 
						/* monitor protection ON by default */
 | 
				
			||||||
	flash_protect(FLAG_PROTECT_SET, CFG_FLASH_BASE, CFG_FLASH_BASE + CFG_MONITOR_LEN - 1, &flash_info[0]);
 | 
						flash_protect(FLAG_PROTECT_SET, CFG_FLASH_BASE, CFG_FLASH_BASE + monitor_flash_len - 1, &flash_info[0]);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	flash_info[0].size = size;
 | 
						flash_info[0].size = size;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -93,7 +93,7 @@ unsigned long flash_init (void)
 | 
				
			|||||||
	/* monitor protection ON by default */
 | 
						/* monitor protection ON by default */
 | 
				
			||||||
	(void)flash_protect(FLAG_PROTECT_SET,
 | 
						(void)flash_protect(FLAG_PROTECT_SET,
 | 
				
			||||||
			    CFG_FLASH_BASE,
 | 
								    CFG_FLASH_BASE,
 | 
				
			||||||
			    CFG_FLASH_BASE+CFG_MONITOR_LEN-1,
 | 
								    CFG_FLASH_BASE+monitor_flash_len-1,
 | 
				
			||||||
			    &flash_info[0]);
 | 
								    &flash_info[0]);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	flash_info[0].size = size_b0;
 | 
						flash_info[0].size = size_b0;
 | 
				
			||||||
 | 
				
			|||||||
@ -69,7 +69,7 @@ unsigned long flash_init (void)
 | 
				
			|||||||
    /* monitor protection ON by default */
 | 
					    /* monitor protection ON by default */
 | 
				
			||||||
    flash_protect(FLAG_PROTECT_SET,
 | 
					    flash_protect(FLAG_PROTECT_SET,
 | 
				
			||||||
		  CFG_MONITOR_BASE,
 | 
							  CFG_MONITOR_BASE,
 | 
				
			||||||
		  CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
 | 
							  CFG_MONITOR_BASE+monitor_flash_len-1,
 | 
				
			||||||
		  &flash_info[0]);
 | 
							  &flash_info[0]);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -70,7 +70,7 @@ unsigned long flash_init (void)
 | 
				
			|||||||
		/* monitor protection ON by default */
 | 
							/* monitor protection ON by default */
 | 
				
			||||||
		flash_protect(FLAG_PROTECT_SET,
 | 
							flash_protect(FLAG_PROTECT_SET,
 | 
				
			||||||
			      CFG_MONITOR_BASE,
 | 
								      CFG_MONITOR_BASE,
 | 
				
			||||||
			      CFG_MONITOR_BASE + CFG_MONITOR_LEN - 1,
 | 
								      CFG_MONITOR_BASE + monitor_flash_len - 1,
 | 
				
			||||||
			      &flash_info[0]);
 | 
								      &flash_info[0]);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -133,7 +133,7 @@ unsigned long flash_init (void)
 | 
				
			|||||||
# if CFG_MONITOR_BASE >= CFG_FLASH0_BASE
 | 
					# if CFG_MONITOR_BASE >= CFG_FLASH0_BASE
 | 
				
			||||||
	flash_protect (FLAG_PROTECT_SET,
 | 
						flash_protect (FLAG_PROTECT_SET,
 | 
				
			||||||
		       CFG_MONITOR_BASE,
 | 
							       CFG_MONITOR_BASE,
 | 
				
			||||||
		       CFG_MONITOR_BASE + CFG_MONITOR_LEN - 1, &flash_info[0]
 | 
							       CFG_MONITOR_BASE + monitor_flash_len - 1, &flash_info[0]
 | 
				
			||||||
	);
 | 
						);
 | 
				
			||||||
# endif
 | 
					# endif
 | 
				
			||||||
#endif	/* CONFIG_BOOT_ROM */
 | 
					#endif	/* CONFIG_BOOT_ROM */
 | 
				
			||||||
 | 
				
			|||||||
@ -201,7 +201,7 @@ unsigned long flash_init (void)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	/* Monitor protection ON by default */
 | 
						/* Monitor protection ON by default */
 | 
				
			||||||
#if (CFG_MONITOR_BASE >= CFG_FLASH_BASE)
 | 
					#if (CFG_MONITOR_BASE >= CFG_FLASH_BASE)
 | 
				
			||||||
	for(i=0; flash_info[0].start[i] < CFG_MONITOR_BASE+CFG_MONITOR_LEN-1; i++)
 | 
						for(i=0; flash_info[0].start[i] < CFG_MONITOR_BASE+monitor_flash_len-1; i++)
 | 
				
			||||||
		(void)flash_real_protect(&flash_info[0], i, 1);
 | 
							(void)flash_real_protect(&flash_info[0], i, 1);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -233,7 +233,7 @@ unsigned long flash_init (void)
 | 
				
			|||||||
	/* monitor protection ON by default */
 | 
						/* monitor protection ON by default */
 | 
				
			||||||
	flash_protect(FLAG_PROTECT_SET,
 | 
						flash_protect(FLAG_PROTECT_SET,
 | 
				
			||||||
		      CFG_MONITOR_BASE,
 | 
							      CFG_MONITOR_BASE,
 | 
				
			||||||
		      CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
 | 
							      CFG_MONITOR_BASE+monitor_flash_len-1,
 | 
				
			||||||
		      flash_get_info(CFG_MONITOR_BASE));
 | 
							      flash_get_info(CFG_MONITOR_BASE));
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -232,6 +232,7 @@ static void programLoad(void)
 | 
				
			|||||||
*/
 | 
					*/
 | 
				
			||||||
void copy_code (ulong dest_addr)
 | 
					void copy_code (ulong dest_addr)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
 | 
						extern long uboot_end_data;
 | 
				
			||||||
	unsigned long start;
 | 
						unsigned long start;
 | 
				
			||||||
	unsigned long end;
 | 
						unsigned long end;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -243,7 +244,7 @@ void copy_code (ulong dest_addr)
 | 
				
			|||||||
	 */
 | 
						 */
 | 
				
			||||||
	copyLongs((ulong *)CFG_MONITOR_BASE,
 | 
						copyLongs((ulong *)CFG_MONITOR_BASE,
 | 
				
			||||||
		  (ulong *)dest_addr,
 | 
							  (ulong *)dest_addr,
 | 
				
			||||||
		  (CFG_MONITOR_LEN + 3) / 4);
 | 
							  ((ulong)&uboot_end_data - CFG_MONITOR_BASE + 3) / 4);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* flush caches
 | 
						/* flush caches
 | 
				
			||||||
 | 
				
			|||||||
@ -107,7 +107,7 @@ unsigned long flash_init (void)
 | 
				
			|||||||
	/* monitor protection ON by default */
 | 
						/* monitor protection ON by default */
 | 
				
			||||||
	(void) flash_protect (FLAG_PROTECT_SET,
 | 
						(void) flash_protect (FLAG_PROTECT_SET,
 | 
				
			||||||
				CFG_FLASH_BASE,
 | 
									CFG_FLASH_BASE,
 | 
				
			||||||
				CFG_FLASH_BASE + CFG_MONITOR_LEN - 1,
 | 
									CFG_FLASH_BASE + monitor_flash_len - 1,
 | 
				
			||||||
				&flash_info[0]);
 | 
									&flash_info[0]);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -67,7 +67,7 @@ unsigned long flash_init (void)
 | 
				
			|||||||
#if CFG_MONITOR_BASE >= CFG_FLASH0_BASE
 | 
					#if CFG_MONITOR_BASE >= CFG_FLASH0_BASE
 | 
				
			||||||
    flash_protect(FLAG_PROTECT_SET,
 | 
					    flash_protect(FLAG_PROTECT_SET,
 | 
				
			||||||
		  CFG_MONITOR_BASE,
 | 
							  CFG_MONITOR_BASE,
 | 
				
			||||||
		  CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
 | 
							  CFG_MONITOR_BASE+monitor_flash_len-1,
 | 
				
			||||||
		  &flash_info[0]);
 | 
							  &flash_info[0]);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -123,11 +123,11 @@ unsigned long flash_init (void)
 | 
				
			|||||||
#if CFG_MONITOR_BASE >= PHYS_FLASH
 | 
					#if CFG_MONITOR_BASE >= PHYS_FLASH
 | 
				
			||||||
	flash_protect(FLAG_PROTECT_SET,
 | 
						flash_protect(FLAG_PROTECT_SET,
 | 
				
			||||||
		      CFG_MONITOR_BASE,
 | 
							      CFG_MONITOR_BASE,
 | 
				
			||||||
		      CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
 | 
							      CFG_MONITOR_BASE+monitor_flash_len-1,
 | 
				
			||||||
		      &flash_info[0]);
 | 
							      &flash_info[0]);
 | 
				
			||||||
	flash_protect(FLAG_PROTECT_SET,
 | 
						flash_protect(FLAG_PROTECT_SET,
 | 
				
			||||||
		      CFG_MONITOR_BASE,
 | 
							      CFG_MONITOR_BASE,
 | 
				
			||||||
		      CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
 | 
							      CFG_MONITOR_BASE+monitor_flash_len-1,
 | 
				
			||||||
		      &flash_info[1]);
 | 
							      &flash_info[1]);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -69,7 +69,7 @@ unsigned long flash_init (void)
 | 
				
			|||||||
	/* monitor protection ON by default */
 | 
						/* monitor protection ON by default */
 | 
				
			||||||
	flash_protect(FLAG_PROTECT_SET,
 | 
						flash_protect(FLAG_PROTECT_SET,
 | 
				
			||||||
		      CFG_MONITOR_BASE,
 | 
							      CFG_MONITOR_BASE,
 | 
				
			||||||
		      CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
 | 
							      CFG_MONITOR_BASE+monitor_flash_len-1,
 | 
				
			||||||
		      &flash_info[0]);
 | 
							      &flash_info[0]);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -86,7 +86,7 @@ unsigned long flash_init (void)
 | 
				
			|||||||
		/* monitor protection ON by default */
 | 
							/* monitor protection ON by default */
 | 
				
			||||||
		flash_protect(FLAG_PROTECT_SET,
 | 
							flash_protect(FLAG_PROTECT_SET,
 | 
				
			||||||
			      CFG_MONITOR_BASE,
 | 
								      CFG_MONITOR_BASE,
 | 
				
			||||||
			      CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
 | 
								      CFG_MONITOR_BASE+monitor_flash_len-1,
 | 
				
			||||||
			      &flash_info[1]);
 | 
								      &flash_info[1]);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -228,7 +228,7 @@ flash_init(void)
 | 
				
			|||||||
#if CFG_MONITOR_BASE >= CFG_FLASH_BASE
 | 
					#if CFG_MONITOR_BASE >= CFG_FLASH_BASE
 | 
				
			||||||
    flash_protect(FLAG_PROTECT_SET,
 | 
					    flash_protect(FLAG_PROTECT_SET,
 | 
				
			||||||
		CFG_MONITOR_BASE,
 | 
							CFG_MONITOR_BASE,
 | 
				
			||||||
		CFG_MONITOR_BASE + CFG_MONITOR_LEN - 1,
 | 
							CFG_MONITOR_BASE + monitor_flash_len - 1,
 | 
				
			||||||
		&flash_info[0]);
 | 
							&flash_info[0]);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -63,7 +63,7 @@ unsigned long flash_init (void)
 | 
				
			|||||||
#if CFG_MONITOR_BASE >= CFG_FLASH0_BASE
 | 
					#if CFG_MONITOR_BASE >= CFG_FLASH0_BASE
 | 
				
			||||||
    flash_protect(FLAG_PROTECT_SET,
 | 
					    flash_protect(FLAG_PROTECT_SET,
 | 
				
			||||||
		  CFG_MONITOR_BASE,
 | 
							  CFG_MONITOR_BASE,
 | 
				
			||||||
		  CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
 | 
							  CFG_MONITOR_BASE+monitor_flash_len-1,
 | 
				
			||||||
		  &flash_info[0]);
 | 
							  &flash_info[0]);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -124,7 +124,7 @@ ulong flash_init(void)
 | 
				
			|||||||
#else
 | 
					#else
 | 
				
			||||||
    flash_protect(FLAG_PROTECT_SET,
 | 
					    flash_protect(FLAG_PROTECT_SET,
 | 
				
			||||||
		  CFG_FLASH_BASE,
 | 
							  CFG_FLASH_BASE,
 | 
				
			||||||
		  CFG_FLASH_BASE + _armboot_end_data - _armboot_start,
 | 
							  CFG_FLASH_BASE + monitor_flash_len - 1,
 | 
				
			||||||
		  &flash_info[0]);
 | 
							  &flash_info[0]);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    flash_protect(FLAG_PROTECT_SET,
 | 
					    flash_protect(FLAG_PROTECT_SET,
 | 
				
			||||||
 | 
				
			|||||||
@ -87,7 +87,7 @@ unsigned long flash_init (void)
 | 
				
			|||||||
	/* monitor protection ON by default */
 | 
						/* monitor protection ON by default */
 | 
				
			||||||
	flash_protect(FLAG_PROTECT_SET,
 | 
						flash_protect(FLAG_PROTECT_SET,
 | 
				
			||||||
		      CFG_MONITOR_BASE,
 | 
							      CFG_MONITOR_BASE,
 | 
				
			||||||
		      CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
 | 
							      CFG_MONITOR_BASE+monitor_flash_len-1,
 | 
				
			||||||
		      &flash_info[0]);
 | 
							      &flash_info[0]);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -106,7 +106,7 @@ unsigned long flash_init (void)
 | 
				
			|||||||
		/* monitor protection ON by default */
 | 
							/* monitor protection ON by default */
 | 
				
			||||||
		flash_protect(FLAG_PROTECT_SET,
 | 
							flash_protect(FLAG_PROTECT_SET,
 | 
				
			||||||
			      CFG_MONITOR_BASE,
 | 
								      CFG_MONITOR_BASE,
 | 
				
			||||||
			      CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
 | 
								      CFG_MONITOR_BASE+monitor_flash_len-1,
 | 
				
			||||||
			      &flash_info[1]);
 | 
								      &flash_info[1]);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
	} else {
 | 
						} else {
 | 
				
			||||||
 | 
				
			|||||||
@ -204,7 +204,7 @@ unsigned long flash_init (void)
 | 
				
			|||||||
#if CFG_MONITOR_BASE >= CFG_FLASH0_BASE
 | 
					#if CFG_MONITOR_BASE >= CFG_FLASH0_BASE
 | 
				
			||||||
	flash_protect (FLAG_PROTECT_SET,
 | 
						flash_protect (FLAG_PROTECT_SET,
 | 
				
			||||||
		       CFG_MONITOR_BASE,
 | 
							       CFG_MONITOR_BASE,
 | 
				
			||||||
		       CFG_MONITOR_BASE + CFG_MONITOR_LEN - 1, &flash_info[0]);
 | 
							       CFG_MONITOR_BASE + monitor_flash_len - 1, &flash_info[0]);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#if (CFG_ENV_IS_IN_FLASH == 1) && defined(CFG_ENV_ADDR)
 | 
					#if (CFG_ENV_IS_IN_FLASH == 1) && defined(CFG_ENV_ADDR)
 | 
				
			||||||
 | 
				
			|||||||
@ -148,7 +148,7 @@ unsigned long flash_init (void)
 | 
				
			|||||||
	/* monitor protection ON by default */
 | 
						/* monitor protection ON by default */
 | 
				
			||||||
	flash_protect(FLAG_PROTECT_SET,
 | 
						flash_protect(FLAG_PROTECT_SET,
 | 
				
			||||||
		      PCU_MONITOR_BASE,
 | 
							      PCU_MONITOR_BASE,
 | 
				
			||||||
		      PCU_MONITOR_BASE+CFG_MONITOR_LEN-1,
 | 
							      PCU_MONITOR_BASE+monitor_flash_len-1,
 | 
				
			||||||
		      &flash_info[0]);
 | 
							      &flash_info[0]);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifdef	CFG_ENV_IS_IN_FLASH
 | 
					#ifdef	CFG_ENV_IS_IN_FLASH
 | 
				
			||||||
 | 
				
			|||||||
@ -100,7 +100,7 @@ unsigned long flash_init (void)
 | 
				
			|||||||
	/* monitor protection ON by default */
 | 
						/* monitor protection ON by default */
 | 
				
			||||||
	flash_protect(FLAG_PROTECT_SET,
 | 
						flash_protect(FLAG_PROTECT_SET,
 | 
				
			||||||
		      CFG_MONITOR_BASE,
 | 
							      CFG_MONITOR_BASE,
 | 
				
			||||||
		      CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
 | 
							      CFG_MONITOR_BASE+monitor_flash_len-1,
 | 
				
			||||||
		      &flash_info[0]);
 | 
							      &flash_info[0]);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -93,7 +93,7 @@ ulong flash_init (void)
 | 
				
			|||||||
	 */
 | 
						 */
 | 
				
			||||||
	flash_protect ( FLAG_PROTECT_SET,
 | 
						flash_protect ( FLAG_PROTECT_SET,
 | 
				
			||||||
			CFG_FLASH_BASE,
 | 
								CFG_FLASH_BASE,
 | 
				
			||||||
			CFG_FLASH_BASE + _armboot_end_data - _armboot_start,
 | 
								CFG_FLASH_BASE + monitor_flash_len - 1,
 | 
				
			||||||
			&flash_info[0]);
 | 
								&flash_info[0]);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	flash_protect ( FLAG_PROTECT_SET,
 | 
						flash_protect ( FLAG_PROTECT_SET,
 | 
				
			||||||
 | 
				
			|||||||
@ -113,7 +113,7 @@ ulong flash_init(void)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    flash_protect(FLAG_PROTECT_SET,
 | 
					    flash_protect(FLAG_PROTECT_SET,
 | 
				
			||||||
		  CFG_FLASH_BASE,
 | 
							  CFG_FLASH_BASE,
 | 
				
			||||||
		  CFG_FLASH_BASE + _armboot_end_data - _armboot_start,
 | 
							  CFG_FLASH_BASE + monitor_flash_len - 1,
 | 
				
			||||||
		  &flash_info[0]);
 | 
							  &flash_info[0]);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    flash_protect(FLAG_PROTECT_SET,
 | 
					    flash_protect(FLAG_PROTECT_SET,
 | 
				
			||||||
 | 
				
			|||||||
@ -149,7 +149,7 @@ unsigned long flash_init (void)
 | 
				
			|||||||
	/* monitor protection ON by default */
 | 
						/* monitor protection ON by default */
 | 
				
			||||||
	flash_protect(FLAG_PROTECT_SET,
 | 
						flash_protect(FLAG_PROTECT_SET,
 | 
				
			||||||
		      CFG_MONITOR_BASE,
 | 
							      CFG_MONITOR_BASE,
 | 
				
			||||||
		      CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
 | 
							      CFG_MONITOR_BASE+monitor_flash_len-1,
 | 
				
			||||||
		      &flash_info[0]);
 | 
							      &flash_info[0]);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -176,7 +176,7 @@ unsigned long flash_init (void)
 | 
				
			|||||||
		/* monitor protection ON by default */
 | 
							/* monitor protection ON by default */
 | 
				
			||||||
		flash_protect(FLAG_PROTECT_SET,
 | 
							flash_protect(FLAG_PROTECT_SET,
 | 
				
			||||||
			      CFG_MONITOR_BASE,
 | 
								      CFG_MONITOR_BASE,
 | 
				
			||||||
			      CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
 | 
								      CFG_MONITOR_BASE+monitor_flash_len-1,
 | 
				
			||||||
			      &flash_info[1]);
 | 
								      &flash_info[1]);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -204,7 +204,7 @@ unsigned long flash_init (void)
 | 
				
			|||||||
#if CFG_MONITOR_BASE >= CFG_FLASH0_BASE
 | 
					#if CFG_MONITOR_BASE >= CFG_FLASH0_BASE
 | 
				
			||||||
	flash_protect (FLAG_PROTECT_SET,
 | 
						flash_protect (FLAG_PROTECT_SET,
 | 
				
			||||||
		       CFG_MONITOR_BASE,
 | 
							       CFG_MONITOR_BASE,
 | 
				
			||||||
		       CFG_MONITOR_BASE + CFG_MONITOR_LEN - 1, &flash_info[0]);
 | 
							       CFG_MONITOR_BASE + monitor_flash_len - 1, &flash_info[0]);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#if (CFG_ENV_IS_IN_FLASH == 1) && defined(CFG_ENV_ADDR)
 | 
					#if (CFG_ENV_IS_IN_FLASH == 1) && defined(CFG_ENV_ADDR)
 | 
				
			||||||
 | 
				
			|||||||
@ -88,7 +88,7 @@ unsigned long flash_init (void)
 | 
				
			|||||||
	/* monitor protection ON by default */
 | 
						/* monitor protection ON by default */
 | 
				
			||||||
	flash_protect(FLAG_PROTECT_SET,
 | 
						flash_protect(FLAG_PROTECT_SET,
 | 
				
			||||||
		      CFG_MONITOR_BASE,
 | 
							      CFG_MONITOR_BASE,
 | 
				
			||||||
		      CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
 | 
							      CFG_MONITOR_BASE+monitor_flash_len-1,
 | 
				
			||||||
		      &flash_info[0]);
 | 
							      &flash_info[0]);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -113,7 +113,7 @@ unsigned long flash_init (void)
 | 
				
			|||||||
		/* monitor protection ON by default */
 | 
							/* monitor protection ON by default */
 | 
				
			||||||
		flash_protect(FLAG_PROTECT_SET,
 | 
							flash_protect(FLAG_PROTECT_SET,
 | 
				
			||||||
			      CFG_MONITOR_BASE,
 | 
								      CFG_MONITOR_BASE,
 | 
				
			||||||
			      CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
 | 
								      CFG_MONITOR_BASE+monitor_flash_len-1,
 | 
				
			||||||
			      &flash_info[1]);
 | 
								      &flash_info[1]);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -99,7 +99,7 @@ ulong flash_init (void)
 | 
				
			|||||||
	 */
 | 
						 */
 | 
				
			||||||
	flash_protect ( FLAG_PROTECT_SET,
 | 
						flash_protect ( FLAG_PROTECT_SET,
 | 
				
			||||||
			CFG_FLASH_BASE,
 | 
								CFG_FLASH_BASE,
 | 
				
			||||||
			CFG_FLASH_BASE + _armboot_end_data - _armboot_start,
 | 
								CFG_FLASH_BASE + monitor_flash_len - 1,
 | 
				
			||||||
			&flash_info[0]);
 | 
								&flash_info[0]);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	flash_protect ( FLAG_PROTECT_SET,
 | 
						flash_protect ( FLAG_PROTECT_SET,
 | 
				
			||||||
 | 
				
			|||||||
@ -145,7 +145,7 @@ unsigned long flash_init(void)
 | 
				
			|||||||
     */
 | 
					     */
 | 
				
			||||||
#if CFG_MONITOR_BASE >= CFG_FLASH_BASE
 | 
					#if CFG_MONITOR_BASE >= CFG_FLASH_BASE
 | 
				
			||||||
     flash_protect(FLAG_PROTECT_SET, CFG_MONITOR_BASE,
 | 
					     flash_protect(FLAG_PROTECT_SET, CFG_MONITOR_BASE,
 | 
				
			||||||
              CFG_MONITOR_BASE + CFG_MONITOR_LEN - 1, &flash_info[0]);
 | 
					              CFG_MONITOR_BASE + monitor_flash_len - 1, &flash_info[0]);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#if (CFG_ENV_IS_IN_FLASH == 1) && defined(CFG_ENV_ADDR)
 | 
					#if (CFG_ENV_IS_IN_FLASH == 1) && defined(CFG_ENV_ADDR)
 | 
				
			||||||
 | 
				
			|||||||
@ -79,7 +79,7 @@ unsigned long flash_init (void)
 | 
				
			|||||||
	/* monitor protection ON by default */
 | 
						/* monitor protection ON by default */
 | 
				
			||||||
	flash_protect(FLAG_PROTECT_SET,
 | 
						flash_protect(FLAG_PROTECT_SET,
 | 
				
			||||||
		      CFG_MONITOR_BASE,
 | 
							      CFG_MONITOR_BASE,
 | 
				
			||||||
		      CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
 | 
							      CFG_MONITOR_BASE+monitor_flash_len-1,
 | 
				
			||||||
		      &flash_info[0]);
 | 
							      &flash_info[0]);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -83,7 +83,7 @@ unsigned long flash_init (void)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    /* Monitor protection ON by default */
 | 
					    /* Monitor protection ON by default */
 | 
				
			||||||
    (void)flash_protect(FLAG_PROTECT_SET,
 | 
					    (void)flash_protect(FLAG_PROTECT_SET,
 | 
				
			||||||
                        base_b0 + size_b0 - CFG_MONITOR_LEN,
 | 
					                        base_b0 + size_b0 - monitor_flash_len,
 | 
				
			||||||
                        base_b0 + size_b0 - 1,
 | 
					                        base_b0 + size_b0 - 1,
 | 
				
			||||||
                        &flash_info[0]);
 | 
					                        &flash_info[0]);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -92,7 +92,7 @@ unsigned long flash_init (void)
 | 
				
			|||||||
	    /* Monitor protection ON by default */
 | 
						    /* Monitor protection ON by default */
 | 
				
			||||||
	    (void)flash_protect(FLAG_PROTECT_SET,
 | 
						    (void)flash_protect(FLAG_PROTECT_SET,
 | 
				
			||||||
				FLASH_BASE0_PRELIM,
 | 
									FLASH_BASE0_PRELIM,
 | 
				
			||||||
				FLASH_BASE0_PRELIM+CFG_MONITOR_LEN-1,
 | 
									FLASH_BASE0_PRELIM+monitor_flash_len-1,
 | 
				
			||||||
				&flash_info[0]);
 | 
									&flash_info[0]);
 | 
				
			||||||
	    size_b1 = 0 ;
 | 
						    size_b1 = 0 ;
 | 
				
			||||||
	    flash_info[0].size = size_b0;
 | 
						    flash_info[0].size = size_b0;
 | 
				
			||||||
@ -133,7 +133,7 @@ unsigned long flash_init (void)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	    /* monitor protection ON by default */
 | 
						    /* monitor protection ON by default */
 | 
				
			||||||
	    (void)flash_protect(FLAG_PROTECT_SET,
 | 
						    (void)flash_protect(FLAG_PROTECT_SET,
 | 
				
			||||||
				base_b0+size_b0-CFG_MONITOR_LEN,
 | 
									base_b0+size_b0-monitor_flash_len,
 | 
				
			||||||
				base_b0+size_b0-1,
 | 
									base_b0+size_b0-1,
 | 
				
			||||||
				&flash_info[0]);
 | 
									&flash_info[0]);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -145,12 +145,12 @@ unsigned long flash_init (void)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	      /* monitor protection ON by default */
 | 
						      /* monitor protection ON by default */
 | 
				
			||||||
	      (void)flash_protect(FLAG_PROTECT_SET,
 | 
						      (void)flash_protect(FLAG_PROTECT_SET,
 | 
				
			||||||
				  base_b1+size_b1-CFG_MONITOR_LEN,
 | 
									  base_b1+size_b1-monitor_flash_len,
 | 
				
			||||||
				  base_b1+size_b1-1,
 | 
									  base_b1+size_b1-1,
 | 
				
			||||||
				  &flash_info[1]);
 | 
									  &flash_info[1]);
 | 
				
			||||||
	      /* monitor protection OFF by default (one is enough) */
 | 
						      /* monitor protection OFF by default (one is enough) */
 | 
				
			||||||
	      (void)flash_protect(FLAG_PROTECT_CLEAR,
 | 
						      (void)flash_protect(FLAG_PROTECT_CLEAR,
 | 
				
			||||||
				  base_b0+size_b0-CFG_MONITOR_LEN,
 | 
									  base_b0+size_b0-monitor_flash_len,
 | 
				
			||||||
				  base_b0+size_b0-1,
 | 
									  base_b0+size_b0-1,
 | 
				
			||||||
				  &flash_info[0]);
 | 
									  &flash_info[0]);
 | 
				
			||||||
	    } else {
 | 
						    } else {
 | 
				
			||||||
 | 
				
			|||||||
@ -135,7 +135,7 @@ ulong flash_init (void)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	flash_protect (FLAG_PROTECT_SET,
 | 
						flash_protect (FLAG_PROTECT_SET,
 | 
				
			||||||
				   CFG_FLASH_BASE,
 | 
									   CFG_FLASH_BASE,
 | 
				
			||||||
				   CFG_FLASH_BASE + _armboot_end_data - _armboot_start,
 | 
									   CFG_FLASH_BASE + monitor_flash_len - 1,
 | 
				
			||||||
				   &flash_info[0]);
 | 
									   &flash_info[0]);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	flash_protect (FLAG_PROTECT_SET,
 | 
						flash_protect (FLAG_PROTECT_SET,
 | 
				
			||||||
 | 
				
			|||||||
@ -130,7 +130,7 @@ unsigned long flash_init (void)
 | 
				
			|||||||
	/* monitor protection ON by default */
 | 
						/* monitor protection ON by default */
 | 
				
			||||||
	flash_protect(FLAG_PROTECT_SET,
 | 
						flash_protect(FLAG_PROTECT_SET,
 | 
				
			||||||
		      CFG_MONITOR_BASE,
 | 
							      CFG_MONITOR_BASE,
 | 
				
			||||||
		      CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
 | 
							      CFG_MONITOR_BASE+monitor_flash_len-1,
 | 
				
			||||||
		      &flash_info[0]);
 | 
							      &flash_info[0]);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -162,7 +162,7 @@ unsigned long flash_init (void)
 | 
				
			|||||||
		/* monitor protection ON by default */
 | 
							/* monitor protection ON by default */
 | 
				
			||||||
		flash_protect(FLAG_PROTECT_SET,
 | 
							flash_protect(FLAG_PROTECT_SET,
 | 
				
			||||||
			      CFG_MONITOR_BASE,
 | 
								      CFG_MONITOR_BASE,
 | 
				
			||||||
			      CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
 | 
								      CFG_MONITOR_BASE+monitor_flash_len-1,
 | 
				
			||||||
			      &flash_info[1]);
 | 
								      &flash_info[1]);
 | 
				
			||||||
# endif
 | 
					# endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -68,6 +68,7 @@
 | 
				
			|||||||
	GOT_ENTRY(_end_of_vectors)
 | 
						GOT_ENTRY(_end_of_vectors)
 | 
				
			||||||
	GOT_ENTRY(transfer_to_handler)
 | 
						GOT_ENTRY(transfer_to_handler)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						GOT_ENTRY(__init_end)
 | 
				
			||||||
	GOT_ENTRY(_end)
 | 
						GOT_ENTRY(_end)
 | 
				
			||||||
	GOT_ENTRY(__bss_start)
 | 
						GOT_ENTRY(__bss_start)
 | 
				
			||||||
	END_GOT
 | 
						END_GOT
 | 
				
			||||||
@ -590,8 +591,8 @@ relocate_code:
 | 
				
			|||||||
	mr	r3,  r5				/* Destination Address	*/
 | 
						mr	r3,  r5				/* Destination Address	*/
 | 
				
			||||||
	lis	r4, CFG_MONITOR_BASE@h		/* Source      Address	*/
 | 
						lis	r4, CFG_MONITOR_BASE@h		/* Source      Address	*/
 | 
				
			||||||
	ori	r4, r4, CFG_MONITOR_BASE@l
 | 
						ori	r4, r4, CFG_MONITOR_BASE@l
 | 
				
			||||||
	lis	r5, CFG_MONITOR_LEN@h		/* Length in Bytes	*/
 | 
						lwz	r5, GOT(__init_end)
 | 
				
			||||||
	ori	r5, r5, CFG_MONITOR_LEN@l
 | 
						sub	r5, r5, r4
 | 
				
			||||||
	li	r6, CFG_CACHELINE_SIZE		/* Cache Line Size	*/
 | 
						li	r6, CFG_CACHELINE_SIZE		/* Cache Line Size	*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/*
 | 
						/*
 | 
				
			||||||
@ -617,8 +618,8 @@ relocate_code:
 | 
				
			|||||||
	mr	r3, r10				/* Destination Address	*/
 | 
						mr	r3, r10				/* Destination Address	*/
 | 
				
			||||||
	lis	r4, CFG_MONITOR_BASE@h		/* Source      Address	*/
 | 
						lis	r4, CFG_MONITOR_BASE@h		/* Source      Address	*/
 | 
				
			||||||
	ori	r4, r4, CFG_MONITOR_BASE@l
 | 
						ori	r4, r4, CFG_MONITOR_BASE@l
 | 
				
			||||||
	lis	r5, CFG_MONITOR_LEN@h		/* Length in Bytes	*/
 | 
						lwz	r5, GOT(__init_end)
 | 
				
			||||||
	ori	r5, r5, CFG_MONITOR_LEN@l
 | 
						sub	r5, r5, r4
 | 
				
			||||||
	li	r6, CFG_CACHELINE_SIZE		/* Cache Line Size	*/
 | 
						li	r6, CFG_CACHELINE_SIZE		/* Cache Line Size	*/
 | 
				
			||||||
#else
 | 
					#else
 | 
				
			||||||
	cmplw	cr1,r3,r4
 | 
						cmplw	cr1,r3,r4
 | 
				
			||||||
@ -738,12 +739,6 @@ in_ram:
 | 
				
			|||||||
	/* not reached - end relocate_code */
 | 
						/* not reached - end relocate_code */
 | 
				
			||||||
/*-----------------------------------------------------------------------*/
 | 
					/*-----------------------------------------------------------------------*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* Problems accessing "end" in C, so do it here */
 | 
					 | 
				
			||||||
	.globl	get_endaddr
 | 
					 | 
				
			||||||
get_endaddr:
 | 
					 | 
				
			||||||
	lwz	r3,GOT(_end)
 | 
					 | 
				
			||||||
	blr
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	/*
 | 
						/*
 | 
				
			||||||
	 * Copy exception vector code to low memory
 | 
						 * Copy exception vector code to low memory
 | 
				
			||||||
	 *
 | 
						 *
 | 
				
			||||||
 | 
				
			|||||||
@ -302,7 +302,8 @@ relocate_code:
 | 
				
			|||||||
	sub	t6, gp, t6		/* t6 <-- relocation offset	*/
 | 
						sub	t6, gp, t6		/* t6 <-- relocation offset	*/
 | 
				
			||||||
	
 | 
						
 | 
				
			||||||
	li	t0, CFG_MONITOR_BASE
 | 
						li	t0, CFG_MONITOR_BASE
 | 
				
			||||||
	add	t2, t0, CFG_MONITOR_LEN
 | 
						la	t3, in_ram
 | 
				
			||||||
 | 
						lw	t2, -12(t3)	/* t2 <-- uboot_end_data	*/
 | 
				
			||||||
	move	t1, a2
 | 
						move	t1, a2
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/*
 | 
						/*
 | 
				
			||||||
 | 
				
			|||||||
@ -66,6 +66,7 @@
 | 
				
			|||||||
	GOT_ENTRY(_end_of_vectors)
 | 
						GOT_ENTRY(_end_of_vectors)
 | 
				
			||||||
	GOT_ENTRY(transfer_to_handler)
 | 
						GOT_ENTRY(transfer_to_handler)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						GOT_ENTRY(__init_end)
 | 
				
			||||||
	GOT_ENTRY(_end)
 | 
						GOT_ENTRY(_end)
 | 
				
			||||||
	GOT_ENTRY(__bss_start)
 | 
						GOT_ENTRY(__bss_start)
 | 
				
			||||||
	END_GOT
 | 
						END_GOT
 | 
				
			||||||
@ -432,8 +433,8 @@ relocate_code:
 | 
				
			|||||||
	mr	r3,  r5				/* Destination Address	*/
 | 
						mr	r3,  r5				/* Destination Address	*/
 | 
				
			||||||
	lis	r4, CFG_MONITOR_BASE@h		/* Source      Address	*/
 | 
						lis	r4, CFG_MONITOR_BASE@h		/* Source      Address	*/
 | 
				
			||||||
	ori	r4, r4, CFG_MONITOR_BASE@l
 | 
						ori	r4, r4, CFG_MONITOR_BASE@l
 | 
				
			||||||
	lis	r5, CFG_MONITOR_LEN@h		/* Length in Bytes	*/
 | 
						lwz	r5, GOT(__init_end)
 | 
				
			||||||
	ori	r5, r5, CFG_MONITOR_LEN@l
 | 
						sub	r5, r5, r4
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/*
 | 
						/*
 | 
				
			||||||
	 * Fix GOT pointer:
 | 
						 * Fix GOT pointer:
 | 
				
			||||||
@ -544,12 +545,6 @@ clear_bss:
 | 
				
			|||||||
	mr	r4, r10		/* Destination Address		*/
 | 
						mr	r4, r10		/* Destination Address		*/
 | 
				
			||||||
	bl	board_init_r
 | 
						bl	board_init_r
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* Problems accessing "end" in C, so do it here */
 | 
					 | 
				
			||||||
	.globl	get_endaddr
 | 
					 | 
				
			||||||
get_endaddr:
 | 
					 | 
				
			||||||
	lwz	r3,GOT(_end)
 | 
					 | 
				
			||||||
	blr
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	/*
 | 
						/*
 | 
				
			||||||
	 * Copy exception vector code to low memory
 | 
						 * Copy exception vector code to low memory
 | 
				
			||||||
	 *
 | 
						 *
 | 
				
			||||||
 | 
				
			|||||||
@ -73,6 +73,7 @@
 | 
				
			|||||||
	GOT_ENTRY(_end_of_vectors)
 | 
						GOT_ENTRY(_end_of_vectors)
 | 
				
			||||||
	GOT_ENTRY(transfer_to_handler)
 | 
						GOT_ENTRY(transfer_to_handler)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						GOT_ENTRY(__init_end)
 | 
				
			||||||
	GOT_ENTRY(_end)
 | 
						GOT_ENTRY(_end)
 | 
				
			||||||
	GOT_ENTRY(__bss_start)
 | 
						GOT_ENTRY(__bss_start)
 | 
				
			||||||
#if defined(CONFIG_FADS)
 | 
					#if defined(CONFIG_FADS)
 | 
				
			||||||
@ -549,8 +550,8 @@ relocate_code:
 | 
				
			|||||||
	lis	r4, CFG_MONITOR_BASE@h		/* Source      Address	*/
 | 
						lis	r4, CFG_MONITOR_BASE@h		/* Source      Address	*/
 | 
				
			||||||
	ori	r4, r4, CFG_MONITOR_BASE@l
 | 
						ori	r4, r4, CFG_MONITOR_BASE@l
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
	lis	r5, CFG_MONITOR_LEN@h		/* Length in Bytes	*/
 | 
						lwz	r5, GOT(__init_end)
 | 
				
			||||||
	ori	r5, r5, CFG_MONITOR_LEN@l
 | 
						sub	r5, r5, r4
 | 
				
			||||||
	li	r6, CFG_CACHELINE_SIZE		/* Cache Line Size	*/
 | 
						li	r6, CFG_CACHELINE_SIZE		/* Cache Line Size	*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/*
 | 
						/*
 | 
				
			||||||
@ -683,12 +684,6 @@ clear_bss:
 | 
				
			|||||||
	mr	r4, r10		/* Destination Address		*/
 | 
						mr	r4, r10		/* Destination Address		*/
 | 
				
			||||||
	bl	board_init_r
 | 
						bl	board_init_r
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* Problems accessing "end" in C, so do it here */
 | 
					 | 
				
			||||||
	.globl	get_endaddr
 | 
					 | 
				
			||||||
get_endaddr:
 | 
					 | 
				
			||||||
	lwz	r3,GOT(_end)
 | 
					 | 
				
			||||||
	blr
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	/*
 | 
						/*
 | 
				
			||||||
	 * Copy exception vector code to low memory
 | 
						 * Copy exception vector code to low memory
 | 
				
			||||||
	 *
 | 
						 *
 | 
				
			||||||
 | 
				
			|||||||
@ -66,6 +66,7 @@
 | 
				
			|||||||
	GOT_ENTRY(_end_of_vectors)
 | 
						GOT_ENTRY(_end_of_vectors)
 | 
				
			||||||
	GOT_ENTRY(transfer_to_handler)
 | 
						GOT_ENTRY(transfer_to_handler)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						GOT_ENTRY(__init_end)
 | 
				
			||||||
	GOT_ENTRY(_end)
 | 
						GOT_ENTRY(_end)
 | 
				
			||||||
	GOT_ENTRY(__bss_start)
 | 
						GOT_ENTRY(__bss_start)
 | 
				
			||||||
#if defined(CONFIG_HYMOD)
 | 
					#if defined(CONFIG_HYMOD)
 | 
				
			||||||
@ -863,8 +864,8 @@ relocate_code:
 | 
				
			|||||||
	mr	r3,  r5				/* Destination Address	*/
 | 
						mr	r3,  r5				/* Destination Address	*/
 | 
				
			||||||
	lis	r4, CFG_MONITOR_BASE@h		/* Source      Address	*/
 | 
						lis	r4, CFG_MONITOR_BASE@h		/* Source      Address	*/
 | 
				
			||||||
	ori	r4, r4, CFG_MONITOR_BASE@l
 | 
						ori	r4, r4, CFG_MONITOR_BASE@l
 | 
				
			||||||
	lis	r5, CFG_MONITOR_LEN@h		/* Length in Bytes	*/
 | 
						lwz	r5, GOT(__init_end)
 | 
				
			||||||
	ori	r5, r5, CFG_MONITOR_LEN@l
 | 
						sub	r5, r5, r4
 | 
				
			||||||
	li	r6, CFG_CACHELINE_SIZE		/* Cache Line Size	*/
 | 
						li	r6, CFG_CACHELINE_SIZE		/* Cache Line Size	*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/*
 | 
						/*
 | 
				
			||||||
@ -1016,12 +1017,6 @@ clear_bss:
 | 
				
			|||||||
	mr	r4, r10		/* Destination Address		*/
 | 
						mr	r4, r10		/* Destination Address		*/
 | 
				
			||||||
	bl	board_init_r
 | 
						bl	board_init_r
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* Problems accessing "end" in C, so do it here */
 | 
					 | 
				
			||||||
	.globl	get_endaddr
 | 
					 | 
				
			||||||
get_endaddr:
 | 
					 | 
				
			||||||
	lwz	r3,GOT(_end)
 | 
					 | 
				
			||||||
	blr
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	/*
 | 
						/*
 | 
				
			||||||
	 * Copy exception vector code to low memory
 | 
						 * Copy exception vector code to low memory
 | 
				
			||||||
	 *
 | 
						 *
 | 
				
			||||||
 | 
				
			|||||||
@ -73,6 +73,7 @@
 | 
				
			|||||||
	GOT_ENTRY(_end_of_vectors)
 | 
						GOT_ENTRY(_end_of_vectors)
 | 
				
			||||||
	GOT_ENTRY(transfer_to_handler)
 | 
						GOT_ENTRY(transfer_to_handler)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						GOT_ENTRY(__init_end)
 | 
				
			||||||
	GOT_ENTRY(_end)
 | 
						GOT_ENTRY(_end)
 | 
				
			||||||
	GOT_ENTRY(__bss_start)
 | 
						GOT_ENTRY(__bss_start)
 | 
				
			||||||
#if defined(CONFIG_FADS) || defined(CONFIG_ICU862)
 | 
					#if defined(CONFIG_FADS) || defined(CONFIG_ICU862)
 | 
				
			||||||
@ -568,8 +569,8 @@ relocate_code:
 | 
				
			|||||||
	mr	r3,  r5				/* Destination Address	*/
 | 
						mr	r3,  r5				/* Destination Address	*/
 | 
				
			||||||
	lis	r4, CFG_MONITOR_BASE@h		/* Source      Address	*/
 | 
						lis	r4, CFG_MONITOR_BASE@h		/* Source      Address	*/
 | 
				
			||||||
	ori	r4, r4, CFG_MONITOR_BASE@l
 | 
						ori	r4, r4, CFG_MONITOR_BASE@l
 | 
				
			||||||
	lis	r5, CFG_MONITOR_LEN@h		/* Length in Bytes	*/
 | 
						lwz	r5, GOT(__init_end)
 | 
				
			||||||
	ori	r5, r5, CFG_MONITOR_LEN@l
 | 
						sub	r5, r5, r4
 | 
				
			||||||
	li	r6, CFG_CACHELINE_SIZE		/* Cache Line Size	*/
 | 
						li	r6, CFG_CACHELINE_SIZE		/* Cache Line Size	*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/*
 | 
						/*
 | 
				
			||||||
@ -711,12 +712,6 @@ clear_bss:
 | 
				
			|||||||
	mr	r4, r10		/* Destination Address		*/
 | 
						mr	r4, r10		/* Destination Address		*/
 | 
				
			||||||
	bl	board_init_r
 | 
						bl	board_init_r
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* Problems accessing "end" in C, so do it here */
 | 
					 | 
				
			||||||
	.globl	get_endaddr
 | 
					 | 
				
			||||||
get_endaddr:
 | 
					 | 
				
			||||||
	lwz	r3,GOT(_end)
 | 
					 | 
				
			||||||
	blr
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	/*
 | 
						/*
 | 
				
			||||||
	 * Copy exception vector code to low memory
 | 
						 * Copy exception vector code to low memory
 | 
				
			||||||
	 *
 | 
						 *
 | 
				
			||||||
 | 
				
			|||||||
Some files were not shown because too many files have changed in this diff Show More
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user