未验证 提交 7440bd78 编写于 作者: M Miquel Raynal 提交者: Maxime Ripard

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: NMiquel Raynal <miquel.raynal@bootlin.com>
Acked-by: NBoris Brezillon <boris.brezillon@bootlin.com>
Signed-off-by: NMaxime Ripard <maxime.ripard@bootlin.com>
上级 ba1c98ba
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册