ARM: omap2: remove unused functions
authorArnd Bergmann <arnd@arndb.de>
Wed, 28 Sep 2022 13:24:31 +0000 (15:24 +0200)
committerArnd Bergmann <arnd@arndb.de>
Mon, 9 Jan 2023 16:00:54 +0000 (17:00 +0100)
These are a number of individual functions that were either never
used, or that had their last user removed in a prior cleanup.

Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
25 files changed:
arch/arm/mach-omap2/clockdomain.c
arch/arm/mach-omap2/clockdomain.h
arch/arm/mach-omap2/common.h
arch/arm/mach-omap2/control.c
arch/arm/mach-omap2/control.h
arch/arm/mach-omap2/io.c
arch/arm/mach-omap2/omap-secure.c
arch/arm/mach-omap2/omap-secure.h
arch/arm/mach-omap2/omap_device.c
arch/arm/mach-omap2/omap_device.h
arch/arm/mach-omap2/omap_hwmod.c
arch/arm/mach-omap2/omap_hwmod.h
arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c
arch/arm/mach-omap2/omap_hwmod_common_data.h
arch/arm/mach-omap2/pm.c
arch/arm/mach-omap2/pm.h
arch/arm/mach-omap2/powerdomain.c
arch/arm/mach-omap2/powerdomain.h
arch/arm/mach-omap2/prcm_mpu44xx.c
arch/arm/mach-omap2/prcm_mpu_44xx_54xx.h
arch/arm/mach-omap2/prm.h
arch/arm/mach-omap2/prm_common.c
arch/arm/mach-omap2/sdrc.c
arch/arm/mach-omap2/sdrc.h
arch/arm/mach-omap2/vc.c

index 1feb0098705e5ccc8fc37a60a8c0defca02a0ca5..f4e488e72515ea50a400a3dca666aed9ff2ec6a2 100644 (file)
@@ -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) */
 
 /**
index 68550b23c938d6a5598f5a72bd4ffffa8fc832ff..a6bce3795a32f9d2b2b961ca5df687d28aa20c76 100644 (file)
@@ -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);
index fc041d18809b6a38cd1033467460283e401bc266..415ca353a3455ba7e726cc0e6cbf638fe07419e9 100644 (file)
@@ -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);
index c514a96022699536f9c4e68d929167a706bd0cf0..79860b23030de3dea5fa5e2627b7f10ca3945fa5 100644 (file)
@@ -226,68 +226,7 @@ void omap3_ctrl_write_boot_mode(u8 bootmode)
 
 #endif
 
-/**
- * omap_ctrl_write_dsp_boot_addr - set boot address for a remote processor
- * @bootaddr: physical address of the boot loader
- *
- * Set boot address for the boot loader of a supported processor
- * when a power ON sequence occurs.
- */
-void omap_ctrl_write_dsp_boot_addr(u32 bootaddr)
-{
-       u32 offset = cpu_is_omap243x() ? OMAP243X_CONTROL_IVA2_BOOTADDR :
-                    cpu_is_omap34xx() ? OMAP343X_CONTROL_IVA2_BOOTADDR :
-                    cpu_is_omap44xx() ? OMAP4_CTRL_MODULE_CORE_DSP_BOOTADDR :
-                    soc_is_omap54xx() ? OMAP4_CTRL_MODULE_CORE_DSP_BOOTADDR :
-                    0;
-
-       if (!offset) {
-               pr_err("%s: unsupported omap type\n", __func__);
-               return;
-       }
-
-       omap_ctrl_writel(bootaddr, offset);
-}
-
-/**
- * omap_ctrl_write_dsp_boot_mode - set boot mode for a remote processor
- * @bootmode: 8-bit value to pass to some boot code
- *
- * Sets boot mode for the boot loader of a supported processor
- * when a power ON sequence occurs.
- */
-void omap_ctrl_write_dsp_boot_mode(u8 bootmode)
-{
-       u32 offset = cpu_is_omap243x() ? OMAP243X_CONTROL_IVA2_BOOTMOD :
-                    cpu_is_omap34xx() ? OMAP343X_CONTROL_IVA2_BOOTMOD :
-                    0;
-
-       if (!offset) {
-               pr_err("%s: unsupported omap type\n", __func__);
-               return;
-       }
-
-       omap_ctrl_writel(bootmode, offset);
-}
-
 #if defined(CONFIG_ARCH_OMAP3) && defined(CONFIG_PM)
