Move the ecc_bytes array out of nand_max_ecc_strength() for future use
by nand_read_page().

Signed-off-by: Miquel Raynal <miquel.ray...@bootlin.com>
---
 drivers/mtd/nand/sunxi_nand_spl.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/mtd/nand/sunxi_nand_spl.c 
b/drivers/mtd/nand/sunxi_nand_spl.c
index 8c97834ec2..3be7ffa241 100644
--- a/drivers/mtd/nand/sunxi_nand_spl.c
+++ b/drivers/mtd/nand/sunxi_nand_spl.c
@@ -261,6 +261,8 @@ static int nand_change_column(u16 column)
        return ret;
 }
 
+static const int ecc_bytes[] = {32, 46, 54, 60, 74, 88, 102, 110, 116};
+
 static int nand_read_page(const struct nfc_config *conf, u32 offs,
                          void *dest, int len)
 {
@@ -348,7 +350,6 @@ static int nand_read_page(const struct nfc_config *conf, 
u32 offs,
 
 static int nand_max_ecc_strength(struct nfc_config *conf)
 {
-       static const int ecc_bytes[] = { 32, 46, 54, 60, 74, 88, 102, 110, 116 
};
        int max_oobsize, max_ecc_bytes;
        int nsectors = conf->page_size / conf->ecc_size;
        int i;
-- 
2.14.1

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot

Reply via email to