From patchwork Wed Nov 2 01:04:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liang-Yan Yu X-Patchwork-Id: 1697982 X-Patchwork-Delegate: dario.binacchi@amarulasolutions.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=cWBYRiAE; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4N29vS4RZGz23lV for ; Wed, 2 Nov 2022 13:34:28 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 9DBCC85025; Wed, 2 Nov 2022 03:34:05 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="cWBYRiAE"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id DE3DF81273; Wed, 2 Nov 2022 02:04:24 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pl1-x634.google.com (mail-pl1-x634.google.com [IPv6:2607:f8b0:4864:20::634]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 2CAAE84F2C for ; Wed, 2 Nov 2022 02:04:22 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=liangyanyu13@gmail.com Received: by mail-pl1-x634.google.com with SMTP id c2so15125802plz.11 for ; Tue, 01 Nov 2022 18:04:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=1m5GFrkJlf6tRoCjd35A5wxZ0zNMEM+pgfpMXEacr+4=; b=cWBYRiAENYElPZ2ysqgJ7Ano2djDBGJjT85S7FOGskNP856OdAgA8t5CEC3/fowbBG Pcl5iJaUdFovHz1bb54+VOezLjXkf2twYrFQRChbQ3euZdjRL1Q/Y9B8sCXHNZpyIt/p uS0geyGAJ2IPsOQel1TA3KOMTWBhQksjGuc6JjS7YlLBi6pZpCP4d0M8sFxQfKRnVftx h98ZLFa9pdVB6UaWjV3TtTF24g+fOQCW2vyypVi96h0I6iEAh20kWypkRJzStNYpFcv5 fkN/4MXgzZ8+8MsHUS+ECop2VowasguZi072AulJDzBUuO9EjcJqRPYsrNpdIi/Jf7Wm Ihzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=1m5GFrkJlf6tRoCjd35A5wxZ0zNMEM+pgfpMXEacr+4=; b=5mwPEoIVAUrzcsEP6QFxljNfgXTcMk/h/Qz8/5TGKLTpJ9QYlJtUz/0aRZVXA5JTxm CC+bxSyKfOA4ceu72px+I1fTIPfx+HrznsWAPmn4Ssre+embpP0yHKrPaypW3ZPtoLbQ NVK+OfZX0mNl3iic5P9sSGX4OWcWMl8tukAcxnJaLW5mUE6KWlQuKrCAa/E4UJicupaU IjPmg7sk5JUzAujeXWt0KqaXU9b/BMML061paMMzRnb75eC0tfC1LdrwlhiaKNzgXYds 5plBBD9q+YVPJR6abPM32fmJgYvl/sWZXg+kWwP5fSrj/B8bqAHghi7cqiNucHdGBS/d WGxw== X-Gm-Message-State: ACrzQf0f7k7ToRaTUlGS9iajIcNGAPcaUZGrrjwuV99JPiJWeviq+ZF9 Qv+9D8YDBMwptjm5xUFN2BYI5Ky5g6+O3w== X-Google-Smtp-Source: AMsMyM68fV/OcGHNX4CRfPseYuHqYiyDrw0VMQM8IdoFznODTrMkZTccx+cm+PRJ2EfudxvM9qXjiA== X-Received: by 2002:a17:902:ce0d:b0:178:bd1e:e8da with SMTP id k13-20020a170902ce0d00b00178bd1ee8damr22462402plg.103.1667351060449; Tue, 01 Nov 2022 18:04:20 -0700 (PDT) Received: from localhost.localdomain ([123.51.145.88]) by smtp.gmail.com with ESMTPSA id b2-20020a1709027e0200b00186c54188b4sm6913403plm.240.2022.11.01.18.04.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Nov 2022 18:04:20 -0700 (PDT) From: Leo Yu To: dario.binacchi@amarulasolutions.com, michael@amarulasolutions.com, miquel.raynal@bootlin.com, u-boot@lists.denx.de Cc: jaimeliao.tw@gmail.com, Leo Yu Subject: [PATCH v1 1/5] mtd: spinand: Add continuous read mode configuration Date: Wed, 2 Nov 2022 09:04:01 +0800 Message-Id: <20221102010401.32092-1-liangyanyu13@gmail.com> X-Mailer: git-send-email 2.17.1 X-Mailman-Approved-At: Wed, 02 Nov 2022 03:33:58 +0100 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean This patch sets the "CONT" bit in the configuration register and adds a flag for identifying continuous read mode capability. Signed-off-by: Leo Yu --- drivers/mtd/nand/spi/core.c | 12 ++++++++++++ include/linux/mtd/spinand.h | 2 ++ 2 files changed, 14 insertions(+) -- 2.17.1 diff --git a/drivers/mtd/nand/spi/core.c b/drivers/mtd/nand/spi/core.c index 134bf22c80..2419c267d6 100644 --- a/drivers/mtd/nand/spi/core.c +++ b/drivers/mtd/nand/spi/core.c @@ -216,6 +216,18 @@ static int spinand_init_quad_enable(struct spinand_device *spinand) enable ? CFG_QUAD_ENABLE : 0); } +static int spinand_continuous_read_enable(struct spinand_device *spinand, + bool enable) +{ + int ret = spinand_upd_cfg(spinand, CFG_CONT_READ_ENABLE, + enable ? CFG_CONT_READ_ENABLE : 0); + + if (!ret) + spinand->use_continuous_read = enable; + + return ret; +} + static int spinand_ecc_enable(struct spinand_device *spinand, bool enable) { diff --git a/include/linux/mtd/spinand.h b/include/linux/mtd/spinand.h index 15bcd59f34..e6a5478b0a 100644 --- a/include/linux/mtd/spinand.h +++ b/include/linux/mtd/spinand.h @@ -131,6 +131,7 @@ #define REG_CFG 0xb0 #define CFG_OTP_ENABLE BIT(6) #define CFG_ECC_ENABLE BIT(4) +#define CFG_CONT_READ_ENABLE BIT(2) #define CFG_QUAD_ENABLE BIT(0) /* status register */ @@ -247,6 +248,7 @@ struct spinand_ecc_info { #define SPINAND_HAS_QE_BIT BIT(0) #define SPINAND_HAS_CR_FEAT_BIT BIT(1) +#define SPINAND_HAS_CONT_READ_BIT BIT(2) /** * struct spinand_info - Structure used to describe SPI NAND chips From patchwork Wed Nov 2 01:04:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liang-Yan Yu X-Patchwork-Id: 1697983 X-Patchwork-Delegate: dario.binacchi@amarulasolutions.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=PrRoP6uz; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4N29vg2ybYz23lV for ; Wed, 2 Nov 2022 13:34:39 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 8EE2A85063; Wed, 2 Nov 2022 03:34:07 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="PrRoP6uz"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 32E94809D0; Wed, 2 Nov 2022 02:05:03 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pj1-x102b.google.com (mail-pj1-x102b.google.com [IPv6:2607:f8b0:4864:20::102b]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 41A01809D0 for ; Wed, 2 Nov 2022 02:05:00 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=liangyanyu13@gmail.com Received: by mail-pj1-x102b.google.com with SMTP id h14so14793344pjv.4 for ; Tue, 01 Nov 2022 18:05:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=jkX60Jw6UOyPV7PO5jp/2YXbEuJS84TAFjJOAK0/nJg=; b=PrRoP6uzM02WL5samCpt7r6wQpI8X6jE97iZdeVccDyc5R14IM+jE+Vemjxc/xJyIA WnZjIG44TZO7XRrZuwDbcnM7BDD/sJK53ll8ELugMEGoEKQiAakyQprUNOs6DkU/7Uao QZZt1wOmI/Nq8MuEz4lj24YuhAbWzVSxau2U9GzeDng3YwvmyeJ4IlQAzhyhP5gc4iwO mR2pgYWpOXjhFJSZXuATMZdjFxpiVP0dtyyjhFucJv5jD4taEoI28dMiHhPFgagLwpWH /In6RSnchkaq6GWB9ykqNJdROY5ONDQNkhRoN0XNla535BKJZsqNfiTcsmqSs63moD1J UEdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=jkX60Jw6UOyPV7PO5jp/2YXbEuJS84TAFjJOAK0/nJg=; b=KIxzE++G3y11Ff0c4SVaJd0bOH184XPdHteWlQcEs5YYbwwOtgIK5em4vUMVzl116r K5a8nSpM6vSDja4JlvAKcz5/g2qv0pCKATKGd5jamNMFyCusZ5AGay8OaN+pcFxohEAW Bc8baIxaE1BtmAqwM3vinfzl5XpNKJT1NOBiEG9RGMEu06Fc8xiBvkdx+TPryaVWR447 tUY6pK7sdL/fM/zx9vAgKYJKXC3m2uT7Ynhe5GtICSglwJr+KZK1vClP5SjtMGGgwYsL uPhHWlEIw3d1Z922o9iECzpANaCkzvqUKoB1t4phfOC/3cKFKlGOIjzZUGNJ8nBD9rnH pYMA== X-Gm-Message-State: ACrzQf2LjurS3CuxOSx8t6XegJeYJnsj6cXLqSDWj1ysEgzU+Zaf4SCQ AxxYb3jxV0ZdGQ3Daxe5hD8= X-Google-Smtp-Source: AMsMyM4XFqXbWjm5cl2bji0pVcyuJFsczTiP52Vd6AFYFfTqqepovdTtCFWmqZvqQUXCeR6jT7j8ZQ== X-Received: by 2002:a17:90a:680d:b0:213:d200:e992 with SMTP id p13-20020a17090a680d00b00213d200e992mr15671403pjj.220.1667351098548; Tue, 01 Nov 2022 18:04:58 -0700 (PDT) Received: from localhost.localdomain ([123.51.145.88]) by smtp.gmail.com with ESMTPSA id s17-20020a170902ea1100b00186727e5f5csm6965199plg.248.2022.11.01.18.04.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Nov 2022 18:04:58 -0700 (PDT) From: Leo Yu To: dario.binacchi@amarulasolutions.com, michael@amarulasolutions.com, miquel.raynal@bootlin.com, u-boot@lists.denx.de Cc: jaimeliao.tw@gmail.com, Leo Yu Subject: [PATCH v1 2/5] mtd: spinand: Add continuous read mode initialization Date: Wed, 2 Nov 2022 09:04:41 +0800 Message-Id: <20221102010441.32149-1-liangyanyu13@gmail.com> X-Mailer: git-send-email 2.17.1 X-Mailman-Approved-At: Wed, 02 Nov 2022 03:33:58 +0100 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean Add continuous read mode status and initialize the default status to false. Signed-off-by: Leo Yu --- drivers/mtd/nand/spi/core.c | 8 ++++++++ include/linux/mtd/spinand.h | 3 +++ 2 files changed, 11 insertions(+) -- 2.17.1 diff --git a/drivers/mtd/nand/spi/core.c b/drivers/mtd/nand/spi/core.c index 2419c267d6..9d628f6f26 100644 --- a/drivers/mtd/nand/spi/core.c +++ b/drivers/mtd/nand/spi/core.c @@ -216,6 +216,11 @@ static int spinand_init_quad_enable(struct spinand_device *spinand) enable ? CFG_QUAD_ENABLE : 0); } +static void spinand_init_continuous_read(struct spinand_device *spinand) +{ + spinand->use_continuous_read = false; +} + static int spinand_continuous_read_enable(struct spinand_device *spinand, bool enable) { @@ -1126,6 +1131,9 @@ static int spinand_init(struct spinand_device *spinand) mtd->oobavail = ret; + /* Init continuous read mode */ + spinand_init_continuous_read(spinand); + return 0; err_cleanup_nanddev: diff --git a/include/linux/mtd/spinand.h b/include/linux/mtd/spinand.h index e6a5478b0a..f3a77ea317 100644 --- a/include/linux/mtd/spinand.h +++ b/include/linux/mtd/spinand.h @@ -337,6 +337,7 @@ struct spinand_info { * the stack * @manufacturer: SPI NAND manufacturer information * @priv: manufacturer private data + * @use_continuous_read: indicate the continuous read mode status */ struct spinand_device { struct nand_device base; @@ -367,6 +368,8 @@ struct spinand_device { u8 *scratchbuf; const struct spinand_manufacturer *manufacturer; void *priv; + + bool use_continuous_read; }; /** From patchwork Wed Nov 2 01:05:15 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liang-Yan Yu X-Patchwork-Id: 1697984 X-Patchwork-Delegate: dario.binacchi@amarulasolutions.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=fO6RGrqC; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4N29vt6qk6z23lV for ; Wed, 2 Nov 2022 13:34:50 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 841F185079; Wed, 2 Nov 2022 03:34:09 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="fO6RGrqC"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D62AB84EEF; Wed, 2 Nov 2022 02:05:37 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pf1-x436.google.com (mail-pf1-x436.google.com [IPv6:2607:f8b0:4864:20::436]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 1C8D881273 for ; Wed, 2 Nov 2022 02:05:35 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=liangyanyu13@gmail.com Received: by mail-pf1-x436.google.com with SMTP id b29so14997123pfp.13 for ; Tue, 01 Nov 2022 18:05:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=BtDh+jiK8QxqjaahNn0i0TJl6QOq3J7bKyodjt9F6TQ=; b=fO6RGrqCU2+Tv7p+pjryO89OQLzRkX0QiLEDrlVWFsBPTJTaGcj0BD4GUElBiELxFT rnfiAqpzKnpkbX5W4Xp5hLkjrCAstHq5rhaPrkwK7aL0RHVlhECay5wACOfQlys2MzQV L99YJbVs1QZaaWh9XkWxYqnIFGKf3UmU4C8FKXe6ugJDhrmNF/eaQEAhQUFlM3RVWgzq 7/3EFOkczOpRyTM81eEkMfZ1TQL2eeXr/pXG/QTCLt+t1SiCuMsUFvrNtSYELbxxPKy/ 8wqdPI+Ivox4JqiA5qgaftPemoryZ4n2kSY5wX2f8CJrdC2BY129GY9Golf76z9CBBxT nXaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=BtDh+jiK8QxqjaahNn0i0TJl6QOq3J7bKyodjt9F6TQ=; b=hfNc/IFmupx35fKrvLhkajRklm7PxgQS4ba7OSMbolS8faT92bFtrNG/RiDNyPGob0 7DW2KAGADeJpLGosauTjbfMchvUx+yWQ9c1RUEJf5a2AesUQ1jeJemRYQizEQVXC3g3O adhA53LcEM98gbVGeh/HGehCkAOlih5Dvk0a0X3Enq7dPSOpiSSlX8FsZ5tCt3eRml8z AdUpD95P/01zB32UN0Ej1QGIneCAhW0vhqXbuBzrxtXABdT9G18SIzJGtPb6D1x4D3cX Nix68SYe8LyvvepT9DDkbDGqjKXgvmnZ/zn3H2y1qMOIxX9Bk6cFd+tKeF3w2hiRqbmP R+DQ== X-Gm-Message-State: ACrzQf1GfnnW/piADLpeT7fEvg49WkUrUVUTnsnBFSmUJoRpMfc+e53i Qb+ATm/oXYt/fiiBEkrxaIeeUiqnmSwSag== X-Google-Smtp-Source: AMsMyM4h19DMQZ9WhQfdXV4fIzkR1eM8nJ81SFqByIpy8Rq5Ik5nbkBNQv3jqeTgYkxsXbednOoAuw== X-Received: by 2002:a63:2253:0:b0:43c:c924:e56a with SMTP id t19-20020a632253000000b0043cc924e56amr18885498pgm.122.1667351133454; Tue, 01 Nov 2022 18:05:33 -0700 (PDT) Received: from localhost.localdomain ([123.51.145.88]) by smtp.gmail.com with ESMTPSA id 13-20020a62190d000000b00562cfc80864sm7134549pfz.36.2022.11.01.18.05.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Nov 2022 18:05:33 -0700 (PDT) From: Leo Yu To: dario.binacchi@amarulasolutions.com, michael@amarulasolutions.com, miquel.raynal@bootlin.com, u-boot@lists.denx.de Cc: jaimeliao.tw@gmail.com, Leo Yu Subject: [PATCH v1 3/5] cmd: mtd: Add total length of read operation Date: Wed, 2 Nov 2022 09:05:15 +0800 Message-Id: <20221102010515.32203-1-liangyanyu13@gmail.com> X-Mailer: git-send-email 2.17.1 X-Mailman-Approved-At: Wed, 02 Nov 2022 03:33:58 +0100 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean This patch bypasses the limitation of length for read operations in MTD test module. Thus, the total length of a read operation can be passed down to the continuous read operation in SPI NAND layer. Signed-off-by: Leo Yu --- cmd/mtd.c | 2 ++ 1 file changed, 2 insertions(+) -- 2.17.1 diff --git a/cmd/mtd.c b/cmd/mtd.c index ad5cc9827d..0b601e08a3 100644 --- a/cmd/mtd.c +++ b/cmd/mtd.c @@ -335,6 +335,8 @@ static int do_mtd_io(struct cmd_tbl *cmdtp, int flag, int argc, io_op.ooblen = woob ? mtd->oobsize : 0; io_op.datbuf = buf; io_op.oobbuf = woob ? &buf[len] : NULL; + /* Total length of this read operation passed by user */ + io_op.totallen = len; /* Search for the first good block after the given offset */ off = start_off; From patchwork Wed Nov 2 01:05:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liang-Yan Yu X-Patchwork-Id: 1697985 X-Patchwork-Delegate: dario.binacchi@amarulasolutions.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=fjpyWvkw; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4N29w465jTz23lV for ; Wed, 2 Nov 2022 13:35:00 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id C86E585074; Wed, 2 Nov 2022 03:34:11 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="fjpyWvkw"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 70BA484EEF; Wed, 2 Nov 2022 02:06:12 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pj1-x102b.google.com (mail-pj1-x102b.google.com [IPv6:2607:f8b0:4864:20::102b]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 6BDE381273 for ; Wed, 2 Nov 2022 02:06:09 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=liangyanyu13@gmail.com Received: by mail-pj1-x102b.google.com with SMTP id k5so7239189pjo.5 for ; Tue, 01 Nov 2022 18:06:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=bMxkz3Y/ev9W3wKi/UG2B+dx9yCn2eWhiHBiqdhTFAU=; b=fjpyWvkwvHe2Vd1PJP6zybGdpQkT8+jhb0wj8KlNKgzx0j1mAxoAOFcVLUMaaTtKZX gl7rWe5IsQ5KTiNP5d6DfGnZhJ6wIIWrMJi3fTs1hPwhTfSoEwC8nt6IrxukTHN8Ckk5 WOWqexqruGh7n9L8V5RqLGFOx82Frm+heMFjXfD+AGcRw8GepjOFmiQPbS6C80f/E5NK Ujsa6hGnQVp0qILYiWNB5H0R7Mb9187QX26CFyQc+1xmxmmmN7sohFeZkx0t0K8glClA jWPpU7CLaMMriyQh1xjc9wdzeuYt9mtJNGh/vi8+BmxMQZx7UQZ4PCX2RvTFXc2mb1F0 tOYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=bMxkz3Y/ev9W3wKi/UG2B+dx9yCn2eWhiHBiqdhTFAU=; b=ixXyhRkL6JqjqrXH2kVOCFE7x/0in21WXJk/eem/kB8/KVe5mMGEdUgFRIEKlWe46k ANFvE7HWMmA7URI/eRVJU09heX0C3AeEMqUvVf5LYXXAer07oam+lmAcfTgkr/gEbvDJ BckLG7Hu8VdlYgFlOLrx1R8CxrkctOCMc/B7c8AJhc/ZGrSeTiy7p29DegpiWk76tM// 3CaXBCnnSGeVYMZKgPdhOv30TN5dQFxMOtf59rSszbM4d/QAtlDgwJ70wK8AhVT8CZ5R NmbiNukwryJOpt7cijWp96RT3I5asfz3jBNbSKasNNbQ2y8EOkqwsN9jhM90jy2rbwOw 9yYA== X-Gm-Message-State: ACrzQf2BheJvmGnzC1sOcYEu9+xTNrnidBilp2SWN54S3MvER/uQmT0J KS0fx9UJOWWcYmiCvSMT1RE= X-Google-Smtp-Source: AMsMyM4lygLLjWtydx4mAK9l/psNfBmXEjOuYBBgMOp5DSjsP1eC9Sxsep/aTc96omsU1lC2fUzH/g== X-Received: by 2002:a17:903:264b:b0:186:af7a:391d with SMTP id je11-20020a170903264b00b00186af7a391dmr22258695plb.19.1667351167743; Tue, 01 Nov 2022 18:06:07 -0700 (PDT) Received: from localhost.localdomain ([123.51.145.88]) by smtp.gmail.com with ESMTPSA id w23-20020a1709026f1700b00186f81bb3f0sm6926300plk.122.2022.11.01.18.06.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Nov 2022 18:06:07 -0700 (PDT) From: Leo Yu To: dario.binacchi@amarulasolutions.com, michael@amarulasolutions.com, miquel.raynal@bootlin.com, u-boot@lists.denx.de Cc: jaimeliao.tw@gmail.com, Leo Yu Subject: [PATCH v1 4/5] mtd: spinand: Add continuous read operation Date: Wed, 2 Nov 2022 09:05:47 +0800 Message-Id: <20221102010547.32255-1-liangyanyu13@gmail.com> X-Mailer: git-send-email 2.17.1 X-Mailman-Approved-At: Wed, 02 Nov 2022 03:33:58 +0100 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean The flow of continuous read operation is: firstly, starting with the page read command and the 1st page data will be read into the cache after the read latency tRD. Secondly, issuing the Read From Cache commands (03h/0Bh/3Bh/6Bh/BBh/EBh) to read out the data from cache continuously. After all the data is read out, the host should pull CS# high to terminate this continuous read operation and wait tRST for the NAND device resets read operation. The continuous read usage is enabled by reading multiple pages (at least greater than 1 page size) and the column address is "don't care" in this operation, since the data output for each page will always start from byte 0 and a full page data should be read out for each page. On the other hand, since the continuous read mode can only read the entire page of data and cannot read the oob data, the dynamic mode switching is added to enable continuous read mode and disable continuous read mode in spinand_continuous_read to avoid abnormal writing and erasing operations. The performance of continuous read mode is as follows. Set the flash to QSPI mode and run 25MHz direct mapping mode on the SPI bus and use the MTD test module to show the performance of continuous reads. Signed-off-by: Leo Yu --- drivers/mtd/nand/spi/core.c | 120 +++++++++++++++++++++++++++++++++++- 1 file changed, 119 insertions(+), 1 deletion(-) -- 2.17.1 diff --git a/drivers/mtd/nand/spi/core.c b/drivers/mtd/nand/spi/core.c index 9d628f6f26..b28962f921 100644 --- a/drivers/mtd/nand/spi/core.c +++ b/drivers/mtd/nand/spi/core.c @@ -269,7 +269,10 @@ static int spinand_read_from_cache_op(struct spinand_device *spinand, u16 column = 0; int ret; - if (req->datalen) { + if (spinand->use_continuous_read) { + buf = req->databuf.in; + nbytes = req->datalen; + } else if (req->datalen) { adjreq.datalen = nanddev_page_size(nand); adjreq.dataoffs = 0; adjreq.databuf.in = spinand->databuf; @@ -312,6 +315,9 @@ static int spinand_read_from_cache_op(struct spinand_device *spinand, op.addr.val += op.data.nbytes; } + if (spinand->use_continuous_read) + return 0; + if (req->datalen) memcpy(req->databuf.in, spinand->databuf + req->dataoffs, req->datalen); @@ -577,6 +583,105 @@ static int spinand_write_page(struct spinand_device *spinand, return ret; } +static int spinand_continuous_read(struct mtd_info *mtd, loff_t from, + struct mtd_oob_ops *req, + struct nand_io_iter *iter) +{ + struct spinand_device *spinand = mtd_to_spinand(mtd); + struct nand_device *nand = mtd_to_nanddev(mtd); + int ret = 0; + + bool enable_cont_read = true; + bool enable_ecc = false; + + /* + * Since the continuous read mode can only read the entire page of data + * and cannot read the oob data, therefore, only ECC-Free SPI-NAND support + * continuous read mode now. + */ + iter->req.mode = MTD_OPS_RAW; + iter->req.ooblen = 0; + + req->retlen = 0; + + /* Read the first unaligned page with conventional read */ + if (from & (nanddev_page_size(nand) - 1)) { + pr_debug("address not aligned\n"); + + iter->req.databuf.in = req->datbuf; + iter->req.dataoffs = nanddev_offs_to_pos(nand, from, &iter->req.pos); + iter->req.datalen = nanddev_page_size(nand) - iter->req.dataoffs; + + schedule(); + ret = spinand_select_target(spinand, iter->req.pos.target); + if (ret) + return ret; + + spinand_read_page(spinand, &iter->req, enable_ecc); + if (ret) + return ret; + + req->retlen += iter->req.datalen; + } + + iter->req.dataoffs = nanddev_offs_to_pos(nand, from + req->retlen, &iter->req.pos); + iter->req.databuf.in = req->datbuf + req->retlen; + iter->req.datalen = req->totallen - req->retlen; + + schedule(); + ret = spinand_continuous_read_enable(spinand, enable_cont_read); + if (ret) + return ret; + + ret = spinand_select_target(spinand, iter->req.pos.target); + if (ret) { + req->retlen = 0; + goto continuous_read_error; + } + + /* + * The continuous read operation including: firstly, starting with the + * page read command and the 1 st page data will be read into the cache + * after the read latency tRD. Secondly, Issuing the Read From Cache + * commands (03h/0Bh/3Bh/6Bh/BBh/EBh) to read out the data from cache + * continuously. + * + * The cache is divided into two halves, while one half of the cache is + * outputting the data, the other half will be loaded for the new data; + * therefore, the host can read out the data continuously from page to + * page. Multiple of Read From Cache commands can be issued in one + * continuous read operation, each Read From Cache command is required + * to read multiple 4-byte data exactly; otherwise, the data output will + * be out of sequence from one Read From Cache command to another Read + * From Cache command. + * + * After all the data is read out, the host should pull CS# high to + * terminate this continuous read operation and wait a 6us of tRST for + * the NAND device resets read operation. The data output for each page + * will always start from byte 0 and a full page data should be read out + * for each page. + */ + ret = spinand_read_page(spinand, &iter->req, enable_ecc); + if (ret) { + req->retlen = 0; + goto continuous_read_error; + } + + ret = spinand_reset_op(spinand); + if (ret) { + req->retlen = 0; + goto continuous_read_error; + } + + req->retlen += iter->req.datalen; + +continuous_read_error: + enable_cont_read = false; + ret = spinand_continuous_read_enable(spinand, enable_cont_read); + + return ret; +} + static int spinand_mtd_read(struct mtd_info *mtd, loff_t from, struct mtd_oob_ops *ops) { @@ -594,6 +699,18 @@ static int spinand_mtd_read(struct mtd_info *mtd, loff_t from, #ifndef __UBOOT__ mutex_lock(&spinand->lock); #endif + /* + * If the device supports continuous read mode and the read length is greater + * than one page size, the device will enter the continuous read mode. This mode + * helps avoiding issuing a page read command and read from cache command + * again, and improves the performance of reading continuous pages. + */ + if ((spinand->flags & SPINAND_HAS_CONT_READ_BIT) && + (ops->totallen > nanddev_page_size(nand))) { + ret = spinand_continuous_read(mtd, from, ops, &iter); + + goto continuous_read_finish; + } nanddev_io_for_each_page(nand, from, ops, &iter) { schedule(); @@ -622,6 +739,7 @@ static int spinand_mtd_read(struct mtd_info *mtd, loff_t from, ops->oobretlen += iter.req.ooblen; } +continuous_read_finish: #ifndef __UBOOT__ mutex_unlock(&spinand->lock); #endif From patchwork Wed Nov 2 01:06:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liang-Yan Yu X-Patchwork-Id: 1697986 X-Patchwork-Delegate: dario.binacchi@amarulasolutions.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=K65oF8/V; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4N29wJ3fXHz1yqS for ; Wed, 2 Nov 2022 13:35:12 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id B7A278508B; Wed, 2 Nov 2022 03:34:13 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="K65oF8/V"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 6F55384EEF; Wed, 2 Nov 2022 02:06:51 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pl1-x62a.google.com (mail-pl1-x62a.google.com [IPv6:2607:f8b0:4864:20::62a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id C9FF481273 for ; Wed, 2 Nov 2022 02:06:48 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=liangyanyu13@gmail.com Received: by mail-pl1-x62a.google.com with SMTP id p21so11281999plr.7 for ; Tue, 01 Nov 2022 18:06:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=NJlY8KiSn8kl1Ee9JYnK9cJHj+fLaf2Fcf5UThtHcLQ=; b=K65oF8/VhJQEZ/5al90gT64s5d7Ss4mCS1NklDyx0EMxhLlQ23LP5qk3ubw9Mbu2KM S5QCv3sjdulm3ts5wq8Te2YCAfEo+rzkR8kjVim0TfBKgSpXLNFquMnzLHj4x03I2rqp oTvJFrETcMSxAxnELmlOTCfPYMR0HDFEUusJTszFqrr4BCMxctDkSK96xQbazq+x9RqM fqs2rLW1CtWLRYGlPLfqwQMTjQbb77ZKsLi+9roGBNomNZ6H8bqIdpfdjoS27A1fdAXB 4+SiYSo3toj5XnwoV+v3HQwUkkAxd76yZ4kIn8mpCVYvmeBClEB2loaVuWYy82fkPa/3 PXig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=NJlY8KiSn8kl1Ee9JYnK9cJHj+fLaf2Fcf5UThtHcLQ=; b=GI/F45s5c6PN8+Wknt0RTQ7cXiUJnNB9fKzV5Tb7tvE3h7DBBGV1vz3MFv7U/H+ryA 5HocxamgaODibM4HT6hoXk7hmH6qBZyvpdZFeN9Bewywij4RC7ZG/PrDzuWdE5J24RRI SoDzgrpTRhYSAkFEE9s6+RR6jpEND6l9vKoQIO6WH38m/bnpoAcnVF5/cf/A7uGBYlqK r1N/NU0RHDYWpI+JKwZZ8hP+BzBZ0RCPRKSspfDowPUI8hLRvqscmnkzCMKRuhk+rUam kkokvIUnmshlgAHHZB2gPyoL+vTYgrvAVtyuiEblbnmBKDioYFqSNvANqazOyz/nebvj SvpA== X-Gm-Message-State: ACrzQf0rSTm/msjAH1bsXObEoJsjcTSPTMSbWqp5x6EW4i/h5rFvYVRa rwCj/dKLcb/L8eAIi7Hg8so= X-Google-Smtp-Source: AMsMyM5dCx4xKckQC34bSjtYR2F0gpIO8XRCDVaDsDwYkNb8wqnIHbzApFrIGpwSM9BB0mkgOZMnEQ== X-Received: by 2002:a17:903:1109:b0:179:d220:1f55 with SMTP id n9-20020a170903110900b00179d2201f55mr5359783plh.42.1667351207150; Tue, 01 Nov 2022 18:06:47 -0700 (PDT) Received: from localhost.localdomain ([123.51.145.88]) by smtp.gmail.com with ESMTPSA id n2-20020a170902d2c200b00176d218889esm6954707plc.228.2022.11.01.18.06.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Nov 2022 18:06:46 -0700 (PDT) From: Leo Yu To: dario.binacchi@amarulasolutions.com, michael@amarulasolutions.com, miquel.raynal@bootlin.com, u-boot@lists.denx.de Cc: jaimeliao.tw@gmail.com, Leo Yu Subject: [PATCH v1 5/5] mtd: spinand: macronix: Add continuous read mode flag for devices Date: Wed, 2 Nov 2022 09:06:26 +0800 Message-Id: <20221102010626.32314-1-liangyanyu13@gmail.com> X-Mailer: git-send-email 2.17.1 X-Mailman-Approved-At: Wed, 02 Nov 2022 03:33:58 +0100 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean Add continuous read mode flag to the devices support continuous read mode in ID table. Signed-off-by: Leo Yu --- drivers/mtd/nand/spi/macronix.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/mtd/nand/spi/macronix.c b/drivers/mtd/nand/spi/macronix.c index 6d643a8000..ae0374783f 100644 --- a/drivers/mtd/nand/spi/macronix.c +++ b/drivers/mtd/nand/spi/macronix.c @@ -128,7 +128,7 @@ static const struct spinand_info macronix_spinand_table[] = { SPINAND_INFO_OP_VARIANTS(&read_cache_variants, &write_cache_variants, &update_cache_variants), - SPINAND_HAS_QE_BIT, + SPINAND_HAS_QE_BIT | SPINAND_HAS_CONT_READ_BIT, SPINAND_ECCINFO(&mx35lfxge4ab_ooblayout, mx35lf1ge4ab_ecc_get_status)), SPINAND_INFO("MX35UF2GE4AD", 0xa6, @@ -137,7 +137,7 @@ static const struct spinand_info macronix_spinand_table[] = { SPINAND_INFO_OP_VARIANTS(&read_cache_variants, &write_cache_variants, &update_cache_variants), - SPINAND_HAS_QE_BIT, + SPINAND_HAS_QE_BIT | SPINAND_HAS_CONT_READ_BIT, SPINAND_ECCINFO(&mx35lfxge4ab_ooblayout, mx35lf1ge4ab_ecc_get_status)), SPINAND_INFO("MX35UF2GE4AC", 0xa2, @@ -146,7 +146,7 @@ static const struct spinand_info macronix_spinand_table[] = { SPINAND_INFO_OP_VARIANTS(&read_cache_variants, &write_cache_variants, &update_cache_variants), - SPINAND_HAS_QE_BIT, + SPINAND_HAS_QE_BIT | SPINAND_HAS_CONT_READ_BIT, SPINAND_ECCINFO(&mx35lfxge4ab_ooblayout, mx35lf1ge4ab_ecc_get_status)), SPINAND_INFO("MX35UF1GE4AD", 0x96, @@ -155,7 +155,7 @@ static const struct spinand_info macronix_spinand_table[] = { SPINAND_INFO_OP_VARIANTS(&read_cache_variants, &write_cache_variants, &update_cache_variants), - SPINAND_HAS_QE_BIT, + SPINAND_HAS_QE_BIT | SPINAND_HAS_CONT_READ_BIT, SPINAND_ECCINFO(&mx35lfxge4ab_ooblayout, mx35lf1ge4ab_ecc_get_status)), SPINAND_INFO("MX35UF1GE4AC", 0x92, @@ -164,7 +164,7 @@ static const struct spinand_info macronix_spinand_table[] = { SPINAND_INFO_OP_VARIANTS(&read_cache_variants, &write_cache_variants, &update_cache_variants), - SPINAND_HAS_QE_BIT, + SPINAND_HAS_QE_BIT | SPINAND_HAS_CONT_READ_BIT, SPINAND_ECCINFO(&mx35lfxge4ab_ooblayout, mx35lf1ge4ab_ecc_get_status)), -- 2.17.1