From a4ced631ec44f189c2544636ccd95d38e43d9a99 Mon Sep 17 00:00:00 2001 From: Felix Held Date: Mon, 5 Jun 2023 21:22:15 +0200 Subject: soc/amd/*/root_complex: use VGA_MMIO_* defines Replace the magic constants by using defines. Signed-off-by: Felix Held Change-Id: I16179a37b6ee19bc3b4862b7dcb3bbc4caf63f2e Reviewed-on: https://review.coreboot.org/c/coreboot/+/75668 Tested-by: build bot (Jenkins) Reviewed-by: Matt DeVillier --- src/soc/amd/cezanne/root_complex.c | 3 ++- src/soc/amd/glinda/root_complex.c | 3 ++- src/soc/amd/mendocino/root_complex.c | 3 ++- src/soc/amd/phoenix/root_complex.c | 3 ++- src/soc/amd/picasso/root_complex.c | 3 ++- 5 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/soc/amd/cezanne/root_complex.c b/src/soc/amd/cezanne/root_complex.c index cb35662af7..bbddfab177 100644 --- a/src/soc/amd/cezanne/root_complex.c +++ b/src/soc/amd/cezanne/root_complex.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include @@ -121,7 +122,7 @@ static void read_resources(struct device *dev) ram_resource_kb(dev, idx++, 0, 0xa0000 / KiB); /* 0xa0000 - 0xbffff: legacy VGA */ - mmio_resource_kb(dev, idx++, 0xa0000 / KiB, 0x20000 / KiB); + mmio_resource_kb(dev, idx++, VGA_MMIO_BASE / KiB, VGA_MMIO_SIZE / KiB); /* 0xc0000 - 0xfffff: Option ROM */ reserved_ram_resource_kb(dev, idx++, 0xc0000 / KiB, 0x40000 / KiB); diff --git a/src/soc/amd/glinda/root_complex.c b/src/soc/amd/glinda/root_complex.c index 071903d3c6..64d90ee77e 100644 --- a/src/soc/amd/glinda/root_complex.c +++ b/src/soc/amd/glinda/root_complex.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include @@ -136,7 +137,7 @@ static void read_resources(struct device *dev) ram_resource_kb(dev, idx++, 0, 0xa0000 / KiB); /* 0xa0000 - 0xbffff: legacy VGA */ - mmio_resource_kb(dev, idx++, 0xa0000 / KiB, 0x20000 / KiB); + mmio_resource_kb(dev, idx++, VGA_MMIO_BASE / KiB, VGA_MMIO_SIZE / KiB); /* 0xc0000 - 0xfffff: Option ROM */ reserved_ram_resource_kb(dev, idx++, 0xc0000 / KiB, 0x40000 / KiB); diff --git a/src/soc/amd/mendocino/root_complex.c b/src/soc/amd/mendocino/root_complex.c index 492a5882c1..6f935020a3 100644 --- a/src/soc/amd/mendocino/root_complex.c +++ b/src/soc/amd/mendocino/root_complex.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include @@ -164,7 +165,7 @@ static void read_resources(struct device *dev) ram_resource_kb(dev, idx++, 0, 0xa0000 / KiB); /* 0xa0000 - 0xbffff: legacy VGA */ - mmio_resource_kb(dev, idx++, 0xa0000 / KiB, 0x20000 / KiB); + mmio_resource_kb(dev, idx++, VGA_MMIO_BASE / KiB, VGA_MMIO_SIZE / KiB); /* 0xc0000 - 0xfffff: Option ROM */ reserved_ram_resource_kb(dev, idx++, 0xc0000 / KiB, 0x40000 / KiB); diff --git a/src/soc/amd/phoenix/root_complex.c b/src/soc/amd/phoenix/root_complex.c index f7c4c1edb6..64f9ca4576 100644 --- a/src/soc/amd/phoenix/root_complex.c +++ b/src/soc/amd/phoenix/root_complex.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include @@ -136,7 +137,7 @@ static void read_resources(struct device *dev) ram_resource_kb(dev, idx++, 0, 0xa0000 / KiB); /* 0xa0000 - 0xbffff: legacy VGA */ - mmio_resource_kb(dev, idx++, 0xa0000 / KiB, 0x20000 / KiB); + mmio_resource_kb(dev, idx++, VGA_MMIO_BASE / KiB, VGA_MMIO_SIZE / KiB); /* 0xc0000 - 0xfffff: Option ROM */ reserved_ram_resource_kb(dev, idx++, 0xc0000 / KiB, 0x40000 / KiB); diff --git a/src/soc/amd/picasso/root_complex.c b/src/soc/amd/picasso/root_complex.c index 7a83197f51..e61208ff22 100644 --- a/src/soc/amd/picasso/root_complex.c +++ b/src/soc/amd/picasso/root_complex.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include @@ -121,7 +122,7 @@ static void read_resources(struct device *dev) ram_resource_kb(dev, idx++, 0, 0xa0000 / KiB); /* 0xa0000 - 0xbffff: legacy VGA */ - mmio_resource_kb(dev, idx++, 0xa0000 / KiB, 0x20000 / KiB); + mmio_resource_kb(dev, idx++, VGA_MMIO_BASE / KiB, VGA_MMIO_SIZE / KiB); /* 0xc0000 - 0xfffff: Option ROM */ reserved_ram_resource_kb(dev, idx++, 0xc0000 / KiB, 0x40000 / KiB); -- cgit v1.2.3