mpc83xx: remove redundant MPC83xx_RESET #define
PATCH 1/1 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 <[email protected]>
--- arch/powerpc/cpu/mpc83xx/cpu.c | 24 ------------------------ include/mpc83xx.h | 5 ----- 2 files changed, 29 deletions(-)
arch/powerpc/cpu/mpc83xx/cpu.c +0 -24
@@ -126,16 +126,10 @@ int do_reset (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) {ulong msr; -#ifndef MPC83xx_RESET -ulong addr; -#endif -volatile immap_t *immap = (immap_t *)CONFIG_SYS_IMMR ;puts ("Resetting the board.\n" ); -#ifdef MPC83xx_RESET -/* Interrupts and MMU off */ msr =mfmsr (); msr &= ~(MSR_EE |MSR_IR |MSR_DR );
@@ -155,24 +149,6 @@ do_reset (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])/* perform reset, only one bit */ 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; }#endif
include/mpc83xx.h +0 -5
@@ -12,11 +12,6 @@#include <asm/e300.h> #endif -/* -* MPC83xx cpu provide RCR register to do reset thing specially -*/ -#define MPC83xx_RESET -/* * System reset offset (PowerPC standard) */
Signature · 1 line
2.23.0
PATCH 1/1 mpc83xx: remove redundant MPC83xx_RESET #define
Quoted 5 lines · Rasmus Villemoes
This macro is only used (tested for existence) in
mpc83xx.c, which unconditionally includesmpc83xx.hwhere it is unconditionally defined. Removing it makes the remaining code easier to read.Signed-off-by Rasmus Villemoes <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 659 bytes Desc: not available URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200520/b22965c3/attachment.sig>