diff options
author | Hung-Te Lin <hungte@chromium.org> | 2019-10-15 17:49:24 +0800 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2019-10-18 12:20:30 +0000 |
commit | beeab4e6f3e5854409b48b518f074448a66ca262 (patch) | |
tree | 7955d04074e2676ac4aa543b1b66ae6bed9950ee /src/soc/mediatek | |
parent | 9ff4029db9b1053b44e4fc487243017a099a49c5 (diff) |
soc/mediatek/mt8183: Share console for calibration blob output
Most coreboot debug messages are sent to UART and cbmem console, and we
also want to collect DRAM calibration module output, especially for
cbmem console (so we can see the logs after kernel is up).
Instead of sharing whole cbmem/cbtable/cbmemconsole implementations, we
want to simplify that by a simple function pointer so output can be
preserved by do_putchar, which internally sends data to all registered
consoles (usually cbmem console and UART).
BUG=b:139099592
TEST=make; boots properly for full-k, with and without serial console.
BRANCH=kukui
Change-Id: I1cf16711caf3831e99e17b522b86694524425116
Signed-off-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/36056
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc/mediatek')
-rw-r--r-- | src/soc/mediatek/mt8183/include/soc/dramc_param.h | 1 | ||||
-rw-r--r-- | src/soc/mediatek/mt8183/memory.c | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/src/soc/mediatek/mt8183/include/soc/dramc_param.h b/src/soc/mediatek/mt8183/include/soc/dramc_param.h index c2df459c6f..564b43df9d 100644 --- a/src/soc/mediatek/mt8183/include/soc/dramc_param.h +++ b/src/soc/mediatek/mt8183/include/soc/dramc_param.h @@ -61,6 +61,7 @@ struct dramc_param_header { struct dramc_param { struct dramc_param_header header; + void (*do_putc)(unsigned char c); struct sdram_params freq_params[DRAM_DFS_SHUFFLE_MAX]; }; diff --git a/src/soc/mediatek/mt8183/memory.c b/src/soc/mediatek/mt8183/memory.c index e48c56437c..b657708193 100644 --- a/src/soc/mediatek/mt8183/memory.c +++ b/src/soc/mediatek/mt8183/memory.c @@ -120,6 +120,7 @@ static int dram_run_full_calibration(struct dramc_param *dparam, u16 config) if (cbfs_prog_stage_load(&dram)) return -2; + dparam->do_putc = do_putchar; prog_set_entry(&dram, prog_entry(&dram), dparam); prog_run(&dram); |