aboutsummaryrefslogtreecommitdiff
path: root/src/northbridge/amd/amdfam10/amdfam10.h
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2019-01-03 11:39:15 +0200
committerKyösti Mälkki <kyosti.malkki@gmail.com>2019-01-10 13:40:57 +0000
commitef62994b946b88fb30b22ab112a7f855c2f6e157 (patch)
treee8b5f0934f3e375ad90c2d127f548f6444353bbf /src/northbridge/amd/amdfam10/amdfam10.h
parent20c294884f3a87ca69c09d187cace3d426910320 (diff)
northbridge/amdfam10: Deal with PCI_ADDR() better
PCI_ADDR() is tightly coupled with different setup_resource_map() variants so move the declaration away from global namespace. In the implementation of setup_resource_map() use the bottom 12 bits as the register mask like the other variants do already. Change-Id: Iadedfe993621a4458ce8f12c5e98c8cee537d2db Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/c/30784 Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/northbridge/amd/amdfam10/amdfam10.h')
-rw-r--r--src/northbridge/amd/amdfam10/amdfam10.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/northbridge/amd/amdfam10/amdfam10.h b/src/northbridge/amd/amdfam10/amdfam10.h
index e1c88c9140..c912f18bad 100644
--- a/src/northbridge/amd/amdfam10/amdfam10.h
+++ b/src/northbridge/amd/amdfam10/amdfam10.h
@@ -29,6 +29,12 @@ struct MCTStatStruc;
/* Definitions for setup_resourcemap() variants. */
+#define PCI_ADDR(SEGBUS, DEV, FN, WHERE) ( \
+ (((SEGBUS) & 0xFFF) << 20) | \
+ (((DEV) & 0x1F) << 15) | \
+ (((FN) & 0x07) << 12) | \
+ ((WHERE) & 0xFFF))
+
#define ADDRMAP_REG(r) PCI_ADDR(CONFIG_CBB, CONFIG_CDB, 1, r)
#define RES_PCI_IO 0x10