Board: Fix for QSPI flash hang issue in flash open
authorM V Pratap Reddy <x0257344@ti.com>
Fri, 27 Nov 2020 16:03:31 +0000 (21:33 +0530)
committerSivaraj R <sivaraj@ti.com>
Fri, 27 Nov 2020 16:13:14 +0000 (10:13 -0600)
packages/ti/board/src/flash/nor/ospi/nor_qspi.c

index f599d65a1cce727a3276485b37f5843f9900a01a..6ffa138aa273602e90e94f8b7fe941bf02e81ac6 100755 (executable)
@@ -163,11 +163,6 @@ static NOR_STATUS Nor_qspiEnableDDR(SPI_Handle handle)
     retVal = Nor_qspiCmdWrite(handle, data, 1, 1);\r
     if (retVal == NOR_PASS)\r
     {\r
-        if (Nor_qspiWaitReady(handle, NOR_WRR_WRITE_TIMEOUT))\r
-        {\r
-            return NOR_FAIL;\r
-        }\r
-\r
         /* Set opcodes */\r
         dummyCycles = NOR_QUAD_READ_DUMMY_CYCLE - 2;\r
         rx_lines    = OSPI_XFER_LINES_QUAD;\r
@@ -187,11 +182,6 @@ static NOR_STATUS Nor_qspiEnableDDR(SPI_Handle handle)
         return NOR_FAIL;\r
     }\r
 \r
-    if (Nor_qspiWaitReady(handle, NOR_WRR_WRITE_TIMEOUT))\r
-    {\r
-        return NOR_FAIL;\r
-    }\r
-\r
     /* Write CR1 register to enable QSPI mode */\r
     data[0] = NOR_CMD_WRR;\r
     data[1] = 0x02;\r
@@ -242,11 +232,6 @@ static NOR_STATUS Nor_qspiEnableSDR(SPI_Handle handle)
        return NOR_FAIL;\r
     }\r
 \r
-    if (Nor_qspiWaitReady(handle, NOR_WRR_WRITE_TIMEOUT))\r
-    {\r
-       return NOR_FAIL;\r
-    }\r
-\r
     /* Write Enhanced VCR register to enable quad mode */\r
     data[0] = NOR_CMD_WRITE_ENVCR;\r
     data[1] = 0x7F;  /* Enable quad mode */\r
@@ -275,11 +260,6 @@ static NOR_STATUS Nor_qspiEnableSDR(SPI_Handle handle)
         return NOR_FAIL;\r
     }\r
 \r
-    if (Nor_qspiWaitReady(handle, NOR_WRR_WRITE_TIMEOUT))\r
-    {\r
-        return NOR_FAIL;\r
-    }\r
-\r
     /* Write CR1 register to enable QSPI mode */\r
     data[0] = NOR_CMD_WRR;\r
     data[1] = 0x02;\r