mirror of
				https://github.com/smaeul/u-boot.git
				synced 2025-11-03 21:48:15 +00:00 
			
		
		
		
	mpc83xx: remove redundant MPC83xx_RESET #define
This macro is only used (tested for existence) in mpc83xx.c, which unconditionally includes mpc83xx.h where it is unconditionally defined. Removing it makes the remaining code easier to read. Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
This commit is contained in:
		
							parent
							
								
									c2279d784e
								
							
						
					
					
						commit
						e2e3ea8916
					
				@ -127,16 +127,10 @@ int checkcpu(void)
 | 
				
			|||||||
int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 | 
					int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	ulong msr;
 | 
						ulong msr;
 | 
				
			||||||
#ifndef MPC83xx_RESET
 | 
					 | 
				
			||||||
	ulong addr;
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	volatile immap_t *immap = (immap_t *) CONFIG_SYS_IMMR;
 | 
						volatile immap_t *immap = (immap_t *) CONFIG_SYS_IMMR;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	puts("Resetting the board.\n");
 | 
						puts("Resetting the board.\n");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifdef MPC83xx_RESET
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	/* Interrupts and MMU off */
 | 
						/* Interrupts and MMU off */
 | 
				
			||||||
	msr = mfmsr();
 | 
						msr = mfmsr();
 | 
				
			||||||
	msr &= ~(MSR_EE | MSR_IR | MSR_DR);
 | 
						msr &= ~(MSR_EE | MSR_IR | MSR_DR);
 | 
				
			||||||
@ -156,24 +150,6 @@ int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 | 
				
			|||||||
	/* perform reset, only one bit */
 | 
						/* perform reset, only one bit */
 | 
				
			||||||
	immap->reset.rcr = RCR_SWHR;
 | 
						immap->reset.rcr = RCR_SWHR;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#else	/* ! MPC83xx_RESET */
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	immap->reset.rmr = RMR_CSRE;    /* Checkstop Reset enable */
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	/* Interrupts and MMU off */
 | 
					 | 
				
			||||||
	msr = mfmsr();
 | 
					 | 
				
			||||||
	msr &= ~(MSR_ME | MSR_EE | MSR_IR | MSR_DR);
 | 
					 | 
				
			||||||
	mtmsr(msr);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	/*
 | 
					 | 
				
			||||||
	 * Trying to execute the next instruction at a non-existing address
 | 
					 | 
				
			||||||
	 * should cause a machine check, resulting in reset
 | 
					 | 
				
			||||||
	 */
 | 
					 | 
				
			||||||
	addr = CONFIG_SYS_RESET_ADDRESS;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	((void (*)(void)) addr) ();
 | 
					 | 
				
			||||||
#endif	/* MPC83xx_RESET */
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	return 1;
 | 
						return 1;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
				
			|||||||
@ -12,11 +12,6 @@
 | 
				
			|||||||
#include <asm/e300.h>
 | 
					#include <asm/e300.h>
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*
 | 
					 | 
				
			||||||
 * MPC83xx cpu provide RCR register to do reset thing specially
 | 
					 | 
				
			||||||
 */
 | 
					 | 
				
			||||||
#define MPC83xx_RESET
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 * System reset offset (PowerPC standard)
 | 
					 * System reset offset (PowerPC standard)
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user