From 201c42e6354bfeac5d42cf27bb15a47e786898af Mon Sep 17 00:00:00 2001 From: Martijn Coenen Date: Sun, 7 Apr 2013 13:30:15 -0700 Subject: Reduce patch auth timeout to 6 seconds for BCM2079xB3. Increasing this timeout lead to watchdog timeouts for B3-based products - most notably Manta's with bad firmware 92. Only increase to 30 seconds for newer revisions of the chip. Change-Id: I3c13d690ed29786c3458aefbe8b24732f8dd1b11 --- halimpl/bcm2079x/hal/hal/nfc_hal_prm.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'halimpl/bcm2079x/hal') diff --git a/halimpl/bcm2079x/hal/hal/nfc_hal_prm.c b/halimpl/bcm2079x/hal/hal/nfc_hal_prm.c index 862cdec..eae3d6c 100644 --- a/halimpl/bcm2079x/hal/hal/nfc_hal_prm.c +++ b/halimpl/bcm2079x/hal/hal/nfc_hal_prm.c @@ -590,9 +590,15 @@ void nfc_hal_prm_nci_command_complete_cback (tNFC_HAL_NCI_EVT event, UINT16 data if (nfc_hal_cb.prm.flags & NFC_HAL_PRM_FLAGS_SIGNATURE_SENT) { /* Wait for authentication complete (SECURE_PATCH_DOWNLOAD NTF), including time to commit to NVM (for BCM43341B0) */ + int auth_delay = NFC_HAL_PRM_SPD_TOUT; + if (!(nfc_hal_cb.prm.flags & NFC_HAL_PRM_FLAGS_BCM20791B3)) + { + /* XXX maco only wait 30 seconds for B4+ revisions to avoid watchdog timeouts */ + auth_delay = NFC_HAL_PRM_COMMIT_DELAY; + } nfc_hal_cb.prm.state = NFC_HAL_PRM_ST_SPD_AUTHENTICATING; nfc_hal_main_start_quick_timer (&nfc_hal_cb.prm.timer, 0x00, - (NFC_HAL_PRM_COMMIT_DELAY * QUICK_TIMER_TICKS_PER_SEC) / 1000); + (auth_delay * QUICK_TIMER_TICKS_PER_SEC) / 1000); return; } /* Download next segment */ -- cgit v1.2.3