clk: tegra: Add Tegra20/30 EMC clock implementation
authorDmitry Osipenko <digetx@gmail.com>
Sun, 11 Aug 2019 21:00:29 +0000 (00:00 +0300)
committerThierry Reding <treding@nvidia.com>
Mon, 11 Nov 2019 13:01:22 +0000 (14:01 +0100)
commited1a2459e20c0dfc9d184230c480ace439bececb
treebe73d10696c66a0849a5d43f399ba4978b218a64
parent54ecb8f7028c5eb3d740bb82b0f1d90f2df63c5c
clk: tegra: Add Tegra20/30 EMC clock implementation

A proper External Memory Controller clock rounding and parent selection
functionality is required by the EMC drivers, it is not available using
the generic clock implementation because only the Memory Controller driver
is aware of what clock rates are actually available for a particular
device. EMC drivers will have to register a Tegra-specific CLK-API
callback which will perform rounding of a requested rate. EMC clock users
won't be able to request EMC clock by getting -EPROBE_DEFER until EMC
driver is probed and the callback is set up.

The functionality is somewhat similar to the clk-emc.c which serves
Tegra124+ SoCs. The later HW generations support more parent clock sources
and the HW configuration / integration with the EMC drivers differs a tad
from the older gens, hence it's not really worth to try to squash
everything into a single source file.

Acked-by: Peter De Schrijver <pdeschrijver@nvidia.com>
Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Acked-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Thierry Reding <treding@nvidia.com>
drivers/clk/tegra/Makefile
drivers/clk/tegra/clk-tegra20-emc.c [new file with mode: 0644]
drivers/clk/tegra/clk-tegra20.c
drivers/clk/tegra/clk-tegra30.c
drivers/clk/tegra/clk.h
include/linux/clk/tegra.h