diff --git a/XilinxProcessorIPLib/drivers/nandps8_v2_0/intgTest/README.txt b/XilinxProcessorIPLib/drivers/nandps8_v2_0/intgTest/README.txt index 3946e2be..f4b865be 100755 --- a/XilinxProcessorIPLib/drivers/nandps8_v2_0/intgTest/README.txt +++ b/XilinxProcessorIPLib/drivers/nandps8_v2_0/intgTest/README.txt @@ -1,9 +1,5 @@ NandPs8 Integration test -- On A53 processors use the linker script for DDR region to run the integration test - With OCM linker script which is the default linker script, the integration test may hang. - In order to run on OCM, you can use Xil_DCacheDisable() in the main and run the integration test. - - On R5 processors, you may get compilation error for bsp stating "undefined reference to `end'" Add end = .; at the end of the linker script to remove this error diff --git a/XilinxProcessorIPLib/drivers/nandps8_v2_0/intgTest/ct_standalone.c b/XilinxProcessorIPLib/drivers/nandps8_v2_0/intgTest/ct_standalone.c index 5a9fab72..2c5be7b7 100644 --- a/XilinxProcessorIPLib/drivers/nandps8_v2_0/intgTest/ct_standalone.c +++ b/XilinxProcessorIPLib/drivers/nandps8_v2_0/intgTest/ct_standalone.c @@ -58,7 +58,7 @@ ******************************************************************************/ /***************************** Include Files *********************************/ -#include + #include #include #include diff --git a/XilinxProcessorIPLib/drivers/nandps8_v2_0/intgTest/intg.c b/XilinxProcessorIPLib/drivers/nandps8_v2_0/intgTest/intg.c index 51034373..a0c8b75a 100644 --- a/XilinxProcessorIPLib/drivers/nandps8_v2_0/intgTest/intg.c +++ b/XilinxProcessorIPLib/drivers/nandps8_v2_0/intgTest/intg.c @@ -164,7 +164,6 @@ u8 WriteBuffer[TEST_BUF_SIZE] __attribute__ ((aligned(64)));/**< write buffer */ */ XNandPs8 NandInstance; XNandPs8 *NandInstPtr = &NandInstance; -XNandPs8_Config *Config; /************************** Function Prototypes ******************************/ static unsigned int GetUserInput(char* Prompt, char* Response, @@ -373,7 +372,7 @@ void Intg_Entry(void) #endif Out: - exit(0); + return; } #ifdef AUTOMATIC_TEST_MODE @@ -817,6 +816,7 @@ int UART_RecvByte(u8 *Data) s32 FlashInit(u16 NandDeviceId){ s32 Status = XST_FAILURE; + XNandPs8_Config *Config; Config = XNandPs8_LookupConfig(NandDeviceId); if (Config == NULL) { diff --git a/XilinxProcessorIPLib/drivers/nandps8_v2_0/intgTest/intg.h b/XilinxProcessorIPLib/drivers/nandps8_v2_0/intgTest/intg.h index 4232619d..b466abe0 100644 --- a/XilinxProcessorIPLib/drivers/nandps8_v2_0/intgTest/intg.h +++ b/XilinxProcessorIPLib/drivers/nandps8_v2_0/intgTest/intg.h @@ -116,8 +116,7 @@ extern u8 WriteBuffer[]; /**< write buffer */ /************************** Variable Definitions ****************************/ -/**< XCanPs instance used throughout tests */ -extern XNandPs8 NandInstance; +/**< XNandPs8 instance used throughout tests */ extern XNandPs8* NandInstPtr; s32 MismatchCounter; /************************** Function Prototypes *****************************/ diff --git a/XilinxProcessorIPLib/drivers/nandps8_v2_0/intgTest/intg_bbt_test.c b/XilinxProcessorIPLib/drivers/nandps8_v2_0/intgTest/intg_bbt_test.c index 1be2d186..bad3608d 100755 --- a/XilinxProcessorIPLib/drivers/nandps8_v2_0/intgTest/intg_bbt_test.c +++ b/XilinxProcessorIPLib/drivers/nandps8_v2_0/intgTest/intg_bbt_test.c @@ -120,8 +120,6 @@ int Intg_BbtTest(XNandPs8 * NandInstPtr, int TestLoops) * If not found Create new and write it onto flash. * * @param NandInstPtr - Instance to the nand driver. -* @param NandDeviceId is is the XPAR__DEVICE_ID value -* from xparameters.h. * * @return * diff --git a/XilinxProcessorIPLib/drivers/nandps8_v2_0/intgTest/intg_ecc_test.c b/XilinxProcessorIPLib/drivers/nandps8_v2_0/intgTest/intg_ecc_test.c index 5db22c85..9df7af22 100644 --- a/XilinxProcessorIPLib/drivers/nandps8_v2_0/intgTest/intg_ecc_test.c +++ b/XilinxProcessorIPLib/drivers/nandps8_v2_0/intgTest/intg_ecc_test.c @@ -77,7 +77,7 @@ /************************** Variable Definitions ****************************/ /************************** Function Prototypes *****************************/ -s32 Ecc_Test(XNandPs8 * NandInstPtr, u16 NandDeviceId); +s32 Ecc_Test(XNandPs8 * NandInstPtr); /************************** Function Definitions ****************************/ /****************************************************************************/ @@ -100,8 +100,7 @@ int Intg_EccTest(XNandPs8 * NandInstPtr, int TestLoops) CT_TestReset("Module Ecc Error Check test"); while(TestLoops--) { - /* Get the configuration table entry for this CAN device */ - Status = Ecc_Test(NandInstPtr, NAND_DEVICE_ID); + Status = Ecc_Test(NandInstPtr); if (Status != XST_SUCCESS) { CT_LOG_FAILURE("Ecc Error Check Test Failed with " "%d mismatches\r\n", MismatchCounter); @@ -128,8 +127,6 @@ int Intg_EccTest(XNandPs8 * NandInstPtr, int TestLoops) * - Compare the data read against the data Written before corruption. * * @param NandInstPtr - Instance to the nand driver. -* @param NandDeviceId is is the XPAR__DEVICE_ID value -* from xparameters.h. * * @return * - XST_SUCCESS if successful. @@ -139,7 +136,7 @@ int Intg_EccTest(XNandPs8 * NandInstPtr, int TestLoops) * None * ****************************************************************************/ -s32 Ecc_Test(XNandPs8 * NandInstPtr, u16 NandDeviceId) +s32 Ecc_Test(XNandPs8 * NandInstPtr) { s32 Status = XST_FAILURE; u32 Index; diff --git a/XilinxProcessorIPLib/drivers/nandps8_v2_0/intgTest/intg_erase_read.c b/XilinxProcessorIPLib/drivers/nandps8_v2_0/intgTest/intg_erase_read.c index 1f2bb2ba..c3c94ffa 100644 --- a/XilinxProcessorIPLib/drivers/nandps8_v2_0/intgTest/intg_erase_read.c +++ b/XilinxProcessorIPLib/drivers/nandps8_v2_0/intgTest/intg_erase_read.c @@ -77,7 +77,7 @@ /************************** Variable Definitions ****************************/ /************************** Function Prototypes *****************************/ -s32 Erase_Read_Test(XNandPs8 * NandInstPtr, u16 NandDeviceId); +s32 Erase_Read_Test(XNandPs8 * NandInstPtr); /************************** Function Definitions ****************************/ /****************************************************************************/ @@ -100,8 +100,7 @@ int Intg_EraseReadTest(XNandPs8 * NandInstPtr, int TestLoops) CT_TestReset("Module FLASH Erase Read test"); while(TestLoops--) { - /* Get the configuration table entry for this CAN device */ - Status = Erase_Read_Test(NandInstPtr, NAND_DEVICE_ID); + Status = Erase_Read_Test(NandInstPtr); if (Status != XST_SUCCESS) { CT_LOG_FAILURE("Nand Flash Erase ReadTest Failed" " with %d mismatches\r\n", MismatchCounter); @@ -124,8 +123,6 @@ int Intg_EraseReadTest(XNandPs8 * NandInstPtr, int TestLoops) * - Compare the data read against 0xFF. * * @param NandInstPtr - Instance to the nand driver. -* @param NandDeviceId is is the XPAR__DEVICE_ID value -* from xparameters.h. * * @return * - XST_SUCCESS if successful. @@ -135,7 +132,7 @@ int Intg_EraseReadTest(XNandPs8 * NandInstPtr, int TestLoops) * None * ****************************************************************************/ -s32 Erase_Read_Test(XNandPs8 * NandInstPtr, u16 NandDeviceId) +s32 Erase_Read_Test(XNandPs8 * NandInstPtr) { s32 Status = XST_FAILURE; s32 i = 0; diff --git a/XilinxProcessorIPLib/drivers/nandps8_v2_0/intgTest/intg_flash_rw.c b/XilinxProcessorIPLib/drivers/nandps8_v2_0/intgTest/intg_flash_rw.c index fa0b8aa9..dacd3f22 100644 --- a/XilinxProcessorIPLib/drivers/nandps8_v2_0/intgTest/intg_flash_rw.c +++ b/XilinxProcessorIPLib/drivers/nandps8_v2_0/intgTest/intg_flash_rw.c @@ -77,7 +77,7 @@ /************************** Variable Definitions ****************************/ /************************** Function Prototypes *****************************/ -s32 Flash_RW_Test(XNandPs8 * NandInstPtr, u16 NandDeviceId); +s32 Flash_RW_Test(XNandPs8 * NandInstPtr); /************************** Function Definitions ****************************/ /****************************************************************************/ @@ -100,9 +100,7 @@ int Intg_FlashRWTest(XNandPs8 * NandInstPtr, int TestLoops) CT_TestReset("Module FLASH Read Write test"); while(TestLoops--) { - - /* Get the configuration table entry for this CAN device */ - Status = Flash_RW_Test(NandInstPtr, NAND_DEVICE_ID); + Status = Flash_RW_Test(NandInstPtr); if (Status != XST_SUCCESS) { CT_LOG_FAILURE("Nand Flash Read Write Test Failed" " with %d mismatches\r\n", MismatchCounter); @@ -128,8 +126,6 @@ int Intg_FlashRWTest(XNandPs8 * NandInstPtr, int TestLoops) * - Compare the data read against the data Written. * * @param NandInstPtr - Instance to the nand driver. -* @param NandDeviceId is is the XPAR__DEVICE_ID value -* from xparameters.h. * * @return * - XST_SUCCESS if successful. @@ -139,7 +135,7 @@ int Intg_FlashRWTest(XNandPs8 * NandInstPtr, int TestLoops) * None * ****************************************************************************/ -s32 Flash_RW_Test(XNandPs8 * NandInstPtr, u16 NandDeviceId) +s32 Flash_RW_Test(XNandPs8 * NandInstPtr) { s32 Status = XST_FAILURE; u32 Index; diff --git a/XilinxProcessorIPLib/drivers/nandps8_v2_0/intgTest/intg_partialpage_rw.c b/XilinxProcessorIPLib/drivers/nandps8_v2_0/intgTest/intg_partialpage_rw.c index 597d6f0c..d8c52821 100644 --- a/XilinxProcessorIPLib/drivers/nandps8_v2_0/intgTest/intg_partialpage_rw.c +++ b/XilinxProcessorIPLib/drivers/nandps8_v2_0/intgTest/intg_partialpage_rw.c @@ -78,7 +78,7 @@ /************************** Variable Definitions ****************************/ /************************** Function Prototypes *****************************/ -s32 PartialPage_RW_Test(XNandPs8 * NandInstPtr, u16 NandDeviceId); +s32 PartialPage_RW_Test(XNandPs8 * NandInstPtr); /************************** Function Definitions ****************************/ /****************************************************************************/ @@ -101,8 +101,7 @@ int Intg_PartialRWTest(XNandPs8 * NandInstPtr, int TestLoops) CT_TestReset("Module Partial Page Read Write test"); while(TestLoops--) { - /* Get the configuration table entry for this CAN device */ - Status = PartialPage_RW_Test(NandInstPtr, NAND_DEVICE_ID); + Status = PartialPage_RW_Test(NandInstPtr); if (Status != XST_SUCCESS) { CT_LOG_FAILURE("Nand Partial Page Read Write Failed" " with %d mismatches\r\n", MismatchCounter); @@ -127,8 +126,6 @@ int Intg_PartialRWTest(XNandPs8 * NandInstPtr, int TestLoops) * - Compare the data read against the data Written. * * @param NandInstPtr - Instance to the nand driver. -* @param NandDeviceId is is the XPAR__DEVICE_ID value -* from xparameters.h. * * @return * - XST_SUCCESS if successful. @@ -138,7 +135,7 @@ int Intg_PartialRWTest(XNandPs8 * NandInstPtr, int TestLoops) * None * ****************************************************************************/ -s32 PartialPage_RW_Test(XNandPs8 * NandInstPtr, u16 NandDeviceId) +s32 PartialPage_RW_Test(XNandPs8 * NandInstPtr) { s32 Status = (s32)XST_FAILURE; u32 Index; @@ -150,7 +147,7 @@ s32 PartialPage_RW_Test(XNandPs8 * NandInstPtr, u16 NandDeviceId) Length = NandInstPtr->Geometry.BytesPerPage; /* - * Repeat the test for 20 iterations + * Repeat the test for 5 iterations */ for(i = 0; i< 5; i++){ diff --git a/XilinxProcessorIPLib/drivers/nandps8_v2_0/intgTest/intg_random_rw.c b/XilinxProcessorIPLib/drivers/nandps8_v2_0/intgTest/intg_random_rw.c index c043a702..14bd2a7c 100644 --- a/XilinxProcessorIPLib/drivers/nandps8_v2_0/intgTest/intg_random_rw.c +++ b/XilinxProcessorIPLib/drivers/nandps8_v2_0/intgTest/intg_random_rw.c @@ -78,7 +78,7 @@ /************************** Variable Definitions ****************************/ /************************** Function Prototypes *****************************/ -s32 Random_Block_RW_Test(XNandPs8 * NandInstPtr, u16 NandDeviceId); +s32 Random_Block_RW_Test(XNandPs8 * NandInstPtr); /************************** Function Definitions ****************************/ /****************************************************************************/ @@ -101,8 +101,7 @@ int Intg_RandomRWTest(XNandPs8 * NandInstPtr, int TestLoops) CT_TestReset("Module Random Block Read Write test"); while(TestLoops--) { - /* Get the configuration table entry for this CAN device */ - Status = Random_Block_RW_Test(NandInstPtr, NAND_DEVICE_ID); + Status = Random_Block_RW_Test(NandInstPtr); if (Status != XST_SUCCESS) { CT_LOG_FAILURE("Nand Random Block Read Write Test Failed" " with %d mismatches\r\n", MismatchCounter); @@ -127,8 +126,6 @@ int Intg_RandomRWTest(XNandPs8 * NandInstPtr, int TestLoops) * - Compare the data read against the data Written. * * @param NandInstPtr - Instance to the nand driver. -* @param NandDeviceId is is the XPAR__DEVICE_ID value -* from xparameters.h. * * @return * - XST_SUCCESS if successful. @@ -138,7 +135,7 @@ int Intg_RandomRWTest(XNandPs8 * NandInstPtr, int TestLoops) * None * ****************************************************************************/ -s32 Random_Block_RW_Test(XNandPs8 * NandInstPtr, u16 NandDeviceId) +s32 Random_Block_RW_Test(XNandPs8 * NandInstPtr) { s32 Status = XST_FAILURE; u32 Index; @@ -161,7 +158,7 @@ s32 Random_Block_RW_Test(XNandPs8 * NandInstPtr, u16 NandDeviceId) } /* - * Flash operation i.e. erase, write and read for all the pages + * Flash operation i.e. write and read for all the pages * of the block. * This test will take some time to execute. Please be patient. */ diff --git a/XilinxProcessorIPLib/drivers/nandps8_v2_0/intgTest/intg_sparebytes_rw.c b/XilinxProcessorIPLib/drivers/nandps8_v2_0/intgTest/intg_sparebytes_rw.c index 14d5c2dc..6fa46324 100644 --- a/XilinxProcessorIPLib/drivers/nandps8_v2_0/intgTest/intg_sparebytes_rw.c +++ b/XilinxProcessorIPLib/drivers/nandps8_v2_0/intgTest/intg_sparebytes_rw.c @@ -76,7 +76,7 @@ /************************** Variable Definitions ****************************/ /************************** Function Prototypes *****************************/ -s32 SpareBytes_RW_Test(XNandPs8 * NandInstPtr, u16 NandDeviceId); +s32 SpareBytes_RW_Test(XNandPs8 * NandInstPtr); /************************** Function Definitions ****************************/ /****************************************************************************/ @@ -99,8 +99,7 @@ int Intg_SpareBytesRWTest(XNandPs8 * NandInstPtr, int TestLoops) CT_TestReset("Module Spare Bytes Read Write test"); while(TestLoops--) { - /* Get the configuration table entry for this CAN device */ - Status = SpareBytes_RW_Test(NandInstPtr, NAND_DEVICE_ID); + Status = SpareBytes_RW_Test(NandInstPtr); if (Status != XST_SUCCESS) { CT_LOG_FAILURE("Nand Spare Bytes Read Write Test Failed" " with %d mismatches\r\n", MismatchCounter); @@ -124,8 +123,6 @@ int Intg_SpareBytesRWTest(XNandPs8 * NandInstPtr, int TestLoops) * - Compare the data read against the data Written. * * @param NandInstPtr - Instance to the nand driver. -* @param NandDeviceId is is the XPAR__DEVICE_ID value -* from xparameters.h. * * @return * - XST_SUCCESS if successful. @@ -135,7 +132,7 @@ int Intg_SpareBytesRWTest(XNandPs8 * NandInstPtr, int TestLoops) * None * ****************************************************************************/ -s32 SpareBytes_RW_Test(XNandPs8 * NandInstPtr, u16 NandDeviceId) +s32 SpareBytes_RW_Test(XNandPs8 * NandInstPtr) { s32 Status = XST_FAILURE; u32 Index;