06 Feb, 2020

1 commit

  • [ Upstream commit 8bea5ac0fbc5b2103f8779ddff216122e3c2e1ad ]

    Determined empirically, no documentation is available.

    The OLPC XO-1.75 laptop used parent 1, that one being VCTCXO/4 (65MHz), but
    thought it's a VCTCXO/2 (130MHz). The mmp2 timer driver, not knowing
    what is going on, ended up just dividing the rate as of
    commit f36797ee4380 ("ARM: mmp/mmp2: dt: enable the clock")'

    Link: https://lore.kernel.org/r/20191218190454.420358-3-lkundrak@v3.sk
    Signed-off-by: Lubomir Rintel
    Acked-by: Stephen Boyd
    Signed-off-by: Olof Johansson
    Signed-off-by: Sasha Levin

    Lubomir Rintel
     

08 Jun, 2019

1 commit


27 Apr, 2019

1 commit

  • This flag was historically used to indicate that a clk is a "basic" type
    of clk like a mux, divider, gate, etc. This never turned out to be very
    useful though because it was hard to cleanly split "basic" clks from
    other clks in a system. This one flag was a way for type introspection
    and it just didn't scale. If anything, it was used by the TI clk driver
    to indicate that a clk_hw wasn't contained in the SoC specific clk
    structure. We can get rid of this define now that TI is finding those
    clks a different way.

    Cc: Tero Kristo
    Cc: Ralf Baechle
    Cc: Paul Burton
    Cc: James Hogan
    Cc:
    Cc: Thierry Reding
    Cc: Kevin Hilman
    Cc:
    Cc:
    Acked-by: Thierry Reding
    Signed-off-by: Stephen Boyd

    Stephen Boyd
     

22 Feb, 2019

1 commit

  • These are in fact two clocks, they shouldn't be exposed as one. One is
    required for accessing LCD controller registers (peripheral clock), while
    other (AXI clock) can be optionally used as a pixel clock source for the
    panel.

    LCDC can alternatively use different clocks than the Display 1 AXI clock
    for generating the pixel clock: the second AXI clock (fixed in this
    commit too), the HDMI PLL, or the AXI bus clock.

    They should really be controlled independently.

    Link: https://lists.freedesktop.org/archives/dri-devel/2019-January/203975.html
    Signed-off-by: Lubomir Rintel
    Signed-off-by: Stephen Boyd

    Lubomir Rintel
     

25 Jan, 2019

1 commit

  • It seems that the kernel has no business managing this clock: once the SP
    clock is disabled, it's not sufficient to just enable in order to bring the
    SP core back up. Just let the firmware keep it enabled and don't expose it
    to drivers.

    This reverts commit fc27c2394d96fd19854b7e2d3f0e60df0d86fc90.

    Link: https://lore.kernel.org/lkml/154783267051.169631.3197836544646625747@swboyd.mtv.corp.google.com/
    Signed-off-by: Lubomir Rintel
    Signed-off-by: Stephen Boyd

    Lubomir Rintel
     

03 Jan, 2019

1 commit

  • Pull input updates from Dmitry Torokhov:
    "A tiny pull request this merge window unfortunately, should get more
    material in for the next release:

    - new driver for Raspberry Pi's touchscreen (firmware interface)

    - miscellaneous input driver fixes"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
    Input: elan_i2c - add ACPI ID for touchpad in ASUS Aspire F5-573G
    Input: atmel_mxt_ts - don't try to free unallocated kernel memory
    Input: drv2667 - fix indentation issues
    Input: touchscreen - fix coding style issue
    Input: add official Raspberry Pi's touchscreen driver
    Input: nomadik-ske-keypad - fix a loop timeout test
    Input: rotary-encoder - don't log EPROBE_DEFER to kernel log
    Input: olpc_apsp - remove set but not used variable 'np'
    Input: olpc_apsp - enable the SP clock
    Input: olpc_apsp - check FIFO status on open(), not probe()
    Input: olpc_apsp - drop CONFIG_OLPC dependency
    clk: mmp2: add SP clock
    dt-bindings: marvell,mmp2: Add clock id for the SP clock
    Input: ad7879 - drop platform data support

    Linus Torvalds
     

