[PATCH] x86: add reboot=acpi quirk for OLPC XO-1.5

From: Daniel Drake
Date: Fri Feb 11 2011 - 16:46:36 EST


The OLPC XO-1.5 needs the reboot=acpi flag to reboot correctly.
Add a quirk so that this becomes the default.

Signed-off-by: Daniel Drake <dsd@xxxxxxxxxx>
---
arch/x86/kernel/reboot.c | 22 ++++++++++++++++++++++
1 files changed, 22 insertions(+), 0 deletions(-)

diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c
index fc7aae1..110e334 100644
--- a/arch/x86/kernel/reboot.c
+++ b/arch/x86/kernel/reboot.c
@@ -135,6 +135,19 @@ static int __init set_bios_reboot(const struct dmi_system_id *d)
return 0;
}

+/*
+ * Some machines require the "reboot=a" commandline option,
+ * this quirk makes that automatic.
+ */
+static int __init set_acpi_reboot(const struct dmi_system_id *d)
+{
+ if (reboot_type != BOOT_ACPI) {
+ reboot_type = BOOT_ACPI;
+ printk(KERN_INFO "%s series board detected. Selecting ACPI-method for reboots.\n", d->ident);
+ }
+ return 0;
+}
+
static struct dmi_system_id __initdata reboot_dmi_table[] = {
{ /* Handle problems with rebooting on Dell E520's */
.callback = set_bios_reboot,
@@ -285,6 +298,15 @@ static struct dmi_system_id __initdata reboot_dmi_table[] = {
DMI_MATCH(DMI_BOARD_NAME, "P4S800"),
},
},
+ { /* OLPC XO-1.5 does not implement KBD reboot */
+ .callback = set_acpi_reboot,
+ .ident = "OLPC XO-1.5",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "OLPC"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "XO"),
+ DMI_MATCH(DMI_PRODUCT_VERSION, "1.5"),
+ },
+ },
{ }
};

--
1.7.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/