Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'v4.7-rockchip-clk-fixes1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into clk-fixes

A bunch of fixes. Some for the newly added rk3399 clock tree, some
concerning error handling and initialization and a revert of the
mmc-phase clock initialization, as this could conflict with the
bootloader setting of this clock and a real solution to initing
the phase correctly from dw_mmc went in as fix for 4.7 through
the mmc tree.

* tag 'v4.7-rockchip-clk-fixes1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip:
clk: rockchip: release io resource when failing to init clk on rk3399
clk: rockchip: fix cpuclk registration error handling
clk: rockchip: Revert "clk: rockchip: reset init state before mmc card initialization"
clk: rockchip: fix incorrect parent for rk3399's {c,g}pll_aclk_perihp_src
clk: rockchip: mark rk3399 GIC clocks as critical
clk: rockchip: initialize flags of clk_init_data in mmc-phase clock

+9 -15
+2 -2
drivers/clk/rockchip/clk-cpu.c
··· 321 321 } 322 322 323 323 cclk = clk_register(NULL, &cpuclk->hw); 324 - if (IS_ERR(clk)) { 324 + if (IS_ERR(cclk)) { 325 325 pr_err("%s: could not register cpuclk %s\n", __func__, name); 326 - ret = PTR_ERR(clk); 326 + ret = PTR_ERR(cclk); 327 327 goto free_rate_table; 328 328 } 329 329
+1 -11
drivers/clk/rockchip/clk-mmc-phase.c
··· 41 41 #define ROCKCHIP_MMC_DEGREE_MASK 0x3 42 42 #define ROCKCHIP_MMC_DELAYNUM_OFFSET 2 43 43 #define ROCKCHIP_MMC_DELAYNUM_MASK (0xff << ROCKCHIP_MMC_DELAYNUM_OFFSET) 44 - #define ROCKCHIP_MMC_INIT_STATE_RESET 0x1 45 - #define ROCKCHIP_MMC_INIT_STATE_SHIFT 1 46 44 47 45 #define PSECS_PER_SEC 1000000000000LL 48 46 ··· 152 154 return ERR_PTR(-ENOMEM); 153 155 154 156 init.name = name; 157 + init.flags = 0; 155 158 init.num_parents = num_parents; 156 159 init.parent_names = parent_names; 157 160 init.ops = &rockchip_mmc_clk_ops; ··· 160 161 mmc_clock->hw.init = &init; 161 162 mmc_clock->reg = reg; 162 163 mmc_clock->shift = shift; 163 - 164 - /* 165 - * Assert init_state to soft reset the CLKGEN 166 - * for mmc tuning phase and degree 167 - */ 168 - if (mmc_clock->shift == ROCKCHIP_MMC_INIT_STATE_SHIFT) 169 - writel(HIWORD_UPDATE(ROCKCHIP_MMC_INIT_STATE_RESET, 170 - ROCKCHIP_MMC_INIT_STATE_RESET, 171 - mmc_clock->shift), mmc_clock->reg); 172 164 173 165 clk = clk_register(NULL, &mmc_clock->hw); 174 166 if (IS_ERR(clk))
+6 -2
drivers/clk/rockchip/clk-rk3399.c
··· 832 832 RK3399_CLKGATE_CON(13), 1, GFLAGS), 833 833 834 834 /* perihp */ 835 - GATE(0, "cpll_aclk_perihp_src", "gpll", CLK_IGNORE_UNUSED, 835 + GATE(0, "cpll_aclk_perihp_src", "cpll", CLK_IGNORE_UNUSED, 836 836 RK3399_CLKGATE_CON(5), 0, GFLAGS), 837 - GATE(0, "gpll_aclk_perihp_src", "cpll", CLK_IGNORE_UNUSED, 837 + GATE(0, "gpll_aclk_perihp_src", "gpll", CLK_IGNORE_UNUSED, 838 838 RK3399_CLKGATE_CON(5), 1, GFLAGS), 839 839 COMPOSITE(ACLK_PERIHP, "aclk_perihp", mux_aclk_perihp_p, CLK_IGNORE_UNUSED, 840 840 RK3399_CLKSEL_CON(14), 7, 1, MFLAGS, 0, 5, DFLAGS, ··· 1466 1466 1467 1467 static const char *const rk3399_cru_critical_clocks[] __initconst = { 1468 1468 "aclk_cci_pre", 1469 + "aclk_gic", 1470 + "aclk_gic_noc", 1469 1471 "pclk_perilp0", 1470 1472 "pclk_perilp0", 1471 1473 "hclk_perilp0", ··· 1510 1508 ctx = rockchip_clk_init(np, reg_base, CLK_NR_CLKS); 1511 1509 if (IS_ERR(ctx)) { 1512 1510 pr_err("%s: rockchip clk init failed\n", __func__); 1511 + iounmap(reg_base); 1513 1512 return; 1514 1513 } 1515 1514 ··· 1556 1553 ctx = rockchip_clk_init(np, reg_base, CLKPMU_NR_CLKS); 1557 1554 if (IS_ERR(ctx)) { 1558 1555 pr_err("%s: rockchip pmu clk init failed\n", __func__); 1556 + iounmap(reg_base); 1559 1557 return; 1560 1558 } 1561 1559