diff options
author | Yu-Ping Wu <yupingso@chromium.org> | 2019-10-07 15:55:57 +0800 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2019-10-17 15:03:03 +0000 |
commit | ffb5ea3dc4b1189f39bdd4a2e288f0b973e759c1 (patch) | |
tree | 41c8036f56d2841e963d2df594365188ab7f73ec /src/soc/mediatek/mt8183/include | |
parent | 7689a0f7921d49a8e8f68f7c054881b13a642450 (diff) | |
download | coreboot-ffb5ea3dc4b1189f39bdd4a2e288f0b973e759c1.tar.xz |
soc/mediatek/mt8183: Handle memory test failure
If DRAM calibration fails or mem test fails using the cached calibration
results stored in flash, rerun DRAM full calibration. If partial
calibration fails or the mem test following it fails, hang forever.
Partial calibration acts as a fallback approach in case of full
calibration failure. Therefore, if it fails, there would be no other
ways to initialize DRAM. Instead of falling into reboot loop and
draining out of battery, it is better to just hang so that the end user
may notice that and send to RMA.
BUG=b:80501386,b:139099592
BRANCH=kukui
TEST=Boots correctly on Kukui
Change-Id: I8e1d4f5bc7b45f45a8bfef74e86ec0ff6a556af4
Signed-off-by: Huayang Duan <huayang.duan@mediatek.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/35481
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc/mediatek/mt8183/include')
-rw-r--r-- | src/soc/mediatek/mt8183/include/soc/dramc_pi_api.h | 2 | ||||
-rw-r--r-- | src/soc/mediatek/mt8183/include/soc/emi.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/soc/mediatek/mt8183/include/soc/dramc_pi_api.h b/src/soc/mediatek/mt8183/include/soc/dramc_pi_api.h index 1ce5f67470..afd6718424 100644 --- a/src/soc/mediatek/mt8183/include/soc/dramc_pi_api.h +++ b/src/soc/mediatek/mt8183/include/soc/dramc_pi_api.h @@ -110,7 +110,7 @@ void dramc_sw_impedance_save_reg(u8 freq_group); void dramc_sw_impedance_cal(const struct sdram_params *params, u8 term_option); void dramc_apply_config_before_calibration(u8 freq_group); void dramc_apply_config_after_calibration(void); -void dramc_calibrate_all_channels(const struct sdram_params *pams, +int dramc_calibrate_all_channels(const struct sdram_params *pams, u8 freq_group); void dramc_hw_gating_onoff(u8 chn, bool onoff); void dramc_enable_phy_dcm(bool bEn); diff --git a/src/soc/mediatek/mt8183/include/soc/emi.h b/src/soc/mediatek/mt8183/include/soc/emi.h index 2821511014..1a364fb7a6 100644 --- a/src/soc/mediatek/mt8183/include/soc/emi.h +++ b/src/soc/mediatek/mt8183/include/soc/emi.h @@ -88,7 +88,7 @@ int complex_mem_test(u8 *start, unsigned int len); size_t sdram_size(void); const struct sdram_params *get_sdram_config(void); void enable_emi_dcm(void); -void mt_set_emi(const struct dramc_param *dparam); +int mt_set_emi(const struct dramc_param *dparam); void mt_mem_init(struct dramc_param_ops *dparam_ops); #endif /* SOC_MEDIATEK_MT8183_EMI_H */ |