Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 800
b: refs/heads/master
c: e521dca
h: refs/heads/master
v: v3
  • Loading branch information
Benjamin Herrenschmidt authored and Linus Torvalds committed May 2, 2005
1 parent f267d99 commit da75244
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 11 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: 6995f17a5ab3c3fd4df2e5b107d08cff1db3fa41
refs/heads/master: e521dca64e0f82d844928c5ee88d82fdced50cbe
12 changes: 4 additions & 8 deletions trunk/arch/ppc/platforms/pmac_feature.c
Original file line number Diff line number Diff line change
Expand Up @@ -1591,8 +1591,10 @@ intrepid_shutdown(struct macio_chip* macio, int sleep_mode)
}


static void __pmac pmac_tweak_clock_spreading(struct macio_chip* macio, int enable)
void __pmac pmac_tweak_clock_spreading(int enable)
{
struct macio_chip* macio = &macio_chips[0];

/* Hack for doing clock spreading on some machines PowerBooks and
* iBooks. This implements the "platform-do-clockspreading" OF
* property as decoded manually on various models. For safety, we also
Expand Down Expand Up @@ -1707,9 +1709,6 @@ core99_sleep(void)
macio->type != macio_intrepid)
return -ENODEV;

/* Disable clock spreading */
pmac_tweak_clock_spreading(macio, 0);

/* We power off the wireless slot in case it was not done
* by the driver. We don't power it on automatically however
*/
Expand Down Expand Up @@ -1852,9 +1851,6 @@ core99_wake_up(void)
UN_OUT(UNI_N_CLOCK_CNTL, save_unin_clock_ctl);
udelay(100);

/* Enable clock spreading */
pmac_tweak_clock_spreading(macio, 1);

return 0;
}

Expand Down Expand Up @@ -2822,7 +2818,7 @@ set_initial_features(void)
* clock spreading now. This should be a platform function but we
* don't do these at the moment
*/
pmac_tweak_clock_spreading(&macio_chips[0], 1);
pmac_tweak_clock_spreading(1);

#endif /* CONFIG_POWER4 */

Expand Down
9 changes: 7 additions & 2 deletions trunk/drivers/macintosh/via-pmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -2351,6 +2351,10 @@ pmac_suspend_devices(void)
return -EBUSY;
}

/* Disable clock spreading on some machines */
pmac_tweak_clock_spreading(0);

/* Stop preemption */
preempt_disable();

/* Make sure the decrementer won't interrupt us */
Expand Down Expand Up @@ -2417,11 +2421,12 @@ pmac_wakeup_devices(void)

/* Re-enable local CPU interrupts */
local_irq_enable();

mdelay(100);

preempt_enable();

/* Re-enable clock spreading on some machines */
pmac_tweak_clock_spreading(1);

/* Resume devices */
device_resume();

Expand Down
3 changes: 3 additions & 0 deletions trunk/include/asm-ppc/pmac_feature.h
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,9 @@ extern void pmac_register_agp_pm(struct pci_dev *bridge,
extern void pmac_suspend_agp_for_card(struct pci_dev *dev);
extern void pmac_resume_agp_for_card(struct pci_dev *dev);

/* Used by the via-pmu driver for suspend/resume
*/
extern void pmac_tweak_clock_spreading(int enable);

/*
* The part below is for use by macio_asic.c only, do not rely
Expand Down

0 comments on commit da75244

Please sign in to comment.