From patchwork Thu Feb 9 12:08:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: liao jaime X-Patchwork-Id: 1739923 X-Patchwork-Delegate: miquel.raynal@bootlin.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=HAKhJwtp; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=BVWJiUtp; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (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 4PCFzc1ylvz23yG for ; Thu, 9 Feb 2023 23:09:48 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=M8zGHUbuvGVM6Gl9C4NA2B9mJvUHrDHKNV3voDmmAXU=; b=HAKhJwtphggHbU PVVv0bDlzr3cNY0MWno0OGEypgMeYy8t8zaB5sUEIzYQLsU08cpKxbrhihaCzprzvdLFFDziOnYYS Ot7u6+cX3FXUIBAKjq4S89kA/bX+rjqqLcOnF66pU2By6L3/nGX5ZgvIKNKtUMQvWJ8UE2bcvwsiq D5g7UZfbVjY7t27DzOEJRqlUnlxn1+m0lbhtQQ2EZ5xO7A60RttRWBC1jiG5G3jSFL1N+Z6lbpXg/ eLQeJTKioAaRb9fBVJRf8cZyd6/J/Glaye9A2bb0kLl4Sq3VffkXufjAb5KiHt58L91NoNs4ol1Ls u25/TA7DVx5fKJIhSuYA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pQ5jk-001SLK-6M; Thu, 09 Feb 2023 12:09:12 +0000 Received: from mail-pl1-x636.google.com ([2607:f8b0:4864:20::636]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pQ5je-001SHl-LL for linux-mtd@lists.infradead.org; Thu, 09 Feb 2023 12:09:07 +0000 Received: by mail-pl1-x636.google.com with SMTP id k13so2640198plg.0 for ; Thu, 09 Feb 2023 04:09:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=UnX6vF6BvhazK7OGCboJF5Oyb2BqK+59aOcLmIX7UeY=; b=BVWJiUtpZh1ecXp9OaRs27Ez1A8qjk2klgf+F6T+5zJKAQKek8SGt2YYcJEkuLcLYq fOb0YqZabAAmuPvrAiqEyp4JbD6VuT2QiLqW+VECHgHEd8g/e8zlCrR3xH7Xhm8m0kFI 4SSjBuDe3fsyA1HkM3E++kNsdtJf1rtMG1pRQrtA1vKCo86k81N12hSDFUSxA2d3ePcH attDAxDPck2XKlw4YuV4lwXA8F+0qavlfITke74+BXANfF27Rg41wu/RVTbbDEwvJJEZ oZxAwJUoa5GdDibsxH6lRMoOOBgbvOnbWSX8z7KZBD0v7pxSPMTOniPDGTE7gKHZgG9p 12SA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version: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=UnX6vF6BvhazK7OGCboJF5Oyb2BqK+59aOcLmIX7UeY=; b=Rs9wd+JxDj53EHiozNRyDu15topnUPeJnLhKkg3AklNlp3Au46ogAx2iPiSrcVGnPk 6a4OODECqXQIJ/GTvUriBYgP3hyiuBgE0vCvFcz00OIMCLh+hxS4Saa0skN+u6p6+0o8 QhelhaHZSaqqgCyVAzXrOVgqNT/vSR4WHeTi+fFS5uLf6uT+IxewJZo/FPWbGObepc+j xXMFkHfWWnoiix0D/XaT0eEFcaWvkiIxGiOxm+GMsSPGMnJ+ITJCv0C1U6466cJr2qZr ZIKcH/2B9QUP7Ofir8UPXrPFqilymUDC5TRH1e1Q8nF6mLG3Zp7oizJ7nZr9V93cljKa 4q1w== X-Gm-Message-State: AO0yUKVj+l1HX7shkWhR5dE2I7XwTQjQPXrXv39/IvJ/6Qge5C+puyLG piM3emlb9mU4yOrrJbmNHDTOJOKIj10= X-Google-Smtp-Source: AK7set8nnFYoqmRNf7wDmt+jA2dEc6EkRtRLhQdeY7mD25kHH/AWLAlHzQIy56JuahIpdAINtKmrtA== X-Received: by 2002:a17:90b:1809:b0:22b:e8bc:7f32 with SMTP id lw9-20020a17090b180900b0022be8bc7f32mr11799245pjb.49.1675944544703; Thu, 09 Feb 2023 04:09:04 -0800 (PST) Received: from mp600-ThinkCentre-M710t.. ([123.51.145.88]) by smtp.gmail.com with ESMTPSA id ms15-20020a17090b234f00b00233217fa85esm449746pjb.28.2023.02.09.04.09.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Feb 2023 04:09:04 -0800 (PST) From: Jaime Liao To: linux-mtd@lists.infradead.org, miquel.raynal@bootlin.com, richard@nod.at Cc: jaimeliao@mxic.com.tw, jaimeliao.tw@gmail.com Subject: [PATCH v2 2/4] mtd: spinand: Add continuous read state Date: Thu, 9 Feb 2023 20:08:51 +0800 Message-Id: <20230209120853.660564-3-jaimeliao.tw@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230209120853.660564-1-jaimeliao.tw@gmail.com> References: <20230209120853.660564-1-jaimeliao.tw@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230209_040906_720472_ABF0042A X-CRM114-Status: GOOD ( 10.52 ) X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Add continuous read state and initialize state to default false. Signed-off-by: Jaime Liao --- drivers/mtd/nand/spi/core.c | 8 ++++++++ include/linux/mtd/spinand.h | 2 ++ 2 files changed, 10 insertions(+) Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:636 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [jaimeliao.tw[at]gmail.com] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Add continuous read state and initialize state to default false. Signed-off-by: Jaime Liao --- drivers/mtd/nand/spi/core.c | 8 ++++++++ include/linux/mtd/spinand.h | 2 ++ 2 files changed, 10 insertions(+) diff --git a/drivers/mtd/nand/spi/core.c b/drivers/mtd/nand/spi/core.c index c13374933372..aa57d5b0a3dc 100644 --- a/drivers/mtd/nand/spi/core.c +++ b/drivers/mtd/nand/spi/core.c @@ -193,6 +193,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) { return spinand_upd_cfg(spinand, CFG_CONT_READ_ENABLE, @@ -1304,6 +1309,9 @@ static int spinand_init(struct spinand_device *spinand) goto err_cleanup_ecc_engine; } + /* Init continuous read */ + spinand_init_continuous_read(spinand); + return 0; err_cleanup_ecc_engine: diff --git a/include/linux/mtd/spinand.h b/include/linux/mtd/spinand.h index e98d770173dc..f598a0c5a376 100644 --- a/include/linux/mtd/spinand.h +++ b/include/linux/mtd/spinand.h @@ -419,6 +419,7 @@ struct spinand_dirmap { * because the spi-mem interface explicitly requests that buffers * passed in spi_mem_op be DMA-able, so we can't based the bufs on * the stack + * @use_continuous_read: record the continuous read status * @manufacturer: SPI NAND manufacturer information * @priv: manufacturer private data */ @@ -447,6 +448,7 @@ struct spinand_device { u8 *databuf; u8 *oobbuf; u8 *scratchbuf; + bool use_continuous_read; const struct spinand_manufacturer *manufacturer; void *priv; };