Add trace logging with size of block device

pull/10756/head
Marten Lootsma 2019-06-04 15:18:30 +02:00
parent 5484f585a6
commit ed36cc4e06
1 changed files with 2 additions and 0 deletions

View File

@ -210,6 +210,7 @@ int SPIFBlockDevice::init()
// Dummy And Mode Cycles Back default 0
_dummy_and_mode_cycles = _write_dummy_and_mode_cycles;
_is_initialized = true;
tr_info("Device size: %llu Kbytes", _device_size_bytes / 1024);
exit_point:
_mutex->unlock();
@ -667,6 +668,7 @@ int SPIFBlockDevice::_sfdp_parse_basic_param_table(uint32_t basic_table_addr, si
(param_table[5] << 8) |
param_table[4]);
_device_size_bytes = (density_bits + 1) / 8;
tr_debug("Density bits: %ld , device size: %llu bytes", density_bits, _device_size_bytes);
// Set Default read/program/erase Instructions
_read_instruction = SPIF_READ;