aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiquel Raynal <miquel.raynal@bootlin.com>2018-02-28 20:51:54 +0100
committerMaxime Ripard <maxime.ripard@bootlin.com>2018-04-03 12:11:38 +0200
commit7440bd7885da984dc20e2e8c8a0b167911e9dce1 (patch)
treeb30fa7951dd8e4ffb623779541769c7cb7cb1330
parentba1c98bae2649e990c6af04545e422042cb58b27 (diff)
downloadu-boot-7440bd7885da984dc20e2e8c8a0b167911e9dce1.zip
u-boot-7440bd7885da984dc20e2e8c8a0b167911e9dce1.tar.gz
u-boot-7440bd7885da984dc20e2e8c8a0b167911e9dce1.tar.bz2
spl: nand: sunxi: declare the ecc_bytes array globally
Move the ecc_bytes array out of nand_max_ecc_strength() for future use by nand_read_page(). Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Acked-by: Boris Brezillon <boris.brezillon@bootlin.com> Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
-rw-r--r--drivers/mtd/nand/sunxi_nand_spl.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/mtd/nand/sunxi_nand_spl.c b/drivers/mtd/nand/sunxi_nand_spl.c
index 9ebdcee..af1e964 100644
--- a/drivers/mtd/nand/sunxi_nand_spl.c
+++ b/drivers/mtd/nand/sunxi_nand_spl.c
@@ -263,6 +263,8 @@ static int nand_change_column(u16 column)
return 0;
}
+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)
{
@@ -350,7 +352,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;