drivers/mipi: Add support for KD_KD110N11_51IE panel
[coreboot2.git] / src / soc / mediatek / mt8173 / memory.c
blob9d4691c396cda5de2a8bfb78a68db931192aa6b6
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #include <assert.h>
4 #include <console/console.h>
5 #include <soc/addressmap.h>
6 #include <soc/dramc_register.h>
7 #include <soc/dramc_pi_api.h>
8 #include <soc/emi.h>
9 #include <soc/pll.h>
10 #include <symbols.h>
12 void mt_mem_init(const struct mt8173_sdram_params *sdram_params)
14 int i = 0;
16 /* init mempll */
17 mem_pll_init(sdram_params);
19 /* memory calibration */
20 mt_set_emi(sdram_params);
22 if (CONFIG(MEMORY_TEST)) {
24 * do memory test:
25 * set memory scan range 0x2000
26 * larger test length, longer system boot up time
28 i = complex_mem_test(_dram, 0x2000);
30 printk(BIOS_DEBUG, "[MEM] complex R/W mem test %s : %d\n",
31 (i == 0) ? "pass" : "fail", i);
33 ASSERT(i == 0);