Debian Codegraph @

src/soc/intel/apollolake/acpi/pch_hda.asl

raw
1 /* SPDX-License-Identifier: GPL-2.0-only */
2
3 /* Audio Controller - Device 14, Function 0 */
4
5 Device (HDAS)
6 {
7 Name (_ADR, 0x000E0000)
8 Name (_DDN, "Audio Controller")
9 Name (UUID, ToUUID("A69F886E-6CEB-4594-A41F-7B5DCE24C553"))
10
11 /* Device is D3 wake capable */
12 Name (_S0W, 3)
13
14 /* NHLT Table Address populated from GNVS values */
15 Name (NBUF, ResourceTemplate() {
16 QWordMemory (ResourceConsumer, PosDecode, MinFixed,
17 MaxFixed, Cacheable, ReadOnly,
18 0, 0, 0, 0, 1,,, NHLT, AddressRangeACPI)
19 }
20 )
21
22 /* can wake up from S3 state */
23 Name (_PRW, Package() { GPE0A_AVS_PME_STS, 3 })
24
25 /*
26 * Device Specific Method
27 * Arg0 - UUID
28 * Arg1 - Revision
29 * Arg2 - Function Index
30 */
31 Method (_DSM, 4) {
32 If (Arg0 == ^UUID) {
33 /*
34 * Function 0: Function Support Query
35 * Returns a bitmask of functions supported.
36 */
37 If (Arg2 == 0) {
38 /*
39 * NHLT Query only supported for revision 1 and
40 * if NHLT address and length are set in NVS.
41 */
42 If (Arg1 == 1 && NHLA != 0 && NHLL != 0) {
43 Return (Buffer (1) { 0x03 })
44 }
45 Else {
46 Return (Buffer (1) { 0x01 })
47 }
48 }
49
50 /*
51 * Function 1: Query NHLT memory address used by
52 * Intel Offload Engine Driver to discover any non-HDA
53 * devices that are supported by the DSP.
54 *
55 * Returns a pointer to NHLT table in memory.
56 */
57 If (Arg2 == 1) {
58 CreateQWordField (NBUF, ^NHLT._MIN, NBAS)
59 CreateQWordField (NBUF, ^NHLT._MAX, NMAS)
60 CreateQWordField (NBUF, ^NHLT._LEN, NLEN)
61 NBAS = NHLA
62 NMAS = NHLA
63 NLEN = NHLL
64 Return (NBUF)
65 }
66 }
67
68 Return (Buffer (1) { 0x00 })
69 }
70 }