Received: by 10.213.65.68 with SMTP id h4csp899962imn; Tue, 27 Mar 2018 10:50:08 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/1S7D3GOQYYNokEspj3HlOgsMEAM1fycDZxuAD0cskjuzibaH4FRYd6Epz1lVhemMILhtF X-Received: by 2002:a17:902:146:: with SMTP id 64-v6mr299601plb.30.1522173007955; Tue, 27 Mar 2018 10:50:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522173007; cv=none; d=google.com; s=arc-20160816; b=VByWIasQj74FnBFtCxAJoLgcP3PlPMJCd2ISetMXlWHNf4pKUjC+6DR60OlxFaNVF5 fNJ+V+smyzDuQLHLHMdMBw9l9ABwpqZkn2qSfuMjBVpYtw/Zkf6OEfMMPFydT+4cXI+y +or+iQwrqPPP7/1Rlk2Uy0h3a9qqQviKPczEeiiqcB7WAnVtqmbQoveOwLmySMyfS8GS UqW+0QMuV0miZLow22zj6F+jwk8Q9FMfuv1DqAeL7Fxg4dO9U3hRQZZMf/hdQLtc5lW2 SrCnKRcjrKSWy2YSj6N4hAe5q0XiWRXABWQRTds77hZbYo0I2YHBdlnM/XV66d8s1RRg b98w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=2V7QZ5XPKvRbwo4Eko4VuwgZ6/iqhlLXMt8ZRqisprU=; b=I4zy75Opn39kg4mRL3uCQjo7cqcaL73PQhvpOuNt1AyfzOihU5uS8Bo/jgPOs8N8m/ vQKrLeLp8oU+V6tOLedcidKwpuOt1/hgo0huGt9OT8Jgd253XDyAt6uoA0hudJY3CYN4 FIctmcAp18BkfJL9Ker3ExUnOIK+87IINCnSUNCzIvGSrD9w5Nhc9X3Q/g0nK8hExH3A zrU67AipeodY4z+NXSRvmR9x8kAz15hvHeoUmc14gz+ieXfuJQY8jKyOGpf60FCqJ7aM l44X+OPtfTEQjOUZ5W4kLp3uT8Cq/te1pF8MnvQLhPkUVHQEWDN9wmXX1QJ0MvZKSEBW msqg== ARC-Authentication-Results: i=1; mx.google.com; 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 t10-v6si1643284plh.231.2018.03.27.10.49.53; Tue, 27 Mar 2018 10:50:07 -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; 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 S1753416AbeC0RrI (ORCPT + 99 others); Tue, 27 Mar 2018 13:47:08 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:43668 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752225AbeC0Qc7 (ORCPT ); Tue, 27 Mar 2018 12:32:59 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id C47E41152; Tue, 27 Mar 2018 16:32:58 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jagdish Gediya , Prabhakar Kushwaha , Boris Brezillon Subject: [PATCH 4.9 41/67] mtd: nand: fsl_ifc: Read ECCSTAT0 and ECCSTAT1 registers for IFC 2.0 Date: Tue, 27 Mar 2018 18:27:33 +0200 Message-Id: <20180327162729.280789939@linuxfoundation.org> X-Mailer: git-send-email 2.16.3 In-Reply-To: <20180327162726.702411083@linuxfoundation.org> References: <20180327162726.702411083@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.9-stable review patch. If anyone has any objections, please let me know. ------------------ From: Jagdish Gediya commit 6b00c35138b404be98b85f4a703be594cbed501c upstream. Due to missing information in Hardware manual, current implementation doesn't read ECCSTAT0 and ECCSTAT1 registers for IFC 2.0. Add support to read ECCSTAT0 and ECCSTAT1 registers during ecccheck for IFC 2.0. Fixes: 656441478ed5 ("mtd: nand: ifc: Fix location of eccstat registers for IFC V1.0") Cc: stable@vger.kernel.org # v3.18+ Signed-off-by: Jagdish Gediya Reviewed-by: Prabhakar Kushwaha Signed-off-by: Boris Brezillon Signed-off-by: Greg Kroah-Hartman --- drivers/mtd/nand/fsl_ifc_nand.c | 6 +----- include/linux/fsl_ifc.h | 6 +----- 2 files changed, 2 insertions(+), 10 deletions(-) --- a/drivers/mtd/nand/fsl_ifc_nand.c +++ b/drivers/mtd/nand/fsl_ifc_nand.c @@ -255,11 +255,7 @@ static void fsl_ifc_run_command(struct m int sector_end = sector_start + chip->ecc.steps - 1; __be32 *eccstat_regs; - if (ctrl->version >= FSL_IFC_VERSION_2_0_0) - eccstat_regs = ifc->ifc_nand.v2_nand_eccstat; - else - eccstat_regs = ifc->ifc_nand.v1_nand_eccstat; - + eccstat_regs = ifc->ifc_nand.nand_eccstat; eccstat = ifc_in32(&eccstat_regs[sector_start / 4]); for (i = sector_start; i <= sector_end; i++) { --- a/include/linux/fsl_ifc.h +++ b/include/linux/fsl_ifc.h @@ -734,11 +734,7 @@ struct fsl_ifc_nand { u32 res19[0x10]; __be32 nand_fsr; u32 res20; - /* The V1 nand_eccstat is actually 4 words that overlaps the - * V2 nand_eccstat. - */ - __be32 v1_nand_eccstat[2]; - __be32 v2_nand_eccstat[6]; + __be32 nand_eccstat[8]; u32 res21[0x1c]; __be32 nanndcr; u32 res22[0x2];