Now the QEMU nand model supports extended parameter page
information. So, removing the QEMU specific hacks from the
driver.
Signed-off-by: Punnaiah Choudary Kalluri <punnaia@xilinx.com>
Acked-by: Sai Pavan Boddu <saipava@xilinx.com>
This patch converts the three line comments to single line
Signed-off-by: Punnaiah Choudary Kalluri <punnaia@xilinx.com>
Acked-by: Anirudha Sarangi <anirudh@xilinx.com>
This patch adds common routines by removing the possible redundant
code from the functions.
Signed-off-by: Punnaiah Choudary Kalluri <punnaia@xilinx.com>
Acked-by: Anirudha Sarangi <anirudh@xilinx.com>
This change is to reduce the size of the static bbt table size
from 8KB to 4KB because so far we have not identified the
flash part that has more than 16K blocks and also it will
reduce the bsp size.
Driver warns if the device has more number of blocks than the
defined value so that this can be incremented in future and if
there is a part available.
Signed-off-by: Punnaiah Choudary Kalluri <punnaia@xilinx.com>
Acked-by: Anirudha Sarangi <anirudh@xilinx.com>
As per the csurom, Bbt signature is always stored in oob area.
So, to sync with csurom, removing the NO_OOB(Bbt signature stores
in page area) functionality.
Signed-off-by: Punnaiah Choudary Kalluri <punnaia@xilinx.com>
Acked-by: Anirudha Sarangi <anirudh@xilinx.com>
Controller supports only 8 bit mode. So, no need to configure
this value as this is the only option supported.
Signed-off-by: Punnaiah Choudary Kalluri <punnaia@xilinx.com>
Acked-by: Anirudha Sarangi <anirudh@xilinx.com>
The current timeout value is not enough for erase operation on slower
devices. so increasing the timeout value and also added usleep for
timeout routine to have a precise timeout.
Signed-off-by: Punnaiah Choudary Kalluri <punnaia@xilinx.com>
Removed the configuration of DMA Buffer Boundary register in WriteSpareBytes API
as the driver uses oob size as pkt size and thus configuring DMA Buffer
Boundary Register has no effect.
Signed-off-by: Shakti Bhatnagar <shaktib@xilinx.com>
Since the check for the block to have reached the end block was at the end of the loop,
thus assert call triggering could happen if the block crosses the max block limit,
making the driver to hang. Thus to fix the triggering of assert call,
the check for the block to have reached the max block is being done at the start of
the loop in XNandPsu_CalculateLength function.
The u32 typecasting for the variable OffsetVar has been removed and the data type for
the variable TempLen has been changed to u64 as for higher block numbers the value for
these variables will require u64 datatype otherwise corrupted value will get stored
which will lead to wrong calculation of block.
Signed-off-by: Shakti Bhatnagar <shaktib@xilinx.com>
Removed the workaround for qemu in driver code as qemu now supports
ecc and bad block table handling.
Signed-off-by: Shakti Bhatnagar <shaktib@xilinx.com>
Modified the number of bytes of data to be read for signature and version when
NO OOB option is enabled.
Signed-off-by: Shakti Bhatnagar <shaktib@xilinx.com>
Modified number of bytes to be read for bbt in oob and bbt with signature
and version for no oob option. This change is done kept in mind that it
should support flashes with small page size as well.
Signed-off-by: Shakti Bhatnagar <shaktib@xilinx.com>
Setting BBT option at the beginning and checking afterwards to set
the offset for signature and version.
Signed-off-by: Shakti Bhatnagar <shaktib@xilinx.com>
Performing Read modify write operation for the interrupt status enable
and interrupt status register in readpage function instead of directly
writing to fix the masking error interrupts in case ecc enabled.
Signed-off-by: Shakti Bhatnagar <shaktib@xilinx.com>
If oob size is less than 64 bytes, ecc position should start from 0 position
of oob area, else should be at the end of the oob area.
Keeping ecc start position in alligned with the Linux nand base ecc layout.
Signed-off-by: Shakti Bhatnagar <shaktib@xilinx.com>
Ensure that the dma buffer boundary interrupt is disabled as driver
is using the contiguous buffer for the whole page size and enabling
this interrupt would cause failures if the buffer boundary is
configured for other values (not the page size)
Signed-off-by: Shakti Bhatnagar <shaktib@xilinx.com>
Modified driver source file to remove compiler warning.
1. Did Type Conversion
2. Made two API's public
3. Removed redeclaration
Signed-off-by: Shakti Bhatnagar <shaktib@xilinx.com>
Kept only psu_nand as supported_peripherals for Zynq UltraScale MP Generic
NAND controller driver.
Removed pss_nand and ps8_nand from supported_peripherals.
Signed-off-by: Shakti Bhatnagar <shaktib@xilinx.com>