summaryrefslogtreecommitdiff
path: root/src/soc
diff options
context:
space:
mode:
authorFelix Held <felix-coreboot@felixheld.de>2021-11-04 04:44:54 +0100
committerFelix Held <felix-coreboot@felixheld.de>2021-11-05 16:25:09 +0000
commite14f363d3b147b9a3fc1259b816c55bda0d2d4e8 (patch)
tree32160fd491f2efc9a2cd46c9fbbb578eebdaeeea /src/soc
parent996808e52a19354de37cc29f8bb50296aa543c99 (diff)
soc/amd/*/include/smi: move NUMBER_SMITYPES definition to the top
Since all other defines for the number of certain things are at the top of the file, move NUMBER_SMITYPES there as well to keep things consistent. Signed-off-by: Felix Held <felix-coreboot@felixheld.de> Change-Id: Idfb599531d6cc382ab258bd1eae89e7b35fa9e79 Reviewed-on: https://review.coreboot.org/c/coreboot/+/58953 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Raul Rangel <rrangel@chromium.org>
Diffstat (limited to 'src/soc')
-rw-r--r--src/soc/amd/cezanne/include/soc/smi.h3
-rw-r--r--src/soc/amd/picasso/include/soc/smi.h3
-rw-r--r--src/soc/amd/stoneyridge/include/soc/smi.h3
3 files changed, 6 insertions, 3 deletions
diff --git a/src/soc/amd/cezanne/include/soc/smi.h b/src/soc/amd/cezanne/include/soc/smi.h
index f0948bbbc7..aad4123083 100644
--- a/src/soc/amd/cezanne/include/soc/smi.h
+++ b/src/soc/amd/cezanne/include/soc/smi.h
@@ -8,6 +8,7 @@
#define SMI_GEVENTS 24
#define SCIMAPS 59 /* 0..58 */
#define SCI_GPES 32
+#define NUMBER_SMITYPES 160
#define SMI_EVENT_STATUS 0x0
#define SMI_EVENT_ENABLE 0x04
@@ -138,7 +139,7 @@
/* 153-155 Reserved */
#define SMITYPE_CFGTRAP0 156
/* 157-159 Reserved */
-#define NUMBER_SMITYPES 160
+
#define TYPE_TO_MASK(X) (1 << (X) % 32)
#define SMI_REG_SMISTS0 0x80
diff --git a/src/soc/amd/picasso/include/soc/smi.h b/src/soc/amd/picasso/include/soc/smi.h
index 8256b2116a..dba3bea63e 100644
--- a/src/soc/amd/picasso/include/soc/smi.h
+++ b/src/soc/amd/picasso/include/soc/smi.h
@@ -8,6 +8,7 @@
#define SMI_GEVENTS 24
#define SCIMAPS 59 /* 0..58 */
#define SCI_GPES 32
+#define NUMBER_SMITYPES 160
#define SMI_EVENT_STATUS 0x0
#define SMI_EVENT_ENABLE 0x04
@@ -140,7 +141,7 @@
/* 153-155 Reserved */
#define SMITYPE_CFGTRAP0 156
/* 157-159 Reserved */
-#define NUMBER_SMITYPES 160
+
#define TYPE_TO_MASK(X) (1 << (X) % 32)
#define SMI_REG_SMISTS0 0x80
diff --git a/src/soc/amd/stoneyridge/include/soc/smi.h b/src/soc/amd/stoneyridge/include/soc/smi.h
index 0e0bc3715a..3ce41df40c 100644
--- a/src/soc/amd/stoneyridge/include/soc/smi.h
+++ b/src/soc/amd/stoneyridge/include/soc/smi.h
@@ -6,6 +6,7 @@
#define SMI_GEVENTS 24
#define SCIMAPS 59 /* 0..58 */
#define SCI_GPES 32
+#define NUMBER_SMITYPES 160
#define SMI_EVENT_STATUS 0x0
#define SMI_EVENT_ENABLE 0x04
@@ -138,7 +139,7 @@
/* 153-155 Reserved */
#define SMITYPE_CFGTRAP0 156
/* 157-159 Reserved */
-#define NUMBER_SMITYPES 160
+
#define TYPE_TO_MASK(X) (1 << (X) % 32)
#define SMI_REG_SMISTS0 0x80