drivers: ram: sdram_common: add 4rank support for sdram_cap_info
Signed-off-by: Tang Yun ping <typ@rock-chips.com> Change-Id: Icda7bdc73e6c36c1351f0671b374a9d906dafec8
This commit is contained in:
parent
b1c0e43cef
commit
1a6462e18b
|
|
@ -231,10 +231,8 @@ struct sdram_cap_info {
|
||||||
unsigned int row_3_4;
|
unsigned int row_3_4;
|
||||||
unsigned int cs0_row;
|
unsigned int cs0_row;
|
||||||
unsigned int cs1_row;
|
unsigned int cs1_row;
|
||||||
#ifdef CONFIG_ROCKCHIP_RK3568
|
|
||||||
unsigned int cs2_row;
|
unsigned int cs2_row;
|
||||||
unsigned int cs3_row;
|
unsigned int cs3_row;
|
||||||
#endif
|
|
||||||
unsigned int cs0_high16bit_row;
|
unsigned int cs0_high16bit_row;
|
||||||
unsigned int cs1_high16bit_row;
|
unsigned int cs1_high16bit_row;
|
||||||
unsigned int ddrconfig;
|
unsigned int ddrconfig;
|
||||||
|
|
|
||||||
|
|
@ -77,14 +77,12 @@ void sdram_print_ddr_info(struct sdram_cap_info *cap_info,
|
||||||
printdec(cap_info->cs1_high16bit_row);
|
printdec(cap_info->cs1_high16bit_row);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#ifdef CONFIG_ROCKCHIP_RK3568
|
|
||||||
if (cap_info->rank > 2) {
|
if (cap_info->rank > 2) {
|
||||||
printascii(" CS2 Row=");
|
printascii(" CS2 Row=");
|
||||||
printdec(cap_info->cs2_row);
|
printdec(cap_info->cs2_row);
|
||||||
printascii(" CS3 Row=");
|
printascii(" CS3 Row=");
|
||||||
printdec(cap_info->cs3_row);
|
printdec(cap_info->cs3_row);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
printascii(" CS=");
|
printascii(" CS=");
|
||||||
printdec(cap_info->rank);
|
printdec(cap_info->rank);
|
||||||
printascii(" Die BW=");
|
printascii(" Die BW=");
|
||||||
|
|
@ -127,7 +125,7 @@ u64 sdram_get_cs_cap(struct sdram_cap_info *cap_info, u32 cs, u32 dram_type)
|
||||||
bg + cap_info->bk + cap_info->cs1_row);
|
bg + cap_info->bk + cap_info->cs1_row);
|
||||||
else
|
else
|
||||||
cap[1] = 0;
|
cap[1] = 0;
|
||||||
#ifdef CONFIG_ROCKCHIP_RK3568
|
|
||||||
if (cap_info->rank == 4) {
|
if (cap_info->rank == 4) {
|
||||||
cap[2] = 1llu << (cap_info->bw + cap_info->col +
|
cap[2] = 1llu << (cap_info->bw + cap_info->col +
|
||||||
bg + cap_info->bk + cap_info->cs2_row);
|
bg + cap_info->bk + cap_info->cs2_row);
|
||||||
|
|
@ -137,10 +135,6 @@ u64 sdram_get_cs_cap(struct sdram_cap_info *cap_info, u32 cs, u32 dram_type)
|
||||||
cap[2] = 0;
|
cap[2] = 0;
|
||||||
cap[3] = 0;
|
cap[3] = 0;
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
cap[2] = 0;
|
|
||||||
cap[3] = 0;
|
|
||||||
#endif
|
|
||||||
if (cs == 0)
|
if (cs == 0)
|
||||||
return cap[0];
|
return cap[0];
|
||||||
else if (cs == 1)
|
else if (cs == 1)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue