diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2023-02-20 15:36:37 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2023-02-20 15:36:37 -0800 |
commit | b32c6e029c1313125cc7b0a9061dda2304c23b7b (patch) | |
tree | 8453e902decc1f467d6353a4103547d07e7afc38 /arch/arm/mach-omap2/omap_hwmod.c | |
parent | ff0c7e18629b8bd64681313a88ce55e182c9fee6 (diff) | |
parent | 27aaad0e7c7259101568ac8763a34810e81336cd (diff) |
Merge tag 'arm-soc-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc
Pull ARM SoC updates from Arnd Bergmann:
"The majority of the changes are for the OMAP2 platform, mostly
removing some dead code that got left behind from previous cleanups.
Aside from that, there are very minor updates and correctness fixes
for Zynq, i.MX, Samsung, Broadcom, AT91, ep93xx, and OMAP1"
* tag 'arm-soc-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (26 commits)
dt-bindings: soc: samsung: exynos-pmu: allow phys as child
ARM: imx: mach-imx6ul: add imx6ulz support
ARM: imx: Call ida_simple_remove() for ida_simple_get
arm64: drop redundant "ARMv8" from Kconfig option title
ARM: ep93xx: Convert to use descriptors for GPIO LEDs
ARM: s3c: fix s3c64xx_set_timer_source prototype
ARM: OMAP2+: Fix spelling typos in comment
ARM: OMAP2+: Remove unneeded #include <linux/pinctrl/machine.h>
ARM: OMAP2+: Remove unneeded #include <linux/pinctrl/pinmux.h>
ARM: OMAP1: call platform_device_put() in error case in omap1_dm_timer_init()
ARM: BCM63xx: remove useless goto statement
ARM: omap2: make functions static
ARM: omap2: remove unused omap2_pm_init
ARM: omap2: remove unused declarations
ARM: omap2: remove unused functions
ARM: omap2: smartreflex: remove on_init control
ARM: omap2: remove APLL control
ARM: omap2: simplify clock2xxx header
ARM: omap2: remove unused omap_hwmod_reset.c
ARM: omap2: remove unused headers
...
Diffstat (limited to 'arch/arm/mach-omap2/omap_hwmod.c')
-rw-r--r-- | arch/arm/mach-omap2/omap_hwmod.c | 94 |
1 files changed, 3 insertions, 91 deletions
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c index 31d1a21f6041..5a2a9b8e61ed 100644 --- a/arch/arm/mach-omap2/omap_hwmod.c +++ b/arch/arm/mach-omap2/omap_hwmod.c @@ -3054,6 +3054,8 @@ int __init omap_hwmod_register_links(struct omap_hwmod_ocp_if **ois) return 0; } +static int __init omap_hwmod_setup_one(const char *oh_name); + /** * _ensure_mpu_hwmod_is_setup - ensure the MPU SS hwmod is init'ed and set up * @oh: pointer to the hwmod currently being set up (usually not the MPU) @@ -3084,7 +3086,7 @@ static void __init _ensure_mpu_hwmod_is_setup(struct omap_hwmod *oh) * registered omap_hwmod. Also calls _setup() on each hwmod. Returns * -EINVAL upon error or 0 upon success. */ -int __init omap_hwmod_setup_one(const char *oh_name) +static int __init omap_hwmod_setup_one(const char *oh_name) { struct omap_hwmod *oh; @@ -3764,55 +3766,6 @@ int omap_hwmod_shutdown(struct omap_hwmod *oh) */ /** - * omap_hwmod_get_pwrdm - return pointer to this module's main powerdomain - * @oh: struct omap_hwmod * - * - * Return the powerdomain pointer associated with the OMAP module - * @oh's main clock. If @oh does not have a main clk, return the - * powerdomain associated with the interface clock associated with the - * module's MPU port. (XXX Perhaps this should use the SDMA port - * instead?) Returns NULL on error, or a struct powerdomain * on - * success. - */ -struct powerdomain *omap_hwmod_get_pwrdm(struct omap_hwmod *oh) -{ - struct clk *c; - struct omap_hwmod_ocp_if *oi; - struct clockdomain *clkdm; - struct clk_hw_omap *clk; - struct clk_hw *hw; - - if (!oh) - return NULL; - - if (oh->clkdm) - return oh->clkdm->pwrdm.ptr; - - if (oh->_clk) { - c = oh->_clk; - } else { - oi = _find_mpu_rt_port(oh); - if (!oi) - return NULL; - c = oi->_clk; - } - - hw = __clk_get_hw(c); - if (!hw) - return NULL; - - clk = to_clk_hw_omap(hw); - if (!clk) - return NULL; - - clkdm = clk->clkdm; - if (!clkdm) - return NULL; - - return clkdm->pwrdm.ptr; -} - -/** * omap_hwmod_get_mpu_rt_va - return the module's base address (for the MPU) * @oh: struct omap_hwmod * * @@ -3978,32 +3931,6 @@ ohsps_unlock: } /** - * omap_hwmod_get_context_loss_count - get lost context count - * @oh: struct omap_hwmod * - * - * Returns the context loss count of associated @oh - * upon success, or zero if no context loss data is available. - * - * On OMAP4, this queries the per-hwmod context loss register, - * assuming one exists. If not, or on OMAP2/3, this queries the - * enclosing powerdomain context loss count. - */ -int omap_hwmod_get_context_loss_count(struct omap_hwmod *oh) -{ - struct powerdomain *pwrdm; - int ret = 0; - - if (soc_ops.get_context_lost) - return soc_ops.get_context_lost(oh); - - pwrdm = omap_hwmod_get_pwrdm(oh); - if (pwrdm) - ret = pwrdm_get_context_loss_count(pwrdm); - - return ret; -} - -/** * omap_hwmod_init - initialize the hwmod code * * Sets up some function pointers needed by the hwmod code to operate on the @@ -4054,18 +3981,3 @@ void __init omap_hwmod_init(void) inited = true; } - -/** - * omap_hwmod_get_main_clk - get pointer to main clock name - * @oh: struct omap_hwmod * - * - * Returns the main clock name assocated with @oh upon success, - * or NULL if @oh is NULL. - */ -const char *omap_hwmod_get_main_clk(struct omap_hwmod *oh) -{ - if (!oh) - return NULL; - - return oh->main_clk; -} |