summaryrefslogtreecommitdiffstats
path: root/inc
diff options
context:
space:
mode:
authorRob von Behren <jrvb@google.com>2011-09-16 15:05:25 -0700
committerJeff Hamilton <jham@android.com>2011-09-20 23:28:26 -0500
commit6dd948323de0f31b413c9f19a905f1c145c9c456 (patch)
tree2f91ca33fbb6521fe21ad80f79e5e3c9c0d92a2c /inc
parent71b688d07db1e7fd32a1e02f29b9779f0d0db377 (diff)
downloadexternal_libnfc-nxp-6dd948323de0f31b413c9f19a905f1c145c9c456.zip
external_libnfc-nxp-6dd948323de0f31b413c9f19a905f1c145c9c456.tar.gz
external_libnfc-nxp-6dd948323de0f31b413c9f19a905f1c145c9c456.tar.bz2
Manual port of 6900b4 from gingerbread:
Patch to add Secure Download Mechanism in the libnfc This patch permit to support secure download update and also to avoid locking states in case of download failures Bug: 5331837 Change-Id: Ia5b6d9baf57231b0193bbbe85c88c7df557017c6
Diffstat (limited to 'inc')
-rw-r--r--inc/phNfcConfig.h9
-rw-r--r--inc/phNfcHalTypes.h21
2 files changed, 29 insertions, 1 deletions
diff --git a/inc/phNfcConfig.h b/inc/phNfcConfig.h
index e7386d9..bcefaec 100644
--- a/inc/phNfcConfig.h
+++ b/inc/phNfcConfig.h
@@ -375,11 +375,15 @@
/**< Macro to Enable the Card Emulation Feature */
/* #define HOST_EMULATION */
+#define NXP_HAL_VERIFY_EEPROM_CRC 0x01U
+
/**< Macro to Enable the Download Mode Feature */
#define FW_DOWNLOAD
/**< Macro to Enable the Firmware Download Timer */
-#define FW_DOWNLOAD_TIMER
+/* 0x01U to use overall timeout */
+/* 0x02U to use per frame timeout */
+#define FW_DOWNLOAD_TIMER 0x02U
/**< Macro to Verify the Firmware Download */
/* #define FW_DOWNLOAD_VERIFY */
@@ -388,6 +392,9 @@
#define NXP_FW_INTEGRITY_CHK 1
#endif
+/* To specify the Maximum TX/RX Len */
+#define NXP_FW_MAX_TX_RX_LEN 0x200
+
#define UICC_CONNECTIVITY_PATCH
/* Work around to Delay the initiator activation */
diff --git a/inc/phNfcHalTypes.h b/inc/phNfcHalTypes.h
index a242450..522df6d 100644
--- a/inc/phNfcHalTypes.h
+++ b/inc/phNfcHalTypes.h
@@ -47,6 +47,26 @@
#include <phNfcCompId.h>
#include <phNfcConfig.h>
+#ifndef NXP_HAL_MEM_INFO_SIZE
+#define NXP_HAL_MEM_INFO_SIZE 0x01U
+#endif
+
+#if (NXP_HAL_MEM_INFO_SIZE > 0x01)
+#define NXP_FW_UPLOAD_PROGRESS 0x965AU
+#define NXP_FW_UPLOAD_SUCCESS 0x0000U
+#else
+#define NXP_FW_UPLOAD_PROGRESS 0x5AU
+#define NXP_FW_UPLOAD_SUCCESS 0x00U
+#endif
+
+
+typedef struct phHal_sMemInfo
+{
+ uint16_t fw_magic;
+ uint16_t fw_rfu;
+ uint32_t hal_version;
+}phHal_sMemInfo_t;
+
/** \ingroup grp_hal_common
*
@@ -836,6 +856,7 @@ typedef enum phHal_Event {
NFC_INFO_TXLDO_OVERCUR = 0x71U,
NFC_INFO_MEM_VIOLATION = 0x73U,
NFC_INFO_TEMP_OVERHEAT = 0x74U,
+ NFC_INFO_LLC_ERROR = 0x75U,
/* NXP EVENTS */
NFC_EVT_MIFARE_ACCESS = 0x35,