]> git.dujemihanovic.xyz Git - u-boot.git/commit
clk: convert API to match reset/mailbox style
authorStephen Warren <swarren@nvidia.com>
Fri, 17 Jun 2016 15:44:00 +0000 (09:44 -0600)
committerSimon Glass <sjg@chromium.org>
Sun, 19 Jun 2016 23:05:55 +0000 (17:05 -0600)
commit135aa95002646c46e89de93fa36adad1b010548f
treeb601e08f7d91c7e2cda127d59f8f81128d0cb1ac
parent4581b717b1bf0fb04e7d9fcaf3d4c23d357154ac
clk: convert API to match reset/mailbox style

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 <swarren@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
37 files changed:
arch/arm/include/asm/arch-rockchip/clock.h
arch/arm/mach-rockchip/board.c
arch/arm/mach-rockchip/rk3288/sdram_rk3288.c
arch/arm/mach-snapdragon/clock-apq8016.c
arch/arm/mach-zynq/clk.c
arch/mips/mach-pic32/cpu.c
arch/sandbox/dts/test.dts
arch/sandbox/include/asm/clk.h [new file with mode: 0644]
arch/sandbox/include/asm/test.h
board/microchip/pic32mzda/pic32mzda.c
drivers/clk/Makefile
drivers/clk/clk-uclass.c
drivers/clk/clk_fixed_rate.c
drivers/clk/clk_pic32.c
drivers/clk/clk_rk3036.c
drivers/clk/clk_rk3288.c
drivers/clk/clk_sandbox.c
drivers/clk/clk_sandbox_test.c [new file with mode: 0644]
drivers/clk/exynos/clk-exynos7420.c
drivers/clk/uniphier/clk-uniphier-core.c
drivers/clk/uniphier/clk-uniphier-mio.c
drivers/i2c/rk_i2c.c
drivers/mmc/msm_sdhci.c
drivers/mmc/rockchip_dw_mmc.c
drivers/mmc/uniphier-sd.c
drivers/serial/serial_msm.c
drivers/serial/serial_pic32.c
drivers/serial/serial_s5p.c
drivers/spi/rk_spi.c
drivers/usb/host/ehci-generic.c
drivers/video/rockchip/rk_edp.c
drivers/video/rockchip/rk_hdmi.c
drivers/video/rockchip/rk_lvds.c
drivers/video/rockchip/rk_vop.c
include/clk-uclass.h [new file with mode: 0644]
include/clk.h
test/dm/clk.c