Loading arch/arm/mach-omap2/pm.c +10 −12 Original line number Original line Diff line number Diff line Loading @@ -136,8 +136,8 @@ int omap_set_pwrdm_state(struct powerdomain *pwrdm, u32 state) ret = pwrdm_set_next_pwrst(pwrdm, state); ret = pwrdm_set_next_pwrst(pwrdm, state); if (ret) { if (ret) { printk(KERN_ERR "Unable to set state of powerdomain: %s\n", pr_err("%s: unable to set state of powerdomain: %s\n", pwrdm->name); __func__, pwrdm->name); goto err; goto err; } } Loading @@ -161,11 +161,11 @@ int omap_set_pwrdm_state(struct powerdomain *pwrdm, u32 state) } } /* /* * This API is to be called during init to put the various voltage * This API is to be called during init to set the various voltage * domains to the voltage as per the opp table. Typically we boot up * domains to the voltage as per the opp table. Typically we boot up * at the nominal voltage. So this function finds out the rate of * at the nominal voltage. So this function finds out the rate of * the clock associated with the voltage domain, finds out the correct * the clock associated with the voltage domain, finds out the correct * opp entry and puts the voltage domain to the voltage specifies * opp entry and sets the voltage domain to the voltage specified * in the opp entry * in the opp entry */ */ static int __init omap2_set_init_voltage(char *vdd_name, char *clk_name, static int __init omap2_set_init_voltage(char *vdd_name, char *clk_name, Loading @@ -177,21 +177,20 @@ static int __init omap2_set_init_voltage(char *vdd_name, char *clk_name, unsigned long freq, bootup_volt; unsigned long freq, bootup_volt; if (!vdd_name || !clk_name || !dev) { if (!vdd_name || !clk_name || !dev) { printk(KERN_ERR "%s: Invalid parameters!\n", __func__); pr_err("%s: invalid parameters\n", __func__); goto exit; goto exit; } } voltdm = omap_voltage_domain_lookup(vdd_name); voltdm = omap_voltage_domain_lookup(vdd_name); if (IS_ERR(voltdm)) { if (IS_ERR(voltdm)) { printk(KERN_ERR "%s: Unable to get vdd pointer for vdd_%s\n", pr_err("%s: unable to get vdd pointer for vdd_%s\n", __func__, vdd_name); __func__, vdd_name); goto exit; goto exit; } } clk = clk_get(NULL, clk_name); clk = clk_get(NULL, clk_name); if (IS_ERR(clk)) { if (IS_ERR(clk)) { printk(KERN_ERR "%s: unable to get clk %s\n", pr_err("%s: unable to get clk %s\n", __func__, clk_name); __func__, clk_name); goto exit; goto exit; } } Loading @@ -200,14 +199,14 @@ static int __init omap2_set_init_voltage(char *vdd_name, char *clk_name, opp = opp_find_freq_ceil(dev, &freq); opp = opp_find_freq_ceil(dev, &freq); if (IS_ERR(opp)) { if (IS_ERR(opp)) { printk(KERN_ERR "%s: unable to find boot up OPP for vdd_%s\n", pr_err("%s: unable to find boot up OPP for vdd_%s\n", __func__, vdd_name); __func__, vdd_name); goto exit; goto exit; } } bootup_volt = opp_get_voltage(opp); bootup_volt = opp_get_voltage(opp); if (!bootup_volt) { if (!bootup_volt) { printk(KERN_ERR "%s: unable to find voltage corresponding" pr_err("%s: unable to find voltage corresponding " "to the bootup OPP for vdd_%s\n", __func__, vdd_name); "to the bootup OPP for vdd_%s\n", __func__, vdd_name); goto exit; goto exit; } } Loading @@ -216,8 +215,7 @@ static int __init omap2_set_init_voltage(char *vdd_name, char *clk_name, return 0; return 0; exit: exit: printk(KERN_ERR "%s: Unable to put vdd_%s to its init voltage\n\n", pr_err("%s: unable to set vdd_%s\n", __func__, vdd_name); __func__, vdd_name); return -EINVAL; return -EINVAL; } } Loading arch/arm/mach-omap2/pm24xx.c +0 −27 Original line number Original line Diff line number Diff line Loading @@ -53,8 +53,6 @@ #include "powerdomain.h" #include "powerdomain.h" #include "clockdomain.h" #include "clockdomain.h" static int omap2_pm_debug; #ifdef CONFIG_SUSPEND #ifdef CONFIG_SUSPEND static suspend_state_t suspend_state = PM_SUSPEND_ON; static suspend_state_t suspend_state = PM_SUSPEND_ON; static inline bool is_suspending(void) static inline bool is_suspending(void) Loading Loading @@ -96,7 +94,6 @@ static int omap2_fclks_active(void) static void omap2_enter_full_retention(void) static void omap2_enter_full_retention(void) { { u32 l; u32 l; struct timespec ts_preidle, ts_postidle, ts_idle; /* There is 1 reference hold for all children of the oscillator /* There is 1 reference hold for all children of the oscillator * clock, the following will remove it. If no one else uses the * clock, the following will remove it. If no one else uses the Loading Loading @@ -124,10 +121,6 @@ static void omap2_enter_full_retention(void) omap2_gpio_prepare_for_idle(0); omap2_gpio_prepare_for_idle(0); if (omap2_pm_debug) { getnstimeofday(&ts_preidle); } /* One last check for pending IRQs to avoid extra latency due /* One last check for pending IRQs to avoid extra latency due * to sleeping unnecessarily. */ * to sleeping unnecessarily. */ if (omap_irq_pending()) if (omap_irq_pending()) Loading Loading @@ -155,13 +148,6 @@ static void omap2_enter_full_retention(void) console_unlock(); console_unlock(); no_sleep: no_sleep: if (omap2_pm_debug) { unsigned long long tmp; getnstimeofday(&ts_postidle); ts_idle = timespec_sub(ts_postidle, ts_preidle); tmp = timespec_to_ns(&ts_idle) * NSEC_PER_USEC; } omap2_gpio_resume_after_idle(); omap2_gpio_resume_after_idle(); clk_enable(osc_ck); clk_enable(osc_ck); Loading Loading @@ -219,7 +205,6 @@ static int omap2_allow_mpu_retention(void) static void omap2_enter_mpu_retention(void) static void omap2_enter_mpu_retention(void) { { int only_idle = 0; int only_idle = 0; struct timespec ts_preidle, ts_postidle, ts_idle; /* Putting MPU into the WFI state while a transfer is active /* Putting MPU into the WFI state while a transfer is active * seems to cause the I2C block to timeout. Why? Good question. */ * seems to cause the I2C block to timeout. Why? Good question. */ Loading @@ -246,19 +231,7 @@ static void omap2_enter_mpu_retention(void) only_idle = 1; only_idle = 1; } } if (omap2_pm_debug) { getnstimeofday(&ts_preidle); } omap2_sram_idle(); omap2_sram_idle(); if (omap2_pm_debug) { unsigned long long tmp; getnstimeofday(&ts_postidle); ts_idle = timespec_sub(ts_postidle, ts_preidle); tmp = timespec_to_ns(&ts_idle) * NSEC_PER_USEC; } } } static int omap2_can_sleep(void) static int omap2_can_sleep(void) Loading arch/arm/mach-omap2/pm34xx.c +1 −1 Original line number Original line Diff line number Diff line Loading @@ -55,7 +55,7 @@ static suspend_state_t suspend_state = PM_SUSPEND_ON; static suspend_state_t suspend_state = PM_SUSPEND_ON; static inline bool is_suspending(void) static inline bool is_suspending(void) { { return (suspend_state != PM_SUSPEND_ON); return (suspend_state != PM_SUSPEND_ON) && console_suspend_enabled; } } #else #else static inline bool is_suspending(void) static inline bool is_suspending(void) Loading Loading
arch/arm/mach-omap2/pm.c +10 −12 Original line number Original line Diff line number Diff line Loading @@ -136,8 +136,8 @@ int omap_set_pwrdm_state(struct powerdomain *pwrdm, u32 state) ret = pwrdm_set_next_pwrst(pwrdm, state); ret = pwrdm_set_next_pwrst(pwrdm, state); if (ret) { if (ret) { printk(KERN_ERR "Unable to set state of powerdomain: %s\n", pr_err("%s: unable to set state of powerdomain: %s\n", pwrdm->name); __func__, pwrdm->name); goto err; goto err; } } Loading @@ -161,11 +161,11 @@ int omap_set_pwrdm_state(struct powerdomain *pwrdm, u32 state) } } /* /* * This API is to be called during init to put the various voltage * This API is to be called during init to set the various voltage * domains to the voltage as per the opp table. Typically we boot up * domains to the voltage as per the opp table. Typically we boot up * at the nominal voltage. So this function finds out the rate of * at the nominal voltage. So this function finds out the rate of * the clock associated with the voltage domain, finds out the correct * the clock associated with the voltage domain, finds out the correct * opp entry and puts the voltage domain to the voltage specifies * opp entry and sets the voltage domain to the voltage specified * in the opp entry * in the opp entry */ */ static int __init omap2_set_init_voltage(char *vdd_name, char *clk_name, static int __init omap2_set_init_voltage(char *vdd_name, char *clk_name, Loading @@ -177,21 +177,20 @@ static int __init omap2_set_init_voltage(char *vdd_name, char *clk_name, unsigned long freq, bootup_volt; unsigned long freq, bootup_volt; if (!vdd_name || !clk_name || !dev) { if (!vdd_name || !clk_name || !dev) { printk(KERN_ERR "%s: Invalid parameters!\n", __func__); pr_err("%s: invalid parameters\n", __func__); goto exit; goto exit; } } voltdm = omap_voltage_domain_lookup(vdd_name); voltdm = omap_voltage_domain_lookup(vdd_name); if (IS_ERR(voltdm)) { if (IS_ERR(voltdm)) { printk(KERN_ERR "%s: Unable to get vdd pointer for vdd_%s\n", pr_err("%s: unable to get vdd pointer for vdd_%s\n", __func__, vdd_name); __func__, vdd_name); goto exit; goto exit; } } clk = clk_get(NULL, clk_name); clk = clk_get(NULL, clk_name); if (IS_ERR(clk)) { if (IS_ERR(clk)) { printk(KERN_ERR "%s: unable to get clk %s\n", pr_err("%s: unable to get clk %s\n", __func__, clk_name); __func__, clk_name); goto exit; goto exit; } } Loading @@ -200,14 +199,14 @@ static int __init omap2_set_init_voltage(char *vdd_name, char *clk_name, opp = opp_find_freq_ceil(dev, &freq); opp = opp_find_freq_ceil(dev, &freq); if (IS_ERR(opp)) { if (IS_ERR(opp)) { printk(KERN_ERR "%s: unable to find boot up OPP for vdd_%s\n", pr_err("%s: unable to find boot up OPP for vdd_%s\n", __func__, vdd_name); __func__, vdd_name); goto exit; goto exit; } } bootup_volt = opp_get_voltage(opp); bootup_volt = opp_get_voltage(opp); if (!bootup_volt) { if (!bootup_volt) { printk(KERN_ERR "%s: unable to find voltage corresponding" pr_err("%s: unable to find voltage corresponding " "to the bootup OPP for vdd_%s\n", __func__, vdd_name); "to the bootup OPP for vdd_%s\n", __func__, vdd_name); goto exit; goto exit; } } Loading @@ -216,8 +215,7 @@ static int __init omap2_set_init_voltage(char *vdd_name, char *clk_name, return 0; return 0; exit: exit: printk(KERN_ERR "%s: Unable to put vdd_%s to its init voltage\n\n", pr_err("%s: unable to set vdd_%s\n", __func__, vdd_name); __func__, vdd_name); return -EINVAL; return -EINVAL; } } Loading
arch/arm/mach-omap2/pm24xx.c +0 −27 Original line number Original line Diff line number Diff line Loading @@ -53,8 +53,6 @@ #include "powerdomain.h" #include "powerdomain.h" #include "clockdomain.h" #include "clockdomain.h" static int omap2_pm_debug; #ifdef CONFIG_SUSPEND #ifdef CONFIG_SUSPEND static suspend_state_t suspend_state = PM_SUSPEND_ON; static suspend_state_t suspend_state = PM_SUSPEND_ON; static inline bool is_suspending(void) static inline bool is_suspending(void) Loading Loading @@ -96,7 +94,6 @@ static int omap2_fclks_active(void) static void omap2_enter_full_retention(void) static void omap2_enter_full_retention(void) { { u32 l; u32 l; struct timespec ts_preidle, ts_postidle, ts_idle; /* There is 1 reference hold for all children of the oscillator /* There is 1 reference hold for all children of the oscillator * clock, the following will remove it. If no one else uses the * clock, the following will remove it. If no one else uses the Loading Loading @@ -124,10 +121,6 @@ static void omap2_enter_full_retention(void) omap2_gpio_prepare_for_idle(0); omap2_gpio_prepare_for_idle(0); if (omap2_pm_debug) { getnstimeofday(&ts_preidle); } /* One last check for pending IRQs to avoid extra latency due /* One last check for pending IRQs to avoid extra latency due * to sleeping unnecessarily. */ * to sleeping unnecessarily. */ if (omap_irq_pending()) if (omap_irq_pending()) Loading Loading @@ -155,13 +148,6 @@ static void omap2_enter_full_retention(void) console_unlock(); console_unlock(); no_sleep: no_sleep: if (omap2_pm_debug) { unsigned long long tmp; getnstimeofday(&ts_postidle); ts_idle = timespec_sub(ts_postidle, ts_preidle); tmp = timespec_to_ns(&ts_idle) * NSEC_PER_USEC; } omap2_gpio_resume_after_idle(); omap2_gpio_resume_after_idle(); clk_enable(osc_ck); clk_enable(osc_ck); Loading Loading @@ -219,7 +205,6 @@ static int omap2_allow_mpu_retention(void) static void omap2_enter_mpu_retention(void) static void omap2_enter_mpu_retention(void) { { int only_idle = 0; int only_idle = 0; struct timespec ts_preidle, ts_postidle, ts_idle; /* Putting MPU into the WFI state while a transfer is active /* Putting MPU into the WFI state while a transfer is active * seems to cause the I2C block to timeout. Why? Good question. */ * seems to cause the I2C block to timeout. Why? Good question. */ Loading @@ -246,19 +231,7 @@ static void omap2_enter_mpu_retention(void) only_idle = 1; only_idle = 1; } } if (omap2_pm_debug) { getnstimeofday(&ts_preidle); } omap2_sram_idle(); omap2_sram_idle(); if (omap2_pm_debug) { unsigned long long tmp; getnstimeofday(&ts_postidle); ts_idle = timespec_sub(ts_postidle, ts_preidle); tmp = timespec_to_ns(&ts_idle) * NSEC_PER_USEC; } } } static int omap2_can_sleep(void) static int omap2_can_sleep(void) Loading
arch/arm/mach-omap2/pm34xx.c +1 −1 Original line number Original line Diff line number Diff line Loading @@ -55,7 +55,7 @@ static suspend_state_t suspend_state = PM_SUSPEND_ON; static suspend_state_t suspend_state = PM_SUSPEND_ON; static inline bool is_suspending(void) static inline bool is_suspending(void) { { return (suspend_state != PM_SUSPEND_ON); return (suspend_state != PM_SUSPEND_ON) && console_suspend_enabled; } } #else #else static inline bool is_suspending(void) static inline bool is_suspending(void) Loading