14 Oct, 2020

1 commit


28 Jul, 2020

1 commit


07 May, 2020

1 commit


31 Jan, 2020

1 commit


08 Aug, 2019

1 commit

  • drivers/clk/clk-qoriq.c:138:38: warning: unused variable
    'p5020_cmux_grp1' [-Wunused-const-variable] static const struct
    clockgen_muxinfo p5020_cmux_grp1

    drivers/clk/clk-qoriq.c:146:38: warning: unused variable
    'p5020_cmux_grp2' [-Wunused-const-variable] static const struct
    clockgen_muxinfo p5020_cmux_grp2

    In the definition of the p5020 chip, the p2041 chip's info was used
    instead. The p5020 and p2041 chips have different info. This is most
    likely a typo.

    Link: https://github.com/ClangBuiltLinux/linux/issues/525
    Cc: clang-built-linux@googlegroups.com
    Signed-off-by: Nathan Huckleberry
    Link: https://lkml.kernel.org/r/20190627220642.78575-1-nhuck@google.com
    Reviewed-by: Nick Desaulniers
    Acked-by: Scott Wood
    Signed-off-by: Stephen Boyd

    Nathan Huckleberry
     

18 Jul, 2019

1 commit

  • Pull clk updates from Stephen Boyd:
    "This round of clk driver and framework updates is heavy on the driver
    update side. The two main highlights in the core framework are the
    addition of an bulk clk_get API that handles optional clks and an
    extra debugfs file that tells the developer about the current parent
    of a clk.

    The driver updates are dominated by i.MX in the diffstat, but that is
    mostly because that SoC has started converting to the clk_hw style of
    clk registration. The next big update is in the Amlogic meson clk
    driver that gained some support for audio, cpu, and temperature clks
    while fixing some PLL issues. Finally, the biggest thing that stands
    out is the conversion of a large part of the Allwinner sunxi-ng driver
    to the new clk parent scheme that uses less strings and more pointer
    comparisons to match clk parents and children up.

    In general, it looks like we have a lot of little fixes and tweaks
    here and there to clk data along with the normal addition of a handful
    of new drivers and a couple new core framework features.

    Core:
    - Add a 'clk_parent' file in clk debugfs
    - Add a clk_bulk_get_optional() API (with devm too)

    New Drivers:
    - Support gated clk controller on MIPS based BCM63XX SoCs
    - Support SiLabs Si5341 and Si5340 chips
    - Support for CPU clks on Raspberry Pi devices
    - Audsys clock driver for MediaTek MT8516 SoCs

    Updates:
    - Convert a large portion of the Allwinner sunxi-ng driver to new clk parent scheme
    - Small frequency support for SiLabs Si544 chips
    - Slow clk support for AT91 SAM9X60 SoCs
    - Remove dead code in various clk drivers (-Wunused)
    - Support for Marvell 98DX1135 SoCs
    - Get duty cycle of generic pwm clks
    - Improvement in mmc phase calculation and cleanup of some rate defintions
    - Switch i.MX6 and i.MX7 clock drivers to clk_hw based APIs
    - Add GPIO, SNVS and GIC clocks for i.MX8 drivers
    - Mark imx6sx/ul/ull/sll MMDC_P1_IPG and imx8mm DRAM_APB as critical clock
    - Correct imx7ulp nic1_bus_clk and imx8mm audio_pll2_clk clock setting
    - Add clks for new Exynos5422 Dynamic Memory Controller driver
    - Clock definition for Exynos4412 Mali
    - Add CMM (Color Management Module) clocks on Renesas R-Car H3, M3-N, E3, and D3
    - Add TPU (Timer Pulse Unit / PWM) clocks on Renesas RZ/G2M
    - Support for 32 bit clock IDs in TI's sci-clks for J721e SoCs
    - TI clock probing done from DT by default instead of firmware
    - Fix Amlogic Meson mpll fractional part and spread sprectrum issues
    - Add Amlogic meson8 audio clocks
    - Add Amlogic g12a temperature sensors clocks
    - Add Amlogic g12a and g12b cpu clocks
    - Add TPU (Timer Pulse Unit / PWM) clocks on Renesas R-Car H3, M3-W, and M3-N
    - Add CMM (Color Management Module) clocks on Renesas R-Car M3-W
    - Add Clock Domain support on Renesas RZ/N1"

    * tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: (190 commits)
    clk: consoldiate the __clk_get_hw() declarations
    clk: sprd: Add check for return value of sprd_clk_regmap_init()
    clk: lochnagar: Update DT binding doc to include the primary SPDIF MCLK
    clk: Add Si5341/Si5340 driver
    dt-bindings: clock: Add silabs,si5341
    clk: clk-si544: Implement small frequency change support
    clk: add BCM63XX gated clock controller driver
    devicetree: document the BCM63XX gated clock bindings
    clk: at91: sckc: use dedicated functions to unregister clock
    clk: at91: sckc: improve error path for sama5d4 sck registration
    clk: at91: sckc: remove unnecessary line
    clk: at91: sckc: improve error path for sam9x5 sck register
    clk: at91: sckc: add support to free slow clock osclillator
    clk: at91: sckc: add support to free slow rc oscillator
    clk: at91: sckc: add support to free slow oscillator
    clk: rockchip: export HDMIPHY clock on rk3228
    clk: rockchip: add watchdog pclk on rk3328
    clk: rockchip: add clock id for hdmi_phy special clock on rk3228
    clk: rockchip: add clock id for watchdog pclk on rk3328
    clk: at91: sckc: add support for SAM9X60
    ...

    Linus Torvalds
     

