base-files: define yes/no as valid boolean options
[openwrt/staging/mkresin.git] / target / linux / mvebu / patches-3.10 / 0107-mtd-nand-pxa3xx-Set-info-use_dma-properly.patch
1 From c16f0b44984bc623621d26df22823b50f13f65d8 Mon Sep 17 00:00:00 2001
2 From: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
3 Date: Tue, 14 May 2013 08:15:21 -0300
4 Subject: [PATCH 107/203] mtd: nand: pxa3xx: Set info->use_dma properly
5
6 Currently, the variable info->use_dma is never set and always
7 zero-valued which means the driver never does DMA transfers.
8 We fix this by simply setting info->use_dma to the module parameter,
9 also named 'use_dma'. Note that the module parameter has the same name,
10 but different semantics.
11
12 This fixes a regression introduced by the below commit
13 which removed the info->use_dma variable set.
14
15 commit 4eb2da8994042d68e84e31138788429a102da2ea
16 Author: Lei Wen <leiwen@marvell.com>
17 Date: Mon Feb 28 10:32:13 2011 +0800
18
19 mtd: pxa3xx_nand: unify prepare command
20
21 Before the above commit, the driver had use_dma=1 on all NAND commands
22 except on CMD_STATUS. This behavior is long lost and we are not
23 recovering in this patch, either.
24
25 This was spotted and verified by human inspection.
26
27 Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
28 Tested-by: Nikita Kiryanov <nikita@compulab.co.il>
29 Acked-by: Igor Grinberg <grinberg@compulab.co.il>
30 Reviewed-by: Haojian Zhuang <haojian.zhuang@gmail.com>
31 Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
32 Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
33 ---
34 drivers/mtd/nand/pxa3xx_nand.c | 1 +
35 1 file changed, 1 insertion(+)
36
37 --- a/drivers/mtd/nand/pxa3xx_nand.c
38 +++ b/drivers/mtd/nand/pxa3xx_nand.c
39 @@ -506,6 +506,7 @@ static int prepare_command_pool(struct p
40 info->buf_count = 0;
41 info->oob_size = 0;
42 info->use_ecc = 0;
43 + info->use_dma = (use_dma) ? 1 : 0;
44 info->is_ready = 0;
45 info->retcode = ERR_NONE;
46 if (info->cs != 0)