Angel Pons | 182dbde | 2020-04-02 23:49:05 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Bruce Griffith | 72645bb | 2014-06-10 05:10:19 -0600 | [diff] [blame] | 2 | |
| 3 | OperationRegion(IMIO, SystemIO, 0x3E, 0x02) |
| 4 | Field(IMIO , ByteAcc, NoLock, Preserve) { |
| 5 | IMCX,8, |
| 6 | IMCA,8 |
| 7 | } |
| 8 | |
| 9 | IndexField(IMCX, IMCA, ByteAcc, NoLock, Preserve) { |
| 10 | Offset(0x80), |
| 11 | MSTI, 8, |
| 12 | MITS, 8, |
| 13 | MRG0, 8, |
| 14 | MRG1, 8, |
| 15 | MRG2, 8, |
| 16 | MRG3, 8, |
| 17 | } |
| 18 | |
| 19 | Method(WACK, 0) |
| 20 | { |
Elyes HAOUAS | a81c461 | 2020-09-30 13:19:49 +0200 | [diff] [blame^] | 21 | Local0 = 0 |
| 22 | Local1 = 50 |
| 23 | While ((Local0 != 0xFA) && (Local1 > 0)) { |
| 24 | Local0 = MRG0 |
Bruce Griffith | 72645bb | 2014-06-10 05:10:19 -0600 | [diff] [blame] | 25 | Sleep(10) |
Elyes HAOUAS | a81c461 | 2020-09-30 13:19:49 +0200 | [diff] [blame^] | 26 | Local1-- |
Bruce Griffith | 72645bb | 2014-06-10 05:10:19 -0600 | [diff] [blame] | 27 | } |
| 28 | } |
| 29 | |
| 30 | //Init |
| 31 | Method (ITZE, 0) |
| 32 | { |
Elyes HAOUAS | a81c461 | 2020-09-30 13:19:49 +0200 | [diff] [blame^] | 33 | MRG0 = 0 |
| 34 | MRG1 = 0xb5 |
| 35 | MRG2 = 0 |
| 36 | MSTI = 0x96 |
Bruce Griffith | 72645bb | 2014-06-10 05:10:19 -0600 | [diff] [blame] | 37 | WACK() |
| 38 | |
Elyes HAOUAS | a81c461 | 2020-09-30 13:19:49 +0200 | [diff] [blame^] | 39 | MRG0 = 0 |
| 40 | MRG1 = 0 |
| 41 | MRG2 = 0 |
| 42 | MSTI = 0x80 |
Bruce Griffith | 72645bb | 2014-06-10 05:10:19 -0600 | [diff] [blame] | 43 | WACK() |
| 44 | |
Elyes HAOUAS | a81c461 | 2020-09-30 13:19:49 +0200 | [diff] [blame^] | 45 | Local0 = MRG2 | 0x01 |
Bruce Griffith | 72645bb | 2014-06-10 05:10:19 -0600 | [diff] [blame] | 46 | |
Elyes HAOUAS | a81c461 | 2020-09-30 13:19:49 +0200 | [diff] [blame^] | 47 | MRG0 = 0 |
| 48 | MRG1 = 0 |
| 49 | MRG2 = Local0 |
| 50 | MSTI = 0x81 |
Bruce Griffith | 72645bb | 2014-06-10 05:10:19 -0600 | [diff] [blame] | 51 | WACK() |
| 52 | } |