summaryrefslogtreecommitdiff
path: root/memories/flash
diff options
context:
space:
mode:
Diffstat (limited to 'memories/flash')
-rw-r--r--memories/flash/flashd_eefc.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/memories/flash/flashd_eefc.c b/memories/flash/flashd_eefc.c
index 45b9038..a367c8d 100644
--- a/memories/flash/flashd_eefc.c
+++ b/memories/flash/flashd_eefc.c
@@ -472,6 +472,7 @@ __attribute__ ((section (".ramfunc")))
unsigned char FLASHD_ReadUniqueID (unsigned long * uniqueID)
{
unsigned char error;
+ AT91S_EFC *pEfc = AT91C_BASE_EFC0;
SANITY_CHECK(uniqueID != NULL);
@@ -480,6 +481,9 @@ unsigned char FLASHD_ReadUniqueID (unsigned long * uniqueID)
uniqueID[2] = 0;
uniqueID[3] = 0;
+ /* SAM3U Errata 46.2.1.4 */
+ pEfc->EFC_FMR |= (1 << 16);
+
EFC_StartCommand(AT91C_BASE_EFC, AT91C_EFC_FCMD_STUI, 0);
uniqueID[0] = *(unsigned int *)AT91C_IFLASH;
@@ -488,6 +492,10 @@ unsigned char FLASHD_ReadUniqueID (unsigned long * uniqueID)
uniqueID[3] = *(unsigned int *)(AT91C_IFLASH + 12);
error = EFC_PerformCommand(AT91C_BASE_EFC, AT91C_EFC_FCMD_SPUI, 0);
+
+ /* SAM3U Errata 46.2.1.4 */
+ pEfc->EFC_FMR &= ~(1 << 16);
+
if (error) return error;
return 0;
personal git repositories of Harald Welte. Your mileage may vary