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

Merge branches 'clk-renesas', 'clk-cleanup', 'clk-hisilicon', 'clk-mediatek' and 'clk-bulk' into clk-next

- Add a devm_clk_bulk_get_all_enable() API to get and enable all clks
for a device
- Fix some static checker errors in the hisilicon clk driver

* clk-renesas: (25 commits)
clk: renesas: r8a779h0: Add RPC-IF clock
clk: renesas: r8a779h0: Add SYS-DMAC clocks
clk: renesas: r8a779h0: Add SDHI clock
clk: renesas: r8a779h0: Add EtherAVB clocks
clk: renesas: r9a07g04[34]: Fix typo for sel_shdi variable
clk: renesas: r9a07g04[34]: Use SEL_SDHI1_STS status configuration for SD1 mux
clk: renesas: r8a779f0: Correct PFC/GPIO parent clock
clk: renesas: r8a779g0: Correct PFC/GPIO parent clocks
clk: renesas: r8a779h0: Add I2C clocks
clk: renesas: r8a779h0: Add watchdog clock
clk: renesas: r8a779h0: Add PFC/GPIO clocks
clk: renesas: r8a779g0: Fix PCIe clock name
clk: renesas: cpg-mssr: Add support for R-Car V4M
clk: renesas: rcar-gen4: Add support for FRQCRC1
clk: renesas: r9a07g043: Add clock and reset entries for CRU
clk: renesas: r9a08g045: Add clock and reset support for watchdog
dt-bindings: clock: Add R8A779H0 V4M CPG Core Clock Definitions
dt-bindings: clock: renesas,cpg-mssr: Document R-Car V4M support
dt-bindings: power: Add r8a779h0 SYSC power domain definitions
dt-bindings: power: renesas,rcar-sysc: Document R-Car V4M support
...

* clk-cleanup:
clk: zynq: Prevent null pointer dereference caused by kmalloc failure
clk: fractional-divider: Use bit operations consistently
clk: fractional-divider: Move mask calculations out of lock
clk: ti: dpll3xxx: use correct function names in kernel-doc
clk: clocking-wizard: Remove redundant initialization of pointer div_addr
clk: keystone: sci-clk: match func name comment to actual
clk: cdce925: Remove redundant assignment to variable 'rate'
MAINTAINERS: drop Sekhar Nori

* clk-hisilicon:
clk: hisilicon: Use devm_kcalloc() instead of devm_kzalloc()
clk: hisilicon: hi3559a: Fix an erroneous devm_kfree()
clk: hisilicon: hi3519: Release the correct number of gates in hi3519_clk_unregister()

* clk-mediatek:
clk: mediatek: clk-mt8173-apmixedsys: Use common error handling code in clk_mt8173_apmixed_probe()
clk: mediatek: add infracfg reset controller for mt7988
dt-bindings: reset: mediatek: add MT7988 infracfg reset IDs
dt-bindings: clock: mediatek: convert SSUSBSYS to the json-schema clock
dt-bindings: clock: mediatek: convert PCIESYS to the json-schema clock
dt-bindings: clock: mediatek: convert hifsys to the json-schema clock
clk: mediatek: mt7981-topckgen: flag SGM_REG_SEL as critical
clk: mediatek: mt8183: Correct parent of CLK_INFRA_SSPM_32K_SELF
clk: mediatek: mt7622-apmixedsys: Fix an error handling path in clk_mt8135_apmixed_probe()
clk: mediatek: mt8135: Fix an error handling path in clk_mt8135_apmixed_probe()

* clk-bulk:
clk: Provide managed helper to get and enable bulk clocks

