示例#1
0
文件: power.c 项目: 274914765/C
void machine_power_off(void)
{
    sstate_poweroff();
    if (strcmp(of_console_device->type, "serial") || scons_pwroff) {
        if (power_reg) {
            /* Both register bits seem to have the
             * same effect, so until I figure out
             * what the difference is...
             */
            writel(AUXIO_PCIO_CPWR_OFF | AUXIO_PCIO_SPWR_OFF, power_reg);
        } else {
            if (poweroff_method != NULL) {
                poweroff_method();
                /* not reached */
            }
        }
    }
    machine_halt();
}
示例#2
0
文件: power.c 项目: maliyu/SOM2416
void machine_power_off(void)
{
	if (!serial_console || scons_pwroff) {
#ifdef CONFIG_PCI
		if (power_reg) {
			/* Both register bits seem to have the
			 * same effect, so until I figure out
			 * what the difference is...
			 */
			writel(AUXIO_PCIO_CPWR_OFF | AUXIO_PCIO_SPWR_OFF, power_reg);
		} else
#endif /* CONFIG_PCI */
			if (poweroff_method != NULL) {
				poweroff_method();
				/* not reached */
			}
	}
	machine_halt();
}