Received: by 10.213.65.68 with SMTP id h4csp688962imn; Wed, 4 Apr 2018 05:44:10 -0700 (PDT) X-Google-Smtp-Source: AIpwx48+GzNSNgGwO6HeqsrdLUvGjfQxRwwwZ3+ytaF/oK3SpCsDvbrFr/3sAUYpi1xT4DrQPTjv X-Received: by 2002:a17:902:8d98:: with SMTP id v24-v6mr18441596plo.21.1522845850258; Wed, 04 Apr 2018 05:44:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522845850; cv=none; d=google.com; s=arc-20160816; b=ObZGuE3gi31Wdut8JiiljWXYodRBcjb28d1saBwTTag8/mhQd3FRLVvC/7PJ0I/g2M incVG7bH6y6DjVyVaI+p0dK5wNqztzBO9nIrHebnKRo1ptTad1T5k6q1XG+BpRpkPwMr 5gqnt7g5WwXFJNjCU7GwiLorMZoyqxSBC1ov1ZnOXZIX7B/rQA6TSQD+/CdBuBJq+oow g4OAdaepR+cc9BKjOFz3/4y3xEn2IHoagEBVrluR2SGQWfKe3YNZ9HKbkx69FgJxV61I uwtmvxSAPQLQwpeqhDgvN42nPQbnsXoY0gs7IZDcX+dOoA5slR2i04BNb6/TeSFlOpIb X6ww== 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=QcZmVvq0QRw1C9yw+q9UEF6wF6ayn5U0jYPbo0Ld0Mk=; b=06xUHSXTBR1DdvU2QMRcxUiJWebb31jEynKQ/sxKNyyNwd05fqZvXFu9MwG5ZCQWb+ 0eW+7NAdFM2CoDdcmXYzhGtlX9j5/cbF7hdPrWZ5eiTT2b6z6xVAXgviiKrhr6fqXbDA wkGAwYs6m9/0YkBxaw5TqeSaUu0va2D/w9s5/Cxebsw/RjpKRFrBh22tZyGwXow6q0C9 Ngb0n94hjGein4H5lPGnw4cqINjMMqaWNzWckbYGH0z5Tq871gtmhJNyY1BWWaxqMpKc wRUOmwhUQAw/jiLB0tsozx+YvK4ZDDYfZem6aiJQrOQ63cRH49vnJhya6atjPb+X82vR C+WA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=ZbG9DkpT; dkim=pass header.i=@codeaurora.org header.s=default header.b=gSLFKfpd; 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 i190si3644695pgc.42.2018.04.04.05.43.55; Wed, 04 Apr 2018 05:44:10 -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=ZbG9DkpT; dkim=pass header.i=@codeaurora.org header.s=default header.b=gSLFKfpd; 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 S1751249AbeDDMmn (ORCPT + 99 others); Wed, 4 Apr 2018 08:42:43 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:40158 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750915AbeDDMml (ORCPT ); Wed, 4 Apr 2018 08:42:41 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 27F6D60C66; Wed, 4 Apr 2018 12:42:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1522845761; bh=7WinNQwCML6Irt4BheOsTzk6zVsdcBCi13OP+TyvlBk=; h=From:To:Cc:Subject:Date:From; b=ZbG9DkpTc21toxENFs1/Aa677BKszjN5/V2R25v4sbDaycQwfyAhein7HjRYSgmy8 CLSj1ELciTN/192b8UdaH6Sp+ckuxDC4HCOJrDVT9CRr1iuqDEE1uuLZJ122Eo0iLW rSBEM4ad3Kr4izJZwSlXgDgZx8sBoJTjZ6hnUtUU= 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 ACF516076C; Wed, 4 Apr 2018 12:42:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1522845760; bh=7WinNQwCML6Irt4BheOsTzk6zVsdcBCi13OP+TyvlBk=; h=From:To:Cc:Subject:Date:From; b=gSLFKfpdF77D4Eu3+WiqJUrufqCQZr80B1fgRc58e4pnVYxuHGP9GT3DW5AVRhZie ToM9dAKWUJqsi4G/mfjbiqQ5qZqk5nRFK2Scz/P+1LdKahnHjR/NdHFignyNAnsfGr xt/pdt7T5K9XMIM+ONxGmqCYpD0bEo0rITy4OjPc= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org ACF516076C 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 , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org, Andy Gross , Archit Taneja , Abhishek Sahu Subject: [PATCH 0/9] Update for QCOM NAND driver Date: Wed, 4 Apr 2018 18:12:16 +0530 Message-Id: <1522845745-6624-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 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 (9): mtd: nand: qcom: use the ecc strength from device parameter mtd: nand: qcom: wait for desc completion in all BAM channels mtd: nand: qcom: erased page detection for uncorrectable errors only mtd: nand: qcom: fix null pointer access for erased buffer detection mtd: nand: qcom: parse read errors for read oob also mtd: nand: qcom: support for checking read errors for last codeword mtd: nand: qcom: check for operation errors in case of raw read mtd: nand: qcom: helper function for raw read mtd: nand: qcom: erased page bitflips detection drivers/mtd/nand/qcom_nandc.c | 468 ++++++++++++++++++++++++++++++------------ 1 file changed, 333 insertions(+), 135 deletions(-) -- QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation