@ -461,6 +461,11 @@ void reset_cmplx_set_enable(int cpu, int which, int reset)
writel ( mask , & clkrst - > crc_cpu_cmplx_clr ) ;
writel ( mask , & clkrst - > crc_cpu_cmplx_clr ) ;
}
}
unsigned int __weak clk_m_get_rate ( unsigned int parent_rate )
{
return parent_rate ;
}
unsigned clock_get_rate ( enum clock_id clkid )
unsigned clock_get_rate ( enum clock_id clkid )
{
{
struct clk_pll * pll ;
struct clk_pll * pll ;
@ -472,6 +477,9 @@ unsigned clock_get_rate(enum clock_id clkid)
if ( clkid = = CLOCK_ID_OSC )
if ( clkid = = CLOCK_ID_OSC )
return parent_rate ;
return parent_rate ;
if ( clkid = = CLOCK_ID_CLK_M )
return clk_m_get_rate ( parent_rate ) ;
pll = get_pll ( clkid ) ;
pll = get_pll ( clkid ) ;
if ( ! pll )
if ( ! pll )
return 0 ;
return 0 ;
@ -622,8 +630,10 @@ void clock_init(void)
pll_rate [ CLOCK_ID_XCPU ] = clock_get_rate ( CLOCK_ID_XCPU ) ;
pll_rate [ CLOCK_ID_XCPU ] = clock_get_rate ( CLOCK_ID_XCPU ) ;
pll_rate [ CLOCK_ID_SFROM32KHZ ] = 32768 ;
pll_rate [ CLOCK_ID_SFROM32KHZ ] = 32768 ;
pll_rate [ CLOCK_ID_OSC ] = clock_get_rate ( CLOCK_ID_OSC ) ;
pll_rate [ CLOCK_ID_OSC ] = clock_get_rate ( CLOCK_ID_OSC ) ;
pll_rate [ CLOCK_ID_CLK_M ] = clock_get_rate ( CLOCK_ID_CLK_M ) ;
debug ( " Osc = %d \n " , pll_rate [ CLOCK_ID_OSC ] ) ;
debug ( " Osc = %d \n " , pll_rate [ CLOCK_ID_OSC ] ) ;
debug ( " CLKM = %d \n " , pll_rate [ CLOCK_ID_CLK_M ] ) ;
debug ( " PLLC = %d \n " , pll_rate [ CLOCK_ID_CGENERAL ] ) ;
debug ( " PLLC = %d \n " , pll_rate [ CLOCK_ID_CGENERAL ] ) ;
debug ( " PLLM = %d \n " , pll_rate [ CLOCK_ID_MEMORY ] ) ;
debug ( " PLLM = %d \n " , pll_rate [ CLOCK_ID_MEMORY ] ) ;
debug ( " PLLP = %d \n " , pll_rate [ CLOCK_ID_PERIPH ] ) ;
debug ( " PLLP = %d \n " , pll_rate [ CLOCK_ID_PERIPH ] ) ;