diff --git a/Android.mk b/Android.mk
index 2ae7f39..8f64cba 100644
--- a/Android.mk
+++ b/Android.mk
@@ -106,14 +106,11 @@
 LOCAL_SRC_FILES += Linux_x86/phDal4Nfc_messageQueueLib.c
 
 # Really verbose:
-#LOCAL_CFLAGS += -DNXP_MESSAGING -DANDROID -DDEBUG -DNFC_TIMER_CONTEXT -DDAL_TRACE -DINCLUDE_DALINIT_DEINIT -pipe -fomit-frame-pointer -Wall -Wno-trigraphs -Werror-implicit-function-declaration  -fno-strict-aliasing -mapcs -mno-sched-prolog -mabi=aapcs-linux -mno-thumb-interwork -msoft-float -Uarm -fno-common -fpic
+#LOCAL_CFLAGS += -DNXP_MESSAGING -DANDROID -DDEBUG -DDAL_TRACE -DINCLUDE_DALINIT_DEINIT -pipe -fomit-frame-pointer -Wall -Wno-trigraphs -Werror-implicit-function-declaration  -fno-strict-aliasing -mapcs -mno-sched-prolog -mabi=aapcs-linux -mno-thumb-interwork -msoft-float -Uarm -fno-common -fpic
 # Just show I2C traffic:
-#LOCAL_CFLAGS += -DNXP_MESSAGING -DANDROID -DNFC_TIMER_CONTEXT -DINCLUDE_DALINIT_DEINIT -DLOW_LEVEL_TRACES -pipe -fomit-frame-pointer -Wall -Wno-trigraphs -Werror-implicit-function-declaration  -fno-strict-aliasing -mapcs -mno-sched-prolog -mabi=aapcs-linux -mno-thumb-interwork -msoft-float -Uarm -fno-common -fpic
+#LOCAL_CFLAGS += -DNXP_MESSAGING -DANDROID -DINCLUDE_DALINIT_DEINIT -DLOW_LEVEL_TRACES -pipe -fomit-frame-pointer -Wall -Wno-trigraphs -Werror-implicit-function-declaration  -fno-strict-aliasing -mapcs -mno-sched-prolog -mabi=aapcs-linux -mno-thumb-interwork -msoft-float -Uarm -fno-common -fpic
 # Quiet:
-LOCAL_CFLAGS += -DNXP_MESSAGING -DANDROID -DNFC_TIMER_CONTEXT -DINCLUDE_DALINIT_DEINIT -pipe -fomit-frame-pointer -Wall -Wno-trigraphs -Werror-implicit-function-declaration  -fno-strict-aliasing -fpic
-ifeq ($(TARGET_ARCH),arm)
-LOCAL_CFLAGS += -mapcs -mno-sched-prolog -mabi=aapcs-linux -mno-thumb-interwork -msoft-float -Uarm -fno-common
-endif
+LOCAL_CFLAGS += -DNXP_MESSAGING -DANDROID -DINCLUDE_DALINIT_DEINIT -pipe -fomit-frame-pointer -Wall -Wno-trigraphs -Werror-implicit-function-declaration  -fno-strict-aliasing -mapcs -mno-sched-prolog -mabi=aapcs-linux -mno-thumb-interwork -msoft-float -Uarm -fno-common -fpic
 
 ifeq ($(NFC_BUILD_VARIANT),debug)
 LOCAL_CFLAGS += -DDEBUG -D_DEBUG
diff --git a/Linux_x86/phDal4Nfc.c b/Linux_x86/phDal4Nfc.c
index ec92566..6d3c9fb 100644
--- a/Linux_x86/phDal4Nfc.c
+++ b/Linux_x86/phDal4Nfc.c
@@ -282,7 +282,7 @@
    return result;
 }
 
-NFCSTATUS phDal4Nfc_ConfigRelease(void *pHwRef)
+NFCSTATUS phDal4Nfc_ConfigRelease( void *pHwRef)
 {
 
    NFCSTATUS result = NFCSTATUS_SUCCESS;
@@ -292,23 +292,19 @@
 
    if (gDalContext.hw_valid == TRUE)
    {
-       /* Signal the read and write threads to exit.  NOTE: there
-          actually is no write thread!  :)  */
-       DAL_PRINT("Stop Reader Thread");
-       gReadWriteContext.nReadThreadAlive = 0;
-       gReadWriteContext.nWriteThreadAlive = 0;
+      DAL_PRINT("Release Read Semaphore");
+      sem_post(&nfc_read_sem);
 
-       /* Wake up the read thread so it can exit */
-       DAL_PRINT("Release Read Semaphore");
-       sem_post(&nfc_read_sem);
+       /* Kill the read and write threads */
+      DAL_PRINT("Stop Reader Thread");
+      gReadWriteContext.nReadThreadAlive = 0;
+      gReadWriteContext.nWriteThreadAlive = 0;
 
-       DAL_DEBUG("phDal4Nfc_ConfigRelease - doing pthread_join(%d)",
-                 gReadWriteContext.nReadThread);
-       if (pthread_join(gReadWriteContext.nReadThread,  &pThreadReturn) != 0)
-       {
-           result = PHNFCSTVAL(CID_NFC_DAL, NFCSTATUS_FAILED);
-           DAL_PRINT("phDal4Nfc_ConfigRelease  KO");
-       }
+      if (pthread_join(gReadWriteContext.nReadThread,  &pThreadReturn) != 0)
+      {
+         result = PHNFCSTVAL(CID_NFC_DAL, NFCSTATUS_FAILED);
+         DAL_PRINT("phDal4Nfc_ConfigRelease  KO");
+      }
 
       /* Close the message queue */
 #ifdef USE_MQ_MESSAGE_QUEUE
@@ -587,7 +583,6 @@
 
    gDalContext.hw_valid = TRUE;
 
-   phDal4Nfc_Reset(1);
    phDal4Nfc_Reset(0);
    phDal4Nfc_Reset(1);
 
@@ -682,20 +677,12 @@
 	DAL_PRINT("RX Thread Sem Lock\n");
         sem_wait(&nfc_read_sem);
         DAL_PRINT("RX Thread Sem UnLock\n");
-
-        if (!gReadWriteContext.nReadThreadAlive)
-        {
-            /* got the signal that we should exit.  NOTE: we don't
-               attempt to read below, since the read may block */
-            break;
-        }
-
         /* Issue read operation.*/
 
     i2c_error_count = 0;
 retry:
 	gReadWriteContext.nNbOfBytesRead=0;
-	DAL_DEBUG("RX Thread *New *** *****Request Length = %d",gReadWriteContext.nNbOfBytesToRead);
+	DAL_DEBUG("\n*New *** *****Request Length = %d",gReadWriteContext.nNbOfBytesToRead);
 	memsetRet=memset(gReadWriteContext.pReadBuffer,0,gReadWriteContext.nNbOfBytesToRead);
 
 	/* Wait for IRQ !!!  */
@@ -709,12 +696,12 @@
     if(gReadWriteContext.nNbOfBytesToRead == 1 && gReadWriteContext.pReadBuffer[0] == 0x57)
     {
         i2c_error_count++;
-        DAL_DEBUG("RX Thread Read 0x57 %d times\n", i2c_error_count);
+        DAL_DEBUG("Read 0x57 %d times\n", i2c_error_count);
         if (i2c_error_count < 5) {
             usleep(2000);
             goto retry;
         }
-        DAL_PRINT("RX Thread NOTHING TO READ, RECOVER");
+        DAL_PRINT("NOTHING TO READ, RECOVER");
         phOsalNfc_RaiseException(phOsalNfc_e_UnrecovFirmwareErr,1);
     }
     else
@@ -723,14 +710,14 @@
 #ifdef LOW_LEVEL_TRACES
         phOsalNfc_PrintData("Received buffer", (uint16_t)gReadWriteContext.nNbOfBytesRead, gReadWriteContext.pReadBuffer);
 #endif
-        DAL_DEBUG("RX Thread Read ok. nbToRead=%d\n", gReadWriteContext.nNbOfBytesToRead);
-        DAL_DEBUG("RX Thread NbReallyRead=%d\n", gReadWriteContext.nNbOfBytesRead);
-        DAL_PRINT("RX Thread ReadBuff[]={ ");
+        DAL_DEBUG("Read ok. nbToRead=%d\n", gReadWriteContext.nNbOfBytesToRead);
+        DAL_DEBUG("NbReallyRead=%d\n", gReadWriteContext.nNbOfBytesRead);
+        DAL_PRINT("ReadBuff[]={ ");
         for (i = 0; i < gReadWriteContext.nNbOfBytesRead; i++)
         {
-          DAL_DEBUG("RX Thread 0x%x ", gReadWriteContext.pReadBuffer[i]);
+          DAL_DEBUG("0x%x ", gReadWriteContext.pReadBuffer[i]);
         }
-        DAL_PRINT("RX Thread }\n");
+        DAL_PRINT("}\n");
 
         /* read completed immediately */
         sMsg.eMsgType= PHDAL4NFC_READ_MESSAGE;
@@ -742,9 +729,6 @@
     }
 
     } /* End of thread Loop*/
-
-    DAL_PRINT("RX Thread  exiting");
-
     return TRUE;
 }
 
@@ -968,3 +952,4 @@
 }
 
 #undef _DAL_4_NFC_C
+
diff --git a/inc/phNfcConfig.h b/inc/phNfcConfig.h
index b11e79d..19a881b 100644
--- a/inc/phNfcConfig.h
+++ b/inc/phNfcConfig.h
@@ -369,15 +369,11 @@
 /**< 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 */
-/* 0x01U to use overall timeout */
-/* 0x02U to use per frame timeout */
-#define FW_DOWNLOAD_TIMER   0x02U
+#define FW_DOWNLOAD_TIMER
 
 /**< Macro to Verify the Firmware Download */
 /* #define FW_DOWNLOAD_VERIFY */
@@ -386,9 +382,6 @@
 #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 47e9036..748f01b 100644
--- a/inc/phNfcHalTypes.h
+++ b/inc/phNfcHalTypes.h
@@ -36,8 +36,6 @@
  *
  * File: \ref phNfcHalTypes.h
  *
- * Developed By: Ravindra U.
- *
  */
 
 /*@{*/
@@ -49,26 +47,6 @@
 #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
  *
@@ -857,13 +835,7 @@
     /* NXP Specific System Information Events */
     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,
-    NFC_EVT_APDU_RECEIVED          = 0x36,
-    NFC_EVT_EMV_CARD_REMOVAL       = 0x37
+    NFC_INFO_TEMP_OVERHEAT       = 0x74U
 
 }phHal_Event_t;
 
diff --git a/src/phDnldNfc.c b/src/phDnldNfc.c
index 0c11377..76fd88b 100644
--- a/src/phDnldNfc.c
+++ b/src/phDnldNfc.c
@@ -58,6 +58,9 @@
 #define STATIC static
 #endif
 
+#define SECTION_HDR
+
+
 #if defined (DNLD_SUMMARY) && !defined (DNLD_TRACE)
 #define DNLD_TRACE
 #endif
@@ -88,53 +91,12 @@
 #define DNLD_PRINT_BUFFER(msg,buf,len)
 #endif
 
-#define DO_DELAY(period)        { unsigned i=0; for(;i<period;i++); }
-
-#define PHDNLD_DNLD_DELAY        0x1000U
-#define PHDNLD_MAX_PACKET        0x0200U  /* Max Total Packet Size is 512 */
-#define PHDNLD_DATA_SIZE         ((PHDNLD_MAX_PACKET)- 8U) /* 0x01F8U */ 
-                                                     /* Max Data Size is 504 */
-#define PHDNLD_MIN_PACKET        0x03U    /* Minimum Packet Size is 3*/
-
-#define DNLD_DEFAULT_RESPONSE_TIMEOUT   0x4000U
-
-#define NXP_FW_MIN_TX_RX_LEN     0x0AU
-
-
-#if defined( NXP_FW_MAX_TX_RX_LEN ) && \
-     ( NXP_FW_MAX_TX_RX_LEN > NXP_FW_MIN_TX_RX_LEN )
-
-#define PHDNLD_FW_TX_RX_LEN   NXP_FW_MAX_TX_RX_LEN
-
-#elif !defined( NXP_FW_MAX_TX_RX_LEN )
-
-/* To specify the Maximum TX/RX Len */
-#define NXP_FW_MAX_TX_RX_LEN   0x200
-#define PHDNLD_FW_TX_RX_LEN   NXP_FW_MAX_TX_RX_LEN
-
-#else
-
-#define PHDNLD_FW_TX_RX_LEN   NXP_FW_MIN_TX_RX_LEN
-
-#endif
-
 #define PHDNLD_FRAME_LEN_SIZE    0x02U
 #define PHDNLD_ADDR_SIZE         0x03U
 #define PHDNLD_DATA_LEN_SIZE     0x02U
-#define PHDNLD_FRAME_DATA_OFFSET 0x03U
-
-#define DNLD_SM_UNLOCK_MASK      0x01U
-#define DNLD_TRIM_MASK           0x02U
-#define DNLD_RESET_MASK          0x04U
-#define DNLD_VERIFY_MASK         0x08U
-#define DNLD_CRITICAL_MASK       0x10U
-
-
-#define NXP_NFC_IMAG_FW_MAX      0x05U
-
-#define PHDNLD_FW_PATCH_SEC      0x5FU
-
-#define PHDNLD_PAGE_SIZE         0x80U    /* Page Size Configured for 64 Bytes */
+#define PHDNLD_MIN_PACKET        0x03U    /* Minimum Packet Size is 3*/
+#define PHDNLD_MAX_PACKET        0x0200U  /* Max Total Packet Size is 512 */
+#define PHDNLD_DATA_SIZE         0x01F8U  /* Max Data Size is 504 */
 
 #define FW_MAX_SECTION           0x15U    /* Max Number of Sections */
 
@@ -142,14 +104,11 @@
 
 #define DNLD_CRC32_SIZE			 0x04U
 
-#define DNLD_CFG_PG_ADDR         0x00008000U
-#define DNLD_FW_CODE_ADDR        0x00800000U
-#define DNLD_PATCH_CODE_ADDR     0x00018800U
-#define DNLD_PATCH_TABLE_ADDR    0x00008200U
+#define DNLD_FW_CODE_ADDR        0x00800000
+#define DNLD_PATCH_CODE_ADDR     0x00018800
+#define DNLD_PATCH_TABLE_ADDR    0x00008200
 
 
-/* Raw Command to pass the Data in Download Mode */
-#define PHDNLD_CMD_RAW                  0x00U
 /* Command to Reset the Device in Download Mode */
 #define PHDNLD_CMD_RESET                0x01U
 /* Command to Read from the Address specified in Download Mode */
@@ -157,7 +116,6 @@
 #define PHDNLD_CMD_READ_LEN             0x0005U
 /* Command to write to the Address specified in Download Mode */
 #define PHDNLD_CMD_WRITE                0x08U
-#define PHDNLD_CMD_SEC_WRITE            0x0CU
 #define PHDNLD_CMD_WRITE_MIN_LEN        0x0005U
 #define PHDNLD_CMD_WRITE_MAX_LEN        PHDNLD_DATA_SIZE
 /* Command to verify the data written */
@@ -178,9 +136,6 @@
 /* Command to verify the Integrity of the data written */
 #define PHDNLD_CMD_CHECK_INTEGRITY      0x0BU
 
-/* Command to verify the Integrity of the data written */
-#define PHDNLD_CMD_ENCAPSULATE          0x0DU
-
 #define CHECK_INTEGRITY_RESP_CRC16_LEN  0x03U
 #define CHECK_INTEGRITY_RESP_CRC32_LEN  0x05U
 #define CHECK_INTEGRITY_RESP_COMP_LEN   0x10U
@@ -198,23 +153,8 @@
 #define PHDNLD_RESP_PROTOCOL_ERROR      0x0BU
 /* Invalid parameter Response to a Command Sent in the Download Mode */
 #define PHDNLD_RESP_INVALID_PARAMETER   0x11U
-/* Command Not Supported Response to a Command Sent in the Download Mode */
-#define PHDNLD_RESP_CMD_NOT_SUPPORTED   0x13U
 /* Length parameter error Response to a Command Sent in the Download Mode */
 #define PHDNLD_RESP_INVALID_LENGTH      0x18U
-/* Checksum Error Response to a Command Sent in the Download Mode */
-#define PHDNLD_RESP_CHKSUM_ERROR        0x19U
-/* Version already uptodate Response to a Command Sent in the Download Mode */
-#define PHDNLD_RESP_VERSION_UPTODATE    0x1DU
-/*  Memory operation error during the processing of
-                 the Command Frame in the Download Mode */
-#define PHDNLD_RESP_MEMORY_UPDATE_ERROR 0x20U
-/*  The Chaining of the Command Frame was Successful in the Download Mode */
-#define PHDNLD_RESP_CHAINING_SUCCESS    0x21U
-/*  The Command is not allowed anymore in the Download Mode */
-#define PHDNLD_RESP_CMD_NOT_ALLOWED     0xE0U
-/*  The Error during the Chaining the Command Frame in the Download Mode */
-#define PHDNLD_RESP_CHAINING_ERROR      0xE6U
 /* Write Error Response to a Command Sent in the Download Mode */
 #define PHDNLD_RESP_WRITE_ERROR         0x74U
 
@@ -222,7 +162,7 @@
 
 #define NXP_MAX_DNLD_RETRY              0x02U
 
-#define NXP_MAX_SECTION_WRITE           0x05U
+#define NXP_MAX_SECTION_WRITE           0x04U
 
 #define NXP_PATCH_VER_INDEX             0x05U
 
