021-mtd-pxa3xx_nand-Increase-the-initial-chunk-size.patch 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. From: =?UTF-8?q?Ezequiel=20Garc=C3=ADa?= <ezequiel@vanguardiasur.com.ar>
  2. Date: Wed, 4 Nov 2015 13:13:41 -0300
  3. Subject: [PATCH] mtd: pxa3xx_nand: Increase the initial chunk size
  4. The chunk size represents the size of the data chunks, which
  5. is used by the controllers that allow to split transfered data.
  6. However, the initial chunk size is used in a non-splitted way,
  7. during device identification. Therefore, it must be large enough
  8. for all the NAND commands issued during device identification.
  9. This includes NAND_CMD_PARAM which was recently changed to
  10. transfer up to 2048 bytes (for the redundant parameter pages).
  11. Thus, the initial chunk size should be 2048 as well.
  12. On Armada 370/XP platforms (NFCv2) booted without the keep-config
  13. devicetree property, this commit fixes a timeout on the NAND_CMD_PARAM
  14. command:
  15. [..]
  16. pxa3xx-nand f10d0000.nand: This platform can't do DMA on this device
  17. pxa3xx-nand f10d0000.nand: Wait time out!!!
  18. nand: device found, Manufacturer ID: 0x2c, Chip ID: 0x38
  19. nand: Micron MT29F8G08ABABAWP
  20. nand: 1024 MiB, SLC, erase size: 512 KiB, page size: 4096, OOB size: 224
  21. Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
  22. Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
  23. Signed-off-by: Brian Norris <computersforpeace@gmail.com>
  24. ---
  25. --- a/drivers/mtd/nand/pxa3xx_nand.c
  26. +++ b/drivers/mtd/nand/pxa3xx_nand.c
  27. @@ -1637,7 +1637,7 @@ static int pxa3xx_nand_scan(struct mtd_i
  28. goto KEEP_CONFIG;
  29. /* Set a default chunk size */
  30. - info->chunk_size = 512;
  31. + info->chunk_size = PAGE_CHUNK_SIZE;
  32. ret = pxa3xx_nand_config_flash(info);
  33. if (ret)