Skip to content

Commit 76a2ee3

Browse files
committed
Merge branches 'clk-renesas', 'clk-rockchip', 'clk-allwinner' and 'clk-cleanup' into clk-next
* clk-renesas: clk: renesas: r9a08g045: Add clock and reset support for ETH0 and ETH1 clk: renesas: rzg2l: Check reset monitor registers clk: renesas: r9a08g045: Add IA55 pclk and its reset clk: renesas: rzg2l-cpg: Reuse code in rzg2l_cpg_reset() clk: renesas: r8a779g0: Add PCIe clocks clk: renesas: r8a779g0: Add EtherTSN clock * clk-rockchip: clk: rockchip: rk3568: Mark pclk_usb as critical clk: rockchip: rk3568: Add PLL rate for 126.4MHz clk: rockchip: rk3568: Add PLL rate for 115.2MHz * clk-allwinner: clk: sunxi-ng: nkm: remove redundant initialization of tmp_parent * clk-cleanup: clk: fixed-rate: fix clk_hw_register_fixed_rate_with_accuracy_parent_hw clk: si5341: fix an error code problem in si5341_output_clk_set_rate clk: microchip: mpfs-ccc: replace include of asm-generic/errno-base.h clk: rs9: Fix DIF OEn bit placement on 9FGV0241 clk: mmp: pxa168: Fix memory leak in pxa168_clk_init() clk: hi3620: Fix memory leak in hi3620_mmc_clk_init() clk: sp7021: fix return value check in sp7021_clk_probe()
4 parents c46104f + 723facb + 72449a9 + ee0cf5e commit 76a2ee3

File tree

9 files changed

+22
-17
lines changed

9 files changed

+22
-17
lines changed

drivers/clk/clk-renesas-pcie.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ static u8 rs9_calc_dif(const struct rs9_driver_data *rs9, int idx)
163163
enum rs9_model model = rs9->chip_info->model;
164164

165165
if (model == RENESAS_9FGV0241)
166-
return BIT(idx) + 1;
166+
return BIT(idx + 1);
167167
else if (model == RENESAS_9FGV0441)
168168
return BIT(idx);
169169

