]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/x86/kernel/reboot.c
Rename SMSC phy functions to be more generic
[linux-2.6-omap-h63xx.git] / arch / x86 / kernel / reboot.c
index 5818dc28167d71bee82c305a85410192ef59e2b1..9692202d3bfb62125c42f0e437f4a618354a9223 100644 (file)
@@ -1,5 +1,4 @@
 #include <linux/module.h>
-#include <linux/init.h>
 #include <linux/reboot.h>
 #include <linux/init.h>
 #include <linux/pm.h>
@@ -152,6 +151,24 @@ static struct dmi_system_id __initdata reboot_dmi_table[] = {
                        DMI_MATCH(DMI_BOARD_NAME, "0WF810"),
                },
        },
+       {       /* Handle problems with rebooting on Dell Optiplex 745's DFF*/
+               .callback = set_bios_reboot,
+               .ident = "Dell OptiPlex 745",
+               .matches = {
+                       DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
+                       DMI_MATCH(DMI_PRODUCT_NAME, "OptiPlex 745"),
+                       DMI_MATCH(DMI_BOARD_NAME, "0MM599"),
+               },
+       },
+       {       /* Handle problems with rebooting on Dell Optiplex 745 with 0KW626 */
+               .callback = set_bios_reboot,
+               .ident = "Dell OptiPlex 745",
+               .matches = {
+                       DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
+                       DMI_MATCH(DMI_PRODUCT_NAME, "OptiPlex 745"),
+                       DMI_MATCH(DMI_BOARD_NAME, "0KW626"),
+               },
+       },
        {       /* Handle problems with rebooting on Dell 2400's */
                .callback = set_bios_reboot,
                .ident = "Dell PowerEdge 2400",
@@ -326,7 +343,11 @@ static inline void kb_wait(void)
        }
 }
 
-void machine_emergency_restart(void)
+void __attribute__((weak)) mach_reboot_fixups(void)
+{
+}
+
+static void native_machine_emergency_restart(void)
 {
        int i;
 
@@ -337,6 +358,8 @@ void machine_emergency_restart(void)
                /* Could also try the reset bit in the Hammer NB */
                switch (reboot_type) {
                case BOOT_KBD:
+                       mach_reboot_fixups(); /* for board specific fixups */
+
                        for (i = 0; i < 10; i++) {
                                kb_wait();
                                udelay(50);
@@ -376,7 +399,7 @@ void machine_emergency_restart(void)
        }
 }
 
-void machine_shutdown(void)
+static void native_machine_shutdown(void)
 {
        /* Stop the cpus and apics */
 #ifdef CONFIG_SMP
@@ -388,12 +411,12 @@ void machine_shutdown(void)
 #ifdef CONFIG_X86_32
        /* See if there has been given a command line override */
        if ((reboot_cpu != -1) && (reboot_cpu < NR_CPUS) &&
-               cpu_isset(reboot_cpu, cpu_online_map))
+               cpu_online(reboot_cpu))
                reboot_cpu_id = reboot_cpu;
 #endif
 
        /* Make certain the cpu I'm about to reboot on is online */
-       if (!cpu_isset(reboot_cpu_id, cpu_online_map))
+       if (!cpu_online(reboot_cpu_id))
                reboot_cpu_id = smp_processor_id();
 
        /* Make certain I only run on the appropriate processor */
@@ -420,7 +443,7 @@ void machine_shutdown(void)
 #endif
 }
 
-void machine_restart(char *__unused)
+static void native_machine_restart(char *__unused)
 {
        printk("machine restart\n");
 
@@ -429,11 +452,11 @@ void machine_restart(char *__unused)
        machine_emergency_restart();
 }
 
-void machine_halt(void)
+static void native_machine_halt(void)
 {
 }
 
-void machine_power_off(void)
+static void native_machine_power_off(void)
 {
        if (pm_power_off) {
                if (!reboot_force)
@@ -443,9 +466,35 @@ void machine_power_off(void)
 }
 
 struct machine_ops machine_ops = {
-       .power_off = machine_power_off,
-       .shutdown = machine_shutdown,
-       .emergency_restart = machine_emergency_restart,
-       .restart = machine_restart,
-       .halt = machine_halt
+       .power_off = native_machine_power_off,
+       .shutdown = native_machine_shutdown,
+       .emergency_restart = native_machine_emergency_restart,
+       .restart = native_machine_restart,
+       .halt = native_machine_halt
 };
+
+void machine_power_off(void)
+{
+       machine_ops.power_off();
+}
+
+void machine_shutdown(void)
+{
+       machine_ops.shutdown();
+}
+
+void machine_emergency_restart(void)
+{
+       machine_ops.emergency_restart();
+}
+
+void machine_restart(char *cmd)
+{
+       machine_ops.restart(cmd);
+}
+
+void machine_halt(void)
+{
+       machine_ops.halt();
+}
+