summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpdk <jizhou.liao@nxp.com>2019-03-18 12:20:20 -0700
committerandroid-build-merger <android-build-merger@google.com>2019-03-18 12:20:20 -0700
commit9d3b7280ea045171e3fd3bfc8368d54a2b9d1bb1 (patch)
tree3bb6815761ed0626c65192329665800a73ea8bbc
parent943d738fc5f9875bc7401d91dd9e72a88a4f9da4 (diff)
parent8cb664337c260ac35e6f827663bcc638e617a36a (diff)
downloadandroid_hardware_nxp_nfc-9d3b7280ea045171e3fd3bfc8368d54a2b9d1bb1.tar.gz
android_hardware_nxp_nfc-9d3b7280ea045171e3fd3bfc8368d54a2b9d1bb1.tar.bz2
android_hardware_nxp_nfc-9d3b7280ea045171e3fd3bfc8368d54a2b9d1bb1.zip
Clean up NFC HAL error logs am: 7f837acc59
am: 8cb664337c Change-Id: Id23e22e9263e99d79a02e2a40d94f7f4e2cbdd00
-rw-r--r--halimpl/dnld/phDnldNfc.cc14
-rwxr-xr-xhalimpl/hal/phNxpNciHal.cc66
-rwxr-xr-xhalimpl/hal/phNxpNciHal_NfcDepSWPrio.cc8
-rwxr-xr-xhalimpl/hal/phNxpNciHal_ext.cc6
-rwxr-xr-xhalimpl/self-test/phNxpNciHal_SelfTest.cc16
-rwxr-xr-xhalimpl/tml/phTmlNfc.cc4
-rwxr-xr-xhalimpl/tml/phTmlNfc_i2c.cc12
-rw-r--r--halimpl/utils/phNxpNciHal_utils.cc2
8 files changed, 58 insertions, 70 deletions
diff --git a/halimpl/dnld/phDnldNfc.cc b/halimpl/dnld/phDnldNfc.cc
index 1adf3ad..5ee2aac 100644
--- a/halimpl/dnld/phDnldNfc.cc
+++ b/halimpl/dnld/phDnldNfc.cc
@@ -644,7 +644,7 @@ void phDnldNfc_SetHwDevHandle(void) {
*******************************************************************************/
void phDnldNfc_ReSetHwDevHandle(void) {
if (gpphDnldContext != NULL) {
- NXPLOG_FWDNLD_E("Freeing Mem for Dnld Context..")
+ NXPLOG_FWDNLD_D("Freeing Mem for Dnld Context..")
free(gpphDnldContext);
gpphDnldContext = NULL;
}
@@ -761,8 +761,8 @@ NFCSTATUS phDnldNfc_InitImgInfo(void) {
return NFCSTATUS_FAILED;
}
- NXPLOG_FWDNLD_E("FW Image Length - ImageInfoLen %d", ImageInfoLen);
- NXPLOG_FWDNLD_E("FW Image Info Pointer - pImageInfo %p", pImageInfo);
+ NXPLOG_FWDNLD_D("FW Image Length - ImageInfoLen %d", ImageInfoLen);
+ NXPLOG_FWDNLD_D("FW Image Info Pointer - pImageInfo %p", pImageInfo);
if ((pImageInfo == NULL) || (ImageInfoLen == 0)) {
NXPLOG_FWDNLD_E(
@@ -786,12 +786,12 @@ NFCSTATUS phDnldNfc_InitImgInfo(void) {
gpphDnldContext->nxp_nfc_fw_len = ImageInfoLen;
if ((NULL != gpphDnldContext->nxp_nfc_fw) &&
(0 != gpphDnldContext->nxp_nfc_fw_len)) {
- NXPLOG_FWDNLD_E("FW Major Version Num - %x",
+ NXPLOG_FWDNLD_D("FW Major Version Num - %x",
gpphDnldContext->nxp_nfc_fw[5]);
- NXPLOG_FWDNLD_E("FW Minor Version Num - %x",
+ NXPLOG_FWDNLD_D("FW Minor Version Num - %x",
gpphDnldContext->nxp_nfc_fw[4]);
- NXPLOG_FWDNLD_E("FW Image Length - %d", ImageInfoLen);
- NXPLOG_FWDNLD_E("FW Image Info Pointer - %p", pImageInfo);
+ NXPLOG_FWDNLD_D("FW Image Length - %d", ImageInfoLen);
+ NXPLOG_FWDNLD_D("FW Image Info Pointer - %p", pImageInfo);
/* get the FW version */
wFwVer = (((uint16_t)(gpphDnldContext->nxp_nfc_fw[5]) << 8U) |
diff --git a/halimpl/hal/phNxpNciHal.cc b/halimpl/hal/phNxpNciHal.cc
index de0d52b..a618142 100755
--- a/halimpl/hal/phNxpNciHal.cc
+++ b/halimpl/hal/phNxpNciHal.cc
@@ -391,7 +391,7 @@ static NFCSTATUS phNxpNciHal_fw_download(void) {
if (status == NFCSTATUS_SUCCESS) {
phNxpNciHal_gpio_restore(GPIO_RESTORE);
} else {
- NXPLOG_NCIHAL_E("Failed to restore GPIO values!!!\n");
+ NXPLOG_NCIHAL_D("Failed to restore GPIO values!!!\n");
}
}
@@ -557,7 +557,7 @@ int phNxpNciHal_MinOpen (){
AutoThreadMutex a(sHalFnLock);
if (nxpncihal_ctrl.halStatus == HAL_STATUS_MIN_OPEN) {
- NXPLOG_NCIHAL_E("phNxpNciHal_MinOpen(): already open");
+ NXPLOG_NCIHAL_D("phNxpNciHal_MinOpen(): already open");
return NFCSTATUS_SUCCESS;
}
/* reset config cache */
@@ -599,11 +599,11 @@ int phNxpNciHal_MinOpen (){
/* Read the nfc device node name */
nfc_dev_node = (char*)malloc(max_len * sizeof(char));
if (nfc_dev_node == NULL) {
- NXPLOG_NCIHAL_E("malloc of nfc_dev_node failed ");
+ NXPLOG_NCIHAL_D("malloc of nfc_dev_node failed ");
goto clean_and_return;
} else if (!GetNxpStrValue(NAME_NXP_NFC_DEV_NODE, nfc_dev_node,
sizeof(nfc_dev_node))) {
- NXPLOG_NCIHAL_E(
+ NXPLOG_NCIHAL_D(
"Invalid nfc device node name keeping the default device node "
"/dev/pn54x");
strcpy(nfc_dev_node, "/dev/pn54x");
@@ -683,7 +683,7 @@ init_retry:
is also added */
bool pn81A_pn553_chip = (nfcFL.chipType == pn553) && ((wFwVerRsp >> 8 & 0xFFFF) == 0x1102);
if ((status == NFCSTATUS_SUCCESS) && ((nfcFL.chipType == pn557) || pn81A_pn553_chip)) {
- NXPLOG_NCIHAL_E("Chip is in NCI1.0 mode reset the chip to 2.0 mode");
+ NXPLOG_NCIHAL_D("Chip is in NCI1.0 mode reset the chip to 2.0 mode");
status = phNxpNciHal_send_ext_cmd(sizeof(cmd_reset_nci), cmd_reset_nci);
if (status == NFCSTATUS_SUCCESS) {
status = phNxpNciHal_send_ext_cmd(sizeof(cmd_init_nci2_0), cmd_init_nci2_0);
@@ -708,8 +708,8 @@ init_retry:
phNxpNciHal_enable_i2c_fragmentation();
/*Get FW version from device*/
status = phDnldNfc_InitImgInfo();
- NXPLOG_NCIHAL_E("FW version for FW file = 0x%x", wFwVer);
- NXPLOG_NCIHAL_E("FW version from device = 0x%x", wFwVerRsp);
+ NXPLOG_NCIHAL_D("FW version for FW file = 0x%x", wFwVer);
+ NXPLOG_NCIHAL_D("FW version from device = 0x%x", wFwVerRsp);
if ((wFwVerRsp & 0x0000FFFF) == wFwVer) {
NXPLOG_NCIHAL_D("FW update not required");
phDnldNfc_ReSetHwDevHandle();
@@ -767,7 +767,7 @@ int phNxpNciHal_open(nfc_stack_callback_t* p_cback,
NFCSTATUS status = NFCSTATUS_SUCCESS;
if (nxpncihal_ctrl.halStatus == HAL_STATUS_OPEN) {
- NXPLOG_NCIHAL_E("phNxpNciHal_open already open");
+ NXPLOG_NCIHAL_D("phNxpNciHal_open already open");
return NFCSTATUS_SUCCESS;
}else if(nxpncihal_ctrl.halStatus == HAL_STATUS_CLOSE){
status = phNxpNciHal_MinOpen();
@@ -997,7 +997,7 @@ retry:
if (cb_data.status != NFCSTATUS_SUCCESS) {
data_len = 0;
if (nxpncihal_ctrl.retry_cnt++ < MAX_RETRY_COUNT) {
- NXPLOG_NCIHAL_E(
+ NXPLOG_NCIHAL_D(
"write_unlocked failed - PN54X Maybe in Standby Mode - Retry");
/* 10ms delay to give NFCC wake up delay */
usleep(1000 * 10);
@@ -1052,7 +1052,7 @@ static void phNxpNciHal_write_complete(void* pContext,
if (pInfo->wStatus == NFCSTATUS_SUCCESS) {
NXPLOG_NCIHAL_D("write successful status = 0x%x", pInfo->wStatus);
} else {
- NXPLOG_NCIHAL_E("write error status = 0x%x", pInfo->wStatus);
+ NXPLOG_NCIHAL_D("write error status = 0x%x", pInfo->wStatus);
}
p_cb_data->status = pInfo->wStatus;
@@ -1155,7 +1155,7 @@ static void phNxpNciHal_read_complete(void* pContext,
if (nxpncihal_ctrl.halStatus == HAL_STATUS_CLOSE &&
nxpncihal_ctrl.nci_info.wait_for_ntf == FALSE) {
- NXPLOG_NCIHAL_E("Ignoring read, HAL close triggered");
+ NXPLOG_NCIHAL_D("Ignoring read, HAL close triggered");
return;
}
/* Read again because read must be pending always.*/
@@ -1170,16 +1170,6 @@ static void phNxpNciHal_read_complete(void* pContext,
return;
}
-void read_retry() {
- /* Read again because read must be pending always.*/
- NFCSTATUS status = phTmlNfc_Read(
- Rx_data, NCI_MAX_DATA_LEN,
- (pphTmlNfc_TransactCompletionCb_t)&phNxpNciHal_read_complete, NULL);
- if (status != NFCSTATUS_PENDING) {
- NXPLOG_NCIHAL_E("read status error status = %x", status);
- /* TODO: Not sure how to handle this ? */
- }
-}
/******************************************************************************
* Function phNxpNciHal_core_initialized
*
@@ -1752,7 +1742,7 @@ int phNxpNciHal_core_initialized(uint8_t* p_core_init_rsp_params) {
0x01, 0x02, 0x01, 0x01};
uint8_t nfcc_mode_set_on[] = {0x22, 0x01, 0x02, 0x01, 0x01};
- NXPLOG_NCIHAL_E(
+ NXPLOG_NCIHAL_W(
"Sending DH and NFCC core connection command as raw packet!!");
status = phNxpNciHal_send_ext_cmd(sizeof(nfcc_core_conn_create),
nfcc_core_conn_create);
@@ -1764,7 +1754,7 @@ int phNxpNciHal_core_initialized(uint8_t* p_core_init_rsp_params) {
goto retry_core_init;
}
- NXPLOG_NCIHAL_E("Sending DH and NFCC mode set as raw packet!!");
+ NXPLOG_NCIHAL_W("Sending DH and NFCC mode set as raw packet!!");
status =
phNxpNciHal_send_ext_cmd(sizeof(nfcc_mode_set_on), nfcc_mode_set_on);
@@ -1774,7 +1764,7 @@ int phNxpNciHal_core_initialized(uint8_t* p_core_init_rsp_params) {
goto retry_core_init;
}
- NXPLOG_NCIHAL_E("Sending UICC Select Command as raw packet!!");
+ NXPLOG_NCIHAL_W("Sending UICC Select Command as raw packet!!");
status = phNxpNciHal_send_ext_cmd(sizeof(uicc_set_mode), uicc_set_mode);
if (status != NFCSTATUS_SUCCESS) {
NXPLOG_NCIHAL_E("Sending UICC Select Command as raw packet!! Failed");
@@ -1784,7 +1774,7 @@ int phNxpNciHal_core_initialized(uint8_t* p_core_init_rsp_params) {
if (*(p_core_init_rsp_params + 1) == 1) // RF state is Discovery!!
{
- NXPLOG_NCIHAL_E("Sending Set Screen ON State Command as raw packet!!");
+ NXPLOG_NCIHAL_W("Sending Set Screen ON State Command as raw packet!!");
status =
phNxpNciHal_send_ext_cmd(sizeof(set_screen_state), set_screen_state);
if (status != NFCSTATUS_SUCCESS) {
@@ -1794,7 +1784,7 @@ int phNxpNciHal_core_initialized(uint8_t* p_core_init_rsp_params) {
goto retry_core_init;
}
- NXPLOG_NCIHAL_E("Sending discovery as raw packet!!");
+ NXPLOG_NCIHAL_W("Sending discovery as raw packet!!");
status = phNxpNciHal_send_ext_cmd(p_core_init_rsp_params[2],
(uint8_t*)&p_core_init_rsp_params[3]);
if (status != NFCSTATUS_SUCCESS) {
@@ -1804,7 +1794,7 @@ int phNxpNciHal_core_initialized(uint8_t* p_core_init_rsp_params) {
}
} else {
- NXPLOG_NCIHAL_E("Sending Set Screen OFF State Command as raw packet!!");
+ NXPLOG_NCIHAL_W("Sending Set Screen OFF State Command as raw packet!!");
set_screen_state[3] = 0x01; // Screen OFF
status =
phNxpNciHal_send_ext_cmd(sizeof(set_screen_state), set_screen_state);
@@ -1815,7 +1805,7 @@ int phNxpNciHal_core_initialized(uint8_t* p_core_init_rsp_params) {
goto retry_core_init;
}
}
- NXPLOG_NCIHAL_E("Sending last command for Recovery ");
+ NXPLOG_NCIHAL_W("Sending last command for Recovery ");
if (p_core_init_rsp_params[35] > 0) { // if length of last command is 0
// then it doesn't need to send last
@@ -1882,7 +1872,7 @@ int phNxpNciHal_core_initialized(uint8_t* p_core_init_rsp_params) {
config_access = false;
if (nxpncihal_ctrl.p_nfc_stack_data_cback != NULL) {
*p_core_init_rsp_params = 0;
- NXPLOG_NCIHAL_E("Invoking data callback!!");
+ NXPLOG_NCIHAL_W("Invoking data callback!!");
(*nxpncihal_ctrl.p_nfc_stack_data_cback)(nxpncihal_ctrl.rx_data_len,
nxpncihal_ctrl.p_rx_data);
}
@@ -1935,7 +1925,7 @@ void phNxpNciHal_isFactoryOTAModeActive() {
if (status == NFCSTATUS_SUCCESS) {
if(nxpncihal_ctrl.p_rx_data[9] == 0x1 && nxpncihal_ctrl.p_rx_data[13] == 0x1) {
- NXPLOG_NCIHAL_E("FactoryOTA mode is active");
+ NXPLOG_NCIHAL_D("FactoryOTA mode is active");
} else {
NXPLOG_NCIHAL_D("FactoryOTA mode is disabled");
if (property_set("persist.factoryota.reboot", "terminated") < 0) {
@@ -2104,7 +2094,7 @@ int phNxpNciHal_close(bool bShutdown) {
AutoThreadMutex a(sHalFnLock);
if (nxpncihal_ctrl.halStatus == HAL_STATUS_CLOSE) {
- NXPLOG_NCIHAL_E("phNxpNciHal_close is already closed, ignoring close");
+ NXPLOG_NCIHAL_D("phNxpNciHal_close is already closed, ignoring close");
return NFCSTATUS_FAILED;
}
@@ -2575,7 +2565,7 @@ retry_send_ext:
status =
phNxpNciHal_send_ext_cmd(sizeof(get_mw_eeprom_cmd), get_mw_eeprom_cmd);
if (status != NFCSTATUS_SUCCESS) {
- NXPLOG_NCIHAL_E("unable to get the mw eeprom data");
+ NXPLOG_NCIHAL_D("unable to get the mw eeprom data");
phNxpNciMwEepromArea.isGetEepromArea = false;
retry_cnt++;
goto retry_send_ext;
@@ -2615,7 +2605,7 @@ retry_send_ext:
status =
phNxpNciHal_send_ext_cmd(sizeof(set_mw_eeprom_cmd), set_mw_eeprom_cmd);
if (status != NFCSTATUS_SUCCESS) {
- NXPLOG_NCIHAL_E("unable to update the mw eeprom data");
+ NXPLOG_NCIHAL_D("unable to update the mw eeprom data");
retry_cnt++;
goto retry_send_ext;
}
@@ -2688,10 +2678,10 @@ retrySetclock:
phNxpNciClock.isClockSet = false;
if (phNxpNciClock.p_rx_data[3] != NFCSTATUS_SUCCESS) {
if (retryCount++ < 3) {
- NXPLOG_NCIHAL_E("Set-clk failed retry again ");
+ NXPLOG_NCIHAL_D("Set-clk failed retry again ");
goto retrySetclock;
} else {
- NXPLOG_NCIHAL_D("Set clk failed - max count = 0x%x exceeded ",
+ NXPLOG_NCIHAL_E("Set clk failed - max count = 0x%x exceeded ",
retryCount);
// NXPLOG_NCIHAL_E("Set Config is failed for Clock Due to
// elctrical disturbances, aborting the NFC process");
@@ -2877,7 +2867,7 @@ NFCSTATUS phNxpNciHal_nfcc_core_reset_init() {
retry_core_reset:
status = phNxpNciHal_send_ext_cmd(sizeof(cmd_reset_nci), cmd_reset_nci);
if ((status != NFCSTATUS_SUCCESS) && (retry_cnt < 3)) {
- NXPLOG_NCIHAL_E("Retry: NCI_CORE_RESET");
+ NXPLOG_NCIHAL_D("Retry: NCI_CORE_RESET");
retry_cnt++;
goto retry_core_reset;
} else if (status != NFCSTATUS_SUCCESS) {
@@ -2896,7 +2886,7 @@ retry_core_init:
}
if ((status != NFCSTATUS_SUCCESS) && (retry_cnt < 3)) {
- NXPLOG_NCIHAL_E("Retry: NCI_CORE_INIT\n");
+ NXPLOG_NCIHAL_D("Retry: NCI_CORE_INIT\n");
retry_cnt++;
goto retry_core_init;
} else if (status != NFCSTATUS_SUCCESS) {
@@ -2926,7 +2916,7 @@ retry:
phNxpNciHal_send_ext_cmd(sizeof(get_chip_info_cmd), get_chip_info_cmd);
if (status != NFCSTATUS_SUCCESS) {
if (retry_cnt < 3) {
- NXPLOG_NCIHAL_E("Retry: get chip info");
+ NXPLOG_NCIHAL_D("Retry: get chip info");
retry_cnt++;
goto retry;
} else {
diff --git a/halimpl/hal/phNxpNciHal_NfcDepSWPrio.cc b/halimpl/hal/phNxpNciHal_NfcDepSWPrio.cc
index 8013f29..6e0c6e6 100755
--- a/halimpl/hal/phNxpNciHal_NfcDepSWPrio.cc
+++ b/halimpl/hal/phNxpNciHal_NfcDepSWPrio.cc
@@ -106,7 +106,7 @@ static void custom_poll_timer_handler(uint32_t timerId, void* pContext) {
phNxpNciHal_stop_polling_loop();
} else {
- NXPLOG_NCIHAL_E(
+ NXPLOG_NCIHAL_D(
">> custom_poll_timer_handler - invalid flag state (iso_dep_detected)");
}
@@ -367,7 +367,7 @@ NFCSTATUS phNxpNciHal_NfcDep_comapre_ntf(uint8_t* p_cmd_data,
if (ret_val != 0) {
NXPLOG_NCIHAL_E("Third notification is not equal to last");
} else {
- NXPLOG_NCIHAL_E(
+ NXPLOG_NCIHAL_D(
"Third notification is equal to last (disable p2p logic)");
status = NFCSTATUS_SUCCESS;
}
@@ -413,7 +413,7 @@ extern NFCSTATUS phNxpNciHal_clean_P2P_Prio() {
void* tmp_thread(void* tmp) {
NFCSTATUS status = NFCSTATUS_SUCCESS;
uint16_t data_len;
- NXPLOG_NCIHAL_E("tmp_thread: enter type=0x0%x", *((int*)tmp));
+ NXPLOG_NCIHAL_W("tmp_thread: enter type=0x0%x", *((int*)tmp));
usleep(10 * 1000);
switch (*((int*)tmp)) {
@@ -470,7 +470,7 @@ void* tmp_thread(void* tmp) {
break;
}
- NXPLOG_NCIHAL_E("tmp_thread: exit");
+ NXPLOG_NCIHAL_W("tmp_thread: exit");
return NULL;
}
/*******************************************************************************
diff --git a/halimpl/hal/phNxpNciHal_ext.cc b/halimpl/hal/phNxpNciHal_ext.cc
index 141948f..9daa662 100755
--- a/halimpl/hal/phNxpNciHal_ext.cc
+++ b/halimpl/hal/phNxpNciHal_ext.cc
@@ -55,8 +55,6 @@ static uint32_t iCoreInitRspLen;
extern uint32_t timeoutTimerId;
-extern NFCSTATUS read_retry();
-
/************** HAL extension functions ***************************************/
static void hal_extns_write_rsp_timeout_cb(uint32_t TimerId, void* pContext);
@@ -445,7 +443,7 @@ static NFCSTATUS phNxpNciHal_ext_process_nfc_init_rsp(uint8_t* p_ntf,
for (i = 0; i < *p_len; i++) {
snprintf(&print_buffer[i * 2], 3, "%02X", p_ntf[i]);
}
- NXPLOG_NCIHAL_E("CORE_RESET_NTF received !");
+ NXPLOG_NCIHAL_D("CORE_RESET_NTF received !");
NXPLOG_NCIR_E("len = %3d > %s", *p_len, print_buffer);
phNxpNciHal_emergency_recovery();
status = NFCSTATUS_FAILED;
@@ -921,7 +919,7 @@ NFCSTATUS phNxpNciHal_send_ese_hal_cmd(uint16_t cmd_len, uint8_t* p_cmd) {
static void hal_extns_write_rsp_timeout_cb(uint32_t timerId, void* pContext) {
UNUSED(timerId);
UNUSED(pContext);
- NXPLOG_NCIHAL_E("hal_extns_write_rsp_timeout_cb - write timeout!!!");
+ NXPLOG_NCIHAL_D("hal_extns_write_rsp_timeout_cb - write timeout!!!");
nxpncihal_ctrl.ext_cb_data.status = NFCSTATUS_FAILED;
usleep(1);
sem_post(&(nxpncihal_ctrl.syncSpiNfc));
diff --git a/halimpl/self-test/phNxpNciHal_SelfTest.cc b/halimpl/self-test/phNxpNciHal_SelfTest.cc
index ed77862..212cd10 100755
--- a/halimpl/self-test/phNxpNciHal_SelfTest.cc
+++ b/halimpl/self-test/phNxpNciHal_SelfTest.cc
@@ -595,7 +595,7 @@ static uint8_t st_validator_testAntenna_Txldo(nci_data_t* exp,
if ((measured_val >=
phAntenna_resp.wTxdoMeasuredRangeMin - tolerance)) {
gtxldo_status = NFCSTATUS_SUCCESS;
- NXPLOG_NCIHAL_E("Test Antenna Response for TxLDO measurement PASS");
+ NXPLOG_NCIHAL_D("Test Antenna Response for TxLDO measurement PASS");
} else {
gtxldo_status = NFCSTATUS_FAILED;
NXPLOG_NCIHAL_E("Test Antenna Response for TxLDO measurement FAIL");
@@ -650,7 +650,7 @@ static uint8_t st_validator_testAntenna_AgcVal(nci_data_t* exp,
if (((phAntenna_resp.wAgcValue - agc_tolerance) <= agc_val) &&
(agc_val <= (phAntenna_resp.wAgcValue + agc_tolerance))) {
gagc_value_status = NFCSTATUS_SUCCESS;
- NXPLOG_NCIHAL_E("Test Antenna Response for AGC Values PASS");
+ NXPLOG_NCIHAL_D("Test Antenna Response for AGC Values PASS");
} else {
gagc_value_status = NFCSTATUS_FAILED;
NXPLOG_NCIHAL_E("Test Antenna Response for AGC Values FAIL");
@@ -701,7 +701,7 @@ static uint8_t st_validator_testAntenna_AgcVal_FixedNfcLd(
(agc_nfcld <=
(phAntenna_resp.wAgcValuewithfixedNFCLD + agc_nfcld_tolerance))) {
gagc_nfcld_status = NFCSTATUS_SUCCESS;
- NXPLOG_NCIHAL_E(
+ NXPLOG_NCIHAL_D(
"Test Antenna Response for AGC value with fixed NFCLD PASS");
} else {
gagc_nfcld_status = NFCSTATUS_FAILED;
@@ -770,7 +770,7 @@ static uint8_t st_validator_testAntenna_AgcVal_Differential(
(agc_differentialOpne2 <=
phAntenna_resp.wAgcDifferentialWithOpen2 + agc_toleranceopne2))) {
gagc_differential_status = NFCSTATUS_SUCCESS;
- NXPLOG_NCIHAL_E("Test Antenna Response for AGC Differential Open PASS");
+ NXPLOG_NCIHAL_D("Test Antenna Response for AGC Differential Open PASS");
} else {
gagc_differential_status = NFCSTATUS_FAILED;
NXPLOG_NCIHAL_E(
@@ -1083,7 +1083,7 @@ retry:
if (cb_data.status != NFCSTATUS_SUCCESS && retryCnt < HAL_WRITE_MAX_RETRY) {
retryCnt++;
- NXPLOG_NCIHAL_E(
+ NXPLOG_NCIHAL_D(
"write_unlocked failed - PN54X Maybe in Standby Mode - Retry %d",
retryCnt);
goto retry;
@@ -1180,11 +1180,11 @@ NFCSTATUS phNxpNciHal_TestMode_open(void) {
/* Read the nfc device node name */
nfc_dev_node = (char*)malloc(max_len * sizeof(char));
if (nfc_dev_node == NULL) {
- NXPLOG_NCIHAL_E("malloc of nfc_dev_node failed ");
+ NXPLOG_NCIHAL_D("malloc of nfc_dev_node failed ");
goto clean_and_return;
} else if (!GetNxpStrValue(NAME_NXP_NFC_DEV_NODE, nfc_dev_node,
sizeof(nfc_dev_node))) {
- NXPLOG_NCIHAL_E(
+ NXPLOG_NCIHAL_D(
"Invalid nfc device node name keeping the default device node "
"/dev/pn54x");
strcpy(nfc_dev_node, "/dev/pn54x");
@@ -1687,7 +1687,7 @@ NFCSTATUS phNxpNciHal_AntennaSelfTest(phAntenna_St_Resp_t* phAntenna_St_Resp) {
antenna_st_status = NFCSTATUS_SUCCESS;
NXPLOG_NCIHAL_D("phNxpNciHal_AntennaSelfTest - SUCESS\n");
} else {
- NXPLOG_NCIHAL_D("phNxpNciHal_AntennaSelfTest - FAILED\n");
+ NXPLOG_NCIHAL_E("phNxpNciHal_AntennaSelfTest - FAILED\n");
}
} else {
NXPLOG_NCIHAL_D("phNxpNciHal_AntennaSelfTest - FAILED\n");
diff --git a/halimpl/tml/phTmlNfc.cc b/halimpl/tml/phTmlNfc.cc
index b8d7628..5d33b23 100755
--- a/halimpl/tml/phTmlNfc.cc
+++ b/halimpl/tml/phTmlNfc.cc
@@ -450,14 +450,14 @@ static void * phTmlNfc_TmlWriterThread(void* pParam) {
if (-1 == dwNoBytesWrRd) {
if (getDownloadFlag() == true) {
if (retry_cnt++ < MAX_WRITE_RETRY_COUNT) {
- NXPLOG_NCIHAL_E("PN54X - Error in I2C Write - Retry 0x%x",
+ NXPLOG_TML_D("PN54X - Error in I2C Write - Retry 0x%x",
retry_cnt);
// Add a 10 ms delay to ensure NFCC is not still in stand by mode.
usleep(10 * 1000);
goto retry;
}
}
- NXPLOG_TML_E("PN54X - Error in I2C Write.....\n");
+ NXPLOG_TML_D("PN54X - Error in I2C Write.....\n");
wStatus = PHNFCSTVAL(CID_NFC_TML, NFCSTATUS_FAILED);
} else {
phNxpNciHal_print_packet("SEND",
diff --git a/halimpl/tml/phTmlNfc_i2c.cc b/halimpl/tml/phTmlNfc_i2c.cc
index f397f4f..39b78d7 100755
--- a/halimpl/tml/phTmlNfc_i2c.cc
+++ b/halimpl/tml/phTmlNfc_i2c.cc
@@ -145,10 +145,10 @@ int phTmlNfc_i2c_read(void* pDevHandle, uint8_t* pBuffer, int nNbBytesToRead) {
ret_Select =
select((int)((intptr_t)pDevHandle + (int)1), &rfds, NULL, NULL, &tv);
if (ret_Select < 0) {
- NXPLOG_TML_E("i2c select() errno : %x", errno);
+ NXPLOG_TML_D("i2c select() errno : %x", errno);
return -1;
} else if (ret_Select == 0) {
- NXPLOG_TML_E("i2c select() Timeout");
+ NXPLOG_TML_D("i2c select() Timeout");
return -1;
} else {
ret_Read = read((intptr_t)pDevHandle, pBuffer, totalBtyesToRead - numRead);
@@ -195,7 +195,7 @@ int phTmlNfc_i2c_read(void* pDevHandle, uint8_t* pBuffer, int nNbBytesToRead) {
return -1;
} else {
if (bFwDnldFlag == false) {
- NXPLOG_TML_E("_i2c_read() [hdr] received");
+ NXPLOG_TML_D("_i2c_read() [hdr] received");
phNxpNciHal_print_packet("RECV", pBuffer, NORMAL_MODE_HEADER_LEN);
}
NXPLOG_TML_E("_i2c_read() [pyld] errno : %x", errno);
@@ -233,7 +233,7 @@ int phTmlNfc_i2c_write(void* pDevHandle, uint8_t* pBuffer,
}
if (fragmentation_enabled == I2C_FRAGMENATATION_DISABLED &&
nNbBytesToWrite > FRAGMENTSIZE_MAX) {
- NXPLOG_TML_E(
+ NXPLOG_TML_D(
"i2c_write() data larger than maximum I2C size,enable I2C "
"fragmentation");
return -1;
@@ -255,10 +255,10 @@ int phTmlNfc_i2c_write(void* pDevHandle, uint8_t* pBuffer,
usleep(500);
}
} else if (ret == 0) {
- NXPLOG_TML_E("_i2c_write() EOF");
+ NXPLOG_TML_D("_i2c_write() EOF");
return -1;
} else {
- NXPLOG_TML_E("_i2c_write() errno : %x", errno);
+ NXPLOG_TML_D("_i2c_write() errno : %x", errno);
if (errno == EINTR || errno == EAGAIN) {
continue;
}
diff --git a/halimpl/utils/phNxpNciHal_utils.cc b/halimpl/utils/phNxpNciHal_utils.cc
index 4f50a10..c1a14f4 100644
--- a/halimpl/utils/phNxpNciHal_utils.cc
+++ b/halimpl/utils/phNxpNciHal_utils.cc
@@ -132,7 +132,7 @@ int listRemove(struct listHead* pList, void* pData) {
if (pList->pFirst == NULL) {
/* Empty list */
- NXPLOG_NCIHAL_E("Failed to deallocate (list empty)");
+ NXPLOG_NCIHAL_D("Failed to deallocate (list empty)");
result = 0;
goto clean_and_return;
}