projects
/
oweals
/
u-boot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge with /home/hs/MAN/u-boot-dev
[oweals/u-boot.git]
/
cpu
/
mpc8260
/
speed.c
diff --git
a/cpu/mpc8260/speed.c
b/cpu/mpc8260/speed.c
index 99afe7609f7721058c62bddbf25ed416d032c292..38cd0d9a70fd0ecdcbc874aa25d95957bd405dcc 100644
(file)
--- a/
cpu/mpc8260/speed.c
+++ b/
cpu/mpc8260/speed.c
@@
-25,6
+25,12
@@
#include <mpc8260.h>
#include <asm/processor.h>
#include <mpc8260.h>
#include <asm/processor.h>
+#if defined(CONFIG_BOARD_GET_CPU_CLK_F)
+extern unsigned long board_get_cpu_clk_f (void);
+#endif
+
+DECLARE_GLOBAL_DATA_PTR;
+
/* ------------------------------------------------------------------------- */
/* Bus-to-Core Multiplier */
/* ------------------------------------------------------------------------- */
/* Bus-to-Core Multiplier */
@@
-101,8
+107,6
@@
corecnf_t corecnf_tab[] = {
int get_clocks (void)
{
int get_clocks (void)
{
- DECLARE_GLOBAL_DATA_PTR;
-
volatile immap_t *immap = (immap_t *) CFG_IMMR;
ulong clkin;
ulong sccr, dfbrg;
volatile immap_t *immap = (immap_t *) CFG_IMMR;
ulong clkin;
ulong sccr, dfbrg;
@@
-111,8
+115,12
@@
int get_clocks (void)
#if !defined(CONFIG_8260_CLKIN)
#error clock measuring not implemented yet - define CONFIG_8260_CLKIN
#if !defined(CONFIG_8260_CLKIN)
#error clock measuring not implemented yet - define CONFIG_8260_CLKIN
+#else
+#if defined(CONFIG_BOARD_GET_CPU_CLK_F)
+ clkin = board_get_cpu_clk_f ();
#else
clkin = CONFIG_8260_CLKIN;
#else
clkin = CONFIG_8260_CLKIN;
+#endif
#endif
sccr = immap->im_clkrst.car_sccr;
#endif
sccr = immap->im_clkrst.car_sccr;
@@
-159,8
+167,6
@@
int get_clocks (void)
int prt_8260_clks (void)
{
int prt_8260_clks (void)
{
- DECLARE_GLOBAL_DATA_PTR;
-
volatile immap_t *immap = (immap_t *) CFG_IMMR;
ulong sccr, dfbrg;
ulong scmr, corecnf, busdf, cpmdf, plldf, pllmf, pcidf;
volatile immap_t *immap = (immap_t *) CFG_IMMR;
ulong sccr, dfbrg;
ulong scmr, corecnf, busdf, cpmdf, plldf, pllmf, pcidf;