drivers/clk/clk-si5341.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -895,10 +895,8 @@ static int si5341_output_clk_set_rate(struct clk_hw *hw, unsigned long rate,
895895
r[0] = r_div ? (r_div & 0xff) : 1;
896896
r[1] = (r_div >> 8) & 0xff;
897897
r[2] = (r_div >> 16) & 0xff;
898-
err = regmap_bulk_write(output->data->regmap,
898+
return regmap_bulk_write(output->data->regmap,
899899
SI5341_OUT_R_REG(output), r, 3);
900-
901-
return 0;
902900
}
903901

904902
static int si5341_output_reparent(struct clk_si5341_output *output, u8 index)

drivers/clk/clk-sp7021.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -604,14 +604,14 @@ static int sp7021_clk_probe(struct platform_device *pdev)
604604
int i;
605605

606606
clk_base = devm_platform_ioremap_resource(pdev, 0);
607-
if (!clk_base)
608-
return -ENXIO;
607+
if (IS_ERR(clk_base))
608+
return PTR_ERR(clk_base);
609609
pll_base = devm_platform_ioremap_resource(pdev, 1);
610-
if (!pll_base)
611-
return -ENXIO;
610+
if (IS_ERR(pll_base))
611+
return PTR_ERR(pll_base);
612612
sys_base = devm_platform_ioremap_resource(pdev, 2);
613-
if (!sys_base)
614-
return -ENXIO;
613+
if (IS_ERR(sys_base))
614+
return PTR_ERR(sys_base);
615615

616616
/* enable default clks */
617617
for (i = 0; i < ARRAY_SIZE(sp_clken); i++)

drivers/clk/hisilicon/clk-hi3620.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -466,8 +466,10 @@ static void __init hi3620_mmc_clk_init(struct device_node *node)
466466
return;
467467

468468
clk_data->clks = kcalloc(num, sizeof(*clk_data->clks), GFP_KERNEL);
469-
if (!clk_data->clks)
469+
if (!clk_data->clks) {
470+
kfree(clk_data);
470471
return;
472+
}
471473

472474
for (i = 0; i < num; i++) {
473475
struct hisi_mmc_clock *mmc_clk = &hi3620_mmc_clks[i];

drivers/clk/microchip/clk-mpfs-ccc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
*
55
* Copyright (C) 2022 Microchip Technology Inc. and its subsidiaries
66
*/
7-
#include "asm-generic/errno-base.h"
87
#include <linux/clk-provider.h>
8+
#include <linux/errno.h>
99
#include <linux/io.h>
1010
#include <linux/module.h>
1111
#include <linux/platform_device.h>

drivers/clk/mmp/clk-of-pxa168.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,18 +308,21 @@ static void __init pxa168_clk_init(struct device_node *np)
308308
pxa_unit->mpmu_base = of_iomap(np, 0);
309309
if (!pxa_unit->mpmu_base) {
310310
pr_err("failed to map mpmu registers\n");
311+
kfree(pxa_unit);
311312
return;
312313
}
313314

314315
pxa_unit->apmu_base = of_iomap(np, 1);
315316
if (!pxa_unit->apmu_base) {
316317
pr_err("failed to map apmu registers\n");
318+
kfree(pxa_unit);
317319
return;
318320
}
319321

320322
pxa_unit->apbc_base = of_iomap(np, 2);
321323
if (!pxa_unit->apbc_base) {
322324
pr_err("failed to map apbc registers\n");
325+
kfree(pxa_unit);
323326
return;
324327
}
325328

drivers/clk/rockchip/clk-rk3568.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,9 @@ static struct rockchip_pll_rate_table rk3568_pll_rates[] = {
7777
RK3036_PLL_RATE(200000000, 1, 100, 3, 4, 1, 0),
7878
RK3036_PLL_RATE(148500000, 1, 99, 4, 4, 1, 0),
7979
RK3036_PLL_RATE(135000000, 2, 45, 4, 1, 1, 0),
80+
RK3036_PLL_RATE(126400000, 1, 79, 5, 3, 1, 0),
8081
RK3036_PLL_RATE(119000000, 3, 119, 4, 2, 1, 0),
82+
RK3036_PLL_RATE(115200000, 1, 24, 5, 1, 1, 0),
8183
RK3036_PLL_RATE(108000000, 2, 45, 5, 1, 1, 0),
8284
RK3036_PLL_RATE(101000000, 1, 101, 6, 4, 1, 0),
8385
RK3036_PLL_RATE(100000000, 1, 150, 6, 6, 1, 0),
@@ -1592,6 +1594,7 @@ static const char *const rk3568_cru_critical_clocks[] __initconst = {
15921594
"hclk_php",
15931595
"pclk_php",
15941596
"hclk_usb",
1597+
"pclk_usb",
15951598
"hclk_vo",
15961599
};
15971600

drivers/clk/sunxi-ng/ccu_nkm.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,16 @@ static unsigned long ccu_nkm_find_best_with_parent_adj(struct ccu_common *common
2121
unsigned long *parent, unsigned long rate,
2222
struct _ccu_nkm *nkm)
2323
{
24-
unsigned long best_rate = 0, best_parent_rate = *parent, tmp_parent = *parent;
24+
unsigned long best_rate = 0, best_parent_rate = *parent;
2525
unsigned long best_n = 0, best_k = 0, best_m = 0;
2626
unsigned long _n, _k, _m;
2727

2828
for (_k = nkm->min_k; _k <= nkm->max_k; _k++) {
2929
for (_n = nkm->min_n; _n <= nkm->max_n; _n++) {
3030
for (_m = nkm->min_m; _m <= nkm->max_m; _m++) {
31-
unsigned long tmp_rate;
31+
unsigned long tmp_rate, tmp_parent;
3232

3333
tmp_parent = clk_hw_round_rate(parent_hw, rate * _m / (_n * _k));
34-
3534
tmp_rate = tmp_parent * _n * _k / _m;
3635

3736
if (ccu_is_better_rate(common, rate, tmp_rate, best_rate) ||

include/linux/clk-provider.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -448,8 +448,8 @@ struct clk *clk_register_fixed_rate(struct device *dev, const char *name,
448448
*/
449449
#define clk_hw_register_fixed_rate_with_accuracy_parent_hw(dev, name, \
450450
parent_hw, flags, fixed_rate, fixed_accuracy) \
451-
__clk_hw_register_fixed_rate((dev), NULL, (name), NULL, (parent_hw) \
452-
NULL, NULL, (flags), (fixed_rate), \
451+
__clk_hw_register_fixed_rate((dev), NULL, (name), NULL, (parent_hw), \
452+
NULL, (flags), (fixed_rate), \
453453
(fixed_accuracy), 0, false)
454454
/**
455455
* clk_hw_register_fixed_rate_with_accuracy_parent_data - register fixed-rate

0 commit comments

Comments
 (0)