Skip to content

Commit

Permalink
Merge tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kerne…
Browse files Browse the repository at this point in the history
…l/git/clk/linux

Pull clk fixes from Stephen Boyd:
 "A few clk driver fixes for the merge window to fix the build and boot
  on some SoCs.

   - Initialize struct clk_init_data in the TI da8xx-cfgchip driver so
     that stack contents aren't used for things like clk flags leading
     to unexpected behavior

   - Don't leak stack contents in a debug print in the new Sophgo clk
     driver

   - Disable the new T-Head clk driver on 32-bit targets to fix the
     build due to a division

   - Fix Samsung Exynos4 fin_pll wreckage from the clkdev rework done
     last cycle by using a struct clk_hw directly instead of a struct
     clk consumer"

* tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux:
  clk: samsung: fix getting Exynos4 fin_pll rate from external clocks
  clk: T-Head: Disable on 32-bit Targets
  clk: sophgo: clk-sg2042-pll: Fix uninitialized variable in debug output
  clk: davinci: da8xx-cfgchip: Initialize clk_init_data before use
  • Loading branch information
torvalds committed Jul 27, 2024
2 parents c85e149 + f99b3fe commit de5f4fb
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
4 changes: 2 additions & 2 deletions drivers/clk/davinci/da8xx-cfgchip.c
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@ da8xx_cfgchip_register_usb0_clk48(struct device *dev,
const char * const parent_names[] = { "usb_refclkin", "pll0_auxclk" };
struct clk *fck_clk;
struct da8xx_usb0_clk48 *usb0;
struct clk_init_data init;
struct clk_init_data init = {};
int ret;

fck_clk = devm_clk_get(dev, "fck");
Expand Down Expand Up @@ -583,7 +583,7 @@ da8xx_cfgchip_register_usb1_clk48(struct device *dev,
{
const char * const parent_names[] = { "usb0_clk48", "usb_refclkin" };
struct da8xx_usb1_clk48 *usb1;
struct clk_init_data init;
struct clk_init_data init = {};
int ret;

usb1 = devm_kzalloc(dev, sizeof(*usb1), GFP_KERNEL);
Expand Down
13 changes: 7 additions & 6 deletions drivers/clk/samsung/clk-exynos4.c
Original file line number Diff line number Diff line change
Expand Up @@ -1040,19 +1040,20 @@ static unsigned long __init exynos4_get_xom(void)
static void __init exynos4_clk_register_finpll(struct samsung_clk_provider *ctx)
{
struct samsung_fixed_rate_clock fclk;
struct clk *clk;
unsigned long finpll_f = 24000000;
unsigned long finpll_f;
unsigned int parent;
char *parent_name;
unsigned int xom = exynos4_get_xom();

parent_name = xom & 1 ? "xusbxti" : "xxti";
clk = clk_get(NULL, parent_name);
if (IS_ERR(clk)) {
parent = xom & 1 ? CLK_XUSBXTI : CLK_XXTI;

finpll_f = clk_hw_get_rate(ctx->clk_data.hws[parent]);
if (!finpll_f) {
pr_err("%s: failed to lookup parent clock %s, assuming "
"fin_pll clock frequency is 24MHz\n", __func__,
parent_name);
} else {
finpll_f = clk_get_rate(clk);
finpll_f = 24000000;
}

fclk.id = CLK_FIN_PLL;
Expand Down
2 changes: 1 addition & 1 deletion drivers/clk/sophgo/clk-sg2042-pll.c
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ static int sg2042_clk_pll_set_rate(struct clk_hw *hw,
struct sg2042_pll_clock *pll = to_sg2042_pll_clk(hw);
struct sg2042_pll_ctrl pctrl_table;
unsigned long flags;
u32 value;
u32 value = 0;
int ret;

spin_lock_irqsave(pll->lock, flags);
Expand Down
1 change: 1 addition & 0 deletions drivers/clk/thead/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
config CLK_THEAD_TH1520_AP
bool "T-HEAD TH1520 AP clock support"
depends on ARCH_THEAD || COMPILE_TEST
depends on 64BIT
default ARCH_THEAD
select REGMAP_MMIO
help
Expand Down

0 comments on commit de5f4fb

Please sign in to comment.