| @@ -1,47 +1,50 @@ | | | @@ -1,47 +1,50 @@ |
1 | /* $NetBSD: apple_smc_acpi.c,v 1.3 2014/04/01 17:49:40 riastradh Exp $ */ | | 1 | /* $NetBSD: apple_smc_acpi.c,v 1.4 2017/05/22 14:07:00 riastradh Exp $ */ |
2 | | | 2 | |
3 | /* | | 3 | /* |
4 | * Apple System Management Controller: ACPI Attachment | | 4 | * Apple System Management Controller: ACPI Attachment |
5 | */ | | 5 | */ |
6 | | | 6 | |
7 | /*- | | 7 | /*- |
8 | * Copyright (c) 2013 Taylor R. Campbell | | 8 | * Copyright (c) 2013 The NetBSD Foundation, Inc. |
9 | * All rights reserved. | | 9 | * All rights reserved. |
10 | * | | 10 | * |
| | | 11 | * This code is derived from software contributed to The NetBSD Foundation |
| | | 12 | * by Taylor R. Campbell. |
| | | 13 | * |
11 | * Redistribution and use in source and binary forms, with or without | | 14 | * Redistribution and use in source and binary forms, with or without |
12 | * modification, are permitted provided that the following conditions | | 15 | * modification, are permitted provided that the following conditions |
13 | * are met: | | 16 | * are met: |
14 | * 1. Redistributions of source code must retain the above copyright | | 17 | * 1. Redistributions of source code must retain the above copyright |
15 | * notice, this list of conditions and the following disclaimer. | | 18 | * notice, this list of conditions and the following disclaimer. |
16 | * 2. Redistributions in binary form must reproduce the above copyright | | 19 | * 2. Redistributions in binary form must reproduce the above copyright |
17 | * notice, this list of conditions and the following disclaimer in the | | 20 | * notice, this list of conditions and the following disclaimer in the |
18 | * documentation and/or other materials provided with the distribution. | | 21 | * documentation and/or other materials provided with the distribution. |
19 | * | | 22 | * |
20 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND | | 23 | * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS |
21 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | | 24 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED |
22 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | | 25 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
23 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | | 26 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS |
24 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | | 27 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
25 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | | 28 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
26 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | | 29 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
27 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | | 30 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
28 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | | 31 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
29 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | | 32 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
30 | * SUCH DAMAGE. | | 33 | * POSSIBILITY OF SUCH DAMAGE. |
31 | */ | | 34 | */ |
32 | | | 35 | |
33 | #include <sys/cdefs.h> | | 36 | #include <sys/cdefs.h> |
34 | __KERNEL_RCSID(0, "$NetBSD: apple_smc_acpi.c,v 1.3 2014/04/01 17:49:40 riastradh Exp $"); | | 37 | __KERNEL_RCSID(0, "$NetBSD: apple_smc_acpi.c,v 1.4 2017/05/22 14:07:00 riastradh Exp $"); |
35 | | | 38 | |
36 | #include <sys/types.h> | | 39 | #include <sys/types.h> |
37 | #include <sys/param.h> | | 40 | #include <sys/param.h> |
38 | #include <sys/bus.h> | | 41 | #include <sys/bus.h> |
39 | #include <sys/module.h> | | 42 | #include <sys/module.h> |
40 | | | 43 | |
41 | #include <dev/acpi/acpireg.h> | | 44 | #include <dev/acpi/acpireg.h> |
42 | #include <dev/acpi/acpivar.h> | | 45 | #include <dev/acpi/acpivar.h> |
43 | | | 46 | |
44 | #include <dev/ic/apple_smcreg.h> | | 47 | #include <dev/ic/apple_smcreg.h> |
45 | #include <dev/ic/apple_smcvar.h> | | 48 | #include <dev/ic/apple_smcvar.h> |
46 | | | 49 | |
47 | #define _COMPONENT ACPI_RESOURCE_COMPONENT | | 50 | #define _COMPONENT ACPI_RESOURCE_COMPONENT |