PDK-6956: Board: Enabled quad mode for tpr12 evm qspi flash test
authorM V Pratap Reddy <x0257344@ti.com>
Fri, 4 Dec 2020 04:13:01 +0000 (09:43 +0530)
committerSivaraj R <sivaraj@ti.com>
Fri, 4 Dec 2020 11:34:48 +0000 (05:34 -0600)
packages/ti/board/diag/norflash/src/spi_test.c

index 7c73b7b68427cbd820badfaa4eb84a6fd07a55d5..915c8823459b33af823deda7184d777f2a735684 100644 (file)
@@ -74,7 +74,12 @@ int BoardDiag_SpiReadWriteTest(Board_flashHandle  handle,
 {
     uint32_t blockNum, pageNum;      /* Block, page number */
     uint32_t failIndex;
-    
+#if defined(SOC_TPR12)
+    uint32_t ioMode = BOARD_FLASH_QSPI_IO_MODE_QUAD;
+#else
+    uint32_t ioMode = BOARD_FLASH_QSPI_IO_MODE_SINGLE;
+#endif
+
     if (Board_flashOffsetToBlkPage(handle,offset,&blockNum, &pageNum))
     {
         UART_printf("\n Board_flashOffsetToBlkPage failed. \n");
@@ -98,7 +103,7 @@ int BoardDiag_SpiReadWriteTest(Board_flashHandle  handle,
 
     /* Read the flash memory */
     if (Board_flashRead(handle, offset,
-                      (uint8_t *)&rxBuf, TEST_DATA_LEN, NULL))
+                      (uint8_t *)&rxBuf, TEST_DATA_LEN, (void *)(&ioMode)))
     {
         UART_printf("\n Board_flashRead failed. \n");
         return -1;