summaryrefslogtreecommitdiff
path: root/src/soc/amd/common
diff options
context:
space:
mode:
authorRichard Spiegel <richard.spiegel@silverbackltd.com>2017-12-06 16:14:58 -0700
committerMartin Roth <martinroth@google.com>2017-12-11 20:26:26 +0000
commit2bbc3dc28d94fc437e3d3c1d613f47143b0d1280 (patch)
treeb2c9696718f0728f6fba3dc09b264ccb15a44363 /src/soc/amd/common
parent408d76f8673ec69ae8b48ad93e0889d46652c322 (diff)
downloadcoreboot-2bbc3dc28d94fc437e3d3c1d613f47143b0d1280.tar.xz
soc/amd/common: Move files to common/block
The following files need to be moved: amd_pci_util.c, amd_pci_util.h and spi.c. The remaining files are AGESA related and will be part of a separate issue/commit. BUG=b:62240201 TEST=Build with no error gardenia and kahlee (no code change, just folder reorg). Change-Id: I3f965afa21124d4874d3b7bfe0f404a58b070e23 Signed-off-by: Richard Spiegel <richard.spiegel@silverbackltd.com> Reviewed-on: https://review.coreboot.org/22765 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin Roth <martinroth@google.com>
Diffstat (limited to 'src/soc/amd/common')
-rw-r--r--src/soc/amd/common/Makefile.inc3
-rw-r--r--src/soc/amd/common/block/include/amdblocks/amd_pci_util.h (renamed from src/soc/amd/common/amd_pci_util.h)0
-rw-r--r--src/soc/amd/common/block/pci/Kconfig6
-rw-r--r--src/soc/amd/common/block/pci/Makefile.inc5
-rw-r--r--src/soc/amd/common/block/pci/amd_pci_util.c (renamed from src/soc/amd/common/amd_pci_util.c)2
-rw-r--r--src/soc/amd/common/block/s3/Kconfig5
-rw-r--r--src/soc/amd/common/block/s3/Makefile.inc5
-rw-r--r--src/soc/amd/common/block/s3/spi.c (renamed from src/soc/amd/common/spi.c)0
8 files changed, 23 insertions, 3 deletions
diff --git a/src/soc/amd/common/Makefile.inc b/src/soc/amd/common/Makefile.inc
index 22eb0d6f74..b485bb3479 100644
--- a/src/soc/amd/common/Makefile.inc
+++ b/src/soc/amd/common/Makefile.inc
@@ -12,10 +12,9 @@ romstage-y += heapmanager.c
ramstage-y += agesawrapper.c
ramstage-y += amd_late_init.c
-ramstage-y += amd_pci_util.c
ramstage-y += def_callouts.c
ramstage-y += heapmanager.c
-ramstage-$(CONFIG_SPI_FLASH) += spi.c
+
subdirs-$(CONFIG_SOC_AMD_COMMON_BLOCK) += block
endif
diff --git a/src/soc/amd/common/amd_pci_util.h b/src/soc/amd/common/block/include/amdblocks/amd_pci_util.h
index 92d27dcca7..92d27dcca7 100644
--- a/src/soc/amd/common/amd_pci_util.h
+++ b/src/soc/amd/common/block/include/amdblocks/amd_pci_util.h
diff --git a/src/soc/amd/common/block/pci/Kconfig b/src/soc/amd/common/block/pci/Kconfig
new file mode 100644
index 0000000000..74ea69784d
--- /dev/null
+++ b/src/soc/amd/common/block/pci/Kconfig
@@ -0,0 +1,6 @@
+config SOC_AMD_COMMON_BLOCK_PCI
+ bool
+ default n
+ help
+ This option builds functions used to program PCI interrupt
+ routing, both PIC and APIC modes.
diff --git a/src/soc/amd/common/block/pci/Makefile.inc b/src/soc/amd/common/block/pci/Makefile.inc
new file mode 100644
index 0000000000..fc40c9d478
--- /dev/null
+++ b/src/soc/amd/common/block/pci/Makefile.inc
@@ -0,0 +1,5 @@
+ifeq ($(CONFIG_SOC_AMD_COMMON_BLOCK_PCI),y)
+
+ramstage-y += amd_pci_util.c
+
+endif
diff --git a/src/soc/amd/common/amd_pci_util.c b/src/soc/amd/common/block/pci/amd_pci_util.c
index ca022fbdbb..d30adf4134 100644
--- a/src/soc/amd/common/amd_pci_util.c
+++ b/src/soc/amd/common/block/pci/amd_pci_util.c
@@ -18,7 +18,7 @@
#include <device/pci.h>
#include <arch/io.h>
#include <string.h>
-#include <amd_pci_util.h>
+#include <amdblocks/amd_pci_util.h>
#include <pc80/i8259.h>
#include <soc/amd_pci_int_defs.h>
diff --git a/src/soc/amd/common/block/s3/Kconfig b/src/soc/amd/common/block/s3/Kconfig
new file mode 100644
index 0000000000..85863ca42f
--- /dev/null
+++ b/src/soc/amd/common/block/s3/Kconfig
@@ -0,0 +1,5 @@
+config SOC_AMD_COMMON_BLOCK_S3
+ bool
+ default n
+ help
+ Select this option to add S3 related functions to the build.
diff --git a/src/soc/amd/common/block/s3/Makefile.inc b/src/soc/amd/common/block/s3/Makefile.inc
new file mode 100644
index 0000000000..f19cb2e3b4
--- /dev/null
+++ b/src/soc/amd/common/block/s3/Makefile.inc
@@ -0,0 +1,5 @@
+ifeq ($(CONFIG_SOC_AMD_COMMON_BLOCK_S3),y)
+
+ramstage-$(CONFIG_HAVE_ACPI_RESUME) += spi.c
+
+endif
diff --git a/src/soc/amd/common/spi.c b/src/soc/amd/common/block/s3/spi.c
index f72416ad97..f72416ad97 100644
--- a/src/soc/amd/common/spi.c
+++ b/src/soc/amd/common/block/s3/spi.c