@@ -236,7 +176,6 @@
 typedef enum phDnldNfc_eSeqType{
     DNLD_SEQ_RESET                              = 0x00U,
     DNLD_SEQ_INIT,
-    DNLD_SEQ_RAW,
     DNLD_SEQ_LOCK,
     DNLD_SEQ_UNLOCK,
     DNLD_SEQ_UPDATE,
@@ -258,8 +197,6 @@
 typedef enum phDnldNfc_eSeq
 {
     phDnld_Reset_Seq        = 0x00,
-    phDnld_Activate_Patch,
-    phDnld_Deactivate_Patch,
     phDnld_Update_Patch,
     phDnld_Update_Patchtable,
     phDnld_Lock_System,
@@ -268,7 +205,6 @@
     phDnld_Verify_Integrity,
     phDnld_Verify_Section,
     phDnld_Complete_Seq,
-    phDnld_Raw_Upgrade,
     phDnld_Invalid_Seq
 }phDnldNfc_eSeq_t;
 
@@ -297,7 +233,7 @@
   uint8_t           img_data_offset;
   /* Number of fimware images available in the img_data */
   uint8_t           no_of_fw_img;
-  /* Fimware image Padding in the img_data */
+  /* Number of fimware images available in the img_data */
   uint8_t           fw_img_pad[2];
  /* HW Compatiblity table for the set of the Hardwares */
   hw_comp_tbl_t     comp_tbl;
@@ -326,12 +262,25 @@
 {
   uint8_t            section_hdr_len;
   uint8_t            section_mem_type;
-  uint8_t            section_checksum;
-  uint8_t            section_conf;
+  uint16_t           section_data_crc;
   uint32_t           section_address;
   uint32_t           section_length;
 }section_hdr_t;
 
+
+typedef struct section_type
+{
+    unsigned system_mem_unlock:1;
+    unsigned trim_val:1;
+    unsigned reset_required:1;
+    unsigned verify_mem:1;
+    unsigned trim_check:1;
+    unsigned section_crc_check:1;
+    unsigned section_type_rfu:2;
+    unsigned section_type_pad:24;
+
+}section_type_t;
+
 typedef struct section_info
 {
    section_hdr_t *p_sec_hdr;
@@ -340,10 +289,6 @@
    * to be loaded to the particular address.
    */
    uint8_t       *p_sec_data;
-  /* The Section checksum to verify the integrity of the section
-   * data.
-   */
-   uint8_t       *p_sec_chksum;
    /** \internal Index used to refer and process the
     *    Firmware Section Data */
    volatile uint32_t           section_offset;
@@ -369,24 +314,13 @@
     uint8_t data_packet[PHDNLD_DATA_SIZE];
 }phDnldNfc_sParam_t;
 
+
 typedef struct phDnldNfc_sDataHdr
 {
     uint8_t frame_type;
     uint8_t frame_length[PHDNLD_FRAME_LEN_SIZE];
 }phDnldNfc_sData_Hdr_t;
 
-typedef struct phDnldNfc_sRawHdr
-{
-    uint8_t frame_type;
-    uint8_t frame_length[PHDNLD_FRAME_LEN_SIZE];
-}phDnldNfc_sRawHdr_t;
-
-typedef struct phDnldNfc_sRawDataHdr
-{
-    uint8_t data_addr[PHDNLD_ADDR_SIZE];
-    uint8_t data_len[PHDNLD_DATA_LEN_SIZE];
-}phDnldNfc_sRawDataHdr_t;
-
 typedef struct phDnldNfc_sChkCrc16_Resp
 {
     uint8_t Chk_status;
@@ -418,58 +352,10 @@
     {
         phDnldNfc_sParam_t data_param;
         uint8_t            response_data[PHDNLD_MAX_PACKET];
-        uint8_t            cmd_param;
+        uint8_t            config_verify_param;
     }param_info;
 }phDnldNfc_sData_t;
 
-#ifdef NXP_NFC_MULTIPLE_FW
-
-typedef struct phDnldNfc_sFwImageInfo
-{
-    /** \internal Data Pointer to the Firmware header section of the Firmware */
-    fw_data_hdr_t               *p_fw_hdr;
-    /** \internal Buffer pointer to store the Firmware Section Data */
-    section_info_t              *p_fw_sec;
-    /** \internal Buffer pointer to store the Firmware Raw Data */
-    uint8_t                     *p_fw_raw;
-}phDnldNfc_sFwImageInfo_t;
-
-#endif /* #ifdef NXP_NFC_MULTIPLE_FW */
-
-
-typedef struct phDnldNfc_TxInfo
-{
-    uint8_t       *transmit_frame;
-
-    uint16_t      tx_offset;
-
-    /** \internal Remaining amount of data to be sent */
-    uint16_t      tx_len;
-
-    uint16_t      tx_total;
-
-    /** \internal Chain information for the data to be sent */
-    uint8_t       tx_chain;
-
-}phDnldNfc_TxInfo_t;
-
-
-typedef struct phDnldNfc_RxInfo
-{
-    /** \internal Total length of the received buffer */
-    uint16_t      rx_total;
-    /** \internal Chain information of the received buffer */
-    uint16_t      rx_chain;
-    /** \internal Remaining Data information to be read to complete the
-      * Data Information.
-      */
-    uint16_t      rx_remain;
-
-    /** \internal Buffer to Send the Raw Data Frame */
-    uint8_t                     raw_buffer_data[PHDNLD_MAX_PACKET
-                                                    + PHDNLD_PAGE_SIZE];
-}phDnldNfc_RxInfo_t;
-
 
 typedef struct phDnldNfc_sContext
 {
@@ -488,29 +374,18 @@
 
     /** \internal Timer ID for the Download Abort */
     uint32_t                    timer_id;
-    /** \internal Internal Download for the Download Abort */
-    uint32_t                    dnld_timeout;
     /** \internal Data Pointer to the Image header section of the Firmware */
     img_data_hdr_t              *p_img_hdr;
-
-#ifdef NXP_NFC_MULTIPLE_FW
-    /** \internal Data Pointer to the Firmware Image Information */
-    phDnldNfc_sFwImageInfo_t    *p_img_info;
-#endif /* #ifdef NXP_NFC_MULTIPLE_FW */
-
     /** \internal Data Pointer to the Firmware header section of the Firmware */
     fw_data_hdr_t               *p_fw_hdr;
     /** \internal Buffer pointer to store the Firmware Data */
     section_info_t              *p_fw_sec;
-    /** \internal Buffer pointer to store the Firmware Raw Data */
-    uint8_t                     *p_fw_raw;
 
     /** \internal Previous Download Size */
     uint32_t                    prev_dnld_size;
 
     /** \internal Single Data Block to download the Firmware */
-    uint8_t                     dnld_data[PHDNLD_MAX_PACKET
-                                                    + PHDNLD_PAGE_SIZE];
+    phDnldNfc_sData_t           dnld_data;
     /** \internal Index used to refer and process the Download Data */
     volatile uint32_t           dnld_index;
 
@@ -538,12 +413,11 @@
 #define NXP_FW_VMID_CARD_MODE_ADDR  0x00009931U
 #define NXP_FW_VMID_RD_MODE_ADDR    0x00009981U
 
-    uint8_t                     vmid_trim_update;
+    unsigned                    vmid_trim_update:1;
+    unsigned                    trim_bits_rfu:31;
 #endif /* #ifdef  NXP_FW_SW_VMID_TRIM */
 
-    uint8_t						cur_frame_info;
-
-    uint8_t						raw_mode_upgrade;
+	uint8_t						*p_system_mem_crc;
 
 	uint8_t						*p_patch_table_crc;
 
@@ -553,12 +427,18 @@
 
     uint16_t                    resp_length;
 
+    /** \internal Total length of the received buffer */
+    volatile uint16_t           rx_total;
+
     /** \internal Current FW Section in Process */
     volatile uint8_t            section_index;
 
     /** \internal Previous Command sent */
     volatile uint8_t            prev_cmd;
 
+    /** \internal Download Response pending */
+    volatile uint8_t            recv_pending;
+
     uint8_t                     dnld_retry;
 
 	/** \internal Current Download State */
@@ -571,38 +451,16 @@
     /** \internal Next step in Download Sequence */
     volatile uint8_t            next_dnld_seq;
 
-    /* \internal Data Transmit information */
-    phDnldNfc_TxInfo_t          tx_info;
-
-    /* \internal Data Receive information */
-    phDnldNfc_RxInfo_t          rx_info;
-
-
 }phDnldNfc_sContext_t;
 
 
+
 /*
 ################################################################################
 ******************** Global and Static Variables Definition ********************
 ################################################################################
 */
-
-#ifndef NFC_TIMER_CONTEXT
 static phDnldNfc_sContext_t *gpphDnldContext = NULL;
-#endif
-
-#ifdef NXP_FW_DNLD_CHECK_PHASE
-
-#define   NXP_FW_DNLD_COMPLETE_PHASE 0x00U
-#define   NXP_FW_DNLD_SYSTEM_PHASE   0x01U
-#define   NXP_FW_DNLD_CFG_PHASE      0x02U
-#define   NXP_FW_DNLD_DATA_PHASE     0x03U
-#define   NXP_FW_DNLD_RAW_PHASE      0x04U
-#define   NXP_FW_DNLD_INVALID_PHASE  0xFFU
-
-static uint8_t  gphDnldPhase = NXP_FW_DNLD_COMPLETE_PHASE;
-
-#endif /* #ifdef NXP_FW_DNLD_CHECK_PHASE */
 
 /**/
 
@@ -769,10 +627,8 @@
 STATIC
 void
 phDnldNfc_Abort (
-                    uint32_t abort_id
-#ifdef NFC_TIMER_CONTEXT
-                    , void     *dnld_cntxt
-#endif
+                    uint32_t abort_id   ,
+                    void * pcontext
                 );
 
 
@@ -1038,7 +894,7 @@
     NFCSTATUS                       status = NFCSTATUS_SUCCESS;
     static  uint8_t                 prev_temp_state = 0;
     static  uint8_t                 prev_temp_seq =
-                                (uint8_t) phDnld_Activate_Patch;
+                                (uint8_t) phDnld_Update_Patch;
 
     switch(seq_type)
     {
@@ -1049,49 +905,12 @@
                                 (uint8_t) phDnld_Reset_State;
             psDnldContext->next_dnld_state =
                             (uint8_t)phDnld_Upgrade_State;
-            psDnldContext->cur_dnld_seq =
+            psDnldContext->next_dnld_seq =
                             (uint8_t)phDnld_Upgrade_Section;
             psDnldContext->next_dnld_seq =
                                 psDnldContext->cur_dnld_seq;
             break;
         }
-        case DNLD_SEQ_RAW:
-        {
-            psDnldContext->cur_dnld_state =
-                                (uint8_t) phDnld_Reset_State;
-            psDnldContext->next_dnld_state =
-                            (uint8_t)phDnld_Upgrade_State;
-            psDnldContext->cur_dnld_seq =
-                            (uint8_t)phDnld_Raw_Upgrade;
-            psDnldContext->next_dnld_seq =
-                                psDnldContext->cur_dnld_seq;
-            break;
-        }
-        case DNLD_SEQ_UNLOCK:
-        {
-            psDnldContext->cur_dnld_state =
-                                (uint8_t) phDnld_Reset_State;
-
-#ifdef NXP_FW_DNLD_CHECK_PHASE
-            if( NXP_FW_DNLD_SYSTEM_PHASE < gphDnldPhase )
-            {
-                psDnldContext->next_dnld_state =
-                                (uint8_t)phDnld_Upgrade_State;
-                psDnldContext->cur_dnld_seq =
-                                (uint8_t)phDnld_Upgrade_Section;
-            }
-            else
-#endif /* NXP_FW_DNLD_CHECK_PHASE */
-            {
-            psDnldContext->next_dnld_state =
-                                (uint8_t) phDnld_Unlock_State;
-            psDnldContext->cur_dnld_seq =
-                                    (uint8_t) phDnld_Activate_Patch;
-            }
-            psDnldContext->next_dnld_seq =
-                                psDnldContext->cur_dnld_seq;
-            break;
-        }
         case DNLD_SEQ_LOCK:
         {
             psDnldContext->cur_dnld_state =
@@ -1104,6 +923,18 @@
                                 psDnldContext->cur_dnld_seq;
             break;
         }
+        case DNLD_SEQ_UNLOCK:
+        {
+            psDnldContext->cur_dnld_state =
+                                (uint8_t) phDnld_Reset_State;
+            psDnldContext->next_dnld_state =
+                                (uint8_t) phDnld_Unlock_State;
+            psDnldContext->cur_dnld_seq =
+                                (uint8_t) phDnld_Update_Patch;
+            psDnldContext->next_dnld_seq =
+                                psDnldContext->cur_dnld_seq;
+            break;
+        }
         case DNLD_SEQ_UPDATE:
         {
             prev_temp_state = (uint8_t) psDnldContext->cur_dnld_state;
@@ -1141,6 +972,26 @@
                                 psDnldContext->cur_dnld_seq ;
             break;
         }
+#if 0
+        case DNLD_UPDATE_STATE1:
+        {
+            prev_temp_state = (uint8_t) psDnldContext->cur_dnld_state;
+            psDnldContext->cur_dnld_state =
+                        psDnldContext->next_dnld_state;
+            /* psDnldContext->next_dnld_state =
+                        (uint8_t)phDnld_Invalid_State ; */
+            break;
+        }
+        case DNLD_ROLLBACK_STATE1:
+        {
+            psDnldContext->cur_dnld_state = (uint8_t)  prev_temp_state;
+            /* psDnldContext->next_dnld_state =
+                        (uint8_t)phDnld_Invalid_State ; */
+            prev_temp_state = 0;
+
+            break;
+        }
+#endif
         default:
         {
             break;
@@ -1182,36 +1033,6 @@
 #endif
         status = plower_if->send((void *)plower_if->pcontext,
                                 (void *)pHwRef, pdata, length);
-
-#if defined(FW_DOWNLOAD_TIMER) && \
-                (FW_DOWNLOAD_TIMER == 2)
-    if ( 
-         (NFCSTATUS_PENDING == status)
-        && ( NXP_INVALID_TIMER_ID != psDnldContext->timer_id )
-       )
-    {
-        psDnldContext->dnld_timeout = NXP_DNLD_COMPLETE_TIMEOUT;
-
-        if ( psDnldContext->dnld_timeout
-                        <   DNLD_DEFAULT_RESPONSE_TIMEOUT)
-        {
-            psDnldContext->dnld_timeout
-                            = DNLD_DEFAULT_RESPONSE_TIMEOUT;
-        }
-        /* Start the Download Timer */
-        phOsalNfc_Timer_Start( psDnldContext->timer_id,
-                psDnldContext->dnld_timeout, 
-                (ppCallBck_t) phDnldNfc_Abort
-#ifdef NFC_TIMER_CONTEXT
-                , (void *) psDnldContext
-#endif
-                );
-
-        DNLD_DEBUG(" DNLD : Timer %X Started ", psDnldContext->timer_id);
-        DNLD_DEBUG(" \t\t With %U Timeout \n", psDnldContext->dnld_timeout);
-    }
-
-#endif /* (NXP_NFC_DNLD_TIMER == 1) */
     }
 
     return status;
@@ -1267,10 +1088,8 @@
                    )
 {
     NFCSTATUS               status = NFCSTATUS_SUCCESS;
-    phDnldNfc_sData_t       *p_dnld_data =
-                 (phDnldNfc_sData_t *)psDnldContext->dnld_data;
-    phDnldNfc_sParam_t      *p_data_param =
-                        &p_dnld_data->param_info.data_param;
+    phDnldNfc_sParam_t      *p_dnld_data =
+                        &psDnldContext->dnld_data.param_info.data_param;
     uint32_t        read_addr = (p_sec_info->p_sec_hdr->section_address
                                             + p_sec_info->section_offset);
     static unsigned sec_type = 0;
@@ -1280,7 +1099,7 @@
     sec_type = (unsigned int)p_sec_info->p_sec_hdr->section_mem_type;
 
     if( ( FALSE ==  p_sec_info->section_read )
-    && ((sec_type & DNLD_TRIM_MASK))
+    && (TRUE == ((section_type_t *)(&sec_type))->trim_val)
     && (FALSE == p_sec_info->trim_write) )
     {
         read_size = (uint16_t) p_sec_info->p_sec_hdr->section_length;
@@ -1288,26 +1107,18 @@
     }
     else
     {
+#ifdef FW_DOWNLOAD_VERIFY
         if (( FALSE ==  p_sec_info->section_read ) 
-            && ((sec_type & DNLD_VERIFY_MASK))
-            )
+            && (TRUE == ((section_type_t *)(&sec_type))->verify_mem ))
         {
             read_size = (uint16_t)(psDnldContext->prev_dnld_size );
             DNLD_DEBUG(" FW_DNLD: Section Read  = %X \n", read_size);
         }
-        else if( ( TRUE ==  p_sec_info->section_read )
-            && ( TRUE ==  p_sec_info->section_write )
-            )
+        else
+#endif /* #ifdef FW_DOWNLOAD_VERIFY  */
         {
             /*Already Read the Data Hence Ignore the Read */
-           DNLD_DEBUG(" FW_DNLD: Already Read, Read Ignored, read_size = %X \n", read_size);
-        }
-        else
-        {
-            /* Ignore the Read */
-           DNLD_DEBUG(" FW_DNLD: Section Read Status = %X \n", p_sec_info->section_read);
-           DNLD_DEBUG(" FW_DNLD: Section Write Status = %X \n", p_sec_info->section_write);
-           DNLD_DEBUG(" FW_DNLD: No Read Required, Read_size = %X \n", read_size);
+           DNLD_DEBUG(" FW_DNLD: Already Read/Read Back Ignored = %X \n", read_size);
         }
     }
 
@@ -1317,24 +1128,24 @@
         read_size = (uint16_t)((PHDNLD_DATA_SIZE >= read_size)?
                                             read_size: PHDNLD_DATA_SIZE);
 
-        p_dnld_data->frame_length[i] = (uint8_t)0;
+        psDnldContext->dnld_data.frame_length[i] = (uint8_t)0;
         /* Update the LSB of the Data and the Address Parameter*/
