diff options
author | Arnd Bergmann <arnd@arndb.de> | 2017-12-21 19:19:38 +0300 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2017-12-21 19:19:38 +0300 |
commit | 24ff73a0af2c41fa32fd5d0836ab52e7cc93e9d5 (patch) | |
tree | d0af0cd2896b7562bcdbde188f438f0d84878aba /arch/arm/mach-omap2/cm_common.c | |
parent | 8d7ac420c161a63574e1709288a035148d3b377e (diff) | |
parent | 80a06c0d8357d1e75a8fbc10813fcdada4d897fb (diff) | |
download | linux-24ff73a0af2c41fa32fd5d0836ab52e7cc93e9d5.tar.xz |
Merge tag 'omap-for-v4.16/dt-clk-signed' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/dt
Pull "Clock related dts changes for omaps for v4.16 merge window" from
Tony Lindgren:
This branch contains a series of dts changes from Tero Kristo to
start using clkctrl clocks.
Note that this branch is based on a merge of omap-for-v4.16/soc-signed
and an immutable commit from Tero Kristo fe7020e64f04 ("clk: ti: omap4:
clkctrl data fixes for opt-clocks") that is also in clk-next.
* tag 'omap-for-v4.16/dt-clk-signed' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: (57 commits)
ARM: dts: dm816x: add clkctrl nodes
ARM: dts: dm814x: add clkctrl nodes
ARM: dts: am43xx: add clkctrl nodes
ARM: dts: am33xx: add clkctrl nodes
ARM: dts: dra7: add clkctrl nodes
ARM: dts: omap5: add clkctrl nodes
ARM: dts: omap4: add clkctrl nodes
ARM: dts: dm816x: add bus functionality to base PRCM node
ARM: dts: am43xx: add bus functionality to base PRCM node
ARM: dts: am33xx: add bus functionality to base PRCM node
ARM: dts: dra7: add bus functionality to base PRCM nodes
ARM: dts: omap4: add bus functionality to base PRCM nodes
ARM: dts: omap5: add bus functionality to base PRCM nodes
ARM: dts: dm816x: add fck under timers1/2
ARM: dts: dm814x: add fck under timers1/2
ARM: dts: dra7: add fck under timer1
ARM: dts: am43xx: add fck under timers1/2
ARM: dts: am33xx: add fck under timers1/2
ARM: dts: omap4: add fck under timer1
ARM: dts: omap5: add fck under timer1
...
Diffstat (limited to 'arch/arm/mach-omap2/cm_common.c')
-rw-r--r-- | arch/arm/mach-omap2/cm_common.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/arch/arm/mach-omap2/cm_common.c b/arch/arm/mach-omap2/cm_common.c index 83c6fa74cc31..aff747ecad51 100644 --- a/arch/arm/mach-omap2/cm_common.c +++ b/arch/arm/mach-omap2/cm_common.c @@ -29,7 +29,7 @@ * common CM functions */ static struct cm_ll_data null_cm_ll_data; -static struct cm_ll_data *cm_ll_data = &null_cm_ll_data; +static const struct cm_ll_data *cm_ll_data = &null_cm_ll_data; /* cm_base: base virtual address of the CM IP block */ struct omap_domain_base cm_base; @@ -178,6 +178,16 @@ int omap_cm_module_disable(u8 part, u16 inst, u16 clkctrl_offs) return 0; } +u32 omap_cm_xlate_clkctrl(u8 part, u16 inst, u16 clkctrl_offs) +{ + if (!cm_ll_data->xlate_clkctrl) { + WARN_ONCE(1, "cm: %s: no low-level function defined\n", + __func__); + return 0; + } + return cm_ll_data->xlate_clkctrl(part, inst, clkctrl_offs); +} + /** * cm_register - register per-SoC low-level data with the CM * @cld: low-level per-SoC OMAP CM data & function pointers to register @@ -189,7 +199,7 @@ int omap_cm_module_disable(u8 part, u16 inst, u16 clkctrl_offs) * is NULL, or -EEXIST if cm_register() has already been called * without an intervening cm_unregister(). */ -int cm_register(struct cm_ll_data *cld) +int cm_register(const struct cm_ll_data *cld) { if (!cld) return -EINVAL; @@ -213,7 +223,7 @@ int cm_register(struct cm_ll_data *cld) * -EINVAL if @cld is NULL or if @cld does not match the struct * cm_ll_data * previously registered by cm_register(). */ -int cm_unregister(struct cm_ll_data *cld) +int cm_unregister(const struct cm_ll_data *cld) { if (!cld || cm_ll_data != cld) return -EINVAL; |