Received: by 10.213.65.68 with SMTP id h4csp504414imn; Fri, 16 Mar 2018 09:45:58 -0700 (PDT) X-Google-Smtp-Source: AG47ELsh3zsrVQfRd8nGkHIay0FDLkjW+4RDE1ewtM0fWSoeyhaq5JMzQSM+ebdWkcMQW7L/PenB X-Received: by 10.99.128.67 with SMTP id j64mr1913487pgd.55.1521218758060; Fri, 16 Mar 2018 09:45:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521218758; cv=none; d=google.com; s=arc-20160816; b=p8+MGKpri6v23q6es8fmSSaOxCt1kqM8f66odLxOudeGYH/8uCTKyYp+rrqWi5Ctns X+KMKWtYMyyTY9AkCT8H5ih4foQdaHGdXkuCvcd9S0DZZyc+6pFcdPV+Z4RNhTXCQQdw VZBBlL5G+wXMkZe3qb3cdIw5FNcoDW00lX8Yk8i0cAyX6P6H5yEG6Iju5pQUwfHMlrZ6 30VdVAS1T08Ymt4uhaLvE4afgWwDlBBHNoyXTJT5U/k20ZBbKp6CbJsbUetH6GypgNqs UzdT3xt5fb5KgDJgCDZO8yIvuNBMfANZndpAWQYuHJQWXrbLtbW9VhBPbygQ8YtRnPEo bHTA== 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=N4Oab79iJZE3/zHkzBQovFq80SxfamTzNAcWLM0Cd+I=; b=Tr/w8ChSfaz/anAqX50jHuaByJUbXb3uj+yIcMiGT3db04EzNjDpbBi8LKS5ul50P2 TiNxNMWwIfYiU2ot7rircxyhpTFJNGqWlea2EJl/rL8tMCLku/n7jtl0CaITGzhTVAJh osSryUn6Ji2jXS0Yj5i5fa38QtmoBhpaVRztUydT2rMZcLt0rhJBjmNukwTrT4yelLp+ iSnieot88UTrwaHNf+encaqzcYgQ4XIQBvutm7T0AU2GsXY36SErfQ32XIhel+tAhHio OaXfihfpYUJc2wszUc/1GhbsJNdaTByV+DYXc4fdB9HmMlatyMwqbeJnozGcgm7dwFX0 ixgw== 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 r2si5116617pgp.704.2018.03.16.09.45.43; Fri, 16 Mar 2018 09:45:58 -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 S1753356AbeCPQnx (ORCPT + 99 others); Fri, 16 Mar 2018 12:43:53 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:40158 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934237AbeCPPgI (ORCPT ); Fri, 16 Mar 2018 11:36:08 -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 E56881065; Fri, 16 Mar 2018 15:36:07 +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.14 052/109] mtd: nand: ifc: update bufnum mask for ver >= 2.0.0 Date: Fri, 16 Mar 2018 16:23:21 +0100 Message-Id: <20180316152332.793870987@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180316152329.844663293@linuxfoundation.org> References: <20180316152329.844663293@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.14-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; }