Skip to content

Commit b745c07

Browse files
Tero Kristobebarino
authored andcommitted
clk: keystone: Add sci-clk driver support
In K2G, the clock handling is done through firmware executing on a separate core. Linux kernel needs to communicate to the firmware through TI system control interface to access any power management related resources, including clocks. The keystone sci-clk driver does this, by communicating to the firmware through the TI SCI driver. The driver adds support for registering clocks through DT, and basic required clock operations like prepare/get_rate, etc. Signed-off-by: Tero Kristo <t-kristo@ti.com> [sboyd@codeaurora.org: Make ti_sci_init_clocks() static] Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
1 parent 8f306cf commit b745c07

File tree

6 files changed

+744
-9
lines changed

6 files changed

+744
-9
lines changed

MAINTAINERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12631,6 +12631,7 @@ F: Documentation/devicetree/bindings/soc/ti/sci-pm-domain.txt
1263112631
F: include/dt-bindings/genpd/k2g.h
1263212632
F: drivers/soc/ti/ti_sci_pm_domains.c
1263312633
F: Documentation/devicetree/bindings/clock/ti,sci-clk.txt
12634+
F: drivers/clk/keystone/sci-clk.c
1263412635

1263512636
THANKO'S RAREMONO AM/FM/SW RADIO RECEIVER USB DRIVER
1263612637
M: Hans Verkuil <hverkuil@xs4all.nl>

drivers/clk/Kconfig

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -164,13 +164,6 @@ config COMMON_CLK_XGENE
164164
---help---
165165
Sypport for the APM X-Gene SoC reference, PLL, and device clocks.
166166

167-
config COMMON_CLK_KEYSTONE
168-
tristate "Clock drivers for Keystone based SOCs"
169-
depends on (ARCH_KEYSTONE || COMPILE_TEST) && OF
170-
---help---
171-
Supports clock drivers for Keystone based SOCs. These SOCs have local
172-
a power sleep control module that gate the clock to the IPs and PLLs.
173-
174167
config COMMON_CLK_NXP
175168
def_bool COMMON_CLK && (ARCH_LPC18XX || ARCH_LPC32XX)
176169
select REGMAP_MMIO if ARCH_LPC32XX
@@ -219,6 +212,7 @@ config COMMON_CLK_VC5
219212

220213
source "drivers/clk/bcm/Kconfig"
221214
source "drivers/clk/hisilicon/Kconfig"
215+
source "drivers/clk/keystone/Kconfig"
222216
source "drivers/clk/mediatek/Kconfig"
223217
source "drivers/clk/meson/Kconfig"
224218
source "drivers/clk/mvebu/Kconfig"

drivers/clk/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ obj-$(CONFIG_H8300) += h8300/
6161
obj-$(CONFIG_ARCH_HISI) += hisilicon/
6262
obj-$(CONFIG_ARCH_MXC) += imx/
6363
obj-$(CONFIG_MACH_INGENIC) += ingenic/
64-
obj-$(CONFIG_COMMON_CLK_KEYSTONE) += keystone/
64+
obj-$(CONFIG_ARCH_KEYSTONE) += keystone/
6565
obj-$(CONFIG_MACH_LOONGSON32) += loongson1/
6666
obj-$(CONFIG_ARCH_MEDIATEK) += mediatek/
6767
obj-$(CONFIG_COMMON_CLK_AMLOGIC) += meson/

drivers/clk/keystone/Kconfig

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
config COMMON_CLK_KEYSTONE
2+
tristate "Clock drivers for Keystone based SOCs"
3+
depends on (ARCH_KEYSTONE || COMPILE_TEST) && OF
4+
---help---
5+
Supports clock drivers for Keystone based SOCs. These SOCs have local
6+
a power sleep control module that gate the clock to the IPs and PLLs.
7+
8+
config TI_SCI_CLK
9+
tristate "TI System Control Interface clock drivers"
10+
depends on (ARCH_KEYSTONE || COMPILE_TEST) && OF
11+
default TI_SCI_PROTOCOL
12+
---help---
13+
This adds the clock driver support over TI System Control Interface.
14+
If you wish to use clock resources from the PMMC firmware, say Y.
15+
Otherwise, say N.

drivers/clk/keystone/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
obj-y += pll.o gate.o
1+
obj-$(CONFIG_COMMON_CLK_KEYSTONE) += pll.o gate.o
2+
obj-$(CONFIG_TI_SCI_CLK) += sci-clk.o

0 commit comments

Comments
 (0)