1 /* SPDX-License-Identifier: GPL-2.0-only */
4 #include <console/console.h>
5 #include <soc/addressmap.h>
6 #include <soc/dramc_register.h>
7 #include <soc/dramc_pi_api.h>
12 void mt_mem_init(const struct mt8173_sdram_params
*sdram_params
)
17 mem_pll_init(sdram_params
);
19 /* memory calibration */
20 mt_set_emi(sdram_params
);
22 if (CONFIG(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
);