Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 1944
b: refs/heads/master
c: 0086b5e
h: refs/heads/master
v: v3
  • Loading branch information
Benjamin Herrenschmidt authored and Linus Torvalds committed Jun 10, 2005
1 parent 7bff1e3 commit 04f477a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 243cd55e021baf28babdd88112ac03ae5cd4bb9c
refs/heads/master: 0086b5ec7834b78358dea3f713275a9ae2b229ec
7 changes: 5 additions & 2 deletions trunk/arch/ppc/platforms/pmac_cpufreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ static u32 frequency_gpio;
static u32 slew_done_gpio;
static int no_schedule;
static int has_cpu_l2lve;

static int is_pmu_based;

/* There are only two frequency states for each processor. Values
* are in kHz for the time being.
Expand Down Expand Up @@ -463,7 +463,7 @@ static int __pmac pmac_cpufreq_suspend(struct cpufreq_policy *policy, u32 state)
*/
no_schedule = 1;
sleep_freq = cur_freq;
if (cur_freq == low_freq)
if (cur_freq == low_freq && !is_pmu_based)
do_set_cpu_speed(CPUFREQ_HIGH, 0);
return 0;
}
Expand Down Expand Up @@ -588,6 +588,7 @@ static int __pmac pmac_cpufreq_init_MacRISC3(struct device_node *cpunode)
return 1;
hi_freq = (*value) / 1000;
set_speed_proc = pmu_set_cpu_speed;
is_pmu_based = 1;

return 0;
}
Expand Down Expand Up @@ -692,6 +693,7 @@ static int __init pmac_cpufreq_setup(void)
hi_freq = cur_freq;
low_freq = 400000;
set_speed_proc = pmu_set_cpu_speed;
is_pmu_based = 1;
}
/* Else check for TiPb 400 & 500 */
else if (machine_is_compatible("PowerBook3,2")) {
Expand All @@ -703,6 +705,7 @@ static int __init pmac_cpufreq_setup(void)
hi_freq = cur_freq;
low_freq = 300000;
set_speed_proc = pmu_set_cpu_speed;
is_pmu_based = 1;
}
/* Else check for 750FX */
else if (PVR_VER(mfspr(SPRN_PVR)) == 0x7000)
Expand Down
6 changes: 6 additions & 0 deletions trunk/drivers/macintosh/via-pmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -2593,6 +2593,9 @@ powerbook_sleep_Core99(void)
/* Restore VIA */
restore_via_state();

/* tweak LPJ before cpufreq is there */
loops_per_jiffy *= 2;

/* Restore video */
pmac_call_early_video_resume();

Expand All @@ -2613,6 +2616,9 @@ powerbook_sleep_Core99(void)
pmu_request(&req, NULL, 2, PMU_SET_INTR_MASK, pmu_intr_mask);
pmu_wait_complete(&req);

/* Restore LPJ, cpufreq will adjust the cpu frequency */
loops_per_jiffy /= 2;

pmac_wakeup_devices();

return 0;
Expand Down

0 comments on commit 04f477a

Please sign in to comment.