Skip to contentSkip to conversation

ARM: omap2: assorted cleanups

PATCH In review Arnd Bergmann 3 participants 13 messages Oct 24, 2022 – Jan 9, 2023

Subsystems (13)
lore
Share & tools
lore
#0 lore raw

cover ARM: omap2: assorted cleanups

From: Arnd Bergmann <[email protected]>

While going through the removal of board files on some other platforms, I noticed a bit of outdated code on omap2+ that was left behind after the platform became DT only.

I can put this into the same cleanup tree as the omap1 patches, or you can merge these into your omap2 tree if there are likely conflicts with other patches.

Arnd Bergmann (10):
ARM: omap2: remove unused USB code
ARM: omap2: remove unused headers
ARM: omap2: remove unused omap_hwmod_reset.c
ARM: omap2: simplify clock2xxx header
ARM: omap2: remove APLL control
ARM: omap2: smartreflex: remove on_init control
ARM: omap2: remove unused functions
ARM: omap2: remove unused declarations
ARM: omap2: remove unused omap2_pm_init
ARM: omap2: make functions static

 arch/arm/mach-omap2/Makefile                  |   3 +-
 arch/arm/mach-omap2/board-n8x0.c              |   2 +-
 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                   |   7 -
 arch/arm/mach-omap2/clock2xxx.h               |  29 --
 arch/arm/mach-omap2/clock3xxx.h               |  21 --
 arch/arm/mach-omap2/clockdomain.c             |  44 +--
 arch/arm/mach-omap2/clockdomain.h             |   4 -
 arch/arm/mach-omap2/cm2xxx.c                  | 101 +-----
 arch/arm/mach-omap2/cm2xxx.h                  |   7 -
 arch/arm/mach-omap2/cm2xxx_3xxx.h             |   5 -
 arch/arm/mach-omap2/common.h                  |  28 --
 arch/arm/mach-omap2/control.c                 |  73 ----
 arch/arm/mach-omap2/control.h                 |   5 -
 arch/arm/mach-omap2/id.c                      |   2 +-
 arch/arm/mach-omap2/id.h                      |   2 -
 arch/arm/mach-omap2/io.c                      |  21 +-
 arch/arm/mach-omap2/omap-secure.c             |   7 +-
 arch/arm/mach-omap2/omap-secure.h             |   3 -
 arch/arm/mach-omap2/omap_device.c             |  74 +----
 arch/arm/mach-omap2/omap_device.h             |  14 -
 arch/arm/mach-omap2/omap_hwmod.c              |  94 +-----
 arch/arm/mach-omap2/omap_hwmod.h              |  21 --
 arch/arm/mach-omap2/omap_hwmod_2420_data.c    |   1 -
 .../omap_hwmod_2xxx_3xxx_ipblock_data.c       |   2 +-
 .../omap_hwmod_2xxx_interconnect_data.c       |   1 -
 .../mach-omap2/omap_hwmod_2xxx_ipblock_data.c |  12 +-
 arch/arm/mach-omap2/omap_hwmod_3xxx_data.c    |   1 -
 arch/arm/mach-omap2/omap_hwmod_common_data.h  |   6 -
 arch/arm/mach-omap2/omap_hwmod_reset.c        |  98 ------
 arch/arm/mach-omap2/omap_opp_data.h           |   5 -
 arch/arm/mach-omap2/omap_phy_internal.c       |  87 -----
 arch/arm/mach-omap2/pm.c                      |   8 +-
 arch/arm/mach-omap2/pm.h                      |  25 --
 arch/arm/mach-omap2/pm24xx.c                  | 312 ------------------
 arch/arm/mach-omap2/powerdomain.c             | 108 +-----
 arch/arm/mach-omap2/powerdomain.h             |   8 -
 arch/arm/mach-omap2/prcm-common.h             |   1 -
 arch/arm/mach-omap2/prcm_mpu44xx.c            |  12 -
 arch/arm/mach-omap2/prcm_mpu_44xx_54xx.h      |   2 -
 arch/arm/mach-omap2/prm.h                     |   4 -
 arch/arm/mach-omap2/prm2xxx_3xxx.h            |   3 -
 arch/arm/mach-omap2/prm3xxx.c                 |   5 +-
 arch/arm/mach-omap2/prm3xxx.h                 |   2 -
 arch/arm/mach-omap2/prm_common.c              |  55 +--
 arch/arm/mach-omap2/sdrc.c                    |  51 +--
 arch/arm/mach-omap2/sdrc.h                    |   5 -
 arch/arm/mach-omap2/serial.h                  |  66 ----
 arch/arm/mach-omap2/sr_device.c               |  13 -
 arch/arm/mach-omap2/sram.h                    |   4 -
 arch/arm/mach-omap2/usb-tusb6010.c            |   6 +-
 arch/arm/mach-omap2/usb.h                     |  71 ----
 arch/arm/mach-omap2/vc.c                      |  15 -
 arch/arm/mach-omap2/voltage.c                 |   2 +-
 arch/arm/mach-omap2/voltage.h                 |   2 -
 drivers/soc/ti/smartreflex.c                  |   4 -
 include/linux/platform_data/voltage-omap.h    |   1 -
 include/linux/power/smartreflex.h             |   3 -
 include/linux/usb/musb.h                      |   2 -
 61 files changed, 49 insertions(+), 1538 deletions(-)
 delete mode 100644 arch/arm/mach-omap2/clock3xxx.h
 delete mode 100644 arch/arm/mach-omap2/omap_hwmod_reset.c
 delete mode 100644 arch/arm/mach-omap2/pm24xx.c
 delete mode 100644 arch/arm/mach-omap2/serial.h
 delete mode 100644 arch/arm/mach-omap2/usb.h
Signature · 7 lines
2.29.2


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#1 lore raw

PATCH 1/10 ARM: omap2: remove unused USB code

From: Arnd Bergmann <[email protected]>

Some musb related code is no longer in use after commit 4d62dbda8561 ("ARM: OMAP3: Remove legacy support for am3517-evm") and can be removed.

---
 arch/arm/mach-omap2/common.h            |  2 -
 arch/arm/mach-omap2/omap_phy_internal.c | 87 -------------------------
 arch/arm/mach-omap2/usb.h               | 71 --------------------
 3 files changed, 160 deletions(-)
 delete mode 100644 arch/arm/mach-omap2/usb.h
arch/arm/mach-omap2/common.h +0 -2
index bd5981945239..f8f9cc5b6964 100644
@@ -40,8 +40,6 @@
 #include "i2c.h"
 #include "serial.h"
 
-#include "usb.h"
-
 #define OMAP_INTC_START		NR_IRQS
 
 extern int (*omap_pm_soc_init)(void);
arch/arm/mach-omap2/omap_phy_internal.c +0 -87

96 lines not on this page · raw message

arch/arm/mach-omap2/usb.h deleted +0 -71

71 lines not on this page · raw message

Signature · 7 lines
2.29.2


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#2 lore raw

PATCH 2/10 ARM: omap2: remove unused headers

In reply to Arnd Bergmann

From: Arnd Bergmann <[email protected]>

The serial.h and clock3xxx.h headers have no contents that anything else uses, so these can be removed after the other files stop including them.

---
 arch/arm/mach-omap2/clock3xxx.h               | 21 ------
 arch/arm/mach-omap2/common.h                  |  1 -
 arch/arm/mach-omap2/io.c                      |  2 -
 arch/arm/mach-omap2/omap_hwmod_2420_data.c    |  1 -
 .../omap_hwmod_2xxx_interconnect_data.c       |  1 -
 arch/arm/mach-omap2/omap_hwmod_3xxx_data.c    |  1 -
 arch/arm/mach-omap2/serial.h                  | 66 -------------------
 7 files changed, 93 deletions(-)
 delete mode 100644 arch/arm/mach-omap2/clock3xxx.h
 delete mode 100644 arch/arm/mach-omap2/serial.h
arch/arm/mach-omap2/clock3xxx.h deleted +0 -21
deleted file mode 100644
index 10a9f577dc1a..000000000000
@@ -1,21 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-/*
- * OMAP3-common clock function prototypes and macros
- *
- * Copyright (C) 2007-2010 Texas Instruments, Inc.
- * Copyright (C) 2007-2010 Nokia Corporation
- */
-
-#ifndef __ARCH_ARM_MACH_OMAP2_CLOCK3XXX_H
-#define __ARCH_ARM_MACH_OMAP2_CLOCK3XXX_H
-
-int omap3xxx_clk_init(void);
-int omap3_core_dpll_m2_set_rate(struct clk_hw *clk, unsigned long rate,
-					unsigned long parent_rate);
-
-extern struct clk *sdrc_ick_p;
-extern struct clk *arm_fck_p;
-
-extern const struct clkops clkops_noncore_dpll_ops;
-
-#endif
arch/arm/mach-omap2/common.h +0 -1
index f8f9cc5b6964..fc041d18809b 100644
@@ -38,7 +38,6 @@
 #include <asm/hardware/cache-l2x0.h>
 
 #include "i2c.h"
-#include "serial.h"
 
 #define OMAP_INTC_START		NR_IRQS
 
arch/arm/mach-omap2/io.c +0 -2
index fba0c7aa398c..921c18ccde6d 100644
@@ -33,10 +33,8 @@
 #include "common.h"
 #include "clock.h"
 #include "clock2xxx.h"
-#include "clock3xxx.h"
 #include "sdrc.h"
 #include "control.h"
-#include "serial.h"
 #include "sram.h"
 #include "cm2xxx.h"
 #include "cm3xxx.h"
arch/arm/mach-omap2/omap_hwmod_2420_data.c +0 -1
index 558fae4375ba..dbd9dc9f0962 100644
@@ -22,7 +22,6 @@
 #include "prm-regbits-24xx.h"
 #include "i2c.h"
 #include "mmc.h"
