coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
memory.c
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-only */
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 
13 {
14  int i = 0;
15 
16  /* init mempll */
18 
19  /* memory calibration */
21 
22  if (CONFIG(MEMORY_TEST)) {
23  /*
24  * do memory test:
25  * set memory scan range 0x2000
26  * larger test length, longer system boot up time
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 }
#define ASSERT(x)
Definition: assert.h:44
void mt_set_emi(struct dramc_param *dparam)
Definition: emi.c:34
int complex_mem_test(u8 *start, unsigned int len)
Definition: memory_test.c:25
#define printk(level,...)
Definition: stdlib.h:16
@ CONFIG
Definition: dsi_common.h:201
u8 _dram[]
#define BIOS_DEBUG
BIOS_DEBUG - Verbose output.
Definition: loglevel.h:128
void mem_pll_init(const struct mt8173_sdram_params *sdram_params)
void mt_mem_init(struct dramc_param *dparam)
Definition: memory.c:304
Defines the SDRAM parameter structure.
Definition: emi.h:15