Merge "Remove NxpLog NxpConfig"
diff --git a/nci/jni/extns/pn54x/src/log/phNxpLog.cpp b/nci/jni/extns/pn54x/src/log/phNxpLog.cpp
deleted file mode 100644
index ff904c5..0000000
--- a/nci/jni/extns/pn54x/src/log/phNxpLog.cpp
+++ /dev/null
@@ -1,266 +0,0 @@
-/*
- * Copyright (C) 2015 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#include <stdio.h>
-#include <string.h>
-#if !defined(NXPLOG__H_INCLUDED)
-#include "phNxpConfig.h"
-#include "phNxpLog.h"
-#endif
-#include <android-base/stringprintf.h>
-#include <base/logging.h>
-#include <cutils/properties.h>
-
-using android::base::StringPrintf;
-
-extern bool nfc_debug_enabled;
-
-const char* NXPLOG_ITEM_EXTNS = "NxpExtns";
-const char* NXPLOG_ITEM_NCIHAL = "NxpHal";
-const char* NXPLOG_ITEM_NCIX = "NxpNciX";
-const char* NXPLOG_ITEM_NCIR = "NxpNciR";
-const char* NXPLOG_ITEM_FWDNLD = "NxpFwDnld";
-const char* NXPLOG_ITEM_TML = "NxpTml";
-
-#ifdef NXP_HCI_REQ
-const char* NXPLOG_ITEM_HCPX = "NxpHcpX";
-const char* NXPLOG_ITEM_HCPR = "NxpHcpR";
-#endif /*NXP_HCI_REQ*/
-
-/* global log level structure */
-nci_log_level_t gLog_level;
-
-/*******************************************************************************
- *
- * Function         phNxpLog_SetGlobalLogLevel
- *
- * Description      Sets the global log level for all modules.
- *                  This value is set by Android property
- *nfc.nxp_log_level_global. If value can be overridden by module log level.
- *
- * Returns          The value of global log level
- *
- ******************************************************************************/
-static uint8_t phNxpLog_SetGlobalLogLevel(void) {
-  uint8_t level = NXPLOG_DEFAULT_LOGLEVEL;
-  unsigned long num = 0;
-  char valueStr[PROPERTY_VALUE_MAX] = {0};
-
-  int len = property_get(PROP_NAME_NXPLOG_GLOBAL_LOGLEVEL, valueStr, "");
-  if (len > 0) {
-    /* let Android property override .conf variable */
-    sscanf(valueStr, "%lu", &num);
-    level = (unsigned char)num;
-  }
-  memset(&gLog_level, level, sizeof(nci_log_level_t));
-  return level;
-}
-
-/*******************************************************************************
- *
- * Function         phNxpLog_SetHALLogLevel
- *
- * Description      Sets the HAL layer log level.
- *
- * Returns          void
- *
- ******************************************************************************/
-static void phNxpLog_SetHALLogLevel(uint8_t level) {
-  unsigned long num = 0;
-  int len;
-  char valueStr[PROPERTY_VALUE_MAX] = {0};
-
-  if (GetNxpNumValue(NAME_NXPLOG_HAL_LOGLEVEL, &num, sizeof(num))) {
-    gLog_level.hal_log_level =
-        (level > (unsigned char)num) ? level : (unsigned char)num;
-    ;
-  }
-
-  len = property_get(PROP_NAME_NXPLOG_HAL_LOGLEVEL, valueStr, "");
-  if (len > 0) {
-    /* let Android property override .conf variable */
-    sscanf(valueStr, "%lu", &num);
-    gLog_level.hal_log_level = (unsigned char)num;
-  }
-
-  return;
-}
-
-/*******************************************************************************
- *
- * Function         phNxpLog_SetExtnsLogLevel
- *
- * Description      Sets the Extensions layer log level.
- *
- * Returns          void
- *
- ******************************************************************************/
-static void phNxpLog_SetExtnsLogLevel(uint8_t level) {
-  unsigned long num = 0;
-  int len;
-  char valueStr[PROPERTY_VALUE_MAX] = {0};
-  if (GetNxpNumValue(NAME_NXPLOG_EXTNS_LOGLEVEL, &num, sizeof(num))) {
-    gLog_level.extns_log_level =
-        (level > (unsigned char)num) ? level : (unsigned char)num;
-    ;
-  }
-
-  len = property_get(PROP_NAME_NXPLOG_EXTNS_LOGLEVEL, valueStr, "");
-  if (len > 0) {
-    /* let Android property override .conf variable */
-    sscanf(valueStr, "%lu", &num);
-    gLog_level.extns_log_level = (unsigned char)num;
-  }
-
-  return;
-}
-
-/*******************************************************************************
- *
- * Function         phNxpLog_SetTmlLogLevel
- *
- * Description      Sets the TML layer log level.
- *
- * Returns          void
- *
- ******************************************************************************/
-static void phNxpLog_SetTmlLogLevel(uint8_t level) {
-  unsigned long num = 0;
-  int len;
-  char valueStr[PROPERTY_VALUE_MAX] = {0};
-  if (GetNxpNumValue(NAME_NXPLOG_TML_LOGLEVEL, &num, sizeof(num))) {
-    gLog_level.tml_log_level =
-        (level > (unsigned char)num) ? level : (unsigned char)num;
-    ;
-  }
-
-  len = property_get(PROP_NAME_NXPLOG_TML_LOGLEVEL, valueStr, "");
-  if (len > 0) {
-    /* let Android property override .conf variable */
-    sscanf(valueStr, "%lu", &num);
-    gLog_level.tml_log_level = (unsigned char)num;
-  }
-
-  return;
-}
-
-/*******************************************************************************
- *
- * Function         phNxpLog_SetDnldLogLevel
- *
- * Description      Sets the FW download layer log level.
- *
- * Returns          void
- *
- ******************************************************************************/
-static void phNxpLog_SetDnldLogLevel(uint8_t level) {
-  unsigned long num = 0;
-  int len;
-  char valueStr[PROPERTY_VALUE_MAX] = {0};
-  if (GetNxpNumValue(NAME_NXPLOG_FWDNLD_LOGLEVEL, &num, sizeof(num))) {
-    gLog_level.dnld_log_level =
-        (level > (unsigned char)num) ? level : (unsigned char)num;
-    ;
-  }
-
-  len = property_get(PROP_NAME_NXPLOG_FWDNLD_LOGLEVEL, valueStr, "");
-  if (len > 0) {
-    /* let Android property override .conf variable */
-    sscanf(valueStr, "%lu", &num);
-    gLog_level.dnld_log_level = (unsigned char)num;
-  }
-
-  return;
-}
-
-/*******************************************************************************
- *
- * Function         phNxpLog_SetNciTxLogLevel
- *
- * Description      Sets the NCI transaction layer log level.
- *
- * Returns          void
- *
- ******************************************************************************/
-static void phNxpLog_SetNciTxLogLevel(uint8_t level) {
-  unsigned long num = 0;
-  int len;
-  char valueStr[PROPERTY_VALUE_MAX] = {0};
-  if (GetNxpNumValue(NAME_NXPLOG_NCIX_LOGLEVEL, &num, sizeof(num))) {
-    gLog_level.ncix_log_level =
-        (level > (unsigned char)num) ? level : (unsigned char)num;
-  }
-  if (GetNxpNumValue(NAME_NXPLOG_NCIR_LOGLEVEL, &num, sizeof(num))) {
-    gLog_level.ncir_log_level =
-        (level > (unsigned char)num) ? level : (unsigned char)num;
-    ;
-  }
-
-  len = property_get(PROP_NAME_NXPLOG_NCI_LOGLEVEL, valueStr, "");
-  if (len > 0) {
-    /* let Android property override .conf variable */
-    sscanf(valueStr, "%lu", &num);
-    gLog_level.ncix_log_level = (unsigned char)num;
-    gLog_level.ncir_log_level = (unsigned char)num;
-  }
-
-  return;
-}
-
-/******************************************************************************
- * Function         phNxpLog_InitializeLogLevel
- *
- * Description      Initialize and get log level of module from libnfc-nxp.conf
- *or Android runtime properties. The Android property nfc.nxp_global_log_level
- *is to define log level for all modules. Modules log level
- *will override global level. The Android property will
- *override the level in libnfc-nxp.conf
- *
- *                  Android property names:
- *                      nfc.nxp_log_level_global    * defines log level for all
- *modules nfc.nxp_log_level_extns     * extensions module log
- *                      nfc.nxp_log_level_hal       * Hal module log
- *                      nfc.nxp_log_level_dnld      * firmware download module
- *log nfc.nxp_log_level_tml       * TML module log nfc.nxp_log_level_nci       *
- *NCI transaction log
- *
- *                  Log Level values:
- *                      NXPLOG_LOG_SILENT_LOGLEVEL  0        * No trace to show
- *                      NXPLOG_LOG_ERROR_LOGLEVEL   1        * Show Error trace
- *only NXPLOG_LOG_WARN_LOGLEVEL    2        * Show Warning trace and Error trace
- *                      NXPLOG_LOG_DEBUG_LOGLEVEL   3        * Show all traces
- *
- * Returns          void
- *
- ******************************************************************************/
-void phNxpLog_InitializeLogLevel(void) {
-  uint8_t level = phNxpLog_SetGlobalLogLevel();
-  phNxpLog_SetHALLogLevel(level);
-  phNxpLog_SetExtnsLogLevel(level);
-  phNxpLog_SetTmlLogLevel(level);
-  phNxpLog_SetDnldLogLevel(level);
-  phNxpLog_SetNciTxLogLevel(level);
-
-  DLOG_IF(INFO, nfc_debug_enabled) << StringPrintf(
-      "%s: global =%u, Fwdnld =%u, extns =%u, \
-                hal =%u, tml =%u, ncir =%u, \
-                ncix =%u",
-      __func__, gLog_level.global_log_level, gLog_level.dnld_log_level,
-      gLog_level.extns_log_level, gLog_level.hal_log_level,
-      gLog_level.tml_log_level, gLog_level.ncir_log_level,
-      gLog_level.ncix_log_level);
-
-  return;
-}
diff --git a/nci/jni/extns/pn54x/src/log/phNxpLog.h b/nci/jni/extns/pn54x/src/log/phNxpLog.h
deleted file mode 100644
index b1bf53d..0000000
--- a/nci/jni/extns/pn54x/src/log/phNxpLog.h
+++ /dev/null
@@ -1,320 +0,0 @@
-/*
- * Copyright (C) 2015 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#if !defined(NXPLOG__H_INCLUDED)
-#define NXPLOG__H_INCLUDED
-
-#include <log/log.h>
-
-typedef struct nci_log_level {
-  uint8_t global_log_level;
-  uint8_t extns_log_level;
-  uint8_t hal_log_level;
-  uint8_t dnld_log_level;
-  uint8_t tml_log_level;
-  uint8_t ncix_log_level;
-  uint8_t ncir_log_level;
-} nci_log_level_t;
-
-/* global log level Ref */
-extern nci_log_level_t gLog_level;
-
-/* define log module included when compile */
-#define ENABLE_HAL_TRACES TRUE
-#define ENABLE_TML_TRACES TRUE
-#define ENABLE_FWDNLD_TRACES TRUE
-#define ENABLE_NCIX_TRACES TRUE
-#define ENABLE_NCIR_TRACES TRUE
-
-#define ENABLE_HCPX_TRACES FALSE
-#define ENABLE_HCPR_TRACES FALSE
-
-/* ####################### Set the log module name in .conf file
- * ########################## */
-#define NAME_NXPLOG_EXTNS_LOGLEVEL "NXPLOG_EXTNS_LOGLEVEL"
-#define NAME_NXPLOG_HAL_LOGLEVEL "NXPLOG_NCIHAL_LOGLEVEL"
-#define NAME_NXPLOG_NCIX_LOGLEVEL "NXPLOG_NCIX_LOGLEVEL"
-#define NAME_NXPLOG_NCIR_LOGLEVEL "NXPLOG_NCIR_LOGLEVEL"
-#define NAME_NXPLOG_FWDNLD_LOGLEVEL "NXPLOG_FWDNLD_LOGLEVEL"
-#define NAME_NXPLOG_TML_LOGLEVEL "NXPLOG_TML_LOGLEVEL"
-
-/* ####################### Set the log module name by Android property
- * ########################## */
-#define PROP_NAME_NXPLOG_GLOBAL_LOGLEVEL "nfc.nxp_log_level_global"
-#define PROP_NAME_NXPLOG_EXTNS_LOGLEVEL "nfc.nxp_log_level_extns"
-#define PROP_NAME_NXPLOG_HAL_LOGLEVEL "nfc.nxp_log_level_hal"
-#define PROP_NAME_NXPLOG_NCI_LOGLEVEL "nfc.nxp_log_level_nci"
-#define PROP_NAME_NXPLOG_FWDNLD_LOGLEVEL "nfc.nxp_log_level_dnld"
-#define PROP_NAME_NXPLOG_TML_LOGLEVEL "nfc.nxp_log_level_tml"
-
-/* ####################### Set the logging level for EVERY COMPONENT here
- * ######################## :START: */
-#define NXPLOG_LOG_SILENT_LOGLEVEL 0x00
-#define NXPLOG_LOG_ERROR_LOGLEVEL 0x01
-#define NXPLOG_LOG_WARN_LOGLEVEL 0x02
-#define NXPLOG_LOG_DEBUG_LOGLEVEL 0x03
-/* ####################### Set the default logging level for EVERY COMPONENT
- * here ########################## :END: */
-
-/* The Default log level for all the modules. */
-#define NXPLOG_DEFAULT_LOGLEVEL NXPLOG_LOG_ERROR_LOGLEVEL
-
-/* ################################################################################################################
- */
-/* ############################################### Component Names
- * ################################################ */
-/* ################################################################################################################
- */
-
-extern const char* NXPLOG_ITEM_EXTNS;  /* Android logging tag for NxpExtns  */
-extern const char* NXPLOG_ITEM_NCIHAL; /* Android logging tag for NxpNciHal */
-extern const char* NXPLOG_ITEM_NCIX;   /* Android logging tag for NxpNciX   */
-extern const char* NXPLOG_ITEM_NCIR;   /* Android logging tag for NxpNciR   */
-extern const char* NXPLOG_ITEM_FWDNLD; /* Android logging tag for NxpFwDnld */
-extern const char* NXPLOG_ITEM_TML;    /* Android logging tag for NxpTml    */
-
-#ifdef NXP_HCI_REQ
-extern const char* NXPLOG_ITEM_HCPX; /* Android logging tag for NxpHcpX   */
-extern const char* NXPLOG_ITEM_HCPR; /* Android logging tag for NxpHcpR   */
-#endif                               /*NXP_HCI_REQ*/
-
-/* ######################################## Defines used for Logging data
- * ######################################### */
-#ifdef NXP_VRBS_REQ
-#define NXPLOG_FUNC_ENTRY(COMP) \
-  LOG_PRI(ANDROID_LOG_VERBOSE, (COMP), "+:%s", (__func__))
-#define NXPLOG_FUNC_EXIT(COMP) \
-  LOG_PRI(ANDROID_LOG_VERBOSE, (COMP), "-:%s", (__func__))
-#endif /*NXP_VRBS_REQ*/
-
-/* ################################################################################################################
- */
-/* ######################################## Logging APIs of actual modules
- * ######################################## */
-/* ################################################################################################################
- */
-/* Logging APIs used by NxpNciHal module */
-#if (ENABLE_HAL_TRACES == TRUE)
-#define NXPLOG_NCIHAL_D(...)                                       \
-  {                                                                \
-    if (gLog_level.hal_log_level >= NXPLOG_LOG_DEBUG_LOGLEVEL)     \
-      LOG_PRI(ANDROID_LOG_DEBUG, NXPLOG_ITEM_NCIHAL, __VA_ARGS__); \
-  }
-#define NXPLOG_NCIHAL_W(...)                                      \
-  {                                                               \
-    if (gLog_level.hal_log_level >= NXPLOG_LOG_WARN_LOGLEVEL)     \
-      LOG_PRI(ANDROID_LOG_WARN, NXPLOG_ITEM_NCIHAL, __VA_ARGS__); \
-  }
-#define NXPLOG_NCIHAL_E(...)                                       \
-  {                                                                \
-    if (gLog_level.hal_log_level >= NXPLOG_LOG_ERROR_LOGLEVEL)     \
-      LOG_PRI(ANDROID_LOG_ERROR, NXPLOG_ITEM_NCIHAL, __VA_ARGS__); \
-  }
-#else
-#define NXPLOG_NCIHAL_D(...)
-#define NXPLOG_NCIHAL_W(...)
-#define NXPLOG_NCIHAL_E(...)
-#endif /* Logging APIs used by HAL module */
-
-/* Logging APIs used by NxpNciX module */
-#if (ENABLE_NCIX_TRACES == TRUE)
-#define NXPLOG_NCIX_D(...)                                       \
-  {                                                              \
-    if (gLog_level.ncix_log_level >= NXPLOG_LOG_DEBUG_LOGLEVEL)  \
-      LOG_PRI(ANDROID_LOG_DEBUG, NXPLOG_ITEM_NCIX, __VA_ARGS__); \
-  }
-#define NXPLOG_NCIX_W(...)                                      \
-  {                                                             \
-    if (gLog_level.ncix_log_level >= NXPLOG_LOG_WARN_LOGLEVEL)  \
-      LOG_PRI(ANDROID_LOG_WARN, NXPLOG_ITEM_NCIX, __VA_ARGS__); \
-  }
-#define NXPLOG_NCIX_E(...)                                       \
-  {                                                              \
-    if (gLog_level.ncix_log_level >= NXPLOG_LOG_ERROR_LOGLEVEL)  \
-      LOG_PRI(ANDROID_LOG_ERROR, NXPLOG_ITEM_NCIX, __VA_ARGS__); \
-  }
-#else
-#define NXPLOG_NCIX_D(...)
-#define NXPLOG_NCIX_W(...)
-#define NXPLOG_NCIX_E(...)
-#endif /* Logging APIs used by NCIx module */
-
-/* Logging APIs used by NxpNciR module */
-#if (ENABLE_NCIR_TRACES == TRUE)
-#define NXPLOG_NCIR_D(...)                                       \
-  {                                                              \
-    if (gLog_level.ncir_log_level >= NXPLOG_LOG_DEBUG_LOGLEVEL)  \
-      LOG_PRI(ANDROID_LOG_DEBUG, NXPLOG_ITEM_NCIR, __VA_ARGS__); \
-  }
-#define NXPLOG_NCIR_W(...)                                      \
-  {                                                             \
-    if (gLog_level.ncir_log_level >= NXPLOG_LOG_WARN_LOGLEVEL)  \
-      LOG_PRI(ANDROID_LOG_WARN, NXPLOG_ITEM_NCIR, __VA_ARGS__); \
-  }
-#define NXPLOG_NCIR_E(...)                                       \
-  {                                                              \
-    if (gLog_level.ncir_log_level >= NXPLOG_LOG_ERROR_LOGLEVEL)  \
-      LOG_PRI(ANDROID_LOG_ERROR, NXPLOG_ITEM_NCIR, __VA_ARGS__); \
-  }
-#else
-#define NXPLOG_NCIR_D(...)
-#define NXPLOG_NCIR_W(...)
-#define NXPLOG_NCIR_E(...)
-#endif /* Logging APIs used by NCIR module */
-
-/* Logging APIs used by NxpFwDnld module */
-#if (ENABLE_FWDNLD_TRACES == TRUE)
-#define NXPLOG_FWDNLD_D(...)                                       \
-  {                                                                \
-    if (gLog_level.dnld_log_level >= NXPLOG_LOG_DEBUG_LOGLEVEL)    \
-      LOG_PRI(ANDROID_LOG_DEBUG, NXPLOG_ITEM_FWDNLD, __VA_ARGS__); \
-  }
-#define NXPLOG_FWDNLD_W(...)                                      \
-  {                                                               \
-    if (gLog_level.dnld_log_level >= NXPLOG_LOG_WARN_LOGLEVEL)    \
-      LOG_PRI(ANDROID_LOG_WARN, NXPLOG_ITEM_FWDNLD, __VA_ARGS__); \
-  }
-#define NXPLOG_FWDNLD_E(...)                                       \
-  {                                                                \
-    if (gLog_level.dnld_log_level >= NXPLOG_LOG_ERROR_LOGLEVEL)    \
-      LOG_PRI(ANDROID_LOG_ERROR, NXPLOG_ITEM_FWDNLD, __VA_ARGS__); \
-  }
-#else
-#define NXPLOG_FWDNLD_D(...)
-#define NXPLOG_FWDNLD_W(...)
-#define NXPLOG_FWDNLD_E(...)
-#endif /* Logging APIs used by NxpFwDnld module */
-
-/* Logging APIs used by NxpTml module */
-#if (ENABLE_TML_TRACES == TRUE)
-#define NXPLOG_TML_D(...)                                       \
-  {                                                             \
-    if (gLog_level.tml_log_level >= NXPLOG_LOG_DEBUG_LOGLEVEL)  \
-      LOG_PRI(ANDROID_LOG_DEBUG, NXPLOG_ITEM_TML, __VA_ARGS__); \
-  }
-#define NXPLOG_TML_W(...)                                      \
-  {                                                            \
-    if (gLog_level.tml_log_level >= NXPLOG_LOG_WARN_LOGLEVEL)  \
-      LOG_PRI(ANDROID_LOG_WARN, NXPLOG_ITEM_TML, __VA_ARGS__); \
-  }
-#define NXPLOG_TML_E(...)                                       \
-  {                                                             \
-    if (gLog_level.tml_log_level >= NXPLOG_LOG_ERROR_LOGLEVEL)  \
-      LOG_PRI(ANDROID_LOG_ERROR, NXPLOG_ITEM_TML, __VA_ARGS__); \
-  }
-#else
-#define NXPLOG_TML_D(...)
-#define NXPLOG_TML_W(...)
-#define NXPLOG_TML_E(...)
-#endif /* Logging APIs used by NxpTml module */
-
-#ifdef NXP_HCI_REQ
-/* Logging APIs used by NxpHcpX module */
-#if (ENABLE_HCPX_TRACES == TRUE)
-#define NXPLOG_HCPX_D(...)                                         \
-  {                                                                \
-    if (gLog_level.dnld_log_level >= NXPLOG_LOG_DEBUG_LOGLEVEL)    \
-      LOG_PRI(ANDROID_LOG_DEBUG, NXPLOG_ITEM_FWDNLD, __VA_ARGS__); \
-  }
-#define NXPLOG_HCPX_W(...)                                        \
-  {                                                               \
-    if (gLog_level.dnld_log_level >= NXPLOG_LOG_WARN_LOGLEVEL)    \
-      LOG_PRI(ANDROID_LOG_WARN, NXPLOG_ITEM_FWDNLD, __VA_ARGS__); \
-  }
-#define NXPLOG_HCPX_E(...)                                         \
-  {                                                                \
-    if (gLog_level.dnld_log_level >= NXPLOG_LOG_ERROR_LOGLEVEL)    \
-      LOG_PRI(ANDROID_LOG_ERROR, NXPLOG_ITEM_FWDNLD, __VA_ARGS__); \
-  }
-#else
-#define NXPLOG_HCPX_D(...)
-#define NXPLOG_HCPX_W(...)
-#define NXPLOG_HCPX_E(...)
-#endif /* Logging APIs used by NxpHcpX module */
-
-/* Logging APIs used by NxpHcpR module */
-#if (ENABLE_HCPR_TRACES == TRUE)
-#define NXPLOG_HCPR_D(...)                                         \
-  {                                                                \
-    if (gLog_level.dnld_log_level >= NXPLOG_LOG_DEBUG_LOGLEVEL)    \
-      LOG_PRI(ANDROID_LOG_DEBUG, NXPLOG_ITEM_FWDNLD, __VA_ARGS__); \
-  }
-#define NXPLOG_HCPR_W(...)                                        \
-  {                                                               \
-    if (gLog_level.dnld_log_level >= NXPLOG_LOG_WARN_LOGLEVEL)    \
-      LOG_PRI(ANDROID_LOG_WARN, NXPLOG_ITEM_FWDNLD, __VA_ARGS__); \
-  }
-#define NXPLOG_HCPR_E(...)                                         \
-  {                                                                \
-    if (gLog_level.dnld_log_level >= NXPLOG_LOG_ERROR_LOGLEVEL)    \
-      LOG_PRI(ANDROID_LOG_ERROR, NXPLOG_ITEM_FWDNLD, __VA_ARGS__); \
-  }
-#else
-#define NXPLOG_HCPR_D(...)
-#define NXPLOG_HCPR_W(...)
-#define NXPLOG_HCPR_E(...)
-#endif /* Logging APIs used by NxpHcpR module */
-#endif /* NXP_HCI_REQ */
-
-#ifdef NXP_VRBS_REQ
-#if (ENABLE_HAL_TRACES == TRUE)
-#define NXPLOG_NCIHAL_ENTRY() NXPLOG_FUNC_ENTRY(NXPLOG_ITEM_NCIHAL)
-#define NXPLOG_NCIHAL_EXIT() NXPLOG_FUNC_EXIT(NXPLOG_ITEM_NCIHAL)
-#else
-#define NXPLOG_NCIHAL_ENTRY()
-#define NXPLOG_NCIHAL_EXIT()
-#endif
-
-#if (ENABLE_NCIX_TRACES == TRUE)
-#define NXPLOG_NCIX_ENTRY() NXPLOG_FUNC_ENTRY(NXPLOG_ITEM_NCIX)
-#define NXPLOG_NCIX_EXIT() NXPLOG_FUNC_EXIT(NXPLOG_ITEM_NCIX)
-#else
-#define NXPLOG_NCIX_ENTRY()
-#define NXPLOG_NCIX_EXIT()
-#endif
-
-#if (ENABLE_NCIR_TRACES == TRUE)
-#define NXPLOG_NCIR_ENTRY() NXPLOG_FUNC_ENTRY(NXPLOG_ITEM_NCIR)
-#define NXPLOG_NCIR_EXIT() NXPLOG_FUNC_EXIT(NXPLOG_ITEM_NCIR)
-#else
-#define NXPLOG_NCIR_ENTRY()
-#define NXPLOG_NCIR_EXIT()
-#endif
-
-#ifdef NXP_HCI_REQ
-
-#if (ENABLE_HCPX_TRACES == TRUE)
-#define NXPLOG_HCPX_ENTRY() NXPLOG_FUNC_ENTRY(NXPLOG_ITEM_HCPX)
-#define NXPLOG_HCPX_EXIT() NXPLOG_FUNC_EXIT(NXPLOG_ITEM_HCPX)
-#else
-#define NXPLOG_HCPX_ENTRY()
-#define NXPLOG_HCPX_EXIT()
-#endif
-
-#if (ENABLE_HCPR_TRACES == TRUE)
-#define NXPLOG_HCPR_ENTRY() NXPLOG_FUNC_ENTRY(NXPLOG_ITEM_HCPR)
-#define NXPLOG_HCPR_EXIT() NXPLOG_FUNC_EXIT(NXPLOG_ITEM_HCPR)
-#else
-#define NXPLOG_HCPR_ENTRY()
-#define NXPLOG_HCPR_EXIT()
-#endif
-#endif /* NXP_HCI_REQ */
-
-#endif /* NXP_VRBS_REQ */
-
-void phNxpLog_InitializeLogLevel(void);
-
-#endif /* NXPLOG__H_INCLUDED */
diff --git a/nci/jni/extns/pn54x/src/mifare/phFriNfc_MifStdFormat.cpp b/nci/jni/extns/pn54x/src/mifare/phFriNfc_MifStdFormat.cpp
index 0d9eb11..0e09b3a 100644
--- a/nci/jni/extns/pn54x/src/mifare/phFriNfc_MifStdFormat.cpp
+++ b/nci/jni/extns/pn54x/src/mifare/phFriNfc_MifStdFormat.cpp
@@ -21,7 +21,6 @@
 #include <phFriNfc_MifStdFormat.h>
 #include <phNfcCompId.h>
 #include <phNxpExtns_MifareStd.h>
