Felix Held has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/47515 )
Change subject: soc/amd: factor out _SOC_DEV macro into common block ......................................................................
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 --- A src/soc/amd/common/block/include/amdblocks/pci_devs.h M src/soc/amd/picasso/include/soc/pci_devs.h M src/soc/amd/stoneyridge/include/soc/pci_devs.h 3 files changed, 17 insertions(+), 14 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/15/47515/1
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 0000000..8a38ac1 --- /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__ */ diff --git a/src/soc/amd/picasso/include/soc/pci_devs.h b/src/soc/amd/picasso/include/soc/pci_devs.h index 27334f1..83c0bcc 100644 --- a/src/soc/amd/picasso/include/soc/pci_devs.h +++ b/src/soc/amd/picasso/include/soc/pci_devs.h @@ -4,13 +4,7 @@ #define __PI_PICASSO_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 +#include <amdblocks/pci_devs.h>
/* GNB Root Complex */ #define GNB_DEV 0x0 diff --git a/src/soc/amd/stoneyridge/include/soc/pci_devs.h b/src/soc/amd/stoneyridge/include/soc/pci_devs.h index 316f532..03a1233 100644 --- a/src/soc/amd/stoneyridge/include/soc/pci_devs.h +++ b/src/soc/amd/stoneyridge/include/soc/pci_devs.h @@ -4,13 +4,7 @@ #define __PI_STONEYRIDGE_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 +#include <amdblocks/pci_devs.h>
/* GNB Root Complex */ #define GNB_DEV 0x0
Jeremy Soller has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47515 )
Change subject: soc/amd: factor out _SOC_DEV macro into common block ......................................................................
Patch Set 1: Code-Review+1
Pretty simple and clear, looks good to me
Martin Roth has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47515 )
Change subject: soc/amd: factor out _SOC_DEV macro into common block ......................................................................
Patch Set 1: Code-Review+2
(1 comment)
https://review.coreboot.org/c/coreboot/+/47515/1/src/soc/amd/common/block/in... File src/soc/amd/common/block/include/amdblocks/pci_devs.h:
https://review.coreboot.org/c/coreboot/+/47515/1/src/soc/amd/common/block/in... PS1, Line 8: !defined Nit: I know you're just moving the code, but maybe consider doing a positive test and reversing the order?
Jason Glenesk has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47515 )
Change subject: soc/amd: factor out _SOC_DEV macro into common block ......................................................................
Patch Set 1: Code-Review+1
Marshall Dawson has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47515 )
Change subject: soc/amd: factor out _SOC_DEV macro into common block ......................................................................
Patch Set 1: Code-Review+2
Felix Held has submitted this change. ( https://review.coreboot.org/c/coreboot/+/47515 )
Change subject: soc/amd: factor out _SOC_DEV macro into common block ......................................................................
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 --- A src/soc/amd/common/block/include/amdblocks/pci_devs.h M src/soc/amd/picasso/include/soc/pci_devs.h M src/soc/amd/stoneyridge/include/soc/pci_devs.h 3 files changed, 17 insertions(+), 14 deletions(-)
Approvals: build bot (Jenkins): Verified Martin Roth: Looks good to me, approved Marshall Dawson: Looks good to me, approved Jeremy Soller: Looks good to me, but someone else must approve Jason Glenesk: Looks good to me, but someone else must approve
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 0000000..8a38ac1 --- /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__ */ diff --git a/src/soc/amd/picasso/include/soc/pci_devs.h b/src/soc/amd/picasso/include/soc/pci_devs.h index 27334f1..83c0bcc 100644 --- a/src/soc/amd/picasso/include/soc/pci_devs.h +++ b/src/soc/amd/picasso/include/soc/pci_devs.h @@ -4,13 +4,7 @@ #define __PI_PICASSO_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 +#include <amdblocks/pci_devs.h>
/* GNB Root Complex */ #define GNB_DEV 0x0 diff --git a/src/soc/amd/stoneyridge/include/soc/pci_devs.h b/src/soc/amd/stoneyridge/include/soc/pci_devs.h index 316f532..03a1233 100644 --- a/src/soc/amd/stoneyridge/include/soc/pci_devs.h +++ b/src/soc/amd/stoneyridge/include/soc/pci_devs.h @@ -4,13 +4,7 @@ #define __PI_STONEYRIDGE_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 +#include <amdblocks/pci_devs.h>
/* GNB Root Complex */ #define GNB_DEV 0x0