mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-23 15:32:33 +00:00
ce33ef997c
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
39 lines
1.6 KiB
Diff
39 lines
1.6 KiB
Diff
From eeeac9cbc4ca5b8c245972f3a765d1cb5b7ef038 Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= <noltari@gmail.com>
|
|
Date: Fri, 22 May 2020 14:15:22 +0200
|
|
Subject: [PATCH] mtd: rawnand: brcmnand: rename page sizes
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
Current pages sizes apply to controllers after v3.4
|
|
|
|
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
|
|
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
|
|
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
|
|
Link: https://lore.kernel.org/linux-mtd/20200522121524.4161539-4-noltari@gmail.com
|
|
---
|
|
drivers/mtd/nand/raw/brcmnand/brcmnand.c | 4 ++--
|
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
|
--- a/drivers/mtd/nand/raw/brcmnand/brcmnand.c
|
|
+++ b/drivers/mtd/nand/raw/brcmnand/brcmnand.c
|
|
@@ -502,7 +502,7 @@ static int brcmnand_revision_init(struct
|
|
{
|
|
static const unsigned int block_sizes_v6[] = { 8, 16, 128, 256, 512, 1024, 2048, 0 };
|
|
static const unsigned int block_sizes_v4[] = { 16, 128, 8, 512, 256, 1024, 2048, 0 };
|
|
- static const unsigned int page_sizes[] = { 512, 2048, 4096, 8192, 0 };
|
|
+ static const unsigned int page_sizes_v3_4[] = { 512, 2048, 4096, 8192, 0 };
|
|
|
|
ctrl->nand_version = nand_readreg(ctrl, 0) & 0xffff;
|
|
|
|
@@ -549,7 +549,7 @@ static int brcmnand_revision_init(struct
|
|
ctrl->max_page_size = 16 * 1024;
|
|
ctrl->max_block_size = 2 * 1024 * 1024;
|
|
} else {
|
|
- ctrl->page_sizes = page_sizes;
|
|
+ ctrl->page_sizes = page_sizes_v3_4;
|
|
if (ctrl->nand_version >= 0x0600)
|
|
ctrl->block_sizes = block_sizes_v6;
|
|
else
|