From patchwork Thu Nov 9 11:24:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: liao jaime X-Patchwork-Id: 1861938 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org 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=28aN6JJ+; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=Q7Y5SRLI; dkim-atps=neutral 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=patchwork.ozlabs.org) 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 (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4SR05F1cgSz1yRT for ; Thu, 9 Nov 2023 22:26:08 +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:MIME-Version:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id: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=XThMUGp8IB2j8bMSZPV8xRqdn1agD2bFEXpscP9O64E=; b=28aN6JJ+EO4RQE JbBsJXWgVGqsPS2jaOsy5EFG3NG5iiijwCd58rgcGpT4j8YKv0PxL1G9LbXdnlDooju02hDaaYFce RrkBvpnUeXivQ/VpMl8wSKKrGntqHcxuU8ziR6Kf41cwfjzsCEA9MqHrPYXmDZ2Zr8F/bj8vxk+6Q RU900MiByQ+Cu6ejTkG9CJTRd6iExuGkkdfD32gciwSkziqufapJNz0ts+mG4lf/RvdLiquLLmbxn 34gFY5/6Dlt9nINmYPwIuU5AbtqnFhdBNVUBCNME8LFf1TuXIslnhGJySMbEXifNe5UHZJhG1aPFM PawvB3czTMNJMAoM+NYw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r13AG-0063YP-17; Thu, 09 Nov 2023 11:25:36 +0000 Received: from mail-oa1-x2e.google.com ([2001:4860:4864:20::2e]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r13AB-0063Uj-0b for linux-mtd@lists.infradead.org; Thu, 09 Nov 2023 11:25:33 +0000 Received: by mail-oa1-x2e.google.com with SMTP id 586e51a60fabf-1f0f160e293so438672fac.0 for ; Thu, 09 Nov 2023 03:25:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1699529129; x=1700133929; darn=lists.infradead.org; h=references:in-reply-to:message-id:date:subject:cc:to:from:from:to :cc:subject:date:message-id:reply-to; bh=ypE+Qzvt1gTVx9DZDy2dJJ+msX4RkhEYGySvFwz3Rtk=; b=Q7Y5SRLItTsoyAxhjjp3e+GIJU0ZtjoJF+ClDHG5DjzCka9Vj/8W8hA6TfsR5W57LE rIAdgLryluN7lSUa3xx6uTJT+VB/klemFV7tjR0jX+0moSp9z+a3HsRZhJGiTSXmhMdJ 6BT9YjRpZpcW9MG8iASgJgMJkb6FUNA/rxWTxrMlaSTUswJJA4VeGabQberV3QCNZj/D NgdLcoxyHZdHTLGzb+dUCpHGJwuiB+ejACYdf1KP7wQfoN7+HUm4mftTRIN70to1bdZT /1mkMJ0dIzUaYOUFRvvUfqESZEYeQ0VKGnqL9FmTELp+03a3HDf+hTrEvS6iE7TzbErq fuyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699529129; x=1700133929; 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=ypE+Qzvt1gTVx9DZDy2dJJ+msX4RkhEYGySvFwz3Rtk=; b=qh9t0rgFhLwncjLG2x5W9CeR0NJeOMZT0RW0TJrbNyo7+5lDtfeJ+b2DkcHC0ZbtUK kuWmwe6O3rFLKfh62vio8zaHFK4VWW4ogsrtJeXfxFWRow/47hNNG9Z9kWVvwuG/8s9D YIbnwKKKFewnZfbrm1YMw+4hb++7MjTHKamlz1AettixG48KTRLBQ2GrOQLL8kefkArf EGkdm7sGpsHZJJi1KDrLb9zii7rlTCRcTxZMlfUwYGOMULIvKgx3za7OINKdr9Mrg7qy t9Me58FirXrf2lmDgzE/4+tyap9oTHSIbTRpFWJM9jmLr2G7CMOf5mQ2rb+UPJEeVDUc ZsKQ== X-Gm-Message-State: AOJu0Yzn/tVwAQEe10jfI59ICrLyWcQWpZR/bwJIS8RcdNlE9mI39Qh8 q5vQn+Na8aG7nwlKoXB6uhuIFTd27Qg= X-Google-Smtp-Source: AGHT+IGkfRwcoNspq+YllcJae0kcoegnaVUYs8mFjq8oEAEaLhfiVwHx2LVjpsCt/x5TYZhypy3HNw== X-Received: by 2002:a05:6870:1049:b0:1e9:bda0:771 with SMTP id 9-20020a056870104900b001e9bda00771mr4132854oaj.4.1699529128834; Thu, 09 Nov 2023 03:25:28 -0800 (PST) Received: from localhost.localdomain ([123.51.145.88]) by smtp.gmail.com with ESMTPSA id y36-20020a056a00182400b0068790c41ca2sm10455953pfa.27.2023.11.09.03.25.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Nov 2023 03:25:28 -0800 (PST) From: JaimeLiao X-Google-Original-From: JaimeLiao To: linux-mtd@lists.infradead.org, miquel.raynal@bootlin.com, richard@nod.at Cc: jaimeliao@mxic.com.tw, jaimeliao.tw@gmail.com, angyanyu13@gmail.com Subject: [PATCH v3 3/5] mtd: spinand: Add continuous read state Date: Thu, 9 Nov 2023 19:24:58 +0800 Message-Id: <20231109112500.4966-4-jaimeliao@mxic.com.tw> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20231109112500.4966-1-jaimeliao@mxic.com.tw> References: <20231109112500.4966-1-jaimeliao@mxic.com.tw> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231109_032531_230398_1DCB62EC X-CRM114-Status: GOOD ( 11.02 ) 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: JaimeLiao --- 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 [2001:4860:4864:20:0:0:0:2e 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: , MIME-Version: 1.0 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: JaimeLiao --- 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 cfc295f5e31b..33ad401d3a34 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, @@ -1307,6 +1312,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 bb9288ffd898..263420b2338e 100644 --- a/include/linux/mtd/spinand.h +++ b/include/linux/mtd/spinand.h @@ -422,6 +422,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 */ @@ -450,6 +451,7 @@ struct spinand_device { u8 *databuf; u8 *oobbuf; u8 *scratchbuf; + bool use_continuous_read; const struct spinand_manufacturer *manufacturer; void *priv; };