-        p_data_param->data_addr[i] = (uint8_t)((read_addr  >>
+        p_dnld_data->data_addr[i] = (uint8_t)((read_addr  >>
                                  (BYTE_SIZE + BYTE_SIZE)) & BYTE_MASK);
-        p_data_param->data_len[i] = (uint8_t)((read_size >>
+        p_dnld_data->data_len[i] = (uint8_t)((read_size >>
                                     BYTE_SIZE) & BYTE_MASK);
         i++;
 
-        p_dnld_data->frame_length[i] = (uint8_t)
+        psDnldContext->dnld_data.frame_length[i] = (uint8_t)
                             ( PHDNLD_CMD_READ_LEN & BYTE_MASK);
         /* Update the 2nd byte of the Data and the Address Parameter*/
-        p_data_param->data_addr[i] = (uint8_t)((read_addr  >>
+        p_dnld_data->data_addr[i] = (uint8_t)((read_addr  >>
                                BYTE_SIZE) & BYTE_MASK);
-        p_data_param->data_len[i] = (uint8_t) (read_size & BYTE_MASK);
+        p_dnld_data->data_len[i] = (uint8_t) (read_size & BYTE_MASK);
         i++;
 
         /* Update the 3rd byte of the the Address Parameter*/
-        p_data_param->data_addr[i] = (uint8_t)(read_addr & BYTE_MASK);
+        p_dnld_data->data_addr[i] = (uint8_t)(read_addr & BYTE_MASK);
 
         status = phDnldNfc_Send_Command( psDnldContext, pHwRef,
                     PHDNLD_CMD_READ, NULL , 0 );
@@ -1363,10 +1174,8 @@
                      )
 {
     NFCSTATUS               status = NFCSTATUS_SUCCESS;
-    phDnldNfc_sData_t       *p_dnld_data =
-                 (phDnldNfc_sData_t *)psDnldContext->dnld_data;
     phDnldNfc_sParam_t      *dnld_data =
-                             &p_dnld_data->param_info.data_param;
+                        &psDnldContext->dnld_data.param_info.data_param;
     uint8_t                 *p_sm_trim_data = (uint8_t *)psDnldContext->
                                         dnld_resp.param_info.response_data;
     uint32_t                dnld_addr = 0;
@@ -1376,7 +1185,9 @@
     static unsigned         sec_type = 0;
     uint8_t                 i = 0;
     uint16_t                dnld_size = 0;
+#ifdef FW_DOWNLOAD_VERIFY
         int cmp_val = 0x00;
+#endif /* #ifdef FW_DOWNLOAD_VERIFY */
 
 
     sec_type = (unsigned int)p_sec_info->p_sec_hdr->section_mem_type;
@@ -1386,38 +1197,27 @@
     {
         if( (TRUE == p_sec_info->trim_write)
             && (TRUE == p_sec_info->section_read)
-               && ((sec_type & DNLD_VERIFY_MASK))
           )
         {
+#ifdef FW_DOWNLOAD_VERIFY
             if(NULL != psDnldContext->trim_store.buffer)
             {
-                uint32_t  trim_cmp_size = psDnldContext->prev_dnld_size;
-
-                if( p_sec_info->p_sec_hdr->section_address
-                              < (DNLD_CFG_PG_ADDR + PHDNLD_PAGE_SIZE) )
-                {
-                    trim_cmp_size = trim_cmp_size - 2;
-                }
-
                 /* Below Comparison fails due to the checksum */
                  cmp_val = phOsalNfc_MemCompare(
                                 psDnldContext->trim_store.buffer,
                                   &psDnldContext->dnld_resp.
                                        param_info.response_data[0]
-                                          ,trim_cmp_size);
-                DNLD_DEBUG(" FW_DNLD: %X Bytes Trim Write Complete ",
-                                    psDnldContext->prev_dnld_size);
-                DNLD_DEBUG(" Comparison Status %X\n", cmp_val);
+                                          ,psDnldContext->prev_dnld_size);
             }
+#endif /* #ifdef FW_DOWNLOAD_VERIFY  */
             p_sec_info->trim_write = FALSE;
             DNLD_DEBUG(" FW_DNLD: TRIMMED %X Bytes Write Complete\n", psDnldContext->prev_dnld_size);
         }
         else
         {
+#ifdef FW_DOWNLOAD_VERIFY
             if((NULL != psDnldContext->dnld_store.buffer)
-                && ((sec_type & DNLD_VERIFY_MASK))
-                && (TRUE == p_sec_info->section_write)
-                && (TRUE == p_sec_info->section_read)
+                && (TRUE == ((section_type_t *)(&sec_type))->verify_mem )
                 )
             {
                 cmp_val = phOsalNfc_MemCompare(
@@ -1425,26 +1225,18 @@
                                &psDnldContext->dnld_resp.
                                  param_info.response_data[0]
                                  ,psDnldContext->dnld_store.length);
-                p_sec_info->section_read = FALSE;
-                p_sec_info->section_write = FALSE;
                 DNLD_DEBUG(" FW_DNLD: %X Bytes Write Complete ", 
                                     psDnldContext->dnld_store.length);
                 DNLD_DEBUG(" Comparison Status %X\n", cmp_val);
             }
-            else
-            {
-                if(( TRUE == p_sec_info->section_write)
-                     && ( FALSE == p_sec_info->section_read)
-                   )
-                {
-                  p_sec_info->section_write = FALSE;
-                }
-            }
+#endif /* #ifdef FW_DOWNLOAD_VERIFY  */
             /* p_sec_info->section_read = FALSE; */
         }
 
         if (( 0 == psDnldContext->dnld_retry )
+#ifdef FW_DOWNLOAD_VERIFY
             && (0 == cmp_val)
+#endif
             )
         {
             p_sec_info->sec_verify_retry = 0;
@@ -1480,6 +1272,7 @@
     if (dnld_size != 0)
     {
 
+
         dnld_size = (uint16_t)((PHDNLD_DATA_SIZE >= dnld_size)?
                                         dnld_size: PHDNLD_DATA_SIZE);
 
@@ -1488,7 +1281,7 @@
                                   (BYTE_SIZE + BYTE_SIZE)) & BYTE_MASK);
         dnld_data->data_len[i] = (uint8_t)((dnld_size >> BYTE_SIZE)
                                         & BYTE_MASK);
-        p_dnld_data->frame_length[i] = (uint8_t)
+        psDnldContext->dnld_data.frame_length[i] = (uint8_t)
                     (((dnld_size + PHDNLD_CMD_WRITE_MIN_LEN) >> BYTE_SIZE)
                                         & BYTE_MASK);
         i++;
@@ -1496,7 +1289,7 @@
         dnld_data->data_addr[i] = (uint8_t)((dnld_addr  >> BYTE_SIZE)
                                         & BYTE_MASK);
         dnld_data->data_len[i] = (uint8_t) (dnld_size & BYTE_MASK);
-        p_dnld_data->frame_length[i] = (uint8_t) ((dnld_size +
+        psDnldContext->dnld_data.frame_length[i] = (uint8_t) ((dnld_size +
                             PHDNLD_CMD_WRITE_MIN_LEN) & BYTE_MASK);
         i++;
         /* Update the 3rd byte of the the Address Parameter*/
@@ -1505,15 +1298,7 @@
         (void)memcpy( dnld_data->data_packet,
                         (p_sec_info->p_sec_data + *p_sec_offset), dnld_size );
 
-        if( ((sec_type & DNLD_TRIM_MASK))
-            && (p_sec_info->sec_verify_retry != 0)
-            && (NULL != psDnldContext->trim_store.buffer)
-            )
-        {
-            (void)memcpy( dnld_data->data_packet,
-                        psDnldContext->trim_store.buffer, dnld_size );
-        }
-        else if(((sec_type & DNLD_TRIM_MASK))
+        if((TRUE == ((section_type_t *)(&sec_type))->trim_val )
             && ( TRUE ==  p_sec_info->section_read )
             )
         {
@@ -1563,14 +1348,8 @@
                 psDnldContext->trim_store.buffer = NULL;
                 psDnldContext->trim_store.length = 0;
             }
-#if 1
-            (void)
-                phDnldNfc_Allocate_Resource((void **)
-                              &(psDnldContext->trim_store.buffer),dnld_size);
-#else
             psDnldContext->trim_store.buffer =
                                 (uint8_t *) phOsalNfc_GetMemory(dnld_size);
-#endif
 
             if(NULL != psDnldContext->trim_store.buffer)
             {
@@ -1593,14 +1372,8 @@
                 psDnldContext->dnld_store.buffer = NULL;
                 psDnldContext->dnld_store.length = 0;
             }
-#if 1
-            (void)
-                phDnldNfc_Allocate_Resource((void **)
-                              &(psDnldContext->dnld_store.buffer),dnld_size);
-#else
             psDnldContext->dnld_store.buffer =
                                 (uint8_t *) phOsalNfc_GetMemory(dnld_size);
-#endif
             if(NULL != psDnldContext->dnld_store.buffer)
             {
                 (void )memset((void *)psDnldContext->dnld_store.buffer,0,
@@ -1612,24 +1385,14 @@
                 DNLD_DEBUG(" of Size %X ", dnld_size );
             }
         }
-
-        if(PHDNLD_FW_PATCH_SEC !=  psDnldContext->p_fw_hdr->fw_patch)
-        {
         status = phDnldNfc_Send_Command( psDnldContext, pHwRef,
                     PHDNLD_CMD_WRITE, NULL , 0 );
-        }
-        else
-        {
-            status = phDnldNfc_Send_Command( psDnldContext, pHwRef,
-                        PHDNLD_CMD_SEC_WRITE, NULL , 0 );
-        }
 
-        DNLD_DEBUG(" FW_DNLD: Memory Write Status = %X \n", status);
+        DNLD_DEBUG(" : Memory Write Status = %X \n", status);
         if ( NFCSTATUS_PENDING == status )
         {
             psDnldContext->prev_dnld_size = dnld_size;
-            cmp_val = 0x00;
-            if((sec_type & DNLD_TRIM_MASK))
+            if(TRUE == ((section_type_t *)(&sec_type))->trim_val )
             {
                 p_sec_info->trim_write = TRUE;
                 DNLD_DEBUG(" FW_DNLD: Bytes Downloaded (Trimming Values) = %X Bytes \n",
@@ -1637,7 +1400,6 @@
             }
             else
             {
-                p_sec_info->section_write = TRUE;
                 DNLD_DEBUG(" FW_DNLD: Bytes Downloaded  = %X : ",
                                         (*p_sec_offset + dnld_size));
                 DNLD_DEBUG(" Bytes Remaining  = %X \n",
@@ -1678,11 +1440,10 @@
 
             p_sec_info->section_offset = 0;
             p_sec_info->section_read = FALSE;
-            p_sec_info->section_write = FALSE;
             p_sec_info->trim_write = FALSE;
 
             DNLD_DEBUG(" FW_DNLD: Section %02X Download Complete\n", sec_index);
-            if((sec_type & DNLD_RESET_MASK))
+            if(TRUE == ((section_type_t *)(&sec_type))->reset_required )
             {
                 DNLD_DEBUG(" FW_DNLD: Reset After Section %02X Download \n", sec_index);
                 status = phDnldNfc_Send_Command( psDnldContext, pHwRef,
@@ -1691,36 +1452,7 @@
             DNLD_PRINT("*******************************************\n\n");
 
             sec_index++;
-
-#ifdef NXP_FW_DNLD_CHECK_PHASE
-            if( p_sec_info->p_sec_hdr->section_address
-                               < (DNLD_CFG_PG_ADDR + PHDNLD_PAGE_SIZE) )
-            {
-                gphDnldPhase = NXP_FW_DNLD_DATA_PHASE;
-
-            }
-
             p_sec_info = (psDnldContext->p_fw_sec + sec_index);
-
-            if( (sec_index < psDnldContext->p_fw_hdr->no_of_sections)
-                && ( p_sec_info->p_sec_hdr->section_address
-                               < (DNLD_CFG_PG_ADDR + PHDNLD_PAGE_SIZE) )
-               )
-            {
-                 if( NXP_FW_DNLD_CFG_PHASE >= gphDnldPhase )
-                 {
-                    gphDnldPhase = NXP_FW_DNLD_CFG_PHASE;
-                 }
-                 else
-                 {
-                   sec_index++;
-                   p_sec_info = (psDnldContext->p_fw_sec + sec_index);
-                 }
-            }
-#else
-            p_sec_info = (psDnldContext->p_fw_sec + sec_index);
-#endif /* #ifdef NXP_FW_DNLD_CHECK_PHASE */
-
             psDnldContext->section_index = sec_index;
         /* psDnldContext->next_dnld_state = (uint8_t) phDnld_Upgrade_State; */
         }
@@ -1751,7 +1483,7 @@
 #if (ES_HW_VER <= 30)
 #define NXP_DNLD_PATCH_ADDR             0x01AFFFU
 #else
-#define NXP_DNLD_PATCH_ADDR             0x01A1E0U
+#define NXP_DNLD_PATCH_ADDR             0x01AFE0U
 #endif
 
 #if  (ES_HW_VER <= 30)
@@ -1772,16 +1504,14 @@
 {
     NFCSTATUS           status = NFCSTATUS_SUCCESS;
     uint32_t            dnld_addr = 0;
-    phDnldNfc_sData_t       *p_dnld_data =
-                 (phDnldNfc_sData_t *)psDnldContext->dnld_data;
-    phDnldNfc_sParam_t  *p_data_param =
-                          & p_dnld_data->param_info.data_param;
+    phDnldNfc_sParam_t  *dnld_data =  &psDnldContext->dnld_data
+                                            .param_info.data_param;
     uint8_t             *p_data = NULL;
     static  uint32_t    patch_size = 0;
 
 #if (ES_HW_VER == 32)
 
-    static  uint8_t     patch_table[] = {0xA0, 0xA1, 0xE0, 0x80, 0xA9, 0x6C };
+    static  uint8_t     patch_table[] = {0xA0, 0xAF, 0xE0, 0x80, 0xA9, 0x6C };
     static  uint8_t     patch_data[] = {0xA5, 0xD0, 0xFE, 0xA5, 0xD0, 0xFD, 0xA5,
                             0xD0, 0xFC, 0xA5, 0x02, 0x80, 0xA9, 0x75};
 
@@ -1818,32 +1548,6 @@
 
             break;
         }
-        case phDnld_Activate_Patch:
-        {
-            uint8_t     patch_activate = 0x01;
-            psDnldContext->next_dnld_seq =
-                            (uint8_t)phDnld_Update_Patch;
-#ifdef NXP_FW_DNLD_CHECK_PHASE
-            gphDnldPhase = NXP_FW_DNLD_SYSTEM_PHASE;
-#endif /* NXP_FW_DNLD_CHECK_PHASE */
-
-            status = phDnldNfc_Send_Command( psDnldContext, pHwRef,
-                PHDNLD_CMD_ACTIVATE_PATCH , &patch_activate, sizeof(patch_activate) );
-            DNLD_PRINT(" FW_DNLD: Activate the Patch Update .... \n");
-            break;
-        }
-        case phDnld_Deactivate_Patch:
-        {
-            uint8_t     patch_activate = 0x00;
-
-            psDnldContext->next_dnld_state =
-                            (uint8_t)phDnld_Reset_State;
-
-            status = phDnldNfc_Send_Command( psDnldContext, pHwRef,
-                PHDNLD_CMD_ACTIVATE_PATCH , &patch_activate, sizeof(patch_activate) );
-            DNLD_PRINT(" FW_DNLD: Deactivate the Patch Update .... \n");
-            break;
-        }
         case phDnld_Update_Patch:
         {
             dnld_addr = NXP_DNLD_PATCH_ADDR;
@@ -1871,14 +1575,8 @@
             dnld_addr = NXP_DNLD_SM_UNLOCK_ADDR;
             patch_size = sizeof(unlock_data) ;
             p_data = unlock_data;
-#define NXP_FW_PATCH_DISABLE
-#ifdef NXP_FW_PATCH_DISABLE
-            psDnldContext->next_dnld_seq =
-                            (uint8_t)phDnld_Deactivate_Patch;
-#else
             psDnldContext->next_dnld_state =
                             (uint8_t)phDnld_Reset_State;
-#endif
 
             DNLD_PRINT(" FW_DNLD: System Memory Unlock Seq.... \n");
             break;
@@ -1924,25 +1622,25 @@
     {
 
         /* Update the LSB of the Data and the Address Parameter*/
-        p_data_param->data_addr[i] = (uint8_t)((dnld_addr  >>
+        dnld_data->data_addr[i] = (uint8_t)((dnld_addr  >>
                                             (BYTE_SIZE + BYTE_SIZE))
                                                     & BYTE_MASK);
-        p_data_param->data_len[i] = (uint8_t)((patch_size >> BYTE_SIZE)
+        dnld_data->data_len[i] = (uint8_t)((patch_size >> BYTE_SIZE)
                                                     & BYTE_MASK);
-        p_dnld_data->frame_length[i] = (uint8_t)
+        psDnldContext->dnld_data.frame_length[i] = (uint8_t)
                     (((patch_size + PHDNLD_CMD_WRITE_MIN_LEN) >> BYTE_SIZE)
                                                     & BYTE_MASK);
         i++;
         /* Update the 2nd byte of the Data and the Address Parameter*/
-        p_data_param->data_addr[i] = (uint8_t)((dnld_addr  >> BYTE_SIZE)
+        dnld_data->data_addr[i] = (uint8_t)((dnld_addr  >> BYTE_SIZE)
                                                 & BYTE_MASK);
-        p_data_param->data_len[i] = (uint8_t) (patch_size & BYTE_MASK);
-        p_dnld_data->frame_length[i] = (uint8_t)
+        dnld_data->data_len[i] = (uint8_t) (patch_size & BYTE_MASK);
+        psDnldContext->dnld_data.frame_length[i] = (uint8_t)
                             ((patch_size + PHDNLD_CMD_WRITE_MIN_LEN)
                                                     & BYTE_MASK);
         i++;
         /* Update the 3rd byte of the the Address Parameter*/
-        p_data_param->data_addr[i] = (uint8_t)(dnld_addr & BYTE_MASK);
+        dnld_data->data_addr[i] = (uint8_t)(dnld_addr & BYTE_MASK);
 
         status = phDnldNfc_Send_Command( psDnldContext, pHwRef,
                     PHDNLD_CMD_WRITE,(void *)p_data , (uint8_t)patch_size );
@@ -1956,386 +1654,6 @@
     return status;
 }
 
-#define FRAME_HEADER_LEN   0x03U
-
-
-static
-void
-phDnldNfc_Tx_Reset(phDnldNfc_sContext_t    *psDnldContext)
-{
-    psDnldContext->tx_info.transmit_frame = NULL;
-    psDnldContext->tx_info.tx_total = 0x00;
-    psDnldContext->tx_info.tx_offset = 0x00;
-    psDnldContext->tx_info.tx_len = 0x00;
-    psDnldContext->tx_info.tx_chain = FALSE;
-}
-
-STATIC
-bool_t
-phDnldNfc_Extract_Chunks(
-                       uint8_t  *frame_data,
-                       uint16_t  frame_offset,
-                       uint16_t  frame_length,
-                       uint16_t  max_frame ,
-                       uint16_t  *chunk_length
-                       );
-
-
-STATIC
-bool_t
-phDnldNfc_Extract_Chunks(
-                       uint8_t  *frame_data,
-                       uint16_t  frame_offset,
-                       uint16_t  frame_length,
-                       uint16_t  max_frame ,
-                       uint16_t  *chunk_length
-                       )
-{
-    bool_t  chunk_present = FALSE;
-
-    if( 0 == frame_offset)
-    {
-        if( max_frame >= (frame_length
-                - frame_offset))
-        {
-           *chunk_length = (frame_length - frame_offset);
-        }
-        else
-        {
-            *chunk_length = max_frame 
-                            - FRAME_HEADER_LEN;
-            chunk_present = TRUE;
-        }
-    }
-    else
-    {
-        if( max_frame >= (frame_length
-                - frame_offset))
-        {
-           *chunk_length = (frame_length - frame_offset);
-        }
-        else
-        {
-            *chunk_length = max_frame 
-                            - FRAME_HEADER_LEN;
-            chunk_present = TRUE;
-        }
-    }
-
-    return chunk_present;
-}
-
-
-STATIC
-NFCSTATUS
-phDnldNfc_Send_Raw(
-                        phDnldNfc_sContext_t    *psDnldContext,
-                        void                    *pHwRef,
-                        uint8_t                 *raw_frame,
-                        uint16_t                frame_offset,
-                        uint16_t                frame_length
-                      )
-{
-	NFCSTATUS status = NFCSTATUS_SUCCESS;
-	phDnldNfc_sRawHdr_t *raw_frame_hdr = ( phDnldNfc_sRawHdr_t * ) raw_frame;
-	
-	
-    switch(raw_frame_hdr->frame_type)
-	{
-        case PHDNLD_CMD_RESET:
-        {
-            break;
-        }
-        case PHDNLD_CMD_READ:
-        {
-			/* TODO: To Update the length and the buffer to receive data */
-            break;
-        }
-        case PHDNLD_CMD_WRITE:
-        {
-			phDnldNfc_sRawDataHdr_t *raw_data_hdr = 
-				( phDnldNfc_sRawDataHdr_t * ) (raw_frame + FRAME_HEADER_LEN);
-
-            psDnldContext->resp_length = PHDNLD_MIN_PACKET;
-
-            break;
-        }
-        case PHDNLD_CMD_SEC_WRITE:
-        { 
-            uint16_t    tx_length = 0x00;
-            uint16_t    frame_offset = 
-                          psDnldContext->tx_info.tx_offset;
-            uint16_t    chain = 
-                    psDnldContext->tx_info.tx_chain;
-
-            chain = 
-            phDnldNfc_Extract_Chunks(
-                         raw_frame,
-                         frame_offset,
-                         frame_length,
-                         PHDNLD_FW_TX_RX_LEN,
-                         &tx_length
-                       );
-
-            if( TRUE == chain )
-            {
-                status = phDnldNfc_Send_Command( psDnldContext,
-                                    pHwRef, PHDNLD_CMD_ENCAPSULATE,
-                                    (raw_frame + frame_offset),
-                                    tx_length);
-                if(NFCSTATUS_PENDING == status)
-                {
-                    psDnldContext->prev_cmd = raw_frame_hdr->frame_type;
-                    /* TODO: Update for the Chaining */
-                    psDnldContext->tx_info.tx_offset += tx_length;
-                    psDnldContext->tx_info.tx_chain = chain;
-                }
-            }
-            else if (0 != frame_offset)
-            {
-                status = phDnldNfc_Send_Command( psDnldContext,
-                                    pHwRef, PHDNLD_CMD_ENCAPSULATE,
-                                    (raw_frame + frame_offset),
-                                    tx_length);
-                if(NFCSTATUS_PENDING == status)
-                {
-                    psDnldContext->prev_cmd = raw_frame_hdr->frame_type;
-                    /* TODO: Update for the Chaining */
-                    psDnldContext->prev_dnld_size = frame_length;
-                    phDnldNfc_Tx_Reset(psDnldContext);
-                }
-            }
-            else
-            {
-			    phDnldNfc_sRawDataHdr_t *raw_data_hdr = 
-				    ( phDnldNfc_sRawDataHdr_t * ) (raw_frame + FRAME_HEADER_LEN);
-                psDnldContext->resp_length = PHDNLD_MIN_PACKET;
-            }
-
-            break;
-        }
-        case PHDNLD_CMD_CHECK:
-        {
-            psDnldContext->resp_length = PHDNLD_MIN_PACKET;
-            break;
-        }
-        case PHDNLD_CMD_SET_HIF:
-        {
-            psDnldContext->resp_length = PHDNLD_MIN_PACKET;
-            break;
-        }
-        case PHDNLD_CMD_ACTIVATE_PATCH:
-        {
-            psDnldContext->resp_length = PHDNLD_MIN_PACKET;
-            break;
-        }
-        case PHDNLD_CMD_CHECK_INTEGRITY:
-        {
-			uint8_t integrity_param = 
-				 *(raw_frame + FRAME_HEADER_LEN);
-            switch(integrity_param)
-            {
-                case CHK_INTEGRITY_CONFIG_PAGE_CRC:
-                case CHK_INTEGRITY_PATCH_TABLE_CRC:
-                {
-                    psDnldContext->resp_length = PHDNLD_MIN_PACKET 
-                                         + CHECK_INTEGRITY_RESP_CRC16_LEN;
-                    break;
-                }
-                case CHK_INTEGRITY_FLASH_CODE_CRC:
-                case CHK_INTEGRITY_PATCH_CODE_CRC:
-                {
-                    psDnldContext->resp_length = PHDNLD_MIN_PACKET 
-                                        +  CHECK_INTEGRITY_RESP_CRC32_LEN;
-                    break;
-                }
-                case CHK_INTEGRITY_COMPLETE_CRC:
-                default:
-                {
-                    psDnldContext->resp_length = PHDNLD_MIN_PACKET 
-                                        +  CHECK_INTEGRITY_RESP_COMP_LEN;
-                    break;
-                }
-            }
-            break;
-        }
-        default:
-        {
-            status = PHNFCSTVAL(CID_NFC_DNLD, NFCSTATUS_FEATURE_NOT_SUPPORTED);
-            break;
-        }
-    }
-	
-    if (NFCSTATUS_SUCCESS == status)
-    {
-        status = phDnldNfc_Send( psDnldContext, pHwRef ,
-                            raw_frame, frame_length);
-							
-        if(NFCSTATUS_PENDING == status)
-        {
-            psDnldContext->prev_cmd = raw_frame_hdr->frame_type;
-            /* TODO: Update for the Chaining */
-            psDnldContext->prev_dnld_size = frame_length;
-        }
-    }
-	
-	return status;
-}
-
-
-static
-NFCSTATUS
-phDnldNfc_Frame_Complete(phDnldNfc_sContext_t *psDnldContext)
-{
-    NFCSTATUS               status = NFCSTATUS_SUCCESS;
-    phDnldNfc_sData_Hdr_t   *p_dnld_raw = NULL;
-    uint32_t                dnld_index = psDnldContext->dnld_index;
-    uint8_t                 *p_raw_sec_hdr = NULL;
-    uint16_t                tx_length = 0x00;
-
-    dnld_index = dnld_index + psDnldContext->prev_dnld_size;
-    p_raw_sec_hdr = psDnldContext->p_fw_raw + dnld_index;
-    dnld_index = dnld_index + *p_raw_sec_hdr;
-
-    p_dnld_raw = (phDnldNfc_sData_Hdr_t *) (psDnldContext->p_fw_raw + 
-                                              psDnldContext->dnld_index);
-
-    tx_length = ((p_dnld_raw->frame_length[0] << BYTE_SIZE) | 
-                            p_dnld_raw->frame_length[1]);
-
-    tx_length = tx_length + PHDNLD_MIN_PACKET;
-
-    return status;
-}
-
-
-static
-NFCSTATUS
-phDnldNfc_Raw_Write(
-                        phDnldNfc_sContext_t    *psDnldContext,
-                        void                    *pHwRef
-                     )
-{
-    NFCSTATUS               status = NFCSTATUS_SUCCESS;
-    uint32_t                dnld_index = psDnldContext->dnld_index;
-    uint32_t                tx_length = 0;
-    uint8_t                 *p_raw_sec_hdr = NULL;
-    uint8_t                 dnld_flag = FALSE;
-    uint8_t                 skip_frame = FALSE;
-
-    if(NULL != psDnldContext->p_fw_raw)
-    {
-
-        if( (TRUE != psDnldContext->tx_info.tx_chain)
-            && (0x00 == psDnldContext->dnld_retry)
-          )
-        {
-            dnld_index = dnld_index + psDnldContext->prev_dnld_size;
-            p_raw_sec_hdr = psDnldContext->p_fw_raw + dnld_index;
-            dnld_index = dnld_index + *p_raw_sec_hdr;
-        }
-        else
-        {
-            
-            phDnldNfc_sData_Hdr_t *p_dnld_raw = (phDnldNfc_sData_Hdr_t *)
-									(psDnldContext->p_fw_raw + 
-                                              psDnldContext->dnld_index);
-
-            tx_length = ((p_dnld_raw->frame_length[0] << BYTE_SIZE) | 
-                                    p_dnld_raw->frame_length[1]);
-
-            tx_length = tx_length + PHDNLD_MIN_PACKET;
-
-            status = phDnldNfc_Send_Raw( psDnldContext, pHwRef, 
-                            (uint8_t *)(p_dnld_raw),
-                            psDnldContext->tx_info.tx_offset,
-                                (uint16_t)tx_length);
-        }
-        
-
-#define PHDNLD_MAJOR_OFFSET        0x04U
-#define PHDNLD_MINOR_OFFSET        0x05U
-#define PHDNLD_PHASE_OFFSET        0x06U
-#define PHDNLD_FRAMETYPE_OFFSET    0x07U
-
-#define PHDNLD_NO_OPERATION        0x00U
-#define PHDNLD_NORMAL_OPERATION    0x10U
-#define PHDNLD_ADVANCED_OPERATION  0x20U
-#define PHDNLD_SETUP_OPERATION	   0x40U
-#define PHDNLD_RECOVER_OPERATION   0x80U
-#define PHDNLD_COMPLETE_OPERATION  0xF0U
-
-#define PHDNLD_TERMINATE_TYPE      0x0EU
-
-#define PHDNLD_MARKER_MASK         0x0FU
-
-        while((NFCSTATUS_SUCCESS == status )
-                && (FALSE == dnld_flag)
-            )
-       {
-            phDnldNfc_sData_Hdr_t *p_dnld_raw = (phDnldNfc_sData_Hdr_t *)
-												(psDnldContext->p_fw_raw + dnld_index);
-            uint8_t               frame_type = *(p_raw_sec_hdr + PHDNLD_FRAMETYPE_OFFSET);
-
-            tx_length = ((p_dnld_raw->frame_length[0] << BYTE_SIZE) | 
-                                    p_dnld_raw->frame_length[1]);
-
-            tx_length = tx_length + PHDNLD_MIN_PACKET;
-
-            skip_frame = FALSE;
-
-            if(  (0x00 == *(p_raw_sec_hdr + PHDNLD_PHASE_OFFSET))
-                    || (0xFF == *(p_raw_sec_hdr + PHDNLD_PHASE_OFFSET))
-                	|| !( psDnldContext->raw_mode_upgrade
-                     & (frame_type & (~PHDNLD_MARKER_MASK)) )
-                     )
-            {
-                dnld_index = dnld_index + tx_length;
-                p_raw_sec_hdr = psDnldContext->p_fw_raw + dnld_index;
-                dnld_index = dnld_index + *p_raw_sec_hdr;
-                skip_frame = TRUE;
-            }
-            if (PHDNLD_TERMINATE_TYPE == 
-                        (frame_type & PHDNLD_MARKER_MASK))
-            {
-				if(TRUE != skip_frame)
-				{
-                   psDnldContext->raw_mode_upgrade = 
-                       (psDnldContext->raw_mode_upgrade &
-                              ~(frame_type & ~PHDNLD_MARKER_MASK)) ;
-				}
-
-                if(PHDNLD_NO_OPERATION ==
-                        psDnldContext->raw_mode_upgrade)
-                {
-                   dnld_flag = TRUE;
-                }
-            }
-            else
-            {
-
-            }
-
-            if((FALSE == skip_frame)
-                && (FALSE == dnld_flag)
-                )
-            {
-                status = phDnldNfc_Send_Raw( psDnldContext, pHwRef, 
-                               (uint8_t *)(p_dnld_raw),
-                               psDnldContext->tx_info.tx_offset,
-                                    (uint16_t)tx_length);
-            }
-
-            if( NFCSTATUS_PENDING == status )
-            {
-                psDnldContext->dnld_index = dnld_index;
-				psDnldContext->cur_frame_info= frame_type;
-            }
-        }
-    }
-
-    return status;
-}
 
 static
 NFCSTATUS
@@ -2347,18 +1665,13 @@
                         )
 {
     NFCSTATUS               status = NFCSTATUS_SUCCESS;
+    /* section_info_t          *p_cur_sec = psDnldContext->p_fw_sec +
+                                  psDnldContext->section_index; */
 
     PHNFC_UNUSED_VARIABLE(pdata);
     PHNFC_UNUSED_VARIABLE(length);
 
-    if(phDnld_Raw_Upgrade == psDnldContext->cur_dnld_seq)
-    {
-       status = phDnldNfc_Raw_Write( psDnldContext, pHwRef );
-    }
-    else
-    {
     status = phDnldNfc_Resume_Write( psDnldContext, pHwRef );
-    }
 
     return status;
 }
@@ -2395,34 +1708,27 @@
                                     (uint8_t)phDnld_Unlock_System;
                     break;
                 }
-#ifdef NXP_FW_PATCH_DISABLE
-                case phDnld_Deactivate_Patch:
-#else
                 case phDnld_Unlock_System:
-#endif
                 {
                     psDnldContext->next_dnld_state =
                                    (uint8_t)phDnld_Upgrade_State;
                     psDnldContext->next_dnld_seq =
                                     (uint8_t)phDnld_Upgrade_Section;
-#ifdef NXP_FW_DNLD_CHECK_PHASE
-                    gphDnldPhase = NXP_FW_DNLD_CFG_PHASE;
-#endif /* NXP_FW_DNLD_CHECK_PHASE */
                     break;
                 }
                 case phDnld_Lock_System:
                 {
-#if  (NXP_FW_INTEGRITY_CHK >= 0x01)
-                    psDnldContext->next_dnld_state =
-                                    (uint8_t)phDnld_Verify_State;
-                    psDnldContext->next_dnld_seq =
-                                    (uint8_t)phDnld_Verify_Integrity;
-#else
+//#if(NXP_FW_INTEGRITY_CHK >= 0x01)
+//                    psDnldContext->next_dnld_state =
+//                                    (uint8_t)phDnld_Verify_State;
+//                    psDnldContext->next_dnld_seq =
+//                                    (uint8_t)phDnld_Verify_Integrity;
+//#else
                     /* (void ) memset( (void *) &psDnldContext->chk_integrity_crc,
                                 0, sizeof(psDnldContext->chk_integrity_crc)); */
                     psDnldContext->next_dnld_state =
                                             (uint8_t) phDnld_Complete_State;
-#endif /* #if  (NXP_FW_INTEGRITY_CHK >= 0x01) */
+//#endif /* #if  (NXP_FW_INTEGRITY_CHK >= 0x01) */
                     break;
                 }
                 case phDnld_Verify_Integrity:
@@ -2460,21 +1766,21 @@
                 psDnldContext->next_dnld_seq =
                                     psDnldContext->cur_dnld_seq;
 #endif
-#if  (NXP_FW_INTEGRITY_CHK >= 0x01)
-                psDnldContext->next_dnld_state =
-                                (uint8_t)phDnld_Verify_State;
-                psDnldContext->next_dnld_seq =
-                                (uint8_t)phDnld_Verify_Integrity;
-                psDnldContext->cur_dnld_seq =
-                                    psDnldContext->next_dnld_seq;
-                status = phDnldNfc_Sequence( psDnldContext,
-                                                        pHwRef, pdata, length);
-#else
+//#if  (NXP_FW_INTEGRITY_CHK >= 0x01)
+//                psDnldContext->next_dnld_state =
+//                                (uint8_t)phDnld_Verify_State;
+//                psDnldContext->next_dnld_seq =
+//                                (uint8_t)phDnld_Verify_Integrity;
+//                psDnldContext->cur_dnld_seq =
+//                                    psDnldContext->next_dnld_seq;
+//                status = phDnldNfc_Sequence( psDnldContext, 
+//                                                        pHwRef, pdata, length);
+//#else
                 /* (void ) memset( (void *) &psDnldContext->chk_integrity_crc,
                             0, sizeof(psDnldContext->chk_integrity_crc)); */
                 psDnldContext->next_dnld_state =
                                         (uint8_t) phDnld_Complete_State;
-#endif /* #if  (NXP_FW_INTEGRITY_CHK >= 0x01) */
+//#endif /* #if  (NXP_FW_INTEGRITY_CHK >= 0x01) */
             }
             break;
         }
@@ -2572,14 +1878,12 @@
                             psDnldContext->lower_interface.pcontext, pHwRef);
         phDnldNfc_Release_Lower(psDnldContext, pHwRef);
         phDnldNfc_Release_Resources(&psDnldContext);
-#ifndef NFC_TIMER_CONTEXT
-        gpphDnldContext = psDnldContext;
-#endif
         /* Notify the Error/Success Scenario to the upper layer */
         phDnldNfc_Notify( p_upper_notify, p_upper_context, pHwRef, (uint8_t)
             ((NFCSTATUS_SUCCESS == comp_info.status )? NFC_IO_SUCCESS: NFC_IO_ERROR),
                     &comp_info );
     }
+
     return status;
 }
 
@@ -2597,19 +1901,20 @@
                         (phDnldNfc_sData_Hdr_t *) pdata;
 
     PHNFC_UNUSED_VARIABLE(pHwRef);
-    DNLD_DEBUG(" FW_DNLD: Receive Length = %X \n", length );
-    if(( psDnldContext->rx_info.rx_total == 0 )
+    /* DNLD_DEBUG(" FW_DNLD: Receive Length = %X \n", length ); */
+    if(( psDnldContext->rx_total == 0 )
         && (PHDNLD_MIN_PACKET <= length)
+        /* && (FALSE == psDnldContext->recv_pending) */
         )
     {
-        psDnldContext->rx_info.rx_total =
+        psDnldContext->rx_total =
             ((uint16_t)resp_data->frame_length[0] << BYTE_SIZE)|
                         resp_data->frame_length[1];
-        if( psDnldContext->rx_info.rx_total + PHDNLD_MIN_PACKET == length )
+        if( psDnldContext->rx_total + PHDNLD_MIN_PACKET == length )
         {
 
             DNLD_DEBUG(" FW_DNLD: Success Memory Read = %X \n",
-                                                psDnldContext->rx_info.rx_total);
+                                                psDnldContext->rx_total);
 #ifndef DNLD_SUMMARY
             /* DNLD_PRINT_BUFFER("Receive Buffer",pdata,length); */
 #endif
@@ -2619,11 +1924,13 @@
         {
            /* status = phDnldNfc_Receive( psDnldContext, pHwRef,
                 psDnldContext->p_resp_buffer,
-               (uint8_t)((psDnldContext->rx_info.rx_total <= PHDNLD_MAX_PACKET)?
-                    psDnldContext->rx_info.rx_total: PHDNLD_MAX_PACKET) ); */
+               (uint8_t)((psDnldContext->rx_total <= PHDNLD_MAX_PACKET)?
+                    psDnldContext->rx_total: PHDNLD_MAX_PACKET) );
+            psDnldContext->recv_pending =
+                        (uint8_t)( NFCSTATUS_PENDING == status); */
             DNLD_PRINT(" FW_DNLD: Invalid Receive length ");
             DNLD_DEBUG(": Length Expected = %X \n",
-            (psDnldContext->rx_info.rx_total + PHDNLD_MIN_PACKET));
+            (psDnldContext->rx_total + PHDNLD_MIN_PACKET));
             status = PHNFCSTVAL( CID_NFC_DNLD,
                                     NFCSTATUS_INVALID_RECEIVE_LENGTH );
         }
@@ -2631,7 +1938,7 @@
     else
     {
         /*TODO:*/
-        psDnldContext->rx_info.rx_total = 0 ;
+        psDnldContext->rx_total = 0 ;
         status = PHNFCSTVAL( CID_NFC_DNLD,
                                 NFCSTATUS_INVALID_RECEIVE_LENGTH );
     }
@@ -2666,7 +1973,6 @@
         status = pInfo->status ;
         length = pInfo->length ;
         pdata = pInfo->buffer;
-
         if(status != NFCSTATUS_SUCCESS)
         {
             DNLD_DEBUG(" Failed. Status = %02X\n",status);
@@ -2678,10 +1984,9 @@
             /* Handle the Error Scenario */
             status = PHNFCSTVAL( CID_NFC_DNLD,  NFCSTATUS_FAILED );
         }
-        else if ((0 == length) 
-            || (PHDNLD_MIN_PACKET > length ))
+        else if (0 == length)
         {
-            DNLD_DEBUG(" Receive Response Length = %u .... \n",length);
+            DNLD_PRINT(" Receive Response Length = 0 .... \n");
             /* Handle the Error Scenario */
 #ifndef HAL_SW_DNLD_RLEN
              status = PHNFCSTVAL( CID_NFC_DNLD,
@@ -2691,15 +1996,6 @@
         else
         {
 
-#if defined(FW_DOWNLOAD_TIMER) && \
-                (FW_DOWNLOAD_TIMER == 2)
-        if ( NXP_INVALID_TIMER_ID != psDnldContext->timer_id )
-        {
-            phOsalNfc_Timer_Stop( psDnldContext->timer_id );
-        }
-
-#endif
-
 #ifndef DNLD_SUMMARY
             DNLD_PRINT_BUFFER("Receive Buffer",pdata,length);
 #endif
@@ -2718,9 +2014,6 @@
                     {
                         case PHDNLD_CMD_READ :
                         {
-							if( PHDNLD_NO_OPERATION
-							       == psDnldContext->raw_mode_upgrade)
-                            {
                             status = phDnldNfc_Process_Response(
                                     psDnldContext, pHwRef, pdata , length);
 
@@ -2730,18 +2023,10 @@
                                 psDnldContext->dnld_retry = NXP_MAX_DNLD_RETRY;
                                 /* psDnldContext->dnld_retry < NXP_MAX_DNLD_RETRY */
                             }
-                            }
-                            else
-                            {
-
-                            }
                             break;
                         }
                         case PHDNLD_CMD_CHECK_INTEGRITY :
                         {
-							if( PHDNLD_NO_OPERATION
-							       == psDnldContext->raw_mode_upgrade)
-							{
 #if  (NXP_FW_INTEGRITY_CHK >= 0x01)
                             phDnldNfc_sChkCrcComplete_t *p_dnld_crc_all = 
                                 &psDnldContext->chk_integrity_crc;
@@ -2786,16 +2071,8 @@
                                     break;
                                 }
                             }
+
 #endif /* #if  (NXP_FW_INTEGRITY_CHK >= 0x01) */
-							}
-							else
-							{
-                                psDnldContext->raw_mode_upgrade =
-                                     (PHDNLD_SETUP_OPERATION | PHDNLD_ADVANCED_OPERATION);
-                                /* psDnldContext->raw_mode_upgrade =
-                                    (psDnldContext->raw_mode_upgrade &
-                                     ( psDnldContext->cur_frame_info & ~PHDNLD_MARKER_MASK )); */
-							}
                             break;
                         }
                         case PHDNLD_CMD_WRITE:
@@ -2803,18 +2080,10 @@
                             psDnldContext->dnld_retry = 0;
                             break;
                         }
-                        case PHDNLD_CMD_SEC_WRITE:
-                        {
-                            psDnldContext->dnld_retry = 0;
-                            break;
-                        }
                         case PHDNLD_CMD_ACTIVATE_PATCH:
                         case PHDNLD_CMD_CHECK:
                         default:
                         {
-							if( PHDNLD_NO_OPERATION
-							       == psDnldContext->raw_mode_upgrade)
-							{
                             if( ( (PHDNLD_MIN_PACKET > length)
                                 || ( 0 != resp_length) )
                                 )
@@ -2827,20 +2096,14 @@
                             {
                                 psDnldContext->dnld_retry = 0;
                             }
-							}
-							else
-							{
-                                psDnldContext->raw_mode_upgrade =
-                                        (psDnldContext->raw_mode_upgrade & ~PHDNLD_RECOVER_OPERATION);
-							}
                             break;
                         }
                     } /* End of the Previous Command Switch Case */
                     break;
                 }/* Case PHDNLD_RESP_SUCCESS*/
                 case PHDNLD_RESP_TIMEOUT:
-                case PHDNLD_RESP_CRC_ERROR:
                 case PHDNLD_RESP_WRITE_ERROR:
+                case PHDNLD_RESP_CRC_ERROR:
                 {
                     if(psDnldContext->dnld_retry < NXP_MAX_DNLD_RETRY )
                     {
@@ -2852,139 +2115,22 @@
                 }
                 /* fall through */
                 case PHDNLD_RESP_ACCESS_DENIED:
+                case PHDNLD_RESP_PROTOCOL_ERROR:
                 case PHDNLD_RESP_INVALID_PARAMETER:
                 case PHDNLD_RESP_INVALID_LENGTH:
-                    /*  Initial Frame Checksum */
-                case PHDNLD_RESP_CHKSUM_ERROR:
-                case PHDNLD_RESP_MEMORY_UPDATE_ERROR:
                 {
                     psDnldContext->dnld_retry = NXP_MAX_DNLD_RETRY;
                     status = PHNFCSTVAL(CID_NFC_DNLD,
                                                 resp_data->frame_type);
                     break;
                 }
-                case PHDNLD_RESP_PROTOCOL_ERROR:
-                {
-					if(( PHDNLD_NO_OPERATION 
-							== psDnldContext->raw_mode_upgrade)
-                            || ( PHDNLD_ADVANCED_OPERATION 
-							== psDnldContext->raw_mode_upgrade)
-                            )
-                    {
-                        psDnldContext->dnld_retry = NXP_MAX_DNLD_RETRY;
-                        status = PHNFCSTVAL(CID_NFC_DNLD,
-                                            NFCSTATUS_INVALID_FORMAT);
-                    }
-					else if( (PHDNLD_NORMAL_OPERATION 
-                                 & psDnldContext->raw_mode_upgrade)
-                            )
-					{
-                        psDnldContext->raw_mode_upgrade = 
-                               (psDnldContext->raw_mode_upgrade & ~PHDNLD_NORMAL_OPERATION);
-					}
-                    else if ( PHDNLD_RECOVER_OPERATION 
-                                 & psDnldContext->raw_mode_upgrade )
-                    {
-                        psDnldContext->dnld_retry = NXP_MAX_DNLD_RETRY;
-                        status = PHNFCSTVAL(CID_NFC_DNLD,
-                                            NFCSTATUS_INVALID_FORMAT);
-                    }
-                    else
-                    {
-                       psDnldContext->raw_mode_upgrade =
-                        (psDnldContext->raw_mode_upgrade &
-                            ~( psDnldContext->cur_frame_info & ~PHDNLD_MARKER_MASK ));
-                    }
-                    break;
-                }
-                case PHDNLD_RESP_VERSION_UPTODATE:
-                {
-					/* TODO: to make sure that the Advance Frames are sent to get
-					 *       the updated status */
-					if ( PHDNLD_ADVANCED_OPERATION
-                                 == psDnldContext->raw_mode_upgrade)
-					{
-						status = ( CID_NFC_DNLD << BYTE_SIZE ) ;
-					}
-                    else if ( PHDNLD_NO_OPERATION
-                                != psDnldContext->raw_mode_upgrade)
-                    {
-
-                       psDnldContext->raw_mode_upgrade =
-                        (psDnldContext->raw_mode_upgrade &
-                            ~( psDnldContext->cur_frame_info & ~PHDNLD_MARKER_MASK ));
-                    }
-                    else
-                    {
-                    }
-                    break;
-                }
-                case PHDNLD_RESP_CMD_NOT_SUPPORTED:
-                {
-
-                    if ( PHDNLD_NO_OPERATION 
-                                 == psDnldContext->raw_mode_upgrade)
-                    {
-                        status = PHNFCSTVAL(CID_NFC_DNLD,
-                            NFCSTATUS_FEATURE_NOT_SUPPORTED);
-                    }
-                    else if ( PHDNLD_ADVANCED_OPERATION 
-                                 == psDnldContext->raw_mode_upgrade)
-					{
-						status = PHNFCSTVAL(CID_NFC_DNLD,
-										 NFCSTATUS_FEATURE_NOT_SUPPORTED);
-					}
-#if 0
-					else if( (PHDNLD_NORMAL_OPERATION
-                                 & psDnldContext->raw_mode_upgrade)
-                            )
-					{
-                        psDnldContext->raw_mode_upgrade =
-                               (psDnldContext->raw_mode_upgrade & ~PHDNLD_NORMAL_OPERATION);
-					}
-                    else if ( PHDNLD_SETUP_OPERATION
-                                 & psDnldContext->raw_mode_upgrade )
-                    {
-                        psDnldContext->raw_mode_upgrade =
-                               (psDnldContext->raw_mode_upgrade & ~PHDNLD_SETUP_OPERATION);
-                    }
-#endif
-                    else
-                    {
-                       psDnldContext->raw_mode_upgrade =
-                        (psDnldContext->raw_mode_upgrade &
-                            ~( psDnldContext->cur_frame_info & ~PHDNLD_MARKER_MASK ));
-                    }
-                    break;
-                }
-               /*  The Chaining of the Command Frame
-                                  was Successful in the Download Mode */
-                case PHDNLD_RESP_CHAINING_SUCCESS:
-                {
-					/* TODO: Handle the Corner Case Scenarios
-					 *       the updated status */
-                    psDnldContext->dnld_retry = 0x00;
-                    break;
-                }
-/*  The Error during the Chaining the Command Frame in the Download Mode */
-                case PHDNLD_RESP_CHAINING_ERROR:
-                {
-					/* TODO: Restart the Chunk in Corner Case
-					 *       the updated status */
-                    psDnldContext->dnld_retry++;
-                    phDnldNfc_Tx_Reset(psDnldContext);
-                    break;
-                }
-/*  The Command is not allowed anymore in the Download Mode */
-                case PHDNLD_RESP_CMD_NOT_ALLOWED:
                 default:
                 {
                     psDnldContext->dnld_retry = NXP_MAX_DNLD_RETRY;
                     status = PHNFCSTVAL(CID_NFC_DNLD,
-                                        NFCSTATUS_NOT_ALLOWED);
+                                     NFCSTATUS_FEATURE_NOT_SUPPORTED);
                     break;
                 }
-
             } /* End of the Response Frame Type Switch */
 
             if (NFCSTATUS_PENDING != status)
@@ -3003,57 +2149,10 @@
                                 psDnldContext->lower_interface.pcontext, pHwRef);
                     phDnldNfc_Release_Lower(psDnldContext, pHwRef);
                     phDnldNfc_Release_Resources(&psDnldContext);
-#ifndef NFC_TIMER_CONTEXT
-                    gpphDnldContext = psDnldContext;
-#endif
                     /* Notify the Error/Success Scenario to the upper layer */
                     phDnldNfc_Notify( p_upper_notify, p_upper_context, pHwRef,
                                     (uint8_t) NFC_IO_ERROR, &comp_info );
                 }
-                else if ( (NFCSTATUS_SUCCESS != status) &&
-                           (NFCSTATUS_SUCCESS == PHNFCSTATUS(status))
-                         )
-                {
-                    pphNfcIF_Notification_CB_t  p_upper_notify =
-                        psDnldContext->p_upper_notify;
-                    void                        *p_upper_context =
-                                        psDnldContext->p_upper_context;
-
-                    comp_info.status = NFCSTATUS_SUCCESS;
-                    DNLD_DEBUG(" FW_DNLD: Termination in Receive, Status = %X \n", status);
-                    status = phDal4Nfc_Unregister(
-                                psDnldContext->lower_interface.pcontext, pHwRef);
-                    phDnldNfc_Release_Lower(psDnldContext, pHwRef);
-                    phDnldNfc_Release_Resources(&psDnldContext);
-#ifndef NFC_TIMER_CONTEXT
-                    gpphDnldContext = psDnldContext;
-#endif
-                    /* Notify the Error/Success Scenario to the upper layer */
-                    phDnldNfc_Notify( p_upper_notify, p_upper_context, pHwRef,
-                        (uint8_t) NFC_IO_SUCCESS, &comp_info );
-
-                }
-                else if (NFCSTATUS_FEATURE_NOT_SUPPORTED == PHNFCSTATUS(status))
-                {
-                    pphNfcIF_Notification_CB_t  p_upper_notify =
-                        psDnldContext->p_upper_notify;
-                    void                        *p_upper_context =
-                                        psDnldContext->p_upper_context;
-
-                    comp_info.status = status;
-                    DNLD_DEBUG(" FW_DNLD: Termination in Receive, Status = %X \n", status);
-                    status = phDal4Nfc_Unregister(
-                                psDnldContext->lower_interface.pcontext, pHwRef);
-                    phDnldNfc_Release_Lower(psDnldContext, pHwRef);
-                    phDnldNfc_Release_Resources(&psDnldContext);
-#ifndef NFC_TIMER_CONTEXT
-                    gpphDnldContext = psDnldContext;
-#endif
-                    /* Notify the Error/Success Scenario to the upper layer */
-                    phDnldNfc_Notify( p_upper_notify, p_upper_context, pHwRef,
-                        (uint8_t) NFC_IO_SUCCESS, &comp_info );
-
-                }
                 else
                 {
                     /* DNLD_PRINT(" FW_DNLD: Successful.\n"); */
@@ -3103,28 +2202,17 @@
             if ((PHDNLD_CMD_SET_HIF != psDnldContext->prev_cmd)
                 && (PHDNLD_CMD_RESET != psDnldContext->prev_cmd))
             {
-                psDnldContext->rx_info.rx_total = 0;
+                psDnldContext->rx_total = 0;
                 status = phDnldNfc_Receive( psDnldContext, pHwRef,
                             (uint8_t *)(&psDnldContext->dnld_resp),
                                            psDnldContext->resp_length);
+                /* psDnldContext->recv_pending =
+                                (uint8_t)( NFCSTATUS_PENDING == status); */
             }
             else
             {
                 psDnldContext->resp_length = 0;
                 psDnldContext->dnld_retry = 0;
-                if( PHDNLD_CMD_RESET == psDnldContext->prev_cmd )
-                {
-                    DO_DELAY(PHDNLD_DNLD_DELAY);
-                }
-#if defined(FW_DOWNLOAD_TIMER) && \
-                (FW_DOWNLOAD_TIMER == 2)
-
-                if ( NXP_INVALID_TIMER_ID != psDnldContext->timer_id )
-                {
-                    phOsalNfc_Timer_Stop( psDnldContext->timer_id );
-                }
-#endif
-
                 status = phDnldNfc_Set_Seq(psDnldContext,
                                                 DNLD_SEQ_UPDATE);
             }
@@ -3140,7 +2228,6 @@
 }
 
 
-
 STATIC
 NFCSTATUS
 phDnldNfc_Send_Command(
@@ -3155,8 +2242,6 @@
     uint16_t    tx_length = 0;
     uint16_t    rx_length = 0;
     uint8_t     **pp_resp_data = &psDnldContext->p_resp_buffer;
-    phDnldNfc_sData_t       *p_dnld_data =
-                 (phDnldNfc_sData_t *)psDnldContext->dnld_data;
 
     switch(cmd)
     {
@@ -3168,10 +2253,8 @@
         }
         case PHDNLD_CMD_READ:
         {
-            phDnldNfc_sData_t       *p_dnld_data =
-                 (phDnldNfc_sData_t *)psDnldContext->dnld_data;
             phDnldNfc_sParam_t  *param_info = /* (phDnldNfc_sParam_t *)params */
-                               &p_dnld_data->param_info.data_param;
+                                &psDnldContext->dnld_data.param_info.data_param;
             tx_length = PHDNLD_CMD_READ_LEN;
             if (NULL != *pp_resp_data)
             {
@@ -3182,18 +2265,21 @@
                                    << BYTE_SIZE) + param_info->data_len[1]);
 
             psDnldContext->resp_length =
-                (( rx_length + PHDNLD_MIN_PACKET ));
+#if 0
+                (((rx_length > PHDNLD_DATA_SIZE)?
+                            PHDNLD_DATA_SIZE + PHDNLD_MIN_PACKET:
+#else
+                ((
+#endif
+                               rx_length + PHDNLD_MIN_PACKET ));
             (void)phDnldNfc_Allocate_Resource( (void **) pp_resp_data,
                      rx_length);
             break;
         }
         case PHDNLD_CMD_WRITE:
-        case PHDNLD_CMD_SEC_WRITE:
         {
-            phDnldNfc_sData_t       *p_dnld_data =
-                 (phDnldNfc_sData_t *)psDnldContext->dnld_data;
             phDnldNfc_sParam_t  *param_info = /* (phDnldNfc_sParam_t *)params */
-                                &p_dnld_data->param_info.data_param;
+                                &psDnldContext->dnld_data.param_info.data_param;
             tx_length = (uint16_t) (((uint16_t)param_info->data_len[0]
                         << BYTE_SIZE) + param_info->data_len[1]
                                     + PHDNLD_CMD_WRITE_MIN_LEN );
@@ -3211,36 +2297,6 @@
             psDnldContext->resp_length = PHDNLD_MIN_PACKET;
             break;
         }
-        case PHDNLD_CMD_ENCAPSULATE:
-        {
-            uint8_t  i = 0x00;
-            if ((0 != param_length) && (NULL != params))
-            {
-                p_dnld_data->frame_type =
-                            PHDNLD_CMD_ENCAPSULATE;
-                (void)memcpy((void *)( ((uint8_t *)p_dnld_data)
-                                           + PHDNLD_FRAME_DATA_OFFSET)
-                                        , params, param_length);
-                tx_length = param_length;
-
-                p_dnld_data->frame_length[i++] =
-                           (uint8_t)(tx_length >> BYTE_SIZE);
-                p_dnld_data->frame_length[i]   =
-                           (uint8_t)( tx_length & BYTE_MASK );
-                tx_length += PHDNLD_FRAME_DATA_OFFSET;
-
-                psDnldContext->resp_length = PHDNLD_MIN_PACKET;
-
-                status = phDnldNfc_Send( psDnldContext, pHwRef ,
-                                    (uint8_t *)p_dnld_data, tx_length);
-            }
-            else
-            {
-               status = PHNFCSTVAL(CID_NFC_DNLD,
-                              NFCSTATUS_NOT_ALLOWED);
-            }
-            break;
-        }
         case PHDNLD_CMD_SET_HIF:
         {
             tx_length++;
@@ -3249,18 +2305,8 @@
         }
         case PHDNLD_CMD_ACTIVATE_PATCH:
         {
-            psDnldContext->resp_length = PHDNLD_MIN_PACKET;
-            if ((NULL != params) && ( param_length > 0 ))
-            {
-                p_dnld_data->param_info.cmd_param =
-                                            (*(uint8_t *)params);
-                tx_length = param_length;
-            }
-            else
-            {
-                p_dnld_data->param_info.cmd_param = FALSE;
             tx_length++;
-            }
+            psDnldContext->resp_length = PHDNLD_MIN_PACKET;
             break;
         }
         case PHDNLD_CMD_CHECK_INTEGRITY:
@@ -3268,7 +2314,7 @@
 #if  (NXP_FW_INTEGRITY_CHK >= 0x01)
             if ((NULL != params) && ( param_length > 0 ))
             {
-                psDnldContext->chk_integrity_param =
+                psDnldContext->chk_integrity_param = 
                             (phDnldNfc_eChkCrc_t)(*(uint8_t *)params);
                 tx_length = param_length ;
             }
@@ -3277,7 +2323,7 @@
                 psDnldContext->chk_integrity_param = CHK_INTEGRITY_COMPLETE_CRC;
                 tx_length++;
             }
-            p_dnld_data->param_info.cmd_param =
+            psDnldContext->dnld_data.param_info.config_verify_param = 
                                 (uint8_t) psDnldContext->chk_integrity_param;
             switch(psDnldContext->chk_integrity_param)
             {
@@ -3305,7 +2351,7 @@
             }
 #else
             tx_length++;
-            p_dnld_data->param_info.cmd_param = 
+            psDnldContext->dnld_data.param_info.config_verify_param = 
                                 (uint8_t) CHK_INTEGRITY_COMPLETE_CRC;
 
 #endif /* #if  (NXP_FW_INTEGRITY_CHK >= 0x01) */
@@ -3321,19 +2367,19 @@
     {
         uint8_t     i = 0;
 
-        p_dnld_data->frame_type = cmd;
-        p_dnld_data->frame_length[i++] =
+        psDnldContext->dnld_data.frame_type = cmd;
+        psDnldContext->dnld_data.frame_length[i++] =
                                     (uint8_t)(tx_length >> BYTE_SIZE);
-        p_dnld_data->frame_length[i]   =
+        psDnldContext->dnld_data.frame_length[i]   =
                                     (uint8_t)( tx_length & BYTE_MASK );
         tx_length = tx_length + PHDNLD_MIN_PACKET;
         status = phDnldNfc_Send( psDnldContext, pHwRef ,
-                            (uint8_t *)p_dnld_data, tx_length);
+                            (uint8_t *)(&psDnldContext->dnld_data), tx_length);
         if(NFCSTATUS_PENDING == status)
         {
             psDnldContext->prev_cmd = cmd;
-
         }
+
     }
 
     return status;
@@ -3341,12 +2387,34 @@
 
 static
 NFCSTATUS
-phDnldNfc_Check_FW(
-                    phHal_sHwReference_t    *pHwRef,
-                    fw_data_hdr_t           *cur_fw_hdr
+phDnldNfc_Process_FW(
+                        phDnldNfc_sContext_t    *psDnldContext,
+                        phHal_sHwReference_t    *pHwRef
+#ifdef NXP_FW_PARAM
+                        ,uint8_t                 *nxp_nfc_fw
+#endif
                      )
 {
     NFCSTATUS               status = NFCSTATUS_FAILED;
+    section_info_t          *p_cur_sec = NULL;
+    static unsigned         sec_type;
+    uint32_t                fw_index = 0;
+    fw_data_hdr_t           *cur_fw_hdr = NULL;
+    uint8_t                 sec_index = 0;
+    uint8_t                 i = 0;
+
+    psDnldContext->p_img_hdr = (img_data_hdr_t *) nxp_nfc_fw;
+
+    fw_index = sizeof (img_data_hdr_t);
+
+    for ( i=0; i < psDnldContext->p_img_hdr->no_of_fw_img; i++ )
+    {
+
+        psDnldContext->p_fw_hdr = (fw_data_hdr_t *) ( nxp_nfc_fw + fw_index );
+        /* TODO: Create a memory of pointers to store all the Firmwares */
+        cur_fw_hdr = psDnldContext->p_fw_hdr;
+
+        fw_index = fw_index + (cur_fw_hdr->fw_hdr_len * PNDNLD_WORD_LEN);
 
         if ( !pHwRef->device_info.fw_version )
         {
@@ -3362,6 +2430,9 @@
             status = PHNFCSTVAL( CID_NFC_DNLD, NFCSTATUS_NOT_ALLOWED );
         }
         else if (( pHwRef->device_info.fw_version < cur_fw_hdr->fw_version  )
+#ifdef NXP_FW_PATCH_VERIFY
+            && (pHwRef->device_info.full_version[NXP_PATCH_VER_INDEX] < cur_fw_hdr->fw_patch )
+#endif
             )
         {
             /* TODO: Firmware Version Check and upgrade*/
@@ -3381,87 +2452,22 @@
             DNLD_PRINT(" FW_DNLD: Already Updated .... \n");
             status = ( CID_NFC_DNLD << BYTE_SIZE ) ;
         }
-
-    return status;
-}
-
-
-static
-NFCSTATUS
-phDnldNfc_Process_FW(
-                        phDnldNfc_sContext_t    *psDnldContext,
-                        phHal_sHwReference_t    *pHwRef
-#ifdef NXP_FW_PARAM
-                        ,uint8_t                 *nxp_nfc_fw
-                        ,uint32_t                 nxp_fw_len
-#endif
-                     )
-{
-    NFCSTATUS               status = NFCSTATUS_FAILED;
-    section_info_t          *p_cur_sec = NULL;
-    static unsigned         sec_type;
-    uint32_t                fw_index = 0;
-#ifdef NXP_NFC_MULTIPLE_FW
-    phDnldNfc_sFwImageInfo_t  *p_cur_fw = NULL;
-#endif /* #ifdef NXP_NFC_MULTIPLE_FW */
-    fw_data_hdr_t           *cur_fw_hdr = NULL;
-    uint8_t                 sec_index = 0;
-    uint8_t                 i = 0;
-
-    psDnldContext->p_img_hdr = (img_data_hdr_t *) nxp_nfc_fw;
-
-#ifdef NXP_NFC_MULTIPLE_FW
-
-    /* TODO: Create a memory of pointers to store all the Firmwares */
-    if( (NXP_NFC_IMAG_FW_MAX > psDnldContext->p_img_hdr->no_of_fw_img)
-        && (0 != psDnldContext->p_img_hdr->no_of_fw_img)
-        )
-    {
-        ( void )phDnldNfc_Allocate_Resource((void **)&psDnldContext->p_img_info,
-            (psDnldContext->p_img_hdr->no_of_fw_img * sizeof(phDnldNfc_sFwImageInfo_t)));
-
-        if(NULL != psDnldContext->p_img_info)
-        {
-            p_cur_fw = psDnldContext->p_img_info;
-        }
     }
-#endif /* #ifdef NXP_NFC_MULTIPLE_FW */
-
-    fw_index = sizeof (img_data_hdr_t);
-
-    for ( i=0; i < psDnldContext->p_img_hdr->no_of_fw_img; i++ )
-    {
-
-        psDnldContext->p_fw_hdr = (fw_data_hdr_t *) ( nxp_nfc_fw + fw_index );
-
-#ifdef NXP_NFC_MULTIPLE_FW
-        if(NULL != p_cur_fw)
-        {
-            ( p_cur_fw + i)->p_fw_hdr = psDnldContext->p_fw_hdr;
-        }
-#endif /* #ifdef NXP_NFC_MULTIPLE_FW */
-        cur_fw_hdr = psDnldContext->p_fw_hdr;
-
-        fw_index = fw_index + (cur_fw_hdr->fw_hdr_len * PNDNLD_WORD_LEN);
-
-        status = phDnldNfc_Check_FW( pHwRef, cur_fw_hdr);
-
-    }
-
     if ( ( NFCSTATUS_SUCCESS == status )
 #if  defined (NXP_FW_INTEGRITY_VERIFY)
         || (NFCSTATUS_SUCCESS == PHNFCSTATUS(status) )
 #endif /* !defined (NXP_FW_INTEGRITY_VERIFY) */
         )
     {
-        if( (BYTE_MASK > cur_fw_hdr->no_of_sections)
-           && (0 != cur_fw_hdr->no_of_sections)
-          )
-        {
+
         (void) phDnldNfc_Allocate_Resource((void **)&psDnldContext->p_fw_sec,
             (cur_fw_hdr->no_of_sections * sizeof(section_info_t)));
-
-            if(NULL != psDnldContext->p_fw_sec)
+        if(NULL == psDnldContext->p_fw_sec)
+        {
+            status = PHNFCSTVAL(CID_NFC_DNLD,
+                            NFCSTATUS_INSUFFICIENT_RESOURCES);
+        }
+        else
         {
             DNLD_DEBUG(" FW_DNLD: FW Index : %x \n",
                                             fw_index );
@@ -3490,7 +2496,7 @@
 
                 sec_type = (unsigned int)p_cur_sec->p_sec_hdr->section_mem_type;
 
-                    if((sec_type & DNLD_TRIM_MASK))
+                if(TRUE == ((section_type_t *)(&sec_type))->trim_val )
                 {
                     p_cur_sec->p_trim_data = (uint8_t *)
                                (nxp_nfc_fw + fw_index + sizeof(section_hdr_t));
@@ -3500,42 +2506,25 @@
                     p_cur_sec->p_trim_data = NULL;
                 }
 
-                    if (0 == sec_index)
-                    {
-                        if ((sec_type & DNLD_SM_UNLOCK_MASK))
-                        {
-                            (void)phDnldNfc_Set_Seq(psDnldContext,
-                                                            DNLD_SEQ_UNLOCK);
-                        }
-                        else
-                        {
-                            (void)phDnldNfc_Set_Seq(psDnldContext,
-                                                            DNLD_SEQ_INIT);
-                        }
-                    }
                 p_cur_sec->section_read = FALSE;
 
                 p_cur_sec->section_offset = 0;
 
                 p_cur_sec->p_sec_data = ((uint8_t *) nxp_nfc_fw) + fw_index +
+#ifdef SECTION_HDR
                     (p_cur_sec->p_sec_hdr->section_hdr_len * PNDNLD_WORD_LEN);
+#else
+                        sizeof (section_hdr_t) ;
+#endif
 
                 fw_index = fw_index +
+#ifdef SECTION_HDR
                     (p_cur_sec->p_sec_hdr->section_hdr_len * PNDNLD_WORD_LEN)
+#else
+                    sizeof (section_hdr_t)
+#endif
                    + p_cur_sec->p_sec_hdr->section_length;
 
-
-                    if( 0 != p_cur_sec->p_sec_hdr->section_checksum )
-                    {
-                            DNLD_DEBUG(" FW_DNLD: Section checksum : %x \n",
-                                            p_cur_sec->p_sec_hdr->section_checksum );
-
-                            p_cur_sec->p_sec_chksum = ( uint8_t *)(nxp_nfc_fw + fw_index);
-
-                            fw_index = fw_index +
-                                p_cur_sec->p_sec_hdr->section_checksum;
-                    }
-
                DNLD_DEBUG(" FW_DNLD: FW Index : %x \n", fw_index );
 
 #if  (NXP_FW_INTEGRITY_CHK >= 0x01)
@@ -3569,37 +2558,13 @@
                    {
                        break;
                    }
-
-                    } /* End of Address Switch */
-#endif /* #if  (NXP_FW_INTEGRITY_CHK >= 0x01) */
-                } /* End of For Loop */
-            } /* End of the Null Check */
-            else
-            {
-                status = PHNFCSTVAL(CID_NFC_DNLD,
-                        NFCSTATUS_INSUFFICIENT_RESOURCES);
                }
+#endif /* #if  (NXP_FW_INTEGRITY_CHK >= 0x01) */
 
             }
-        else if (
-                   (0 == cur_fw_hdr->no_of_sections)
-                   && (PHDNLD_FW_PATCH_SEC == cur_fw_hdr->fw_patch)
-                )
-        {
-            psDnldContext->p_fw_raw = (uint8_t *)(nxp_nfc_fw + fw_index);
-
-			psDnldContext->raw_mode_upgrade = PHDNLD_COMPLETE_OPERATION;
-
-            (void)phDnldNfc_Set_Seq(psDnldContext,
-                                            DNLD_SEQ_RAW);
-        }
-        else
-        {
-          DNLD_PRINT("*********  Empty Section and Firmware ******************\n\n");
-        }
 
             DNLD_PRINT("*******************************************\n\n");
-
+        }
     }
     return status;
 }
@@ -3634,7 +2599,45 @@
 
         fw_index = fw_index + (cur_fw_hdr->fw_hdr_len * PNDNLD_WORD_LEN);
 
-        status = phDnldNfc_Check_FW( pHwRef, cur_fw_hdr);
+        if ( !pHwRef->device_info.fw_version )
+        {
+            /* Override the Firmware Version Check and upgrade*/;
+            DNLD_PRINT(" FW_DNLD_CHK: Forceful Upgrade of the Firmware .... Required \n");
+            status = NFCSTATUS_SUCCESS;
+        }
+        else    if ( (pHwRef->device_info.fw_version >> (BYTE_SIZE * 2)) 
+                != ( cur_fw_hdr->fw_version >> (BYTE_SIZE * 2) ))
+        {
+            /* Check for the Compatible Romlib Version for the Hardware */
+            DNLD_PRINT(" FW_DNLD: IC Hardware Version Mismatch.. \n");
+            status = PHNFCSTVAL( CID_NFC_DNLD, NFCSTATUS_NOT_ALLOWED );
+        }
+        else if (( pHwRef->device_info.fw_version < cur_fw_hdr->fw_version  )
+#ifdef NXP_FW_PATCH_VERIFY
+            && (pHwRef->device_info.full_version[NXP_PATCH_VER_INDEX] < cur_fw_hdr->fw_patch )
+#endif
+            )
+        {
+            /* TODO: Firmware Version Check and upgrade*/
+            DNLD_PRINT(" FW_DNLD_CHK: Older Firmware. Upgrading to newer one.... \n");
+            status = NFCSTATUS_SUCCESS;
+        }
+#ifdef NXP_FW_CHK_LATEST
+        else if (( pHwRef->device_info.fw_version > cur_fw_hdr->fw_version  )
+            )
+        {
+            DNLD_PRINT(" FW_DNLD: Newer than the Stored One .... \n");
+            status = PHNFCSTVAL( CID_NFC_DNLD, NFCSTATUS_NOT_ALLOWED );
+        }
+#endif /* NXP_FW_CHK_LATEST */
+        else
+        {
+            DNLD_PRINT(" FW_DNLD_CHK: Already Updated .... \n");
+            status = ( CID_NFC_DNLD << BYTE_SIZE ) ;
+        }
+    }
+    if( NFCSTATUS_SUCCESS == status )
+    {
     }
     return status;
 }
@@ -3645,39 +2648,26 @@
 STATIC
 void
 phDnldNfc_Abort (
-                    uint32_t    abort_id
-#ifdef NFC_TIMER_CONTEXT
-                    , void     *dnld_cntxt
-#endif
+                    uint32_t    abort_id  ,
+                    void * pContext
                 )
 {
 
     phNfc_sCompletionInfo_t  comp_info = {0};
 
-    phDnldNfc_sContext_t *p_dnld_context = NULL;
-
-#ifdef NFC_TIMER_CONTEXT
-    p_dnld_context = (phDnldNfc_sContext_t *)dnld_cntxt;
-#else
-    p_dnld_context = gpphDnldContext;
-#endif
-
-    if ( ( NULL != p_dnld_context)
-            && (abort_id == p_dnld_context->timer_id ))
+    if ( ( NULL != gpphDnldContext)
+            && (abort_id == gpphDnldContext->timer_id ))
     {
         pphNfcIF_Notification_CB_t  p_upper_notify =
-            p_dnld_context->p_upper_notify;
+            gpphDnldContext->p_upper_notify;
         void                        *p_upper_context =
-                                p_dnld_context->p_upper_context;
-        phHal_sHwReference_t        *pHwRef = p_dnld_context->p_hw_ref;
+                                gpphDnldContext->p_upper_context;
+        phHal_sHwReference_t        *pHwRef = gpphDnldContext->p_hw_ref;
 
         (void)phDal4Nfc_Unregister(
-                     p_dnld_context->lower_interface.pcontext, pHwRef );
-        phDnldNfc_Release_Lower(p_dnld_context, pHwRef);
-        phDnldNfc_Release_Resources(&p_dnld_context);
-#ifndef NFC_TIMER_CONTEXT
-        gpphDnldContext = p_dnld_context;
-#endif
+                     gpphDnldContext->lower_interface.pcontext, pHwRef );
+        phDnldNfc_Release_Lower(gpphDnldContext, pHwRef);
+        phDnldNfc_Release_Resources(&gpphDnldContext);
 
         /* Notify the Error/Success Scenario to the upper layer */
         DNLD_DEBUG(" FW_DNLD: FW_DNLD Aborted with %x Timer Timeout \n",
@@ -3696,7 +2686,6 @@
 phDnldNfc_Upgrade (
                         phHal_sHwReference_t            *pHwRef,
 #ifdef NXP_FW_PARAM
-                        uint8_t                          type,
                         uint8_t                         *nxp_nfc_fw,
                         uint32_t                         fw_length,
 #endif
@@ -3720,15 +2709,16 @@
     else
     {
         DNLD_PRINT(" FW_DNLD: Starting the FW Upgrade Sequence .... \n");
+        /* Create the memory for Download Mgmt Context */
+        psDnldContext = (phDnldNfc_sContext_t *)
+                        phOsalNfc_GetMemory(sizeof(phDnldNfc_sContext_t));
 
-        (void)
-             phDnldNfc_Allocate_Resource((void **)
-                              &psDnldContext,sizeof(phDnldNfc_sContext_t));
         if(psDnldContext != NULL)
         {
-#ifndef NFC_TIMER_CONTEXT
+            (void ) memset((void *)psDnldContext,0,
+                                            sizeof(phDnldNfc_sContext_t));
+
             gpphDnldContext = psDnldContext;
-#endif
             psDnldContext->p_hw_ref = pHwRef;
             psDnldContext->timer_id = NXP_INVALID_TIMER_ID;
 
@@ -3762,7 +2752,7 @@
 
                 status = phDnldNfc_Process_FW( psDnldContext, pHwRef
 #ifdef NXP_FW_PARAM
-                ,*nxp_nfc_fw , fw_length
+                ,*nxp_nfc_fw /*, fw_length */
 #endif
                  );
 
@@ -3773,24 +2763,27 @@
                     if (NFCSTATUS_PENDING == status)
                     {
                         DNLD_PRINT("\n FW_DNLD: Initial Reset .... \n");
+                        p_cur_sec = ((section_info_t *)
+                            (psDnldContext->p_fw_sec ));
+                        sec_type = (unsigned )
+                            (p_cur_sec->p_sec_hdr->section_mem_type);
 
-#if defined(FW_DOWNLOAD_TIMER) 
-
+                        if(TRUE == ((section_type_t *)
+                                (&sec_type))->system_mem_unlock )
+                        {
+                            (void)phDnldNfc_Set_Seq(psDnldContext,
+                                                            DNLD_SEQ_UNLOCK);
+                        }
+                        else
+                        {
+                            (void)phDnldNfc_Set_Seq(psDnldContext,
+                                                            DNLD_SEQ_INIT);
+                        }
+#ifdef FW_DOWNLOAD_TIMER
                         psDnldContext->timer_id = phOsalNfc_Timer_Create( );
-
-#if (FW_DOWNLOAD_TIMER < 2)
                         phOsalNfc_Timer_Start( psDnldContext->timer_id,
-                                NXP_DNLD_COMPLETE_TIMEOUT,
-                                (ppCallBck_t) phDnldNfc_Abort
-#ifdef NFC_TIMER_CONTEXT
-                                , (void *) psDnldContext
+                                NXP_DNLD_COMPLETE_TIMEOUT, phDnldNfc_Abort, NULL );
 #endif
-                                );
-
-#endif  /* #if (FW_DOWNLOAD_TIMER < 2) */
-
-#endif /* #if defined(FW_DOWNLOAD_TIMER)  */
-
                     }
                 }
                 else if (NFCSTATUS_SUCCESS == PHNFCSTATUS(status))
@@ -3808,27 +2801,16 @@
                         (void)phDnldNfc_Set_Seq(psDnldContext, DNLD_SEQ_COMPLETE);
                         status = PHNFCSTVAL( CID_NFC_DNLD, 
                                         NFCSTATUS_PENDING );
-#if defined(FW_DOWNLOAD_TIMER) 
+#ifdef FW_DOWNLOAD_TIMER
                         psDnldContext->timer_id = phOsalNfc_Timer_Create( );
-#if (FW_DOWNLOAD_TIMER < 2)
                         phOsalNfc_Timer_Start( psDnldContext->timer_id,
-                                NXP_DNLD_COMPLETE_TIMEOUT, 
-                                (ppCallBck_t) phDnldNfc_Abort
-#ifdef NFC_TIMER_CONTEXT
-                                , (void *) psDnldContext
+                                NXP_DNLD_COMPLETE_TIMEOUT, phDnldNfc_Abort, NULL );
 #endif
-                                );
-
-#endif  /* #if (FW_DOWNLOAD_TIMER < 2) */
-
-#endif /* #if defined(FW_DOWNLOAD_TIMER)  */
                     }
 
 #else
                     status = NFCSTATUS_SUCCESS;
-
-#endif /* #if  defined (NXP_FW_INTEGRITY_VERIFY) */
-
+#endif
                 }
                 else
                 {
@@ -3839,12 +2821,9 @@
             if (NFCSTATUS_PENDING != PHNFCSTATUS(status))
             {
                 (void)phDal4Nfc_Unregister(
-                            psDnldContext->lower_interface.pcontext, pHwRef);
-                phDnldNfc_Release_Lower(psDnldContext, pHwRef);
-                phDnldNfc_Release_Resources(&psDnldContext);
-#ifndef NFC_TIMER_CONTEXT
-                gpphDnldContext = psDnldContext;
-#endif
+                            gpphDnldContext->lower_interface.pcontext, pHwRef);
+                phDnldNfc_Release_Lower(gpphDnldContext, pHwRef);
+                phDnldNfc_Release_Resources(&gpphDnldContext);
             }
         } /* End of Status Check for Memory */
         else
diff --git a/src/phHal4Nfc.c b/src/phHal4Nfc.c
index 726b4b5..ebd447f 100644
--- a/src/phHal4Nfc.c
+++ b/src/phHal4Nfc.c
@@ -153,11 +153,7 @@
         gpphHal4Nfc_Hwref = NULL;
         PHDBG_INFO("Hal4:Open Failed");
         /*Call upper layer's Open Cb with error status*/
-        if(NULL != pUpper_OpenCb)
-        {
-            /*Upper layer's Open Cb*/
         (*pUpper_OpenCb)(pUpper_Context,status);
-        }
     }
     return;
 }
@@ -408,7 +404,7 @@
             if( openRetVal == NFCSTATUS_SUCCESS )
             {
                 /*update Next state*/
-                Hal4Ctxt->Hal4NextState = (HCI_NFC_DEVICE_TEST == eHciInitType?
+                Hal4Ctxt->Hal4NextState = (HCI_SELF_TEST == eHciInitType?
                                 eHal4StateSelfTestMode:eHal4StateOpenAndReady);
                 /*Store callback and context ,and set Default settings in Context*/
                 Hal4Ctxt->sUpperLayerInfo.pUpperOpenCb = pOpenCallback;
@@ -472,17 +468,13 @@
     else if(NULL == psHwReference->hal_context)
     {
 #ifdef FW_DOWNLOAD
-
-#if  !defined (NXP_FW_INTEGRITY_VERIFY)
         if(NFC_FW_DOWNLOAD_CHECK == IoctlCode)
         {
             RetStatus = phDnldNfc_Run_Check(
                 psHwReference                       
                 );
         }
-        else
-#endif /* !defined (NXP_FW_INTEGRITY_VERIFY) */
-        if((NFC_FW_DOWNLOAD == IoctlCode)
+        else if((NFC_FW_DOWNLOAD == IoctlCode)
             &&(NULL == gpphHal4Nfc_Hwref))/*Indicates current state is shutdown*/
         {
             Hal4Ctxt = (phHal4Nfc_Hal4Ctxt_t *)
@@ -511,9 +503,7 @@
                         phHal4Nfc_DownloadComplete,
                         Hal4Ctxt
                         );
-                if((NFCSTATUS_SUCCESS == RetStatus)
-                    || (NFCSTATUS_PENDING != PHNFCSTATUS(RetStatus))
-                    )
+                if(NFCSTATUS_SUCCESS == RetStatus)
                 {
                     phOsalNfc_FreeMemory(Hal4Ctxt);
                     ((phHal_sHwReference_t *)psHwReference)->hal_context = NULL;
@@ -1016,15 +1006,10 @@
                 break;
             case NFC_NOTIFY_DEVICE_ERROR:
             {
-                NFCSTATUS status = NFCSTATUS_BOARD_COMMUNICATION_ERROR;
-                pphHal4Nfc_GenCallback_t pUpper_OpenCb
-                                                = Hal4Ctxt->sUpperLayerInfo.pUpperOpenCb;
-                void                   *pUpper_Context
-                                            = Hal4Ctxt->sUpperLayerInfo.psUpperLayerCtxt;
                 static phHal4Nfc_NotificationInfo_t uNotificationInfo;
+                Hal4Ctxt->Hal4NextState = eHal4StateInvalid;
                 if(NULL != Hal4Ctxt->sUpperLayerInfo.pDefaultEventHandler)
                 {                    
-                    Hal4Ctxt->Hal4NextState = eHal4StateInvalid;
                     Hal4Ctxt->sUpperLayerInfo.pDefaultEventHandler(
                         Hal4Ctxt->sUpperLayerInfo.DefaultListenerCtxt,
                         NFC_EVENT_NOTIFICATION,
@@ -1032,31 +1017,8 @@
                         NFCSTATUS_BOARD_COMMUNICATION_ERROR
                         );
                 }
-                else if (( eHal4StateSelfTestMode == Hal4Ctxt->Hal4NextState )
-                    || ( eHal4StateOpenAndReady == Hal4Ctxt->Hal4NextState ) )
-                {
-                    Hal4Ctxt->Hal4CurrentState = eHal4StateClosed;
-                    Hal4Ctxt->Hal4NextState = eHal4StateInvalid;
-                    (void)phHciNfc_Release((void *)Hal4Ctxt->psHciHandle,
-                                              pHwRef, (pphNfcIF_Notification_CB_t)NULL,
-                                               (void *)Hal4Ctxt);/*Clean up Hci*/
-                    Hal4Ctxt->psHciHandle = NULL;
-                    phOsalNfc_FreeMemory((void *)Hal4Ctxt->pHal4Nfc_LayerCfg);
-                    Hal4Ctxt->pHal4Nfc_LayerCfg = NULL;
-                    phOsalNfc_FreeMemory((void *)Hal4Ctxt);
-                    gpphHal4Nfc_Hwref->hal_context = NULL;
-                    gpphHal4Nfc_Hwref = NULL;
-                    PHDBG_INFO("Hal4:Open Failed");
-                    /*Call upper layer's Open Cb with error status*/
-                    if(NULL != pUpper_OpenCb)
-                    {
-                        /*Upper layer's Open Cb*/
-                        (*pUpper_OpenCb)(pUpper_Context,status);
-                    }
-                }
                 else
                 {
-                    Hal4Ctxt->Hal4NextState = eHal4StateInvalid;
                     phOsalNfc_RaiseException(phOsalNfc_e_UnrecovFirmwareErr,1);
                 }
                 break;
@@ -1254,7 +1216,6 @@
         case NFC_INFO_TXLDO_OVERCUR:
         case NFC_INFO_MEM_VIOLATION:
         case NFC_INFO_TEMP_OVERHEAT:
-        case NFC_INFO_LLC_ERROR:
         {
             sNotificationInfo.info = psEventInfo;
             sNotificationInfo.status = NFCSTATUS_SUCCESS;
@@ -1279,10 +1240,7 @@
         case NFC_EVT_START_OF_TRANSACTION:
         case NFC_EVT_END_OF_TRANSACTION:
         case NFC_EVT_CONNECTIVITY:   
-        case NFC_EVT_OPERATION_ENDED:
-        case NFC_EVT_MIFARE_ACCESS:
-        case NFC_EVT_APDU_RECEIVED:
-        case NFC_EVT_EMV_CARD_REMOVAL:
+        case NFC_EVT_OPERATION_ENDED:        
             sNotificationInfo.info = psEventInfo;
             sNotificationInfo.status = NFCSTATUS_SUCCESS;
             sNotificationInfo.type = NFC_EVENT_NOTIFICATION;
@@ -1331,23 +1289,10 @@
         = Hal4Ctxt->sUpperLayerInfo.pUpperIoctlCb;
     void  *pUpper_Context = Hal4Ctxt->sUpperLayerInfo.psUpperLayerCtxt;
     /*check for Success*/
-    if(( DEVMGMT_SWP_TEST == Hal4Ctxt->Ioctl_Type )
-        || ( DEVMGMT_ANTENNA_TEST == Hal4Ctxt->Ioctl_Type ))
+    if((SelfTestResults->length > 0) && (0 == SelfTestResults->buffer[0]))
     {
         status = NFCSTATUS_SUCCESS;
     }
-    else if((SelfTestResults->length > 0) && (0 == SelfTestResults->buffer[0]))
-    {
-        status = NFCSTATUS_SUCCESS;
-    }
-    else
-    {
-        if (NULL != pInfo)
-        {
-            status = ((phNfc_sCompletionInfo_t *)pInfo)->status;
-        }
-    }
-
     /*Copy response buffer and length*/
     (void)memcpy(Hal4Ctxt->sUpperLayerInfo.pIoctlOutParam->buffer,
                  SelfTestResults->buffer,
@@ -1406,8 +1351,7 @@
     {
         /*for NFC_MEM_READ and NFC_GPIO_READ ,provide one Byte Response*/
         if ((NFC_MEM_READ == Hal4Ctxt->Ioctl_Type)
-            || (NFC_GPIO_READ == Hal4Ctxt->Ioctl_Type)
-            )
+            || (NFC_GPIO_READ == Hal4Ctxt->Ioctl_Type))
         {
             Hal4Ctxt->sUpperLayerInfo.pIoctlOutParam->length 
                 = sizeof (uint8_t);
diff --git a/src/phHciNfc.h b/src/phHciNfc.h
index 4f52b4a..f360413 100644
--- a/src/phHciNfc.h
+++ b/src/phHciNfc.h
@@ -78,9 +78,8 @@
 typedef enum phHciNfc_Init
 {
   HCI_SESSION = 0x00,
-  HCI_NFC_DEVICE_TEST,
-  HCI_CUSTOM_INIT,
-  HCI_SELF_TEST
+  HCI_SELF_TEST,
+  HCI_CUSTOM_INIT
 }phHciNfc_Init_t;
 
 /** \ingroup  grp_hal_hci
@@ -264,7 +263,7 @@
  *                                      of the HCI Layer.
  *  \param[in]  pHwRef                  pHwRef is the Information of
  *                                      the Device Interface Link .
- *  \param[in]  discovery_type                 If True: Start re-polling of the target
+ *  \param[in]  re_poll                 If True: Start re-polling of the target
  *                                      after the Target Device is de-activated
  *                                      or else - continue discovery with next
  *                                      technology.
@@ -280,7 +279,7 @@
  phHciNfc_Restart_Discovery (
                         void                            *psHciHandle,
                         void                            *pHwRef,
-                        uint8_t                         discovery_type
+                        uint8_t                         repoll
                      );
 
 
@@ -496,11 +495,10 @@
  *                                      of the HCI Layer.
  *  \param[in]  pHwRef                  pHwRef is the Information of
  *                                      the Device Interface Link .
- *  \param[in]  discovery_type          If NFC_RF_DISCOVERY_REPOLL: Start re-polling of
- *                                      the target after the Target Device is
- *                                      de-activatedor if NFC_RF_DISCOVERY_CONTINUE -
- *                                      continue discovery with next technology or
- *                                      stop the discovery wheel.
+ *  \param[in]  re_poll                 If True: Start re-polling of the target
+ *                                      after the Target Device is de-activated
+ *                                      or else - continue discovery with next
+ *                                      technology.
  *
  *  \retval NFCSTATUS_PENDING           To De-select the remote target pending.
  *  \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
@@ -514,7 +512,7 @@
  phHciNfc_Disconnect (
                     void                            *psHciHandle,
                     void                            *pHwRef,
-                    uint8_t                         discovery_type
+                    uint8_t                         re_poll
                  );
 
 
diff --git a/src/phHciNfc_DevMgmt.c b/src/phHciNfc_DevMgmt.c
index 5b3eddc..32662c1 100644
--- a/src/phHciNfc_DevMgmt.c
+++ b/src/phHciNfc_DevMgmt.c
@@ -71,7 +71,6 @@
 #define NXP_EVT_INFO_EXT_RF_FIELD    0x12U
 #define NXP_EVT_INFO_MEM_VIOLATION   0x13U
 #define NXP_EVT_INFO_TEMP_OVERHEAT   0x14U
-#define NXP_EVT_INFO_LLC_ERROR       0x15U
 
 #define NFC_DEV_TXLDO_MASK           0x03U
 
@@ -519,8 +518,7 @@
                     if(status == NFCSTATUS_SUCCESS)
                     {
                         
-                        if ((HCI_SELF_TEST == psHciContext->init_mode )
-                            || (HCI_NFC_DEVICE_TEST == psHciContext->init_mode ))
+                        if (HCI_SELF_TEST == psHciContext->init_mode )
                         {
                             p_device_mgmt_info->next_seq =
                                                 DEV_MGMT_GPIO_PDIR;
@@ -643,27 +641,18 @@
 #endif /* #if  ( NXP_NFC_IFC_TIMEOUT & 0x01 ) */
                 case DEV_MGMT_TX_LDO:
                 {
-#if ( NXP_HAL_VERIFY_EEPROM_CRC & 0x01U )
-                    if (0 != p_device_mgmt_info->eeprom_crc)
-                    {
-                        status = NFCSTATUS_FAILED;
-                    }
-                    else
-#endif
-                    {
-                       config = (NFC_DEV_HWCONF_DEFAULT |
+                    config = (NFC_DEV_HWCONF_DEFAULT |
                                     (NXP_DEFAULT_TX_LDO & NFC_DEV_TXLDO_MASK));
-                       status = phHciNfc_DevMgmt_Configure( psHciContext, pHwRef,
+                    status = phHciNfc_DevMgmt_Configure( psHciContext, pHwRef,
                             NFC_ADDRESS_HW_CONF , config );
-                       if(NFCSTATUS_PENDING == status )
-                       {
+                    if(NFCSTATUS_PENDING == status )
+                    {
 #if ( SW_TYPE_RF_TUNING_BF & 0x01)
-                           p_device_mgmt_info->next_seq = DEV_MGMT_ANAIRQ_CONF;
+                        p_device_mgmt_info->next_seq = DEV_MGMT_ANAIRQ_CONF;
 #else
-                           p_device_mgmt_info->next_seq = DEV_MGMT_CLK_REQ;
+                        p_device_mgmt_info->next_seq = DEV_MGMT_CLK_REQ;
 #endif
-                           /* status = NFCSTATUS_SUCCESS; */
-                       }
+                        /* status = NFCSTATUS_SUCCESS; */
                     }
                     break;
                 }
@@ -1063,20 +1052,17 @@
             {
                 p_device_mgmt_info->current_seq = DEV_MGMT_PIPE_OPEN;
                 p_device_mgmt_info->next_seq = DEV_MGMT_PIPE_OPEN ;
-                break;
-            }
+            }break;
             case UPDATE_SEQ:
             {
                 p_device_mgmt_info->current_seq = p_device_mgmt_info->next_seq;
             
-                break;
-            }
+            }break;
             case REL_SEQ:
             {
                 p_device_mgmt_info->current_seq = DEV_MGMT_EVT_AUTONOMOUS;
                 p_device_mgmt_info->next_seq = DEV_MGMT_EVT_AUTONOMOUS ;
-                break;
-            }
+            }break;
             default:
             {
                 break;
@@ -1121,8 +1107,6 @@
     }
     else
     {
-        phHciNfc_DevMgmt_Info_t *p_device_mgmt_info = (phHciNfc_DevMgmt_Info_t *)
-                                        psHciContext->p_device_mgmt_info ;
         p_pipe_info = ((phHciNfc_DevMgmt_Info_t *)
                        psHciContext->p_device_mgmt_info)->p_pipe_info ;
         switch(test_type)
@@ -1140,8 +1124,6 @@
                         p_pipe_info->param_info = test_param->buffer;
                         p_pipe_info->param_length = (uint8_t)test_param->length;
                     }
-                    p_device_mgmt_info->test_result.buffer = NULL;
-                    p_device_mgmt_info->test_result.length = 0;
                     status = 
                         phHciNfc_Send_DevMgmt_Command( psHciContext, pHwRef, 
                             pipe_id, (uint8_t)test_type );
@@ -1231,15 +1213,15 @@
                 break;
             }
             case NXP_DBG_READ:
+            {
+                *p_device_mgmt_info->p_val = (uint8_t)( length > HCP_HEADER_LEN ) ?
+                                    pResponse[HCP_HEADER_LEN]: 0;
+                p_device_mgmt_info->p_val = NULL;
+
+            }
             /* fall through */
             case NXP_DBG_WRITE:
             {
-                if( NULL != p_device_mgmt_info->p_val )
-                {
-                    *p_device_mgmt_info->p_val = (uint8_t)( length > HCP_HEADER_LEN ) ?
-                                        pResponse[HCP_HEADER_LEN]: 0;
-                    p_device_mgmt_info->p_val = NULL;
-                }
                 break;
             }
             /* Self Test Commands */
@@ -1368,11 +1350,6 @@
                                     p_device_mgmt_info->overheat_status;
                 break;
             }
-            case NXP_EVT_INFO_LLC_ERROR:
-            {
-                event_info.eventType = NFC_INFO_LLC_ERROR;
-                break;
-            }
             default:
             {
                 status = PHNFCSTVAL(CID_NFC_HCI,
diff --git a/src/phHciNfc_Generic.h b/src/phHciNfc_Generic.h
index b4f8a6d..5410325 100644
--- a/src/phHciNfc_Generic.h
+++ b/src/phHciNfc_Generic.h
@@ -458,7 +458,6 @@
 
     /* HCI Device Management Sequence */
     DEV_INIT_SEQ,
-    DEV_HAL_INFO_SEQ,
     DEV_CONFIG_SEQ,
     DEV_REL_SEQ,
 
@@ -612,8 +611,8 @@
     /** \internal Mode of HCI Initialisation */
     phHciNfc_Init_t             init_mode;
 
-    /** \internal Memory Information for HCI Initialisation */
-    uint8_t                     hal_mem_info[NXP_HAL_MEM_INFO_SIZE];
+    /** \internal Mode of HCI Initialisation */
+    void                        *p_io_params;
 
     /** \internal HCI Configuration Type */
     phHciNfc_eConfigType_t      config_type;
diff --git a/src/phHciNfc_Sequence.c b/src/phHciNfc_Sequence.c
index 53e8b70..13b8ad5 100644
--- a/src/phHciNfc_Sequence.c
+++ b/src/phHciNfc_Sequence.c
@@ -65,10 +65,6 @@
 ################################################################################
 */
 
-/* Address Definitions for HAL Configuration */
-#define NFC_ADDRESS_HAL_CONF            0x9FD0U
-
-
 /*
 ################################################################################
 ********************** Structure/Enumeration Definitions ***********************
@@ -247,10 +243,8 @@
                         /* Initialise to Perform Test on 
                            the Antenna/SWP Link */
                         case hciState_Test:
-                        {
                             status = NFCSTATUS_SUCCESS;
                             break;
-                        }
                         default:
                             break;
                     }
@@ -272,10 +266,8 @@
                         case hciState_Listen:
                         /* Specifies the Starting of the Release Sequence */
                         case hciState_Release:
-                        {
                             status = NFCSTATUS_SUCCESS;
                             break;
-                        }
                         default:
                             break;
                     }
@@ -314,10 +306,8 @@
                         case hciState_Connect:
                         /* Specifies the Starting of the Release Sequence */
                         case hciState_Release:
-                        {
                             status = NFCSTATUS_SUCCESS;
                             break;
-                        }
                         default:
                             break;
                     }
@@ -348,10 +338,8 @@
                         case hciState_Disconnect:
                         /* Specifies the Starting of the Release Sequence */
                         case hciState_Release:
-                        {
                             status = NFCSTATUS_SUCCESS;
                             break;
-                        }
                         default:
                             break;
                     }
@@ -375,10 +363,8 @@
                         case hciState_Transact:
                         /* Specifies the Starting of the Release Sequence */
                         case hciState_Release:
-                        {
                             status = NFCSTATUS_SUCCESS;
                             break;
-                        }
                         default:
                             break;
                     }
@@ -400,10 +386,8 @@
                         case hciState_Config:
                         /* Specifies the Starting of the Release Sequence */
                         case hciState_Release:
-                        {
                             status = NFCSTATUS_SUCCESS;
                             break;
-                        }
                         default:
                             break;
                     }
@@ -428,14 +412,10 @@
                         case hciState_Listen:
                         /* Specifies the Starting of the Release Sequence */
                         case hciState_Release:
-                        {
                             status = NFCSTATUS_SUCCESS;
                             break;
-                        }
                         default:
-                        {
                             break;
-                        }
                     }
                     break;
                 }
@@ -660,7 +640,7 @@
             {
                 if (hciState_Reset == psHciContext->hci_state.cur_state)
                 {
-                    phNfc_sCompletionInfo_t     comp_info={FALSE,0, NULL};
+                    phNfc_sCompletionInfo_t     comp_info;
 
                     phHciNfc_Release_Lower( psHciContext, pHwRef );
                     /* Release all the resources and 
@@ -674,7 +654,7 @@
                 {
                     /* Notify the Poll/Emulation Configure failure to the upper layer */
 
-                    phNfc_sCompletionInfo_t     comp_info={FALSE,0, NULL};
+                    phNfc_sCompletionInfo_t     comp_info;
 
                     comp_info.status = error_status ;
 
@@ -691,8 +671,7 @@
                 {
 
                     /* Notify the Poll Configure failure to the upper layer */
-                    phNfc_sCompletionInfo_t     comp_info={FALSE,0, NULL};
-
+                    phNfc_sCompletionInfo_t     comp_info;
 
                     psHciContext->error_status = error_status;
                     status = phHciNfc_Pending_Sequence(psHciContext, pHwRef );
@@ -721,7 +700,7 @@
             case hciState_Config:
             {
                 /* Notify the Configure failure to the upper layer */
-                phNfc_sCompletionInfo_t     comp_info={FALSE,0, NULL};
+                phNfc_sCompletionInfo_t     comp_info;
 
                 psHciContext->error_status = error_status;
                 status = phHciNfc_Pending_Sequence(psHciContext, pHwRef );
@@ -737,7 +716,7 @@
             case hciState_Select:
             {
                 /* Notify the Configure failure to the upper layer */
-                phNfc_sCompletionInfo_t     comp_info={FALSE,0, NULL};
+                phNfc_sCompletionInfo_t     comp_info={FALSE};
 
                 /* Rollback the FSM as the Target Discovery Failed */
                 phHciNfc_FSM_Rollback(psHciContext);
@@ -763,7 +742,7 @@
             case hciState_Transact:
                 /* Notify the Transceive failure to the upper layer */
             {
-                phNfc_sTransactionInfo_t        transact_info={FALSE,0,NULL,NULL,0};
+                phNfc_sTransactionInfo_t        transact_info; 
 
                 /* Rollback the FSM as the Transceive Failed */
                 phHciNfc_FSM_Rollback(psHciContext);
@@ -780,7 +759,7 @@
             case hciState_Connect:
             {
                 /* Notify the General failure to the upper layer */
-                phNfc_sCompletionInfo_t     comp_info={FALSE,0, NULL};
+                phNfc_sCompletionInfo_t     comp_info;
 
                 /* psHciContext->host_rf_type = phHal_eUnknown_DevType; */
                 status = phHciNfc_ReaderMgmt_Update_Sequence(
@@ -797,7 +776,7 @@
             case hciState_Reactivate:
             {
                 /* Notify the General failure to the upper layer */
-                phNfc_sCompletionInfo_t     comp_info={FALSE,0, NULL};
+                phNfc_sCompletionInfo_t     comp_info={FALSE};
 
                 /* psHciContext->host_rf_type = phHal_eUnknown_DevType; 
                 status = phHciNfc_ReaderMgmt_Update_Sequence(
@@ -813,7 +792,7 @@
             }
             case hciState_Presence:
             {
-                phNfc_sCompletionInfo_t     comp_info={FALSE,0, NULL};
+                phNfc_sCompletionInfo_t     comp_info;
 
                 /* Roll Back to Connect State as Presence Check is Complete */
                 phHciNfc_FSM_Rollback(psHciContext);
@@ -830,7 +809,7 @@
             case hciState_Disconnect:
             {
                 /* Notify the General failure to the upper layer */
-                phNfc_sCompletionInfo_t     comp_info={FALSE,0, NULL};
+                phNfc_sCompletionInfo_t     comp_info;
 
                 phHciNfc_FSM_Rollback(psHciContext);
                 comp_info.status = error_status ;
@@ -844,7 +823,7 @@
 #ifdef NXP_HCI_SHUTDOWN_OVERRIDE
                 status = phHciNfc_Release_Sequence(psHciContext ,pHwRef);
 #else
-                phNfc_sCompletionInfo_t     comp_info={FALSE,0, NULL};
+                phNfc_sCompletionInfo_t     comp_info;
 
                 phHciNfc_Release_Lower( psHciContext, pHwRef );
                 /* Release all the resources and 
@@ -859,7 +838,7 @@
             default:
             {
                 /* Notify the General failure to the upper layer */
-                phNfc_sCompletionInfo_t     comp_info={FALSE,0, NULL};
+                phNfc_sCompletionInfo_t     comp_info;
 
                 phHciNfc_FSM_Rollback(psHciContext);
                 comp_info.status = error_status ;
@@ -880,7 +859,8 @@
     else
     {
         /* Notify the General failure to the upper layer */
-        phNfc_sCompletionInfo_t     comp_info={FALSE,0, NULL};
+        phNfc_sCompletionInfo_t     comp_info;
+
         phHciNfc_FSM_Rollback(psHciContext);
         comp_info.status = error_status ;
         /* Disable the Notification to the Upper Layer */
@@ -946,7 +926,7 @@
                 case hciState_Select:
                 case hciState_Connect:
                 {
-                    phNfc_sCompletionInfo_t     comp_info={FALSE,0, NULL};
+                    phNfc_sCompletionInfo_t     comp_info;
 
                     /* Update to the Intialise state as the discovery wheel is 
                      * restarted.
@@ -1003,7 +983,7 @@
         }
         case hciState_Presence:
         {
-            phNfc_sCompletionInfo_t     comp_info={FALSE,0, NULL};
+            phNfc_sCompletionInfo_t     comp_info;
 
             /* Roll Back to Connect State as Presence Check is Complete */
             phHciNfc_FSM_Rollback(psHciContext);
@@ -1122,7 +1102,7 @@
                 }
                 else
                 {
-#if defined( ESTABLISH_SESSION )
+#ifdef ESTABLISH_SESSION
                     NFCSTATUS info_status = NFCSTATUS_SUCCESS;
                     PHNFC_UNUSED_VARIABLE(info_status);
                     info_status = phHciNfc_IDMgmt_Update_Sequence( 
@@ -1130,11 +1110,7 @@
 
                     if(NFCSTATUS_SUCCESS == info_status)
                     {
-#if ( NXP_HAL_MEM_INFO_SIZE > 0x00U )
-                        psHciContext->hci_seq = DEV_HAL_INFO_SEQ;
-#else
                         psHciContext->hci_seq = IDENTITY_INFO_SEQ;
-#endif /* #if ( NXP_HAL_MEM_INFO_SIZE > 0x00U ) */
                     }
                     else
                     {
@@ -1142,11 +1118,10 @@
                         status = PHNFCSTVAL(CID_NFC_HCI,
                                     NFCSTATUS_INVALID_HCI_SEQUENCE);
                     }
-#elif ( NXP_HAL_MEM_INFO_SIZE > 0x00U )
-                    psHciContext->hci_seq = DEV_HAL_INFO_SEQ;
 #else
                     psHciContext->hci_seq = HCI_END_SEQ;
-#endif /* #ifdef ESTABLISH_SESSION */
+
+#endif
                 }
 
             }
@@ -1183,10 +1158,8 @@
             status = phHciNfc_EmuMgmt_Initialise( psHciContext,pHwRef );
             if(NFCSTATUS_SUCCESS == status)
             {
-#if defined( ESTABLISH_SESSION )
+#ifdef ESTABLISH_SESSION
                 psHciContext->hci_seq = ADMIN_SESSION_SEQ;
-#elif ( NXP_HAL_MEM_INFO_SIZE > 0x00U )
-                psHciContext->hci_seq = DEV_HAL_INFO_SEQ;
 #else
                 psHciContext->hci_seq = HCI_END_SEQ;
 #endif
@@ -1199,11 +1172,7 @@
             status = phHciNfc_Admin_Initialise( psHciContext,pHwRef );
             if(NFCSTATUS_SUCCESS == status)
             {
-#if ( NXP_HAL_MEM_INFO_SIZE > 0x00U )
-                psHciContext->hci_seq = DEV_HAL_INFO_SEQ;
-#else
                 psHciContext->hci_seq = IDENTITY_INFO_SEQ;
-#endif /* #if ( NXP_HAL_MEM_INFO_SIZE > 0x00U ) */
             }
             break;
         }
@@ -1213,13 +1182,11 @@
                                                 psHciContext, pHwRef );
             if(NFCSTATUS_SUCCESS == status)
             {
-#if defined( SW_AUTO_ACTIVATION )
+#ifdef SW_AUTO_ACTIVATION
                 psHciContext->hci_seq = READER_SW_AUTO_SEQ;
-#elif ( NXP_HAL_MEM_INFO_SIZE > 0x00U )
-                psHciContext->hci_seq = DEV_HAL_INFO_SEQ;
 #else
                 psHciContext->hci_seq = IDENTITY_INFO_SEQ;
-#endif /* #if ( NXP_HAL_MEM_INFO_SIZE > 0x00U ) */
+#endif
             }
             break;
         }
@@ -1252,8 +1219,7 @@
             {
                 if ((HCI_SELF_TEST != psHciContext->init_mode)
                     /* && ( TRUE == ((phHal_sHwReference_t *)pHwRef)->se_detect ) */
-                    && (HCI_CUSTOM_INIT != psHciContext->init_mode)
-                    && (HCI_NFC_DEVICE_TEST != psHciContext->init_mode))
+                    && (HCI_CUSTOM_INIT != psHciContext->init_mode))
                 {
                     NFCSTATUS info_status = NFCSTATUS_SUCCESS;
                     PHNFC_UNUSED_VARIABLE(info_status);
@@ -1281,42 +1247,10 @@
             }
             break;
         }
-#endif /* #ifdef ESTABLISH_SESSION */
-
-#if ( NXP_HAL_MEM_INFO_SIZE > 0x00U )
-        case DEV_HAL_INFO_SEQ:
-        {
-            static uint8_t      mem_index = 0;
-            status = phHciNfc_DevMgmt_Get_Info(psHciContext, pHwRef,
-                        (NFC_ADDRESS_HAL_CONF + mem_index),
-                            (psHciContext->hal_mem_info + mem_index));
-            if(NFCSTATUS_PENDING == status)
-            {
-                mem_index++;
-                if (NXP_HAL_MEM_INFO_SIZE <= mem_index )
-                {
-                    NFCSTATUS info_status = NFCSTATUS_SUCCESS;
-                    PHNFC_UNUSED_VARIABLE(info_status);
-                    info_status = phHciNfc_IDMgmt_Update_Sequence(
-                                                psHciContext, INFO_SEQ );
-                    mem_index = 0;
-                    psHciContext->hci_seq = IDENTITY_INFO_SEQ;
-                    /* psHciContext->hci_seq =
-                            (HCI_SELF_TEST != psHciContext->init_mode)?
-                                    IDENTITY_INFO_SEQ : HCI_END_SEQ; */
-                }
-            }
-            break;
-        }
-#endif /* #if ( NXP_HAL_MEM_INFO_SIZE > 0x00U ) */
+#endif
         case HCI_END_SEQ:
         {
-            phHal_sMemInfo_t    *p_mem_info =
-                    (phHal_sMemInfo_t *) ( psHciContext->hal_mem_info );
-            if (
-                (HCI_SELF_TEST == psHciContext->init_mode )
-                || (HCI_NFC_DEVICE_TEST == psHciContext->init_mode )
-                )
+            if (HCI_SELF_TEST == psHciContext->init_mode )
             {
                 psHciContext->hci_state.next_state
                     = (uint8_t) hciState_Test;
@@ -1326,17 +1260,10 @@
             phHciNfc_Uicc_Connectivity( psHciContext, pHwRef );
 #endif /* #ifdef UICC_CONNECTIVITY_PATCH */
 
-#if ( NXP_HAL_MEM_INFO_SIZE > 0x00U )
-            if(NXP_FW_UPLOAD_SUCCESS != p_mem_info->fw_magic )
-            {
-                status = PHNFCSTVAL( CID_NFC_HCI, NFCSTATUS_FAILED );
-            }
-#endif /* #if ( NXP_HAL_MEM_INFO_SIZE > 0x00U ) */
-
             /* Initialisation Complete Notification to the Upper Layer */
             if(NFCSTATUS_SUCCESS == status)
             {
-                phNfc_sCompletionInfo_t     comp_info={FALSE,0, NULL};
+                phNfc_sCompletionInfo_t     comp_info;
 
                 comp_info.status = status;
                 phHciNfc_Notify(psHciContext->p_upper_notify,
@@ -1406,10 +1333,6 @@
         }
         case DEV_REL_SEQ:
         {
-            NFCSTATUS info_status = NFCSTATUS_SUCCESS;
-            PHNFC_UNUSED_VARIABLE(info_status);
-            info_status = phHciNfc_DevMgmt_Update_Sequence(
-                                            psHciContext, REL_SEQ );
             status = phHciNfc_DevMgmt_Release( psHciContext, pHwRef );
             if(NFCSTATUS_SUCCESS == status)
             {
@@ -1511,7 +1434,7 @@
                         )
 {
     NFCSTATUS                   status = NFCSTATUS_SUCCESS;
-    phNfc_sCompletionInfo_t     comp_info = {FALSE,0,NULL};
+    phNfc_sCompletionInfo_t     comp_info;
 
     switch(psHciContext->config_type)
     {
@@ -1837,7 +1760,7 @@
                          )
 {
     NFCSTATUS               status = NFCSTATUS_SUCCESS;
-    static phNfc_sCompletionInfo_t      comp_info = {FALSE,0,NULL};
+    static phNfc_sCompletionInfo_t      comp_info;
 #if defined(HOST_EMULATION)
     phHciNfc_GateID_t       ce_gate = phHciNfc_UnknownGate;
 #endif  /* #ifdef HOST_EMULATION */
@@ -1984,7 +1907,8 @@
     NFCSTATUS           status = NFCSTATUS_SUCCESS;
     phHal_sADD_Cfg_t    *p_poll_config = (phHal_sADD_Cfg_t * )
         psHciContext->p_config_params;
-    phNfc_sCompletionInfo_t     comp_info = {FALSE,0,NULL};
+    phNfc_sCompletionInfo_t     comp_info;
+
     if (NULL != p_poll_config)
     {
         switch(psHciContext->hci_seq)
@@ -2090,7 +2014,7 @@
                          )
 {
     NFCSTATUS           status = NFCSTATUS_SUCCESS;
-    static phNfc_sCompletionInfo_t      comp_info = {FALSE,0,NULL};
+    static phNfc_sCompletionInfo_t      comp_info;
     phHal_eRemDevType_t         target_type = phHal_eUnknown_DevType;
 
     if( NULL != psHciContext->p_target_info )
@@ -2202,7 +2126,7 @@
                          )
 {
     NFCSTATUS           status = NFCSTATUS_SUCCESS;
-    static phNfc_sCompletionInfo_t      comp_info = {FALSE, 0 , NULL};
+    static phNfc_sCompletionInfo_t      comp_info;
     phHal_eRemDevType_t         target_type = phHal_eUnknown_DevType;
     uint8_t             re_poll = 0;
 
@@ -2286,7 +2210,7 @@
                             void                    *pHwRef
                          )
 {
-    static phNfc_sTransactionInfo_t transact_info = {FALSE,0,NULL,NULL,0};
+    static phNfc_sTransactionInfo_t transact_info;
 
     pphNfcIF_Notification_CB_t  p_upper_notify = psHciContext->p_upper_notify;
     void                        *pcontext = psHciContext->p_upper_context;
@@ -2433,8 +2357,8 @@
                          )
 {
     NFCSTATUS           status = NFCSTATUS_SUCCESS;
-    static phNfc_sCompletionInfo_t      comp_info = {0};
-    static phNfc_sData_t test_result= {NULL,0};
+    static phNfc_sCompletionInfo_t      comp_info;
+    static phNfc_sData_t test_result;
 
     /* Complete the Test Sequence and notify the HAL */
     status = phHciNfc_FSM_Complete ( psHciContext );
@@ -2456,7 +2380,7 @@
         phHciNfc_Notify(psHciContext->p_upper_notify,
                         psHciContext->p_upper_context, pHwRef,
                         NFC_NOTIFY_RESULT , &comp_info);
-        HCI_DEBUG(" HCI System Test Completed : Status = %u\n", test_status);
+        HCI_PRINT(" HCI System Test Completed. \n");
     }
     else
     {
@@ -2482,7 +2406,7 @@
                          )
 {
     NFCSTATUS           status = NFCSTATUS_SUCCESS;
-    static phNfc_sCompletionInfo_t      comp_info = {0};
+    static phNfc_sCompletionInfo_t      comp_info;
 
     /* To remove "warning (VS 4100) : unreferenced formal parameter" */
     PHNFC_UNUSED_VARIABLE(pdata);
diff --git a/src/phHciNfc_WI.c b/src/phHciNfc_WI.c
index e1310a4..4da2078 100644
--- a/src/phHciNfc_WI.c
+++ b/src/phHciNfc_WI.c
@@ -63,9 +63,6 @@
 
 /****************** Static Function Declaration **************************/
 
-static uint8_t paypass_removal[2]          = {0x50, 0x00};
-static uint8_t mifare_access               = 0x60;
-
 static 
 NFCSTATUS 
 phHciNfc_Recv_WI_Response(  
@@ -703,33 +700,12 @@
                 EventInfo.eventType = NFC_EVT_TRANSACTION;
                 EventInfo.eventInfo.aid.buffer = (uint8_t *)p_wi_info->aid;
                 /* check for AID data is at least 1 byte is their */
-                if (length > HCP_HEADER_LEN)
+                if(length > HCP_HEADER_LEN)
                 {
                     EventInfo.eventInfo.aid.length = length - HCP_HEADER_LEN;
-                    memcpy((void *)p_wi_info->aid, message->payload,
-                           EventInfo.eventInfo.aid.length );
+                    (void) memcpy((void *)p_wi_info->aid,message->payload,
+                                    EventInfo.eventInfo.aid.length );
                 }
-
-                /* Filter Transaction event */
-                if (EventInfo.eventInfo.aid.length == 4)
-                {
-                    EventInfo.eventType = NFC_EVT_APDU_RECEIVED;
-                }
-                else if (EventInfo.eventInfo.aid.length == 2)
-                {
-                    if (!memcmp(paypass_removal, EventInfo.eventInfo.aid.buffer, EventInfo.eventInfo.aid.length))
-                    {
-                        EventInfo.eventType = NFC_EVT_EMV_CARD_REMOVAL;
-                    }
-                    else if(mifare_access == EventInfo.eventInfo.aid.buffer[0])
-                    {
-                        EventInfo.eventType = NFC_EVT_MIFARE_ACCESS;
-                    }
-                }
-
-                EventInfo.eventInfo.aid.buffer = (uint8_t *)p_wi_info->aid;
-                (void) memcpy((void *)p_wi_info->aid,message->payload,
-                                EventInfo.eventInfo.aid.length );
                 break;
             }
             default:
diff --git a/src/phLibNfc.c b/src/phLibNfc.c
index e0ef435..9c7db4f 100644
--- a/src/phLibNfc.c
+++ b/src/phLibNfc.c
@@ -45,8 +45,6 @@
 *************************** Macro's  ******************************************
 */
 
-extern int dlopen_firmware();
-
 #ifndef STATIC_DISABLE
 #define STATIC static
 #else
@@ -108,7 +106,6 @@
 {
     NFCSTATUS Status = NFCSTATUS_SUCCESS;
 
-    Status = phDal4Nfc_Reset(1);
     Status = phDal4Nfc_Reset(0);
     Status = phDal4Nfc_Reset(1);
 
@@ -120,13 +117,6 @@
    return phDal4Nfc_Download();
 }
 
-int phLibNfc_Load_Firmware_Image ()
-{
-    int status;
-    status = dlopen_firmware();
-    return status;
-}
-
 
 extern uint8_t nxp_nfc_isoxchg_timeout;
 NFCSTATUS phLibNfc_SetIsoXchgTimeout(uint8_t timeout) {
@@ -590,7 +580,6 @@
         }
         /* No device is connected */
         gpphLibContext->Connected_handle = 0x00;       
-        gpphLibContext->Prev_Connected_handle = 0x00;
         gpphLibContext->ReleaseType = NFC_INVALID_RELEASE_TYPE;        
         gpphLibContext->eLibNfcCfgMode = NFC_DISCOVERY_STOP;
         /*Lib Nfc Stack is initilized and in idle state*/
diff --git a/src/phLibNfc.h b/src/phLibNfc.h
index 719cfc1..216196f 100644
--- a/src/phLibNfc.h
+++ b/src/phLibNfc.h
@@ -173,12 +173,6 @@
                                            ETSI TS 102 622 V7.4.0 */
     phLibNfc_eSE_EvtFieldOn,  // consider using phLibNfc_eSE_EvtConnectivity
     phLibNfc_eSE_EvtFieldOff,
-
-    phLibNfc_eSE_EvtApduReceived, /* PAYPASS MagStripe or MCHIP_4 transaction */
-
-    phLibNfc_eSE_EvtCardRemoval, /* Indicates the beginning of an EMV Card Removal sequence */
-
-    phLibNfc_eSE_EvtMifareAccess /* Indicates when the SMX Emulation MIFARE is accessed */
 } phLibNfc_eSE_EvtType_t;
 
 /**
@@ -851,8 +845,6 @@
 
 NFCSTATUS phLibNfc_Download_Mode ();
 
-int phLibNfc_Load_Firmware_Image ();
-
 // timeout is 8 bits
 // bits [0..3] => timeout value, (256*16/13.56*10^6) * 2^value
 //                  [0] -> 0.0003s
diff --git a/src/phLibNfc_Internal.h b/src/phLibNfc_Internal.h
index 304ac22..10018ec 100644
--- a/src/phLibNfc_Internal.h
+++ b/src/phLibNfc_Internal.h
@@ -221,9 +221,6 @@
     uint32_t                     Connected_handle,
                                  Discov_handle[MAX_REMOTE_DEVICES];
 
-    /* To store the previous connected handle in case of Multiple protocol tags */
-    uint32_t Prev_Connected_handle;
-
     /*Call back function pointers */
 
     phLibNfc_eDiscoveryConfigMode_t        eLibNfcCfgMode;
diff --git a/src/phLibNfc_Ioctl.c b/src/phLibNfc_Ioctl.c
index 08f34b5..9983c60 100644
--- a/src/phLibNfc_Ioctl.c
+++ b/src/phLibNfc_Ioctl.c
@@ -238,11 +238,8 @@
                               NFCSTATUS      status )
 {
     phLibNfc_Ioctl_Cntx_t *pIoctlCntx=NULL;
-    if(PHNFCSTATUS(status) == NFCSTATUS_FEATURE_NOT_SUPPORTED)
-    {
-        status = NFCSTATUS_FEATURE_NOT_SUPPORTED;
-    }
-    else if(PHNFCSTATUS(status)!=NFCSTATUS_SUCCESS)
+
+    if(PHNFCSTATUS(status)!=NFCSTATUS_SUCCESS)
     {
         status = NFCSTATUS_FAILED;
     }
diff --git a/src/phLibNfc_SE.c b/src/phLibNfc_SE.c
index 4e839cf..5fa4e08 100644
--- a/src/phLibNfc_SE.c
+++ b/src/phLibNfc_SE.c
@@ -204,51 +204,6 @@
                             status);
                         break;
                     }
-
-                    case NFC_EVT_APDU_RECEIVED:
-                    {
-                        if ((pEvtInfo->eventInfo.aid.length != 0) && ((pEvtInfo->eventInfo.aid.length <= 16)))
-                        {
-                            /* Copy received APDU to aid buffer. */
-                            Se_Trans_Info.UiccEvtInfo.aid.buffer = pEvtInfo->eventInfo.aid.buffer;
-                            Se_Trans_Info.UiccEvtInfo.aid.length = pEvtInfo->eventInfo.aid.length;
-                        }
-
-                        (*pLibContext->sSeContext.sSeCallabackInfo.pSeListenerNtfCb)(
-                            pLibContext->sSeContext.sSeCallabackInfo.pSeListenerCtxt,
-                            phLibNfc_eSE_EvtApduReceived,
-                            pSeInfo->hSecureElement,
-                            &Se_Trans_Info,
-                            status);
-                        break;
-                    }
-
-                    case NFC_EVT_MIFARE_ACCESS:
-                    {
-                        /* copy the Block MIFARE accessed */
-                        Se_Trans_Info.UiccEvtInfo.aid.buffer = pEvtInfo->eventInfo.aid.buffer;
-                        Se_Trans_Info.UiccEvtInfo.aid.length = pEvtInfo->eventInfo.aid.length;
-
-                        (*pLibContext->sSeContext.sSeCallabackInfo.pSeListenerNtfCb)(
-                            pLibContext->sSeContext.sSeCallabackInfo.pSeListenerCtxt,
-                            phLibNfc_eSE_EvtMifareAccess,
-                            pSeInfo->hSecureElement,
-                            &Se_Trans_Info,
-                            status);
-                        break;
-                    }
-
-                    case NFC_EVT_EMV_CARD_REMOVAL:
-                    {
-                        (*pLibContext->sSeContext.sSeCallabackInfo.pSeListenerNtfCb)(
-                            pLibContext->sSeContext.sSeCallabackInfo.pSeListenerCtxt,
-                            phLibNfc_eSE_EvtCardRemoval,
-                            pSeInfo->hSecureElement,
-                            &Se_Trans_Info,
-                            status);
-                        break;
-                    }
-
                     case NFC_EVT_END_OF_TRANSACTION:
                     {
                         (*pLibContext->sSeContext.sSeCallabackInfo.pSeListenerNtfCb)(
diff --git a/src/phLibNfc_initiator.c b/src/phLibNfc_initiator.c
index 2a03c05..340af78 100644
--- a/src/phLibNfc_initiator.c
+++ b/src/phLibNfc_initiator.c
@@ -548,9 +548,6 @@
             gpphLibContext->CBInfo.pClientConCntx = pContext;
             gpphLibContext->status.GenCb_pending_status = TRUE;
 			gpphLibContext->LibNfcState.next_state = eLibNfcHalStateConnect;            
-
-            gpphLibContext->Prev_Connected_handle = gpphLibContext->Connected_handle;
-
 			gpphLibContext->Connected_handle = hRemoteDevice;
          }
          else if (NFCSTATUS_INVALID_REMOTE_DEVICE == PHNFCSTATUS(ret_val))
@@ -636,7 +633,6 @@
             gpphLibContext->CBInfo.pClientConCntx = pContext;
             gpphLibContext->status.GenCb_pending_status=TRUE;
 			gpphLibContext->LibNfcState.next_state = eLibNfcHalStateConnect;            
-            gpphLibContext->Prev_Connected_handle = gpphLibContext->Connected_handle;
 			gpphLibContext->Connected_handle = hRemoteDevice;
          }
          else if(PHNFCSTATUS(RetVal) == NFCSTATUS_INVALID_REMOTE_DEVICE)
@@ -761,7 +757,6 @@
             /* If remote device is invalid return as TARGET LOST to upper layer*/
             /* If error code is other than SUCCESS return NFCSTATUS_TARGET_LOST */
             Connect_status = NFCSTATUS_TARGET_LOST;
-            gpphLibContext->Connected_handle = gpphLibContext->Prev_Connected_handle ;
         }
         gpphLibContext->ndef_cntx.is_ndef = CHK_NDEF_NOT_DONE;
         /* Update the Current Sate*/
@@ -901,9 +896,6 @@
         gpphLibContext->LastTrancvSuccess = FALSE;
         /*Reset Connected handle */
         gpphLibContext->Connected_handle=0x0000;
-        /*Reset previous Connected handle */
-        gpphLibContext->Prev_Connected_handle = 0x0000;
-
         if(gpphLibContext->sSeContext.eActivatedMode == phLibNfc_SE_ActModeWired)
         {
           gpphLibContext->sSeContext.eActivatedMode = phLibNfc_SE_ActModeDefault;