-/*
- * Clears the scratchpad contents in case of cold boot-
- * called during bootup
- */
-void omap3_clear_scratchpad_contents(void)
-{
-       u32 max_offset = OMAP343X_SCRATCHPAD_ROM_OFFSET;
-       void __iomem *v_addr;
-       u32 offset = 0;
-
-       v_addr = OMAP2_L4_IO_ADDRESS(OMAP343X_SCRATCHPAD_ROM);
-       if (omap3xxx_prm_clear_global_cold_reset()) {
-               for ( ; offset <= max_offset; offset += 0x4)
-                       writel_relaxed(0x0, (v_addr + offset));
-       }
-}
-
 /* Populate the scratchpad structure with restore structure */
 void omap3_save_scratchpad_contents(void)
 {
@@ -846,15 +785,3 @@ of_node_put:
        return ret;
 
 }
-
-/**
- * omap3_control_legacy_iomap_init - legacy iomap init for clock providers
- *
- * Legacy iomap init for clock provider. Needed only by legacy boot mode,
- * where the base addresses are not parsed from DT, but still required
- * by the clock driver to be setup properly.
- */
-void __init omap3_control_legacy_iomap_init(void)
-{
-       omap2_clk_legacy_provider_init(TI_CLKM_SCRM, omap2_ctrl_base);
-}
index c4ca30ba1790653d0b0e3e078c1662d5dad4850d..7e7440533bf90c19e80b3ba6cb1297abe48f5d07 100644 (file)
@@ -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
index 375fea35b981a1b1b4e91202e8c39aaed000c087..e45a3ce97085a06ff41132f063bf32dd02d27844 100644 (file)
@@ -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();
index fb9c114b9dd7e0498eff79538d779c9f3dc006f0..41aec5c93a707d4807fc81489cf60ddad564585c 100644 (file)
@@ -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)
 {
index 9e67d4efdd0c676afbbd26e94de2414d73b09bb0..2ce26a86b7bd12a747238459fb16c63d9828aec3 100644 (file)
@@ -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);
index 8b3701901991ef16ee4a3ebffdb9d3c72e8d8d33..0594aaaa1a985aba110841db4d4dce698007e103 100644 (file)
@@ -285,34 +285,6 @@ static int _omap_device_idle_hwmods(struct omap_device *od)
 
 /* Public functions for use by core code */
 
-/**
- * omap_device_get_context_loss_count - get lost context count
- * @pdev: The platform device to update.
- *
- * Using the primary hwmod, query the context loss count for this
- * device.
- *
- * Callers should consider context for this device lost any time this
- * function returns a value different than the value the caller got
- * the last time it called this function.
- *
- * If any hwmods exist for the omap_device associated with @pdev,
- * return the context loss counter for that hwmod, otherwise return
- * zero.
- */
-int omap_device_get_context_loss_count(struct platform_device *pdev)
-{
-       struct omap_device *od;
-       u32 ret = 0;
-
-       od = to_omap_device(pdev);
-
-       if (od->hwmods_cnt)
-               ret = omap_hwmod_get_context_loss_count(od->hwmods[0]);
-
-       return ret;
-}
-
 /**
  * omap_device_alloc - allocate an omap_device
  * @pdev: platform_device that will be included in this omap_device
@@ -592,38 +564,6 @@ int omap_device_deassert_hardreset(struct platform_device *pdev,
        return ret;
 }
 
-/**
- * omap_device_get_by_hwmod_name() - convert a hwmod name to
- * device pointer.
- * @oh_name: name of the hwmod device
- *
- * Returns back a struct device * pointer associated with a hwmod
- * device represented by a hwmod_name
- */
-struct device *omap_device_get_by_hwmod_name(const char *oh_name)
-{
-       struct omap_hwmod *oh;
-
-       if (!oh_name) {
-               WARN(1, "%s: no hwmod name!\n", __func__);
-               return ERR_PTR(-EINVAL);
-       }
-
-       oh = omap_hwmod_lookup(oh_name);
-       if (!oh) {
-               WARN(1, "%s: no hwmod for %s\n", __func__,
-                       oh_name);
-               return ERR_PTR(-ENODEV);
-       }
-       if (!oh->od) {
-               WARN(1, "%s: no omap_device for %s\n", __func__,
-                       oh_name);
-               return ERR_PTR(-ENODEV);
-       }
-
-       return &oh->od->pdev->dev;
-}
-
 static struct notifier_block platform_nb = {
        .notifier_call = _omap_device_notifier_call,
 };