+262 -105
+5
CREDITS
··· 2942 2942 S: Reston, Virginia 20191 2943 2943 S: USA 2944 2944 2945 + N: Sekhar Nori 2946 + E: nori.sekhar@gmail.com 2947 + D: Maintainer of Texas Instruments DaVinci machine support, contributor 2948 + D: to device drivers relevant to that SoC family. 2949 + 2945 2950 N: Fredrik Noring 2946 2951 E: noring@nocrew.org 2947 2952 W: http://www.lysator.liu.se/~noring/
-26
Documentation/devicetree/bindings/arm/mediatek/mediatek,hifsys.txt
··· 1 - Mediatek hifsys controller 2 - ============================ 3 - 4 - The Mediatek hifsys controller provides various clocks and reset 5 - outputs to the system. 6 - 7 - Required Properties: 8 - 9 - - compatible: Should be: 10 - - "mediatek,mt2701-hifsys", "syscon" 11 - - "mediatek,mt7622-hifsys", "syscon" 12 - - "mediatek,mt7623-hifsys", "mediatek,mt2701-hifsys", "syscon" 13 - - #clock-cells: Must be 1 14 - 15 - The hifsys controller uses the common clk binding from 16 - Documentation/devicetree/bindings/clock/clock-bindings.txt 17 - The available clocks are defined in dt-bindings/clock/mt*-clk.h. 18 - 19 - Example: 20 - 21 - hifsys: clock-controller@1a000000 { 22 - compatible = "mediatek,mt2701-hifsys", "syscon"; 23 - reg = <0 0x1a000000 0 0x1000>; 24 - #clock-cells = <1>; 25 - #reset-cells = <1>; 26 - };
-25
Documentation/devicetree/bindings/arm/mediatek/mediatek,pciesys.txt
··· 1 - MediaTek PCIESYS controller 2 - ============================ 3 - 4 - The MediaTek PCIESYS controller provides various clocks to the system. 5 - 6 - Required Properties: 7 - 8 - - compatible: Should be: 9 - - "mediatek,mt7622-pciesys", "syscon" 10 - - "mediatek,mt7629-pciesys", "syscon" 11 - - #clock-cells: Must be 1 12 - - #reset-cells: Must be 1 13 - 14 - The PCIESYS controller uses the common clk binding from 15 - Documentation/devicetree/bindings/clock/clock-bindings.txt 16 - The available clocks are defined in dt-bindings/clock/mt*-clk.h. 17 - 18 - Example: 19 - 20 - pciesys: pciesys@1a100800 { 21 - compatible = "mediatek,mt7622-pciesys", "syscon"; 22 - reg = <0 0x1a100800 0 0x1000>; 23 - #clock-cells = <1>; 24 - #reset-cells = <1>; 25 - };
-25
Documentation/devicetree/bindings/arm/mediatek/mediatek,ssusbsys.txt
··· 1 - MediaTek SSUSBSYS controller 2 - ============================ 3 - 4 - The MediaTek SSUSBSYS controller provides various clocks to the system. 5 - 6 - Required Properties: 7 - 8 - - compatible: Should be: 9 - - "mediatek,mt7622-ssusbsys", "syscon" 10 - - "mediatek,mt7629-ssusbsys", "syscon" 11 - - #clock-cells: Must be 1 12 - - #reset-cells: Must be 1 13 - 14 - The SSUSBSYS controller uses the common clk binding from 15 - Documentation/devicetree/bindings/clock/clock-bindings.txt 16 - The available clocks are defined in dt-bindings/clock/mt*-clk.h. 17 - 18 - Example: 19 - 20 - ssusbsys: ssusbsys@1a000000 { 21 - compatible = "mediatek,mt7622-ssusbsys", "syscon"; 22 - reg = <0 0x1a000000 0 0x1000>; 23 - #clock-cells = <1>; 24 - #reset-cells = <1>; 25 - };
+50
Documentation/devicetree/bindings/clock/mediatek,mt2701-hifsys.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/clock/mediatek,mt2701-hifsys.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: MediaTek HIFSYS clock and reset controller 8 + 9 + description: 10 + The MediaTek HIFSYS controller provides various clocks and reset outputs to 11 + the system. 12 + 13 + maintainers: 14 + - Matthias Brugger <matthias.bgg@gmail.com> 15 + 16 + properties: 17 + compatible: 18 + oneOf: 19 + - enum: 20 + - mediatek,mt2701-hifsys 21 + - mediatek,mt7622-hifsys 22 + - items: 23 + - enum: 24 + - mediatek,mt7623-hifsys 25 + - const: mediatek,mt2701-hifsys 26 + 27 + reg: 28 + maxItems: 1 29 + 30 + "#clock-cells": 31 + const: 1 32 + description: The available clocks are defined in dt-bindings/clock/mt*-clk.h 33 + 34 + "#reset-cells": 35 + const: 1 36 + 37 + required: 38 + - reg 39 + - "#clock-cells" 40 + 41 + additionalProperties: false 42 + 43 + examples: 44 + - | 45 + clock-controller@1a000000 { 46 + compatible = "mediatek,mt2701-hifsys"; 47 + reg = <0x1a000000 0x1000>; 48 + #clock-cells = <1>; 49 + #reset-cells = <1>; 50 + };
+45
Documentation/devicetree/bindings/clock/mediatek,mt7622-pciesys.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/clock/mediatek,mt7622-pciesys.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: MediaTek PCIESYS clock and reset controller 8 + 9 + description: 10 + The MediaTek PCIESYS controller provides various clocks to the system. 11 + 12 + maintainers: 13 + - Matthias Brugger <matthias.bgg@gmail.com> 14 + 15 + properties: 16 + compatible: 17 + enum: 18 + - mediatek,mt7622-pciesys 19 + - mediatek,mt7629-pciesys 20 + 21 + reg: 22 + maxItems: 1 23 + 24 + "#clock-cells": 25 + const: 1 26 + description: The available clocks are defined in dt-bindings/clock/mt*-clk.h 27 + 28 + "#reset-cells": 29 + const: 1 30 + 31 + required: 32 + - reg 33 + - "#clock-cells" 34 + - "#reset-cells" 35 + 36 + additionalProperties: false 37 + 38 + examples: 39 + - | 40 + clock-controller@1a100800 { 41 + compatible = "mediatek,mt7622-pciesys"; 42 + reg = <0x1a100800 0x1000>; 43 + #clock-cells = <1>; 44 + #reset-cells = <1>; 45 + };
+45
Documentation/devicetree/bindings/clock/mediatek,mt7622-ssusbsys.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/clock/mediatek,mt7622-ssusbsys.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: MediaTek SSUSBSYS clock and reset controller 8 + 9 + description: 10 + The MediaTek SSUSBSYS controller provides various clocks to the system. 11 + 12 + maintainers: 13 + - Matthias Brugger <matthias.bgg@gmail.com> 14 + 15 + properties: 16 + compatible: 17 + enum: 18 + - mediatek,mt7622-ssusbsys 19 + - mediatek,mt7629-ssusbsys 20 + 21 + reg: 22 + maxItems: 1 23 + 24 + "#clock-cells": 25 + const: 1 26 + description: The available clocks are defined in dt-bindings/clock/mt*-clk.h 27 + 28 + "#reset-cells": 29 + const: 1 30 + 31 + required: 32 + - reg 33 + - "#clock-cells" 34 + - "#reset-cells" 35 + 36 + additionalProperties: false 37 + 38 + examples: 39 + - | 40 + clock-controller@1a000000 { 41 + compatible = "mediatek,mt7622-ssusbsys"; 42 + reg = <0x1a000000 0x1000>; 43 + #clock-cells = <1>; 44 + #reset-cells = <1>; 45 + };
-1
MAINTAINERS
··· 21940 21940 21941 21941 TI DAVINCI SERIES CLOCK DRIVER 21942 21942 M: David Lechner <david@lechnology.com> 21943 - R: Sekhar Nori <nsekhar@ti.com> 21944 21943 S: Maintained 21945 21944 F: Documentation/devicetree/bindings/clock/ti/davinci/ 21946 21945 F: drivers/clk/davinci/
-1
drivers/clk/clk-cdce925.c
··· 101 101 102 102 if (rate <= parent_rate) { 103 103 /* Can always deliver parent_rate in bypass mode */ 104 - rate = parent_rate; 105 104 *n = 0; 106 105 *m = 0; 107 106 } else {
+40
drivers/clk/clk-devres.c
··· 182 182 } 183 183 EXPORT_SYMBOL_GPL(devm_clk_bulk_get_all); 184 184 185 + static void devm_clk_bulk_release_all_enable(struct device *dev, void *res) 186 + { 187 + struct clk_bulk_devres *devres = res; 188 + 189 + clk_bulk_disable_unprepare(devres->num_clks, devres->clks); 190 + clk_bulk_put_all(devres->num_clks, devres->clks); 191 + } 192 + 193 + int __must_check devm_clk_bulk_get_all_enable(struct device *dev, 194 + struct clk_bulk_data **clks) 195 + { 196 + struct clk_bulk_devres *devres; 197 + int ret; 198 + 199 + devres = devres_alloc(devm_clk_bulk_release_all_enable, 200 + sizeof(*devres), GFP_KERNEL); 201 + if (!devres) 202 + return -ENOMEM; 203 + 204 + ret = clk_bulk_get_all(dev, &devres->clks); 205 + if (ret > 0) { 206 + *clks = devres->clks; 207 + devres->num_clks = ret; 208 + } else { 209 + devres_free(devres); 210 + return ret; 211 + } 212 + 213 + ret = clk_bulk_prepare_enable(devres->num_clks, *clks); 214 + if (!ret) { 215 + devres_add(dev, devres); 216 + } else { 217 + clk_bulk_put_all(devres->num_clks, devres->clks); 218 + devres_free(devres); 219 + } 220 + 221 + return ret; 222 + } 223 + EXPORT_SYMBOL_GPL(devm_clk_bulk_get_all_enable); 224 + 185 225 static int devm_clk_match(struct device *dev, void *res, void *data) 186 226 { 187 227 struct clk **c = res;
+7 -7
drivers/clk/clk-fractional-divider.c
··· 140 140 } 141 141 142 142 if (fd->flags & CLK_FRAC_DIVIDER_ZERO_BASED) { 143 - max_m = 1 << fd->mwidth; 144 - max_n = 1 << fd->nwidth; 143 + max_m = BIT(fd->mwidth); 144 + max_n = BIT(fd->nwidth); 145 145 } else { 146 146 max_m = GENMASK(fd->mwidth - 1, 0); 147 147 max_n = GENMASK(fd->nwidth - 1, 0); ··· 182 182 u32 val; 183 183 184 184 if (fd->flags & CLK_FRAC_DIVIDER_ZERO_BASED) { 185 - max_m = 1 << fd->mwidth; 186 - max_n = 1 << fd->nwidth; 185 + max_m = BIT(fd->mwidth); 186 + max_n = BIT(fd->nwidth); 187 187 } else { 188 188 max_m = GENMASK(fd->mwidth - 1, 0); 189 189 max_n = GENMASK(fd->nwidth - 1, 0); ··· 195 195 n--; 196 196 } 197 197 198 + mmask = GENMASK(fd->mwidth - 1, 0) << fd->mshift; 199 + nmask = GENMASK(fd->nwidth - 1, 0) << fd->nshift; 200 + 198 201 if (fd->lock) 199 202 spin_lock_irqsave(fd->lock, flags); 200 203 else 201 204 __acquire(fd->lock); 202 - 203 - mmask = GENMASK(fd->mwidth - 1, 0) << fd->mshift; 204 - nmask = GENMASK(fd->nwidth - 1, 0) << fd->nshift; 205 205 206 206 val = clk_fd_readl(fd); 207 207 val &= ~(mmask | nmask);
+1 -1
drivers/clk/hisilicon/clk-hi3519.c
··· 130 130 of_clk_del_provider(pdev->dev.of_node); 131 131 132 132 hisi_clk_unregister_gate(hi3519_gate_clks, 133 - ARRAY_SIZE(hi3519_mux_clks), 133 + ARRAY_SIZE(hi3519_gate_clks), 134 134 crg->clk_data); 135 135 hisi_clk_unregister_mux(hi3519_mux_clks, 136 136 ARRAY_SIZE(hi3519_mux_clks),
+1 -3
drivers/clk/hisilicon/clk-hi3559a.c
··· 461 461 struct clk_init_data init; 462 462 int i; 463 463 464 - p_clk = devm_kzalloc(dev, sizeof(*p_clk) * nums, GFP_KERNEL); 465 - 464 + p_clk = devm_kcalloc(dev, nums, sizeof(*p_clk), GFP_KERNEL); 466 465 if (!p_clk) 467 466 return; 468 467 ··· 490 491 491 492 clk = clk_register(NULL, &p_clk->hw); 492 493 if (IS_ERR(clk)) { 493 - devm_kfree(dev, p_clk); 494 494 dev_err(dev, "%s: failed to register clock %s\n", 495 495 __func__, clks[i].name); 496 496 continue;
+1 -1
drivers/clk/keystone/sci-clk.c
··· 272 272 }; 273 273 274 274 /** 275 - * _sci_clk_get - Gets a handle for an SCI clock 275 + * _sci_clk_build - Gets a handle for an SCI clock 276 276 * @provider: Handle to SCI clock provider 277 277 * @sci_clk: Handle to the SCI clock to populate 278 278 *
-1
drivers/clk/mediatek/clk-mt7622-apmixedsys.c
··· 127 127 of_clk_del_provider(node); 128 128 mtk_clk_unregister_gates(apmixed_clks, ARRAY_SIZE(apmixed_clks), clk_data); 129 129 mtk_clk_unregister_plls(plls, ARRAY_SIZE(plls), clk_data); 130 - mtk_free_clk_data(clk_data); 131 130 } 132 131 133 132 static const struct of_device_id of_match_clk_mt7622_apmixed[] = {
+3 -2
drivers/clk/mediatek/clk-mt7981-topckgen.c
··· 357 357 MUX_GATE_CLR_SET_UPD(CLK_TOP_SGM_325M_SEL, "sgm_325m_sel", 358 358 sgm_325m_parents, 0x050, 0x054, 0x058, 8, 1, 15, 359 359 0x1C0, 21), 360 - MUX_GATE_CLR_SET_UPD(CLK_TOP_SGM_REG_SEL, "sgm_reg_sel", sgm_reg_parents, 361 - 0x050, 0x054, 0x058, 16, 1, 23, 0x1C0, 22), 360 + MUX_GATE_CLR_SET_UPD_FLAGS(CLK_TOP_SGM_REG_SEL, "sgm_reg_sel", sgm_reg_parents, 361 + 0x050, 0x054, 0x058, 16, 1, 23, 0x1C0, 22, 362 + CLK_IS_CRITICAL | CLK_SET_RATE_PARENT), 362 363 MUX_GATE_CLR_SET_UPD(CLK_TOP_EIP97B_SEL, "eip97b_sel", eip97b_parents, 363 364 0x050, 0x054, 0x058, 24, 3, 31, 0x1C0, 23), 364 365 /* CLK_CFG_6 */
+23
drivers/clk/mediatek/clk-mt7988-infracfg.c
··· 14 14 #include "clk-gate.h" 15 15 #include "clk-mux.h" 16 16 #include <dt-bindings/clock/mediatek,mt7988-clk.h> 17 + #include <dt-bindings/reset/mediatek,mt7988-resets.h> 18 + 19 + #define MT7988_INFRA_RST0_SET_OFFSET 0x70 20 + #define MT7988_INFRA_RST1_SET_OFFSET 0x80 17 21 18 22 static DEFINE_SPINLOCK(mt7988_clk_lock); 19 23 ··· 253 249 GATE_INFRA3(CLK_INFRA_133M_PCIE_CK_P3, "infra_133m_pcie_ck_p3", "sysaxi_sel", 31), 254 250 }; 255 251 252 + static u16 infra_rst_ofs[] = { 253 + MT7988_INFRA_RST0_SET_OFFSET, 254 + MT7988_INFRA_RST1_SET_OFFSET, 255 + }; 256 + 257 + static u16 infra_idx_map[] = { 258 + [MT7988_INFRA_RST0_PEXTP_MAC_SWRST] = 0 * RST_NR_PER_BANK + 6, 259 + [MT7988_INFRA_RST1_THERM_CTRL_SWRST] = 1 * RST_NR_PER_BANK + 9, 260 + }; 261 + 262 + static struct mtk_clk_rst_desc infra_rst_desc = { 263 + .version = MTK_RST_SET_CLR, 264 + .rst_bank_ofs = infra_rst_ofs, 265 + .rst_bank_nr = ARRAY_SIZE(infra_rst_ofs), 266 + .rst_idx_map = infra_idx_map, 267 + .rst_idx_map_nr = ARRAY_SIZE(infra_idx_map), 268 + }; 269 + 256 270 static const struct mtk_clk_desc infra_desc = { 257 271 .clks = infra_clks, 258 272 .num_clks = ARRAY_SIZE(infra_clks), 259 273 .mux_clks = infra_muxes, 260 274 .num_mux_clks = ARRAY_SIZE(infra_muxes), 261 275 .clk_lock = &mt7988_clk_lock, 276 + .rst_desc = &infra_rst_desc, 262 277 }; 263 278 264 279 static const struct of_device_id of_match_clk_mt7988_infracfg[] = {
+3 -1
drivers/clk/mediatek/clk-mt8135-apmixedsys.c
··· 59 59 60 60 ret = mtk_clk_register_plls(node, plls, ARRAY_SIZE(plls), clk_data); 61 61 if (ret) 62 - return ret; 62 + goto free_clk_data; 63 63 64 64 ret = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data); 65 65 if (ret) ··· 69 69 70 70 unregister_plls: 71 71 mtk_clk_unregister_plls(plls, ARRAY_SIZE(plls), clk_data); 72 + free_clk_data: 73 + mtk_free_clk_data(clk_data); 72 74 73 75 return ret; 74 76 }
+3 -2
drivers/clk/mediatek/clk-mt8173-apmixedsys.c
··· 152 152 153 153 clk_data = mtk_alloc_clk_data(CLK_APMIXED_NR_CLK); 154 154 if (IS_ERR_OR_NULL(clk_data)) { 155 - iounmap(base); 156 - return -ENOMEM; 155 + r = -ENOMEM; 156 + goto unmap_io; 157 157 } 158 158 159 159 fhctl_parse_dt(fhctl_node, pllfhs, ARRAY_SIZE(pllfhs)); ··· 188 188 ARRAY_SIZE(pllfhs), clk_data); 189 189 free_clk_data: 190 190 mtk_free_clk_data(clk_data); 191 + unmap_io: 191 192 iounmap(base); 192 193 return r; 193 194 }
+1 -1
drivers/clk/mediatek/clk-mt8183.c
··· 790 790 /* infra_sspm_26m_self is main clock in co-processor, should not be closed in Linux. */ 791 791 GATE_INFRA3_FLAGS(CLK_INFRA_SSPM_26M_SELF, "infra_sspm_26m_self", "f_f26m_ck", 3, CLK_IS_CRITICAL), 792 792 /* infra_sspm_32k_self is main clock in co-processor, should not be closed in Linux. */ 793 - GATE_INFRA3_FLAGS(CLK_INFRA_SSPM_32K_SELF, "infra_sspm_32k_self", "f_f26m_ck", 4, CLK_IS_CRITICAL), 793 + GATE_INFRA3_FLAGS(CLK_INFRA_SSPM_32K_SELF, "infra_sspm_32k_self", "clk32k", 4, CLK_IS_CRITICAL), 794 794 GATE_INFRA3(CLK_INFRA_UFS_AXI, "infra_ufs_axi", "axi_sel", 5), 795 795 GATE_INFRA3(CLK_INFRA_I2C6, "infra_i2c6", "i2c_sel", 6), 796 796 GATE_INFRA3(CLK_INFRA_AP_MSDC0, "infra_ap_msdc0", "msdc50_hclk_sel", 7),
+2 -2
drivers/clk/ti/dpll3xxx.c
··· 928 928 } 929 929 930 930 /** 931 - * omap3_non_core_dpll_save_context - Save the m and n values of the divider 931 + * omap3_noncore_dpll_save_context - Save the m and n values of the divider 932 932 * @hw: pointer struct clk_hw 933 933 * 934 934 * Before the dpll registers are lost save the last rounded rate m and n ··· 957 957 } 958 958 959 959 /** 960 - * omap3_core_dpll_restore_context - restore the m and n values of the divider 960 + * omap3_noncore_dpll_restore_context - restore the m and n values of the divider 961 961 * @hw: pointer struct clk_hw 962 962 * 963 963 * Restore the last rounded rate m and n
+1 -1
drivers/clk/xilinx/clk-xlnx-clock-wizard.c
··· 498 498 { 499 499 struct clk_wzrd_divider *divider = to_clk_wzrd_divider(hw); 500 500 unsigned long vco_freq, rate_div, clockout0_div; 501 - void __iomem *div_addr = divider->base; 501 + void __iomem *div_addr; 502 502 u32 reg, pre, f; 503 503 int err; 504 504
+3 -5
drivers/clk/zynq/clkc.c
··· 42 42 #define SLCR_SWDT_CLK_SEL (zynq_clkc_base + 0x204) 43 43 44 44 #define NUM_MIO_PINS 54 45 + #define CLK_NAME_LEN 16 45 46 46 47 #define DBG_CLK_CTRL_CLKACT_TRC BIT(0) 47 48 #define DBG_CLK_CTRL_CPU_1XCLKACT BIT(1) ··· 216 215 int i; 217 216 u32 tmp; 218 217 int ret; 219 - char *clk_name; 218 + char clk_name[CLK_NAME_LEN]; 220 219 unsigned int fclk_enable = 0; 221 220 const char *clk_output_name[clk_max]; 222 221 const char *cpu_parents[4]; ··· 427 426 "gem1_emio_mux", CLK_SET_RATE_PARENT, 428 427 SLCR_GEM1_CLK_CTRL, 0, 0, &gem1clk_lock); 429 428 430 - tmp = strlen("mio_clk_00x"); 431 - clk_name = kmalloc(tmp, GFP_KERNEL); 432 429 for (i = 0; i < NUM_MIO_PINS; i++) { 433 430 int idx; 434 431 435 - snprintf(clk_name, tmp, "mio_clk_%2.2d", i); 432 + snprintf(clk_name, CLK_NAME_LEN, "mio_clk_%2.2d", i); 436 433 idx = of_property_match_string(np, "clock-names", clk_name); 437 434 if (idx >= 0) 438 435 can_mio_mux_parents[i] = of_clk_get_parent_name(np, ··· 438 439 else 439 440 can_mio_mux_parents[i] = dummy_nm; 440 441 } 441 - kfree(clk_name); 442 442 clk_register_mux(NULL, "can_mux", periph_parents, 4, 443 443 CLK_SET_RATE_NO_REPARENT, SLCR_CAN_CLK_CTRL, 4, 2, 0, 444 444 &canclk_lock);
+6
include/dt-bindings/reset/mediatek,mt7988-resets.h
··· 10 10 /* ETHWARP resets */ 11 11 #define MT7988_ETHWARP_RST_SWITCH 0 12 12 13 + /* INFRA resets */ 14 + #define MT7988_INFRA_RST0_PEXTP_MAC_SWRST 0 15 + #define MT7988_INFRA_RST1_THERM_CTRL_SWRST 1 16 + 17 + 13 18 #endif /* _DT_BINDINGS_RESET_CONTROLLER_MT7988 */ 19 +
+22
include/linux/clk.h
··· 479 479 struct clk_bulk_data **clks); 480 480 481 481 /** 482 + * devm_clk_bulk_get_all_enable - Get and enable all clocks of the consumer (managed) 483 + * @dev: device for clock "consumer" 484 + * @clks: pointer to the clk_bulk_data table of consumer 485 + * 486 + * Returns success (0) or negative errno. 487 + * 488 + * This helper function allows drivers to get all clocks of the 489 + * consumer and enables them in one operation with management. 490 + * The clks will automatically be disabled and freed when the device 491 + * is unbound. 492 + */ 493 + 494 + int __must_check devm_clk_bulk_get_all_enable(struct device *dev, 495 + struct clk_bulk_data **clks); 496 + 497 + /** 482 498 * devm_clk_get - lookup and obtain a managed reference to a clock producer. 483 499 * @dev: device for clock "consumer" 484 500 * @id: clock consumer ID ··· 981 965 struct clk_bulk_data **clks) 982 966 { 983 967 968 + return 0; 969 + } 970 + 971 + static inline int __must_check devm_clk_bulk_get_all_enable(struct device *dev, 972 + struct clk_bulk_data **clks) 973 + { 984 974 return 0; 985 975 } 986 976