Skip to content

Commit b9dccac

Browse files
committed
patches: restore QSPI patch for giga/opta
1 parent 9f8a26b commit b9dccac

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
From 67f98029e080a9ff605b078e383cabeb21da4807 Mon Sep 17 00:00:00 2001
2+
From: Martino Facchin <[email protected]>
3+
Date: Tue, 2 Jul 2024 16:13:42 +0200
4+
Subject: [PATCH] QSPI: call is_mem_ready before trying to set write enable bit
5+
for AT25SF128A
6+
7+
This reverts commit f6d960e023a8d2300f3e850f5d721e87eeb95948.
8+
---
9+
.../blockdevice/COMPONENT_QSPIF/source/QSPIFBlockDevice.cpp | 6 ++++++
10+
1 file changed, 6 insertions(+)
11+
12+
diff --git a/storage/blockdevice/COMPONENT_QSPIF/source/QSPIFBlockDevice.cpp b/storage/blockdevice/COMPONENT_QSPIF/source/QSPIFBlockDevice.cpp
13+
index ee8bab5556..b005aeb0f1 100644
14+
--- a/storage/blockdevice/COMPONENT_QSPIF/source/QSPIFBlockDevice.cpp
15+
+++ b/storage/blockdevice/COMPONENT_QSPIF/source/QSPIFBlockDevice.cpp
16+
@@ -1243,7 +1243,13 @@ int QSPIFBlockDevice::_set_write_enable()
17+
uint8_t status_value = 0;
18+
int status = -1;
19+
20+
+ if (_AT25SF128A_quirk && (false == _is_mem_ready())) {
21+
+ tr_error("Device not ready, set_write_enable failed");
22+
+ return -1;
23+
+ }
24+
+
25+
do {
26+
+
27+
if (QSPI_STATUS_OK != _qspi_send_general_command(QSPIF_INST_WREN, QSPI_NO_ADDRESS_COMMAND, NULL, 0, NULL, 0)) {
28+
tr_error("Sending WREN command FAILED");
29+
break;
30+
--
31+
2.45.2
32+

0 commit comments

Comments
 (0)