26 Jun, 2019

1 commit

  • Add clockgen support and configuration for NXP SoC lx2160a
    with compatible property as "fsl,lx2160a-clockgen".

    Signed-off-by: Tang Yuantian
    Signed-off-by: Yogesh Gaur
    Signed-off-by: Vabhav Sharma
    Acked-by: Scott Wood
    Acked-by: Stephen Boyd
    Acked-by: Viresh Kumar
    Signed-off-by: Stephen Boyd

    Vabhav Sharma
     

19 Jun, 2019

1 commit

  • Based on 2 normalized pattern(s):

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license version 2 as
    published by the free software foundation

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license version 2 as
    published by the free software foundation #

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-only

    has been chosen to replace the boilerplate/reference in 4122 file(s).

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Enrico Weigelt
    Reviewed-by: Kate Stewart
    Reviewed-by: Allison Randal
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190604081206.933168790@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     

26 Apr, 2019

3 commits


09 Mar, 2019

2 commits

  • …k-SA-fixes' into clk-next

    - Updates for qcom MSM8998 GCC clks
    - qcom MSM8998 RPM managed clks
    - Random static analysis fixes for clk drivers

    * clk-qcom-msm8998:
    clk: qcom: Make common clk_hw registrations
    clk: qcom: smd: Add support for MSM8998 rpm clocks
    clk: qcom: Skip halt checks on gcc_usb3_phy_pipe_clk for 8998
    clk: qcom: Add missing freq for usb30_master_clk on 8998
    clk: qcom: Add CLK_SET_RATE_PARENT for 8998 branch clocks

    * clk-fractional-parent:
    clk: fractional-divider: check parent rate only if flag is set

    * clk-x86-mv:
    clk: x86: Move clk-lpss.h to platform_data/x86

    * clk-SA-fixes:
    clk: mediatek: fix platform_no_drv_owner.cocci warnings
    clk: tegra: dfll: Fix debugfs_simple_attr.cocci warnings
    clk: qoriq: Improve an error message

    Stephen Boyd
     
  • …k-socfpga-parent' and 'clk-struct-size' into clk-next

    - Various DT of_node refcount fixes
    - Support for fixed rate clks populated from an MMIO register
    - Remove clps711x driver as the board support is gone

    * clk-of-refcount:
    clk: dove: fix refcount leak in dove_clk_init()
    clk: mv98dx3236: fix refcount leak in mv98dx3236_clk_init()
    clk: armada-xp: fix refcount leak in axp_clk_init()
    clk: kirkwood: fix refcount leak in kirkwood_clk_init()
    clk: armada-370: fix refcount leak in a370_clk_init()
    clk: vf610: fix refcount leak in vf610_clocks_init()
    clk: imx7d: fix refcount leak in imx7d_clocks_init()
    clk: imx6sx: fix refcount leak in imx6sx_clocks_init()
    clk: imx6q: fix refcount leak in imx6q_clocks_init()
    clk: samsung: exynos4: fix refcount leak in exynos4_get_xom()
    clk: socfpga: fix refcount leak
    clk: ti: fix refcount leak in ti_dt_clocks_register()
    clk: qoriq: fix refcount leak in clockgen_init()
    clk: highbank: fix refcount leak in hb_clk_init()

    * clk-mmio-fixed-clock:
    clk: Add Fixed MMIO clock driver
    dt-bindings: clk: Add bindings for Fixed MMIO clock

    * clk-remove-clps:
    clk: clps711x: Remove board support

    * clk-socfpga-parent:
    clk: socfpga: Don't have get_parent for single parent ops

    * clk-struct-size:
    clk: imx: imx7ulp: use struct_size() in kzalloc()

    Stephen Boyd
     