-#include "serial.h"
 #include "wd_timer.h"
 
 /*
arch/arm/mach-omap2/omap_hwmod_2xxx_interconnect_data.c +0 -1
index 518e877bb2a1..761d34914ed9 100644
@@ -13,7 +13,6 @@
 #include "omap_hwmod.h"
 #include "l3_2xxx.h"
 #include "l4_2xxx.h"
-#include "serial.h"
 
 #include "omap_hwmod_common_data.h"
 
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +0 -1
index b6c7d98a9eff..4dbd56911c95 100644
@@ -27,7 +27,6 @@
 
 #include "i2c.h"
 #include "wd_timer.h"
-#include "serial.h"
 
 /*
  * OMAP3xxx hardware module integration data
arch/arm/mach-omap2/serial.h deleted +0 -66

66 lines not on this page · raw message

Signature · 7 lines
2.29.2


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#3 lore raw

PATCH 3/10 ARM: omap2: remove unused omap_hwmod_reset.c

In reply to Arnd Bergmann

From: Arnd Bergmann <[email protected]>

Since commit 90aa4ed5a43f ("ARM: OMAP2+: Drop legacy platform data for dra7 rtcss"), this is not used any more and can be removed.

---
 arch/arm/mach-omap2/Makefile           |  2 +-
 arch/arm/mach-omap2/omap_hwmod.h       |  7 --
 arch/arm/mach-omap2/omap_hwmod_reset.c | 98 --------------------------
 3 files changed, 1 insertion(+), 106 deletions(-)
 delete mode 100644 arch/arm/mach-omap2/omap_hwmod_reset.c
arch/arm/mach-omap2/Makefile +1 -1
index 2feb9f6630af..43b44e0858c1 100644
@@ -7,7 +7,7 @@
 obj-y := id.o io.o control.o devices.o fb.o pm.o \
 	 common.o dma.o omap-headsmp.o sram.o
 
-hwmod-common				= omap_hwmod.o omap_hwmod_reset.o \
+hwmod-common				= omap_hwmod.o \
 					  omap_hwmod_common_data.o \
 					  omap_hwmod_common_ipblock_data.o \
 					  omap_device.o display.o hdq1w.o \
arch/arm/mach-omap2/omap_hwmod.h +0 -7
index 6962a8d267e7..1bb42f3d2e83 100644
@@ -669,13 +669,6 @@ omap_hwmod_for_each_by_class(const char *classname,
 }
 #endif	/* CONFIG_OMAP_HWMOD */
 
-/*
- *
- */
-
-void omap_hwmod_rtc_unlock(struct omap_hwmod *oh);
-void omap_hwmod_rtc_lock(struct omap_hwmod *oh);
-
 /*
  * Chip variant-specific hwmod init routines - XXX should be converted
  * to use initcalls once the initial boot ordering is straightened out
arch/arm/mach-omap2/omap_hwmod_reset.c deleted +0 -98

98 lines not on this page · raw message

Signature · 7 lines
2.29.2


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#4 lore raw

PATCH 4/10 ARM: omap2: simplify clock2xxx header

In reply to Arnd Bergmann

From: Arnd Bergmann <[email protected]>

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.

---
 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(-)
arch/arm/mach-omap2/clkt2xxx_dpllcore.c +1 -0
index 8a9983cb4733..93f6d3cd9525 100644
@@ -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"
arch/arm/mach-omap2/clkt2xxx_virt_prcm_set.c +8 -6
index edf046b470ba..be4557d1fdac 100644
@@ -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;
 
arch/arm/mach-omap2/clock.c +0 -2
index 3c1d12dc8ff3..83fae51722a9 100644
@@ -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
arch/arm/mach-omap2/clock.h +0 -2
index bbe4b32891bb..f365614405e8 100644
@@ -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;
 
arch/arm/mach-omap2/clock2xxx.h +0 -29
index a8408f9d0f33..73c011dadfd2 100644
@@ -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
arch/arm/mach-omap2/io.c +0 -1
index 921c18ccde6d..375fea35b981 100644
@@ -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"
Signature · 7 lines
2.29.2


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#5 lore raw

PATCH 5/10 ARM: omap2: remove APLL control

In reply to Arnd Bergmann

From: Arnd Bergmann <[email protected]>

These functions have no callers and can just be removed.

---
 arch/arm/mach-omap2/cm2xxx.c      | 97 -------------------------------
 arch/arm/mach-omap2/cm2xxx.h      |  5 --
 arch/arm/mach-omap2/cm2xxx_3xxx.h |  5 --
 3 files changed, 107 deletions(-)
arch/arm/mach-omap2/cm2xxx.c +0 -97
index 0827acb60584..17833e0f22f8 100644
@@ -95,103 +95,6 @@ void omap2xxx_cm_set_dpll_auto_low_power_stop(void)
 	_omap2xxx_set_dpll_autoidle(DPLL_AUTOIDLE_DISABLE);
 }
 
-/*
- * APLL control
- */
-
-static void _omap2xxx_set_apll_autoidle(u8 m, u32 mask)
-{
-	u32 v;
-
-	v = omap2_cm_read_mod_reg(PLL_MOD, CM_AUTOIDLE);
-	v &= ~mask;
-	v |= m << __ffs(mask);
-	omap2_cm_write_mod_reg(v, PLL_MOD, CM_AUTOIDLE);
-}
-
-void omap2xxx_cm_set_apll54_disable_autoidle(void)
-{
-	_omap2xxx_set_apll_autoidle(OMAP2XXX_APLL_AUTOIDLE_LOW_POWER_STOP,
-				    OMAP24XX_AUTO_54M_MASK);
-}
-
-void omap2xxx_cm_set_apll54_auto_low_power_stop(void)
-{
-	_omap2xxx_set_apll_autoidle(OMAP2XXX_APLL_AUTOIDLE_DISABLE,
-				    OMAP24XX_AUTO_54M_MASK);
-}
-
-void omap2xxx_cm_set_apll96_disable_autoidle(void)
-{
-	_omap2xxx_set_apll_autoidle(OMAP2XXX_APLL_AUTOIDLE_LOW_POWER_STOP,
-				    OMAP24XX_AUTO_96M_MASK);
-}
-
-void omap2xxx_cm_set_apll96_auto_low_power_stop(void)
-{
-	_omap2xxx_set_apll_autoidle(OMAP2XXX_APLL_AUTOIDLE_DISABLE,
-				    OMAP24XX_AUTO_96M_MASK);
-}
-
-/* Enable an APLL if off */
-static int _omap2xxx_apll_enable(u8 enable_bit, u8 status_bit)
-{
-	u32 v, m;
-
-	m = EN_APLL_LOCKED << enable_bit;
-
-	v = omap2_cm_read_mod_reg(PLL_MOD, CM_CLKEN);
-	if (v & m)
-		return 0;   /* apll already enabled */
-
-	v |= m;
-	omap2_cm_write_mod_reg(v, PLL_MOD, CM_CLKEN);
-
-	omap2xxx_cm_wait_module_ready(0, PLL_MOD, 1, status_bit);
-
-	/*
-	 * REVISIT: Should we return an error code if
-	 * omap2xxx_cm_wait_module_ready() fails?
-	 */
-	return 0;
-}
-
-/* Stop APLL */
-static void _omap2xxx_apll_disable(u8 enable_bit)
-{
-	u32 v;
-
-	v = omap2_cm_read_mod_reg(PLL_MOD, CM_CLKEN);
-	v &= ~(EN_APLL_LOCKED << enable_bit);
-	omap2_cm_write_mod_reg(v, PLL_MOD, CM_CLKEN);
-}
-
-/* Enable an APLL if off */
-int omap2xxx_cm_apll54_enable(void)
-{
-	return _omap2xxx_apll_enable(OMAP24XX_EN_54M_PLL_SHIFT,
-				     OMAP24XX_ST_54M_APLL_SHIFT);
-}
-
-/* Enable an APLL if off */
-int omap2xxx_cm_apll96_enable(void)
-{
-	return _omap2xxx_apll_enable(OMAP24XX_EN_96M_PLL_SHIFT,
-				     OMAP24XX_ST_96M_APLL_SHIFT);
-}
-
-/* Stop APLL */
-void omap2xxx_cm_apll54_disable(void)
-{
-	_omap2xxx_apll_disable(OMAP24XX_EN_54M_PLL_SHIFT);
-}
-
-/* Stop APLL */
-void omap2xxx_cm_apll96_disable(void)
-{
-	_omap2xxx_apll_disable(OMAP24XX_EN_96M_PLL_SHIFT);
-}
-
 /**
  * omap2xxx_cm_split_idlest_reg - split CM_IDLEST reg addr into its components
  * @idlest_reg: CM_IDLEST* virtual address
arch/arm/mach-omap2/cm2xxx.h +0 -5
index 004016d7459e..ee0cb40691b2 100644
@@ -46,11 +46,6 @@
 extern void omap2xxx_cm_set_dpll_disable_autoidle(void);
 extern void omap2xxx_cm_set_dpll_auto_low_power_stop(void);
 
-extern void omap2xxx_cm_set_apll54_disable_autoidle(void);
-extern void omap2xxx_cm_set_apll54_auto_low_power_stop(void);
-extern void omap2xxx_cm_set_apll96_disable_autoidle(void);
-extern void omap2xxx_cm_set_apll96_auto_low_power_stop(void);
-
 int omap2xxx_cm_wait_module_ready(u8 part, s16 prcm_mod, u16 idlest_id,
 				  u8 idlest_shift);
 extern int omap2xxx_cm_fclks_active(void);
arch/arm/mach-omap2/cm2xxx_3xxx.h +0 -5
index 70944b94cc09..6dfc09383160 100644
@@ -93,11 +93,6 @@ static inline u32 omap2_cm_clear_mod_reg_bits(u32 bits, s16 module, s16 idx)
 	return omap2_cm_rmw_mod_reg_bits(bits, 0x0, module, idx);
 }
 
-extern int omap2xxx_cm_apll54_enable(void);
-extern void omap2xxx_cm_apll54_disable(void);
-extern int omap2xxx_cm_apll96_enable(void);
-extern void omap2xxx_cm_apll96_disable(void);
-
 #endif
 
 /* CM register bits shared between 24XX and 3430 */
Signature · 7 lines
2.29.2


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#6 lore raw

PATCH 6/10 ARM: omap2: smartreflex: remove on_init control

In reply to Arnd Bergmann

From: Arnd Bergmann <[email protected]>

Nothing calls omap_enable_smartreflex_on_init() any more, so it does not need to be tracked either.

---
 arch/arm/mach-omap2/pm.h          |  3 ---
 arch/arm/mach-omap2/sr_device.c   | 13 -------------
 drivers/soc/ti/smartreflex.c      |  4 ----
 include/linux/power/smartreflex.h |  3 ---
 4 files changed, 23 deletions(-)
arch/arm/mach-omap2/pm.h +0 -3
index 80e84ae66aee..f523ca03161f 100644
@@ -110,14 +110,11 @@ extern u16 pm44xx_errata;
 
 #ifdef CONFIG_POWER_AVS_OMAP
 extern int omap_devinit_smartreflex(void);
-extern void omap_enable_smartreflex_on_init(void);
 #else
 static inline int omap_devinit_smartreflex(void)
 {
 	return -EINVAL;
 }
-
-static inline void omap_enable_smartreflex_on_init(void) {}
 #endif
 
 #ifdef CONFIG_TWL4030_CORE
arch/arm/mach-omap2/sr_device.c +0 -13
index db672cf19a51..d2133423b0c9 100644
@@ -26,8 +26,6 @@
 #include "control.h"
 #include "pm.h"
 
