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

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 collection of clk driver fixes and one core clk API fix:

- Fix stm32 clk data to avoid a crash early on

- Fix a randconfig build error in HiSilicon clk driver

- Avoid an oops at boot on Qualcomm MSM8936 SoCs due to
an improper consolidation of structs

- Fix imbalanced disabling of the unused MMC clock on
Tegra210 Jetson Nano

- Plug a memory leak in devm_clk_bulk_get_all() unwind
path"

* tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux:
clk: fix leak on devm_clk_bulk_get_all() unwind
clk: tegra: Implement disable_unused() of tegra_clk_sdmmc_mux_ops
clk: qcom: smd-rpm: Fix MSM8936 RPM_SMD_PCNOC_A_CLK
clk: hisilicon: hi3559a: select RESET_HISI
clk: stm32f4: fix post divisor setup for I2S/SAI PLLs

+25 -7
+8 -1
drivers/clk/clk-devres.c
··· 92 92 } 93 93 EXPORT_SYMBOL_GPL(devm_clk_bulk_get_optional); 94 94 95 + static void devm_clk_bulk_release_all(struct device *dev, void *res) 96 + { 97 + struct clk_bulk_devres *devres = res; 98 + 99 + clk_bulk_put_all(devres->num_clks, devres->clks); 100 + } 101 + 95 102 int __must_check devm_clk_bulk_get_all(struct device *dev, 96 103 struct clk_bulk_data **clks) 97 104 { 98 105 struct clk_bulk_devres *devres; 99 106 int ret; 100 107 101 - devres = devres_alloc(devm_clk_bulk_release, 108 + devres = devres_alloc(devm_clk_bulk_release_all, 102 109 sizeof(*devres), GFP_KERNEL); 103 110 if (!devres) 104 111 return -ENOMEM;
+5 -5
drivers/clk/clk-stm32f4.c
··· 526 526 527 527 struct stm32f4_pll_post_div_data { 528 528 int idx; 529 - u8 pll_num; 529 + int pll_idx; 530 530 const char *name; 531 531 const char *parent; 532 532 u8 flag; ··· 557 557 558 558 #define MAX_POST_DIV 3 559 559 static const struct stm32f4_pll_post_div_data post_div_data[MAX_POST_DIV] = { 560 - { CLK_I2SQ_PDIV, PLL_I2S, "plli2s-q-div", "plli2s-q", 560 + { CLK_I2SQ_PDIV, PLL_VCO_I2S, "plli2s-q-div", "plli2s-q", 561 561 CLK_SET_RATE_PARENT, STM32F4_RCC_DCKCFGR, 0, 5, 0, NULL}, 562 562 563 - { CLK_SAIQ_PDIV, PLL_SAI, "pllsai-q-div", "pllsai-q", 563 + { CLK_SAIQ_PDIV, PLL_VCO_SAI, "pllsai-q-div", "pllsai-q", 564 564 CLK_SET_RATE_PARENT, STM32F4_RCC_DCKCFGR, 8, 5, 0, NULL }, 565 565 566 - { NO_IDX, PLL_SAI, "pllsai-r-div", "pllsai-r", CLK_SET_RATE_PARENT, 566 + { NO_IDX, PLL_VCO_SAI, "pllsai-r-div", "pllsai-r", CLK_SET_RATE_PARENT, 567 567 STM32F4_RCC_DCKCFGR, 16, 2, 0, post_divr_table }, 568 568 }; 569 569 ··· 1774 1774 post_div->width, 1775 1775 post_div->flag_div, 1776 1776 post_div->div_table, 1777 - clks[post_div->pll_num], 1777 + clks[post_div->pll_idx], 1778 1778 &stm32f4_clk_lock); 1779 1779 1780 1780 if (post_div->idx != NO_IDX)
+1
drivers/clk/hisilicon/Kconfig
··· 18 18 config COMMON_CLK_HI3559A 19 19 bool "Hi3559A Clock Driver" 20 20 depends on ARCH_HISI || COMPILE_TEST 21 + select RESET_HISI 21 22 default ARCH_HISI 22 23 help 23 24 Build the clock driver for hi3559a.
+1 -1
drivers/clk/qcom/clk-smd-rpm.c
··· 467 467 468 468 static struct clk_smd_rpm *msm8936_clks[] = { 469 469 [RPM_SMD_PCNOC_CLK] = &msm8916_pcnoc_clk, 470 - [RPM_SMD_PCNOC_A_CLK] = &msm8916_pcnoc_clk, 470 + [RPM_SMD_PCNOC_A_CLK] = &msm8916_pcnoc_a_clk, 471 471 [RPM_SMD_SNOC_CLK] = &msm8916_snoc_clk, 472 472 [RPM_SMD_SNOC_A_CLK] = &msm8916_snoc_a_clk, 473 473 [RPM_SMD_BIMC_CLK] = &msm8916_bimc_clk,
+10
drivers/clk/tegra/clk-sdmmc-mux.c
··· 194 194 gate_ops->disable(gate_hw); 195 195 } 196 196 197 + static void clk_sdmmc_mux_disable_unused(struct clk_hw *hw) 198 + { 199 + struct tegra_sdmmc_mux *sdmmc_mux = to_clk_sdmmc_mux(hw); 200 + const struct clk_ops *gate_ops = sdmmc_mux->gate_ops; 201 + struct clk_hw *gate_hw = &sdmmc_mux->gate.hw; 202 + 203 + gate_ops->disable_unused(gate_hw); 204 + } 205 + 197 206 static void clk_sdmmc_mux_restore_context(struct clk_hw *hw) 198 207 { 199 208 struct clk_hw *parent = clk_hw_get_parent(hw); ··· 227 218 .is_enabled = clk_sdmmc_mux_is_enabled, 228 219 .enable = clk_sdmmc_mux_enable, 229 220 .disable = clk_sdmmc_mux_disable, 221 + .disable_unused = clk_sdmmc_mux_disable_unused, 230 222 .restore_context = clk_sdmmc_mux_restore_context, 231 223 }; 232 224