coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
sdram.h File Reference
#include <types.h>
Include dependency graph for sdram.h:

Go to the source code of this file.

Data Structures

struct  rk3399_ddr_pctl_regs
 
struct  rk3399_ddr_publ_regs
 
struct  rk3399_ddr_pi_regs
 
union  noc_ddrtiminga0
 
union  noc_ddrtimingb0
 
union  noc_ddrtimingc0
 
union  noc_devtodev0
 
union  noc_ddrmode
 
struct  rk3399_msch_regs
 
struct  rk3399_msch_timings
 
struct  rk3399_ddr_cic_regs
 
struct  rk3399_sdram_channel
 
struct  rk3399_sdram_params
 

Macros

#define START   (1)
 
#define PWRUP_SREFRESH_EXIT   (1 << 16)
 
#define MEM_RST_VALID   (1)
 
#define PI_CA_TRAINING   (1 << 0)
 
#define PI_WRITE_LEVELING   (1 << 1)
 
#define PI_READ_GATE_TRAINING   (1 << 2)
 
#define PI_READ_LEVELING   (1 << 3)
 
#define PI_WDQ_LEVELING   (1 << 4)
 
#define PI_FULL_TRAINING   (0xff)
 

Enumerations

enum  {
  DDR3 = 3 , LPDDR2 = 5 , LPDDR3 = 6 , LPDDR4 = 7 ,
  UNUSED = 0xFF
}
 

Functions

void sdram_init (const struct rk3399_sdram_params *sdram_params)
 
u32 sdram_get_ram_code (void)
 
const struct rk3399_sdram_paramsget_sdram_config (void)
 
size_t sdram_size_mb (void)
 

Macro Definition Documentation

◆ MEM_RST_VALID

#define MEM_RST_VALID   (1)

Definition at line 136 of file sdram.h.

◆ PI_CA_TRAINING

#define PI_CA_TRAINING   (1 << 0)

Definition at line 175 of file sdram.h.

◆ PI_FULL_TRAINING

#define PI_FULL_TRAINING   (0xff)

Definition at line 180 of file sdram.h.

◆ PI_READ_GATE_TRAINING

#define PI_READ_GATE_TRAINING   (1 << 2)

Definition at line 177 of file sdram.h.

◆ PI_READ_LEVELING

#define PI_READ_LEVELING   (1 << 3)

Definition at line 178 of file sdram.h.

◆ PI_WDQ_LEVELING

#define PI_WDQ_LEVELING   (1 << 4)

Definition at line 179 of file sdram.h.

◆ PI_WRITE_LEVELING

#define PI_WRITE_LEVELING   (1 << 1)

Definition at line 176 of file sdram.h.

◆ PWRUP_SREFRESH_EXIT

#define PWRUP_SREFRESH_EXIT   (1 << 16)

Definition at line 133 of file sdram.h.

◆ START

#define START   (1)

Definition at line 130 of file sdram.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
DDR3 
LPDDR2 
LPDDR3 
LPDDR4 
UNUSED 

Definition at line 8 of file sdram.h.

Function Documentation

◆ get_sdram_config()

const struct rk3399_sdram_params* get_sdram_config ( void  )

◆ sdram_get_ram_code()

u32 sdram_get_ram_code ( void  )

Definition at line 601 of file sdram.c.

References misc, apbmisc::pp_strapping_opt_a, PP_STRAPPING_OPT_A_RAM_CODE_MASK, PP_STRAPPING_OPT_A_RAM_CODE_SHIFT, read32(), and TEGRA_APB_MISC_BASE.

Here is the call graph for this function:

◆ sdram_init()

◆ sdram_size_mb()

size_t sdram_size_mb ( void  )

Definition at line 24 of file sdram.c.