summaryrefslogtreecommitdiff
path: root/src/soc/amd/common/block
diff options
context:
space:
mode:
authorFelix Held <felix-coreboot@felixheld.de>2020-11-12 14:48:54 +0100
committerFelix Held <felix-coreboot@felixheld.de>2020-11-13 14:42:49 +0000
commit16433c9c9295e90a3e18c75e42bdb80a059df3b3 (patch)
tree48d4ba2e7e51b1b1c362f274dda350a3db017767 /src/soc/amd/common/block
parenta262fc6b0761350066a5b2b086ce67447ac40a20 (diff)
soc/amd: factor out _SOC_DEV macro into common block
TEST=Timeless build doesn't change for Mandolin and Gardenia. Change-Id: I1aef68459569536207697bfca407145a7b5334f4 Signed-off-by: Felix Held <felix-coreboot@felixheld.de> Reviewed-on: https://review.coreboot.org/c/coreboot/+/47515 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Jeremy Soller <jeremy@system76.com> Reviewed-by: Martin Roth <martinroth@google.com> Reviewed-by: Jason Glenesk <jason.glenesk@gmail.com> Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Diffstat (limited to 'src/soc/amd/common/block')
-rw-r--r--src/soc/amd/common/block/include/amdblocks/pci_devs.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/soc/amd/common/block/include/amdblocks/pci_devs.h b/src/soc/amd/common/block/include/amdblocks/pci_devs.h
new file mode 100644
index 0000000000..8a38ac15d7
--- /dev/null
+++ b/src/soc/amd/common/block/include/amdblocks/pci_devs.h
@@ -0,0 +1,15 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+
+#ifndef __AMD_BLOCK_PCI_DEVS_H__
+#define __AMD_BLOCK_PCI_DEVS_H__
+
+#include <device/pci_def.h>
+
+#if !defined(__SIMPLE_DEVICE__)
+#include <device/device.h>
+#define _SOC_DEV(slot, func) pcidev_on_root(slot, func)
+#else
+#define _SOC_DEV(slot, func) PCI_DEV(0, slot, func)
+#endif
+
+#endif /* __AMD_BLOCK_PCI_DEVS_H__ */