]> git.kernelconcepts.de Git - karo-tx-uboot.git/commit
dm: Add a clock uclass
authorSimon Glass <sjg@chromium.org>
Tue, 23 Jun 2015 21:39:15 +0000 (15:39 -0600)
committerLothar Waßmann <LW@KARO-electronics.de>
Wed, 9 Sep 2015 11:48:54 +0000 (13:48 +0200)
commitfd31d2f471a8501da408eec60a82a288a4e25743
tree68e26bd6b5ca9a55b2eac056bf4967a0cca3df45
parentc2c2d27599feba0108b98d9e7a7b140375cb8dd7
dm: Add a clock uclass

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 <sjg@chromium.org>
drivers/Kconfig
drivers/Makefile
drivers/clk/Kconfig [new file with mode: 0644]
drivers/clk/Makefile [new file with mode: 0644]
drivers/clk/clk-uclass.c [new file with mode: 0644]
include/clk.h
include/dm/uclass-id.h
scripts/Makefile.spl