bios/sdram: flush l2 cache only when present
This commit is contained in:
parent
2ad83778bf
commit
909cff1940
|
@ -551,7 +551,9 @@ static int memtest_bus(void)
|
||||||
array[i] = ONEZERO;
|
array[i] = ONEZERO;
|
||||||
}
|
}
|
||||||
flush_cpu_dcache();
|
flush_cpu_dcache();
|
||||||
|
#ifdef L2_SIZE
|
||||||
flush_l2_cache();
|
flush_l2_cache();
|
||||||
|
#endif
|
||||||
for(i=0;i<MEMTEST_BUS_SIZE/4;i++) {
|
for(i=0;i<MEMTEST_BUS_SIZE/4;i++) {
|
||||||
rdata = array[i];
|
rdata = array[i];
|
||||||
if(rdata != ONEZERO) {
|
if(rdata != ONEZERO) {
|
||||||
|
@ -566,7 +568,9 @@ static int memtest_bus(void)
|
||||||
array[i] = ZEROONE;
|
array[i] = ZEROONE;
|
||||||
}
|
}
|
||||||
flush_cpu_dcache();
|
flush_cpu_dcache();
|
||||||
|
#ifdef L2_SIZE
|
||||||
flush_l2_cache();
|
flush_l2_cache();
|
||||||
|
#endif
|
||||||
for(i=0;i<MEMTEST_BUS_SIZE/4;i++) {
|
for(i=0;i<MEMTEST_BUS_SIZE/4;i++) {
|
||||||
rdata = array[i];
|
rdata = array[i];
|
||||||
if(rdata != ZEROONE) {
|
if(rdata != ZEROONE) {
|
||||||
|
@ -604,7 +608,9 @@ static int memtest_data(void)
|
||||||
|
|
||||||
seed_32 = 0;
|
seed_32 = 0;
|
||||||
flush_cpu_dcache();
|
flush_cpu_dcache();
|
||||||
|
#ifdef L2_SIZE
|
||||||
flush_l2_cache();
|
flush_l2_cache();
|
||||||
|
#endif
|
||||||
for(i=0;i<MEMTEST_DATA_SIZE/4;i++) {
|
for(i=0;i<MEMTEST_DATA_SIZE/4;i++) {
|
||||||
seed_32 = seed_to_data_32(seed_32, MEMTEST_DATA_RANDOM);
|
seed_32 = seed_to_data_32(seed_32, MEMTEST_DATA_RANDOM);
|
||||||
rdata = array[i];
|
rdata = array[i];
|
||||||
|
@ -642,7 +648,9 @@ static int memtest_addr(void)
|
||||||
|
|
||||||
seed_16 = 0;
|
seed_16 = 0;
|
||||||
flush_cpu_dcache();
|
flush_cpu_dcache();
|
||||||
|
#ifdef L2_SIZE
|
||||||
flush_l2_cache();
|
flush_l2_cache();
|
||||||
|
#endif
|
||||||
for(i=0;i<MEMTEST_ADDR_SIZE/4;i++) {
|
for(i=0;i<MEMTEST_ADDR_SIZE/4;i++) {
|
||||||
seed_16 = seed_to_data_16(seed_16, MEMTEST_ADDR_RANDOM);
|
seed_16 = seed_to_data_16(seed_16, MEMTEST_ADDR_RANDOM);
|
||||||
rdata = array[(unsigned int) seed_16];
|
rdata = array[(unsigned int) seed_16];
|
||||||
|
|
Loading…
Reference in New Issue