6 #include <fsp/soc_binding.h>
8 #define K4E6E304EB_MEM_ID 0x5
10 #define MEM_SINGLE_CHAN0 0x0
11 #define MEM_SINGLE_CHAN3 0x3
12 #define MEM_SINGLE_CHAN4 0x4
13 #define MEM_SINGLE_CHAN7 0x7
14 #define MEM_SINGLE_CHANB 0xb
15 #define MEM_SINGLE_CHANC 0xc
20 mem_cfg = &mupd->FspmConfig;
24 { 0x0F, 0xF0, 0x00, 0xF0, 0x0F, 0xF0,
25 0x0F, 0x00, 0xFF, 0x00, 0xFF, 0x00 },
26 { 0x0F, 0xF0, 0x00, 0xF0, 0x0F, 0xF0,
27 0x0F, 0x00, 0xFF, 0x00, 0xFF, 0x00 } };
30 { 0, 1, 3, 2, 6, 5, 4, 7 },
31 { 2, 3, 0, 1, 6, 7, 4, 5 } };
34 const u16 RcompResistor[3] = { 200, 81, 162 };
37 const u16 RcompTarget[5] = { 100, 40, 40, 23, 40 };
40 const u16 StrengthendRcompTarget[5] = { 100, 40, 40, 21, 40 };
43 const u16 *targeted_rcomp = RcompTarget;
47 targeted_rcomp = StrengthendRcompTarget;
49 memcpy(mem_cfg->DqByteMapCh0,
dq_map[0],
sizeof(mem_cfg->DqByteMapCh0));
50 memcpy(mem_cfg->DqByteMapCh1,
dq_map[1],
sizeof(mem_cfg->DqByteMapCh1));
51 memcpy(mem_cfg->DqsMapCpu2DramCh0,
dqs_map[0],
sizeof(mem_cfg->DqsMapCpu2DramCh0));
52 memcpy(mem_cfg->DqsMapCpu2DramCh1,
dqs_map[1],
sizeof(mem_cfg->DqsMapCpu2DramCh1));
53 memcpy(mem_cfg->RcompResistor, RcompResistor,
sizeof(mem_cfg->RcompResistor));
54 memcpy(mem_cfg->RcompTarget, RcompTarget,
sizeof(mem_cfg->RcompTarget));
void * memcpy(void *dest, const void *src, size_t n)
void variant_memory_init_params(FSPM_UPD *mupd, const int spd_index)
int is_dual_channel(const int spd_index)
#define K4E6E304EB_MEM_ID
static const int spd_index[32]
static const u8 dqs_map[][8]
static const u8 dq_map[][12]