From patchwork Fri Oct 12 14:57:37 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 10638755 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 50F0E157A for ; Fri, 12 Oct 2018 14:58:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 40F162BEC5 for ; Fri, 12 Oct 2018 14:58:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 34D782BECA; Fri, 12 Oct 2018 14:58:47 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D01BA2BEC5 for ; Fri, 12 Oct 2018 14:58:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728786AbeJLWbg (ORCPT ); Fri, 12 Oct 2018 18:31:36 -0400 Received: from conuserg-07.nifty.com ([210.131.2.74]:52675 "EHLO conuserg-07.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728720AbeJLWbg (ORCPT ); Fri, 12 Oct 2018 18:31:36 -0400 Received: from grover.tkatk1.zaq.ne.jp (zaqdadce369.zaq.ne.jp [218.220.227.105]) (authenticated) by conuserg-07.nifty.com with ESMTP id w9CEvjPA016823; Fri, 12 Oct 2018 23:57:46 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-07.nifty.com w9CEvjPA016823 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1539356267; bh=gNE/DT+c7dmomudF11g+hbkGUuoIwZPmrwl+ytK2nn8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=19e1xXVy8/mZhAhIGINGf7jhjKSgnirV57Kay2CQIN49iN8xYxj7b6KqdeBnQMizR I9MudRozbmuTMUz5RaXQ9oibBq4OChrxPvaVTQdeJKCFOk9P4ylR8HpqJDtr9ypF9w HvErPicdOkz1r010+6Tx8wNU2mVxTy5FSMppPthJndBHfRJZYFa5/p0ik1boGHjwMl rQmCMSUt+effQEsU9+m31dXRzdTfx2CWmNsw4+VXbGKy7+eFigyey56JkJD2BmjoxE K5dCmVdtThyIMALPOu0Av9Xhgq8ArejxfkrDts29j3Xpy3n6Z4kznGCWapuAfUYvyp hxkaNBtWIiZjQ== X-Nifty-SrcIP: [218.220.227.105] From: Masahiro Yamada To: linux-mmc@vger.kernel.org, Ulf Hansson Cc: Wolfram Sang , Masahiro Yamada , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] mmc: uniphier-sd: fix DMA disabling Date: Fri, 12 Oct 2018 23:57:37 +0900 Message-Id: <1539356258-12374-2-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1539356258-12374-1-git-send-email-yamada.masahiro@socionext.com> References: <1539356258-12374-1-git-send-email-yamada.masahiro@socionext.com> Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Once DMA is enabled, it is not possible to disable it because uniphier_sd_dma_endisable() always sets the DMA_ENABLE_DMASDRW bit regardless of the argument 'enable'. It should disable DMA when 'enable' is false. Signed-off-by: Masahiro Yamada Acked-by: Wolfram Sang --- drivers/mmc/host/uniphier-sd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc/host/uniphier-sd.c b/drivers/mmc/host/uniphier-sd.c index 10e7b30..10d49aa 100644 --- a/drivers/mmc/host/uniphier-sd.c +++ b/drivers/mmc/host/uniphier-sd.c @@ -78,7 +78,7 @@ static void *uniphier_sd_priv(struct tmio_mmc_host *host) static void uniphier_sd_dma_endisable(struct tmio_mmc_host *host, int enable) { - sd_ctrl_write16(host, CTL_DMA_ENABLE, DMA_ENABLE_DMASDRW); + sd_ctrl_write16(host, CTL_DMA_ENABLE, enable ? DMA_ENABLE_DMASDRW : 0); } /* external DMA engine */