From patchwork Sun Nov 8 11:37:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thirumalesha Narasimhappa X-Patchwork-Id: 1396291 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=merlin.20170209 header.b=3Ep+i7L2; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=CaoihXbx; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CTXFc6f9lz9sRK for ; Sun, 8 Nov 2020 22:38:44 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=8uARKN3iMyF9xM1kVE+T7YqiMEOv4hnTmNDD/Aowqm8=; b=3Ep+i7L2LMOKYwCvCCIT9uRx4N v1lWCJr4zNGOgsiWB1XnwHYWRA7gYWthw3Cqc+wUV/331SeM/Qho4uTwZAOB95Lw0EN2by/N+TRFS YUoNU7cPNbCaBBGHCGdDsSTWsGNlMnA5lJYCM6jpg+N3wDXotGVztGxHra75XSPpwQOvv9qSUwJXD AISDVXDwGMWNbgihTeRnVNSjUWDu0bQ3OOi0dSXt43HKue9ZfOewCf/A2kOzVZ2lZWRtfwcDm+dCI CHIP0R/Ro4r9z+lI8bwyC6ERgcBUNXNkmTxss7kyKKTDT4fM5OnMZ+QFAyyT321BRuvGXN9l9az5p FLDKNwUQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kbj13-0001E2-B2; Sun, 08 Nov 2020 11:37:49 +0000 Received: from mail-pg1-x543.google.com ([2607:f8b0:4864:20::543]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kbj10-0001Cy-Rl for linux-mtd@lists.infradead.org; Sun, 08 Nov 2020 11:37:47 +0000 Received: by mail-pg1-x543.google.com with SMTP id m26so1028605pgd.9 for ; Sun, 08 Nov 2020 03:37:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=WZtQivcQ+AZubSIg46b9m4DEOzL0fiKWbinL/KFoggA=; b=CaoihXbx23aeFZpxtNy7GTt3o+aBGBdyZlNtc35S0IPP0zW4umWFCe6d3/3HWqgRTx Nup857PQXsKuNwQ/WxQCEngwlATThEUyPZRiSNueccU2gnnrIBG9NlIwIJkZhAsJVTHY H4ShPEqR4II9BqZGn2d+2p9MPhv4t0URYbkWYqV+RisPhX/tuOB/iw7svZo+T8JheyQp mCGcJnh7bDSxYhAVQ+spkz2qSHb/zR5HVvWhi368ldiew1KIxzLsVJfn1PFXTysvMm2Y XNkwu5AhfAq37hwN7CAbOZqlYPDvFhEeo5Y3l538lQyQR3NTkHIOhIuPaTPBmKkBZlHY BToA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=WZtQivcQ+AZubSIg46b9m4DEOzL0fiKWbinL/KFoggA=; b=DCK8TacYNp37gn/Ume2+WS0IryMepNxm4oqQ26JNa0hOL1n07Wq4fOL9QJNxkrHTa4 c53ni8XO6EXiJ1eNcMx3az4qsdtZpxQHTBQfFJ2gxv1deZstuEhRsX3T/7AZ1EUzvF2G HF5uv5yrzd/Xg6b9fVvwJoCdCh3kP15bjrQN4hWSqZquI2eYQ79PKS0zmKx+p2OkvpI1 M698s8oktKoz5nFFGJBlbVztXERFN1YCgKLsIiRpnW6j7vVOX7gO4Q7WSGBlg3KYR2Yb 1Uao+ohj324dvqdCE7bmKxJ9Eb1AvXhU1OeKhEBykq6HopBk11TjhWm+HyNwrl23Ebl8 GM2A== X-Gm-Message-State: AOAM5332P5LRx/mrhbzlYJBS/PgJWjsKio66Ge3ZY6vfj5Ai2CnQWT1l 9ShvWnw/RlZhptzSjUAHzVE= X-Google-Smtp-Source: ABdhPJywGga5A++IlHOh+wzruJpPJXt/uQ8cIH1WYVoYxBgFTHkaCuSe8xncy4byXhIzP63Dq87VZQ== X-Received: by 2002:a05:6a00:2292:b029:156:8913:e424 with SMTP id f18-20020a056a002292b02901568913e424mr9626833pfe.56.1604835463114; Sun, 08 Nov 2020 03:37:43 -0800 (PST) Received: from IGL6397W.cw01.contiwan.com ([27.104.143.83]) by smtp.gmail.com with ESMTPSA id t85sm7230263pgb.29.2020.11.08.03.37.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 Nov 2020 03:37:42 -0800 (PST) From: Thirumalesha Narasimhappa To: Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Shivamurthy Shastri , Boris Brezillon , Chuanhong Guo , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v7 0/2] Add support for micron SPI NAND MT29F2G01AAAED Date: Sun, 8 Nov 2020 19:37:33 +0800 Message-Id: <20201108113735.2533-1-nthirumalesha7@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201108_063746_923868_F6B7BE2A X-CRM114-Status: UNSURE ( 9.75 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.1 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (0.1 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit [nthirumalesha7[at]gmail.com] 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 [nthirumalesha7[at]gmail.com] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:543 listed in] [list.dnswl.org] -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from 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_AU Message has a valid DKIM or DK signature from author's domain X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thirumalesha Narasimhappa Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Adding support for Micron SPI NAND MT29F2G01AAAED device and generalised the structure names as per the review comments v7: Reverted to the v4 except ECC structure related changes v6: Reverted the SPINAND_OP_VARIANTS() as they were in v4 for MT29F2G01AAAED device v5: As per the review comments, the changes were reverted to the v2, except the MT29F2G01AAAED device related (including the review comments) v4: Split patch into two parts, 1. Generalise the oob structure name & function names as show in v3 2. Add support for MT29F2G01AAAED device a. Add oob section check in micron_ooblayout_free function b. Rename mt29f2g01aaaed_* to generic name micron_4_* v3: As per the review comments, 1. Renamed read_cache_variants as quadio_read_cache_variants, write_cache_variants as x4_write_cache_variants/x1_write_cache_variants, update_cache_variants as x4_update_cache_variants/x1_update_cache_variants, read_cache_variants as x4_read_cache_variants 2. Renamed micron_8_ooblayout as micron_grouped_ooblayout & mt29f2g01aaaed_ooblayout as micron_interleaved_ooblayout 3. Generalized page size based oob section check in mt29f2g01aaaed_ooblayout_ecc function and separate case check for two bytes BBM reserved in mt29f2g01aaaed_ooblayout_free function 4. Removed mt29f2g01aaaed_ecc_get_status function & MICRON_STATUS_ECC_1TO4_BITFLIPS v2: Removed SPINAND_SELECT_TARGET as per the comments & fixed typo errors v1: Add support for Micron SPI Nand device MT29F2G01AAAED Thirumalesha Narasimhappa (2): mtd: spinand: micron: Generalize the structure names mtd: spinand: micron: Add support for MT29F2G01AAAED drivers/mtd/nand/spi/micron.c | 124 ++++++++++++++++++++++++++-------- 1 file changed, 94 insertions(+), 30 deletions(-)