Only display write speed if write test actually performed.

This commit is contained in:
Stephane Gourichon 2020-10-05 18:40:24 +02:00
parent 5b0ced00b5
commit cbbbb3f468
1 changed files with 1 additions and 1 deletions

View File

@ -203,8 +203,8 @@ void memspeed(unsigned int *addr, unsigned long size, bool read_only)
timer0_update_value_write(1); timer0_update_value_write(1);
end = timer0_value_read(); end = timer0_value_read();
write_speed = (size*(CONFIG_CLOCK_FREQUENCY/1000000))/(start - end); write_speed = (size*(CONFIG_CLOCK_FREQUENCY/1000000))/(start - end);
}
printf(" Write: %ldMiB/s\n", write_speed); printf(" Write: %ldMiB/s\n", write_speed);
}
/* flush CPU and L2 caches */ /* flush CPU and L2 caches */
flush_cpu_dcache(); flush_cpu_dcache();