Received: by 10.213.65.68 with SMTP id h4csp14897imn; Mon, 19 Mar 2018 17:57:52 -0700 (PDT) X-Google-Smtp-Source: AG47ELvSVZSE3wiqBnpWZptJsvBgLINu59wduJ4FQ01vv9tU8BUMAd97HjLUmrLccko9p2MbaZtc X-Received: by 10.167.129.67 with SMTP id d3mr11941778pfn.108.1521507472748; Mon, 19 Mar 2018 17:57:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521507472; cv=none; d=google.com; s=arc-20160816; b=RtGD+6o+b8oj4ASJKQ3PBJPKU6iStRzLxbbpdXIHUD6XhijYvfRtT7GfmCQI8Hd/CO yQl+pl0RokWVb8JK/6ndAW1e4geWnf0iKTY4IxS7UjGc0TWA1mUvCqtlkbt79NfDXXyG C9Mj0gCu5P2p9+KpYBYnMk/6eRtVBBHsl3oU08GwpiVotCede3hyhz+pdBvmK8sJ0j8R hO1wC5cIfc8bkzL9PniKl1Opry2Z3AASFKhWbkI7lOD7y3OX+FLx9NaP9Uf8Y+LUAMKr 6RWdxrH3zAhFXc3bQe2AXZrYf8SYotS1rBgJhFhwlL++HJHhiAoyePSG4941o7oSRp0R 7GEA== 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=LtatiJiyobRU1ZmtFkOk9YR6LT1ocdkHf9au6bgqSYM=; b=xre0oub+uZlowZoj8oTKm3W3CIJu0HkTZDJzJTrnvANc8CthgYgI+ebn1AzMWhKGLQ akChQrp4eL0Kw/ri+FADpNVrXjtpH9wz9cmWnFYRKjrxDOzcHsgOPZIERe0Yib+U8kNG ga2gMRxJENpncsWcsUphvzbvpeQHRaJfWzOs9e3Nzb8uZuWAIyHYkJ9RB4TbBmmodlZn tjV8kTam0O20cxHKY0xrpJ3s9ywk+6GeIkRDg1QI70m2uXutoUVwG5KuWhDA1ARy/gVm O3/eabK1gO2SSCEZ/7M1gy9tH3X4Bhus9U3nAgdwCfyk6Hq+TOeI9FYc1GG6YUarPEgs eWVw== 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 15-v6si424528pla.342.2018.03.19.17.57.38; Mon, 19 Mar 2018 17:57:52 -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 S969963AbeCSS1R (ORCPT + 99 others); Mon, 19 Mar 2018 14:27:17 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:51124 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965886AbeCSS1L (ORCPT ); Mon, 19 Mar 2018 14:27:11 -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 DC9BB11D5; Mon, 19 Mar 2018 18:27:10 +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.9 179/241] mtd: nand: ifc: update bufnum mask for ver >= 2.0.0 Date: Mon, 19 Mar 2018 19:07:24 +0100 Message-Id: <20180319180758.562318183@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180319180751.172155436@linuxfoundation.org> References: <20180319180751.172155436@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 [ 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 @@ -907,6 +907,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; }