summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/soc/amd/common/block/include/amdblocks/psp_efs.h3
-rw-r--r--src/soc/amd/common/block/psp/psp_efs.c7
2 files changed, 7 insertions, 3 deletions
diff --git a/src/soc/amd/common/block/include/amdblocks/psp_efs.h b/src/soc/amd/common/block/include/amdblocks/psp_efs.h
index 1f93807538..51b06a6810 100644
--- a/src/soc/amd/common/block/include/amdblocks/psp_efs.h
+++ b/src/soc/amd/common/block/include/amdblocks/psp_efs.h
@@ -19,11 +19,8 @@
#elif CONFIG(SOC_AMD_CEZANNE) | CONFIG(SOC_AMD_MENDOCINO)
#define SPI_MODE_FIELD spi_readmode_f17_mod_30_3f
#define SPI_SPEED_FIELD spi_fastspeed_f17_mod_30_3f
-#else
- #error <Error: Unknown Processor>
#endif
-
struct second_gen_efs { /* todo: expand for Server products */
uint32_t gen:1; /* Client products only use bit 0 */
uint32_t reserved:31;
diff --git a/src/soc/amd/common/block/psp/psp_efs.c b/src/soc/amd/common/block/psp/psp_efs.c
index feb0276463..eacd5f637c 100644
--- a/src/soc/amd/common/block/psp/psp_efs.c
+++ b/src/soc/amd/common/block/psp/psp_efs.c
@@ -2,6 +2,7 @@
#include <amdblocks/psp_efs.h>
#include <arch/mmio.h>
+#include <assert.h>
#include <boot_device.h>
#include <commonlib/region.h>
#include <types.h>
@@ -24,7 +25,13 @@ bool read_efs_spi_settings(uint8_t *mode, uint8_t *speed)
if (!efs_is_valid())
return false;
+#ifndef SPI_MODE_FIELD
+ printk(BIOS_ERR, "Unknown cpu in psp_efs.h\n");
+ printk(BIOS_ERR, "SPI speed/mode not set.\n");
+ return false;
+#else
*mode = efs->SPI_MODE_FIELD;
*speed = efs->SPI_SPEED_FIELD;
return true;
+#endif
}