From patchwork Tue Jan 13 04:59:05 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 5617781 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 52029C058D for ; Tue, 13 Jan 2015 04:59:12 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7C808203A5 for ; Tue, 13 Jan 2015 04:59:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8B9842037D for ; Tue, 13 Jan 2015 04:59:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751069AbbAME7K (ORCPT ); Mon, 12 Jan 2015 23:59:10 -0500 Received: from relmlor2.renesas.com ([210.160.252.172]:39651 "EHLO relmlie1.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751387AbbAME7J (ORCPT ); Mon, 12 Jan 2015 23:59:09 -0500 Received: from unknown (HELO relmlir1.idc.renesas.com) ([10.200.68.151]) by relmlie1.idc.renesas.com with ESMTP; 13 Jan 2015 13:59:08 +0900 Received: from relmlac1.idc.renesas.com (relmlac1.idc.renesas.com [10.200.69.21]) by relmlir1.idc.renesas.com (Postfix) with ESMTP id 79AE2420E9; Tue, 13 Jan 2015 13:59:08 +0900 (JST) Received: by relmlac1.idc.renesas.com (Postfix, from userid 0) id 4FF468002D; Tue, 13 Jan 2015 13:59:08 +0900 (JST) Received: from relmlac1.idc.renesas.com (localhost [127.0.0.1]) by relmlac1.idc.renesas.com (Postfix) with ESMTP id 403DF8002F; Tue, 13 Jan 2015 13:59:08 +0900 (JST) Received: from relmlii1.idc.renesas.com [10.200.68.65] by relmlac1.idc.renesas.com with ESMTP id PAG08268; Tue, 13 Jan 2015 13:59:08 +0900 X-IronPort-AV: E=Sophos;i="5.07,747,1413212400"; d="scan'208";a="177445211" Received: from mail-sg1lp0088.outbound.protection.outlook.com (HELO APAC01-SG1-obe.outbound.protection.outlook.com) ([207.46.51.88]) by relmlii1.idc.renesas.com with ESMTP/TLS/AES256-SHA; 13 Jan 2015 13:59:07 +0900 Received: from remon.renesas.com (211.11.155.132) by HKNPR06MB164.apcprd06.prod.outlook.com (10.242.104.21) with Microsoft SMTP Server (TLS) id 15.1.53.17; Tue, 13 Jan 2015 04:59:05 +0000 Message-ID: <87fvbfuvgd.wl%kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH 10/17] mmc: tmio: add .enable_dma on tmio_mmc_data User-Agent: Wanderlust/2.14.0 Emacs/23.3 Mule/6.0 To: Ulf Hansson CC: Arnd Bergmann , Chris Ball , Simon , Linux-SH , linux-mmc In-Reply-To: <87twzvuvl1.wl%kuninori.morimoto.gx@renesas.com> References: <87twzvuvl1.wl%kuninori.morimoto.gx@renesas.com> MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Date: Tue, 13 Jan 2015 04:59:05 +0000 X-Originating-IP: [211.11.155.132] X-ClientProxiedBy: HKXPR03CA0029.apcprd03.prod.outlook.com (10.141.129.19) To HKNPR06MB164.apcprd06.prod.outlook.com (10.242.104.21) Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=kuninori.morimoto.gx@renesas.com; X-DmarcAction-Test: None X-Microsoft-Antispam: UriScan:; X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(3005003);SRVR:HKNPR06MB164; X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004); SRVR:HKNPR06MB164; X-Forefront-PRVS: 045584D28C X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(6009001)(189002)(199003)(64706001)(19580405001)(47776003)(46406003)(86362001)(2950100001)(69596002)(76176999)(46102003)(19580395003)(66066001)(53416004)(54356999)(50986999)(42186005)(50466002)(101416001)(83506001)(87976001)(68736005)(77096005)(23726002)(81156004)(77156002)(62966003)(110136001)(97736003)(36756003)(122386002)(33646002)(105586002)(92566002)(229853001)(106356001)(40100003)(142923001); DIR:OUT; SFP:1102; SCL:1; SRVR:HKNPR06MB164; H:remon.renesas.com; FPR:; SPF:None; MLV:sfv; PTR:InfoNoRecords; MX:1; A:1; LANG:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:;SRVR:HKNPR06MB164; X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jan 2015 04:59:05.9147 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: HKNPR06MB164 Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Kuninori Morimoto Some controllers need DMA special register/setting. This patch adds new .enable_dma callback for it. Signed-off-by: Kuninori Morimoto --- drivers/mmc/host/tmio_mmc.h | 2 ++ drivers/mmc/host/tmio_mmc_dma.c | 3 +++ 2 files changed, 5 insertions(+) diff --git a/drivers/mmc/host/tmio_mmc.h b/drivers/mmc/host/tmio_mmc.h index c9a8469..0699edb 100644 --- a/drivers/mmc/host/tmio_mmc.h +++ b/drivers/mmc/host/tmio_mmc.h @@ -39,6 +39,7 @@ #define TMIO_MASK_IRQ (TMIO_MASK_READOP | TMIO_MASK_WRITEOP | TMIO_MASK_CMD) struct tmio_mmc_data; +struct tmio_mmc_host; struct tmio_mmc_dma { void *chan_priv_tx; @@ -46,6 +47,7 @@ struct tmio_mmc_dma { int slave_id_tx; int slave_id_rx; bool (*filter)(struct dma_chan *chan, void *arg); + void (*enable)(struct tmio_mmc_host *host, bool enable); }; struct tmio_mmc_host { diff --git a/drivers/mmc/host/tmio_mmc_dma.c b/drivers/mmc/host/tmio_mmc_dma.c index 634b2700c..eb6b45c 100644 --- a/drivers/mmc/host/tmio_mmc_dma.c +++ b/drivers/mmc/host/tmio_mmc_dma.c @@ -30,6 +30,9 @@ void tmio_mmc_enable_dma(struct tmio_mmc_host *host, bool enable) if (host->pdata->flags & TMIO_MMC_HAVE_CTL_DMA_REG) sd_ctrl_write16(host, CTL_DMA_ENABLE, enable ? 2 : 0); + + if (host->dma->enable) + host->dma->enable(host, enable); } void tmio_mmc_abort_dma(struct tmio_mmc_host *host)