Merge "intel: Remove un-needed checks for qspi driver r/w" into integration

This commit is contained in:
Sandrine Bailleux 2020-01-13 17:18:30 +00:00 committed by TrustedFirmware Code Review
commit 743600b25c

View File

@ -688,10 +688,7 @@ int cad_qspi_read(void *buffer, uint32_t offset, uint32_t size)
if ((offset >= qspi_device_size) ||
(offset + size - 1 >= qspi_device_size) ||
(size == 0) ||
((long) ((int *)buffer) & 0x3) ||
(offset & 0x3) ||
(size & 0x3)) {
(size == 0)) {
ERROR("Invalid read parameter\n");
return -1;
}
@ -766,11 +763,9 @@ int cad_qspi_write(void *buffer, uint32_t offset, uint32_t size)
if ((offset >= qspi_device_size) ||
(offset + size - 1 >= qspi_device_size) ||
(size == 0) ||
((long)buffer & 0x3) ||
(offset & 0x3) ||
(size & 0x3))
(size == 0)) {
return -2;
}
if (CAD_QSPI_INDWR_RDSTAT(mmio_read_32(CAD_QSPI_OFFSET +
CAD_QSPI_INDWR))) {