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