diff options
| author | wdenk <wdenk> | 2003-06-27 21:31:46 +0000 | 
|---|---|---|
| committer | wdenk <wdenk> | 2003-06-27 21:31:46 +0000 | 
| commit | 8bde7f776c77b343aca29b8c7b58464d915ac245 (patch) | |
| tree | 20f1fd99975215e7c658454a15cdb4ed4694e2d4 /cpu/mpc5xx/cpu.c | |
| parent | 993cad9364c6b87ae429d1ed1130d8153f6f027e (diff) | |
| download | olio-uboot-2014.01-8bde7f776c77b343aca29b8c7b58464d915ac245.tar.xz olio-uboot-2014.01-8bde7f776c77b343aca29b8c7b58464d915ac245.zip | |
* Code cleanup:LABEL_2003_06_27_2340
  - remove trailing white space, trailing empty lines, C++ comments, etc.
  - split cmd_boot.c (separate cmd_bdinfo.c and cmd_load.c)
* Patches by Kenneth Johansson, 25 Jun 2003:
  - major rework of command structure
    (work done mostly by Michal Cendrowski and Joakim Kristiansen)
Diffstat (limited to 'cpu/mpc5xx/cpu.c')
| -rw-r--r-- | cpu/mpc5xx/cpu.c | 41 | 
1 files changed, 20 insertions, 21 deletions
| diff --git a/cpu/mpc5xx/cpu.c b/cpu/mpc5xx/cpu.c index 5b3bd26b4..cc695118e 100644 --- a/cpu/mpc5xx/cpu.c +++ b/cpu/mpc5xx/cpu.c @@ -17,15 +17,15 @@   *   * You should have received a copy of the GNU General Public License   * along with this program; if not, write to the Free Software - * Foundation,  + * Foundation,   */  /*   * File:		cpu.c - *  - * Discription:		Some cpu specific function for watchdog,  + * + * Discription:		Some cpu specific function for watchdog,   *                      cpu version test, clock setting ... - *  + *   */ @@ -74,7 +74,7 @@ int checkcpu (void)  }  /* - * Called by macro WATCHDOG_RESET  + * Called by macro WATCHDOG_RESET   */  #if defined(CONFIG_WATCHDOG)  void watchdog_reset (void) @@ -93,7 +93,7 @@ void reset_5xx_watchdog (volatile immap_t * immr)  {  	/* Use the MPC5xx Internal Watchdog */  	immr->im_siu_conf.sc_swsr = 0x556c;	/* Prevent SW time-out */ -	immr->im_siu_conf.sc_swsr = 0xaa39;     +	immr->im_siu_conf.sc_swsr = 0xaa39;  }  #endif /* CONFIG_WATCHDOG */ @@ -124,32 +124,31 @@ unsigned long get_tbclk (void)  /* - * Reset board  + * Reset board   */  int do_reset (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])  {  	ulong addr; -	 +  	/* Interrupts off, enable reset */ -        __asm__ volatile	("  mtspr	81, %r0		\n\t" +	__asm__ volatile	("  mtspr	81, %r0		\n\t"  				 "  mfmsr	%r3		\n\t"  				 "  rlwinm	%r31,%r3,0,25,23\n\t"  				 "  mtmsr	%r31		\n\t"); -        /* -         * Trying to execute the next instruction at a non-existing address -         * should cause a machine check, resulting in reset -         */ +	/* +	 * Trying to execute the next instruction at a non-existing address +	 * should cause a machine check, resulting in reset +	 */  #ifdef CFG_RESET_ADDRESS -        addr = CFG_RESET_ADDRESS; +	addr = CFG_RESET_ADDRESS;  #else -        /* -         * note: when CFG_MONITOR_BASE points to a RAM address, CFG_MONITOR_BASE         * - sizeof (ulong) is usually a valid address. Better pick an address -         * known to be invalid on your system and assign it to CFG_RESET_ADDRESS. -         * "(ulong)-1" used to be a good choice for many systems... -         */ -        addr = CFG_MONITOR_BASE - sizeof (ulong); +	/* +	 * note: when CFG_MONITOR_BASE points to a RAM address, CFG_MONITOR_BASE         * - sizeof (ulong) is usually a valid address. Better pick an address +	 * known to be invalid on your system and assign it to CFG_RESET_ADDRESS. +	 * "(ulong)-1" used to be a good choice for many systems... +	 */ +	addr = CFG_MONITOR_BASE - sizeof (ulong);  #endif  	((void (*) (void)) addr) ();  	return 1;  } - |