diff mbox

[1/6] mtd: pxa3xx_nand: Increase the initial chunk size

Message ID 1446653626-14802-2-git-send-email-ezequiel@vanguardiasur.com.ar
State Accepted
Commit c7f00c29aa846b00c70bc99ddb6b1cc7e17c47d4
Headers show

Commit Message

Ezequiel Garcia Nov. 4, 2015, 4:13 p.m. UTC
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 commands issued during device identification.
This includes NAND_CMD_PARAM which was recently changed to
transfer up to 2048 bytes (for the redundant parameter pages).

Thus, the initial chunk size should be 2048 as well.

On Armada 370/XP platforms (NFCv2) booted without the keep-config
devicetree property, this commit fixes a timeout on the NAND_CMD_PARAM
command:

  [..]
  pxa3xx-nand f10d0000.nand: This platform can't do DMA on this device
  pxa3xx-nand f10d0000.nand: Wait time out!!!
  nand: device found, Manufacturer ID: 0x2c, Chip ID: 0x38
  nand: Micron MT29F8G08ABABAWP
  nand: 1024 MiB, SLC, erase size: 512 KiB, page size: 4096, OOB size: 224

Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
---
 drivers/mtd/nand/pxa3xx_nand.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Robert Jarzmik Nov. 4, 2015, 8:15 p.m. UTC | #1
Ezequiel Garcia <ezequiel@vanguardiasur.com.ar> writes:

> 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 commands issued during device identification.
> This includes NAND_CMD_PARAM which was recently changed to
> transfer up to 2048 bytes (for the redundant parameter pages).
>
> Thus, the initial chunk size should be 2048 as well.
Ok.

Does anybody own an "512 bytes per page" chip to see if there is any regression
with this ? My own are 2048 ones, so I cannot test it myself.

Apart from that :
Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>

Cheers.

--
Robert
diff mbox

Patch

diff --git a/drivers/mtd/nand/pxa3xx_nand.c b/drivers/mtd/nand/pxa3xx_nand.c
index e453ae9a17fa..3d3ae903eec8 100644
--- a/drivers/mtd/nand/pxa3xx_nand.c
+++ b/drivers/mtd/nand/pxa3xx_nand.c
@@ -1592,7 +1592,7 @@  static int pxa3xx_nand_scan(struct mtd_info *mtd)
 		goto KEEP_CONFIG;
 
 	/* Set a default chunk size */
-	info->chunk_size = 512;
+	info->chunk_size = PAGE_CHUNK_SIZE;
 
 	ret = pxa3xx_nand_config_flash(info);
 	if (ret)