tree: drop last paragraph of GPL copyright header
[coreboot.git] / src / mainboard / amd / olivehill / acpi / AmdImc.asl
blobaa941ba9ae8c0c69cfe97be5fc2bf7a604cb8af6
1 /*
2  * This file is part of the coreboot project.
3  *
4  * Copyright (C) 2012 Advanced Micro Devices, Inc.
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; version 2 of the License.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU General Public License for more details.
14  */
16 //BTDC Due to IMC Fan, ACPI control codes
17 OperationRegion(IMIO, SystemIO, 0x3E, 0x02)
18 Field(IMIO , ByteAcc, NoLock, Preserve) {
19         IMCX,8,
20         IMCA,8
23 IndexField(IMCX, IMCA, ByteAcc, NoLock, Preserve) {
24         Offset(0x80),
25         MSTI, 8,
26         MITS, 8,
27         MRG0, 8,
28         MRG1, 8,
29         MRG2, 8,
30         MRG3, 8,
33 Method(WACK, 0)
35         Store(0, Local0)
36         While (LNotEqual(Local0, 0xFA)) {
37                 Store(MRG0, Local0)
38                 Sleep(10)
39         }
42 //Init
43 Method (ITZE, 0)
45         Store(0, MRG0)
46         Store(0xB5, MRG1)
47         Store(0, MRG2)
48         Store(0x96, MSTI)
49         WACK()
51         Store(0, MRG0)
52         Store(0, MRG1)
53         Store(0, MRG2)
54         Store(0x80, MSTI)
55         WACK()
57         Or(MRG2, 0x01, Local0)
59         Store(0, MRG0)
60         Store(0, MRG1)
61         Store(Local0, MRG2)
62         Store(0x81, MSTI)
63         WACK()
66 //Sleep
67 Method (IMSP, 0)
69         Store(0, MRG0)
70         Store(0xB5, MRG1)
71         Store(0, MRG2)
72         Store(0x96, MSTI)
73         WACK()
75         Store(0, MRG0)
76         Store(1, MRG1)
77         Store(0, MRG2)
78         Store(0x98, MSTI)
79         WACK()
81         Store(0, MRG0)
82         Store(0xB4, MRG1)
83         Store(0, MRG2)
84         Store(0x96, MSTI)
85         WACK()
88 //Wake
89 Method (IMWK, 0)
91         Store(0, MRG0)
92         Store(0xB5, MRG1)
93         Store(0, MRG2)
94         Store(0x96, MSTI)
95         WACK()
97         Store(0, MRG0)
98         Store(0, MRG1)
99         Store(0, MRG2)
100         Store(0x80, MSTI)
101         WACK()
103         Or(MRG2, 0x01, Local0)
105         Store(0, MRG0)
106         Store(0, MRG1)
107         Store(Local0, MRG2)
108         Store(0x81, MSTI)
109         WACK()