29 Jan, 2018

2 commits

  • Linux uses the properties 'assigned-clocks', 'assigned-clock-parents'
    and 'assigned-clock-rates' to configure the clock subsystem for use
    with various peripheral nodes.

    This implements clk_set_defaults() and hooks it up with the general
    device probibin in drivers/core/device.c: when a new device is probed,
    clk_set_defaults() will be called for it and will process the
    properties mentioned above.

    Note that this functionality is designed to fail gracefully (i.e. if a
    clock-driver does not implement set_parent(), we simply accept this
    and ignore the error) as not to break existing board-support.

    Signed-off-by: Philipp Tomsich
    Tested-by: David Wu

    Series-changes: 2
    - Fixed David's email address.

    Series-version: 2

    Cover-letter:
    clk: support assigned-clock, assigned-clock-parents, assigned-clock-rates

    For various peripherals on Rockchip SoCs (e.g. for the Ethernet GMAC),
    the parent-clock needs to be set via the DTS. This adds the required
    plumbing and implements the GMAC case for the RK3399.
    END

    Philipp Tomsich
     
  • Clocks may support multiple parents: this change introduces an
    optional operation on the clk-uclass to set a clock's parent.

    Signed-off-by: Philipp Tomsich
    Tested-by: David Wu

    Series-changes: 2
    - Fixed David's email address.

    Philipp Tomsich
     

15 Sep, 2017

1 commit

  • Rather than naming the phandle struct according to the number of cells it
    uses (e.g. struct phandle_2_cell) name it according to the number of
    arguments it has (e.g. struct phandle_1_arg). This is a more intuitive
    naming.

    Signed-off-by: Simon Glass
    Tested-by: Kever Yang

    Simon Glass
     

29 Jul, 2017

2 commits

  • Move clk_release_all() prototype and definition inside
    OF_CONTROL flag to avoid following compilation error for
    poplar platform:

    aarch64: + poplar
    +drivers/usb/host/built-in.o: In function `ehci_usb_remove':
    +drivers/usb/host/ehci-generic.c:159: undefined reference to `clk_release_all'
    +drivers/usb/host/built-in.o: In function `ehci_usb_probe':
    +drivers/usb/host/ehci-generic.c:133: undefined reference to `clk_release_all'
    +make[1]: *** [u-boot] Error 139
    +make: *** [sub-make] Error 2

    Introduced by 4e542c4 clk: add clk_release_all()

    Signed-off-by: Patrice Chotard

    Patrice Chotard
     
  • Add clk_release_all() method which Disable/Free an
    array of clocks that has been previously requested by
    clk_request/get_by_*()

    Signed-off-by: Patrice Chotard
    Reviewed-by: Simon Glass

    Patrice Chotard
     

08 Oct, 2016

1 commit


24 Sep, 2016

1 commit


23 Sep, 2016

1 commit


22 Sep, 2016

1 commit


21 Sep, 2016

1 commit


16 Aug, 2016

1 commit


15 Jul, 2016

1 commit


20 Jun, 2016

1 commit

  • The following changes are made to the clock API:
    * The concept of "clocks" and "peripheral clocks" are unified; each clock
    provider now implements a single set of clocks. This provides a simpler
    conceptual interface to clients, and better aligns with device tree
    clock bindings.
    * Clocks are now identified with a single "struct clk", rather than
    requiring clients to store the clock provider device and clock identity
    values separately. For simple clock consumers, this isolates clients
    from internal details of the clock API.
    * clk.h is split so it only contains the client/consumer API, whereas
    clk-uclass.h contains the provider API. This aligns with the recently
    added reset and mailbox APIs.
    * clk_ops .of_xlate(), .request(), and .free() are added so providers
    can customize these operations if needed. This also aligns with the
    recently added reset and mailbox APIs.
    * clk_disable() is added.
    * All users of the current clock APIs are updated.
    * Sandbox clock tests are updated to exercise clock lookup via DT, and
    clock enable/disable.
    * rkclk_get_clk() is removed and replaced with standard APIs.

    Buildman shows no clock-related errors for any board for which buildman
    can download a toolchain.

    test/py passes for sandbox (which invokes the dm clk test amongst
    others).

    Signed-off-by: Stephen Warren
    Acked-by: Simon Glass

    Stephen Warren
     

22 Jan, 2016

1 commit


21 Jan, 2016

3 commits


22 Jul, 2015

1 commit

  • Clocks are an important feature of platforms and have become increasing
    complex with time. Most modern SoCs have multiple PLLs and dozens of clock
    dividers which distribute clocks to on-chip peripherals.

    Some SoC implementations have a clock API which is private to that SoC family,
    e.g. Tegra and Exynos. This is useful but it would be better to have a
    common API that can be understood and used throughout U-Boot.

    Add a simple clock API as a starting point. It supports querying and setting
    the rate of a clock. Each clock is a device. To reduce memory and processing
    overhead the concept of peripheral clocks is provided. These do not need to
    be explicit devices - it is possible to write a driver that can adjust the
    I2C clock (for example) without an explicit I2C clock device. This can
    dramatically reduce the number of devices (and associated overhead) in a
    complex SoC.

    Clocks are referenced by a number, and it is expected that SoCs will define
    that numbering themselves via an enum.

    Signed-off-by: Simon Glass

    Simon Glass
     

04 Feb, 2014

1 commit