Felix Held has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/76222?usp=email )
Change subject: soc/amd/common/block/iommu: factor out PCI register definitions ......................................................................
soc/amd/common/block/iommu: factor out PCI register definitions
Signed-off-by: Felix Held felix-coreboot@felixheld.de Change-Id: Ie155cab1f659e9f7b64cd87ba8a77260056656d8 --- A src/soc/amd/common/block/include/amdblocks/iommu.h M src/soc/amd/common/block/iommu/iommu.c 2 files changed, 6 insertions(+), 4 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/22/76222/1
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 0000000..9f2e023 --- /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 78ec881..43eda7c 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;