[PATCH v6] mtd: rawnand: use bit-wise majority to recover the contents of ONFI parameter

2018-05-10 Thread Jane Wan
Per ONFI specification (Rev. 4.0), if all parameter pages have invalid CRC values, the bit-wise majority may be used to recover the contents of the parameter pages from the parameter page copies present. Signed-off-by: Jane Wan --- v6: support the cases that srcbufs are not contiguous v5: make

[PATCH v5 2/2] mtd: rawnand: use bit-wise majority to recover the contents of ONFI parameter

2018-05-09 Thread Jane Wan
Per ONFI specification (Rev. 4.0), if all parameter pages have invalid CRC values, the bit-wise majority may be used to recover the contents of the parameter pages from the parameter page copies present. Signed-off-by: Jane Wan --- drivers/mtd/nand/raw/nand_base.c | 46

[PATCH v4 2/2] mtd: rawnand: use bit-wise majority to recover the contents of ONFI parameter

2018-05-08 Thread Jane Wan
Per ONFI specification (Rev. 4.0), if all parameter pages have invalid CRC values, the bit-wise majority may be used to recover the contents of the parameter pages from the parameter page copies present. Signed-off-by: Jane Wan --- drivers/mtd/nand/raw/nand_base.c | 49

[PATCH v4 1/2] mtd: rawnand: fsl_ifc: fix FSL NAND driver to read all ONFI parameter pages

2018-05-08 Thread Jane Wan
Per ONFI specification (Rev. 4.0), if the CRC of the first parameter page read is not valid, the host should read redundant parameter page copies. Fix FSL NAND driver to read the two redundant copies which are mandatory in the specification. Signed-off-by: Jane Wan --- drivers/mtd/nand/raw

[PATCH v3 2/2] mtd: rawnand: fsl_ifc: use bit-wise majority to recover the contents of ONFI parameter

2018-05-07 Thread Jane Wan
Per ONFI specification (Rev. 4.0), if all parameter pages have invalid CRC values, the bit-wise majority may be used to recover the contents of the parameter pages from the parameter page copies present. Signed-off-by: Jane Wan --- drivers/mtd/nand/raw/nand_base.c | 41

[PATCH v2 2/2] mtd: rawnand: fsl_ifc: use bit-wise majority to recover the contents of ONFI parameter

2018-05-04 Thread Jane Wan
Per ONFI specification (Rev. 4.0), if all parameter pages have invalid CRC values, the bit-wise majority may be used to recover the contents of the parameter pages from the parameter page copies present. Signed-off-by: Jane Wan --- drivers/mtd/nand/raw/nand_base.c | 36

[PATCH v2 1/2] mtd: rawnand: fsl_ifc: fix FSL NAND driver to read all ONFI parameter pages

2018-05-04 Thread Jane Wan
Per ONFI specification (Rev. 4.0), if the CRC of the first parameter page read is not valid, the host should read redundant parameter page copies. Fix FSL NAND driver to read the two redundant copies which are mandatory in the specification. Signed-off-by: Jane Wan --- drivers/mtd/nand/raw

[PATCH 2/2] Use bit-wise majority to recover the contents of ONFI parameter

2018-04-26 Thread Jane Wan
Signed-off-by: Jane Wan --- drivers/mtd/nand/nand_base.c | 35 +++ 1 file changed, 31 insertions(+), 4 deletions(-) diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c index c2e1232..161b523 100644 --- a/drivers/mtd/nand/nand_base.c +++ b

[PATCH 1/2] Fix FSL NAND driver to read all ONFI parameter pages

2018-04-26 Thread Jane Wan
Signed-off-by: Jane Wan --- drivers/mtd/nand/fsl_ifc_nand.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/mtd/nand/fsl_ifc_nand.c b/drivers/mtd/nand/fsl_ifc_nand.c index ca36b35..a3cf6ca 100644 --- a/drivers/mtd/nand/fsl_ifc_nand.c +++ b/drivers/mtd

[PATCH 0/2] Fix fsl_ifc_nand reading ONFI parameters to meet ONFI spec

2018-04-26 Thread Jane Wan
parameter pages from the parameter page copies present. The FSL NAND driver only reads the first page. The first patch fixes the driver to read all three parameter pages. The second patch is the change for using bit-wise majority to recover the contents of ONFI parameter. Jane Wan (2): Fix FSL

[PATCH] Fix an error that can cause fsl espi task blocked for more than 120 seconds

2015-05-01 Thread Jane Wan
after handling the Rx FIFO (the SPIE_NF bit is set), the spin_event_timeout() returns with timeout occurred. It causes the interrupt handler not to send completion notification to the thread that called wait_for_complete() waiting for the notification. Signed-off-by: Jane Wan --- drivers/spi

[PATCH] Configure FSL eSPI CSBEF and CSAFT

2014-04-16 Thread Jane Wan
#x27;s the delay in bits from the last clock for data frame to the deactivation of chip select pin. The FSL eSPI driver hardcodes CSnBEF and CSnAFT to 0. Need to set them to a different value for some device. Signed-off-by: Jane Wan --- Documentation/devicetree/bindings/spi/fsl-spi.txt |6 +++

RE: [PATCH] Configure FSL eSPI CSBEF, CSAFT, and whether to send all received data to user

2014-04-16 Thread Jane Wan
On Mon, Apr 14, 2014 at 09:51:56PM +0100, Mark Brown wrote: > On Sat, Apr 12, 2014 at 11:48:36AM -0700, Jane Wan wrote: > > Make FSL eSPI CSnBEF and CSnAFT in ESPI_SPMODEn registers (n=0,1,2,3) > > configurable through device tree. FSL eSPI driver hardcodes them to 0. > >

[PATCH] Configure FSL eSPI CSBEF, CSAFT, and whether to send all received data to user

2014-04-12 Thread Jane Wan
CS assertiion time in bits before frame start */ fsl,csaft = <1>; /* CS assertiion time in bits after frame end */ fsl,spi-raw-rxdata-to-user = <1>; /* send all rx data to user */ }; }; Jane Wan (1): Configure fsl

[PATCH] Configure FSL eSPI CSBEF, CSAFT, and whether to send all received data to user

2014-04-12 Thread Jane Wan
bytes that the slave device puts on MISO. Part of this fix is based on a previous patch: http://www.mail-archive.com/spi-devel-general@lists.sourceforge.net/msg08658.html Signed-off-by: Jane Wan --- drivers/spi/spi-fsl-espi.c | 68 ++ 1 files changed