diff --git a/XilinxProcessorIPLib/drivers/nandpsu/src/xnandpsu.c b/XilinxProcessorIPLib/drivers/nandpsu/src/xnandpsu.c index 9ff1b300..ee2db55b 100644 --- a/XilinxProcessorIPLib/drivers/nandpsu/src/xnandpsu.c +++ b/XilinxProcessorIPLib/drivers/nandpsu/src/xnandpsu.c @@ -533,6 +533,8 @@ static void XNandPsu_InitGeometry(XNandPsu *InstancePtr, OnfiParamPage *Param) (u64)Param->PagesPerBlock * (u64)Param->BytesPerPage); InstancePtr->Geometry.EccCodeWordSize = 9U; /* 2 power of 9 = 512 */ + if (InstancePtr->Geometry.NumTargetBlocks > XNANDPSU_MAX_BLOCKS) + xil_printf("!!! Device contains more blocks than the max defined blocks in driver\r\n"); #ifdef XNANDPSU_DEBUG xil_printf("Manufacturer: %s\r\n", Param->DeviceManufacturer); diff --git a/XilinxProcessorIPLib/drivers/nandpsu/src/xnandpsu.h b/XilinxProcessorIPLib/drivers/nandpsu/src/xnandpsu.h index 9379598b..6a54706f 100644 --- a/XilinxProcessorIPLib/drivers/nandpsu/src/xnandpsu.h +++ b/XilinxProcessorIPLib/drivers/nandpsu/src/xnandpsu.h @@ -195,7 +195,7 @@ extern "C" { #define XNANDPSU_HAMMING 0x1U /**< Hamming Flash */ #define XNANDPSU_BCH 0x2U /**< BCH Flash */ -#define XNANDPSU_MAX_BLOCKS 32768U /**< Max number of Blocks */ +#define XNANDPSU_MAX_BLOCKS 16384U /**< Max number of Blocks */ #define XNANDPSU_MAX_SPARE_SIZE 0x800U /**< Max spare bytes of a NAND flash page of 16K */