23 Feb, 2019

1 commit


29 Dec, 2018

1 commit

  • The of_find_compatible_node() returns a node pointer with refcount
    incremented, but there is the lack of use of the of_node_put() when
    done. Add the missing of_node_put() to release the refcount.

    Signed-off-by: Yangtao Li
    Fixes: 0dfc86b3173f ("clk: qoriq: Move chip-specific knowledge into driver")
    Signed-off-by: Stephen Boyd

    Yangtao Li
     

09 Nov, 2018

1 commit


31 Aug, 2018

1 commit

  • In preparation to remove the node name pointer from struct device_node,
    convert printf users to use the %pOFn format specifier.

    Cc: Eugeniy Paltsev
    Cc: Michael Turquette
    Cc: Stephen Boyd
    Cc: linux-clk@vger.kernel.org
    Cc: linux-arm-kernel@lists.infradead.org
    Cc: linux-renesas-soc@vger.kernel.org
    Cc: linux-omap@vger.kernel.org
    Signed-off-by: Rob Herring
    Signed-off-by: Stephen Boyd

    Rob Herring
     

22 Dec, 2017

1 commit


22 Jul, 2017

3 commits

  • Now that we have a custom printf format specifier, convert users of
    full_name to use %pOF instead. This is preparation to remove storing
    of the full path string for each node.

    Signed-off-by: Rob Herring
    Cc: Michael Turquette
    Cc: Stephen Boyd
    Cc: Maxime Coquelin
    Cc: Alexandre Torgue
    Cc: Russell King
    Cc: Matthias Brugger
    Cc: Geert Uytterhoeven
    Cc: Maxime Ripard
    Cc: Chen-Yu Tsai
    Cc: "Emilio López"
    Cc: Peter De Schrijver
    Cc: Prashant Gaikwad
    Cc: Thierry Reding
    Cc: Jonathan Hunter
    Cc: Tero Kristo
    Cc: linux-clk@vger.kernel.org
    Cc: linux-arm-kernel@lists.infradead.org
    Cc: linux-mediatek@lists.infradead.org
    Cc: linux-renesas-soc@vger.kernel.org
    Cc: linux-tegra@vger.kernel.org
    Cc: linux-omap@vger.kernel.org
    Acked-by: Maxime Ripard
    Reviewed-by: Geert Uytterhoeven
    Acked-by: Geert Uytterhoeven
    Acked-by: James Liao
    Acked-by: Alexandre TORGUE
    Reviewed-by: Matthias Brugger
    Signed-off-by: Stephen Boyd

    Rob Herring
     
  • Register each PLL and its division clocks to clock
    lookup table to facilitate the clock look up for
    clock consumer.

    Signed-off-by: Tang Yuantian
    Signed-off-by: Stephen Boyd

    Yuantian Tang
     
  • Clock on ls1088a chip takes primary clocking input from the external
    SYSCLK signal. The SYSCLK input (frequency) is multiplied using
    multiple phase locked loops (PLL) to create a variety of frequencies
    which can then be passed to a variety of internal logic, including
    cores and peripheral IP modules.

    Signed-off-by: Tang Yuantian
    Signed-off-by: Stephen Boyd

    Yuantian Tang
     

01 Jun, 2017

1 commit

  • ls1012a has separate input root clocks for core PLLs versus the
    platform PLL, with the latter described as sysclk in the hw docs.
    If a second input clock, named "coreclk", is present, this clock will be
    used for the core PLLs.

    Signed-off-by: Scott Wood
    Signed-off-by: Tang Yuantian
    Acked-by: Rob Herring
    Signed-off-by: Stephen Boyd

    Scott Wood
     

