Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

clk: rockchip: add a type from SGRF-controlled gate clocks

Some clk gates on Rockchip SoCs are part of the SGRF (secure general
register files) and thus only controllable from secure mode, with the
most prominent example being the watchdog.

In most cases we still want to define this as a real clock though,
to have complete clock tree and not reference the generic base-clock
from the devicetree.

So far we've just defined this as factor-1-1 clocks in the clock init,
so define a special clock-type for it so that this definition can be
part of the general tree-definition and save some boilerplate code.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>

+4
+4
drivers/clk/rockchip/clk.h
··· 820 820 .gate_offset = -1, \ 821 821 } 822 822 823 + /* SGRF clocks are only accessible from secure mode, so not controllable */ 824 + #define SGRF_GATE(_id, cname, pname) \ 825 + FACTOR(_id, cname, pname, 0, 1, 1) 826 + 823 827 struct rockchip_clk_provider *rockchip_clk_init(struct device_node *np, 824 828 void __iomem *base, unsigned long nr_clks); 825 829 void rockchip_clk_of_add_provider(struct device_node *np,