From patchwork Mon Dec 15 02:27:54 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 5489841 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 2B0F89F456 for ; Mon, 15 Dec 2014 02:28:01 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6883F20A01 for ; Mon, 15 Dec 2014 02:28:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8A70F20A03 for ; Mon, 15 Dec 2014 02:27:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750897AbaLOC16 (ORCPT ); Sun, 14 Dec 2014 21:27:58 -0500 Received: from relmlor2.renesas.com ([210.160.252.172]:29845 "EHLO relmlie1.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750745AbaLOC15 (ORCPT ); Sun, 14 Dec 2014 21:27:57 -0500 Received: from unknown (HELO relmlir2.idc.renesas.com) ([10.200.68.152]) by relmlie1.idc.renesas.com with ESMTP; 15 Dec 2014 11:27:56 +0900 Received: from relmlac2.idc.renesas.com (relmlac2.idc.renesas.com [10.200.69.22]) by relmlir2.idc.renesas.com (Postfix) with ESMTP id 91893496C4; Mon, 15 Dec 2014 11:27:56 +0900 (JST) Received: by relmlac2.idc.renesas.com (Postfix, from userid 0) id 862402806E; Mon, 15 Dec 2014 11:27:56 +0900 (JST) Received: from relmlac2.idc.renesas.com (localhost [127.0.0.1]) by relmlac2.idc.renesas.com (Postfix) with ESMTP id 80F192806D; Mon, 15 Dec 2014 11:27:56 +0900 (JST) Received: from relmlii2.idc.renesas.com [10.200.68.66] by relmlac2.idc.renesas.com with ESMTP id MAT11618; Mon, 15 Dec 2014 11:27:56 +0900 X-IronPort-AV: E=Sophos;i="5.07,577,1413212400"; d="scan'208";a="176807973" Received: from mail-hk1lp0117.outbound.protection.outlook.com (HELO APAC01-HK1-obe.outbound.protection.outlook.com) ([207.46.51.117]) by relmlii2.idc.renesas.com with ESMTP/TLS/AES256-SHA; 15 Dec 2014 11:27:55 +0900 Received: from remon.renesas.com (211.11.155.132) by SINPR06MB169.apcprd06.prod.outlook.com (10.242.57.14) with Microsoft SMTP Server (TLS) id 15.1.31.17; Mon, 15 Dec 2014 02:27:54 +0000 Message-ID: <87d27lve84.wl%kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH 1/7] mmc: tmio: add .enable_dma User-Agent: Wanderlust/2.14.0 Emacs/23.3 Mule/6.0 To: Ulf Hansson , Chris Ball CC: Simon , Linux-SH , linux-mmc In-Reply-To: <87egs1ve96.wl%kuninori.morimoto.gx@renesas.com> References: <87egs1ve96.wl%kuninori.morimoto.gx@renesas.com> MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Date: Mon, 15 Dec 2014 02:27:54 +0000 X-Originating-IP: [211.11.155.132] X-ClientProxiedBy: HKXPR03CA0054.apcprd03.prod.outlook.com (10.141.129.44) To SINPR06MB169.apcprd06.prod.outlook.com (10.242.57.14) X-Microsoft-Antispam: UriScan:; X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:;SRVR:SINPR06MB169; X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601003); SRVR:SINPR06MB169; X-Forefront-PRVS: 04267075BD X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(6009001)(189002)(199003)(53416004)(33646002)(122386002)(107046002)(86362001)(575784001)(92566001)(42186005)(21056001)(46406003)(46102003)(77096005)(97736003)(68736005)(4396001)(36756003)(229853001)(99396003)(120916001)(106356001)(81156004)(105586002)(23726002)(40100003)(66066001)(54356999)(64706001)(76176999)(83506001)(77156002)(87976001)(101416001)(19580395003)(31966008)(69596002)(50986999)(62966003)(19580405001)(47776003)(50466002)(20776003); DIR:OUT; SFP:1102; SCL:1; SRVR:SINPR06MB169; H:remon.renesas.com; FPR:; SPF:None; MLV:sfv; PTR:InfoNoRecords; MX:1; A:1; LANG:en; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:;SRVR:SINPR06MB169; X-OriginatorOrg: renesas.com Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@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=unavailable 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_dma.c | 3 +++ include/linux/mfd/tmio.h | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/host/tmio_mmc_dma.c b/drivers/mmc/host/tmio_mmc_dma.c index 7d07738..f0bf6df 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->pdata->dma->enable) + host->pdata->dma->enable(host, enable); } void tmio_mmc_abort_dma(struct tmio_mmc_host *host) diff --git a/include/linux/mfd/tmio.h b/include/linux/mfd/tmio.h index 5738817..6788f9b 100644 --- a/include/linux/mfd/tmio.h +++ b/include/linux/mfd/tmio.h @@ -111,6 +111,7 @@ void tmio_core_mmc_pwr(void __iomem *cnf, int shift, int state); void tmio_core_mmc_clk_div(void __iomem *cnf, int shift, int state); struct dma_chan; +struct tmio_mmc_host; struct tmio_mmc_dma { void *chan_priv_tx; @@ -120,10 +121,9 @@ struct tmio_mmc_dma { int alignment_shift; dma_addr_t dma_rx_offset; bool (*filter)(struct dma_chan *chan, void *arg); + void (*enable)(struct tmio_mmc_host *host, bool enable); }; -struct tmio_mmc_host; - /* * data for the MMC controller */