| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: acpi.c,v 1.169 2010/04/14 17:12:14 jruoho Exp $ */ | | 1 | /* $NetBSD: acpi.c,v 1.170 2010/04/14 17:14:45 jruoho Exp $ */ |
2 | | | 2 | |
3 | /*- | | 3 | /*- |
4 | * Copyright (c) 2003, 2007 The NetBSD Foundation, Inc. | | 4 | * Copyright (c) 2003, 2007 The NetBSD Foundation, Inc. |
5 | * All rights reserved. | | 5 | * All rights reserved. |
6 | * | | 6 | * |
7 | * This code is derived from software contributed to The NetBSD Foundation | | 7 | * This code is derived from software contributed to The NetBSD Foundation |
8 | * by Charles M. Hannum of By Noon Software, Inc. | | 8 | * by Charles M. Hannum of By Noon Software, Inc. |
9 | * | | 9 | * |
10 | * Redistribution and use in source and binary forms, with or without | | 10 | * Redistribution and use in source and binary forms, with or without |
11 | * modification, are permitted provided that the following conditions | | 11 | * modification, are permitted provided that the following conditions |
12 | * are met: | | 12 | * are met: |
13 | * 1. Redistributions of source code must retain the above copyright | | 13 | * 1. Redistributions of source code must retain the above copyright |
14 | * notice, this list of conditions and the following disclaimer. | | 14 | * notice, this list of conditions and the following disclaimer. |
| @@ -55,27 +55,27 @@ | | | @@ -55,27 +55,27 @@ |
55 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED | | 55 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED |
56 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | | 56 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
57 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL WASABI SYSTEMS, INC | | 57 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL WASABI SYSTEMS, INC |
58 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | | 58 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
59 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | | 59 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
60 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | | 60 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
61 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | | 61 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
62 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | | 62 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
63 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | | 63 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
64 | * POSSIBILITY OF SUCH DAMAGE. | | 64 | * POSSIBILITY OF SUCH DAMAGE. |
65 | */ | | 65 | */ |
66 | | | 66 | |
67 | #include <sys/cdefs.h> | | 67 | #include <sys/cdefs.h> |
68 | __KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.169 2010/04/14 17:12:14 jruoho Exp $"); | | 68 | __KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.170 2010/04/14 17:14:45 jruoho Exp $"); |
69 | | | 69 | |
70 | #include "opt_acpi.h" | | 70 | #include "opt_acpi.h" |
71 | #include "opt_pcifixup.h" | | 71 | #include "opt_pcifixup.h" |
72 | | | 72 | |
73 | #include <sys/param.h> | | 73 | #include <sys/param.h> |
74 | #include <sys/device.h> | | 74 | #include <sys/device.h> |
75 | #include <sys/kernel.h> | | 75 | #include <sys/kernel.h> |
76 | #include <sys/malloc.h> | | 76 | #include <sys/malloc.h> |
77 | #include <sys/mutex.h> | | 77 | #include <sys/mutex.h> |
78 | #include <sys/sysctl.h> | | 78 | #include <sys/sysctl.h> |
79 | #include <sys/systm.h> | | 79 | #include <sys/systm.h> |
80 | | | 80 | |
81 | #include <dev/acpi/acpireg.h> | | 81 | #include <dev/acpi/acpireg.h> |
| @@ -586,46 +586,26 @@ acpi_suspend(device_t dv, const pmf_qual | | | @@ -586,46 +586,26 @@ acpi_suspend(device_t dv, const pmf_qual |
586 | | | 586 | |
587 | return true; | | 587 | return true; |
588 | } | | 588 | } |
589 | | | 589 | |
590 | static bool | | 590 | static bool |
591 | acpi_resume(device_t dv, const pmf_qual_t *qual) | | 591 | acpi_resume(device_t dv, const pmf_qual_t *qual) |
592 | { | | 592 | { |
593 | | | 593 | |
594 | acpi_suspended = 0; | | 594 | acpi_suspended = 0; |
595 | | | 595 | |
596 | return true; | | 596 | return true; |
597 | } | | 597 | } |
598 | | | 598 | |
599 | #if 0 | | | |
600 | /* | | | |
601 | * acpi_disable: | | | |
602 | * | | | |
603 | * Disable ACPI. | | | |
604 | */ | | | |
605 | static ACPI_STATUS | | | |
606 | acpi_disable(struct acpi_softc *sc) | | | |
607 | { | | | |
608 | ACPI_STATUS rv = AE_OK; | | | |
609 | | | | |
610 | if (acpi_active) { | | | |
611 | rv = AcpiDisable(); | | | |
612 | if (ACPI_SUCCESS(rv)) | | | |
613 | acpi_active = 0; | | | |
614 | } | | | |
615 | return rv; | | | |
616 | } | | | |
617 | #endif | | | |
618 | | | | |
619 | /* | | 599 | /* |
620 | * Namespace scan. | | 600 | * Namespace scan. |
621 | */ | | 601 | */ |
622 | static void | | 602 | static void |
623 | acpi_build_tree(struct acpi_softc *sc) | | 603 | acpi_build_tree(struct acpi_softc *sc) |
624 | { | | 604 | { |
625 | | | 605 | |
626 | (void)AcpiWalkNamespace(ACPI_TYPE_ANY, ACPI_ROOT_OBJECT, | | 606 | (void)AcpiWalkNamespace(ACPI_TYPE_ANY, ACPI_ROOT_OBJECT, |
627 | UINT32_MAX, acpi_make_devnode, NULL, sc, NULL); | | 607 | UINT32_MAX, acpi_make_devnode, NULL, sc, NULL); |
628 | | | 608 | |
629 | acpi_rescan1(sc, NULL, NULL); | | 609 | acpi_rescan1(sc, NULL, NULL); |
630 | acpi_rescan_capabilities(sc); | | 610 | acpi_rescan_capabilities(sc); |
631 | | | 611 | |