summaryrefslogtreecommitdiff
path: root/src/soc/intel/common/acpi/ioe_pcr.asl
blob: 7f532606aff895c1c7f089467caeaa3be5894217 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/* SPDX-License-Identifier: GPL-2.0-only */

#include "pcrlib.asl"

/* APIs to access P2SB inside IOE die */

/*
 * Calculate PCR register base at specified PID
 * Arg0 - PCR Port ID
 */
Method (ICRB, 1, NotSerialized)
{
	Return (GPCR(IOE_P2SB, Arg0))
}

/*
 * Read a PCR register at specified PID and offset
 * Arg0 - PCR Port ID
 * Arg1 - Register Offset
 */
Method (ICRR, 2, Serialized)
{
	Return (RPCR(IOE_P2SB, Arg0, Arg1))
}

/*
 * AND a value with PCR register at specified PID and offset
 * Arg0 - PCR Port ID
 * Arg1 - Register Offset
 * Arg2 - Value to AND
 */
Method (ICRA, 3, Serialized)
{
	APCR(IOE_P2SB, Arg0, Arg1, Arg2)
}

/*
 * OR a value with PCR register at specified PID and offset
 * Arg0 - PCR Port ID
 * Arg1 - Register Offset
 * Arg2 - Value to OR
 */
Method (ICRO, 3, Serialized)
{
	OPCR(IOE_P2SB, Arg0, Arg1, Arg2)
}