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 branch 'fixes' into cleanups
[oweals/u-boot.git]
/
cpu
/
mpc85xx
/
speed.c
diff --git
a/cpu/mpc85xx/speed.c
b/cpu/mpc85xx/speed.c
index 699441b46a48c97b87247b5d28201d1ff6b5e9e8..1e0f4838bf8991273e42270376196ae8f4369bf5 100644
(file)
--- a/
cpu/mpc85xx/speed.c
+++ b/
cpu/mpc85xx/speed.c
@@
-35,7
+35,7
@@
DECLARE_GLOBAL_DATA_PTR;
void get_sys_info (sys_info_t * sysInfo)
{
void get_sys_info (sys_info_t * sysInfo)
{
- volatile ccsr_gur_t *gur = (void *)(C
FG
_MPC85xx_GUTS_ADDR);
+ volatile ccsr_gur_t *gur = (void *)(C
ONFIG_SYS
_MPC85xx_GUTS_ADDR);
uint plat_ratio,e500_ratio,half_freqSystemBus;
plat_ratio = (gur->porpllsr) & 0x0000003e;
uint plat_ratio,e500_ratio,half_freqSystemBus;
plat_ratio = (gur->porpllsr) & 0x0000003e;
@@
-54,7
+54,8
@@
void get_sys_info (sys_info_t * sysInfo)
#ifdef CONFIG_DDR_CLK_FREQ
{
#ifdef CONFIG_DDR_CLK_FREQ
{
- u32 ddr_ratio = ((gur->porpllsr) & 0x00003e00) >> 9;
+ u32 ddr_ratio = ((gur->porpllsr) & MPC85xx_PORPLLSR_DDR_RATIO)
+ >> MPC85xx_PORPLLSR_DDR_RATIO_SHIFT;
if (ddr_ratio != 0x7)
sysInfo->freqDDRBus = ddr_ratio * CONFIG_DDR_CLK_FREQ;
}
if (ddr_ratio != 0x7)
sysInfo->freqDDRBus = ddr_ratio * CONFIG_DDR_CLK_FREQ;
}
@@
-66,10
+67,10
@@
int get_clocks (void)
{
sys_info_t sys_info;
#ifdef CONFIG_MPC8544
{
sys_info_t sys_info;
#ifdef CONFIG_MPC8544
- volatile ccsr_gur_t *gur = (void *) C
FG
_MPC85xx_GUTS_ADDR;
+ volatile ccsr_gur_t *gur = (void *) C
ONFIG_SYS
_MPC85xx_GUTS_ADDR;
#endif
#if defined(CONFIG_CPM2)
#endif
#if defined(CONFIG_CPM2)
- volatile ccsr_cpm_t *cpm = (ccsr_cpm_t *)C
FG
_MPC85xx_CPM_ADDR;
+ volatile ccsr_cpm_t *cpm = (ccsr_cpm_t *)C
ONFIG_SYS
_MPC85xx_CPM_ADDR;
uint sccr, dfbrg;
/* set VCO = 4 * BRG */
uint sccr, dfbrg;
/* set VCO = 4 * BRG */
@@
-110,6
+111,10
@@
int get_clocks (void)
#endif
gd->i2c2_clk = gd->i2c1_clk;
#endif
gd->i2c2_clk = gd->i2c1_clk;
+#if defined(CONFIG_MPC8536)
+ gd->sdhc_clk = gd->bus_clk / 2;
+#endif
+
#if defined(CONFIG_CPM2)
gd->vco_out = 2*sys_info.freqSystemBus;
gd->cpm_clk = gd->vco_out / 2;
#if defined(CONFIG_CPM2)
gd->vco_out = 2*sys_info.freqSystemBus;
gd->cpm_clk = gd->vco_out / 2;