Skip to content

Commit a270cff

Browse files
author
offirko
committed
reduce info traces to debug level to prevent logs overflow
1 parent 90fd6cd commit a270cff

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

components/storage/blockdevice/COMPONENT_QSPIF/QSPIFBlockDevice.cpp

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ QSPIFBlockDevice::QSPIFBlockDevice(PinName io0, PinName io1, PinName io2, PinNam
119119
_unique_device_status = add_new_csel_instance(csel);
120120

121121
if (_unique_device_status == 0) {
122-
tr_info("Adding a new QSPIFBlockDevice csel: %d\n", (int)csel);
122+
tr_debug("Adding a new QSPIFBlockDevice csel: %d\n", (int)csel);
123123
} else if (_unique_device_status == -1) {
124124
tr_error("QSPIFBlockDevice with the same csel(%d) already exists\n", (int)csel);
125125
} else {
@@ -187,7 +187,7 @@ int QSPIFBlockDevice::init()
187187
status = QSPIF_BD_ERROR_DEVICE_ERROR;
188188
goto exit_point;
189189
} else {
190-
tr_info("Initialize flash memory OK");
190+
tr_debug("Initialize flash memory OK");
191191
}
192192

193193
/* Read Manufacturer ID (1byte), and Device ID (2bytes)*/
@@ -237,8 +237,8 @@ int QSPIFBlockDevice::init()
237237
_region_high_boundary[0] = _device_size_bytes - 1;
238238

239239
if ((sector_map_table_addr != 0) && (0 != sector_map_table_size)) {
240-
tr_info("Init - Parsing Sector Map Table - addr: 0x%lxh, Size: %d", sector_map_table_addr,
241-
sector_map_table_size);
240+
tr_debug("Init - Parsing Sector Map Table - addr: 0x%lxh, Size: %d", sector_map_table_addr,
241+
sector_map_table_size);
242242
if (0 != _sfdp_parse_sector_map_table(sector_map_table_addr, sector_map_table_size)) {
243243
tr_error("Init - Parse Sector Map Table Failed");
244244
status = QSPIF_BD_ERROR_PARSING_FAILED;
@@ -298,7 +298,7 @@ int QSPIFBlockDevice::deinit()
298298
int QSPIFBlockDevice::read(void *buffer, bd_addr_t addr, bd_size_t size)
299299
{
300300
int status = QSPIF_BD_ERROR_OK;
301-
tr_info("Read Inst: 0x%xh", _read_instruction);
301+
tr_debug("Read Inst: 0x%xh", _read_instruction);
302302

303303
_mutex.lock();
304304

@@ -691,13 +691,13 @@ int QSPIFBlockDevice::_sfdp_parse_basic_param_table(uint32_t basic_table_addr, s
691691
if (true == shouldSetQuadEnable) {
692692
_enable_fast_mdoe();
693693
// Set Quad Enable and QPI Bus modes if Supported
694-
tr_info("Init - Setting Quad Enable");
694+
tr_debug("Init - Setting Quad Enable");
695695
if (0 != _sfdp_set_quad_enabled(param_table)) {
696696
tr_error("Device supports Quad bus, but Quad Enable Failed");
697697
return -1;
698698
}
699699
if (true == is_qpi_mode) {
700-
tr_info("Init - Setting QPI mode");
700+
tr_debug("Init - Setting QPI mode");
701701
_sfdp_set_qpi_enabled(param_table);
702702
}
703703
}
@@ -728,7 +728,7 @@ int QSPIFBlockDevice::_sfdp_parse_sfdp_headers(uint32_t &basic_table_addr, size_
728728
tr_error("Init - _verify SFDP signature and version Failed");
729729
return -1;
730730
} else {
731-
tr_info("Init - verified SFDP Signature and version Successfully");
731+
tr_debug("Init - verified SFDP Signature and version Successfully");
732732
}
733733

734734
// Discover Number of Parameter Headers
@@ -964,8 +964,8 @@ int QSPIFBlockDevice::_sfdp_detect_erase_types_inst_and_size(uint8_t *basic_para
964964
erase_type_inst_arr[i_ind] = 0xff; //0xFF default for unsupported type
965965
erase_type_size_arr[i_ind] = local_math_power(2,
966966
basic_param_table_ptr[QSPIF_BASIC_PARAM_ERASE_TYPE_1_SIZE_BYTE + 2 * i_ind]); // Size given as 2^N
967-
tr_info("Erase Type(A) %d - Inst: 0x%xh, Size: %d", (i_ind + 1), erase_type_inst_arr[i_ind],
968-
erase_type_size_arr[i_ind]);
967+
tr_debug("Erase Type(A) %d - Inst: 0x%xh, Size: %d", (i_ind + 1), erase_type_inst_arr[i_ind],
968+
erase_type_size_arr[i_ind]);
969969
if (erase_type_size_arr[i_ind] > 1) {
970970
// if size==1 type is not supported
971971
erase_type_inst_arr[i_ind] = basic_param_table_ptr[QSPIF_BASIC_PARAM_ERASE_TYPE_1_BYTE + 2 * i_ind];
@@ -988,8 +988,8 @@ int QSPIFBlockDevice::_sfdp_detect_erase_types_inst_and_size(uint8_t *basic_para
988988
_region_erase_types_bitfield[0] |= bitfield; // If there's no region map, set region "0" types bitfield as defualt;
989989
}
990990

991-
tr_info("Erase Type %d - Inst: 0x%xh, Size: %d", (i_ind + 1), erase_type_inst_arr[i_ind],
992-
erase_type_size_arr[i_ind]);
991+
tr_debug("Erase Type %d - Inst: 0x%xh, Size: %d", (i_ind + 1), erase_type_inst_arr[i_ind],
992+
erase_type_size_arr[i_ind]);
993993
bitfield = bitfield << 1;
994994
}
995995
}
@@ -1059,7 +1059,7 @@ int QSPIFBlockDevice::_sfdp_detect_best_bus_read_mode(uint8_t *basic_param_table
10591059
+ (basic_param_table_ptr[QSPIF_BASIC_PARAM_TABLE_222_READ_INST_BYTE - 1] & 0x1F);
10601060
_address_width = QSPI_CFG_BUS_DUAL;
10611061
_data_width = QSPI_CFG_BUS_DUAL;
1062-
tr_info("Read Bus Mode set to 2-2-2, Instruction: 0x%xh", _read_instruction);
1062+
tr_debug("Read Bus Mode set to 2-2-2, Instruction: 0x%xh", _read_instruction);
10631063
break;
10641064
}
10651065

@@ -1094,7 +1094,7 @@ int QSPIFBlockDevice::_reset_flash_mem()
10941094
// Perform Soft Reset of the Device prior to initialization
10951095
int status = 0;
10961096
char status_value[QSPI_MAX_STATUS_REGISTER_SIZE] = {0};
1097-
tr_info("_reset_flash_mem:");
1097+
tr_debug("_reset_flash_mem:");
10981098
//Read the Status Register from device
10991099
if (QSPI_STATUS_OK == _qspi_send_general_command(QSPIF_RDSR, QSPI_NO_ADDRESS_COMMAND, NULL, 0, status_value,
11001100
QSPI_MAX_STATUS_REGISTER_SIZE)) { // store received values in status_value
@@ -1345,7 +1345,7 @@ qspi_status_t QSPIFBlockDevice::_qspi_send_erase_command(unsigned int erase_inst
13451345
// Send Erase Instruction command to driver
13461346
qspi_status_t result = QSPI_STATUS_OK;
13471347

1348-
tr_info("Inst: 0x%xh, addr: %llu, size: %llu", erase_inst, addr, size);
1348+
tr_debug("Inst: 0x%xh, addr: %llu, size: %llu", erase_inst, addr, size);
13491349

13501350
result = _qspi.command_transfer(erase_inst, // command to send
13511351
(((int)addr) & 0x00FFF000), // Align addr to 4096

0 commit comments

Comments
 (0)