summaryrefslogtreecommitdiff
path: root/src/soc
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
parent408d76f8673ec69ae8b48ad93e0889d46652c322 (diff)
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')
-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
-rw-r--r--src/soc/amd/stoneyridge/Kconfig2
-rw-r--r--src/soc/amd/stoneyridge/southbridge.c2
10 files changed, 26 insertions, 4 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
diff --git a/src/soc/amd/stoneyridge/Kconfig b/src/soc/amd/stoneyridge/Kconfig
index dd95b85677..8b9111e81e 100644
--- a/src/soc/amd/stoneyridge/Kconfig
+++ b/src/soc/amd/stoneyridge/Kconfig
@@ -46,8 +46,10 @@ config CPU_SPECIFIC_OPTIONS
select SOC_AMD_PI
select SOC_AMD_COMMON
select SOC_AMD_COMMON_BLOCK
+ select SOC_AMD_COMMON_BLOCK_PCI
select SOC_AMD_COMMON_BLOCK_PSP
select SOC_AMD_COMMON_BLOCK_CAR
+ select SOC_AMD_COMMON_BLOCK_S3
select C_ENVIRONMENT_BOOTBLOCK
select BOOTBLOCK_CONSOLE
select BOOT_DEVICE_SUPPORTS_WRITES if BOOT_DEVICE_SPI_FLASH
diff --git a/src/soc/amd/stoneyridge/southbridge.c b/src/soc/amd/stoneyridge/southbridge.c
index f8e06b3c5e..ed1d10a591 100644
--- a/src/soc/amd/stoneyridge/southbridge.c
+++ b/src/soc/amd/stoneyridge/southbridge.c
@@ -24,7 +24,7 @@
#include <device/pci_ids.h>
#include <device/pci_ops.h>
#include <cbmem.h>
-#include <amd_pci_util.h>
+#include <amdblocks/amd_pci_util.h>
#include <soc/southbridge.h>
#include <soc/smi.h>
#include <soc/amd_pci_int_defs.h>