base-files: define yes/no as valid boolean options
[openwrt.git] / target / linux / mvebu / patches-3.10 / 0146-mtd-nand-pxa3xx-Remove-READ0-switch-case-falltrough.patch
1 From 11532c10a29e4faef29b5f3b354391d1e2f90213 Mon Sep 17 00:00:00 2001
2 From: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
3 Date: Thu, 14 Nov 2013 18:25:32 -0300
4 Subject: [PATCH 146/203] mtd: nand: pxa3xx: Remove READ0 switch/case
5  falltrough
6
7 READ0 and READOOB command preparation has a falltrough to SEQIN
8 case, where the command address is specified.
9 This is certainly confusing and makes the code less readable with
10 no added value. Let's remove it.
11
12 Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
13 Tested-by: Daniel Mack <zonque@gmail.com>
14 Signed-off-by: Brian Norris <computersforpeace@gmail.com>
15 ---
16  drivers/mtd/nand/pxa3xx_nand.c | 5 +++++
17  1 file changed, 5 insertions(+)
18
19 --- a/drivers/mtd/nand/pxa3xx_nand.c
20 +++ b/drivers/mtd/nand/pxa3xx_nand.c
21 @@ -669,6 +669,11 @@ static int prepare_command_pool(struct p
22                 if (mtd->writesize >= PAGE_CHUNK_SIZE)
23                         info->ndcb0 |= NDCB0_DBC | (NAND_CMD_READSTART << 8);
24  
25 +               set_command_address(info, mtd->writesize, column, page_addr);
26 +               info->buf_count = mtd->writesize + mtd->oobsize;
27 +               memset(info->data_buff, 0xFF, info->buf_count);
28 +               break;
29 +
30         case NAND_CMD_SEQIN:
31  
32                 set_command_address(info, mtd->writesize, column, page_addr);