diff options
author | Len Brown <len.brown@intel.com> | 2010-06-01 22:53:36 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2010-06-01 22:53:36 -0400 |
commit | b42f5b0f0fd8c1c442c1b29a3fbcb338e8bd7732 (patch) | |
tree | 194e13dfa85d2d2af8bd125acd80a445ee0def62 /drivers/acpi/sleep.c | |
parent | fe955682d2153b35dffcf1673dff0491096a3f0a (diff) | |
parent | 0a76a34ff0804f1f413807b2e2d12117c2b602ca (diff) |
Merge branches 'bugzilla-14668' and 'misc-2.6.35' into release
Diffstat (limited to 'drivers/acpi/sleep.c')
-rw-r--r-- | drivers/acpi/sleep.c | 157 |
1 files changed, 2 insertions, 155 deletions
diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c index 504a55edac49..3fb4bdea7e06 100644 --- a/drivers/acpi/sleep.c +++ b/drivers/acpi/sleep.c | |||
@@ -80,22 +80,6 @@ static int acpi_sleep_prepare(u32 acpi_state) | |||
80 | 80 | ||
81 | #ifdef CONFIG_ACPI_SLEEP | 81 | #ifdef CONFIG_ACPI_SLEEP |
82 | static u32 acpi_target_sleep_state = ACPI_STATE_S0; | 82 | static u32 acpi_target_sleep_state = ACPI_STATE_S0; |
83 | /* | ||
84 | * According to the ACPI specification the BIOS should make sure that ACPI is | ||
85 | * enabled and SCI_EN bit is set on wake-up from S1 - S3 sleep states. Still, | ||
86 | * some BIOSes don't do that and therefore we use acpi_enable() to enable ACPI | ||
87 | * on such systems during resume. Unfortunately that doesn't help in | ||
88 | * particularly pathological cases in which SCI_EN has to be set directly on | ||
89 | * resume, although the specification states very clearly that this flag is | ||
90 | * owned by the hardware. The set_sci_en_on_resume variable will be set in such | ||
91 | * cases. | ||
92 | */ | ||
93 | static bool set_sci_en_on_resume; | ||
94 | |||
95 | void __init acpi_set_sci_en_on_resume(void) | ||
96 | { | ||
97 | set_sci_en_on_resume = true; | ||
98 | } | ||
99 | 83 | ||
100 | /* | 84 | /* |
101 | * ACPI 1.0 wants us to execute _PTS before suspending devices, so we allow the | 85 | * ACPI 1.0 wants us to execute _PTS before suspending devices, so we allow the |
@@ -256,11 +240,8 @@ static int acpi_suspend_enter(suspend_state_t pm_state) | |||
256 | break; | 240 | break; |
257 | } | 241 | } |
258 | 242 | ||
259 | /* If ACPI is not enabled by the BIOS, we need to enable it here. */ | 243 | /* This violates the spec but is required for bug compatibility. */ |
260 | if (set_sci_en_on_resume) | 244 | acpi_write_bit_register(ACPI_BITREG_SCI_ENABLE, 1); |
261 | acpi_write_bit_register(ACPI_BITREG_SCI_ENABLE, 1); | ||
262 | else | ||
263 | acpi_enable(); | ||
264 | 245 | ||
265 | /* Reprogram control registers and execute _BFS */ | 246 | /* Reprogram control registers and execute _BFS */ |
266 | acpi_leave_sleep_state_prep(acpi_state); | 247 | acpi_leave_sleep_state_prep(acpi_state); |
@@ -357,12 +338,6 @@ static int __init init_old_suspend_ordering(const struct dmi_system_id *d) | |||
357 | return 0; | 338 | return 0; |
358 | } | 339 | } |
359 | 340 | ||
360 | static int __init init_set_sci_en_on_resume(const struct dmi_system_id *d) | ||
361 | { | ||
362 | set_sci_en_on_resume = true; | ||
363 | return 0; | ||
364 | } | ||
365 | |||
366 | static struct dmi_system_id __initdata acpisleep_dmi_table[] = { | 341 | static struct dmi_system_id __initdata acpisleep_dmi_table[] = { |
367 | { | 342 | { |
368 | .callback = init_old_suspend_ordering, | 343 | .callback = init_old_suspend_ordering, |
@@ -381,22 +356,6 @@ static struct dmi_system_id __initdata acpisleep_dmi_table[] = { | |||
381 | }, | 356 | }, |
382 | }, | 357 | }, |
383 | { | 358 | { |
384 | .callback = init_set_sci_en_on_resume, | ||
385 | .ident = "Apple MacBook 1,1", | ||
386 | .matches = { | ||
387 | DMI_MATCH(DMI_SYS_VENDOR, "Apple Computer, Inc."), | ||
388 | DMI_MATCH(DMI_PRODUCT_NAME, "MacBook1,1"), | ||
389 | }, | ||
390 | }, | ||
391 | { | ||
392 | .callback = init_set_sci_en_on_resume, | ||
393 | .ident = "Apple MacMini 1,1", | ||
394 | .matches = { | ||
395 | DMI_MATCH(DMI_SYS_VENDOR, "Apple Computer, Inc."), | ||
396 | DMI_MATCH(DMI_PRODUCT_NAME, "Macmini1,1"), | ||
397 | }, | ||
398 | }, | ||
399 | { | ||
400 | .callback = init_old_suspend_ordering, | 359 | .callback = init_old_suspend_ordering, |
401 | .ident = "Asus Pundit P1-AH2 (M2N8L motherboard)", | 360 | .ident = "Asus Pundit P1-AH2 (M2N8L motherboard)", |
402 | .matches = { | 361 | .matches = { |
@@ -405,94 +364,6 @@ static struct dmi_system_id __initdata acpisleep_dmi_table[] = { | |||
405 | }, | 364 | }, |
406 | }, | 365 | }, |
407 | { | 366 | { |
408 | .callback = init_set_sci_en_on_resume, | ||
409 | .ident = "Toshiba Satellite L300", | ||
410 | .matches = { | ||
411 | DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"), | ||
412 | DMI_MATCH(DMI_PRODUCT_NAME, "Satellite L300"), | ||
413 | }, | ||
414 | }, | ||
415 | { | ||
416 | .callback = init_set_sci_en_on_resume, | ||
417 | .ident = "Hewlett-Packard HP G7000 Notebook PC", | ||
418 | .matches = { | ||
419 | DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"), | ||
420 | DMI_MATCH(DMI_PRODUCT_NAME, "HP G7000 Notebook PC"), | ||
421 | }, | ||
422 | }, | ||
423 | { | ||
424 | .callback = init_set_sci_en_on_resume, | ||
425 | .ident = "Hewlett-Packard HP Pavilion dv3 Notebook PC", | ||
426 | .matches = { | ||
427 | DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"), | ||
428 | DMI_MATCH(DMI_PRODUCT_NAME, "HP Pavilion dv3 Notebook PC"), | ||
429 | }, | ||
430 | }, | ||
431 | { | ||
432 | .callback = init_set_sci_en_on_resume, | ||
433 | .ident = "Hewlett-Packard Pavilion dv4", | ||
434 | .matches = { | ||
435 | DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"), | ||
436 | DMI_MATCH(DMI_PRODUCT_NAME, "HP Pavilion dv4"), | ||
437 | }, | ||
438 | }, | ||
439 | { | ||
440 | .callback = init_set_sci_en_on_resume, | ||
441 | .ident = "Hewlett-Packard Pavilion dv7", | ||
442 | .matches = { | ||
443 | DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"), | ||
444 | DMI_MATCH(DMI_PRODUCT_NAME, "HP Pavilion dv7"), | ||
445 | }, | ||
446 | }, | ||
447 | { | ||
448 | .callback = init_set_sci_en_on_resume, | ||
449 | .ident = "Hewlett-Packard Compaq Presario C700 Notebook PC", | ||
450 | .matches = { | ||
451 | DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"), | ||
452 | DMI_MATCH(DMI_PRODUCT_NAME, "Compaq Presario C700 Notebook PC"), | ||
453 | }, | ||
454 | }, | ||
455 | { | ||
456 | .callback = init_set_sci_en_on_resume, | ||
457 | .ident = "Hewlett-Packard Compaq Presario CQ40 Notebook PC", | ||
458 | .matches = { | ||
459 | DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"), | ||
460 | DMI_MATCH(DMI_PRODUCT_NAME, "Compaq Presario CQ40 Notebook PC"), | ||
461 | }, | ||
462 | }, | ||
463 | { | ||
464 | .callback = init_set_sci_en_on_resume, | ||
465 | .ident = "Lenovo ThinkPad T410", | ||
466 | .matches = { | ||
467 | DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), | ||
468 | DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad T410"), | ||
469 | }, | ||
470 | }, | ||
471 | { | ||
472 | .callback = init_set_sci_en_on_resume, | ||
473 | .ident = "Lenovo ThinkPad T510", | ||
474 | .matches = { | ||
475 | DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), | ||
476 | DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad T510"), | ||
477 | }, | ||
478 | }, | ||
479 | { | ||
480 | .callback = init_set_sci_en_on_resume, | ||
481 | .ident = "Lenovo ThinkPad W510", | ||
482 | .matches = { | ||
483 | DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), | ||
484 | DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad W510"), | ||
485 | }, | ||
486 | }, | ||
487 | { | ||
488 | .callback = init_set_sci_en_on_resume, | ||
489 | .ident = "Lenovo ThinkPad X201[s]", | ||
490 | .matches = { | ||
491 | DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), | ||
492 | DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad X201"), | ||
493 | }, | ||
494 | }, | ||
495 | { | ||
496 | .callback = init_old_suspend_ordering, | 367 | .callback = init_old_suspend_ordering, |
497 | .ident = "Panasonic CF51-2L", | 368 | .ident = "Panasonic CF51-2L", |
498 | .matches = { | 369 | .matches = { |
@@ -501,30 +372,6 @@ static struct dmi_system_id __initdata acpisleep_dmi_table[] = { | |||
501 | DMI_MATCH(DMI_BOARD_NAME, "CF51-2L"), | 372 | DMI_MATCH(DMI_BOARD_NAME, "CF51-2L"), |
502 | }, | 373 | }, |
503 | }, | 374 | }, |
504 | { | ||
505 | .callback = init_set_sci_en_on_resume, | ||
506 | .ident = "Dell Studio 1558", | ||
507 | .matches = { | ||
508 | DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), | ||
509 | DMI_MATCH(DMI_PRODUCT_NAME, "Studio 1558"), | ||
510 | }, | ||
511 | }, | ||
512 | { | ||
513 | .callback = init_set_sci_en_on_resume, | ||
514 | .ident = "Dell Studio 1557", | ||
515 | .matches = { | ||
516 | DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), | ||
517 | DMI_MATCH(DMI_PRODUCT_NAME, "Studio 1557"), | ||
518 | }, | ||
519 | }, | ||
520 | { | ||
521 | .callback = init_set_sci_en_on_resume, | ||
522 | .ident = "Dell Studio 1555", | ||
523 | .matches = { | ||
524 | DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), | ||
525 | DMI_MATCH(DMI_PRODUCT_NAME, "Studio 1555"), | ||
526 | }, | ||
527 | }, | ||
528 | {}, | 375 | {}, |
529 | }; | 376 | }; |
530 | #endif /* CONFIG_SUSPEND */ | 377 | #endif /* CONFIG_SUSPEND */ |