mpc83xx: Lindent and clean up cpu/mpc83xx/speed.c

This commit is contained in:
Kim Phillips 2006-11-02 19:47:11 -06:00
parent 90f30a710a
commit f7fb2e703e

View File

@ -224,10 +224,11 @@ int get_clocks (void)
return -8; return -8;
} }
if (usbmph_clk != 0 if (usbmph_clk != 0 && usbdr_clk != 0 && usbmph_clk != usbdr_clk) {
&& usbdr_clk != 0 /* if USB MPH clock is not disabled and
&& usbmph_clk != usbdr_clk ) { * USB DR clock is not disabled then
/* if USB MPH clock is not disabled and USB DR clock is not disabled than USB MPH & USB DR must have the same rate */ * USB MPH & USB DR must have the same rate
*/
return -9; return -9;
} }
#endif #endif
@ -254,7 +255,8 @@ int get_clocks (void)
return -6; return -6;
} }
#if defined(CONFIG_MPC8349) || defined(CONFIG_MPC8360) #if defined(CONFIG_MPC8349) || defined(CONFIG_MPC8360)
lbiu_clk = csb_clk * (1 + ((im->reset.rcwl & RCWL_LBIUCM) >> RCWL_LBIUCM_SHIFT)); lbiu_clk = csb_clk *
(1 + ((im->reset.rcwl & RCWL_LBIUCM) >> RCWL_LBIUCM_SHIFT));
#else #else
#error Unknown MPC83xx chip #error Unknown MPC83xx chip
#endif #endif
@ -270,10 +272,12 @@ int get_clocks (void)
return -10; return -10;
} }
#if defined(CONFIG_MPC8349) || defined(CONFIG_MPC8360) #if defined(CONFIG_MPC8349) || defined(CONFIG_MPC8360)
ddr_clk = csb_clk * (1 + ((im->reset.rcwl & RCWL_DDRCM) >> RCWL_DDRCM_SHIFT)); ddr_clk = csb_clk *
(1 + ((im->reset.rcwl & RCWL_DDRCM) >> RCWL_DDRCM_SHIFT));
corepll = (im->reset.rcwl & RCWL_COREPLL) >> RCWL_COREPLL_SHIFT; corepll = (im->reset.rcwl & RCWL_COREPLL) >> RCWL_COREPLL_SHIFT;
#if defined (CONFIG_MPC8360) #if defined (CONFIG_MPC8360)
ddr_sec_clk = csb_clk * (1 + ((im->reset.rcwl & RCWL_LBIUCM) >> RCWL_LBIUCM_SHIFT)); ddr_sec_clk = csb_clk * (1 +
((im->reset.rcwl & RCWL_LBIUCM) >> RCWL_LBIUCM_SHIFT));
#endif #endif
#else #else
#error Unknown MPC83xx chip #error Unknown MPC83xx chip
@ -344,7 +348,6 @@ ulong get_ddr_clk(ulong dummy)
return gd->ddr_clk; return gd->ddr_clk;
} }
/******************************************** /********************************************
* get_bus_freq * get_bus_freq
* return system bus freq in Hz * return system bus freq in Hz