diff options
author | Christophe Leroy <christophe.leroy@c-s.fr> | 2017-07-13 15:09:54 +0200 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2017-07-22 22:22:49 -0400 |
commit | f3603b438283aa3e47b7bc564ded4b75c6ccf051 (patch) | |
tree | 6230a611264cdcbf20c18fb87e41bd392be4f5c8 /arch/powerpc/cpu | |
parent | f1cd73674ff19e62c69c942f23abb061c0a26072 (diff) |
powerpc: Remove unneccessary #ifdefs in reginfo
reginfo command is calling mpc8xx_reginfo(), mpc85xx_reginfo()
or mpc86xx_reginfo() based on CONFIG_ symbol.
As those 3 functions can't me defined at the same time, let's
rename them print_reginfo() to avoid the #ifdefs
The name is kept generic as it is not at all dependent on
powerpc arch and any other arch could want to also print
such information.
In addition, as the Makefile compiles cmd/reginfo.c only when
CONFIG_CMD_REGINFO is set, there is no need to enclose the U_BOOT_CMD
definition inside a #ifdef CONFIG_CMD_REGINFO
Lets all remove the #ifdefs around the U_BOOT_CMD as this
file is only compiled when CONFIG_CMD_REGINFO is defined
Finally, this is a PowerPC-only command, disable it on a number of
non-PowerPC platforms.
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'arch/powerpc/cpu')
-rw-r--r-- | arch/powerpc/cpu/mpc85xx/cpu.c | 3 | ||||
-rw-r--r-- | arch/powerpc/cpu/mpc86xx/cpu.c | 3 | ||||
-rw-r--r-- | arch/powerpc/cpu/mpc8xx/reginfo.c | 3 |
3 files changed, 6 insertions, 3 deletions
diff --git a/arch/powerpc/cpu/mpc85xx/cpu.c b/arch/powerpc/cpu/mpc85xx/cpu.c index e3ef4ae816..b3de164bd8 100644 --- a/arch/powerpc/cpu/mpc85xx/cpu.c +++ b/arch/powerpc/cpu/mpc85xx/cpu.c @@ -23,6 +23,7 @@ #include <post.h> #include <asm/processor.h> #include <fsl_ddr_sdram.h> +#include <asm/ppc.h> DECLARE_GLOBAL_DATA_PTR; @@ -384,7 +385,7 @@ int cpu_mmc_init(bd_t *bis) * Currently prints out LAWs, BR0/OR0 for LBC, CSPR/CSOR/Timing * parameters for IFC and TLBs */ -void mpc85xx_reginfo(void) +void print_reginfo(void) { print_tlbcam(); print_laws(); diff --git a/arch/powerpc/cpu/mpc86xx/cpu.c b/arch/powerpc/cpu/mpc86xx/cpu.c index 7a9570c8ec..a02e872862 100644 --- a/arch/powerpc/cpu/mpc86xx/cpu.c +++ b/arch/powerpc/cpu/mpc86xx/cpu.c @@ -13,6 +13,7 @@ #include <asm/mmu.h> #include <mpc86xx.h> #include <asm/fsl_law.h> +#include <asm/ppc.h> DECLARE_GLOBAL_DATA_PTR; @@ -160,7 +161,7 @@ watchdog_reset(void) * Print out the state of various machine registers. * Currently prints out LAWs, BR0/OR0, and BATs */ -void mpc86xx_reginfo(void) +void print_reginfo(void) { print_bats(); print_laws(); diff --git a/arch/powerpc/cpu/mpc8xx/reginfo.c b/arch/powerpc/cpu/mpc8xx/reginfo.c index 1ba4d22bdd..277d2753b2 100644 --- a/arch/powerpc/cpu/mpc8xx/reginfo.c +++ b/arch/powerpc/cpu/mpc8xx/reginfo.c @@ -8,8 +8,9 @@ #include <common.h> #include <mpc8xx.h> #include <asm/io.h> +#include <asm/ppc.h> -void mpc8xx_reginfo(void) +void print_reginfo(void) { immap_t __iomem *immap = (immap_t __iomem *)CONFIG_SYS_IMMR; memctl8xx_t __iomem *memctl = &immap->im_memctl; |