09 Dec, 2016

1 commit


02 Nov, 2016

3 commits

  • * clk-fixes:
    clk: mmp: pxa910: fix return value check in pxa910_clk_init()
    clk: mmp: pxa168: fix return value check in pxa168_clk_init()
    clk: mmp: mmp2: fix return value check in mmp2_clk_init()
    clk: qoriq: Don't allow CPU clocks higher than starting value

    Stephen Boyd
     
  • Signed-off-by: Mingkai Hu
    Signed-off-by: Shaohui Xie
    Signed-off-by: Stephen Boyd

    Mingkai Hu
     
  • The boot-time frequency of a CPU is considered its rated maximum, as we
    have no other source of such information. However, this was previously
    only used for chips with 80% restrictions on secondary PLLs. This
    usually wasn't a problem because most chips/configs boot with a divider
    of /1, with other dividers being used only for dynamic frequency
    reduction. However, at least one config (LS1021A at less than 1 GHz)
    uses a different divider for top speed. This was causing cpufreq to set
    a frequency beyond the chip's rated speed.

    This is fixed by applying a 100%-of-initial-speed limit to all CPU PLLs,
    similar to the existing 80% limit that only applied to some.

    Signed-off-by: Scott Wood
    Cc: stable@vger.kernel.org
    Signed-off-by: Stephen Boyd

    Scott Wood
     

19 Aug, 2016

1 commit

  • The offset of Core Cluster clock control/status register
    on cluster group V3 version is different from others, and
    should be plus 0x70000.

    Signed-off-by: Tang Yuantian
    Reviewed-by: Scott Wood
    Fixes: 9e19ca2f627e ("clk: qoriq: Add ls2080a support.")
    Signed-off-by: Stephen Boyd

    Tang Yuantian
     

20 Apr, 2016

1 commit

  • Add __init attribute on a function that is only called from other __init
    functions and that is not inlined, at least with gcc version 4.8.4 on an
    x86 machine with allyesconfig. Currently, the function is put in the
    .text.unlikely segment. Declaring it as __init will cause it to be put in
    the .init.text and to disappear after initialization.

    The result of objdump -x on the function before the change is as follows:

    0000000000000000 l F .text.unlikely 0000000000000071 sysclk_from_fixed.constprop.5

    And after the change it is as follows:

    0000000000000480 l F .init.text 000000000000006c sysclk_from_fixed.constprop.5

    Done with the help of Coccinelle. The semantic patch checks for local
    static non-init functions that are called from an __init function and are
    not called from any other function.

    Signed-off-by: Julia Lawall
    Signed-off-by: Stephen Boyd

    Julia Lawall
     

16 Apr, 2016

1 commit


01 Dec, 2015

1 commit

  • If get_pll_div() fails we exited by returning NULL but we missed
    releasing hwc.

    Signed-off-by: Sudip Mukherjee
    Fixes: 0dfc86b3173f ("clk: qoriq: Move chip-specific knowledge into driver")
    Signed-off-by: Stephen Boyd

    Sudip Mukherjee
     

27 Oct, 2015

1 commit


23 Oct, 2015

1 commit


22 Oct, 2015

