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: 10638763 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 8BF47157A for ; Fri, 12 Oct 2018 14:59:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 77A692BEC6 for ; Fri, 12 Oct 2018 14:59:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 672142BED2; Fri, 12 Oct 2018 14:59:49 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 11F682BEC6 for ; Fri, 12 Oct 2018 14:59:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=+9cd7PBryDLn3co+WMuscrCBwQlTHBxFbwh4yjaqXpM=; b=lCu0JY+JViQZdPlgkOMcf1aI6k BnhOwscHLyuEC6sfCtNmkhEgkR9ZgVZvh/ZnD1mO9Yrds71dvB3Uyfn6sCmcrySJPAVEzRJo94Bef dJrlx6xHPFqeoa+csCWhX7U3jKzdkhz4NJA2SIgf9p5O/8BLNeqdttjfvuvdga93oFj3h11ahkpae 4FwUlerxlJQXEvJfUZrdgOZ2uGpVVj++Y+rewZNblJ3tue1PD0zdKlRFc7sy2SP0O8YhLcLC26AWp IvVeDlzZbIr/NCIjQfw6qtR+OjcmT6oYvVcDD13MoTZ9sKCwLac88YBXJenbdxfrV8iEhfLJsl7wB /XdVbIZg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gAyum-0005gy-Az; Fri, 12 Oct 2018 14:59:44 +0000 Received: from conuserg-07.nifty.com ([210.131.2.74]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gAytX-00056w-So for linux-arm-kernel@lists.infradead.org; Fri, 12 Oct 2018 14:58:31 +0000 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 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181012_075828_277554_187EC9B9 X-CRM114-Status: GOOD ( 11.26 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Wolfram Sang , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Masahiro Yamada MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.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 */