Lines Matching refs:ulong
53 static ulong ast2500_get_mpll_rate(ulong clkin, u32 mpll_reg) in ast2500_get_mpll_rate()
55 const ulong num = (mpll_reg & SCU_MPLL_NUM_MASK) >> SCU_MPLL_NUM_SHIFT; in ast2500_get_mpll_rate()
56 const ulong denum = (mpll_reg & SCU_MPLL_DENUM_MASK) in ast2500_get_mpll_rate()
58 const ulong post_div = (mpll_reg & SCU_MPLL_POST_MASK) in ast2500_get_mpll_rate()
68 static ulong ast2500_get_hpll_rate(ulong clkin, u32 hpll_reg) in ast2500_get_hpll_rate()
70 const ulong num = (hpll_reg & SCU_HPLL_NUM_MASK) >> SCU_HPLL_NUM_SHIFT; in ast2500_get_hpll_rate()
71 const ulong denum = (hpll_reg & SCU_HPLL_DENUM_MASK) in ast2500_get_hpll_rate()
73 const ulong post_div = (hpll_reg & SCU_HPLL_POST_MASK) in ast2500_get_hpll_rate()
79 static ulong ast2500_get_clkin(struct ast2500_scu *scu) in ast2500_get_clkin()
93 static ulong ast2500_get_uart_clk_rate(struct ast2500_scu *scu, int uart_index) in ast2500_get_uart_clk_rate()
102 ulong uart_clkin; in ast2500_get_uart_clk_rate()
116 static ulong ast2500_clk_get_rate(struct clk *clk) in ast2500_clk_get_rate()
119 ulong clkin = ast2500_get_clkin(priv->scu); in ast2500_clk_get_rate()
120 ulong rate; in ast2500_clk_get_rate()
138 ulong apb_div = 4 + 4 * ((readl(&priv->scu->clk_sel1) in ast2500_clk_get_rate()
179 static ulong ast2500_calc_clock_config(ulong input_rate, ulong requested_rate, in ast2500_calc_clock_config()
186 const ulong input_rate_khz = input_rate / 1000; in ast2500_calc_clock_config()
187 const ulong rate_khz = requested_rate / 1000; in ast2500_calc_clock_config()
190 ulong delta = rate_khz; in ast2500_calc_clock_config()
191 ulong new_rate_khz = 0; in ast2500_calc_clock_config()
221 static ulong ast2500_configure_ddr(struct ast2500_scu *scu, ulong rate) in ast2500_configure_ddr()
223 ulong clkin = ast2500_get_clkin(scu); in ast2500_configure_ddr()
247 static ulong ast2500_configure_mac(struct ast2500_scu *scu, int index) in ast2500_configure_mac()
249 ulong clkin = ast2500_get_clkin(scu); in ast2500_configure_mac()
250 ulong hpll_rate = ast2500_get_hpll_rate(clkin, in ast2500_configure_mac()
252 ulong required_rate; in ast2500_configure_mac()
317 static ulong ast2500_configure_d2pll(struct ast2500_scu *scu, ulong rate) in ast2500_configure_d2pll()
336 ulong clkin = ast2500_get_clkin(scu); in ast2500_configure_d2pll()
337 ulong new_rate; in ast2500_configure_d2pll()
377 static ulong ast2500_clk_set_rate(struct clk *clk, ulong rate) in ast2500_clk_set_rate()
381 ulong new_rate; in ast2500_clk_set_rate()