2 commits

  • LS2080A is the first implementation of the chassis 3 clockgen, which
    has a different register layout than previous chips. It is also little
    endian, unlike previous chips.

    Signed-off-by: Scott Wood
    Acked-by: Stephen Boyd

    Scott Wood
     
  • The device tree should describe the chips (or chip-like subblocks) in
    the system, but it generally does not describe individual registers --
    it should identify, rather than describe, a programming interface.

    This has not been the case with the QorIQ clockgen nodes. The
    knowledge of what each bit setting of CLKCnCSR means is encoded in
    three places (binding, pll node, and mux node), and the last also needs
    to know which options are valid on a particular chip. All three of
    these locations are considered stable ABI, making it difficult to fix
    mistakes (of which I have found several), much less refactor the
    abstraction to be able to address problems, limitations, or new chips.

    Under the current binding, a pll clock specifier of 2 means that the
    PLL is divided by 4 -- and the driver implements this, unless there
    happen to be four clock-output-names rather than 3, in which case it
    interprets it as PLL divided by 3. This does not appear in the binding
    documentation at all. That hack is now considered stable ABI.

    The current device tree nodes contain errors, such as saying that
    T1040 can set a core clock to PLL/4 when only PLL and PLL/2 are options.
    The current binding also ignores some restrictions on clock selection,
    such as p5020's requirement that if a core uses the "wrong" PLL, that
    PLL must be clocked lower than the "correct" PLL and be at most 80% of
    the rated CPU frequency.

    Possibly because of the lack of the ability to express such nuance in
    the binding, some valid options are omitted from the device trees, such
    as the ability on p4080 to run cores 0-3 from PLL3 and cores 4-7 from
    PLL1 (again, only if they are at most 80% of rated CPU frequency).
    This omission, combined with excessive caution in the cpufreq driver
    (addressed in a subsequent patch), means that currently on a 1500 MHz
    p4080 with typical PLL configuration, cpufreq can lower the frequency
    to 1200 MHz on half the CPUs and do nothing on the others. With this
    patchset, all CPUs can be lowered to 1200 MHz on a rev2 p4080, and on a
    rev3 p4080 half can be lowered to 750 MHz and the other half to 600
    MHz.

    The current binding only deals with CPU clocks. To describe FMan in
    the device tree, we need to describe its clock. Some chips have
    additional muxes that work like the CPU muxes, but are not described in
    the device tree. Others require inspecting the Reset Control Word to
    determine which PLL is used. Rather than continue to extend this mess,
    replace it. Have the driver bind to the chip-specific clockgen
    compatible, and keep the detailed description of quirky chip variations
    in the driver, where it can be easily fixed, refactored, and extended.

    Older device trees will continue to work (including a workaround for
    old ls1021a device trees that are missing compatible and reg in the
    clockgen node, which even the old binding required). The pll/mux
    details in old device trees will be ignored, but "clocks" properties
    pointing at the old nodes will still work, and be directed at the
    corresponding new clock.

    Signed-off-by: Scott Wood
    Acked-by: Stephen Boyd

    Scott Wood
     

19 Feb, 2015

1 commit


29 Jan, 2015

5 commits

  • Currently a mix of clk-qoriq/qoriq-clk and no prefix is used

    Signed-off-by: Emil Medve
    Signed-off-by: Michael Turquette

    Emil Medve
     
  • Where the memset() is not necessary

    Signed-off-by: Emil Medve
    Signed-off-by: Michael Turquette

    Emil Medve
     
  • drivers/clk/clk-qoriq.c:59:22: warning: symbol 'cmux_ops' was not declared. Should it be static?

    Signed-off-by: Emil Medve
    Signed-off-by: Michael Turquette

    Emil Medve
     
  • WARNING:OOM_MESSAGE: Possible unnecessary 'out of memory' message
    + if (!parent_names) {
    + pr_err("%s: could not allocate parent_names\n", __func__);

    WARNING:OOM_MESSAGE: Possible unnecessary 'out of memory' message
    + if (!cmux_clk) {
    + pr_err("%s: could not allocate cmux_clk\n", __func__);

    WARNING:OOM_MESSAGE: Possible unnecessary 'out of memory' message
    + if (!subclks) {
    + pr_err("%s: could not allocate subclks\n", __func__);

    WARNING:OOM_MESSAGE: Possible unnecessary 'out of memory' message
    + if (!onecell_data) {
    + pr_err("%s: could not allocate onecell_data\n", __func__);

    Signed-off-by: Emil Medve
    Signed-off-by: Michael Turquette

    Emil Medve
     
  • CHECK:ALLOC_SIZEOF_STRUCT: Prefer kzalloc(sizeof(*cmux_clk)...) over kzalloc(sizeof(struct cmux_clk)...)
    + cmux_clk = kzalloc(sizeof(struct cmux_clk), GFP_KERNEL);

    CHECK:ALLOC_SIZEOF_STRUCT: Prefer kzalloc(sizeof(*onecell_data)...) over kzalloc(sizeof(struct clk_onecell_data)...)
    + onecell_data = kzalloc(sizeof(struct clk_onecell_data), GFP_KERNEL);

    Signed-off-by: Emil Medve
    Signed-off-by: Michael Turquette

    Emil Medve