summaryrefslogtreecommitdiff
path: root/src/soc/amd
diff options
context:
space:
mode:
authorFelix Held <felix-coreboot@felixheld.de>2023-07-03 18:50:48 +0200
committerFelix Held <felix-coreboot@felixheld.de>2023-07-04 17:50:50 +0000
commite54e141d6c90f995f3917dca9224ea4619ea4bec (patch)
tree6c1f6c623f41ad77a991c25903387c4572fdff42 /src/soc/amd
parent6da62684dee6b2df49fa1d51e74e14c181c9349e (diff)
soc/amd/common/block/iommu: factor out PCI register definitions
Signed-off-by: Felix Held <felix-coreboot@felixheld.de> Change-Id: Ie155cab1f659e9f7b64cd87ba8a77260056656d8 Reviewed-on: https://review.coreboot.org/c/coreboot/+/76222 Reviewed-by: Fred Reitberger <reitbergerfred@gmail.com> Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc/amd')
-rw-r--r--src/soc/amd/common/block/include/amdblocks/iommu.h5
-rw-r--r--src/soc/amd/common/block/iommu/iommu.c5
2 files changed, 6 insertions, 4 deletions
diff --git a/src/soc/amd/common/block/include/amdblocks/iommu.h b/src/soc/amd/common/block/include/amdblocks/iommu.h
new file mode 100644
index 0000000000..9f2e023fab
--- /dev/null
+++ b/src/soc/amd/common/block/include/amdblocks/iommu.h
@@ -0,0 +1,5 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+
+#define IOMMU_CAP_BASE_LO 0x44
+#define IOMMU_ENABLE (1 << 0)
+#define IOMMU_CAP_BASE_HI 0x48
diff --git a/src/soc/amd/common/block/iommu/iommu.c b/src/soc/amd/common/block/iommu/iommu.c
index 78ec881b49..43eda7cbb0 100644
--- a/src/soc/amd/common/block/iommu/iommu.c
+++ b/src/soc/amd/common/block/iommu/iommu.c
@@ -1,14 +1,11 @@
/* SPDX-License-Identifier: GPL-2.0-only */
+#include <amdblocks/iommu.h>
#include <console/console.h>
#include <device/device.h>
#include <device/pci.h>
#include <lib.h>
-#define IOMMU_CAP_BASE_LO 0x44
-#define IOMMU_CAP_BASE_HI 0x48
-#define IOMMU_ENABLE (1 << 0)
-
static void iommu_read_resources(struct device *dev)
{
struct resource *res;