summaryrefslogtreecommitdiff
path: root/Platform/Marvell/Drivers/Spi/Devices/MvSpiFlash.h
diff options
context:
space:
mode:
authorMarcin Wojtas <mw@semihalf.com>2017-09-25 03:25:14 +0200
committerLeif Lindholm <leif.lindholm@linaro.org>2017-11-07 17:19:57 +0000
commit822f314f2c29a589ebde99ea4a10a4e0f84cbd50 (patch)
tree495fca2c70be32a0064c71959c11cae7e0a27fed /Platform/Marvell/Drivers/Spi/Devices/MvSpiFlash.h
parentf79bce44ac60b3872c9f3e771aaf5fd40487252f (diff)
downloadedk2-platforms-822f314f2c29a589ebde99ea4a10a4e0f84cbd50.tar.xz
Marvell/Drivers: MvSpiFlash: Improve ReadId
Fix the ReadId routine by using master's ReadWrite callback instead of the raw Transfer - no longer swapping and byte shifting is needed. Simplify code by using local array instead of dynamic allocation. Moreover store the FlashId in an UINT8 array PCD instead of the concatenated UINT32 format - this way less overhead in the driver is needed for comparing the buffers. The new handling allowed for cleaning Fupdate and Sf shell commands FlashProbe routines. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Marcin Wojtas <mw@semihalf.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Diffstat (limited to 'Platform/Marvell/Drivers/Spi/Devices/MvSpiFlash.h')
-rwxr-xr-xPlatform/Marvell/Drivers/Spi/Devices/MvSpiFlash.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/Platform/Marvell/Drivers/Spi/Devices/MvSpiFlash.h b/Platform/Marvell/Drivers/Spi/Devices/MvSpiFlash.h
index f90abb771e..2583484afe 100755
--- a/Platform/Marvell/Drivers/Spi/Devices/MvSpiFlash.h
+++ b/Platform/Marvell/Drivers/Spi/Devices/MvSpiFlash.h
@@ -62,6 +62,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define CMD_ERASE_64K 0xd8
#define CMD_4B_ADDR_ENABLE 0xb7
+#define SPI_CMD_LEN 1
+
#define STATUS_REG_POLL_WIP (1 << 0)
#define STATUS_REG_POLL_PEC (1 << 7)