diff options
author | Tom Rini <trini@konsulko.com> | 2019-05-21 07:13:35 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2019-05-21 07:13:35 -0400 |
commit | e1a2ed7180adeefb6164239a18249dca5701319d (patch) | |
tree | 4a9d085f3154fb848c9ccfc391d87f39fd43c29f /arch/powerpc/cpu/mpc83xx/spl_minimal.c | |
parent | ffbad25b3221fd1b0cd0aff1128d57fcb279e020 (diff) | |
parent | d494cdb97e18a30214d0414376d4eacdf82224fe (diff) |
Merge git://git.denx.de/u-boot-mpc83xx
- Update MPC83xx platform support to current best practices, etc.
Diffstat (limited to 'arch/powerpc/cpu/mpc83xx/spl_minimal.c')
-rw-r--r-- | arch/powerpc/cpu/mpc83xx/spl_minimal.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/arch/powerpc/cpu/mpc83xx/spl_minimal.c b/arch/powerpc/cpu/mpc83xx/spl_minimal.c index 746f1febba..133f7abc31 100644 --- a/arch/powerpc/cpu/mpc83xx/spl_minimal.c +++ b/arch/powerpc/cpu/mpc83xx/spl_minimal.c @@ -6,6 +6,9 @@ #include <common.h> #include <mpc83xx.h> +#include "lblaw/lblaw.h" +#include "elbc/elbc.h" + DECLARE_GLOBAL_DATA_PTR; /* @@ -24,16 +27,16 @@ void cpu_init_f (volatile immap_t * im) /* system performance tweaking */ -#ifdef CONFIG_SYS_ACR_PIPE_DEP +#ifndef CONFIG_ACR_PIPE_DEP_UNSET /* Arbiter pipeline depth */ im->arbiter.acr = (im->arbiter.acr & ~ACR_PIPE_DEP) | - (CONFIG_SYS_ACR_PIPE_DEP << ACR_PIPE_DEP_SHIFT); + CONFIG_ACR_PIPE_DEP; #endif -#ifdef CONFIG_SYS_ACR_RPTCNT +#ifndef CONFIG_ACR_RPTCNT_UNSET /* Arbiter repeat count */ im->arbiter.acr = (im->arbiter.acr & ~(ACR_RPTCNT)) | - (CONFIG_SYS_ACR_RPTCNT << ACR_RPTCNT_SHIFT); + CONFIG_ACR_RPTCNT; #endif #ifdef CONFIG_SYS_SPCR_OPT @@ -89,3 +92,11 @@ void puts(const char *str) while (*str) putc(*str++); } + +ulong get_bus_freq(ulong dummy) +{ + volatile immap_t *im = (immap_t *) CONFIG_SYS_IMMR; + u8 spmf = (im->clk.spmr & SPMR_SPMF) >> SPMR_SPMF_SHIFT; + + return CONFIG_SYS_CLK_FREQ * spmf; +} |