From patchwork Wed Nov 5 11:00:58 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roger Quadros X-Patchwork-Id: 40184 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f198.google.com (mail-wi0-f198.google.com [209.85.212.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 1AEAF2404A for ; Wed, 5 Nov 2014 11:01:50 +0000 (UTC) Received: by mail-wi0-f198.google.com with SMTP id n3sf721703wiv.5 for ; Wed, 05 Nov 2014 03:01:49 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:cc:subject:date:message-id :mime-version:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe:content-type; bh=MhRgToN2Rp38A5PJiOPUip1atGVfJj4wyE1n+1K7TAw=; b=UAPK06qh116zCDG7qdKm+3YggxTwJbxvBVBDPPy+IuPytP0Pwa5P1MmfUTHvNOdPPJ HOg9X4p1Eovj9IKzyVLCW7oDRF4YQnEad9fnPzaUKha091M/LTSJKK+58sEzcRG92moM wANT+8InSOrL1usg/yW6RfumJXh5mdHV6lN6CbAOiYISB+wenW53T90oDmMRjneIK7lA 4mAbuS0FHgQg95NedM7i/iNjYSMI5So+47+CXCIuSlz2rz0r0G/LbmUCkUEmPOMmkrfs 8SqIyWjbs+8mgMa2eib8fdmPHYqFRmXetZXX3fHVkwmgqb/G6bPmf8a4frsAoVD617D+ ZvmA== X-Gm-Message-State: ALoCoQn0miZUh3pmhgJQVjvghuLgujdiYc424gFiPTWOeJ4omNMrbSHEpZvABUVvY8LPzuzzqwXz X-Received: by 10.180.90.234 with SMTP id bz10mr2788475wib.0.1415185309323; Wed, 05 Nov 2014 03:01:49 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.27.41 with SMTP id q9ls835273lag.67.gmail; Wed, 05 Nov 2014 03:01:49 -0800 (PST) X-Received: by 10.152.21.167 with SMTP id w7mr28665624lae.70.1415185309125; Wed, 05 Nov 2014 03:01:49 -0800 (PST) Received: from mail-la0-f49.google.com (mail-la0-f49.google.com. [209.85.215.49]) by mx.google.com with ESMTPS id p8si5515456lag.62.2014.11.05.03.01.49 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 05 Nov 2014 03:01:49 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.49 as permitted sender) client-ip=209.85.215.49; Received: by mail-la0-f49.google.com with SMTP id ge10so426299lab.22 for ; Wed, 05 Nov 2014 03:01:49 -0800 (PST) X-Received: by 10.152.6.228 with SMTP id e4mr66809110laa.71.1415185308772; Wed, 05 Nov 2014 03:01:48 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.184.201 with SMTP id ew9csp264018lbc; Wed, 5 Nov 2014 03:01:47 -0800 (PST) X-Received: by 10.68.65.71 with SMTP id v7mr16769076pbs.125.1415185306944; Wed, 05 Nov 2014 03:01:46 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id nj10si2536031pdb.212.2014.11.05.03.01.46 for ; Wed, 05 Nov 2014 03:01:46 -0800 (PST) Received-SPF: none (google.com: stable-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753644AbaKELBp (ORCPT + 1 other); Wed, 5 Nov 2014 06:01:45 -0500 Received: from arroyo.ext.ti.com ([192.94.94.40]:36418 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751198AbaKELBo (ORCPT ); Wed, 5 Nov 2014 06:01:44 -0500 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id sA5B14F8003851; Wed, 5 Nov 2014 05:01:04 -0600 Received: from DFLE72.ent.ti.com (dfle72.ent.ti.com [128.247.5.109]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id sA5B14Tx000610; Wed, 5 Nov 2014 05:01:04 -0600 Received: from dlep32.itg.ti.com (157.170.170.100) by DFLE72.ent.ti.com (128.247.5.109) with Microsoft SMTP Server id 14.3.174.1; Wed, 5 Nov 2014 05:01:03 -0600 Received: from localhost.localdomain (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id sA5B11um019211; Wed, 5 Nov 2014 05:01:01 -0600 From: Roger Quadros To: , CC: , , , , , Roger Quadros , Subject: [PATCH] mtd: nand: omap: Fix NAND enumeration on 3430 LDP Date: Wed, 5 Nov 2014 13:00:58 +0200 Message-ID: <1415185258-11747-1-git-send-email-rogerq@ti.com> X-Mailer: git-send-email 1.8.3.2 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: stable@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: rogerq@ti.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.49 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , In commit 7d5929c1f343 ("mtd: nand: omap: Revert to using software ECC by default"), we switched back to using 1-bit SW ECC scheme by default. However commit b491da7233d5 ("mtd: nand: omap: clean-up ecc layout for BCH ecc schemes") didn't take into account the 1-bit SW scheme (i.e. OMAP_ECC_HAM1_CODE_SW) when checking for small page devices because it was already got rid of one commit earlier. Consider OMAP_ECC_HAM1_CODE_SW while deciding if we can proceed with small page devices or not. Fixes: 7d5929c1f34 ("mtd: nand: omap: Revert to using software ECC by default") Cc: [3.17+] Reported-by: Tony Lindgren Signed-off-by: Roger Quadros --- drivers/mtd/nand/omap2.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c index 3b357e9..758e594 100644 --- a/drivers/mtd/nand/omap2.c +++ b/drivers/mtd/nand/omap2.c @@ -1742,7 +1742,8 @@ static int omap_nand_probe(struct platform_device *pdev) } /* check for small page devices */ - if ((mtd->oobsize < 64) && (pdata->ecc_opt != OMAP_ECC_HAM1_CODE_HW)) { + if ((mtd->oobsize < 64) && (pdata->ecc_opt != OMAP_ECC_HAM1_CODE_HW) && + (pdata->ecc_opt != OMAP_ECC_HAM1_CODE_SW)) { dev_err(&info->pdev->dev, "small page devices are not supported\n"); err = -EINVAL; goto return_error;