Received: by 10.213.65.68 with SMTP id h4csp1716456imn; Mon, 19 Mar 2018 11:17:15 -0700 (PDT) X-Google-Smtp-Source: AG47ELskphzGcb9tfnXGv9Tcd14n1Hhhj++Qy7lJON/q5L6GW2UHkna7m5HUS3YXMWAj2Cb3hoeq X-Received: by 10.101.82.1 with SMTP id o1mr9913569pgp.37.1521483435837; Mon, 19 Mar 2018 11:17:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521483435; cv=none; d=google.com; s=arc-20160816; b=kjC4JxJlzTJrUCwVOUwHlphtDE+D1mT4G/uCeRLMz2Wg6SZeo7uAXW05uWGIcRvhjF PU+IMmrhMdmO6VNP4WTFO895MjD1CibPdmkJxAzeSGc4horiRF8KHoYMkEqReZjCzaGa Va9Mwb1mmhhYFrRigd4tkjOiNY9oy38IuS1eYakK4HzGmfw/SEpSJWTSwa5ptzf8R78e FGzpRJxjAaMaOeze6AyLkVeKf3/OjWYPSh1uTyv/Q8/rApad+NyulOXQWN5yFKWa1e2W qo/fB27nIwJ170UqWq92MZpXZz+10aM+fs/71Xsrj0FygCWQVKA+vXooJVtG11YJ09E2 3bpw== 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=1RO4UiZ8opG76DaoePfZoeS9nYrKE1zOPT82lXPjcWo=; b=IYu8PNYLsAI4IcqtOYev5dVZhrXh7uZ0KVRS/AiVFtrXjjm1Q4kSnUSQJCzBsYMTi3 dTpgJbsIMjKMtvuT02PhmNXx+IRK7m9jVzpEhSxowqR8h6x9ewEaT+kgQ2FY2Sdhubhq aZULRsP05mTSrBeKik6GdoKZ5zrDPSHmLlVGS5ZIHcp2/wtndiMGMuVIX/GbCtdTbkXn BgTSMaFgeoCU2bPlYUInp1CeXQzkYsbOTudmMKWC4O6pPPxgSwnTGNi2nPdNGGhT/bMc AjiG89k6uNoa29sYVP8HDgIXE+F702lJWnBrVQ7EGDqAaUA0gtuTsjTx1kN01z1/XMvx X8cA== 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 o12-v6si384257plg.715.2018.03.19.11.17.00; Mon, 19 Mar 2018 11:17:15 -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 S969009AbeCSSPt (ORCPT + 99 others); Mon, 19 Mar 2018 14:15:49 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:44708 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S968955AbeCSSPo (ORCPT ); Mon, 19 Mar 2018 14:15:44 -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 BF189101D; Mon, 19 Mar 2018 18:15:43 +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.4 090/134] mtd: nand: ifc: update bufnum mask for ver >= 2.0.0 Date: Mon, 19 Mar 2018 19:06:13 +0100 Message-Id: <20180319171902.315537895@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180319171849.024066323@linuxfoundation.org> References: <20180319171849.024066323@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.4-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 @@ -988,6 +988,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; }