Lines Matching refs:ulong
52 static ulong ast2500_get_mpll_rate(ulong clkin, u32 mpll_reg) in ast2500_get_mpll_rate()
54 const ulong num = (mpll_reg & SCU_MPLL_NUM_MASK) >> SCU_MPLL_NUM_SHIFT; in ast2500_get_mpll_rate()
55 const ulong denum = (mpll_reg & SCU_MPLL_DENUM_MASK) in ast2500_get_mpll_rate()
57 const ulong post_div = (mpll_reg & SCU_MPLL_POST_MASK) in ast2500_get_mpll_rate()
67 static ulong ast2500_get_hpll_rate(ulong clkin, u32 hpll_reg) in ast2500_get_hpll_rate()
69 const ulong num = (hpll_reg & SCU_HPLL_NUM_MASK) >> SCU_HPLL_NUM_SHIFT; in ast2500_get_hpll_rate()
70 const ulong denum = (hpll_reg & SCU_HPLL_DENUM_MASK) in ast2500_get_hpll_rate()
72 const ulong post_div = (hpll_reg & SCU_HPLL_POST_MASK) in ast2500_get_hpll_rate()
78 static ulong ast2500_get_clkin(struct ast2500_scu *scu) in ast2500_get_clkin()
92 static ulong ast2500_get_uart_clk_rate(struct ast2500_scu *scu, int uart_index) in ast2500_get_uart_clk_rate()
101 ulong uart_clkin; in ast2500_get_uart_clk_rate()
115 static ulong ast2500_clk_get_rate(struct clk *clk) in ast2500_clk_get_rate()
118 ulong clkin = ast2500_get_clkin(priv->scu); in ast2500_clk_get_rate()
119 ulong rate; in ast2500_clk_get_rate()
137 ulong apb_div = 4 + 4 * ((readl(&priv->scu->clk_sel1) in ast2500_clk_get_rate()
178 static ulong ast2500_calc_clock_config(ulong input_rate, ulong requested_rate, in ast2500_calc_clock_config()
185 const ulong input_rate_khz = input_rate / 1000; in ast2500_calc_clock_config()
186 const ulong rate_khz = requested_rate / 1000; in ast2500_calc_clock_config()
189 ulong delta = rate_khz; in ast2500_calc_clock_config()
190 ulong new_rate_khz = 0; in ast2500_calc_clock_config()
220 static ulong ast2500_configure_ddr(struct ast2500_scu *scu, ulong rate) in ast2500_configure_ddr()
222 ulong clkin = ast2500_get_clkin(scu); in ast2500_configure_ddr()
246 static ulong ast2500_configure_mac(struct ast2500_scu *scu, int index) in ast2500_configure_mac()
248 ulong clkin = ast2500_get_clkin(scu); in ast2500_configure_mac()
249 ulong hpll_rate = ast2500_get_hpll_rate(clkin, in ast2500_configure_mac()
251 ulong required_rate; in ast2500_configure_mac()
316 static ulong ast2500_configure_d2pll(struct ast2500_scu *scu, ulong rate) in ast2500_configure_d2pll()
335 ulong clkin = ast2500_get_clkin(scu); in ast2500_configure_d2pll()
336 ulong new_rate; in ast2500_configure_d2pll()
376 static ulong ast2500_clk_set_rate(struct clk *clk, ulong rate) in ast2500_clk_set_rate()
380 ulong new_rate; in ast2500_clk_set_rate()