1 #include <linux/module.h>
3 #include <linux/delay.h>
4 #include <linux/platform.h>
9 void (*pm_power_off)(void);
10 EXPORT_SYMBOL(pm_power_off);
12 void machine_shutdown(void)
19 void machine_emergency_restart(void)
22 * Visual Workstations restart after this
23 * register is poked on the PIIX4
25 outb(PIIX4_RESET_VAL, PIIX4_RESET_PORT);
28 void machine_restart(char * __unused)
31 machine_emergency_restart();
34 void machine_power_off(void)
36 unsigned short pm_status;
37 extern unsigned int pci_bus0;
39 while ((pm_status = inw(PMSTS_PORT)) & 0x100)
40 outw(pm_status, PMSTS_PORT);
42 outw(PM_SUSPEND_ENABLE, PMCNTRL_PORT);
46 #define PCI_CONF1_ADDRESS(bus, devfn, reg) \
47 (0x80000000 | (bus << 16) | (devfn << 8) | (reg & ~3))
49 outl(PCI_CONF1_ADDRESS(pci_bus0, SPECIAL_DEV, SPECIAL_REG), 0xCF8);
50 outl(PIIX_SPECIAL_STOP, 0xCFC);
53 void machine_halt(void)