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

_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to