-static bool sr_enable_on_init;
-
 /* Read EFUSE values from control registers for OMAP3430 */
 static void __init sr_set_nvalues(struct omap_volt_data *volt_data,
 				struct omap_sr_data *sr_data)
@@ -144,8 +142,6 @@ static int __init sr_init_by_name(const char *name, const char *voltdm)
 
 	sr_set_nvalues(volt_data, sr_data);
 
-	sr_data->enable_on_init = sr_enable_on_init;
-
 exit:
 	i++;
 
@@ -173,15 +169,6 @@ static int __init sr_dev_init(struct omap_hwmod *oh, void *user)
 }
 #endif
 
-/*
- * API to be called from board files to enable smartreflex
- * autocompensation at init.
- */
-void __init omap_enable_smartreflex_on_init(void)
-{
-	sr_enable_on_init = true;
-}
-
 static const char * const omap4_sr_instances[] = {
 	"mpu",
 	"iva",
drivers/soc/ti/smartreflex.c +0 -4
index ad2bb72e640c..2108232d6fa4 100644
@@ -198,7 +198,6 @@ static void sr_stop_vddautocomp(struct omap_sr *sr)
  */
 static int sr_late_init(struct omap_sr *sr_info)
 {
-	struct omap_sr_data *pdata = sr_info->pdev->dev.platform_data;
 	int ret = 0;
 
 	if (sr_class->notify && sr_class->notify_flags && sr_info->irq) {
@@ -209,9 +208,6 @@ static int sr_late_init(struct omap_sr *sr_info)
 		disable_irq(sr_info->irq);
 	}
 
-	if (pdata && pdata->enable_on_init)
-		sr_start_vddautocomp(sr_info);
-
 	return ret;
 
 error:
include/linux/power/smartreflex.h +0 -3
index 167b9b040091..3a2c79dfc1ff 100644
@@ -273,8 +273,6 @@ struct omap_sr_nvalue_table {
  * @senn_avgweight	SENNAVGWEIGHT value of the sr AVGWEIGHT register
  * @senp_avgweight	SENPAVGWEIGHT value of the sr AVGWEIGHT register
  * @nvalue_count:	Number of distinct nvalues in the nvalue table
- * @enable_on_init:	whether this sr module needs to enabled at
- *			boot up or not.
  * @nvalue_table:	table containing the  efuse offsets and nvalues
  *			corresponding to them.
  * @voltdm:		Pointer to the voltage domain associated with the SR
@@ -290,7 +288,6 @@ struct omap_sr_data {
 	u32				senn_avgweight;
 	u32				senp_avgweight;
 	int				nvalue_count;
-	bool				enable_on_init;
 	struct omap_sr_nvalue_table	*nvalue_table;
 	struct voltagedomain		*voltdm;
 };
Signature · 7 lines
2.29.2


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#7 lore raw

PATCH 7/10 ARM: omap2: remove unused functions

In reply to Arnd Bergmann

From: Arnd Bergmann <[email protected]>

These are a number of individual functions that were either never used, or that had their last user removed in a prior cleanup.

---
 arch/arm/mach-omap2/clockdomain.c             |  40 -------
 arch/arm/mach-omap2/clockdomain.h             |   2 -
 arch/arm/mach-omap2/common.h                  |   3 -
 arch/arm/mach-omap2/control.c                 |  73 -------------
 arch/arm/mach-omap2/control.h                 |   5 -
 arch/arm/mach-omap2/io.c                      |   6 --
 arch/arm/mach-omap2/omap-secure.c             |   5 -
 arch/arm/mach-omap2/omap-secure.h             |   1 -
 arch/arm/mach-omap2/omap_device.c             |  60 -----------
 arch/arm/mach-omap2/omap_device.h             |   5 -
 arch/arm/mach-omap2/omap_hwmod.c              |  90 ----------------
 arch/arm/mach-omap2/omap_hwmod.h              |   4 -
 .../mach-omap2/omap_hwmod_2xxx_ipblock_data.c |   6 --
 arch/arm/mach-omap2/omap_hwmod_common_data.h  |   1 -
 arch/arm/mach-omap2/pm.c                      |   6 --
 arch/arm/mach-omap2/pm.h                      |   4 -
 arch/arm/mach-omap2/powerdomain.c             | 100 ------------------
 arch/arm/mach-omap2/powerdomain.h             |   3 -
 arch/arm/mach-omap2/prcm_mpu44xx.c            |  12 ---
 arch/arm/mach-omap2/prcm_mpu_44xx_54xx.h      |   2 -
 arch/arm/mach-omap2/prm.h                     |   3 -
 arch/arm/mach-omap2/prm_common.c              |  51 ---------
 arch/arm/mach-omap2/sdrc.c                    |  49 ---------
 arch/arm/mach-omap2/sdrc.h                    |   3 -
 arch/arm/mach-omap2/vc.c                      |  15 ---
 25 files changed, 549 deletions(-)
arch/arm/mach-omap2/clockdomain.c +0 -40
index 1feb0098705e..f4e488e72515 100644
@@ -1043,46 +1043,6 @@ void clkdm_deny_idle(struct clockdomain *clkdm)
 	pwrdm_unlock(clkdm->pwrdm.ptr);
 }
 
-/**
- * clkdm_in_hwsup - is clockdomain @clkdm have hardware-supervised idle enabled?
- * @clkdm: struct clockdomain *
- *
- * Returns true if clockdomain @clkdm currently has
- * hardware-supervised idle enabled, or false if it does not or if
- * @clkdm is NULL.  It is only valid to call this function after
- * clkdm_init() has been called.  This function does not actually read
- * bits from the hardware; it instead tests an in-memory flag that is
- * changed whenever the clockdomain code changes the auto-idle mode.
- */
-bool clkdm_in_hwsup(struct clockdomain *clkdm)
-{
-	bool ret;
-
-	if (!clkdm)
-		return false;
-
-	ret = (clkdm->_flags & _CLKDM_FLAG_HWSUP_ENABLED) ? true : false;
-
-	return ret;
-}
-
-/**
- * clkdm_missing_idle_reporting - can @clkdm enter autoidle even if in use?
- * @clkdm: struct clockdomain *
- *
- * Returns true if clockdomain @clkdm has the
- * CLKDM_MISSING_IDLE_REPORTING flag set, or false if not or @clkdm is
- * null.  More information is available in the documentation for the
- * CLKDM_MISSING_IDLE_REPORTING macro.
- */
-bool clkdm_missing_idle_reporting(struct clockdomain *clkdm)
-{
-	if (!clkdm)
-		return false;
-
-	return (clkdm->flags & CLKDM_MISSING_IDLE_REPORTING) ? true : false;
-}
-
 /* Public autodep handling functions (deprecated) */
 
 /**
arch/arm/mach-omap2/clockdomain.h +0 -2
index 68550b23c938..a6bce3795a32 100644
@@ -203,8 +203,6 @@ void clkdm_allow_idle_nolock(struct clockdomain *clkdm);
 void clkdm_allow_idle(struct clockdomain *clkdm);
 void clkdm_deny_idle_nolock(struct clockdomain *clkdm);
 void clkdm_deny_idle(struct clockdomain *clkdm);
-bool clkdm_in_hwsup(struct clockdomain *clkdm);
-bool clkdm_missing_idle_reporting(struct clockdomain *clkdm);
 
 int clkdm_wakeup_nolock(struct clockdomain *clkdm);
 int clkdm_wakeup(struct clockdomain *clkdm);
arch/arm/mach-omap2/common.h +0 -3
index fc041d18809b..415ca353a345 100644
@@ -120,7 +120,6 @@ static inline void omap5_realtime_timer_init(void)
 void omap2420_init_early(void);
 void omap2430_init_early(void);
 void omap3430_init_early(void);
-void omap35xx_init_early(void);
 void omap3630_init_early(void);
 void omap3_init_early(void);	/* Do not use this one */
 void am33xx_init_early(void);
@@ -133,8 +132,6 @@ void omap4430_init_early(void);
 void omap5_init_early(void);
 void omap3_init_late(void);
 void omap4430_init_late(void);
-void omap2420_init_late(void);
-void omap2430_init_late(void);
 void ti81xx_init_late(void);
 void am33xx_init_late(void);
 void omap5_init_late(void);
arch/arm/mach-omap2/control.c +0 -73

83 lines not on this page · raw message

arch/arm/mach-omap2/control.h +0 -5
index c4ca30ba1790..7e7440533bf9 100644
@@ -512,8 +512,6 @@ extern void omap_ctrl_writeb(u8 val, u16 offset);
 extern void omap_ctrl_writew(u16 val, u16 offset);
 extern void omap_ctrl_writel(u32 val, u16 offset);
 
-extern void omap3_save_scratchpad_contents(void);
-extern void omap3_clear_scratchpad_contents(void);
 extern void omap3_restore(void);
 extern void omap3_restore_es3(void);
 extern void omap3_restore_3630(void);
@@ -521,14 +519,11 @@ extern u32 omap3_arm_context[128];
 extern void omap3_control_save_context(void);
 extern void omap3_control_restore_context(void);
 extern void omap3_ctrl_write_boot_mode(u8 bootmode);
-extern void omap_ctrl_write_dsp_boot_addr(u32 bootaddr);
-extern void omap_ctrl_write_dsp_boot_mode(u8 bootmode);
 extern void omap3630_ctrl_disable_rta(void);
 extern int omap3_ctrl_save_padconf(void);
 void omap3_ctrl_init(void);
 int omap2_control_base_init(void);
 int omap_control_init(void);
-void __init omap3_control_legacy_iomap_init(void);
 #else
 #define omap_ctrl_readb(x)		0
 #define omap_ctrl_readw(x)		0
arch/arm/mach-omap2/io.c +0 -6
index 375fea35b981..e45a3ce97085 100644
@@ -494,12 +494,6 @@ void __init omap3430_init_early(void)
 	omap_clk_soc_init = omap3430_dt_clk_init;
 }
 
-void __init omap35xx_init_early(void)
-{
-	omap3_init_early();
-	omap_clk_soc_init = omap3430_dt_clk_init;
-}
-
 void __init omap3630_init_early(void)
 {
 	omap3_init_early();
arch/arm/mach-omap2/omap-secure.c +0 -5
index fb9c114b9dd7..41aec5c93a70 100644
@@ -118,11 +118,6 @@ int __init omap_secure_ram_reserve_memblock(void)
 	return 0;
 }
 
-phys_addr_t omap_secure_ram_mempool_base(void)
-{
-	return omap_secure_memblock_base;
-}
-
 #if defined(CONFIG_ARCH_OMAP3) && defined(CONFIG_PM)
 u32 omap3_save_secure_ram(void *addr, int size)
 {
arch/arm/mach-omap2/omap-secure.h +0 -1
index 9e67d4efdd0c..2ce26a86b7bd 100644
@@ -70,7 +70,6 @@ extern void omap_smccc_smc(u32 fn, u32 arg);
 extern void omap_smc1(u32 fn, u32 arg);
 extern u32 omap_smc2(u32 id, u32 falg, u32 pargs);
 extern u32 omap_smc3(u32 id, u32 process, u32 flag, u32 pargs);
-extern phys_addr_t omap_secure_ram_mempool_base(void);
 extern int omap_secure_ram_reserve_memblock(void);
 extern u32 save_secure_ram_context(u32 args_pa);
 extern u32 omap3_save_secure_ram(void *save_regs, int size);
arch/arm/mach-omap2/omap_device.c +0 -60

72 lines not on this page · raw message

arch/arm/mach-omap2/omap_device.h +0 -5
index d607532cf5e0..455f0a2b43ee 100644
@@ -72,11 +72,6 @@ struct omap_device *omap_device_alloc(struct platform_device *pdev,
 				      struct omap_hwmod **ohs, int oh_cnt);
 void omap_device_delete(struct omap_device *od);
 
-struct device *omap_device_get_by_hwmod_name(const char *oh_name);
-
-/* OMAP PM interface */
-int omap_device_get_context_loss_count(struct platform_device *pdev);
-
 /* Other */
 
 int omap_device_assert_hardreset(struct platform_device *pdev,
arch/arm/mach-omap2/omap_hwmod.c +0 -90

105 lines not on this page · raw message

arch/arm/mach-omap2/omap_hwmod.h +0 -4
index 1bb42f3d2e83..3fa6d217ab83 100644
@@ -643,7 +643,6 @@ int omap_hwmod_fill_resources(struct omap_hwmod *oh, struct resource *res);
 int omap_hwmod_get_resource_byname(struct omap_hwmod *oh, unsigned int type,
 				   const char *name, struct resource *res);
 
-struct powerdomain *omap_hwmod_get_pwrdm(struct omap_hwmod *oh);
 void __iomem *omap_hwmod_get_mpu_rt_va(struct omap_hwmod *oh);
 
 int omap_hwmod_for_each_by_class(const char *classname,
@@ -652,12 +651,9 @@ int omap_hwmod_for_each_by_class(const char *classname,
 				 void *user);
 
 int omap_hwmod_set_postsetup_state(struct omap_hwmod *oh, u8 state);
-int omap_hwmod_get_context_loss_count(struct omap_hwmod *oh);
 
 extern void __init omap_hwmod_init(void);
 
-const char *omap_hwmod_get_main_clk(struct omap_hwmod *oh);
-
 #else	/* CONFIG_OMAP_HWMOD */
 
 static inline int
arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c +0 -6
index 9156f2bfbc8d..9ab1d57f8b73 100644
@@ -189,12 +189,6 @@ struct omap_hwmod omap2xxx_mpu_hwmod = {
 	.main_clk	= "mpu_ck",
 };
 
-/* IVA2 */
-struct omap_hwmod omap2xxx_iva_hwmod = {
-	.name		= "iva",
-	.class		= &iva_hwmod_class,
-};
-
 /* timer3 */
 struct omap_hwmod omap2xxx_timer3_hwmod = {
 	.name		= "timer3",
arch/arm/mach-omap2/omap_hwmod_common_data.h +0 -1
index 0045e6680a63..c8eb1e6cc4a9 100644
@@ -20,7 +20,6 @@ extern struct omap_hwmod omap2xxx_l3_main_hwmod;
 extern struct omap_hwmod omap2xxx_l4_core_hwmod;
 extern struct omap_hwmod omap2xxx_l4_wkup_hwmod;
 extern struct omap_hwmod omap2xxx_mpu_hwmod;
-extern struct omap_hwmod omap2xxx_iva_hwmod;
 extern struct omap_hwmod omap2xxx_timer3_hwmod;
 extern struct omap_hwmod omap2xxx_timer4_hwmod;
 extern struct omap_hwmod omap2xxx_timer5_hwmod;
arch/arm/mach-omap2/pm.c +0 -6
index da829a90fe8c..53a132f11961 100644
@@ -54,12 +54,6 @@ static struct omap2_oscillator oscillator = {
 	.shutdown_time = ULONG_MAX,
 };
 
-void omap_pm_setup_oscillator(u32 tstart, u32 tshut)
-{
-	oscillator.startup_time = tstart;
-	oscillator.shutdown_time = tshut;
-}
-
 void omap_pm_get_oscillator(u32 *tstart, u32 *tshut)
 {
 	if (!tstart || !tshut)
arch/arm/mach-omap2/pm.h +0 -4
index f523ca03161f..0c95774a4b8f 100644
@@ -142,13 +142,9 @@ static inline int omap4_cpcap_init(void)
 #endif
 
 #ifdef CONFIG_PM
-extern void omap_pm_setup_oscillator(u32 tstart, u32 tshut);
 extern void omap_pm_get_oscillator(u32 *tstart, u32 *tshut);
-extern void omap_pm_setup_sr_i2c_pcb_length(u32 mm);
 #else
-static inline void omap_pm_setup_oscillator(u32 tstart, u32 tshut) { }
 static inline void omap_pm_get_oscillator(u32 *tstart, u32 *tshut) { *tstart = *tshut = 0; }
-static inline void omap_pm_setup_sr_i2c_pcb_length(u32 mm) { }
 #endif
 
 #ifdef CONFIG_SUSPEND
arch/arm/mach-omap2/powerdomain.c +0 -100

115 lines not on this page · raw message

arch/arm/mach-omap2/powerdomain.h +0 -3
index 907cc659f47a..2eaabd94986f 100644
@@ -243,8 +243,6 @@ int pwrdm_state_switch_nolock(struct powerdomain *pwrdm);
 int pwrdm_state_switch(struct powerdomain *pwrdm);
 int pwrdm_pre_transition(struct powerdomain *pwrdm);
 int pwrdm_post_transition(struct powerdomain *pwrdm);
-int pwrdm_get_context_loss_count(struct powerdomain *pwrdm);
-bool pwrdm_can_ever_lose_context(struct powerdomain *pwrdm);
 
 extern int omap_set_pwrdm_state(struct powerdomain *pwrdm, u8 state);
 
@@ -276,5 +274,4 @@ extern void pwrdm_unlock(struct powerdomain *pwrdm);
 extern void pwrdms_save_context(void);
 extern void pwrdms_restore_context(void);
 
-extern void pwrdms_lost_power(void);
 #endif
arch/arm/mach-omap2/prcm_mpu44xx.c +0 -12
index 5add541e3b41..7236c50388a8 100644
@@ -35,18 +35,6 @@ void omap4_prcm_mpu_write_inst_reg(u32 val, s16 inst, u16 reg)
 	writel_relaxed(val, OMAP44XX_PRCM_MPU_REGADDR(inst, reg));
 }
 
-u32 omap4_prcm_mpu_rmw_inst_reg_bits(u32 mask, u32 bits, s16 inst, s16 reg)
-{
-	u32 v;
-
-	v = omap4_prcm_mpu_read_inst_reg(inst, reg);
-	v &= ~mask;
-	v |= bits;
-	omap4_prcm_mpu_write_inst_reg(v, inst, reg);
-
-	return v;
-}
-
 /**
  * omap2_set_globals_prcm_mpu - set the MPU PRCM base address (for early use)
  * @prcm_mpu: PRCM_MPU base virtual address
arch/arm/mach-omap2/prcm_mpu_44xx_54xx.h +0 -2
index 7c6377566f33..0c519447e790 100644
@@ -26,8 +26,6 @@ extern struct omap_domain_base prcm_mpu_base;
 
 extern u32 omap4_prcm_mpu_read_inst_reg(s16 inst, u16 idx);
 extern void omap4_prcm_mpu_write_inst_reg(u32 val, s16 inst, u16 idx);
-extern u32 omap4_prcm_mpu_rmw_inst_reg_bits(u32 mask, u32 bits, s16 inst,
-					    s16 idx);
 extern void __init omap2_set_globals_prcm_mpu(void __iomem *prcm_mpu);
 #endif
 
arch/arm/mach-omap2/prm.h +0 -3
index 08df78810a5e..bad15ba5256c 100644
@@ -15,7 +15,6 @@
 # ifndef __ASSEMBLER__
 extern struct omap_domain_base prm_base;
 extern u16 prm_features;
-extern void omap2_set_globals_prm(void __iomem *prm);
 int omap_prcm_init(void);
 int omap2_prm_base_init(void);
 int omap2_prcm_base_init(void);
@@ -156,12 +155,10 @@ int omap_prm_assert_hardreset(u8 shift, u8 part, s16 prm_mod, u16 offset);
 int omap_prm_deassert_hardreset(u8 shift, u8 st_shift, u8 part, s16 prm_mod,
 				u16 offset, u16 st_offset);
 int omap_prm_is_hardreset_asserted(u8 shift, u8 part, s16 prm_mod, u16 offset);
-extern u32 prm_read_reset_sources(void);
 extern bool prm_was_any_context_lost_old(u8 part, s16 inst, u16 idx);
 extern void prm_clear_context_loss_flags_old(u8 part, s16 inst, u16 idx);
 void omap_prm_reset_system(void);
 
-void omap_prm_reconfigure_io_chain(void);
 int omap_prm_clear_mod_irqs(s16 module, u8 regs, u32 wkst_mask);
 
 /*
arch/arm/mach-omap2/prm_common.c +0 -51

63 lines not on this page · raw message

arch/arm/mach-omap2/sdrc.c +0 -49

55 lines not on this page · raw message

arch/arm/mach-omap2/sdrc.h +0 -3
index 5bdb832665c0..5a44d64e3fbe 100644
@@ -80,9 +80,6 @@ static inline void __init omap2_sdrc_init(struct omap_sdrc_params *sdrc_cs0,
 					  struct omap_sdrc_params *sdrc_cs1) {};
 #endif
 
-int omap2_sdrc_get_params(unsigned long r,
-			  struct omap_sdrc_params **sdrc_cs0,
-			  struct omap_sdrc_params **sdrc_cs1);
 void omap2_sms_save_context(void);
 void omap2_sms_restore_context(void);
 
arch/arm/mach-omap2/vc.c +0 -15
index ea02d40405c4..fc26b96a20cc 100644
@@ -802,21 +802,6 @@ static u8 omap_vc_calc_vsel(struct voltagedomain *voltdm, u32 uvolt)
 	return voltdm->pmic->uv_to_vsel(uvolt);
 }
 
-#ifdef CONFIG_PM
-/**
- * omap_pm_setup_sr_i2c_pcb_length - set length of SR I2C traces on PCB
- * @mm: length of the PCB trace in millimetres
- *
- * Sets the PCB trace length for the I2C channel. By default uses 63mm.
- * This is needed for properly calculating the capacitance value for
- * the PCB trace, and for setting the SR I2C channel timing parameters.
- */
-void __init omap_pm_setup_sr_i2c_pcb_length(u32 mm)
-{
-	sr_i2c_pcb_length = mm;
-}
-#endif
-
 void __init omap_vc_init_channel(struct voltagedomain *voltdm)
 {
 	struct omap_vc_channel *vc = voltdm->vc;
Signature · 7 lines
2.29.2


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#8 lore raw

PATCH 8/10 ARM: omap2: remove unused declarations

In reply to Arnd Bergmann

From: Arnd Bergmann <[email protected]>

These functions were removed at some point in the past, but the extraneous declarations were left behind.

---
 arch/arm/mach-omap2/clock.h                  |  5 -----
 arch/arm/mach-omap2/common.h                 | 11 -----------
 arch/arm/mach-omap2/omap_hwmod.h             |  9 ---------
 arch/arm/mach-omap2/omap_hwmod_common_data.h |  1 -
 arch/arm/mach-omap2/omap_opp_data.h          |  5 -----
 arch/arm/mach-omap2/pm.h                     | 18 ------------------
 arch/arm/mach-omap2/powerdomain.h            |  2 --
 arch/arm/mach-omap2/prm2xxx_3xxx.h           |  3 ---
 arch/arm/mach-omap2/sdrc.h                   |  1 -
 arch/arm/mach-omap2/sram.h                   |  4 ----
 arch/arm/mach-omap2/voltage.h                |  1 -
 11 files changed, 60 deletions(-)
arch/arm/mach-omap2/clock.h +0 -5
index f365614405e8..41391fa1418a 100644
@@ -63,11 +63,6 @@
 
 extern struct ti_clk_ll_ops omap_clk_ll_ops;
 
-extern const struct clkops clkops_omap2_dflt_wait;
-extern const struct clkops clkops_omap2_dflt;
-
-extern struct clk_functions omap2_clk_functions;
-
 int __init omap2_clk_setup_ll_ops(void);
 
 void __init ti_clk_init_features(void);
arch/arm/mach-omap2/common.h +0 -11
index 415ca353a345..112e7966107c 100644
@@ -87,12 +87,6 @@ static inline int amx3_common_pm_init(void)
 }
 #endif
 
-extern void omap2_init_common_infrastructure(void);
-
-extern void omap_init_time(void);
-extern void omap3_secure_sync32k_timer_init(void);
-extern void omap3_gptimer_timer_init(void);
-extern void omap4_local_timer_init(void);
 #ifdef CONFIG_CACHE_L2X0
 int omap_l2_cache_init(void);
 #define OMAP_L2C_AUX_CTRL	(L2C_AUX_CTRL_SHARED_OVERRIDE | \
@@ -229,11 +223,6 @@ void __init ti81xx_map_io(void);
 	}							\
 })
 
-extern struct device *omap2_get_mpuss_device(void);
-extern struct device *omap2_get_iva_device(void);
-extern struct device *omap2_get_l3_device(void);
-extern struct device *omap4_get_dsp_device(void);
-
 void omap_gic_of_init(void);
 
 #ifdef CONFIG_CACHE_L2X0
arch/arm/mach-omap2/omap_hwmod.h +0 -9
index 3fa6d217ab83..b6b53170ad1e 100644
@@ -638,11 +638,6 @@ void omap_hwmod_write(u32 v, struct omap_hwmod *oh, u16 reg_offs);
 u32 omap_hwmod_read(struct omap_hwmod *oh, u16 reg_offs);
 int omap_hwmod_softreset(struct omap_hwmod *oh);
 
-int omap_hwmod_count_resources(struct omap_hwmod *oh, unsigned long flags);
-int omap_hwmod_fill_resources(struct omap_hwmod *oh, struct resource *res);
-int omap_hwmod_get_resource_byname(struct omap_hwmod *oh, unsigned int type,
-				   const char *name, struct resource *res);
-
 void __iomem *omap_hwmod_get_mpu_rt_va(struct omap_hwmod *oh);
 
 int omap_hwmod_for_each_by_class(const char *classname,
@@ -672,12 +667,8 @@ omap_hwmod_for_each_by_class(const char *classname,
 extern int omap2420_hwmod_init(void);
 extern int omap2430_hwmod_init(void);
 extern int omap3xxx_hwmod_init(void);
-extern int omap44xx_hwmod_init(void);
-extern int am33xx_hwmod_init(void);
 extern int dm814x_hwmod_init(void);
 extern int dm816x_hwmod_init(void);
-extern int dra7xx_hwmod_init(void);
-int am43xx_hwmod_init(void);
 
 extern int __init omap_hwmod_register_links(struct omap_hwmod_ocp_if **ois);
 
arch/arm/mach-omap2/omap_hwmod_common_data.h +0 -1
index c8eb1e6cc4a9..e0d65ad65614 100644
@@ -59,7 +59,6 @@ extern struct omap_hwmod_ocp_if omap2_l4_core__uart2;
 extern struct omap_hwmod_ocp_if omap2_l4_core__uart3;
 extern struct omap_hwmod_ocp_if omap2xxx_l4_core__mcspi1;
 extern struct omap_hwmod_ocp_if omap2xxx_l4_core__mcspi2;
-extern struct omap_hwmod_ocp_if omap2xxx_l4_core__timer2;
 extern struct omap_hwmod_ocp_if omap2xxx_l4_core__timer3;
 extern struct omap_hwmod_ocp_if omap2xxx_l4_core__timer4;
 extern struct omap_hwmod_ocp_if omap2xxx_l4_core__timer5;
arch/arm/mach-omap2/omap_opp_data.h +0 -5
index 88375ab38e31..ed84fe95e857 100644
@@ -71,11 +71,6 @@ struct omap_opp_def {
 	.vp_errgain	= _errgain				       \
 }
 
-/* Use this to initialize the default table */
-extern int __init omap_init_opp_table(struct omap_opp_def *opp_def,
-		u32 opp_def_size);
-
-
 extern struct omap_volt_data omap34xx_vddmpu_volt_data[];
 extern struct omap_volt_data omap34xx_vddcore_volt_data[];
 extern struct omap_volt_data omap36xx_vddmpu_volt_data[];
arch/arm/mach-omap2/pm.h +0 -18
index 0c95774a4b8f..90a341b0369c 100644
@@ -32,20 +32,6 @@ extern void omap3_pm_off_mode_enable(int);
 extern void omap_sram_idle(void);
 extern int omap_pm_clkdms_setup(struct clockdomain *clkdm, void *unused);
 
-#if defined(CONFIG_PM_OPP)
-extern int omap3_opp_init(void);
-extern int omap4_opp_init(void);
-#else
-static inline int omap3_opp_init(void)
-{
-	return -EINVAL;
-}
-static inline int omap4_opp_init(void)
-{
-	return -EINVAL;
-}
-#endif
-
 extern int omap3_pm_get_suspend_state(struct powerdomain *pwrdm);
 extern int omap3_pm_set_suspend_state(struct powerdomain *pwrdm, int state);
 
@@ -58,9 +44,6 @@ extern void pm_dbg_update_time(struct powerdomain *pwrdm, int prev);
 #endif /* CONFIG_PM_DEBUG */
 
 /* 24xx */
-extern void omap24xx_idle_loop_suspend(void);
-extern unsigned int omap24xx_idle_loop_suspend_sz;
-
 extern void omap24xx_cpu_suspend(u32 dll_ctrl, void __iomem *sdrc_dlla_ctrl,
 					void __iomem *sdrc_power);
 extern unsigned int omap24xx_cpu_suspend_sz;
@@ -120,7 +103,6 @@ static inline int omap_devinit_smartreflex(void)
 #ifdef CONFIG_TWL4030_CORE
 extern int omap3_twl_init(void);
 extern int omap4_twl_init(void);
-extern int omap3_twl_set_sr_bit(bool enable);
 #else
 static inline int omap3_twl_init(void)
 {
arch/arm/mach-omap2/powerdomain.h +0 -2
index 2eaabd94986f..4c5284d0fd62 100644
@@ -208,8 +208,6 @@ struct powerdomain *pwrdm_lookup(const char *name);
 
 int pwrdm_for_each(int (*fn)(struct powerdomain *pwrdm, void *user),
 			void *user);
-int pwrdm_for_each_nolock(int (*fn)(struct powerdomain *pwrdm, void *user),
-			void *user);
 
 int pwrdm_add_clkdm(struct powerdomain *pwrdm, struct clockdomain *clkdm);
 
arch/arm/mach-omap2/prm2xxx_3xxx.h +0 -3
index 3d803f7182b9..bc263d564acc 100644
@@ -104,9 +104,6 @@ int omap2_prm_deassert_hardreset(u8 rst_shift, u8 st_shift, u8 part,
 				 s16 prm_mod, u16 reset_offset,
 				 u16 st_offset);
 
-extern int omap2_pwrdm_set_next_pwrst(struct powerdomain *pwrdm, u8 pwrst);
-extern int omap2_pwrdm_read_next_pwrst(struct powerdomain *pwrdm);
-extern int omap2_pwrdm_read_pwrst(struct powerdomain *pwrdm);
 extern int omap2_pwrdm_set_mem_onst(struct powerdomain *pwrdm, u8 bank,
 				    u8 pwrst);
 extern int omap2_pwrdm_set_mem_retst(struct powerdomain *pwrdm, u8 bank,
arch/arm/mach-omap2/sdrc.h +0 -1
index 5a44d64e3fbe..07ff33b006a7 100644
@@ -92,7 +92,6 @@ struct memory_timings {
 };
 
 extern void omap2xxx_sdrc_init_params(u32 force_lock_to_unlock_mode);
-struct omap_sdrc_params *rx51_get_sdram_timings(void);
 
 u32 omap2xxx_sdrc_dll_is_unlocked(void);
 u32 omap2xxx_sdrc_reprogram(u32 level, u32 force);
arch/arm/mach-omap2/sram.h +0 -4
index 271062f23482..030cabc39821 100644
@@ -17,10 +17,6 @@ extern int __init omap_sram_init(void);
 
 extern void *omap_sram_push(void *funcp, unsigned long size);
 
-/* Do not use these */
-extern void omap24xx_sram_reprogram_clock(u32 ckctl, u32 dpllctl);
-extern unsigned long omap24xx_sram_reprogram_clock_sz;
-
 extern void omap242x_sram_ddr_init(u32 *slow_dll_ctrl, u32 fast_dll_ctrl,
 						u32 base_cs, u32 force_unlock);
 extern unsigned long omap242x_sram_ddr_init_sz;
arch/arm/mach-omap2/voltage.h +0 -1
index 4a225f9559a5..5beb91ce3b38 100644
@@ -163,7 +163,6 @@ extern void omap54xx_voltagedomains_init(void);
 
 struct voltagedomain *voltdm_lookup(const char *name);
 void voltdm_init(struct voltagedomain **voltdm_list);
-int voltdm_add_pwrdm(struct voltagedomain *voltdm, struct powerdomain *pwrdm);
 int voltdm_scale(struct voltagedomain *voltdm, unsigned long target_volt);
 void voltdm_reset(struct voltagedomain *voltdm);
 unsigned long voltdm_get_voltage(struct voltagedomain *voltdm);
Signature · 7 lines
2.29.2


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#9 lore raw

PATCH 9/10 ARM: omap2: remove unused omap2_pm_init

In reply to Arnd Bergmann

From: Arnd Bergmann <[email protected]>

The omap2420_init_late() and omap2430_init_late() functions are never called. Removing them also shows that the entire arch/arm/mach-omap2/pm24xx.c file is unused and can be removed.

---
 arch/arm/mach-omap2/Makefile |   1 -
 arch/arm/mach-omap2/common.h |   9 -
 arch/arm/mach-omap2/io.c     |  10 --
 arch/arm/mach-omap2/pm24xx.c | 312 -----------------------------------
 4 files changed, 332 deletions(-)
 delete mode 100644 arch/arm/mach-omap2/pm24xx.c
arch/arm/mach-omap2/Makefile +0 -1
index 43b44e0858c1..daf21127c82f 100644
@@ -80,7 +80,6 @@ obj-$(CONFIG_ARCH_OMAP4)		+= $(omap-4-5-pm-common)
 obj-$(CONFIG_SOC_OMAP5)			+= $(omap-4-5-pm-common)
 
 ifeq ($(CONFIG_PM),y)
-obj-$(CONFIG_ARCH_OMAP2)		+= pm24xx.o
 obj-$(CONFIG_ARCH_OMAP2)		+= sleep24xx.o
 obj-$(CONFIG_ARCH_OMAP3)		+= pm34xx.o sleep34xx.o
 omap-4-5-pm-common			+= pm44xx.o
arch/arm/mach-omap2/common.h +0 -9
index 112e7966107c..ebf0266e1943 100644
@@ -44,15 +44,6 @@
 extern int (*omap_pm_soc_init)(void);
 int omap_pm_nop_init(void);
 
-#if defined(CONFIG_PM) && defined(CONFIG_ARCH_OMAP2)
-int omap2_pm_init(void);
-#else
-static inline int omap2_pm_init(void)
-{
-	return 0;
-}
-#endif
-
 #if defined(CONFIG_PM) && defined(CONFIG_ARCH_OMAP3)
 int omap3_pm_init(void);
 #else
arch/arm/mach-omap2/io.c +0 -10
index e45a3ce97085..81cb175c2dbe 100644
@@ -435,11 +435,6 @@ void __init omap2420_init_early(void)
 	omap_clk_soc_init = omap2420_dt_clk_init;
 	rate_table = omap2420_rate_table;
 }
-
-void __init omap2420_init_late(void)
-{
-	omap_pm_soc_init = omap2_pm_init;
-}
 #endif
 
 #ifdef CONFIG_SOC_OMAP2430
@@ -459,11 +454,6 @@ void __init omap2430_init_early(void)
 	omap_clk_soc_init = omap2430_dt_clk_init;
 	rate_table = omap2430_rate_table;
 }
-
-void __init omap2430_init_late(void)
-{
-	omap_pm_soc_init = omap2_pm_init;
-}
 #endif
 
 /*
arch/arm/mach-omap2/pm24xx.c deleted +0 -312

312 lines not on this page · raw message

Signature · 7 lines
2.29.2


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#10 lore raw

PATCH 10/10 ARM: omap2: make functions static

In reply to Arnd Bergmann

From: Arnd Bergmann <[email protected]>

A number of functions are only called from the file they are defined in, so remove the extern declarations and make them local to those files.

---
 arch/arm/mach-omap2/board-n8x0.c                   |  2 +-
 arch/arm/mach-omap2/clockdomain.c                  |  4 ++--
 arch/arm/mach-omap2/clockdomain.h                  |  2 --
 arch/arm/mach-omap2/cm2xxx.c                       |  4 ++--
 arch/arm/mach-omap2/cm2xxx.h                       |  2 --
 arch/arm/mach-omap2/common.h                       |  2 --
 arch/arm/mach-omap2/id.c                           |  2 +-
 arch/arm/mach-omap2/id.h                           |  2 --
 arch/arm/mach-omap2/io.c                           |  2 +-
 arch/arm/mach-omap2/omap-secure.c                  |  2 +-
 arch/arm/mach-omap2/omap-secure.h                  |  2 --
 arch/arm/mach-omap2/omap_device.c                  | 14 ++++++++++----
 arch/arm/mach-omap2/omap_device.h                  |  9 ---------
 arch/arm/mach-omap2/omap_hwmod.c                   |  4 +++-
 arch/arm/mach-omap2/omap_hwmod.h                   |  1 -
 .../mach-omap2/omap_hwmod_2xxx_3xxx_ipblock_data.c |  2 +-
 arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c |  6 +++---
 arch/arm/mach-omap2/omap_hwmod_common_data.h       |  4 ----
 arch/arm/mach-omap2/pm.c                           |  2 +-
 arch/arm/mach-omap2/powerdomain.c                  |  8 ++++----
 arch/arm/mach-omap2/powerdomain.h                  |  3 ---
 arch/arm/mach-omap2/prcm-common.h                  |  1 -
 arch/arm/mach-omap2/prm.h                          |  1 -
 arch/arm/mach-omap2/prm3xxx.c                      |  5 +++--
 arch/arm/mach-omap2/prm3xxx.h                      |  2 --
 arch/arm/mach-omap2/prm_common.c                   |  4 ++--
 arch/arm/mach-omap2/sdrc.c                         |  2 +-
 arch/arm/mach-omap2/sdrc.h                         |  1 -
 arch/arm/mach-omap2/usb-tusb6010.c                 |  6 ++----
 arch/arm/mach-omap2/voltage.c                      |  2 +-
 arch/arm/mach-omap2/voltage.h                      |  1 -
 include/linux/platform_data/voltage-omap.h         |  1 -
 include/linux/usb/musb.h                           |  2 --
 33 files changed, 39 insertions(+), 68 deletions(-)
arch/arm/mach-omap2/board-n8x0.c +1 -1
index 5e86145db0e2..eb21a4cc5e4d 100644
@@ -505,7 +505,7 @@ static void __init n8x0_mmc_init(void)
 }
 #else
 static struct omap_mmc_platform_data mmc1_data;
-void __init n8x0_mmc_init(void)
+static void __init n8x0_mmc_init(void)
 {
 }
 #endif	/* CONFIG_MMC_OMAP */
arch/arm/mach-omap2/clockdomain.c +2 -2
index f4e488e72515..d145e7ac709b 100644
@@ -831,7 +831,7 @@ int clkdm_clear_all_sleepdeps(struct clockdomain *clkdm)
  * -EINVAL if @clkdm is NULL or if clockdomain does not support
  * software-initiated sleep; 0 upon success.
  */
-int clkdm_sleep_nolock(struct clockdomain *clkdm)
+static int clkdm_sleep_nolock(struct clockdomain *clkdm)
 {
 	int ret;
 
@@ -885,7 +885,7 @@ int clkdm_sleep(struct clockdomain *clkdm)
  * -EINVAL if @clkdm is NULL or if the clockdomain does not support
  * software-controlled wakeup; 0 upon success.
  */
-int clkdm_wakeup_nolock(struct clockdomain *clkdm)
+static int clkdm_wakeup_nolock(struct clockdomain *clkdm)
 {
 	int ret;
 
arch/arm/mach-omap2/clockdomain.h +0 -2
index a6bce3795a32..c36fb2721261 100644
@@ -204,9 +204,7 @@ void clkdm_allow_idle(struct clockdomain *clkdm);
 void clkdm_deny_idle_nolock(struct clockdomain *clkdm);
 void clkdm_deny_idle(struct clockdomain *clkdm);
 
-int clkdm_wakeup_nolock(struct clockdomain *clkdm);
 int clkdm_wakeup(struct clockdomain *clkdm);
-int clkdm_sleep_nolock(struct clockdomain *clkdm);
 int clkdm_sleep(struct clockdomain *clkdm);
 
 int clkdm_clk_enable(struct clockdomain *clkdm, struct clk *clk);
arch/arm/mach-omap2/cm2xxx.c +2 -2
index 17833e0f22f8..1c6d69f4bf49 100644
@@ -145,8 +145,8 @@ static int omap2xxx_cm_split_idlest_reg(struct clk_omap_reg *idlest_reg,
  * (@prcm_mod, @idlest_id, @idlest_shift) is clocked.  Return 0 upon
  * success or -EBUSY if the module doesn't enable in time.
  */
-int omap2xxx_cm_wait_module_ready(u8 part, s16 prcm_mod, u16 idlest_id,
-				  u8 idlest_shift)
+static int omap2xxx_cm_wait_module_ready(u8 part, s16 prcm_mod, u16 idlest_id,
+					 u8 idlest_shift)
 {
 	int ena = 0, i = 0;
 	u8 cm_idlest_reg;
arch/arm/mach-omap2/cm2xxx.h +0 -2
index ee0cb40691b2..7cbeff15ffb0 100644
@@ -46,8 +46,6 @@
 extern void omap2xxx_cm_set_dpll_disable_autoidle(void);
 extern void omap2xxx_cm_set_dpll_auto_low_power_stop(void);
 
-int omap2xxx_cm_wait_module_ready(u8 part, s16 prcm_mod, u16 idlest_id,
-				  u8 idlest_shift);
 extern int omap2xxx_cm_fclks_active(void);
 extern int omap2xxx_cm_mpu_retention_allowed(void);
 extern u32 omap2xxx_cm_get_core_clk_src(void);
arch/arm/mach-omap2/common.h +0 -2
index ebf0266e1943..08034d589081 100644
@@ -106,7 +106,6 @@ void omap2420_init_early(void);
 void omap2430_init_early(void);
 void omap3430_init_early(void);
 void omap3630_init_early(void);
-void omap3_init_early(void);	/* Do not use this one */
 void am33xx_init_early(void);
 void am35xx_init_early(void);
 void ti814x_init_early(void);
@@ -120,7 +119,6 @@ void omap4430_init_late(void);
 void ti81xx_init_late(void);
 void am33xx_init_late(void);
 void omap5_init_late(void);
-int omap2_common_pm_late_init(void);
 void dra7xx_init_early(void);
 void dra7xx_init_late(void);
 
arch/arm/mach-omap2/id.c +1 -1
index 59755b5a1ad7..98999aa8cc0c 100644
@@ -117,7 +117,7 @@ static struct omap_id omap_ids[] __initdata = {
 static void __iomem *tap_base;
 static u16 tap_prod_id;
 
-void omap_get_die_id(struct omap_die_id *odi)
+static void omap_get_die_id(struct omap_die_id *odi)
 {
 	if (soc_is_omap44xx() || soc_is_omap54xx() || soc_is_dra7xx()) {
 		odi->id_0 = read_tap_reg(OMAP_TAP_DIE_ID_44XX_0);
arch/arm/mach-omap2/id.h +0 -2
index d1735f4497e3..ded7392f0526 100644
@@ -14,6 +14,4 @@ struct omap_die_id {
 	u32 id_3;
 };
 
-void omap_get_die_id(struct omap_die_id *odi);
-
 #endif
arch/arm/mach-omap2/io.c +1 -1
index 81cb175c2dbe..14ec3f78000b 100644
@@ -461,7 +461,7 @@ void __init omap2430_init_early(void)
  * same machine_id for 34xx and 36xx beagle.. Will get fixed with DT.
  */
 #ifdef CONFIG_ARCH_OMAP3
-void __init omap3_init_early(void)
+static void __init omap3_init_early(void)
 {
 	omap2_set_globals_tap(OMAP343X_CLASS, OMAP2_L4_IO_ADDRESS(0x4830A000));
 	omap2_set_globals_sdrc(OMAP2_L3_IO_ADDRESS(OMAP343X_SDRC_BASE),
arch/arm/mach-omap2/omap-secure.c +1 -1
index 41aec5c93a70..29c7350b06ab 100644
@@ -152,7 +152,7 @@ u32 omap3_save_secure_ram(void *addr, int size)
  * NOTE: rx51_secure_dispatcher differs from omap_secure_dispatcher because
  *       it calling omap_smc3() instead omap_smc2() and param[0] is nargs+1
  */
-u32 rx51_secure_dispatcher(u32 idx, u32 process, u32 flag, u32 nargs,
+static u32 rx51_secure_dispatcher(u32 idx, u32 process, u32 flag, u32 nargs,
 			   u32 arg1, u32 arg2, u32 arg3, u32 arg4)
 {
 	static u32 param[5];
arch/arm/mach-omap2/omap-secure.h +0 -2
index 2ce26a86b7bd..2517c4a5a0e2 100644
@@ -74,8 +74,6 @@ extern int omap_secure_ram_reserve_memblock(void);
 extern u32 save_secure_ram_context(u32 args_pa);
 extern u32 omap3_save_secure_ram(void *save_regs, int size);
 
-extern u32 rx51_secure_dispatcher(u32 idx, u32 process, u32 flag, u32 nargs,
-				  u32 arg1, u32 arg2, u32 arg3, u32 arg4);
 extern u32 rx51_secure_update_aux_cr(u32 set_bits, u32 clear_bits);
 extern u32 rx51_secure_rng_call(u32 ptr, u32 count, u32 flag);
 
arch/arm/mach-omap2/omap_device.c +10 -4
index 0594aaaa1a98..4afa2f08e668 100644
@@ -39,6 +39,12 @@
 #include "omap_device.h"
 #include "omap_hwmod.h"
 
+static struct omap_device *omap_device_alloc(struct platform_device *pdev,
+				struct omap_hwmod **ohs, int oh_cnt);
+static void omap_device_delete(struct omap_device *od);
+static struct dev_pm_domain omap_device_fail_pm_domain;
+static struct dev_pm_domain omap_device_pm_domain;
+
 /* Private functions */
 
 static void _add_clkdev(struct omap_device *od, const char *clk_alias,
@@ -296,7 +302,7 @@ static int _omap_device_idle_hwmods(struct omap_device *od)
  *
  * Returns an struct omap_device pointer or ERR_PTR() on error;
  */
-struct omap_device *omap_device_alloc(struct platform_device *pdev,
+static struct omap_device *omap_device_alloc(struct platform_device *pdev,
 					struct omap_hwmod **ohs, int oh_cnt)
 {
 	int ret = -ENOMEM;
@@ -333,7 +339,7 @@ struct omap_device *omap_device_alloc(struct platform_device *pdev,
 	return ERR_PTR(ret);
 }
 
-void omap_device_delete(struct omap_device *od)
+static void omap_device_delete(struct omap_device *od)
 {
 	if (!od)
 		return;
@@ -425,14 +431,14 @@ static int _od_resume_noirq(struct device *dev)
 #define _od_resume_noirq NULL
 #endif
 
-struct dev_pm_domain omap_device_fail_pm_domain = {
+static struct dev_pm_domain omap_device_fail_pm_domain = {
 	.ops = {
 		SET_RUNTIME_PM_OPS(_od_fail_runtime_suspend,
 				   _od_fail_runtime_resume, NULL)
 	}
 };
 
-struct dev_pm_domain omap_device_pm_domain = {
+static struct dev_pm_domain omap_device_pm_domain = {
 	.ops = {
 		SET_RUNTIME_PM_OPS(_od_runtime_suspend, _od_runtime_resume,
 				   NULL)
arch/arm/mach-omap2/omap_device.h +0 -9
index 455f0a2b43ee..aa8096ecb23c 100644
@@ -25,9 +25,6 @@
 
 #include "omap_hwmod.h"
 
-extern struct dev_pm_domain omap_device_pm_domain;
-extern struct dev_pm_domain omap_device_fail_pm_domain;
-
 /* omap_device._state values */
 #define OMAP_DEVICE_STATE_UNKNOWN	0
 #define OMAP_DEVICE_STATE_ENABLED	1
@@ -66,12 +63,6 @@ struct omap_device {
 int omap_device_enable(struct platform_device *pdev);
 int omap_device_idle(struct platform_device *pdev);
 
-/* Core code interface */
-
-struct omap_device *omap_device_alloc(struct platform_device *pdev,
-				      struct omap_hwmod **ohs, int oh_cnt);
-void omap_device_delete(struct omap_device *od);
-
 /* Other */
 
 int omap_device_assert_hardreset(struct platform_device *pdev,
arch/arm/mach-omap2/omap_hwmod.c +3 -1
index b03be626bc99..5a2a9b8e61ed 100644
@@ -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;
 
arch/arm/mach-omap2/omap_hwmod.h +0 -1
index b6b53170ad1e..dcab7a01c10e 100644
@@ -615,7 +615,6 @@ struct omap_hwmod *omap_hwmod_lookup(const char *name);
 int omap_hwmod_for_each(int (*fn)(struct omap_hwmod *oh, void *data),
 			void *data);
 
-int __init omap_hwmod_setup_one(const char *name);
 int omap_hwmod_parse_module_range(struct omap_hwmod *oh,
 				  struct device_node *np,
 				  struct resource *res);
arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_ipblock_data.c +1 -1
index 2581b8a5f866..67f1f38909d9 100644
@@ -62,7 +62,7 @@ struct omap_hwmod_class iva_hwmod_class = {
 	.name = "iva",
 };
 
-struct omap_hwmod_class_sysconfig omap2_hdq1w_sysc = {
+static struct omap_hwmod_class_sysconfig omap2_hdq1w_sysc = {
 	.rev_offs	= 0x0,
 	.sysc_offs	= 0x14,
 	.syss_offs	= 0x18,
arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c +3 -3
index 9ab1d57f8b73..4982e04ead53 100644
@@ -30,7 +30,7 @@ static struct omap_hwmod_class_sysconfig omap2_dispc_sysc = {
 	.sysc_fields	= &omap_hwmod_sysc_type1,
 };
 
-struct omap_hwmod_class omap2_dispc_hwmod_class = {
+static struct omap_hwmod_class omap2_dispc_hwmod_class = {
 	.name	= "dispc",
 	.sysc	= &omap2_dispc_sysc,
 };
@@ -47,7 +47,7 @@ static struct omap_hwmod_class_sysconfig omap2xxx_timer_sysc = {
 	.sysc_fields	= &omap_hwmod_sysc_type1,
 };
 
-struct omap_hwmod_class omap2xxx_timer_hwmod_class = {
+static struct omap_hwmod_class omap2xxx_timer_hwmod_class = {
 	.name	= "timer",
 	.sysc	= &omap2xxx_timer_sysc,
 };
@@ -67,7 +67,7 @@ static struct omap_hwmod_class_sysconfig omap2xxx_wd_timer_sysc = {
 	.sysc_fields	= &omap_hwmod_sysc_type1,
 };
 
-struct omap_hwmod_class omap2xxx_wd_timer_hwmod_class = {
+static struct omap_hwmod_class omap2xxx_wd_timer_hwmod_class = {
 	.name		= "wd_timer",
 	.sysc		= &omap2xxx_wd_timer_sysc,
 	.pre_shutdown	= &omap2_wd_timer_disable,
arch/arm/mach-omap2/omap_hwmod_common_data.h +0 -4
index e0d65ad65614..69dddc53e1d8 100644
@@ -84,14 +84,10 @@ extern struct omap_hwmod_class mpu_hwmod_class;
 extern struct omap_hwmod_class iva_hwmod_class;
 extern struct omap_hwmod_class omap2_uart_class;
 extern struct omap_hwmod_class omap2_dss_hwmod_class;
-extern struct omap_hwmod_class omap2_dispc_hwmod_class;
 extern struct omap_hwmod_class omap2_rfbi_hwmod_class;
 extern struct omap_hwmod_class omap2_venc_hwmod_class;
-extern struct omap_hwmod_class_sysconfig omap2_hdq1w_sysc;
 extern struct omap_hwmod_class omap2_hdq1w_class;
 
-extern struct omap_hwmod_class omap2xxx_timer_hwmod_class;
-extern struct omap_hwmod_class omap2xxx_wd_timer_hwmod_class;
 extern struct omap_hwmod_class omap2xxx_gpio_hwmod_class;
 extern struct omap_hwmod_class omap2xxx_mailbox_hwmod_class;
 extern struct omap_hwmod_class omap2xxx_mcspi_class;
arch/arm/mach-omap2/pm.c +1 -1
index 53a132f11961..700869c9eae1 100644
@@ -134,7 +134,7 @@ int __maybe_unused omap_pm_nop_init(void)
 
 int (*omap_pm_soc_init)(void);
 
-int __init omap2_common_pm_late_init(void)
+static int __init omap2_common_pm_late_init(void)
 {
 	int error;
 
arch/arm/mach-omap2/powerdomain.c +4 -4
index 0155a1e57a87..fd974514a7b2 100644
@@ -37,8 +37,8 @@
 
 #define PWRDM_TRACE_STATES_FLAG	(1<<31)
 
-void pwrdms_save_context(void);
-void pwrdms_restore_context(void);
+static void pwrdms_save_context(void);
+static void pwrdms_restore_context(void);
 
 enum {
 	PWRDM_STATE_NOW = 0,
@@ -1174,12 +1174,12 @@ static int pwrdm_restore_context(struct powerdomain *pwrdm, void *unused)
 	return 0;
 }
 
-void pwrdms_save_context(void)
+static void pwrdms_save_context(void)
 {
 	pwrdm_for_each(pwrdm_save_context, NULL);
 }
 
-void pwrdms_restore_context(void)
+static void pwrdms_restore_context(void)
 {
 	pwrdm_for_each(pwrdm_restore_context, NULL);
 }
arch/arm/mach-omap2/powerdomain.h +0 -3
index 4c5284d0fd62..fbc89999460b 100644
@@ -269,7 +269,4 @@ extern struct powerdomain gfx_omap2_pwrdm;
 extern void pwrdm_lock(struct powerdomain *pwrdm);
 extern void pwrdm_unlock(struct powerdomain *pwrdm);
 
-extern void pwrdms_save_context(void);
-extern void pwrdms_restore_context(void);
-
 #endif
arch/arm/mach-omap2/prcm-common.h +0 -1
index 48e804c93caf..5e3544a63526 100644
@@ -550,7 +550,6 @@ struct omap_prcm_init_data {
 	struct device_node *np;
 };
 
-extern void omap_prcm_irq_cleanup(void);
 extern int omap_prcm_register_chain_handler(
 	struct omap_prcm_irq_setup *irq_setup);
 extern int omap_prcm_event_to_irq(const char *event);
arch/arm/mach-omap2/prm.h +0 -1
index bad15ba5256c..fc45a7ed09bb 100644
@@ -16,7 +16,6 @@
 extern struct omap_domain_base prm_base;
 extern u16 prm_features;
 int omap_prcm_init(void);
-int omap2_prm_base_init(void);
 int omap2_prcm_base_init(void);
 # endif
 
arch/arm/mach-omap2/prm3xxx.c +3 -2
index 63e73e9b82bc..1b5d08f594aa 100644
@@ -32,6 +32,7 @@ static void omap3xxx_prm_read_pending_irqs(unsigned long *events);
 static void omap3xxx_prm_ocp_barrier(void);
 static void omap3xxx_prm_save_and_clear_irqen(u32 *saved_mask);
 static void omap3xxx_prm_restore_irqen(u32 *saved_mask);
+static void omap3xxx_prm_iva_idle(void);
 
 static const struct omap_prcm_irq omap3_prcm_irqs[] = {
 	OMAP_PRCM_IRQ("wkup",	0,	0),
@@ -268,7 +269,7 @@ static int omap3xxx_prm_clear_mod_irqs(s16 module, u8 regs, u32 wkst_mask)
  * Toggles the reset signal to modem IP block. Required to allow
  * OMAP3430 without stacked modem to idle properly.
  */
-void __init omap3_prm_reset_modem(void)
+static void __init omap3_prm_reset_modem(void)
 {
 	omap2_prm_write_mod_reg(
 		OMAP3430_RM_RSTCTRL_CORE_MODEM_SW_RSTPWRON_MASK |
@@ -469,7 +470,7 @@ static u32 omap3xxx_prm_read_reset_sources(void)
  * function forces the IVA2 into idle state so it can go
  * into retention/off and thus allow full-chip retention/off.
  */
-void omap3xxx_prm_iva_idle(void)
+static void omap3xxx_prm_iva_idle(void)
 {
 	/* ensure IVA2 clock is disabled */
 	omap2_cm_write_mod_reg(0, OMAP3430_IVA2_MOD, CM_FCLKEN);
arch/arm/mach-omap2/prm3xxx.h +0 -2
index ed7c389aa5a7..ab899e461c62 100644
@@ -138,8 +138,6 @@ extern void omap3_prm_vcvp_write(u32 val, u8 offset);
 extern u32 omap3_prm_vcvp_rmw(u32 mask, u32 bits, u8 offset);
 
 int __init omap3xxx_prm_init(const struct omap_prcm_init_data *data);
-void omap3xxx_prm_iva_idle(void);
-void omap3_prm_reset_modem(void);
 int omap3xxx_prm_clear_global_cold_reset(void);
 void omap3_prm_save_scratchpad_contents(u32 *ptr);
 void omap3_prm_init_pm(bool has_uart4, bool has_iva);
arch/arm/mach-omap2/prm_common.c +2 -2
index 9a27f566612f..fd896f2295a1 100644
@@ -187,7 +187,7 @@ int omap_prcm_event_to_irq(const char *name)
  *
  * No return value.
  */
-void omap_prcm_irq_cleanup(void)
+static void omap_prcm_irq_cleanup(void)
 {
 	unsigned int irq;
 	int i;
@@ -689,7 +689,7 @@ static const struct of_device_id omap_prcm_dt_match_table[] __initconst = {
  * on the DT data. Returns 0 in success, negative error value
  * otherwise.
  */
-int __init omap2_prm_base_init(void)
+static int __init omap2_prm_base_init(void)
 {
 	struct device_node *np;
 	const struct of_device_id *match;
arch/arm/mach-omap2/sdrc.c +1 -1
index 9900fc777f39..b1bf9e24d442 100644
@@ -45,7 +45,7 @@ static struct omap2_sms_regs sms_context;
  *
  * Save SMS registers that need to be restored after off mode.
  */
-void omap2_sms_save_context(void)
+static void omap2_sms_save_context(void)
 {
 	sms_context.sms_sysconfig = sms_read_reg(SMS_SYSCONFIG);
 }
arch/arm/mach-omap2/sdrc.h +0 -1
index 07ff33b006a7..45b35422b587 100644
@@ -80,7 +80,6 @@ static inline void __init omap2_sdrc_init(struct omap_sdrc_params *sdrc_cs0,
 					  struct omap_sdrc_params *sdrc_cs1) {};
 #endif
 
-void omap2_sms_save_context(void);
 void omap2_sms_restore_context(void);
 
 struct memory_timings {
arch/arm/mach-omap2/usb-tusb6010.c +2 -4
index a0c4c42e56b9..18fa52f828dc 100644
@@ -97,7 +97,7 @@ static int tusb_set_sync_mode(unsigned sysclk_ps)
 }
 
 /* tusb driver calls this when it changes the chip's clocking */
-int tusb6010_platform_retime(unsigned is_refclk)
+static int tusb6010_platform_retime(unsigned is_refclk)
 {
 	static const char	error[] =
 		KERN_ERR "tusb6010 %s retime error %d\n";
@@ -121,7 +121,6 @@ int tusb6010_platform_retime(unsigned is_refclk)
 done:
 	return status;
 }
-EXPORT_SYMBOL_GPL(tusb6010_platform_retime);
 
 static struct resource tusb_resources[] = {
 	/* Order is significant!  The start/end fields
@@ -154,8 +153,7 @@ static struct platform_device tusb_device = {
 
 
 /* this may be called only from board-*.c setup code */
-int __init
-tusb6010_setup_interface(struct musb_hdrc_platform_data *data,
+int __init tusb6010_setup_interface(struct musb_hdrc_platform_data *data,
 		unsigned ps_refclk, unsigned waitpin,
 		unsigned async, unsigned sync,
 		unsigned irq, unsigned dmachan)
arch/arm/mach-omap2/voltage.c +1 -1
index 0a0c771dbb0a..49e8bc69abdd 100644
@@ -67,7 +67,7 @@ unsigned long voltdm_get_voltage(struct voltagedomain *voltdm)
  * This API should be called by the kernel to do the voltage scaling
  * for a particular voltage domain during DVFS.
  */
-int voltdm_scale(struct voltagedomain *voltdm,
+static int voltdm_scale(struct voltagedomain *voltdm,
 		 unsigned long target_volt)
 {
 	int ret, i;
arch/arm/mach-omap2/voltage.h +0 -1
index 5beb91ce3b38..e610f63a020d 100644
@@ -163,7 +163,6 @@ extern void omap54xx_voltagedomains_init(void);
 
 struct voltagedomain *voltdm_lookup(const char *name);
 void voltdm_init(struct voltagedomain **voltdm_list);
-int voltdm_scale(struct voltagedomain *voltdm, unsigned long target_volt);
 void voltdm_reset(struct voltagedomain *voltdm);
 unsigned long voltdm_get_voltage(struct voltagedomain *voltdm);
 #endif
include/linux/platform_data/voltage-omap.h +0 -1
index 43e8da9fb447..6d74e507dbd2 100644
@@ -29,7 +29,6 @@ struct omap_volt_data {
 struct voltagedomain;
 
 struct voltagedomain *voltdm_lookup(const char *name);
-int voltdm_scale(struct voltagedomain *voltdm, unsigned long target_volt);
 unsigned long voltdm_get_voltage(struct voltagedomain *voltdm);
 struct omap_volt_data *omap_voltage_get_voltdata(struct voltagedomain *voltdm,
 		unsigned long volt);
include/linux/usb/musb.h +0 -2
index fc6c77918481..e4a3ad3c800f 100644
@@ -143,8 +143,6 @@ extern int __init tusb6010_setup_interface(
 		unsigned async_cs, unsigned sync_cs,
 		unsigned irq, unsigned dmachan);
 
-extern int tusb6010_platform_retime(unsigned is_refclk);
-
 #endif	/* OMAP2 */
 
 #endif /* __LINUX_USB_MUSB_H */
Signature · 7 lines
2.29.2


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
maintainer Acked-by on the v1 series
#11 lore raw
In reply to Arnd Bergmann

Hi,

Quoted 9 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

While going through the removal of board files on some other platforms, I noticed a bit of outdated code on omap2+ that was left behind after the platform became DT only.

I can put this into the same cleanup tree as the omap1 patches, or you can merge these into your omap2 tree if there are likely conflicts with other patches.

Nice, looks good to me. A lot off stuff has moved to drivers over the years.

As long as you have some immutable branch I can base patches on as needed please just go head and apply them to your branch:

#12 lore raw
Quoted 11 lines · Tony Lindgren
Quoted 9 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

While going through the removal of board files on some other platforms, I noticed a bit of outdated code on omap2+ that was left behind after the platform became DT only.

I can put this into the same cleanup tree as the omap1 patches, or you can merge these into your omap2 tree if there are likely conflicts with other patches.

Quoted 7 lines

Nice, looks good to me. A lot off stuff has moved to drivers over the years.

As long as you have some immutable branch I can base patches on as needed please just go head and apply them to your branch:

I had this on top of the board removal series, which got delayed past 6.2 but is ready now. I've just pushed this out to

git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc.git omap/omap2-cleanup

and will merge this for 6.3 soon if you don't have any final concerns.

Arnd