diff options
author | Daniel Schaeffer <daniel@dschaeffer.localdomain> | 2008-02-01 12:27:23 -0500 |
---|---|---|
committer | Daniel Schaeffer <daniel@dschaeffer.localdomain> | 2008-02-01 12:27:23 -0500 |
commit | 50c8843a4a66f7b3005d1d1267413a88c63e2103 (patch) | |
tree | bdb9dce43fd926a451f3b890c002cc173f8caf22 /arch/x86/mach-visws/reboot.c | |
parent | 0f7efc5cb585cf74868de2232fc6c34b94c70d20 (diff) | |
parent | 49914084e797530d9baaf51df9eda77babc98fa8 (diff) |
Merge branch '2.6.24' into 2.6.24-imx27
Conflicts:
MAINTAINERS
Makefile
arch/arm/Kconfig
arch/arm/oprofile/Kconfig
drivers/Makefile
drivers/ata/Kconfig
drivers/ata/Makefile
drivers/char/watchdog/Kconfig
drivers/char/watchdog/Makefile
drivers/ide/Kconfig
drivers/input/touchscreen/Kconfig
drivers/input/touchscreen/Makefile
drivers/mmc/card/block.c
drivers/mmc/card/sdio_uart.c
drivers/mmc/core/Makefile
drivers/mmc/core/mmc_ops.c
drivers/mmc/core/sdio.c
drivers/mmc/core/sdio_bus.c
drivers/mmc/core/sdio_cis.c
drivers/mmc/core/sdio_io.c
drivers/mmc/core/sdio_irq.c
drivers/mmc/core/sdio_ops.c
drivers/mmc/host/Kconfig
drivers/mmc/host/Makefile
drivers/mmc/host/au1xmmc.c
drivers/mmc/host/tifm_sd.c
drivers/mtd/maps/Makefile
drivers/pcmcia/Kconfig
drivers/pcmcia/Makefile
fs/exec.c
include/linux/mmc/card.h
include/linux/mmc/host.h
include/linux/mmc/sdio_func.h
include/linux/mmc/sdio_ids.h
include/linux/mod_devicetable.h
mm/hugetlb.c
scripts/mod/file2alias.c
Diffstat (limited to 'arch/x86/mach-visws/reboot.c')
-rw-r--r-- | arch/x86/mach-visws/reboot.c | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/arch/x86/mach-visws/reboot.c b/arch/x86/mach-visws/reboot.c new file mode 100644 index 000000000000..99332abfad42 --- /dev/null +++ b/arch/x86/mach-visws/reboot.c @@ -0,0 +1,55 @@ +#include <linux/module.h> +#include <linux/smp.h> +#include <linux/delay.h> + +#include <asm/io.h> +#include "piix4.h" + +void (*pm_power_off)(void); +EXPORT_SYMBOL(pm_power_off); + +void machine_shutdown(void) +{ +#ifdef CONFIG_SMP + smp_send_stop(); +#endif +} + +void machine_emergency_restart(void) +{ + /* + * Visual Workstations restart after this + * register is poked on the PIIX4 + */ + outb(PIIX4_RESET_VAL, PIIX4_RESET_PORT); +} + +void machine_restart(char * __unused) +{ + machine_shutdown(); + machine_emergency_restart(); +} + +void machine_power_off(void) +{ + unsigned short pm_status; + extern unsigned int pci_bus0; + + while ((pm_status = inw(PMSTS_PORT)) & 0x100) + outw(pm_status, PMSTS_PORT); + + outw(PM_SUSPEND_ENABLE, PMCNTRL_PORT); + + mdelay(10); + +#define PCI_CONF1_ADDRESS(bus, devfn, reg) \ + (0x80000000 | (bus << 16) | (devfn << 8) | (reg & ~3)) + + outl(PCI_CONF1_ADDRESS(pci_bus0, SPECIAL_DEV, SPECIAL_REG), 0xCF8); + outl(PIIX_SPECIAL_STOP, 0xCFC); +} + +void machine_halt(void) +{ +} + |