1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 #define AOAC_DEVICE(DEV_ID, SX) \
4 PowerResource(AOAC, SX, 0) { \
5 OperationRegion (AOAC, SystemMemory, ACPIMMIO_BASE(AOAC) + 0x40 + (DEV_ID << 1), 2) \
6 Field (AOAC, ByteAcc, NoLock, Preserve) { \
8 * Target Device State \
10 * 0 = D0 - Uninitialized \
11 * 1 = D0 - Initialized \
15 * This field is only used to cut off register access. It does not \
16 * control any power states. D3Cold is the only value that will \
17 * cut off register access. All other values will allow register \
18 * access and are purely informational. \
22 DS, 1, /* Device State - Purely informational */ \
27 * 1 = Perform hardware sequence to power on the device \
28 * 0 = Perform hardware sequence to power off the device \
30 * This register is only valid when Is Software Control = 0. \
34 /* Software Power On Reset B */ \
36 /* Software Ref Clock OK */ \
38 /* Software Reset B */ \
41 * Is Software Control \
43 * 1 = Allow software to control Power On Reset B, \
44 * Ref Clock OK, and Reset B. \
45 * 0 = Hardware control \
49 /* Power Reset B State */ \
51 /* Ref Clock OK State */ \
55 /* Device Off Gating State */ \
59 /* Device Clock OK State */ \
61 /* State of device */ \
63 /* State of device */ \
67 Local0 = (PRBS && RCOS && RBS) \
75 Method(_ON, 0, Serialized) { \
79 While (!PRBS || !RCOS || !RBS) { \
83 Method(_OFF, 0, Serialized) { \
87 While (PRBS || RCOS || RBS) { \
91 Method(_RST, 0, Serialized) { \
95 /* Assert the SwRstB signal for 200 us */ \
101 While (!PRBS || !RCOS || !RBS) { \
102 Printf ("Waiting for device to complete reset") \
107 Name (_PR0, Package () { AOAC }) \
108 Name (_PR2, Package () { AOAC }) \
109 Name (_PR3, Package () { AOAC }) \
110 Method (_PS0, 0, Serialized) { \
113 Method (_PS3, 0, Serialized) { \