From: Arnd Bergmann <arnd@kernel.org> To: Tony Lindgren <tony@atomide.com>, linux-omap@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Arnd Bergmann <arnd@arndb.de> Subject: [PATCH 04/10] ARM: omap2: simplify clock2xxx header Date: Mon, 24 Oct 2022 17:38:08 +0200 [thread overview] Message-ID: <20221024153814.254652-5-arnd@kernel.org> (raw) In-Reply-To: <20221024153814.254652-1-arnd@kernel.org> From: Arnd Bergmann <arnd@arndb.de> Only one of the functions in clock2xxx.h is used in a file other than the one it is declared in, so remove the extra declarations, and make the symbols static. Signed-off-by: Arnd Bergmann <arnd@arndb.de> --- arch/arm/mach-omap2/clkt2xxx_dpllcore.c | 1 + arch/arm/mach-omap2/clkt2xxx_virt_prcm_set.c | 14 ++++++---- arch/arm/mach-omap2/clock.c | 2 -- arch/arm/mach-omap2/clock.h | 2 -- arch/arm/mach-omap2/clock2xxx.h | 29 -------------------- arch/arm/mach-omap2/io.c | 1 - 6 files changed, 9 insertions(+), 40 deletions(-) diff --git a/arch/arm/mach-omap2/clkt2xxx_dpllcore.c b/arch/arm/mach-omap2/clkt2xxx_dpllcore.c index 8a9983cb4733..93f6d3cd9525 100644 --- a/arch/arm/mach-omap2/clkt2xxx_dpllcore.c +++ b/arch/arm/mach-omap2/clkt2xxx_dpllcore.c @@ -20,6 +20,7 @@ #include <linux/kernel.h> #include <linux/errno.h> #include <linux/clk.h> +#include <linux/clk/ti.h> #include <linux/io.h> #include "clock.h" diff --git a/arch/arm/mach-omap2/clkt2xxx_virt_prcm_set.c b/arch/arm/mach-omap2/clkt2xxx_virt_prcm_set.c index edf046b470ba..be4557d1fdac 100644 --- a/arch/arm/mach-omap2/clkt2xxx_virt_prcm_set.c +++ b/arch/arm/mach-omap2/clkt2xxx_virt_prcm_set.c @@ -39,6 +39,8 @@ #include "sdrc.h" #include "sram.h" +static u16 cpu_mask; + const struct prcm_config *curr_prcm_set; const struct prcm_config *rate_table; @@ -55,7 +57,7 @@ static unsigned long sys_ck_rate; * * Set virt_prcm_set's rate to the mpu_speed field of the current PRCM set. */ -unsigned long omap2_table_mpu_recalc(struct clk_hw *clk, +static unsigned long omap2_table_mpu_recalc(struct clk_hw *clk, unsigned long parent_rate) { return curr_prcm_set->mpu_speed; @@ -68,7 +70,7 @@ unsigned long omap2_table_mpu_recalc(struct clk_hw *clk, * Some might argue L3-DDR, others ARM, others IVA. This code is simple and * just uses the ARM rates. */ -long omap2_round_to_table_rate(struct clk_hw *hw, unsigned long rate, +static long omap2_round_to_table_rate(struct clk_hw *hw, unsigned long rate, unsigned long *parent_rate) { const struct prcm_config *ptr; @@ -92,8 +94,8 @@ long omap2_round_to_table_rate(struct clk_hw *hw, unsigned long rate, } /* Sets basic clocks based on the specified rate */ -int omap2_select_table_rate(struct clk_hw *hw, unsigned long rate, - unsigned long parent_rate) +static int omap2_select_table_rate(struct clk_hw *hw, unsigned long rate, + unsigned long parent_rate) { u32 cur_rate, done_rate, bypass = 0; const struct prcm_config *prcm; @@ -167,7 +169,7 @@ int omap2_select_table_rate(struct clk_hw *hw, unsigned long rate, * global to point to the active rate set when found; otherwise, sets * it to NULL. No return value; */ -void omap2xxx_clkt_vps_check_bootloader_rates(void) +static void omap2xxx_clkt_vps_check_bootloader_rates(void) { const struct prcm_config *prcm = NULL; unsigned long rate; @@ -193,7 +195,7 @@ void omap2xxx_clkt_vps_check_bootloader_rates(void) * sys_ck rate, but before the virt_prcm_set clock rate is * recalculated. No return value. */ -void omap2xxx_clkt_vps_late_init(void) +static void omap2xxx_clkt_vps_late_init(void) { struct clk *c; diff --git a/arch/arm/mach-omap2/clock.c b/arch/arm/mach-omap2/clock.c index 3c1d12dc8ff3..83fae51722a9 100644 --- a/arch/arm/mach-omap2/clock.c +++ b/arch/arm/mach-omap2/clock.c @@ -36,8 +36,6 @@ #include "cm-regbits-34xx.h" #include "common.h" -u16 cpu_mask; - /* DPLL valid Fint frequency band limits - from 34xx TRM Section 4.7.6.2 */ #define OMAP3430_DPLL_FINT_BAND1_MIN 750000 #define OMAP3430_DPLL_FINT_BAND1_MAX 2100000 diff --git a/arch/arm/mach-omap2/clock.h b/arch/arm/mach-omap2/clock.h index bbe4b32891bb..f365614405e8 100644 --- a/arch/arm/mach-omap2/clock.h +++ b/arch/arm/mach-omap2/clock.h @@ -63,8 +63,6 @@ extern struct ti_clk_ll_ops omap_clk_ll_ops; -extern u16 cpu_mask; - extern const struct clkops clkops_omap2_dflt_wait; extern const struct clkops clkops_omap2_dflt; diff --git a/arch/arm/mach-omap2/clock2xxx.h b/arch/arm/mach-omap2/clock2xxx.h index a8408f9d0f33..73c011dadfd2 100644 --- a/arch/arm/mach-omap2/clock2xxx.h +++ b/arch/arm/mach-omap2/clock2xxx.h @@ -12,35 +12,6 @@ #include <linux/clk-provider.h> #include "clock.h" -unsigned long omap2_table_mpu_recalc(struct clk_hw *clk, - unsigned long parent_rate); -int omap2_select_table_rate(struct clk_hw *hw, unsigned long rate, - unsigned long parent_rate); -long omap2_round_to_table_rate(struct clk_hw *hw, unsigned long rate, - unsigned long *parent_rate); -unsigned long omap2xxx_sys_clk_recalc(struct clk_hw *clk, - unsigned long parent_rate); -unsigned long omap2_osc_clk_recalc(struct clk_hw *clk, - unsigned long parent_rate); -void omap2xxx_clkt_dpllcore_init(struct clk_hw *hw); unsigned long omap2xxx_clk_get_core_rate(void); -u32 omap2xxx_get_sysclkdiv(void); -void omap2xxx_clk_prepare_for_reboot(void); -void omap2xxx_clkt_vps_check_bootloader_rates(void); -void omap2xxx_clkt_vps_late_init(void); - -#ifdef CONFIG_SOC_OMAP2420 -int omap2420_clk_init(void); -#else -#define omap2420_clk_init() do { } while(0) -#endif - -#ifdef CONFIG_SOC_OMAP2430 -int omap2430_clk_init(void); -#else -#define omap2430_clk_init() do { } while(0) -#endif - -extern struct clk_hw *dclk_hw; #endif diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c index 921c18ccde6d..375fea35b981 100644 --- a/arch/arm/mach-omap2/io.c +++ b/arch/arm/mach-omap2/io.c @@ -32,7 +32,6 @@ #include "clockdomain.h" #include "common.h" #include "clock.h" -#include "clock2xxx.h" #include "sdrc.h" #include "control.h" #include "sram.h" -- 2.29.2 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
WARNING: multiple messages have this Message-ID (diff)
From: Arnd Bergmann <arnd@kernel.org> To: Tony Lindgren <tony@atomide.com>, linux-omap@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Arnd Bergmann <arnd@arndb.de> Subject: [PATCH 04/10] ARM: omap2: simplify clock2xxx header Date: Mon, 24 Oct 2022 17:38:08 +0200 [thread overview] Message-ID: <20221024153814.254652-5-arnd@kernel.org> (raw) In-Reply-To: <20221024153814.254652-1-arnd@kernel.org> From: Arnd Bergmann <arnd@arndb.de> Only one of the functions in clock2xxx.h is used in a file other than the one it is declared in, so remove the extra declarations, and make the symbols static. Signed-off-by: Arnd Bergmann <arnd@arndb.de> --- arch/arm/mach-omap2/clkt2xxx_dpllcore.c | 1 + arch/arm/mach-omap2/clkt2xxx_virt_prcm_set.c | 14 ++++++---- arch/arm/mach-omap2/clock.c | 2 -- arch/arm/mach-omap2/clock.h | 2 -- arch/arm/mach-omap2/clock2xxx.h | 29 -------------------- arch/arm/mach-omap2/io.c | 1 - 6 files changed, 9 insertions(+), 40 deletions(-) diff --git a/arch/arm/mach-omap2/clkt2xxx_dpllcore.c b/arch/arm/mach-omap2/clkt2xxx_dpllcore.c index 8a9983cb4733..93f6d3cd9525 100644 --- a/arch/arm/mach-omap2/clkt2xxx_dpllcore.c +++ b/arch/arm/mach-omap2/clkt2xxx_dpllcore.c @@ -20,6 +20,7 @@ #include <linux/kernel.h> #include <linux/errno.h> #include <linux/clk.h> +#include <linux/clk/ti.h> #include <linux/io.h> #include "clock.h" diff --git a/arch/arm/mach-omap2/clkt2xxx_virt_prcm_set.c b/arch/arm/mach-omap2/clkt2xxx_virt_prcm_set.c index edf046b470ba..be4557d1fdac 100644 --- a/arch/arm/mach-omap2/clkt2xxx_virt_prcm_set.c +++ b/arch/arm/mach-omap2/clkt2xxx_virt_prcm_set.c @@ -39,6 +39,8 @@ #include "sdrc.h" #include "sram.h" +static u16 cpu_mask; + const struct prcm_config *curr_prcm_set; const struct prcm_config *rate_table; @@ -55,7 +57,7 @@ static unsigned long sys_ck_rate; * * Set virt_prcm_set's rate to the mpu_speed field of the current PRCM set. */ -unsigned long omap2_table_mpu_recalc(struct clk_hw *clk, +static unsigned long omap2_table_mpu_recalc(struct clk_hw *clk, unsigned long parent_rate) { return curr_prcm_set->mpu_speed; @@ -68,7 +70,7 @@ unsigned long omap2_table_mpu_recalc(struct clk_hw *clk, * Some might argue L3-DDR, others ARM, others IVA. This code is simple and * just uses the ARM rates. */ -long omap2_round_to_table_rate(struct clk_hw *hw, unsigned long rate, +static long omap2_round_to_table_rate(struct clk_hw *hw, unsigned long rate, unsigned long *parent_rate) { const struct prcm_config *ptr; @@ -92,8 +94,8 @@ long omap2_round_to_table_rate(struct clk_hw *hw, unsigned long rate, } /* Sets basic clocks based on the specified rate */ -int omap2_select_table_rate(struct clk_hw *hw, unsigned long rate, - unsigned long parent_rate) +static int omap2_select_table_rate(struct clk_hw *hw, unsigned long rate, + unsigned long parent_rate) { u32 cur_rate, done_rate, bypass = 0; const struct prcm_config *prcm; @@ -167,7 +169,7 @@ int omap2_select_table_rate(struct clk_hw *hw, unsigned long rate, * global to point to the active rate set when found; otherwise, sets * it to NULL. No return value; */ -void omap2xxx_clkt_vps_check_bootloader_rates(void) +static void omap2xxx_clkt_vps_check_bootloader_rates(void) { const struct prcm_config *prcm = NULL; unsigned long rate; @@ -193,7 +195,7 @@ void omap2xxx_clkt_vps_check_bootloader_rates(void) * sys_ck rate, but before the virt_prcm_set clock rate is * recalculated. No return value. */ -void omap2xxx_clkt_vps_late_init(void) +static void omap2xxx_clkt_vps_late_init(void) { struct clk *c; diff --git a/arch/arm/mach-omap2/clock.c b/arch/arm/mach-omap2/clock.c index 3c1d12dc8ff3..83fae51722a9 100644 --- a/arch/arm/mach-omap2/clock.c +++ b/arch/arm/mach-omap2/clock.c @@ -36,8 +36,6 @@ #include "cm-regbits-34xx.h" #include "common.h" -u16 cpu_mask; - /* DPLL valid Fint frequency band limits - from 34xx TRM Section 4.7.6.2 */ #define OMAP3430_DPLL_FINT_BAND1_MIN 750000 #define OMAP3430_DPLL_FINT_BAND1_MAX 2100000 diff --git a/arch/arm/mach-omap2/clock.h b/arch/arm/mach-omap2/clock.h index bbe4b32891bb..f365614405e8 100644 --- a/arch/arm/mach-omap2/clock.h +++ b/arch/arm/mach-omap2/clock.h @@ -63,8 +63,6 @@ extern struct ti_clk_ll_ops omap_clk_ll_ops; -extern u16 cpu_mask; - extern const struct clkops clkops_omap2_dflt_wait; extern const struct clkops clkops_omap2_dflt; diff --git a/arch/arm/mach-omap2/clock2xxx.h b/arch/arm/mach-omap2/clock2xxx.h index a8408f9d0f33..73c011dadfd2 100644 --- a/arch/arm/mach-omap2/clock2xxx.h +++ b/arch/arm/mach-omap2/clock2xxx.h @@ -12,35 +12,6 @@ #include <linux/clk-provider.h> #include "clock.h" -unsigned long omap2_table_mpu_recalc(struct clk_hw *clk, - unsigned long parent_rate); -int omap2_select_table_rate(struct clk_hw *hw, unsigned long rate, - unsigned long parent_rate); -long omap2_round_to_table_rate(struct clk_hw *hw, unsigned long rate, - unsigned long *parent_rate); -unsigned long omap2xxx_sys_clk_recalc(struct clk_hw *clk, - unsigned long parent_rate); -unsigned long omap2_osc_clk_recalc(struct clk_hw *clk, - unsigned long parent_rate); -void omap2xxx_clkt_dpllcore_init(struct clk_hw *hw); unsigned long omap2xxx_clk_get_core_rate(void); -u32 omap2xxx_get_sysclkdiv(void); -void omap2xxx_clk_prepare_for_reboot(void); -void omap2xxx_clkt_vps_check_bootloader_rates(void); -void omap2xxx_clkt_vps_late_init(void); - -#ifdef CONFIG_SOC_OMAP2420 -int omap2420_clk_init(void); -#else -#define omap2420_clk_init() do { } while(0) -#endif - -#ifdef CONFIG_SOC_OMAP2430 -int omap2430_clk_init(void); -#else -#define omap2430_clk_init() do { } while(0) -#endif - -extern struct clk_hw *dclk_hw; #endif diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c index 921c18ccde6d..375fea35b981 100644 --- a/arch/arm/mach-omap2/io.c +++ b/arch/arm/mach-omap2/io.c @@ -32,7 +32,6 @@ #include "clockdomain.h" #include "common.h" #include "clock.h" -#include "clock2xxx.h" #include "sdrc.h" #include "control.h" #include "sram.h" -- 2.29.2
next prev parent reply other threads:[~2022-10-24 15:40 UTC|newest] Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-10-24 15:38 [PATCH 00/10] ARM: omap2: assorted cleanups Arnd Bergmann 2022-10-24 15:38 ` Arnd Bergmann 2022-10-24 15:38 ` [PATCH 01/10] ARM: omap2: remove unused USB code Arnd Bergmann 2022-10-24 15:38 ` Arnd Bergmann 2022-10-24 15:38 ` [PATCH 02/10] ARM: omap2: remove unused headers Arnd Bergmann 2022-10-24 15:38 ` Arnd Bergmann 2022-10-24 15:38 ` [PATCH 03/10] ARM: omap2: remove unused omap_hwmod_reset.c Arnd Bergmann 2022-10-24 15:38 ` Arnd Bergmann 2022-10-24 15:38 ` Arnd Bergmann [this message] 2022-10-24 15:38 ` [PATCH 04/10] ARM: omap2: simplify clock2xxx header Arnd Bergmann 2022-10-24 15:38 ` [PATCH 05/10] ARM: omap2: remove APLL control Arnd Bergmann 2022-10-24 15:38 ` Arnd Bergmann 2022-10-24 15:38 ` [PATCH 06/10] ARM: omap2: smartreflex: remove on_init control Arnd Bergmann 2022-10-24 15:38 ` Arnd Bergmann 2022-10-24 15:38 ` [PATCH 07/10] ARM: omap2: remove unused functions Arnd Bergmann 2022-10-24 15:38 ` Arnd Bergmann 2022-10-24 15:38 ` [PATCH 08/10] ARM: omap2: remove unused declarations Arnd Bergmann 2022-10-24 15:38 ` Arnd Bergmann 2022-10-24 15:38 ` [PATCH 09/10] ARM: omap2: remove unused omap2_pm_init Arnd Bergmann 2022-10-24 15:38 ` Arnd Bergmann 2022-10-24 15:38 ` [PATCH 10/10] ARM: omap2: make functions static Arnd Bergmann 2022-10-24 15:38 ` Arnd Bergmann 2022-10-25 8:08 ` [PATCH 00/10] ARM: omap2: assorted cleanups Tony Lindgren 2022-10-25 8:08 ` Tony Lindgren 2023-01-09 16:08 ` Arnd Bergmann 2023-01-09 16:08 ` Arnd Bergmann
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20221024153814.254652-5-arnd@kernel.org \ --to=arnd@kernel.org \ --cc=arnd@arndb.de \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-omap@vger.kernel.org \ --cc=tony@atomide.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.