From patchwork Tue Jan 13 04:58:56 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 5617771 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.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 06B259F2ED for ; Tue, 13 Jan 2015 04:59:05 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 359E9203A5 for ; Tue, 13 Jan 2015 04:59:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 501902037D for ; Tue, 13 Jan 2015 04:59:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752542AbbAME7B (ORCPT ); Mon, 12 Jan 2015 23:59:01 -0500 Received: from relmlor3.renesas.com ([210.160.252.173]:22696 "EHLO relmlie2.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752180AbbAME7A (ORCPT ); Mon, 12 Jan 2015 23:59:00 -0500 Received: from unknown (HELO relmlir1.idc.renesas.com) ([10.200.68.151]) by relmlie2.idc.renesas.com with ESMTP; 13 Jan 2015 13:58:59 +0900 Received: from relmlac2.idc.renesas.com (relmlac2.idc.renesas.com [10.200.69.22]) by relmlir1.idc.renesas.com (Postfix) with ESMTP id 88976420CF; Tue, 13 Jan 2015 13:58:59 +0900 (JST) Received: by relmlac2.idc.renesas.com (Postfix, from userid 0) id 5B31B2806D; Tue, 13 Jan 2015 13:58:59 +0900 (JST) Received: from relmlac2.idc.renesas.com (localhost [127.0.0.1]) by relmlac2.idc.renesas.com (Postfix) with ESMTP id 52CE32806F; Tue, 13 Jan 2015 13:58:59 +0900 (JST) Received: from relmlii1.idc.renesas.com [10.200.68.65] by relmlac2.idc.renesas.com with ESMTP id PAG04536; Tue, 13 Jan 2015 13:58:59 +0900 X-IronPort-AV: E=Sophos;i="5.07,747,1413212400"; d="scan'208";a="177445198" Received: from mail-hk1lp0125.outbound.protection.outlook.com (HELO APAC01-HK1-obe.outbound.protection.outlook.com) ([207.46.51.125]) by relmlii1.idc.renesas.com with ESMTP/TLS/AES256-SHA; 13 Jan 2015 13:58:58 +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:58:56 +0000 Message-ID: <87h9vvuvgo.wl%kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH 09/17] mmc: tmio: tmio_mmc_data has .dma_rx_offset 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:58:56 +0000 X-Originating-IP: [211.11.155.132] X-ClientProxiedBy: SG2PR03CA0005.apcprd03.prod.outlook.com (25.160.233.15) 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:en; 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:58:56.7739 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: HKNPR06MB164 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 Current .dma_rx_offset is implemented under tmio_mmc_dma. It goes to tmio_mmc_data by this patch. Signed-off-by: Kuninori Morimoto Acked-by: Lee Jones --- drivers/mmc/host/sh_mobile_sdhi.c | 2 +- drivers/mmc/host/tmio_mmc.h | 1 - drivers/mmc/host/tmio_mmc_dma.c | 2 +- include/linux/mfd/tmio.h | 1 + 4 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/mmc/host/sh_mobile_sdhi.c b/drivers/mmc/host/sh_mobile_sdhi.c index 782d8cf..c06e93b 100644 --- a/drivers/mmc/host/sh_mobile_sdhi.c +++ b/drivers/mmc/host/sh_mobile_sdhi.c @@ -276,7 +276,7 @@ static int sh_mobile_sdhi_probe(struct platform_device *pdev) mmc_data->flags |= of_data->tmio_flags; mmc_data->capabilities |= of_data->capabilities; mmc_data->capabilities2 |= of_data->capabilities2; - dma_priv->dma_rx_offset = of_data->dma_rx_offset; + mmc_data->dma_rx_offset = of_data->dma_rx_offset; } ret = tmio_mmc_host_probe(host, mmc_data); diff --git a/drivers/mmc/host/tmio_mmc.h b/drivers/mmc/host/tmio_mmc.h index 9482abc..c9a8469 100644 --- a/drivers/mmc/host/tmio_mmc.h +++ b/drivers/mmc/host/tmio_mmc.h @@ -45,7 +45,6 @@ struct tmio_mmc_dma { void *chan_priv_rx; int slave_id_tx; int slave_id_rx; - dma_addr_t dma_rx_offset; bool (*filter)(struct dma_chan *chan, void *arg); }; diff --git a/drivers/mmc/host/tmio_mmc_dma.c b/drivers/mmc/host/tmio_mmc_dma.c index d2b02de..634b2700c 100644 --- a/drivers/mmc/host/tmio_mmc_dma.c +++ b/drivers/mmc/host/tmio_mmc_dma.c @@ -308,7 +308,7 @@ void tmio_mmc_request_dma(struct tmio_mmc_host *host, struct tmio_mmc_data *pdat if (host->dma->chan_priv_rx) cfg.slave_id = host->dma->slave_id_rx; cfg.direction = DMA_DEV_TO_MEM; - cfg.src_addr = cfg.dst_addr + host->dma->dma_rx_offset; + cfg.src_addr = cfg.dst_addr + host->pdata->dma_rx_offset; cfg.src_addr_width = DMA_SLAVE_BUSWIDTH_2_BYTES; cfg.dst_addr = 0; ret = dmaengine_slave_config(host->chan_rx, &cfg); diff --git a/include/linux/mfd/tmio.h b/include/linux/mfd/tmio.h index 28a12d1..807ecfb 100644 --- a/include/linux/mfd/tmio.h +++ b/include/linux/mfd/tmio.h @@ -123,6 +123,7 @@ struct tmio_mmc_data { u32 ocr_mask; /* available voltages */ unsigned int cd_gpio; int alignment_shift; + dma_addr_t dma_rx_offset; void (*set_pwr)(struct platform_device *host, int state); void (*set_clk_div)(struct platform_device *host, int state); };