]> git.sur5r.net Git - u-boot/commitdiff
board_f: powerpc: Move prt_83xx_rsr() to private code
authorSimon Glass <sjg@chromium.org>
Tue, 28 Mar 2017 16:27:27 +0000 (10:27 -0600)
committerTom Rini <trini@konsulko.com>
Wed, 5 Apr 2017 17:55:06 +0000 (13:55 -0400)
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>
arch/powerpc/cpu/mpc83xx/cpu.c
arch/powerpc/cpu/mpc83xx/cpu_init.c
arch/powerpc/include/asm/processor.h
common/board_f.c
include/common.h

index c87f0fdd29f58e0be1b222b13623f3f050c40bdc..cb82621ec4672af796a711215a7a87ec78f1bc9f 100644 (file)
@@ -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) {
index 3a0916bdbf55d4d945a82427d998b8597a977bc1..2a9db0c51b8908ee5ad231d5ef04a02e7b1e43f9 100644 (file)
@@ -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
index 81bae6f00896506c9f4a28f39a88dbbde411e9c1..c032726df1545d78b072802d8740f287a0dad80a 100644 (file)
@@ -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
index b53f1b663aa22a6eb83d997e2bab005510e8c10a..6995f741a64dbd1a28357fd61fd97bad5cdb8582 100644 (file)
@@ -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
index 75e70ae8ea80b5dbd3d5cb1c65e28693184cce6c..2e02709c660a6eba97df5766b0d0e0856f51773f 100644 (file)
@@ -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 */