04 Dec, 2018

1 commit

  • The > comparison should be >= or we write one element beyond the end of
    the unit->clk_table[] array.

    (The unit->clk_table[] array is allocated in the mmp_clk_init() function
    and it has unit->nr_clks elements).

    Fixes: 4661fda10f8b ("clk: mmp: add basic support functions for DT support")
    Signed-off-by: Dan Carpenter
    Signed-off-by: Stephen Boyd

    Dan Carpenter
     

16 Nov, 2018

1 commit

  • The "security processor", sometimes referred to as "wireless trusted
    module" or "generic encrypt unit" is a low-power core present on MMP2,
    that has nothing to do with security, wireless, trust or encryption.

    On an OLPC machine it runs CForth and serves as a keyboard controller:
    http://dev.laptop.org/git/users/wmb/cforth/tree/src/app/arm-xo-1.75/ps2.fth

    The register address was obtained from the OLPC kernel, since the
    datasheet seems to be the Marvell's most important business secret.

    Signed-off-by: Lubomir Rintel
    Acked-by: Stephen Boyd
    Acked-by: Pavel Machek
    Signed-off-by: Dmitry Torokhov

    Lubomir Rintel
     

18 Oct, 2018

1 commit


18 Nov, 2017

1 commit

  • Pull clk updates from Stephen Boyd:
    "We have two changes to the core framework this time around.

    The first being a large change that introduces runtime PM support to
    the clk framework. Now we properly call runtime PM operations on the
    device providing a clk when the clk is in use. This helps on SoCs
    where the clks provided by a device need something to be powered on
    before using the clks, like power domains or regulators. It also helps
    power those things down when clks aren't in use.

    The other core change is a devm API addition for clk providers so we
    can get rid of a bunch of clk driver remove functions that are just
    doing of_clk_del_provider().

    Outside of the core, we have the usual addition of clk drivers and
    smattering of non-critical fixes to existing drivers. The biggest diff
    is support for Mediatek MT2712 and MT7622 SoCs, but those patches
    really just add a bunch of data.

    By the way, we're trying something new here where we build the tree up
    with topic branches. We plan to work this into our workflow so that we
    don't step on each other's toes, and so the fixes branch can be merged
    on an as-needed basis.

    Summary:

    Core:
    - runtime PM support for clk providers
    - devm API for of_clk_add_hw_provider()

    New Drivers:
    - Mediatek MT2712 and MT7622
    - Renesas R-Car V3M SoC

    Updates:
    - runtime PM support for Samsung exynos5433/exynos4412 providers
    - removal of clkdev aliases on Samsung SoCs
    - convert clk-gpio to use gpio descriptors
    - various driver cleanups to match kernel coding style
    - Amlogic Video Processing Unit VPU and VAPB clks
    - sigma-delta modulation for Allwinner audio PLLs
    - Allwinner A83t Display clks
    - support for the second display unit clock on Renesas RZ/G1E
    - suspend/resume support for Renesas R-Car Gen3 CPG/MSSR
    - new clock ids for Rockchip rk3188 and rk3368 SoCs
    - various 'const' markings on clk_ops structures
    - RPM clk support on Qualcomm MSM8996/MSM8660 SoCs"

    * tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: (137 commits)
    clk: stm32h7: fix test of clock config
    clk: pxa: fix building on older compilers
    clk: sunxi-ng: a83t: Fix i2c buses bits
    clk: ti: dra7-atl-clock: fix child-node lookups
    clk: qcom: common: fix legacy board-clock registration
    clk: uniphier: fix DAPLL2 clock rate of Pro5
    clk: uniphier: fix parent of miodmac clock data
    clk: hi3798cv200: correct parent mux clock for 'clk_sdio0_ciu'
    clk: hisilicon: Delete an error message for a failed memory allocation in hisi_register_clkgate_sep()
    clk: hi3660: fix incorrect uart3 clock freqency
    clk: kona-setup: Delete error messages for failed memory allocations
    ARC: clk: fix spelling mistake: "configurarion" -> "configuration"
    clk: cdce925: remove redundant check for non-null parent_name
    clk: versatile: Improve sizeof() usage
    clk: versatile: Delete error messages for failed memory allocations
    clk: ux500: Improve sizeof() usage
    clk: ux500: Delete error messages for failed memory allocations
    clk: spear: Delete error messages for failed memory allocations
    clk: ti: Delete error messages for failed memory allocations
    clk: mmp: Adjust checks for NULL pointers
    ...

    Linus Torvalds
     

