bcm63xx kernel 5.10

Florian Fainelli f.fainelli at gmail.com
Fri Feb 4 14:02:33 PST 2022



On 2/4/2022 11:21 AM, Álvaro Fernández Rojas wrote:
> So the problem is that SET_FEATURES and GET_FEATURES isn’t supported by versions 2.1, 2.2 and 4.0 of the nand controller, which are the ones present on bcm63xx, right?

Yes, I suspect this is the problem since I do not see CMD_LOW_LEVEL_OP 
being defined in the register database for the controllers v2.1 and 
v2.2, v3.3. Staring with v4.0, the controllers do have the 
CMD_LOW_LEVEL_OP. This is the version/feature table that I could 
programmatically compile:

version: 0.1, ll: no
version: 1.0, ll: no
version: 2.0, ll: no
version: 2.1, ll: no
version: 2.2, ll: no
version: 3.0, ll: no
version: 3.2, ll: no
version: 3.3, ll: no
version: 3.4, ll: no
version: 4.0, ll: yes
version: 5.0, ll: yes
version: 6.0, ll: yes
version: 6.2, ll: yes
version: 7.0, ll: yes
version: 7.1, ll: yes
version: 7.2, ll: yes
version: 7.3, ll: yes

How about this patch, does it work better?

diff --git a/drivers/mtd/nand/raw/brcmnand/brcmnand.c 
b/drivers/mtd/nand/raw/brcmnand/brcmnand.c
index f75929783b94..06ac593beec0 100644
--- a/drivers/mtd/nand/raw/brcmnand/brcmnand.c
+++ b/drivers/mtd/nand/raw/brcmnand/brcmnand.c
@@ -1727,6 +1727,8 @@ static void brcmnand_cmdfunc(struct nand_chip 
*chip, unsigned command,
                 break;
         case NAND_CMD_SET_FEATURES:
         case NAND_CMD_GET_FEATURES:
+               if (ctrl->nand_version < 0x0400)
+                       break;
                 brcmnand_low_level_op(host, LL_OP_CMD, command, false);
                 brcmnand_low_level_op(host, LL_OP_ADDR, column, false);
                 break;

-- 
Florian



More information about the openwrt-devel mailing list