Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id CCBB0C433FE for ; Wed, 2 Nov 2022 02:34:37 +0000 (UTC) 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) 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(+) 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; }; /** -- 2.17.1