}
-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
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
*/
UN_OUT(UNI_N_CLOCK_CNTL, save_unin_clock_ctl);
udelay(100);
- /* Enable clock spreading */
- pmac_tweak_clock_spreading(macio, 1);
-
return 0;
}
* 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 */
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 */
/* 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();
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