From patchwork Mon Aug 17 15:15:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 266017 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 09510C433DF for ; Mon, 17 Aug 2020 19:21:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D6D9F20658 for ; Mon, 17 Aug 2020 19:21:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597692105; bh=BSj09ABMawelgjrVESxuHKeV87K5pA2oXDswGqGTX8Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=gw6YUUP/yxu4VAJnRp/7TwAUbDsC+27TDKJisT1Eyluf1SV88CTPINjPlFJTB1MTW c2HO7lxmbrnA/COWn3vP5/08wHuuX7HdjkgJ1P+igM6LAbySV4J18YfAkxHi5a5c0H A3tru2kLKQL1ebi4duLYqJYiuEHgftZTknizxHN0= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2392388AbgHQTVl (ORCPT ); Mon, 17 Aug 2020 15:21:41 -0400 Received: from mail.kernel.org ([198.145.29.99]:43160 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730183AbgHQPgD (ORCPT ); Mon, 17 Aug 2020 11:36:03 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 550FF208E4; Mon, 17 Aug 2020 15:36:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597678562; bh=BSj09ABMawelgjrVESxuHKeV87K5pA2oXDswGqGTX8Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kNkxFBVWdmKdhbTfRQgbFYJpO83CstEBUAXN0yAIEk55oqfAhJz4BrRh+5WtMR3A/ dbk+2xIUcEyF1hJJDA76toqmmWuWRfg11S6JALdmNQd70cVvKN6tOw8ErbKh45MzhV I5ufXu7ILuwMxhR/whL78pQpcZOUbr9nuxcagnWY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Kamal Dasu , Miquel Raynal , Sasha Levin Subject: [PATCH 5.8 377/464] mtd: rawnand: brcmnand: Dont default to edu transfer Date: Mon, 17 Aug 2020 17:15:30 +0200 Message-Id: <20200817143851.833346219@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200817143833.737102804@linuxfoundation.org> References: <20200817143833.737102804@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Kamal Dasu [ Upstream commit bee3ab8bdd3b13faf08e5b6e0218f59b0a49fcc3 ] When flash-dma is absent do not default to using flash-edu. Make sure flash-edu is enabled before setting EDU transfer function. Fixes: a5d53ad26a8b ("mtd: rawnand: brcmnand: Add support for flash-edu for dma transfers") Signed-off-by: Kamal Dasu Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20200612212902.21347-2-kdasu.kdev@gmail.com Signed-off-by: Sasha Levin --- drivers/mtd/nand/raw/brcmnand/brcmnand.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/mtd/nand/raw/brcmnand/brcmnand.c b/drivers/mtd/nand/raw/brcmnand/brcmnand.c index 44068e9eea035..ac934a715a194 100644 --- a/drivers/mtd/nand/raw/brcmnand/brcmnand.c +++ b/drivers/mtd/nand/raw/brcmnand/brcmnand.c @@ -3023,8 +3023,9 @@ int brcmnand_probe(struct platform_device *pdev, struct brcmnand_soc *soc) if (ret < 0) goto err; - /* set edu transfer function to call */ - ctrl->dma_trans = brcmnand_edu_trans; + if (has_edu(ctrl)) + /* set edu transfer function to call */ + ctrl->dma_trans = brcmnand_edu_trans; } /* Disable automatic device ID config, direct addressing */