diff options
author | Elyes HAOUAS <ehaouas@noos.fr> | 2020-08-11 09:39:43 +0200 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2020-08-17 07:00:37 +0000 |
commit | a4dd33cc8b52f686908590bb41b1c69a9b6c5db5 (patch) | |
tree | 95cf94c3ff438647096ff3300f0972b2f5b797e3 /src/drivers/aspeed/common/ast_main.c | |
parent | a3022056a2d16b92cc0cdf5eafa4e6369c09e716 (diff) | |
download | coreboot-a4dd33cc8b52f686908590bb41b1c69a9b6c5db5.tar.xz |
src: Use PCI_BASE_ADDRESS_* macros instead of magic numbers
Change-Id: Id3390c5ac6a9517ffc2d202f41802e6f4d2e314c
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44371
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/drivers/aspeed/common/ast_main.c')
-rw-r--r-- | src/drivers/aspeed/common/ast_main.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/drivers/aspeed/common/ast_main.c b/src/drivers/aspeed/common/ast_main.c index 5143e6d0eb..8ed1eaa803 100644 --- a/src/drivers/aspeed/common/ast_main.c +++ b/src/drivers/aspeed/common/ast_main.c @@ -4,6 +4,7 @@ */ #include <delay.h> +#include <device/pci_def.h> #include "ast_drv.h" #include "ast_dram_tables.h" @@ -329,7 +330,7 @@ int ast_driver_load(struct drm_device *dev, unsigned long flags) ast->dev = dev; /* PCI BAR 1 */ - res = find_resource(dev->pdev, 0x14); + res = find_resource(dev->pdev, PCI_BASE_ADDRESS_1); if (!res) { dev_err(dev->pdev, "BAR1 resource not found.\n"); ret = -EIO; @@ -343,7 +344,7 @@ int ast_driver_load(struct drm_device *dev, unsigned long flags) /* PCI BAR 2 */ ast->io_space_uses_mmap = false; - res = find_resource(dev->pdev, 0x18); + res = find_resource(dev->pdev, PCI_BASE_ADDRESS_2); if (!res) { dev_err(dev->pdev, "BAR2 resource not found.\n"); ret = -EIO; |