-#include <phNxpLog.h>
 
 #include <android-base/stringprintf.h>
 #include <base/logging.h>
diff --git a/nci/jni/extns/pn54x/src/mifare/phNxpExtns_MifareStd.cpp b/nci/jni/extns/pn54x/src/mifare/phNxpExtns_MifareStd.cpp
index 8545a56..e40530d 100644
--- a/nci/jni/extns/pn54x/src/mifare/phNxpExtns_MifareStd.cpp
+++ b/nci/jni/extns/pn54x/src/mifare/phNxpExtns_MifareStd.cpp
@@ -20,7 +20,6 @@
 #include <nfc_int.h>
 #include <phNfcCompId.h>
 #include <phNxpExtns_MifareStd.h>
-#include <phNxpLog.h>
 #include <rw_api.h>
 
 using android::base::StringPrintf;
@@ -349,7 +348,7 @@
     NdefInfo.is_ndef = 1;
     NdefInfo.NdefActualSize = conn_evt_data.ndef_detect.cur_size;
     if (PH_NDEFMAP_CARD_STATE_READ_ONLY == NdefMap->CardState) {
-      DLOG_IF(INFO, gLog_level.extns_log_level >= NXPLOG_LOG_DEBUG_LOGLEVEL)
+      DLOG_IF(INFO, nfc_debug_enabled)
           << StringPrintf("Mfc_CheckNdef_Completion_Routine : READ_ONLY_CARD");
       conn_evt_data.ndef_detect.flags = RW_NDEF_FL_READ_ONLY;
     } else {
@@ -550,7 +549,7 @@
 **
 *******************************************************************************/
 NFCSTATUS Mfc_SetReadOnly(uint8_t* secrtkey, uint8_t len) {
-  DLOG_IF(INFO, gLog_level.extns_log_level >= NXPLOG_LOG_DEBUG_LOGLEVEL)
+  DLOG_IF(INFO, nfc_debug_enabled)
       << StringPrintf("%s Entering ", __func__);
   NFCSTATUS status = NFCSTATUS_FAILED;
   uint8_t mif_secrete_key[6] = {0};
@@ -706,7 +705,7 @@
   } else {
     status = NFCSTATUS_NOT_ALLOWED;
   }
-  DLOG_IF(INFO, gLog_level.extns_log_level >= NXPLOG_LOG_DEBUG_LOGLEVEL)
+  DLOG_IF(INFO, nfc_debug_enabled)
       << StringPrintf("%s status = 0x%x", __func__, status);
   return status;
 }