16 Nov, 2017

1 commit

  • * clk-cleanup:
    clk: kona-setup: Delete error messages for failed memory allocations
    ARC: clk: fix spelling mistake: "configurarion" -> "configuration"
    clk: cdce925: remove redundant check for non-null parent_name
    clk: versatile: Improve sizeof() usage
    clk: versatile: Delete error messages for failed memory allocations
    clk: ux500: Improve sizeof() usage
    clk: ux500: Delete error messages for failed memory allocations
    clk: spear: Delete error messages for failed memory allocations
    clk: ti: Delete error messages for failed memory allocations
    clk: mmp: Adjust checks for NULL pointers
    clk: mmp: Use common error handling code in mmp_clk_register_mix()
    clk: mmp: Delete error messages for failed memory allocations
    clk: clk-xgene: Adjust six checks for null pointers
    clk: clk-xgene: Delete error messages for failed memory allocations
    clk: clk-u300: Fix a typo in two comment lines
    clk: clk-u300: Add some spaces for better code readability
    clk: clk-u300: Improve sizeof() usage
    clk: clk-u300: Delete error messages for failed memory allocations
    clk: clk-mux: Improve a size determination in clk_hw_register_mux_table()
    clk: clk-mux: Delete an error message for a failed memory allocation

    Stephen Boyd
     

14 Nov, 2017

3 commits


02 Nov, 2017

