summaryrefslogtreecommitdiffstats
path: root/include/clk.h
Commit message (Collapse)AuthorAgeFilesLines
* dm: clk: Add support for decoding clocks from the device treeSimon Glass2016-01-211-0/+24
| | | | | | | | | Add a method which can locate a clock for a device, given its index. This uses the normal device tree bindings to return the clock device and the first argument which is normally used as a peripheral ID in U-Boot. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* clk: add API to enable clockMasahiro Yamada2016-01-201-0/+18
| | | | | | | | The most basic thing for clock is to enable it, but it is missing in this uclass. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Acked-by: Simon Glass <sjg@chromium.org>
* clk: add needed include and declaration to include/clk.hMasahiro Yamada2016-01-201-0/+4
| | | | | | | | This header uses ulong, so it needs to include <linux/types.h>. Likewise, "struct udevice" must be declared before it is used. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Acked-by: Simon Glass <sjg@chromium.org>
* clk: fix comments in include/clk.hMasahiro Yamada2016-01-201-10/+10
| | | | | | | | | | The comment about get_periph_rate() is the same as that of set_periph_rate(). I am fixing typos here and there while I am in this file. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Acked-by: Simon Glass <sjg@chromium.org>
* dm: Add a clock uclassSimon Glass2015-07-211-0/+80
| | | | | | | | | | | | | | | | | | | | | | | 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>
* common: Add new clk commandMichal Simek2014-02-041-0/+6
Command provides just dump subcommand for showing clock frequencies in a soc. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Acked-by: Stefano Babic <sbabic@denx.de>
OpenPOWER on IntegriCloud