summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2017-03-28 16:27:27 (GMT)
committerTom Rini <trini@konsulko.com>2017-04-05 17:55:06 (GMT)
commitd891ab95c2086503f1bfca4c34af35cb64dfab1f (patch)
treec301dbc312999e95b302bfde9c03649e7fb8076c
parent727e94a4ac9662d2e9e7ae8b4136013d6cd0832b (diff)
downloadu-boot-fsl-qoriq-d891ab95c2086503f1bfca4c34af35cb64dfab1f.tar.xz
board_f: powerpc: Move prt_83xx_rsr() to private code
This function is called just before checkcpu() on MPX83xx. Move it to the code for that arch. Signed-off-by: Simon Glass <sjg@chromium.org>
-rw-r--r--arch/powerpc/cpu/mpc83xx/cpu.c5
-rw-r--r--arch/powerpc/cpu/mpc83xx/cpu_init.c1
-rw-r--r--arch/powerpc/include/asm/processor.h2
-rw-r--r--common/board_f.c3
-rw-r--r--include/common.h2
5 files changed, 8 insertions, 5 deletions
diff --git a/arch/powerpc/cpu/mpc83xx/cpu.c b/arch/powerpc/cpu/mpc83xx/cpu.c
index c87f0fd..cb82621 100644
--- a/arch/powerpc/cpu/mpc83xx/cpu.c
+++ b/arch/powerpc/cpu/mpc83xx/cpu.c
@@ -33,6 +33,7 @@ int checkcpu(void)
u32 pvr = get_pvr();
u32 spridr;
char buf[32];
+ int ret;
int i;
const struct cpu_type {
@@ -61,6 +62,10 @@ int checkcpu(void)
immr = (immap_t *)CONFIG_SYS_IMMR;
+ ret = prt_83xx_rsr();
+ if (ret)
+ return ret;
+
puts("CPU: ");
switch (pvr & 0xffff0000) {
diff --git a/arch/powerpc/cpu/mpc83xx/cpu_init.c b/arch/powerpc/cpu/mpc83xx/cpu_init.c
index 3a0916b..2a9db0c 100644
--- a/arch/powerpc/cpu/mpc83xx/cpu_init.c
+++ b/arch/powerpc/cpu/mpc83xx/cpu_init.c
@@ -8,6 +8,7 @@
#include <mpc83xx.h>
#include <ioports.h>
#include <asm/io.h>
+#include <asm/processor.h>
#ifdef CONFIG_USB_EHCI_FSL
#include <usb/ehci-ci.h>
#endif
diff --git a/arch/powerpc/include/asm/processor.h b/arch/powerpc/include/asm/processor.h
index 81bae6f..c032726 100644
--- a/arch/powerpc/include/asm/processor.h
+++ b/arch/powerpc/include/asm/processor.h
@@ -1354,6 +1354,8 @@ void ll_puts(const char *);
/* In misc.c */
void _nmask_and_or_msr(unsigned long nmask, unsigned long or_val);
+int prt_83xx_rsr(void);
+
#endif /* ndef ASSEMBLY*/
#ifdef CONFIG_MACH_SPECIFIC
diff --git a/common/board_f.c b/common/board_f.c
index b53f1b6..6995f74 100644
--- a/common/board_f.c
+++ b/common/board_f.c
@@ -849,9 +849,6 @@ static const init_fnc_t init_sequence_f[] = {
prt_8260_rsr,
prt_8260_clks,
#endif /* CONFIG_MPC8260 */
-#if defined(CONFIG_MPC83xx)
- prt_83xx_rsr,
-#endif
#if defined(CONFIG_PPC) || defined(CONFIG_M68K) || defined(CONFIG_SH)
checkcpu,
#endif
diff --git a/include/common.h b/include/common.h
index 75e70ae..2e02709 100644
--- a/include/common.h
+++ b/include/common.h
@@ -712,8 +712,6 @@ ulong cpu_init_f(void);
int cpu_init_r (void);
#if defined(CONFIG_MPC8260)
int prt_8260_rsr (void);
-#elif defined(CONFIG_MPC83xx)
-int prt_83xx_rsr (void);
#endif
/* $(CPU)/interrupts.c */