Skip to content

Commit de5f4fb

Browse files
committed
Merge tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/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
2 parents c85e149 + f99b3fe commit de5f4fb

File tree

4 files changed

+11
-9
lines changed

4 files changed

+11
-9
lines changed

drivers/clk/davinci/da8xx-cfgchip.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -508,7 +508,7 @@ da8xx_cfgchip_register_usb0_clk48(struct device *dev,
508508
const char * const parent_names[] = { "usb_refclkin", "pll0_auxclk" };
509509
struct clk *fck_clk;
510510
struct da8xx_usb0_clk48 *usb0;
511-
struct clk_init_data init;
511+
struct clk_init_data init = {};
512512
int ret;
513513

514514
fck_clk = devm_clk_get(dev, "fck");
@@ -583,7 +583,7 @@ da8xx_cfgchip_register_usb1_clk48(struct device *dev,
583583
{
584584
const char * const parent_names[] = { "usb0_clk48", "usb_refclkin" };
585585
struct da8xx_usb1_clk48 *usb1;
586-
struct clk_init_data init;
586+
struct clk_init_data init = {};
587587
int ret;
588588

589589
usb1 = devm_kzalloc(dev, sizeof(*usb1), GFP_KERNEL);

drivers/clk/samsung/clk-exynos4.c

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1040,19 +1040,20 @@ static unsigned long __init exynos4_get_xom(void)
10401040
static void __init exynos4_clk_register_finpll(struct samsung_clk_provider *ctx)
10411041
{
10421042
struct samsung_fixed_rate_clock fclk;
1043-
struct clk *clk;
1044-
unsigned long finpll_f = 24000000;
1043+
unsigned long finpll_f;
1044+
unsigned int parent;
10451045
char *parent_name;
10461046
unsigned int xom = exynos4_get_xom();
10471047

10481048
parent_name = xom & 1 ? "xusbxti" : "xxti";
1049-
clk = clk_get(NULL, parent_name);
1050-
if (IS_ERR(clk)) {
1049+
parent = xom & 1 ? CLK_XUSBXTI : CLK_XXTI;
1050+
1051+
finpll_f = clk_hw_get_rate(ctx->clk_data.hws[parent]);
1052+
if (!finpll_f) {
10511053
pr_err("%s: failed to lookup parent clock %s, assuming "
10521054
"fin_pll clock frequency is 24MHz\n", __func__,
10531055
parent_name);
1054-
} else {
1055-
finpll_f = clk_get_rate(clk);
1056+
finpll_f = 24000000;
10561057
}
10571058

10581059
fclk.id = CLK_FIN_PLL;

drivers/clk/sophgo/clk-sg2042-pll.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ static int sg2042_clk_pll_set_rate(struct clk_hw *hw,
387387
struct sg2042_pll_clock *pll = to_sg2042_pll_clk(hw);
388388
struct sg2042_pll_ctrl pctrl_table;
389389
unsigned long flags;
390-
u32 value;
390+
u32 value = 0;
391391
int ret;
392392

393393
spin_lock_irqsave(pll->lock, flags);

drivers/clk/thead/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
config CLK_THEAD_TH1520_AP
44
bool "T-HEAD TH1520 AP clock support"
55
depends on ARCH_THEAD || COMPILE_TEST
6+
depends on 64BIT
67
default ARCH_THEAD
78
select REGMAP_MMIO
89
help

0 commit comments

Comments
 (0)