Received: by 10.213.65.68 with SMTP id h4csp483213imn; Fri, 16 Mar 2018 09:06:46 -0700 (PDT) X-Google-Smtp-Source: AG47ELvZfgVe33kVWtcecHSuNK9XETDm4JzUFpg9uHkFqUq+zZigCLhOOnlfZQu8ncVDGNYBicJk X-Received: by 10.99.152.10 with SMTP id q10mr1897155pgd.62.1521216406401; Fri, 16 Mar 2018 09:06:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521216406; cv=none; d=google.com; s=arc-20160816; b=rjqj5i0eKPOue1gJayx30NUWuOFIl5xOPni5qKuUIOKc5JToUO23SQDs0W/mwzzk3g cv7YP05+iZjKHpVe/oYsf28usaZy7d59kjD51MiQAE8FsfC6lb6oLHqMBWF3MfzaqNmf EXy8LS2k5NUKihsY99pKpRIc+cVKhoyPLmHQNWh3SY6LpeLk/rAB8IJZciCNykaghtzk eaLfORGng0DMezpJhgnAMAbCoxuLmyXTgapv8LmhQTg4Aer0ShqmHcYu27/PFrOgLVh6 wPmf9U5ZqmrEMRAD4MOiBOUYyKEVKnFVB06tI7WYpKxUr4U9sMJLT5FOch7z9qnpGQYY /3Pw== 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=MfQn6kftnZKYaTxHO0qKaLGrj+/l0j5IYN5UEzqoZ6c=; b=lgzfwhn73SF60hTLvfAd179jNRXkmrMuUMJviKP8aFgAjN9HBoJALXttJhuAwna1s+ FVxKWa5N9FS3TBErlQfzjRwyotOuF7EnxaFlJcip0Coz08rCEUu99jvmwSo3S+sut7pu XB/lNxvMOEDbGDRITaj9N7SXFWA+H45PHEN+Dd+Sk2DFCuaRqBL6DmTWCCESvkYeAb1E /7xBAmew9Ur43iGjOrYGiU11UCIkrzzXKCeh7fm3o+n0q258UaX+K6AMpz9Az4dkzpSC aI1UUHuAlZ1akbp1Uk3gNUT21k96SlnHdvmDXC1Cfqdo/Mh5vMcZTjGjt8OBJ2QDn6oj lNfQ== 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 b34-v6si1029257plc.53.2018.03.16.09.06.30; Fri, 16 Mar 2018 09:06:46 -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 S934487AbeCPQFP (ORCPT + 99 others); Fri, 16 Mar 2018 12:05:15 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:44178 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754810AbeCPPl6 (ORCPT ); Fri, 16 Mar 2018 11:41:58 -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 276B1E98; Fri, 16 Mar 2018 15:41:56 +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 , Sasha Levin Subject: [PATCH 4.15 063/128] mtd: nand: ifc: update bufnum mask for ver >= 2.0.0 Date: Fri, 16 Mar 2018 16:23:24 +0100 Message-Id: <20180316152339.922296731@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180316152336.199007505@linuxfoundation.org> References: <20180316152336.199007505@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.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Jagdish Gediya [ Upstream commit bccb06c353af3764ca86d9da47652458e6c2eb41 ] Bufnum mask is used to calculate page position in the internal SRAM. As IFC version 2.0.0 has 16KB of internal SRAM as compared to older versions which had 8KB. Hence bufnum mask needs to be updated. Signed-off-by: Jagdish Gediya Signed-off-by: Prabhakar Kushwaha Signed-off-by: Boris Brezillon Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/mtd/nand/fsl_ifc_nand.c | 7 +++++++ 1 file changed, 7 insertions(+) --- a/drivers/mtd/nand/fsl_ifc_nand.c +++ b/drivers/mtd/nand/fsl_ifc_nand.c @@ -916,6 +916,13 @@ static int fsl_ifc_chip_init(struct fsl_ if (ctrl->version >= FSL_IFC_VERSION_1_1_0) fsl_ifc_sram_init(priv); + /* + * As IFC version 2.0.0 has 16KB of internal SRAM as compared to older + * versions which had 8KB. Hence bufnum mask needs to be updated. + */ + if (ctrl->version >= FSL_IFC_VERSION_2_0_0) + priv->bufnum_mask = (priv->bufnum_mask * 2) + 1; + return 0; }