| 1 |
|
| 2 |
|
| 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> |
| 11 |
|
| 12 |
void mt_mem_init(const struct mt8173_sdram_params *sdram_params) |
| 13 |
{ |
| 14 |
int i = 0; |
| 15 |
|
| 16 |
|
| 17 |
mem_pll_init(sdram_params); |
| 18 |
|
| 19 |
|
| 20 |
mt_set_emi(sdram_params); |
| 21 |
|
| 22 |
if (CONFIG(MEMORY_TEST)) { |
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
i = complex_mem_test(_dram, 0x2000); |
| 29 |
|
| 30 |
printk(BIOS_DEBUG, "[MEM] complex R/W mem test %s : %d\n", |
| 31 |
(i == 0) ? "pass" : "fail", i); |
| 32 |
|
| 33 |
ASSERT(i == 0); |
| 34 |
} |
| 35 |
} |