summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRasmus Villemoes <rasmus.villemoes@prevas.dk>2020-05-05 00:21:18 +0200
committerTom Rini <trini@konsulko.com>2020-05-19 14:01:47 -0400
commite2e3ea891649f3a34e2ace974d47022c0ad7e314 (patch)
treee4aae95c32c04437e77f7776c6677fb3297bd5d6
parentc2279d784e35fa25ee3a9fa28a74a1ba545f8c1e (diff)
downloadu-boot-e2e3ea891649f3a34e2ace974d47022c0ad7e314.tar.gz
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>
-rw-r--r--arch/powerpc/cpu/mpc83xx/cpu.c24
-rw-r--r--include/mpc83xx.h5
2 files changed, 0 insertions, 29 deletions
diff --git a/arch/powerpc/cpu/mpc83xx/cpu.c b/arch/powerpc/cpu/mpc83xx/cpu.c
index cefbcf6e81..49c75a0e50 100644
--- a/arch/powerpc/cpu/mpc83xx/cpu.c
+++ b/arch/powerpc/cpu/mpc83xx/cpu.c
@@ -127,16 +127,10 @@ int checkcpu(void)
int do_reset(struct cmd_tbl *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);
@@ -156,24 +150,6 @@ int do_reset(struct cmd_tbl *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
diff --git a/include/mpc83xx.h b/include/mpc83xx.h
index c2a185321a..ea67868ea0 100644
--- a/include/mpc83xx.h
+++ b/include/mpc83xx.h
@@ -13,11 +13,6 @@
#endif
/*
- * MPC83xx cpu provide RCR register to do reset thing specially
- */
-#define MPC83xx_RESET
-
-/*
* System reset offset (PowerPC standard)
*/
#define EXC_OFF_SYS_RESET 0x0100