From mboxrd@z Thu Jan 1 00:00:00 1970 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 1ED44C433FE for ; Wed, 2 Nov 2022 11:29:12 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 2CB24850A4; Wed, 2 Nov 2022 12:28: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=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="LXa1CNpn"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 911DF84E98; Wed, 2 Nov 2022 07:15:27 +0100 (CET) Received: from mail-pj1-x1029.google.com (mail-pj1-x1029.google.com [IPv6:2607:f8b0:4864:20::1029]) (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 2B12684E96 for ; Wed, 2 Nov 2022 07:15:25 +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-x1029.google.com with SMTP id v4-20020a17090a088400b00212cb0ed97eso1005553pjc.5 for ; Tue, 01 Nov 2022 23:15:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=references:in-reply-to:message-id:date:subject:cc:to:from:from:to :cc:subject:date:message-id:reply-to; bh=jkX60Jw6UOyPV7PO5jp/2YXbEuJS84TAFjJOAK0/nJg=; b=LXa1CNpnZIPugNpluk3QzPPa7epmRdy4cmrOgXM+DxR8lsAIvoOdxLsNRePQ1VoyZ5 fZFtpGeCAAvqWJv/+W7E7tiBR0sllTy2kIkM9slxOamqwt/NOD4PZFvDneFatct+o1WY 1qH5B1c4qEkuK16bvXc74huiXaImmyGPoTWwngYyIyrKl7aRg/7ORiJSTfJbyoZDeVaz p0Y/Z4YjZ0v7nYFXIxFdIkUpY1KojtkaDd83sOAw1MLXKzi9BdC7EFEDOEk5Yvamcamv b5Ib+QdUVeH8OoAuF6hY6Lo2uGjiZ25khlbiTvxsJTl/r3MiUBXbqb398Hn3VX3XBf/F eZaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=references:in-reply-to: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=aS1g2+JCS1GusUBBBxkGNvj73Uj1pyFDxozIJpRIQniFN6Xp1uUr5NB2zZerKPGMig FSrolNu2oNIsLmsLCEGGSlWweMF9IUIcHmQQKSsHeZztjvOg0fZwsfFktu+Y6hKNpPp/ HKoHUbRJpJjjUZS7eV+Ss5n0oZaxdovfist0priwKOzrhCmI9k0jdrbhCJgs/xwpW5gX AEDri5I7U6/jPm3a7rBRb0fz8jf3jli+NGdf1oxOcyCQ0onS74/71Yup0RXNkz5vwRre EVF2q+W8ko57cWyRRFTyo3sPjCvPW+6qSh66ugeP5/GQHIkzmdL2AAlx+A5rPCAA4pP1 9pig== X-Gm-Message-State: ACrzQf3a4PS4/0gQ2nkKV9Hm92GqerRn2ut8f8cqVVd5USnv+YcDOwIU fz/qsfqjhY+nlhYjiqL6Gg4EQ6SnMho= X-Google-Smtp-Source: AMsMyM7ZOxoVUiUz6vNMigoLttBPDGbm7h4XYJR/f2M7x6B/0WbqB4+yoI3a0NthujwaLdIO+DTv2g== X-Received: by 2002:a17:902:c410:b0:187:190f:6aa2 with SMTP id k16-20020a170902c41000b00187190f6aa2mr16778776plk.88.1667369723412; Tue, 01 Nov 2022 23:15:23 -0700 (PDT) Received: from localhost.localdomain ([123.51.145.88]) by smtp.gmail.com with ESMTPSA id v128-20020a626186000000b0056328e516f4sm7805882pfb.148.2022.11.01.23.15.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Nov 2022 23:15:23 -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 v2 2/5] mtd: spinand: Add continuous read mode initialization Date: Wed, 2 Nov 2022 14:14:29 +0800 Message-Id: <20221102061432.7113-3-liangyanyu13@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20221102061432.7113-1-liangyanyu13@gmail.com> References: <20221102061432.7113-1-liangyanyu13@gmail.com> X-Mailman-Approved-At: Wed, 02 Nov 2022 12:28:41 +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