[U-Boot] [RFC PATCH v3 00/10] pxa3xx_nand updates

2017-12-06 Thread oferh
From: Ofer Heifetz I'm looking into the NAND support for the db-88f6820-amc board. There are a number of changes in the pxa3xx_nand driver in Linux that are relevant (not specifically to this boards but to Armada boards in general). Some of these changes are cleanups and some are actual bug fixes

[U-Boot] [RFC PATCH v3 03/10] mtd: nand: pxa3xx_nand: sync pxa3xx_nand_set_sdr_timing()

2017-12-06 Thread oferh
From: Ofer Heifetz Since the pxa3xx_nand driver was added there has been a discrepancy in pxa3xx_nand_set_sdr_timing() around the setting of tWP_min and tRP_min. This brings us into line with the current Linux code. Signed-off-by: Chris Packham Tested-by: Ofer Heifetz --- drivers/mtd/nand/pxa

[U-Boot] [RFC PATCH v3 02/10] mtd: nand: pxa3xx_nand: use nand_to_mtd()

2017-12-06 Thread oferh
From: Ofer Heifetz Don't store struct mtd_info in struct pxa3xx_nand_host. Instead use the one that is already part of struct nand_chip. This brings us in line with current U-boot and Linux conventions. Signed-off-by: Chris Packham Reviewed-by: Ofer Heifetz Tested-by: Ofer Heifetz --- driver

[U-Boot] [RFC PATCH v3 06/10] nand: pxa3xx: Increase READ_ID buffer and make the size static

2017-12-06 Thread oferh
From: Ofer Heifetz The read ID count should be made as large as the maximum READ_ID size, so there's no need to have dynamic size. This commit sets the hardware maximum read ID count, which should be more than enough on all cases. Also, we get rid of the read_id_bytes, and use a macro instead. [

[U-Boot] [RFC PATCH v3 08/10] mtd: pxa3xx_nand: Fix initial controller configuration

2017-12-06 Thread oferh
From: Ofer Heifetz The Data Flash Control Register (NDCR) contains two types of parameters: those that are needed for device identification, and those that can only be set after device identification. Therefore, the driver can't set them all at once and instead needs to configure the first group

[U-Boot] [RFC PATCH v3 05/10] mtd: nand: pxa3xx-nand: fix random command timeouts

2017-12-06 Thread oferh
From: Ofer Heifetz When 2 commands are submitted in a row, and the second is very quick, the completion of the second command might never come. This happens especially if the second command is quick, such as a status read after an erase [ Linux commit 21fc0ef9652f0c809dc0d3e0a67f1e1bf6ff8255 ]

[U-Boot] [RFC PATCH v3 09/10] mtd: pxa3xx_nand: Simplify pxa3xx_nand_scan

2017-12-06 Thread oferh
From: Ofer Heifetz This commit simplifies the initial configuration performed by pxa3xx_nand_scan. No functionality change is intended. [ Linux commit 154f50fbde539c20bbf74854461d932ebdace4d5 ] Cc: Ezequiel GarcĂ­a Signed-off-by: Chris Packham Reviewed-by: Ofer Heifetz Tested-by: Ofer Heifetz

[U-Boot] [RFC PATCH v3 04/10] mtd: nand: pxa3xx_nand: fix early spurious interrupt

2017-12-06 Thread oferh
From: Ofer Heifetz When the nand is first probe, and upon the first command start, the status bits should be cleared before the interrupts are unmasked. [ Linux commit 0b14392db2e998157d924085d7913e537ec26121 ] Cc: Robert Jarzmik Signed-off-by: Chris Packham Reviewed-by: Ofer Heifetz Tested-

[U-Boot] [RFC PATCH v3 07/10] mtd: pxa3xx_nand: Increase the initial chunk size

2017-12-06 Thread oferh
From: Ofer Heifetz The chunk size represents the size of the data chunks, which is used by the controllers that allow to split transfered data. However, the initial chunk size is used in a non-splitted way, during device identification. Therefore, it must be large enough for all the NAND command

[U-Boot] [RFC PATCH v3 10/10] mtd: nand: pxa3xx_nand: add support for partial chunks

2017-12-06 Thread oferh
From: Ofer Heifetz This commit is needed to properly support the 8-bits ECC configuration with 4KB pages. When pages larger than 2 KB are used on platforms using the PXA3xx NAND controller, the reading/programming operations need to be split in chunks of 2 KBs or less because the controller FIFO

[U-Boot] [RFC PATCH v3 01/10] mtd: nand: pxa3xx_nand: Increase initial buffer size

2017-12-06 Thread oferh
From: Ofer Heifetz The initial buffer is used for the initial commands used to detect a flash device (STATUS, READID and PARAM). ONFI param page is 256 bytes, and there are three redundant copies to be read. JEDEC param page is 512 bytes, and there are also three redundant copies to be read. Hen