diff --git a/nci/jni/extns/pn54x/src/phNxpExtns.cpp b/nci/jni/extns/pn54x/src/phNxpExtns.cpp
index 9435a0b..0c4d0ff 100644
--- a/nci/jni/extns/pn54x/src/phNxpExtns.cpp
+++ b/nci/jni/extns/pn54x/src/phNxpExtns.cpp
@@ -22,9 +22,7 @@
 
 #include <android-base/stringprintf.h>
 #include <base/logging.h>
-#include <phNxpConfig.h>
 #include <phNxpExtns_MifareStd.h>
-#include <phNxpLog.h>
 
 using android::base::StringPrintf;
 
@@ -59,12 +57,6 @@
                      tNFA_CONN_CBACK* p_nfa_conn_cback) {
   NFCSTATUS status = NFCSTATUS_FAILED;
 
-  /* reset config cache */
-  resetNxpConfig();
-
-  /* Initialize Log level */
-  phNxpLog_InitializeLogLevel();
-
   /* Validate parameters */
   if ((!p_nfa_dm_cback) || (!p_nfa_conn_cback)) {
     LOG(ERROR) << StringPrintf("EXTNS_Init(): error null callback");
diff --git a/nci/jni/extns/pn54x/src/utils/phNxpConfig.cpp b/nci/jni/extns/pn54x/src/utils/phNxpConfig.cpp
deleted file mode 100644
index b5935de..0000000
--- a/nci/jni/extns/pn54x/src/utils/phNxpConfig.cpp
+++ /dev/null
@@ -1,832 +0,0 @@
-/*
- * Copyright (C) 2015 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#include <phNxpConfig.h>
-#include <stdio.h>
-#include <sys/stat.h>
-#include <list>
-#include <string>
-#include <vector>
-
-#include <android-base/stringprintf.h>
-#include <base/logging.h>
-#include <phNxpLog.h>
-
-using android::base::StringPrintf;
-
-extern bool nfc_debug_enabled;
-
-#if GENERIC_TARGET
-const char alternative_config_path[] = "/data/nfc/";
-#else
-const char alternative_config_path[] = "";
-#endif
-
-#if 1
-const char* transport_config_paths[] = {"/odm/etc/", "/vendor/etc/", "/etc/"};
-#else
-const char* transport_config_paths[] = {"res/"};
-#endif
-const int transport_config_path_size =
-    (sizeof(transport_config_paths) / sizeof(transport_config_paths[0]));
-
-#define config_name "libnfc-nxp.conf"
-#define extra_config_base "libnfc-nxp-"
-#define extra_config_ext ".conf"
-#define IsStringValue 0x80000000
-
-const char config_timestamp_path[] = "/data/nfc/libnfc-nxpConfigState.bin";
-
-using namespace ::std;
-
-class CNxpNfcParam : public string {
- public:
-  CNxpNfcParam();
-  CNxpNfcParam(const char* name, const string& value);
-  CNxpNfcParam(const char* name, unsigned long value);
-  virtual ~CNxpNfcParam();
-  unsigned long numValue() const { return m_numValue; }
-  const char* str_value() const { return m_str_value.c_str(); }
-  size_t str_len() const { return m_str_value.length(); }
-
- private:
-  string m_str_value;
-  unsigned long m_numValue;
-};
-
-class CNxpNfcConfig : public vector<const CNxpNfcParam*> {
- public:
-  virtual ~CNxpNfcConfig();
-  static CNxpNfcConfig& GetInstance();
-  friend void readOptionalConfig(const char* optional);
-  int checkTimestamp();
-
-  bool getValue(const char* name, char* pValue, size_t len) const;
-  bool getValue(const char* name, unsigned long& rValue) const;
-  bool getValue(const char* name, unsigned short& rValue) const;
-  bool getValue(const char* name, char* pValue, long len, long* readlen) const;
-  const CNxpNfcParam* find(const char* p_name) const;
-  void clean();
-
- private:
-  CNxpNfcConfig();
-  bool readConfig(const char* name, bool bResetContent);
-  void moveFromList();
-  void moveToList();
-  void add(const CNxpNfcParam* pParam);
-  list<const CNxpNfcParam*> m_list;
-  bool mValidFile;
-  unsigned long m_timeStamp;
-
-  unsigned long state;
-
-  inline bool Is(unsigned long f) { return (state & f) == f; }
-  inline void Set(unsigned long f) { state |= f; }
-  inline void Reset(unsigned long f) { state &= ~f; }
-};
-
-/*******************************************************************************
-**
-** Function:    isPrintable()
-**
-** Description: determine if 'c' is printable
-**
-** Returns:     1, if printable, otherwise 0
-**
-*******************************************************************************/
-inline bool isPrintable(char c) {
-  return (c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z') ||
-         (c >= '0' && c <= '9') || c == '/' || c == '_' || c == '-' || c == '.';
-}
-
-/*******************************************************************************
-**
-** Function:    isDigit()
-**
-** Description: determine if 'c' is numeral digit
-**
-** Returns:     true, if numerical digit
-**
-*******************************************************************************/
-inline bool isDigit(char c, int base) {
-  if ('0' <= c && c <= '9') return true;
-  if (base == 16) {
-    if (('A' <= c && c <= 'F') || ('a' <= c && c <= 'f')) return true;
-  }
-  return false;
-}
-
-/*******************************************************************************
-**
-** Function:    getDigitValue()
-**
-** Description: return numerical value of a decimal or hex char
-**
-** Returns:     numerical value if decimal or hex char, otherwise 0
-**
-*******************************************************************************/
-inline int getDigitValue(char c, int base) {
-  if ('0' <= c && c <= '9') return c - '0';
-  if (base == 16) {
-    if ('A' <= c && c <= 'F')
-      return c - 'A' + 10;
-    else if ('a' <= c && c <= 'f')
-      return c - 'a' + 10;
-  }
-  return 0;
-}
-
-/*******************************************************************************
-**
-** Function:    findConfigFilePathFromTransportConfigPaths()
-**
-** Description: find a config file path with a given config name from transport
-**              config paths
-**
-** Returns:     none
-**
-*******************************************************************************/
-void findConfigFilePathFromTransportConfigPaths(const string& configName,
-                                                string& filePath) {
-  for (int i = 0; i < transport_config_path_size - 1; i++) {
-    filePath.assign(transport_config_paths[i]);
-    filePath += configName;
-    struct stat file_stat;
-    if (stat(filePath.c_str(), &file_stat) == 0 && S_ISREG(file_stat.st_mode)) {
-      return;
-    }
-  }
-  filePath.assign(transport_config_paths[transport_config_path_size - 1]);
-  filePath += configName;
-}
-
-/*******************************************************************************
-**
-** Function:    CNxpNfcConfig::readConfig()
-**
-** Description: read Config settings and parse them into a linked list
-**              move the element from linked list to a array at the end
-**
-** Returns:     1, if there are any config data, 0 otherwise
-**
-*******************************************************************************/
-bool CNxpNfcConfig::readConfig(const char* name, bool bResetContent) {
-  enum {
-    BEGIN_LINE = 1,
-    TOKEN,
-    STR_VALUE,
-    NUM_VALUE,
-    BEGIN_HEX,
-    BEGIN_QUOTE,
-    END_LINE
-  };
-
-  FILE* fd;
-  struct stat buf;
-  string token;
-  string strValue;
-  unsigned long numValue = 0;
-  CNxpNfcParam* pParam = NULL;
-  int i = 0;
-  int base = 0;
-  char c;
-  int bflag = 0;
-  state = BEGIN_LINE;
-  /* open config file, read it into a buffer */
-  if ((fd = fopen(name, "rb")) == NULL) {
-    LOG(ERROR) << StringPrintf("%s Cannot open config file %s", __func__, name);
-    if (bResetContent) {
-      LOG(ERROR) << StringPrintf("%s Using default value for all settings",
-                                 __func__);
-      mValidFile = false;
-    }
-    return false;
-  }
-  stat(name, &buf);
-  m_timeStamp = (unsigned long)buf.st_mtime;
-
-  mValidFile = true;
-  if (size() > 0) {
-    if (bResetContent)
-      clean();
-    else
-      moveToList();
-  }
-
-  while (!feof(fd) && fread(&c, 1, 1, fd) == 1) {
-    switch (state & 0xff) {
-      case BEGIN_LINE:
-        if (c == '#') {
-          state = END_LINE;
-        } else if (isPrintable(c)) {
-          i = 0;
-          token.erase();
-          strValue.erase();
-          state = TOKEN;
-          token.push_back(c);
-        }
-        break;
-      case TOKEN:
-        if (c == '=') {
-          token.push_back('\0');
-          state = BEGIN_QUOTE;
-        } else if (isPrintable(c)) {
-          token.push_back(c);
-        } else {
-          state = END_LINE;
-        }
-        break;
-      case BEGIN_QUOTE:
-        if (c == '"') {
-          state = STR_VALUE;
-          base = 0;
-        } else if (c == '0') {
-          state = BEGIN_HEX;
-        } else if (isDigit(c, 10)) {
-          state = NUM_VALUE;
-          base = 10;
-          numValue = getDigitValue(c, base);
-          i = 0;
-        } else if (c == '{') {
-          state = NUM_VALUE;
-          bflag = 1;
-          base = 16;
-          i = 0;
-          Set(IsStringValue);
-        } else
-          state = END_LINE;
-
-        break;
-      case BEGIN_HEX:
-        if (c == 'x' || c == 'X') {
-          state = NUM_VALUE;
-          base = 16;
-          numValue = 0;
-          i = 0;
-          break;
-        } else if (isDigit(c, 10)) {
-          state = NUM_VALUE;
-          base = 10;
-          numValue = getDigitValue(c, base);
-          break;
-        } else if (c != '\n' && c != '\r') {
-          state = END_LINE;
-          break;
-        }
-      // fall through to numValue to handle numValue
-
-      case NUM_VALUE:
-        if (isDigit(c, base)) {
-          numValue *= base;
-          numValue += getDigitValue(c, base);
-          ++i;
-        } else if (bflag == 1 &&
-                   (c == ' ' || c == '\r' || c == '\n' || c == '\t')) {
-          break;
-        } else if (base == 16 &&
-                   (c == ',' || c == ':' || c == '-' || c == ' ' || c == '}')) {
-          if (c == '}') {
-            bflag = 0;
-          }
-          if (i > 0) {
-            int n = (i + 1) / 2;
-            while (n-- > 0) {
-              numValue = numValue >> (n * 8);
-              unsigned char c = (numValue)&0xFF;
-              strValue.push_back(c);
-            }
-          }
-
-          Set(IsStringValue);
-          numValue = 0;
-          i = 0;
-        } else {
-          if (c == '\n' || c == '\r') {
-            if (bflag == 0) {
-              state = BEGIN_LINE;
-            }
-          } else {
-            if (bflag == 0) {
-              state = END_LINE;
-            }
-          }
-          if (Is(IsStringValue) && base == 16 && i > 0) {
-            int n = (i + 1) / 2;
-            while (n-- > 0) strValue.push_back(((numValue >> (n * 8)) & 0xFF));
-          }
-          if (strValue.length() > 0)
-            pParam = new CNxpNfcParam(token.c_str(), strValue);
-          else
-            pParam = new CNxpNfcParam(token.c_str(), numValue);
-
-          add(pParam);
-          strValue.erase();
-          numValue = 0;
-        }
-        break;
-      case STR_VALUE:
-        if (c == '"') {
-          strValue.push_back('\0');
-          state = END_LINE;
-          pParam = new CNxpNfcParam(token.c_str(), strValue);
-          add(pParam);
-        } else if (isPrintable(c)) {
-          strValue.push_back(c);
-        }
-        break;
-      case END_LINE:
-        if (c == '\n' || c == '\r') {
-          state = BEGIN_LINE;
-        }
-        break;
-      default:
-        break;
-    }
-  }
-
-  fclose(fd);
-
-  moveFromList();
-  return size() > 0;
-}
-
-/*******************************************************************************
-**
-** Function:    CNxpNfcConfig::CNxpNfcConfig()
-**
-** Description: class constructor
-**
-** Returns:     none
-**
-*******************************************************************************/
-CNxpNfcConfig::CNxpNfcConfig() : mValidFile(true), m_timeStamp(0), state(0) {}
-
-/*******************************************************************************
-**
-** Function:    CNxpNfcConfig::~CNxpNfcConfig()
-**
-** Description: class destructor
-**
-** Returns:     none
-**
-*******************************************************************************/
-CNxpNfcConfig::~CNxpNfcConfig() {}
-
-/*******************************************************************************
-**
-** Function:    CNxpNfcConfig::GetInstance()
-**
-** Description: get class singleton object
-**
-** Returns:     none
-**
-*******************************************************************************/
-CNxpNfcConfig& CNxpNfcConfig::GetInstance() {
-  static CNxpNfcConfig theInstance;
-
-  if (theInstance.size() == 0 && theInstance.mValidFile) {
-    string strPath;
-    if (alternative_config_path[0] != '\0') {
-      strPath.assign(alternative_config_path);
-      strPath += config_name;
-      theInstance.readConfig(strPath.c_str(), true);
-      if (!theInstance.empty()) {
-        return theInstance;
-      }
-    }
-    findConfigFilePathFromTransportConfigPaths(config_name, strPath);
-    theInstance.readConfig(strPath.c_str(), true);
-  }
-
-  return theInstance;
-}
-
-/*******************************************************************************
-**
-** Function:    CNxpNfcConfig::getValue()
-**
-** Description: get a string value of a setting
-**
-** Returns:     true if setting exists
-**              false if setting does not exist
-**
-*******************************************************************************/
-bool CNxpNfcConfig::getValue(const char* name, char* pValue, size_t len) const {
-  const CNxpNfcParam* pParam = find(name);
-  if (pParam == NULL) return false;
-
-  if (pParam->str_len() > 0) {
-    memset(pValue, 0, len);
-    memcpy(pValue, pParam->str_value(), pParam->str_len());
-    return true;
-  }
-  return false;
-}
-
-bool CNxpNfcConfig::getValue(const char* name, char* pValue, long len,
-                             long* readlen) const {
-  const CNxpNfcParam* pParam = find(name);
-  if (pParam == NULL) return false;
-
-  if (pParam->str_len() > 0) {
-    if (pParam->str_len() <= (unsigned long)len) {
-      memset(pValue, 0, len);
-      memcpy(pValue, pParam->str_value(), pParam->str_len());
-      *readlen = pParam->str_len();
-    } else {
-      *readlen = -1;
-    }
-
-    return true;
-  }
-  return false;
-}
-
-/*******************************************************************************
-**
-** Function:    CNxpNfcConfig::getValue()
-**
-** Description: get a long numerical value of a setting
-**
-** Returns:     true if setting exists
-**              false if setting does not exist
-**
-*******************************************************************************/
-bool CNxpNfcConfig::getValue(const char* name, unsigned long& rValue) const {
-  const CNxpNfcParam* pParam = find(name);
-  if (pParam == NULL) return false;
-
-  if (pParam->str_len() == 0) {
-    rValue = static_cast<unsigned long>(pParam->numValue());
-    return true;
-  }
-  return false;
-}
-
-/*******************************************************************************
-**
-** Function:    CNxpNfcConfig::getValue()
-**
-** Description: get a short numerical value of a setting
-**
-** Returns:     true if setting exists
-**              false if setting does not exist
-**
-*******************************************************************************/
-bool CNxpNfcConfig::getValue(const char* name, unsigned short& rValue) const {
-  const CNxpNfcParam* pParam = find(name);
-  if (pParam == NULL) return false;
-
-  if (pParam->str_len() == 0) {
-    rValue = static_cast<unsigned short>(pParam->numValue());
-    return true;
-  }
-  return false;
-}
-
-/*******************************************************************************
-**
-** Function:    CNxpNfcConfig::find()
-**
-** Description: search if a setting exist in the setting array
-**
-** Returns:     pointer to the setting object
-**
-*******************************************************************************/
-const CNxpNfcParam* CNxpNfcConfig::find(const char* p_name) const {
-  if (size() == 0) return NULL;
-
-  for (const_iterator it = begin(), itEnd = end(); it != itEnd; ++it) {
-    if (**it < p_name) {
-      continue;
-    } else if (**it == p_name) {
-      if ((*it)->str_len() > 0) {
-        DLOG_IF(INFO, gLog_level.extns_log_level >= NXPLOG_LOG_DEBUG_LOGLEVEL)
-            << StringPrintf("%s found %s=%s\n", __func__, p_name,
-                            (*it)->str_value());
-      } else {
-        DLOG_IF(INFO, gLog_level.extns_log_level >= NXPLOG_LOG_DEBUG_LOGLEVEL)
-            << StringPrintf("%s found %s=(0x%lx)\n", __func__, p_name,
-                            (*it)->numValue());
-      }
-      return *it;
-    } else
-      break;
-  }
-  return NULL;
-}
-
-/*******************************************************************************
-**
-** Function:    CNxpNfcConfig::clean()
-**
-** Description: reset the setting array
-**
-** Returns:     none
-**
-*******************************************************************************/
-void CNxpNfcConfig::clean() {
-  if (size() == 0) return;
-
-  for (iterator it = begin(), itEnd = end(); it != itEnd; ++it) delete *it;
-
-  clear();
-}
-
-/*******************************************************************************
-**
-** Function:    CNxpNfcConfig::Add()
-**
-** Description: add a setting object to the list
-**
-** Returns:     none
-**
-*******************************************************************************/
-void CNxpNfcConfig::add(const CNxpNfcParam* pParam) {
-  if (m_list.size() == 0) {
-    m_list.push_back(pParam);
-    return;
-  }
-  for (list<const CNxpNfcParam*>::iterator it = m_list.begin(),
-                                           itEnd = m_list.end();
-       it != itEnd; ++it) {
-    if (**it < pParam->c_str()) continue;
-
-    m_list.insert(it, pParam);
-    return;
-  }
-  m_list.push_back(pParam);
-}
-
-/*******************************************************************************
-**
-** Function:    CNxpNfcConfig::moveFromList()
-**
-** Description: move the setting object from list to array
-**
-** Returns:     none
-**
-*******************************************************************************/
-void CNxpNfcConfig::moveFromList() {
-  if (m_list.size() == 0) return;
-
-  for (list<const CNxpNfcParam*>::iterator it = m_list.begin(),
-                                           itEnd = m_list.end();
-       it != itEnd; ++it)
-    push_back(*it);
-
-  m_list.clear();
-}
-
-/*******************************************************************************
-**
-** Function:    CNxpNfcConfig::moveToList()
-**
-** Description: move the setting object from array to list
-**
-** Returns:     none
-**
-*******************************************************************************/
-void CNxpNfcConfig::moveToList() {
-  if (m_list.size() != 0) m_list.clear();
-
-  for (iterator it = begin(), itEnd = end(); it != itEnd; ++it)
-    m_list.push_back(*it);
-
-  clear();
-}
-
-/*******************************************************************************
-**
-** Function:    CNxpNfcConfig::checkTimestamp()
-**
-** Description: check if config file has modified
-**
-** Returns:     0 if not modified, 1 otherwise.
-**
-*******************************************************************************/
-int CNxpNfcConfig::checkTimestamp() {
-  FILE* fd;
-  struct stat st;
-  unsigned long value = 0;
-  int ret = 0;
-
-  if (stat(config_timestamp_path, &st) != 0) {
-    DLOG_IF(INFO, nfc_debug_enabled) << StringPrintf(
-        "%s file %s not exist, creat it.", __func__, config_timestamp_path);
-    if ((fd = fopen(config_timestamp_path, "w+")) != NULL) {
-      fwrite(&m_timeStamp, sizeof(unsigned long), 1, fd);
-      fclose(fd);
-    }
-    return 1;
-  } else {
-    fd = fopen(config_timestamp_path, "r+");
-    if (fd == NULL) {
-      LOG(ERROR) << StringPrintf("%s Cannot open file %s", __func__,
-                                 config_timestamp_path);
-      return 1;
-    }
-
-    fread(&value, sizeof(unsigned long), 1, fd);
-    ret = (value != m_timeStamp);
-    if (ret) {
-      fseek(fd, 0, SEEK_SET);
-      fwrite(&m_timeStamp, sizeof(unsigned long), 1, fd);
-    }
-    fclose(fd);
-  }
-  return ret;
-}
-
-/*******************************************************************************
-**
-** Function:    CNxpNfcParam::CNxpNfcParam()
-**
-** Description: class constructor
-**
-** Returns:     none
-**
-*******************************************************************************/
-CNxpNfcParam::CNxpNfcParam() : m_numValue(0) {}
-
-/*******************************************************************************
-**
-** Function:    CNxpNfcParam::~CNxpNfcParam()
-**
-** Description: class destructor
-**
-** Returns:     none
-**
-*******************************************************************************/
-CNxpNfcParam::~CNxpNfcParam() {}
-
-/*******************************************************************************
-**
-** Function:    CNxpNfcParam::CNxpNfcParam()
-**
-** Description: class copy constructor
-**
-** Returns:     none
-**
-*******************************************************************************/
-CNxpNfcParam::CNxpNfcParam(const char* name, const string& value)
-    : string(name), m_str_value(value), m_numValue(0) {}
-
-/*******************************************************************************
-**
-** Function:    CNxpNfcParam::CNxpNfcParam()
-**
-** Description: class copy constructor
-**
-** Returns:     none
-**
-*******************************************************************************/
-CNxpNfcParam::CNxpNfcParam(const char* name, unsigned long value)
-    : string(name), m_numValue(value) {}
-
-/*******************************************************************************
-**
-** Function:    GetStrValue
-**
-** Description: API function for getting a string value of a setting
-**
-** Returns:     True if found, otherwise False.
-**
-*******************************************************************************/
-extern int GetNxpStrValue(const char* name, char* pValue, unsigned long len) {
-  CNxpNfcConfig& rConfig = CNxpNfcConfig::GetInstance();
-
-  return rConfig.getValue(name, pValue, len);
-}
-
-/*******************************************************************************
-**
-** Function:    GetByteArrayValue()
-**
-** Description: Read byte array value from the config file.
-**
-** Parameters:
-**              name    - name of the config param to read.
-**              pValue  - pointer to input buffer.
-**              bufflen - input buffer length.
-**              len     - out parameter to return the number of bytes read from
-*config file,
-**                        return -1 in case bufflen is not enough.
-**
-** Returns:     TRUE[1] if config param name is found in the config file, else
-*FALSE[0]
-**
-*******************************************************************************/
-extern int GetNxpByteArrayValue(const char* name, char* pValue, long bufflen,
-                                long* len) {
-  CNxpNfcConfig& rConfig = CNxpNfcConfig::GetInstance();
-
-  return rConfig.getValue(name, pValue, bufflen, len);
-}
-
-/*******************************************************************************
-**
-** Function:    GetNumValue
-**
-** Description: API function for getting a numerical value of a setting
-**
-** Returns:     true, if successful
-**
-*******************************************************************************/
-extern int GetNxpNumValue(const char* name, void* pValue, unsigned long len) {
-  if (!pValue) return false;
-
-  CNxpNfcConfig& rConfig = CNxpNfcConfig::GetInstance();
-  const CNxpNfcParam* pParam = rConfig.find(name);
-
-  if (pParam == NULL) return false;
-
-  unsigned long v = pParam->numValue();
-  if (v == 0 && pParam->str_len() > 0 && pParam->str_len() < 4) {
-    const unsigned char* p = (const unsigned char*)pParam->str_value();
-    for (unsigned int i = 0; i < pParam->str_len(); ++i) {
-      v *= 256;
-      v += *p++;
-    }
-  }
-  switch (len) {
-    case sizeof(unsigned long):
-      *(static_cast<unsigned long*>(pValue)) = (unsigned long)v;
-      break;
-    case sizeof(unsigned short):
-      *(static_cast<unsigned short*>(pValue)) = (unsigned short)v;
-      break;
-    case sizeof(unsigned char):
-      *(static_cast<unsigned char*>(pValue)) = (unsigned char)v;
-      break;
-    default:
-      return false;
-  }
-  return true;
-}
-
-/*******************************************************************************
-**
-** Function:    resetConfig
-**
-** Description: reset settings array
-**
-** Returns:     none
-**
-*******************************************************************************/
-extern void resetNxpConfig() {
-  CNxpNfcConfig& rConfig = CNxpNfcConfig::GetInstance();
-
-  rConfig.clean();
-}
-
-/*******************************************************************************
-**
-** Function:    readOptionalConfig()
-**
-** Description: read Config settings from an optional conf file
-**
-** Returns:     none
-**
-*******************************************************************************/
-void readOptionalConfig(const char* extra) {
-  string strPath;
-  string configName(extra_config_base);
-  configName += extra;
-  configName += extra_config_ext;
-
-  if (alternative_config_path[0] != '\0') {
-    strPath.assign(alternative_config_path);
-    strPath += configName;
-  } else {
-    findConfigFilePathFromTransportConfigPaths(configName, strPath);
-  }
-
-  CNxpNfcConfig::GetInstance().readConfig(strPath.c_str(), false);
-}
-
-/*******************************************************************************
-**
-** Function:    isNxpConfigModified()
-**
-** Description: check if config file has modified
-**
-** Returns:     0 if not modified, 1 otherwise.
-**
-*******************************************************************************/
-extern int isNxpConfigModified() {
-  CNxpNfcConfig& rConfig = CNxpNfcConfig::GetInstance();
-  return rConfig.checkTimestamp();
-}
diff --git a/nci/jni/extns/pn54x/src/utils/phNxpConfig.h b/nci/jni/extns/pn54x/src/utils/phNxpConfig.h
deleted file mode 100644
index abda625..0000000
--- a/nci/jni/extns/pn54x/src/utils/phNxpConfig.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright (C) 2015 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef _NXP_CONFIG_H
-#define _NXP_CONFIG_H
-
-int GetNxpStrValue(const char* name, char* p_value, unsigned long len);
-int GetNxpNumValue(const char* name, void* p_value, unsigned long len);
-int GetNxpByteArrayValue(const char* name, char* pValue, long bufflen,
-                         long* len);
-void resetNxpConfig(void);
-int isNxpConfigModified();
-
-#define NAME_NXPLOG_EXTNS_LOGLEVEL "NXPLOG_EXTNS_LOGLEVEL"
-#define NAME_NXPLOG_NCIHAL_LOGLEVEL "NXPLOG_NCIHAL_LOGLEVEL"
-#define NAME_NXPLOG_NCIX_LOGLEVEL "NXPLOG_NCIX_LOGLEVEL"
-#define NAME_NXPLOG_NCIR_LOGLEVEL "NXPLOG_NCIR_LOGLEVEL"
-#define NAME_NXPLOG_FWDNLD_LOGLEVEL "NXPLOG_FWDNLD_LOGLEVEL"
-#define NAME_NXPLOG_TML_LOGLEVEL "NXPLOG_TML_LOGLEVEL"
-
-#define NAME_MIFARE_READER_ENABLE "MIFARE_READER_ENABLE"
-#define NAME_FW_STORAGE "FW_STORAGE"
-#define NAME_NXP_ACT_PROP_EXTN "NXP_ACT_PROP_EXTN"
-#define NAME_NXP_RF_CONF_BLK_1 "NXP_RF_CONF_BLK_1"
-#define NAME_NXP_RF_CONF_BLK_2 "NXP_RF_CONF_BLK_2"
-#define NAME_NXP_RF_CONF_BLK_3 "NXP_RF_CONF_BLK_3"
-#define NAME_NXP_RF_CONF_BLK_4 "NXP_RF_CONF_BLK_4"
-#define NAME_NXP_CORE_CONF_EXTN "NXP_CORE_CONF_EXTN"
-#define NAME_NXP_CORE_CONF "NXP_CORE_CONF"
-/* default configuration */
-#define default_storage_location "/data/nfc"
-
-#endif  // _NXP_CONFIG_H