Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp3411967imm; Fri, 25 May 2018 05:23:35 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqNtWMYQ61FPeA17tmr1JJCcV5/42WIxuChid9xgu2LgQIqBc7PJ8mCE9cJWRJnX71ceVHl X-Received: by 2002:a62:7f91:: with SMTP id a139-v6mr2350395pfd.25.1527251015004; Fri, 25 May 2018 05:23:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527251014; cv=none; d=google.com; s=arc-20160816; b=VsSlcaeEkKLI/+BFaID86jieboPsG/AP1nXj/BwMPWki1l/53IHY2Qw7+/29IBcBU7 uuCNJGAygUAQbC3PXE/vKeI/mfb9a3QD2lxnTK0gwMC8tn+Kq9FEE3RSrMqAtRJYDxBu lhVZA4zFjZszbXFbd7WtpOKtH/0f/hMS114Fq33JSjJkJ3a+N/zru8/OZBOAVweNVFiH QXpyoDnsmsAZGiGOqiPyJNQk0H/gOpBOaEqQNUzAMa/VA8N0DT5tjnsgH3yh7R05qDAu UtLhWrYCHAcAmc7QtzjhNQdBGCQJq0CNtdB+tgcj7A2ADXgtaB4HM2d4BcDVPyfqHB07 62rg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dmarc-filter:dkim-signature :dkim-signature:arc-authentication-results; bh=UXEVebcPHDXnEPWLFcxeLxFptJiIXZKA+EQ6EU9Sqgc=; b=iZVLC5JZPHaYcpRoEn1DSz1Cvs3gEje/Qir/OKHhWVHDajYLi+Dy2dgOOndwz0pfLI 8YnbyBxgKruPm3446wMRA20lO4TVAMqYDTWCd3/BWBeqiz9mo2r0ki2KQQ0IP3HRuXrj wxYkpZxtNv/HXAiJ3/h5+8Wfn8le80a8qaVnJhnWTMJtxcdypHxqGsd7GTfSqWA1cXop i6kSFeyprR1bxSDS545/YnWuWOhSZ0sU3i+wvL8p32DPikHSLkcSb+mHABBVtwBXwgJA 9IVbe6Rz2SQgMBMjV4MFm6X6Vz6yF2ORRmjOibdog/VpukMziWNuSSqsGvwr15+fYqOe CG3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=Y/gBWGq/; dkim=pass header.i=@codeaurora.org header.s=default header.b=Y/gBWGq/; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b10-v6si18578858pgs.456.2018.05.25.05.23.20; Fri, 25 May 2018 05:23:34 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=Y/gBWGq/; dkim=pass header.i=@codeaurora.org header.s=default header.b=Y/gBWGq/; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966735AbeEYMV5 (ORCPT + 99 others); Fri, 25 May 2018 08:21:57 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:46648 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966489AbeEYMVz (ORCPT ); Fri, 25 May 2018 08:21:55 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id ACFA860881; Fri, 25 May 2018 12:21:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1527250914; bh=wPYQRXhuXfM7u9cOabQlKxp0b9eHIe3dLdxu2txN55I=; h=From:To:Cc:Subject:Date:From; b=Y/gBWGq/elmT3grw7AqWCdu8pFbG1nqTgS3Pfmg/Ih1IFSiDpQB8rFYvO+OysiOlE tIGwtnomeNRliypdUaRyfRo7U/vpLLKFUpf5o+QaOANajU8/IbyGRYDVjPaMK83r6r gegeMxHuSbX0L+z6RFKs1/F90FVE9F7Ev4bU3N84= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from absahu-linux.qualcomm.com (blr-c-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: absahu@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 9584960117; Fri, 25 May 2018 12:21:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1527250914; bh=wPYQRXhuXfM7u9cOabQlKxp0b9eHIe3dLdxu2txN55I=; h=From:To:Cc:Subject:Date:From; b=Y/gBWGq/elmT3grw7AqWCdu8pFbG1nqTgS3Pfmg/Ih1IFSiDpQB8rFYvO+OysiOlE tIGwtnomeNRliypdUaRyfRo7U/vpLLKFUpf5o+QaOANajU8/IbyGRYDVjPaMK83r6r gegeMxHuSbX0L+z6RFKs1/F90FVE9F7Ev4bU3N84= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 9584960117 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=absahu@codeaurora.org From: Abhishek Sahu To: Boris Brezillon Cc: David Woodhouse , Brian Norris , Marek Vasut , Richard Weinberger , Cyrille Pitchen , Miquel Raynal , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org, Andy Gross , Archit Taneja , Abhishek Sahu Subject: [PATCH v3 00/16] Update for QCOM NAND driver Date: Fri, 25 May 2018 17:51:28 +0530 Message-Id: <1527250904-21988-1-git-send-email-absahu@codeaurora.org> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * v3: 1. Addressed all review comments in v2. 2. Added patch for removing redundant nand-ecc-step-size DT property. 3. Renamed ECC configuration setup function with minor code changes. 4. Modified comments and commit message for few patches. * v2: 1. Addressed all review comments in v1. 1. Make the generic helper function for NAND ECC parameters setup and used this helper function for QCOM and Denali nand driver for ECC setup. 2. Modified commit message for some of the patches and added more comments. 3. Added new patch for fixing ‘return 0’ for raw read. 4. Removed the read last codeword part for nand oob write. 5. Reorganized bad block check function and removed the read_last_cw function completely. * v1: This patch series mainly deals with error handling and erased page bitflip detection for QCOM NAND driver. 1. The error handling was missing for some of the cases so fixed the same. 2. Add the support for taking ECC strength from ONFI parameter. The earlier QCOM boards were coming with 4-bit ECC chip but now the same boards are coming with 8-bit ECC chip since the earlier 4-bit parts are obsolete from some vendors. 3. We got few issues related with NAND erased page bitflips. The QCOM NAND controller can’t detect the bitflip in completely erased page so added the support to detect the same. It implemented the logic mentioned in patch [1] which didn’t go in mainline and later the generic functions were provided [2] to count the number of bitflips and make all 0xff. This patch series did some optimization logic to prevent the unnecessary full page raw read and data copy from QCOM NAND controller to DMA. 4. Following are the testing done for these patches in QCOM IPQ8074 HK01 (4-bit and 8-bit ECC chip) and IPQ806x AP148 boards. a. Run all mtd test and check if it passes b. Introduce custom bitflips in erased page and check if it returns no error/EUCLEAN/EBADMSG depending upon number of bitflips and position. c. Introduce failure condition for operational failure and check if it detects the same. [1]: https://patchwork.ozlabs.org/patch/328994/ [2]: https://patchwork.ozlabs.org/patch/509970/ Abhishek Sahu (16): mtd: rawnand: helper function for setting up ECC configuration mtd: rawnand: denali: use helper function for ecc setup dt-bindings: qcom_nandc: make nand-ecc-strength optional dt-bindings: qcom_nandc: remove nand-ecc-step-size mtd: rawnand: qcom: remove dt property nand-ecc-step-size mtd: rawnand: qcom: use the ecc strength from device parameter mtd: rawnand: qcom: wait for desc completion in all BAM channels mtd: rawnand: qcom: erased page detection for uncorrectable errors only mtd: rawnand: qcom: fix null pointer access for erased page detection mtd: rawnand: qcom: parse read errors for read oob also mtd: rawnand: qcom: modify write_oob to remove read codeword part mtd: rawnand: qcom: fix return value for raw page read mtd: rawnand: qcom: minor code reorganization for bad block check mtd: rawnand: qcom: check for operation errors in case of raw read mtd: rawnand: qcom: helper function for raw read mtd: rawnand: qcom: erased page bitflips detection .../devicetree/bindings/mtd/qcom_nandc.txt | 7 +- drivers/mtd/nand/raw/denali.c | 30 +- drivers/mtd/nand/raw/nand_base.c | 31 + drivers/mtd/nand/raw/qcom_nandc.c | 628 ++++++++++++++------- include/linux/mtd/rawnand.h | 3 + 5 files changed, 448 insertions(+), 251 deletions(-) -- QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation