mirror of
https://github.com/FEX-Emu/linux.git
synced 2025-01-14 13:39:10 +00:00
A handful of driver fixes. The sunxi fixes are for an incorrect clk tree
configuration and a bad frequency calculation. The other two are fixes for passing the wrong pointer in drivers recently converted to clk_hw style registration. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAABCAAGBQJYM6DqAAoJEK0CiJfG5JUlk0QP/1p4gwMI0aJ8H3uT3raVESmi dZF623pyFfErgNxSeYMfWdut11VUU9fOMURnJv3FQtgiU+yxdMZr67aMh7YsjIT0 CekJ84+cCp9LjPqrwTfwpm7uHfliqdQlj/t/X/C9O2WGKm7LPqfTYaLIQbz/93p1 h6TiJbmy1/IwNYIFtGiK5py2PCW/UEGqBGjWM2R+ix7QP+rQT7S0+4JP0zy1sE84 sPpzI6acGYOvwK8fb7+SKop66vKwyVlOLaBPjvTjCr+aI7TacUFjb6BMjF6/c5V/ 2NiwWiARG7R4wo3RSDiEA8ZQw2V0bxb/PMgBB+JtK5A/7Ji1zd0KTthkni9kD7gY ReYPstqVsCr6B52zhhqYRbznu40iIqJZwVbum90HdisZ+F5wCjL44aANfj7tmEup OPKOZdykFiM+WiJ/eXSAuz/W/SrkdzhDZxZ1kcp1pCexCSH8jIfXagEJZwO+N6Rs OejGuBZ5IgZ+QOcXlwlrljZFRcfEXjvCgPTYn/i9iYJoc7izDDhFruFLhKh9P9HP D3ocfb610IOUfo7pYx5FU5tSHggAgp4zhpdPj7rS84IT8tbxYTldybieknrIfgzy nDRDVHM4oOfQLjUUyt9Qle5x1vht/y7sP5nff6f/e19Pg7XX+hwennA/MomxcsW7 pRef3f9QGn7PJjPaGGmq =Vr4x -----END PGP SIGNATURE----- Merge tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux Pull clk fixes from Stephen Boyd: "A handful of driver fixes. The sunxi fixes are for an incorrect clk tree configuration and a bad frequency calculation. The other two are fixes for passing the wrong pointer in drivers recently converted to clk_hw style registration" * tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: clk: efm32gg: Pass correct type to hw provider registration clk: berlin: Pass correct type to hw provider registration clk: sunxi: Fix M factor computation for APB1 clk: sunxi-ng: sun6i-a31: Force AHB1 clock to use PLL6 as parent
This commit is contained in:
commit
57527ed10b
@ -685,7 +685,7 @@ static void __init berlin2_clock_setup(struct device_node *np)
|
||||
}
|
||||
|
||||
/* register clk-provider */
|
||||
of_clk_add_hw_provider(np, of_clk_hw_onecell_get, &clk_data);
|
||||
of_clk_add_hw_provider(np, of_clk_hw_onecell_get, clk_data);
|
||||
|
||||
return;
|
||||
|
||||
|
@ -382,7 +382,7 @@ static void __init berlin2q_clock_setup(struct device_node *np)
|
||||
}
|
||||
|
||||
/* register clk-provider */
|
||||
of_clk_add_hw_provider(np, of_clk_hw_onecell_get, &clk_data);
|
||||
of_clk_add_hw_provider(np, of_clk_hw_onecell_get, clk_data);
|
||||
|
||||
return;
|
||||
|
||||
|
@ -82,6 +82,6 @@ static void __init efm32gg_cmu_init(struct device_node *np)
|
||||
hws[clk_HFPERCLKDAC0] = clk_hw_register_gate(NULL, "HFPERCLK.DAC0",
|
||||
"HFXO", 0, base + CMU_HFPERCLKEN0, 17, 0, NULL);
|
||||
|
||||
of_clk_add_hw_provider(np, of_clk_hw_onecell_get, &clk_data);
|
||||
of_clk_add_hw_provider(np, of_clk_hw_onecell_get, clk_data);
|
||||
}
|
||||
CLK_OF_DECLARE(efm32ggcmu, "efm32gg,cmu", efm32gg_cmu_init);
|
||||
|
@ -191,6 +191,8 @@ static struct clk_div_table axi_div_table[] = {
|
||||
static SUNXI_CCU_DIV_TABLE(axi_clk, "axi", "cpu",
|
||||
0x050, 0, 3, axi_div_table, 0);
|
||||
|
||||
#define SUN6I_A31_AHB1_REG 0x054
|
||||
|
||||
static const char * const ahb1_parents[] = { "osc32k", "osc24M",
|
||||
"axi", "pll-periph" };
|
||||
|
||||
@ -1230,6 +1232,16 @@ static void __init sun6i_a31_ccu_setup(struct device_node *node)
|
||||
val &= BIT(16);
|
||||
writel(val, reg + SUN6I_A31_PLL_MIPI_REG);
|
||||
|
||||
/* Force AHB1 to PLL6 / 3 */
|
||||
val = readl(reg + SUN6I_A31_AHB1_REG);
|
||||
/* set PLL6 pre-div = 3 */
|
||||
val &= ~GENMASK(7, 6);
|
||||
val |= 0x2 << 6;
|
||||
/* select PLL6 / pre-div */
|
||||
val &= ~GENMASK(13, 12);
|
||||
val |= 0x3 << 12;
|
||||
writel(val, reg + SUN6I_A31_AHB1_REG);
|
||||
|
||||
sunxi_ccu_probe(node, reg, &sun6i_a31_ccu_desc);
|
||||
|
||||
ccu_mux_notifier_register(pll_cpu_clk.common.hw.clk,
|
||||
|
@ -373,7 +373,7 @@ static void sun4i_get_apb1_factors(struct factors_request *req)
|
||||
else
|
||||
calcp = 3;
|
||||
|
||||
calcm = (req->parent_rate >> calcp) - 1;
|
||||
calcm = (div >> calcp) - 1;
|
||||
|
||||
req->rate = (req->parent_rate >> calcp) / (calcm + 1);
|
||||
req->m = calcm;
|
||||
|
Loading…
x
Reference in New Issue
Block a user