From patchwork Thu Aug 29 03:25:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cheng Ming Lin X-Patchwork-Id: 1978210 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=uN4erkXg; 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=Sr5lnRO1; 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 4WvRZQ1gPLz1ydy for ; Thu, 29 Aug 2024 13:28:30 +1000 (AEST) 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=SnN6o/GKgJpYH5dBvpmzPFxWdBRXsafbtgK9eor8y5w=; b=uN4erkXgMnVoZC cPyGNvK7cn/s4xpSaERAWFZqD3x0U8Zl2iDX5mYugHVOHtVuNJSFPiRDPVSmpMopDNVDRiHTfH4l8 YGq4wX/5dKM/T9c417U2/KM2AT+5N6b6yw2FSftSDFw6yD4b3HQuM4xyTgBeI72zj7kyab0YqRnVA oYGwkc6nTNQWkX/BmSpmU0Lbx3g5zPzWbyXIbp3ekIbvRO8FiRYI+WBEWvg0Ay18y1u3Xajf2NTMn C35D8+AQfLZNTnEMy+qdlriyXQdFG8SNBZXc8THR6AZoaMFXfspmDtr0+pBJhQAaoRY0aSxolAJnB zFxWNOnJCKeZuhZJMz2Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sjVpS-00000000M59-1Nxj; Thu, 29 Aug 2024 03:28:10 +0000 Received: from mail-pj1-x102c.google.com ([2607:f8b0:4864:20::102c]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sjVov-00000000LlG-1pWh for linux-mtd@lists.infradead.org; Thu, 29 Aug 2024 03:27:38 +0000 Received: by mail-pj1-x102c.google.com with SMTP id 98e67ed59e1d1-2d3ce556df9so137838a91.0 for ; Wed, 28 Aug 2024 20:27:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1724902056; x=1725506856; darn=lists.infradead.org; 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=yd0jWR3VXJxuNlLXtqGwbme+uoTJ0s2xTOcRj568YVg=; b=Sr5lnRO1hvE847knOp9WzBGhzn3yf29GRK68Gapl62bbAaQdZpkZxD790PSt0xLoqU GEzA8lPy5EypdRI2aiC71Vqbcrw3KvVLIJEhUJuYQv3ICw7lioMh4OyIYueqX2XkmAVs aG2HB4QmDWV1O0ZkDZZnUEr8LyFKsdiaN6JULsyFDN10jOxz/ea0w3+h2EyDTrMr3V9E QeP96TN+fQHR5VMXtJwA/5XwlMNV0byU/GL42nV1tTX9pkHCAYLGAgKgD1FAfY3LY3gJ /Kke3/urkT+RO83geLSV+R3WenV2GOzNaK3HRO/afEsxpyi0OnuJVmGhArx/4qsxXqxj aefg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724902056; x=1725506856; 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=yd0jWR3VXJxuNlLXtqGwbme+uoTJ0s2xTOcRj568YVg=; b=O+vlYZ4lEcVt5vbXGnqoOx+rVoFlTfbD9j3nbSnOYfQbrF2lMmvu7MRd1VnD5H7Gxu rVwOitNRxRVQ5dF0zpgFBbBrnp4RBfzjrL1yCViT0B9zy2lYtpMUfQeaIOB6VmKS6dnc /FocfhfUfuvY2xZqKZzURdPazWcy2l0FzUeIt04OEp5cqiAUODSq9AX3LXFPwwa8XeEg MsMRf3WfFNRXVyn5aab6clt+ESsA+35uHkzjV+yec5fg8GaOYQCKs3YVro0PMJuqEesf x4Vtnq6000MFAHlaG/nL6lhxxhLTBtem/qwTsqLqtpe73RTx4i/vB0rK4lcZ0+SVv93b YdsQ== X-Forwarded-Encrypted: i=1; AJvYcCUiG4yTqfI/DchnJVTfBjehDsRtvs20/wchpdFioVRIpWzr1q528UrgEZzf8BR0ipMQIdsRsrJ3Qcw=@lists.infradead.org X-Gm-Message-State: AOJu0YyBEfDqVgBBDdzFwQoLGhubecfPoNHWnhVpG3AOVM4To0/+z52Z tUmzHrqPhOdHJdJ/oNmXQZYMnL0xgYlwAeF277tQVylO/0Eyelyy X-Google-Smtp-Source: AGHT+IG9vzMS34n3yQrqIZe1bl+5NJqDWVg/BsUpiS9mu0yGMFa3eQDSdfkFbu1or+R3IOgWVhw3KA== X-Received: by 2002:a17:90b:2652:b0:2ca:2c4b:476 with SMTP id 98e67ed59e1d1-2d85619d40bmr1665311a91.10.1724902056294; Wed, 28 Aug 2024 20:27:36 -0700 (PDT) Received: from twhmp6px (mxsmtp211.mxic.com.tw. [211.75.127.162]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2d8445d8afdsm2810877a91.2.2024.08.28.20.27.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Aug 2024 20:27:35 -0700 (PDT) Received: from hqs-appsw-a2o.mp600.macronix.com (linux-patcher [172.17.236.67]) by twhmp6px (Postfix) with ESMTPS id B3207806A6; Thu, 29 Aug 2024 11:36:11 +0800 (CST) From: Cheng Ming Lin To: miquel.raynal@bootlin.com, vigneshr@ti.com, linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Cc: richard@nod.at, alvinzhou@mxic.com.tw, leoyu@mxic.com.tw, Cheng Ming Lin Subject: [PATCH v4 1/2] mtd: spinand: Add support for the flag Date: Thu, 29 Aug 2024 11:25:16 +0800 Message-Id: <20240829032517.1517198-2-linchengming884@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240829032517.1517198-1-linchengming884@gmail.com> References: <20240829032517.1517198-1-linchengming884@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240828_202737_503978_0E754521 X-CRM114-Status: GOOD ( 11.28 ) X-Spam-Score: -1.9 (-) 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: From: Cheng Ming Lin Add two flags for inserting the Plane Select bit into the column address during the write_to_cache and the read_from_cache operation. Add the SPINAND_HAS_PP_PLANE_SELECT_BIT flag for serial NAND flash that require inserting the Plane Select bit into the column address during the write_to_cache operation. Content analysis details: (-1.9 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:102c 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.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 -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit [linchengming884(at)gmail.com] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [linchengming884(at)gmail.com] -0.0 T_SCC_BODY_TEXT_LINE No description available. 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 From: Cheng Ming Lin Add two flags for inserting the Plane Select bit into the column address during the write_to_cache and the read_from_cache operation. Add the SPINAND_HAS_PP_PLANE_SELECT_BIT flag for serial NAND flash that require inserting the Plane Select bit into the column address during the write_to_cache operation. Add the SPINAND_HAS_READ_PLANE_SELECT_BIT flag for serial NAND flash that require inserting the Plane Select bit into the column address during the read_from_cache operation. Signed-off-by: Cheng Ming Lin --- drivers/mtd/nand/spi/core.c | 6 ++++++ include/linux/mtd/spinand.h | 2 ++ 2 files changed, 8 insertions(+) diff --git a/drivers/mtd/nand/spi/core.c b/drivers/mtd/nand/spi/core.c index e0b6715e5dfe..49f2d66c3a9c 100644 --- a/drivers/mtd/nand/spi/core.c +++ b/drivers/mtd/nand/spi/core.c @@ -386,6 +386,9 @@ static int spinand_read_from_cache_op(struct spinand_device *spinand, else rdesc = spinand->dirmaps[req->pos.plane].rdesc_ecc; + if (spinand->flags & SPINAND_HAS_READ_PLANE_SELECT_BIT) + column |= req->pos.plane << fls(nanddev_page_size(nand)); + while (nbytes) { ret = spi_mem_dirmap_read(rdesc, column, nbytes, buf); if (ret < 0) @@ -460,6 +463,9 @@ static int spinand_write_to_cache_op(struct spinand_device *spinand, else wdesc = spinand->dirmaps[req->pos.plane].wdesc_ecc; + if (spinand->flags & SPINAND_HAS_PP_PLANE_SELECT_BIT) + column |= req->pos.plane << fls(nanddev_page_size(nand)); + while (nbytes) { ret = spi_mem_dirmap_write(wdesc, column, nbytes, buf); if (ret < 0) diff --git a/include/linux/mtd/spinand.h b/include/linux/mtd/spinand.h index 5c19ead60499..cec451e7c71c 100644 --- a/include/linux/mtd/spinand.h +++ b/include/linux/mtd/spinand.h @@ -312,6 +312,8 @@ struct spinand_ecc_info { #define SPINAND_HAS_QE_BIT BIT(0) #define SPINAND_HAS_CR_FEAT_BIT BIT(1) +#define SPINAND_HAS_PP_PLANE_SELECT_BIT BIT(2) +#define SPINAND_HAS_READ_PLANE_SELECT_BIT BIT(3) /** * struct spinand_ondie_ecc_conf - private SPI-NAND on-die ECC engine structure From patchwork Thu Aug 29 03:25:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cheng Ming Lin X-Patchwork-Id: 1978212 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=ydqlsSqO; 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=fwfmuRUr; 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 4WvRZQ28n9z1yhJ for ; Thu, 29 Aug 2024 13:28:30 +1000 (AEST) 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=2uOQYwWd6Pm38/tvLPFldQnd2hgD/jQ0dlrYNXTiwrs=; b=ydqlsSqOAqDrzl d0n+oybY9WeG9Zt+whFiwoBWNuGHp8WwN/lILxvP6f/bqIpXkHvL8MzXt9ApKtvNyc53ExBLirmBk KYGpiMw78lggoEmOeuCCeW0tZ47MhWAlHPamCCYMEZ4nklJSwxeBFmE5X7iK+ycOIrsZDAexYiTV4 sJ0SK7Q1ScUD+Dgy9dK0CycAOhtdNkRgWYUjy642uI2hSI3SkOZ0TRmYYPocerMJRtMZuIriCPfKM OyoMV+eht42Q+7cDfoX9dqYZ6cXVHLG+3CdpW0FlbcZlSlz3F0PkTN4RqXR5h76KVPHnYWD0Ue4w6 sltAeHQvc7sQM1Q4Fz/Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sjVpT-00000000M5i-00om; Thu, 29 Aug 2024 03:28:11 +0000 Received: from mail-oo1-xc2c.google.com ([2607:f8b0:4864:20::c2c]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sjVov-00000000LlH-3ADZ for linux-mtd@lists.infradead.org; Thu, 29 Aug 2024 03:27:39 +0000 Received: by mail-oo1-xc2c.google.com with SMTP id 006d021491bc7-5da6865312eso113461eaf.3 for ; Wed, 28 Aug 2024 20:27:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1724902057; x=1725506857; darn=lists.infradead.org; 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=vhmAom+LVcmv0Mivl3IQDZRfWyPiO2Vvp66v1pNhYJY=; b=fwfmuRUr6ajSUa6V0794lRLpc6GAz1OL1h4hHnoX5FxtcwuM4WhLM9IVfhcSDPmPLZ i2+++b21Xz5MHO3slQ38TCwhbCtnDKIDq2ZcK4DjHbVPUcec+0lPAXEZyHTQkj43t0yT jz+EPkQJKD2OddP6u5qRd0o6ZSPPI9iXPC78FKKaeZoHd07GjI3esljegW3DBPGdaQVf eyu+qq62kgr3QMCxniVbsc5wUPbXhasGeTubkexEWBaPf11SdeZv/2iYnpc6pmhr8EW4 N2R54rmROVNBnTB96XozQDMiINTOg4g6knH3tmgPLNimEq7VMJlewQ6mfjrKDBHdwKj4 rRTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724902057; x=1725506857; 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=vhmAom+LVcmv0Mivl3IQDZRfWyPiO2Vvp66v1pNhYJY=; b=cs/QfekTUL2epAVCReFUnSwJclcqQ1duFnrvruNfAs7Z1bT87FMkDrJyKnDoAUsoAU 6mZb+OWQ/3oWtJggu0vahc6wbB2jzibY7puaNOvPVCCuu0aiTpjs0M1Y2dXVPkl6hZcd lFHu3XvAKHbQ8TbS0PHXYyFd8nOaKMcQVgblxqI3e5aaL6Wm0RNguYH7r3M2hlmOwzap mTWjA4CxNOVvDmZlFxkfl9M0srKRvNZqzWysdNTfrzh8zIx0TekvIL/IjpB45PJKRqhG ftFvXdnbM0f/yCAIVii8VYzT/M5oF/AhV1/3ua3cOT9bxEp0z6mcEjozIzJdslX5eH9Y VqbQ== X-Forwarded-Encrypted: i=1; AJvYcCX4h4CLD8xd1+Hv2vkAB2pnwBvRc/W7bBGm77sLEFLHNi8rEintXse4FzHzOWwWwbAUNniW9OMh3W8=@lists.infradead.org X-Gm-Message-State: AOJu0YxpFdA79aIaCyExHYyu+qZmjZ5rOIcWdqQBqN51rzt2ElXo3luM GYll4yad5aP904EuR5uZuaNQuVdslLJ1hwxDpVjEH+gt3rdkWnut X-Google-Smtp-Source: AGHT+IHIaBPww4NUweWCTqWg13olD2CoFRyn8srMULQxL28/S7iOsYX8yyzacHcoPFbRY9F8s4phJw== X-Received: by 2002:a05:6870:f153:b0:229:f022:ef83 with SMTP id 586e51a60fabf-2779035fabdmr1840332fac.43.1724902056599; Wed, 28 Aug 2024 20:27:36 -0700 (PDT) Received: from twhmp6px (mxsmtp211.mxic.com.tw. [211.75.127.162]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-715e569e34asm198107b3a.111.2024.08.28.20.27.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Aug 2024 20:27:36 -0700 (PDT) Received: from hqs-appsw-a2o.mp600.macronix.com (linux-patcher [172.17.236.67]) by twhmp6px (Postfix) with ESMTPS id 4B9E78070F; Thu, 29 Aug 2024 11:36:12 +0800 (CST) From: Cheng Ming Lin To: miquel.raynal@bootlin.com, vigneshr@ti.com, linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Cc: richard@nod.at, alvinzhou@mxic.com.tw, leoyu@mxic.com.tw, Cheng Ming Lin Subject: [PATCH v4 2/2] mtd: spinand: macronix: Use the flag in Macronix driver Date: Thu, 29 Aug 2024 11:25:17 +0800 Message-Id: <20240829032517.1517198-3-linchengming884@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240829032517.1517198-1-linchengming884@gmail.com> References: <20240829032517.1517198-1-linchengming884@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240828_202737_828240_52E46E53 X-CRM114-Status: UNSURE ( 9.45 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -1.9 (-) 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: From: Cheng Ming Lin Macronix serial NAND flash with a two-plane structure requires insertion of the Plane Select bit into the column address during the write_to_cache operation. Additionally, for MX35{U,F}2G14AC and MX35LF2GE4AB, insertion of the Plane Select bit into the column address is required during the read_from_cache operation. Content analysis details: (-1.9 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:c2c 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.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 -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit [linchengming884(at)gmail.com] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [linchengming884(at)gmail.com] -0.0 T_SCC_BODY_TEXT_LINE No description available. 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 From: Cheng Ming Lin Macronix serial NAND flash with a two-plane structure requires insertion of the Plane Select bit into the column address during the write_to_cache operation. Additionally, for MX35{U,F}2G14AC and MX35LF2GE4AB, insertion of the Plane Select bit into the column address is required during the read_from_cache operation. Signed-off-by: Cheng Ming Lin --- drivers/mtd/nand/spi/macronix.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/drivers/mtd/nand/spi/macronix.c b/drivers/mtd/nand/spi/macronix.c index 3f9e9c572854..f17cd4a6f4d0 100644 --- a/drivers/mtd/nand/spi/macronix.c +++ b/drivers/mtd/nand/spi/macronix.c @@ -118,7 +118,8 @@ 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_PP_PLANE_SELECT_BIT | + SPINAND_HAS_READ_PLANE_SELECT_BIT, SPINAND_ECCINFO(&mx35lfxge4ab_ooblayout, NULL)), SPINAND_INFO("MX35LF2GE4AD", SPINAND_ID(SPINAND_READID_METHOD_OPCODE_DUMMY, 0x26, 0x03), @@ -156,7 +157,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_PP_PLANE_SELECT_BIT, SPINAND_ECCINFO(&mx35lfxge4ab_ooblayout, NULL)), SPINAND_INFO("MX35LF2G24AD-Z4I8", SPINAND_ID(SPINAND_READID_METHOD_OPCODE_DUMMY, 0x64, 0x03), @@ -174,7 +175,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_PP_PLANE_SELECT_BIT, SPINAND_ECCINFO(&mx35lfxge4ab_ooblayout, NULL)), SPINAND_INFO("MX35LF4G24AD-Z4I8", SPINAND_ID(SPINAND_READID_METHOD_OPCODE_DUMMY, 0x75, 0x03), @@ -213,7 +214,8 @@ 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_PP_PLANE_SELECT_BIT | + SPINAND_HAS_READ_PLANE_SELECT_BIT, SPINAND_ECCINFO(&mx35lfxge4ab_ooblayout, mx35lf1ge4ab_ecc_get_status)), SPINAND_INFO("MX35UF4G24AD", @@ -223,7 +225,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_PP_PLANE_SELECT_BIT, SPINAND_ECCINFO(&mx35lfxge4ab_ooblayout, mx35lf1ge4ab_ecc_get_status)), SPINAND_INFO("MX35UF4G24AD-Z4I8", @@ -253,7 +255,8 @@ 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_PP_PLANE_SELECT_BIT | + SPINAND_HAS_READ_PLANE_SELECT_BIT, SPINAND_ECCINFO(&mx35lfxge4ab_ooblayout, mx35lf1ge4ab_ecc_get_status)), SPINAND_INFO("MX35UF2G24AD", @@ -263,7 +266,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_PP_PLANE_SELECT_BIT, SPINAND_ECCINFO(&mx35lfxge4ab_ooblayout, mx35lf1ge4ab_ecc_get_status)), SPINAND_INFO("MX35UF2G24AD-Z4I8",