aboutsummaryrefslogtreecommitdiff
path: root/src/soc/intel/fsp_baytrail/fsp/chipset_fsp_util.h
diff options
context:
space:
mode:
authorMartin Roth <martin.roth@se-eng.com>2014-12-02 10:49:21 -0700
committerMartin Roth <gaumless@gmail.com>2014-12-05 16:21:48 +0100
commit5c8e7a4075a3f9f86414ea78ee790e04920e332b (patch)
tree0b9a3fb236825f18b93dc3314ba1d3ce5e1a474d /src/soc/intel/fsp_baytrail/fsp/chipset_fsp_util.h
parent8d936ce8538d814c5981d3ac5677b53fc1b90272 (diff)
fsp_baytrail: update to add the UPD_MEMDOWN_CHECK macro
- Update chipset_fsp_util.h to add the UPD_MEMDOWN_CHECK pointing into the PcdMemoryParameters structure. This is baytrail FSP specific, so it's put into the chipset code instead of the 'driver' code. Since some of the values need to be decremented and some do not, a second parameter was added to control this. This macro also does not print out the values as they are printed out separately if memory down is enabled. - Update chipset_fsp_util.c to use the UPD_MEMDOWN_CHECK macro. This makes the code more standardized and easier to read. Change-Id: I233e45db43af4726cab41f4880f1706cf8abb0b7 Signed-off-by: Martin Roth <martin.roth@se-eng.com> Reviewed-on: http://review.coreboot.org/7632 Tested-by: build bot (Jenkins) Reviewed-by: Marc Jones <marc.jones@se-eng.com>
Diffstat (limited to 'src/soc/intel/fsp_baytrail/fsp/chipset_fsp_util.h')
-rw-r--r--src/soc/intel/fsp_baytrail/fsp/chipset_fsp_util.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/soc/intel/fsp_baytrail/fsp/chipset_fsp_util.h b/src/soc/intel/fsp_baytrail/fsp/chipset_fsp_util.h
index 6df14845d8..1f4fa743b4 100644
--- a/src/soc/intel/fsp_baytrail/fsp/chipset_fsp_util.h
+++ b/src/soc/intel/fsp_baytrail/fsp/chipset_fsp_util.h
@@ -50,4 +50,12 @@
/* Revision of the FSP binary */
#define FSP_GOLD3_REV_ID 0x00000303
+#define NO_DECREMENT_FOR_DEFAULT 0
+#define DECREMENT_FOR_DEFAULT 1
+
+#define UPD_MEMDOWN_CHECK(member, adjust) \
+ if (config->member != UPD_DEFAULT) { \
+ UpdData->PcdMemoryParameters.member = config->member - adjust; \
+ }
+
#endif /* CHIPSET_FSP_UTIL_H */