index d607532cf5e0bc539ef533a32d20d10c75a5dc0f..455f0a2b43eec5f80e69ebc4b5e6b12f3a8042fc 100644 (file)
@@ -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,
index 31d1a21f60416db586ad28dbd3d829cc1a0ce860..b03be626bc9952aa524f5a6e21ce1ee5292a5eed 100644 (file)
@@ -3763,55 +3763,6 @@ int omap_hwmod_shutdown(struct omap_hwmod *oh)
  * IP block data retrieval functions
  */
 
-/**
- * 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 *
@@ -3977,32 +3928,6 @@ ohsps_unlock:
        return ret;
 }
 
-/**
- * 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
  *
@@ -4054,18 +3979,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;
-}
index 1bb42f3d2e83c664990a95c22d049f5650f435fb..3fa6d217ab83f897bdd90e6649a41b7a20fb3f5a 100644 (file)
@@ -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
index 9156f2bfbc8d43002e44960340d2d5bdb94decfd..9ab1d57f8b7375b86681c7546e3724e8d01d8edb 100644 (file)
@@ -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",
index 0045e6680a636027c2b4a967081fb69305d6f4b5..c8eb1e6cc4a9f5d594991f38d2aa2e0b88f9cf60 100644 (file)
@@ -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;
index da829a90fe8c1abcaee4fe33e28e1c844d540291..53a132f11961c0e5753f6d5281773270837bdd19 100644 (file)
@@ -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)
index f523ca03161f723915b1db6a9c39017f6449738e..0c95774a4b8fbd853bc787de5a1616d34284d7d1 100644 (file)
@@ -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
index 2d747f6cffe8e987787e527150d95c2fad14814c..0155a1e57a871597c014e25aef7c9a6cd9d4cc12 100644 (file)
@@ -1148,82 +1148,6 @@ osps_out:
        return ret;
 }
 
-/**
- * pwrdm_get_context_loss_count - get powerdomain's context loss count
- * @pwrdm: struct powerdomain * to wait for
- *
- * Context loss count is the sum of powerdomain off-mode counter, the
- * logic off counter and the per-bank memory off counter.  Returns negative
- * (and WARNs) upon error, otherwise, returns the context loss count.
- */
-int pwrdm_get_context_loss_count(struct powerdomain *pwrdm)
-{
-       int i, count;
-
-       if (!pwrdm) {
-               WARN(1, "powerdomain: %s: pwrdm is null\n", __func__);
-               return -ENODEV;
-       }
-
-       count = pwrdm->state_counter[PWRDM_POWER_OFF];
-       count += pwrdm->ret_logic_off_counter;
-
-       for (i = 0; i < pwrdm->banks; i++)
-               count += pwrdm->ret_mem_off_counter[i];
-
-       /*
-        * Context loss count has to be a non-negative value. Clear the sign
-        * bit to get a value range from 0 to INT_MAX.
-        */
-       count &= INT_MAX;
-
-       pr_debug("powerdomain: %s: context loss count = %d\n",
-                pwrdm->name, count);
-
-       return count;
-}
-
-/**
- * pwrdm_can_ever_lose_context - can this powerdomain ever lose context?
- * @pwrdm: struct powerdomain *
- *
- * Given a struct powerdomain * @pwrdm, returns 1 if the powerdomain
- * can lose either memory or logic context or if @pwrdm is invalid, or
- * returns 0 otherwise.  This function is not concerned with how the
- * powerdomain registers are programmed (i.e., to go off or not); it's
- * concerned with whether it's ever possible for this powerdomain to
- * go off while some other part of the chip is active.  This function
- * assumes that every powerdomain can go to either ON or INACTIVE.
- */
-bool pwrdm_can_ever_lose_context(struct powerdomain *pwrdm)
-{
-       int i;
-
-       if (!pwrdm) {
-               pr_debug("powerdomain: %s: invalid powerdomain pointer\n",
-                        __func__);
-               return true;
-       }
-
-       if (pwrdm->pwrsts & PWRSTS_OFF)
-               return true;
-
-       if (pwrdm->pwrsts & PWRSTS_RET) {
-               if (pwrdm->pwrsts_logic_ret & PWRSTS_OFF)
-                       return true;
-
-               for (i = 0; i < pwrdm->banks; i++)
-                       if (pwrdm->pwrsts_mem_ret[i] & PWRSTS_OFF)
-                               return true;
-       }
-
-       for (i = 0; i < pwrdm->banks; i++)
-               if (pwrdm->pwrsts_mem_on[i] & PWRSTS_OFF)
-                       return true;
-
-       return false;
-}
-
 /**
  * pwrdm_save_context - save powerdomain registers
  *
@@ -1250,25 +1174,6 @@ static int pwrdm_restore_context(struct powerdomain *pwrdm, void *unused)
        return 0;
 }
 
-static int pwrdm_lost_power(struct powerdomain *pwrdm, void *unused)
-{
-       int state;
-
-       /*
-        * Power has been lost across all powerdomains, increment the
-        * counter.
-        */
-
-       state = pwrdm_read_pwrst(pwrdm);
-       if (state != PWRDM_POWER_OFF) {
-               pwrdm->state_counter[state]++;
-               pwrdm->state_counter[PWRDM_POWER_OFF]++;
-       }
-       pwrdm->state = state;
-
-       return 0;
-}
-
 void pwrdms_save_context(void)
 {
        pwrdm_for_each(pwrdm_save_context, NULL);
@@ -1278,8 +1183,3 @@ void pwrdms_restore_context(void)
 {
        pwrdm_for_each(pwrdm_restore_context, NULL);
 }
-
-void pwrdms_lost_power(void)
-{
-       pwrdm_for_each(pwrdm_lost_power, NULL);
-}
index 907cc659f47aa0bd57a4fd19e6a8c9e529bdc610..2eaabd94986f348520a84014e5102b4b2ec3c861 100644 (file)
@@ -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
index 5add541e3b414ed0fae850de70ee7397bffada2a..7236c50388a82a2d814bba6ae27902239e12792c 100644 (file)
@@ -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
index 7c6377566f331cda849dda23d0c52acfe874482d..0c519447e790a900382d309d995ac17186378d21 100644 (file)
@@ -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
 
index 08df78810a5e39e923a904ee70219c6a671e9ec6..bad15ba5256cace5a1b6f6125f5650583d1c4194 100644 (file)
@@ -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);
 
 /*
index fb2d48cfe756b0482eba30c79c4fbc1145d1b906..9a27f566612fe7f6310a48b968c1b7607c0443ab 100644 (file)
@@ -344,41 +344,6 @@ err:
        return -ENOMEM;
 }
 
-/**
- * omap2_set_globals_prm - set the PRM base address (for early use)
- * @prm: PRM base virtual address
- *
- * XXX Will be replaced when the PRM/CM drivers are completed.
- */
-void __init omap2_set_globals_prm(void __iomem *prm)
-{
-       prm_base.va = prm;
-}
-
-/**
- * prm_read_reset_sources - return the sources of the SoC's last reset
- *
- * Return a u32 bitmask representing the reset sources that caused the
- * SoC to reset.  The low-level per-SoC functions called by this
- * function remap the SoC-specific reset source bits into an
- * OMAP-common set of reset source bits, defined in
- * arch/arm/mach-omap2/prm.h.  Returns the standardized reset source
- * u32 bitmask from the hardware upon success, or returns (1 <<
- * OMAP_UNKNOWN_RST_SRC_ID_SHIFT) if no low-level read_reset_sources()
- * function was registered.
- */
-u32 prm_read_reset_sources(void)
-{
-       u32 ret = 1 << OMAP_UNKNOWN_RST_SRC_ID_SHIFT;
-
-       if (prm_ll_data->read_reset_sources)
-               ret = prm_ll_data->read_reset_sources();
-       else
-               WARN_ONCE(1, "prm: %s: no mapping function defined for reset sources\n", __func__);
-
-       return ret;
-}
-
 /**
  * prm_was_any_context_lost_old - was device context lost? (old API)
  * @part: PRM partition ID (e.g., OMAP4430_PRM_PARTITION)
@@ -488,22 +453,6 @@ int omap_prm_is_hardreset_asserted(u8 shift, u8 part, s16 prm_mod, u16 offset)
        return prm_ll_data->is_hardreset_asserted(shift, part, prm_mod, offset);
 }
 
-/**
- * omap_prm_reconfigure_io_chain - clear latches and reconfigure I/O chain
- *
- * Clear any previously-latched I/O wakeup events and ensure that the
- * I/O wakeup gates are aligned with the current mux settings.
- * Calls SoC specific I/O chain reconfigure function if available,
- * otherwise does nothing.
- */
-void omap_prm_reconfigure_io_chain(void)
-{
-       if (!prcm_irq_setup || !prcm_irq_setup->reconfigure_io_chain)
-               return;
-
-       prcm_irq_setup->reconfigure_io_chain();
-}
-
 /**
  * omap_prm_reset_system - trigger global SW reset
  *
index 2be4106d0dd6b95cbe8e61ff193ceb63dbbd2b3c..9900fc777f3960ed989de4200e162c353e1e3029 100644 (file)
@@ -60,55 +60,6 @@ void omap2_sms_restore_context(void)
        sms_write_reg(sms_context.sms_sysconfig, SMS_SYSCONFIG);
 }
 
-/**
- * omap2_sdrc_get_params - return SDRC register values for a given clock rate
- * @r: SDRC clock rate (in Hz)
- * @sdrc_cs0: chip select 0 ram timings **
- * @sdrc_cs1: chip select 1 ram timings **
- *
- * Return pre-calculated values for the SDRC_ACTIM_CTRLA,
- *  SDRC_ACTIM_CTRLB, SDRC_RFR_CTRL and SDRC_MR registers in sdrc_cs[01]
- *  structs,for a given SDRC clock rate 'r'.
- * These parameters control various timing delays in the SDRAM controller
- *  that are expressed in terms of the number of SDRC clock cycles to
- *  wait; hence the clock rate dependency.
- *
- * Supports 2 different timing parameters for both chip selects.
- *
- * Note 1: the sdrc_init_params_cs[01] must be sorted rate descending.
- * Note 2: If sdrc_init_params_cs_1 is not NULL it must be of same size
- *  as sdrc_init_params_cs_0.
- *
- * Fills in the struct omap_sdrc_params * for each chip select.
- * Returns 0 upon success or -1 upon failure.
- */
-int omap2_sdrc_get_params(unsigned long r,
-                         struct omap_sdrc_params **sdrc_cs0,
-                         struct omap_sdrc_params **sdrc_cs1)
-{
-       struct omap_sdrc_params *sp0, *sp1;
-
-       if (!sdrc_init_params_cs0)
-               return -1;
-
-       sp0 = sdrc_init_params_cs0;
-       sp1 = sdrc_init_params_cs1;
-
-       while (sp0->rate && sp0->rate != r) {
-               sp0++;
-               if (sdrc_init_params_cs1)
-                       sp1++;
-       }
-
-       if (!sp0->rate)
-               return -1;
-
-       *sdrc_cs0 = sp0;
-       *sdrc_cs1 = sp1;
-       return 0;
-}
-
-
 void __init omap2_set_globals_sdrc(void __iomem *sdrc, void __iomem *sms)
 {
        omap2_sdrc_base = sdrc;
index 5bdb832665c0cc21a356359fdc5115626045331b..5a44d64e3fbe8672ce5e262685a5e97a9d2c4c24 100644 (file)
@@ -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);
 
index ea02d40405c4a63a892dd3849d31742e08431522..fc26b96a20cca88dc9b8d3d45a8d8ef4ce22819f 100644 (file)
@@ -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;