summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xPlatform/Marvell/Drivers/Spi/Devices/MvSpiFlash.c5
-rwxr-xr-xPlatform/Marvell/Drivers/Spi/Devices/MvSpiFlash.h1
2 files changed, 6 insertions, 0 deletions
diff --git a/Platform/Marvell/Drivers/Spi/Devices/MvSpiFlash.c b/Platform/Marvell/Drivers/Spi/Devices/MvSpiFlash.c
index 4a97ba9283..456d9f9bd7 100755
--- a/Platform/Marvell/Drivers/Spi/Devices/MvSpiFlash.c
+++ b/Platform/Marvell/Drivers/Spi/Devices/MvSpiFlash.c
@@ -150,6 +150,11 @@ SpiFlashCmdBankaddrWrite (
{
UINT8 Cmd = CMD_BANK_WRITE;
+ /* Update bank selection command for Spansion */
+ if (Slave->Info->Id[0] == NOR_FLASH_ID_SPANSION) {
+ Cmd = CMD_BANKADDR_BRWR;
+ }
+
MvSpiFlashWriteCommon (Slave, &Cmd, 1, &BankSel, 1);
}
diff --git a/Platform/Marvell/Drivers/Spi/Devices/MvSpiFlash.h b/Platform/Marvell/Drivers/Spi/Devices/MvSpiFlash.h
index 2583484afe..f09ff506b4 100755
--- a/Platform/Marvell/Drivers/Spi/Devices/MvSpiFlash.h
+++ b/Platform/Marvell/Drivers/Spi/Devices/MvSpiFlash.h
@@ -57,6 +57,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define CMD_READ_ARRAY_FAST 0x0b
#define CMD_PAGE_PROGRAM 0x02
#define CMD_BANK_WRITE 0xc5
+#define CMD_BANKADDR_BRWR 0x17
#define CMD_ERASE_4K 0x20
#define CMD_ERASE_32K 0x52
#define CMD_ERASE_64K 0xd8