2 commits

  • Many source files in the tree are missing licensing information, which
    makes it harder for compliance tools to determine the correct license.

    By default all files without license information are under the default
    license of the kernel, which is GPL version 2.

    Update the files which contain no license information with the 'GPL-2.0'
    SPDX license identifier. The SPDX identifier is a legally binding
    shorthand, which can be used instead of the full boiler plate text.

    This patch is based on work done by Thomas Gleixner and Kate Stewart and
    Philippe Ombredanne.

    How this work was done:

    Patches were generated and checked against linux-4.14-rc6 for a subset of
    the use cases:
    - file had no licensing information it it.
    - file was a */uapi/* one with no licensing information in it,
    - file was a */uapi/* one with existing licensing information,

    Further patches will be generated in subsequent months to fix up cases
    where non-standard license headers were used, and references to license
    had to be inferred by heuristics based on keywords.

    The analysis to determine which SPDX License Identifier to be applied to
    a file was done in a spreadsheet of side by side results from of the
    output of two independent scanners (ScanCode & Windriver) producing SPDX
    tag:value files created by Philippe Ombredanne. Philippe prepared the
    base worksheet, and did an initial spot review of a few 1000 files.

    The 4.13 kernel was the starting point of the analysis with 60,537 files
    assessed. Kate Stewart did a file by file comparison of the scanner
    results in the spreadsheet to determine which SPDX license identifier(s)
    to be applied to the file. She confirmed any determination that was not
    immediately clear with lawyers working with the Linux Foundation.

    Criteria used to select files for SPDX license identifier tagging was:
    - Files considered eligible had to be source code files.
    - Make and config files were included as candidates if they contained >5
    lines of source
    - File already had some variant of a license header in it (even if
    Reviewed-by: Philippe Ombredanne
    Reviewed-by: Thomas Gleixner
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     
  • Make these const as they are only stored in the const field of a
    clk_init_data structure.

    Signed-off-by: Bhumika Goyal
    Signed-off-by: Stephen Boyd

    Bhumika Goyal
     

18 Jul, 2017

1 commit

  • Drop static on a local variable, when the variable is initialized before
    any possible use. Thus, the static has no benefit.

    The semantic patch that fixes this problem is as follows:
    (http://coccinelle.lip6.fr/)

    //
    @bad exists@
    position p;
    identifier x;
    type T;
    @@
    static T x@p;
    ...
    x =

    @@
    identifier x;
    expression e;
    type T;
    position p != bad.p;
    @@
    -static
    T x@p;
    ... when != x
    when strict
    ?x = e;
    //

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

    Julia Lawall
     

09 Dec, 2016

3 commits


02 Nov, 2016

3 commits


15 Sep, 2016

1 commit

  • We get 1 warning when building kernel with W=1:
    drivers/clk/mmp/clk-mmp2.c:75:13: warning: no previous prototype for 'mmp2_clk_init' [-Wmissing-prototypes]

    In fact, this function is declared in linux/clk/mmp.h,
    so this patch add missing header dependencies.

    Signed-off-by: Baoyou Xie
    Acked-by: Arnd Bergmann
    Signed-off-by: Stephen Boyd

    Baoyou Xie
     

16 Apr, 2016

1 commit


30 Mar, 2016

1 commit


02 Dec, 2015

1 commit

  • The mmp clock drivers currently hardcode the physical addresses for
    the clock registers. This is generally a bad idea, and it also gets in
    the way of multiplatform builds, which make the platform header files
    inaccessible to device drivers.

    To work around the header file problem, this patch changes the calling
    convention so the three mmp clock drivers get initialized with the base
    addresses as arguments from the platform code.

    It would still be useful to have a larger rework of the clock drivers,
    with DT integration to let the clocks actually be probed automatically,
    and the base addresses passed as DT properties. I am unsure if anyone
    is still interested in the mmp platform, so it is possible that this
    won't happen.

    Signed-off-by: Arnd Bergmann
    Cc: Mike Turquette
    Cc: Chao Xie
    Cc: Eric Miao
    Cc: Haojian Zhuang

    Arnd Bergmann
     

25 Aug, 2015

2 commits


08 Aug, 2015

1 commit


29 Jul, 2015

1 commit

  • * cleanup-clk-h-includes: (62 commits)
    clk: Remove clk.h from clk-provider.h
    clk: h8300: Remove clk.h and clkdev.h includes
    clk: at91: Include clk.h and slab.h
    clk: ti: Switch clk-provider.h include to clk.h
    clk: pistachio: Include clk.h
    clk: ingenic: Include clk.h
    clk: si570: Include clk.h
    clk: moxart: Include clk.h
    clk: cdce925: Include clk.h
    clk: Include clk.h in clk.c
    clk: zynq: Include clk.h
    clk: ti: Include clk.h
    clk: sunxi: Include clk.h and remove unused clkdev.h includes
    clk: st: Include clk.h
    clk: qcom: Include clk.h
    clk: highbank: Include clk.h
    clk: bcm: Include clk.h
    clk: versatile: Remove clk.h and clkdev.h includes
    clk: ux500: Remove clk.h and clkdev.h includes
    clk: tegra: Properly include clk.h
    ...

    Stephen Boyd
     

28 Jul, 2015

2 commits

  • Some determine_rate implementations are not returning an error
    when they failed to adapt the rate according to the rate request.
    Fix them so that they return an error instead of silently
    returning 0.

    Signed-off-by: Boris Brezillon
    CC: Jonathan Corbet
    CC: Tony Lindgren
    CC: Ralf Baechle
    CC: "Emilio López"
    CC: Maxime Ripard
    Cc: Tero Kristo
    CC: Peter De Schrijver
    CC: Prashant Gaikwad
    CC: Stephen Warren
    CC: Thierry Reding
    CC: Alexandre Courbot
    CC: linux-doc@vger.kernel.org
    CC: linux-kernel@vger.kernel.org
    CC: linux-arm-kernel@lists.infradead.org
    CC: linux-omap@vger.kernel.org
    CC: linux-mips@linux-mips.org
    CC: linux-tegra@vger.kernel.org
    Signed-off-by: Stephen Boyd

    Boris Brezillon
     
  • Clock rates are stored in an unsigned long field, but ->determine_rate()
    (which returns a rounded rate from a requested one) returns a long
    value (errors are reported using negative error codes), which can lead
    to long overflow if the clock rate exceed 2Ghz.

    Change ->determine_rate() prototype to return 0 or an error code, and pass
    a pointer to a clk_rate_request structure containing the expected target
    rate and the rate constraints imposed by clk users.

    The clk_rate_request structure might be extended in the future to contain
    other kind of constraints like the rounding policy, the maximum clock
    inaccuracy or other things that are not yet supported by the CCF
    (power consumption constraints ?).

    Signed-off-by: Boris Brezillon
    CC: Jonathan Corbet
    CC: Tony Lindgren
    CC: Ralf Baechle
    CC: "Emilio López"
    CC: Maxime Ripard
    Acked-by: Tero Kristo
    CC: Peter De Schrijver
    CC: Prashant Gaikwad
    CC: Stephen Warren
    CC: Thierry Reding
    CC: Alexandre Courbot
    CC: linux-doc@vger.kernel.org
    CC: linux-kernel@vger.kernel.org
    CC: linux-arm-kernel@lists.infradead.org
    CC: linux-omap@vger.kernel.org
    CC: linux-mips@linux-mips.org
    CC: linux-tegra@vger.kernel.org
    [sboyd@codeaurora.org: Fix parent dereference problem in
    __clk_determine_rate()]
    Signed-off-by: Stephen Boyd
    Tested-by: Romain Perier
    Signed-off-by: Heiko Stuebner
    [sboyd@codeaurora.org: Folded in fix from Heiko for fixed-rate
    clocks without parents or a rate determining op]
    Signed-off-by: Stephen Boyd

    Boris Brezillon
     

21 Jul, 2015

1 commit

  • Clock provider drivers generally shouldn't include clk.h because
    it's the consumer API. Remove the include here because this is a
    provider driver. The clkdev.h include isn't used either, so drop
    it and add in slab.h to keep things compiling.

    Cc: Chao Xie
    Signed-off-by: Stephen Boyd

    Stephen Boyd
     

05 Jun, 2015

3 commits


16 May, 2015

1 commit

  • Add initial clock support for Marvell PXA1928. The PXA1928 is a mobile
    SOC and is similar to other MMP/PXA series of SOCs, so a lot of the
    existing infrastructure is reused here.

    Currently the PLLs are just fixed clocks, and not all leaf clocks are
    implemented.

    Signed-off-by: Rob Herring
    Cc: Mike Turquette
    Signed-off-by: Stephen Boyd

    Rob Herring
     

15 May, 2015

1 commit

  • drivers/clk/mmp/clk-apbc.c:118:16: warning: symbol 'clk_apbc_ops' was not declared. Should it be static?
    drivers/clk/mmp/clk-apmu.c:64:16: warning: symbol 'clk_apmu_ops' was not declared. Should it be static?

    Cc: Chao Xie
    Signed-off-by: Stephen Boyd

    Stephen Boyd
     

03 Feb, 2015

1 commit

  • Adds a way for clock consumers to set maximum and minimum rates. This
    can be used for thermal drivers to set minimum rates, or by misc.
    drivers to set maximum rates to assure a minimum performance level.

    Changes the signature of the determine_rate callback by adding the
    parameters min_rate and max_rate.

    Signed-off-by: Tomeu Vizoso
    Signed-off-by: Stephen Boyd
    [sboyd@codeaurora.org: set req_rate in __clk_init]
    Signed-off-by: Michael Turquette
    [mturquette@linaro.org: min/max rate for sun6i_ahb1_clk_determine_rate
    migrated clk-private.h changes to clk.c]

    Tomeu Vizoso