Dependencies:   DM_FATFileSystem EthernetInterface HTTPClient mbed-rtos mbed-src

Fork of DMSupport by Embedded Artists

Revision:
22:1a58a518435c
Parent:
19:2efb6f5f69a4
Child:
37:07659b5d90ce
diff -r 1e6bc4aca5b7 -r 1a58a518435c Memory/SPIFI.cpp
--- a/Memory/SPIFI.cpp	Mon Jan 12 10:37:57 2015 +0100
+++ b/Memory/SPIFI.cpp	Fri Jan 16 11:13:39 2015 +0100
@@ -16,6 +16,7 @@
 
 #include "SPIFI.h"
 #include "mbed_debug.h"
+#include "BiosLoader.h"
 
 
 /******************************************************************************
@@ -172,7 +173,15 @@
       _device = Macronix_MX25L12835F;
       _memorySize = _romData->memSize;
       _eraseBlockSize = 4*1024;
-    } 
+    }
+    else if (BiosLoader::instance().isKnownSPIFIMemory(_romData->mfger, _romData->devType, _romData->devID, _romData->memSize, &_eraseBlockSize))
+    {
+      /* The BIOS was able to identify the FLASH and we will use the 
+       * eraseBlockSize specified in the BIOS.
+       */
+      _device = SpecifiedInBios;
+      _memorySize = _romData->memSize;
+    }
     else 
     {
       debug("SPIFI::init(): Memory is unknown and may not work as expected\n");