Commit 743600b2 authored by Sandrine Bailleux's avatar Sandrine Bailleux Committed by TrustedFirmware Code Review
Browse files

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

parents d5ce8df7 f6c4b19a
...@@ -688,10 +688,7 @@ int cad_qspi_read(void *buffer, uint32_t offset, uint32_t size) ...@@ -688,10 +688,7 @@ int cad_qspi_read(void *buffer, uint32_t offset, uint32_t size)
if ((offset >= qspi_device_size) || if ((offset >= qspi_device_size) ||
(offset + size - 1 >= qspi_device_size) || (offset + size - 1 >= qspi_device_size) ||
(size == 0) || (size == 0)) {
((long) ((int *)buffer) & 0x3) ||
(offset & 0x3) ||
(size & 0x3)) {
ERROR("Invalid read parameter\n"); ERROR("Invalid read parameter\n");
return -1; return -1;
} }
...@@ -766,11 +763,9 @@ int cad_qspi_write(void *buffer, uint32_t offset, uint32_t size) ...@@ -766,11 +763,9 @@ int cad_qspi_write(void *buffer, uint32_t offset, uint32_t size)
if ((offset >= qspi_device_size) || if ((offset >= qspi_device_size) ||
(offset + size - 1 >= qspi_device_size) || (offset + size - 1 >= qspi_device_size) ||
(size == 0) || (size == 0)) {
((long)buffer & 0x3) ||
(offset & 0x3) ||
(size & 0x3))
return -2; return -2;
}
if (CAD_QSPI_INDWR_RDSTAT(mmio_read_32(CAD_QSPI_OFFSET + if (CAD_QSPI_INDWR_RDSTAT(mmio_read_32(CAD_QSPI_OFFSET +
CAD_QSPI_INDWR))) { CAD_QSPI_INDWR))) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment