@ -24,8 +24,9 @@
# include <asm/io.h>
# include <asm/io.h>
# include <asm/errno.h>
# include <asm/errno.h>
# include <asm/arch/imx-regs.h>
# include <asm/arch/imx-regs.h>
# include <asm/arch/cc m_regs.h>
# include <asm/arch/cr m_regs.h>
# include <asm/arch/clock.h>
# include <asm/arch/clock.h>
# include <asm/arch/sys_proto.h>
enum pll_clocks {
enum pll_clocks {
PLL_SYS , /* System PLL */
PLL_SYS , /* System PLL */
@ -34,7 +35,7 @@ enum pll_clocks {
PLL_ENET , /* ENET PLL */
PLL_ENET , /* ENET PLL */
} ;
} ;
struct i mx_ccm_reg * imx_ccm = ( struct i mx_ccm_reg * ) CCM_BASE_ADDR ;
struct mxc _ccm_reg * imx_ccm = ( struct mxc _ccm_reg * ) CCM_BASE_ADDR ;
void enable_usboh3_clk ( unsigned char enable )
void enable_usboh3_clk ( unsigned char enable )
{
{
@ -92,7 +93,7 @@ static u32 get_mcu_main_clk(void)
return freq / ( reg + 1 ) ;
return freq / ( reg + 1 ) ;
}
}
static u32 get_periph_clk ( void )
u32 get_periph_clk ( void )
{
{
u32 reg , freq = 0 ;
u32 reg , freq = 0 ;
@ -139,18 +140,6 @@ static u32 get_periph_clk(void)
return freq ;
return freq ;
}
}
static u32 get_ahb_clk ( void )
{
u32 reg , ahb_podf ;
reg = __raw_readl ( & imx_ccm - > cbcdr ) ;
reg & = MXC_CCM_CBCDR_AHB_PODF_MASK ;
ahb_podf = reg > > MXC_CCM_CBCDR_AHB_PODF_OFFSET ;
return get_periph_clk ( ) / ( ahb_podf + 1 ) ;
}
static u32 get_ipg_clk ( void )
static u32 get_ipg_clk ( void )
{
{
u32 reg , ipg_podf ;
u32 reg , ipg_podf ;