From patchwork Tue Jan 13 04:58:46 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 5617751 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 6ED129F2ED for ; Tue, 13 Jan 2015 04:58:53 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8C9BC2037F for ; Tue, 13 Jan 2015 04:58:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A44842037D for ; Tue, 13 Jan 2015 04:58:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752468AbbAME6u (ORCPT ); Mon, 12 Jan 2015 23:58:50 -0500 Received: from relmlor2.renesas.com ([210.160.252.172]:43357 "EHLO relmlie1.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752447AbbAME6t (ORCPT ); Mon, 12 Jan 2015 23:58:49 -0500 Received: from unknown (HELO relmlir1.idc.renesas.com) ([10.200.68.151]) by relmlie1.idc.renesas.com with ESMTP; 13 Jan 2015 13:58:48 +0900 Received: from relmlac1.idc.renesas.com (relmlac1.idc.renesas.com [10.200.69.21]) by relmlir1.idc.renesas.com (Postfix) with ESMTP id A77AB420AD; Tue, 13 Jan 2015 13:58:48 +0900 (JST) Received: by relmlac1.idc.renesas.com (Postfix, from userid 0) id 87ABA8002E; Tue, 13 Jan 2015 13:58:48 +0900 (JST) Received: from relmlac1.idc.renesas.com (localhost [127.0.0.1]) by relmlac1.idc.renesas.com (Postfix) with ESMTP id 8073C8002D; Tue, 13 Jan 2015 13:58:48 +0900 (JST) Received: from relmlii2.idc.renesas.com [10.200.68.66] by relmlac1.idc.renesas.com with ESMTP id PAM08031; Tue, 13 Jan 2015 13:58:48 +0900 X-IronPort-AV: E=Sophos;i="5.07,747,1413212400"; d="scan'208";a="178567547" Received: from mail-hk1lp0122.outbound.protection.outlook.com (HELO APAC01-HK1-obe.outbound.protection.outlook.com) ([207.46.51.122]) by relmlii2.idc.renesas.com with ESMTP/TLS/AES256-SHA; 13 Jan 2015 13:58:48 +0900 Received: from remon.renesas.com (211.11.155.132) by HKNPR06MB161.apcprd06.prod.outlook.com (10.242.104.16) with Microsoft SMTP Server (TLS) id 15.1.53.17; Tue, 13 Jan 2015 04:58:46 +0000 Message-ID: <87iogbuvgx.wl%kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH 08/17] mmc: tmio: tmio_mmc_data has .alignment_shift 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:46 +0000 X-Originating-IP: [211.11.155.132] X-ClientProxiedBy: HKXPR03CA0043.apcprd03.prod.outlook.com (10.141.129.33) To HKNPR06MB161.apcprd06.prod.outlook.com (10.242.104.16) 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:HKNPR06MB161; X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004); SRVR:HKNPR06MB161; X-Forefront-PRVS: 045584D28C X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(6009001)(189002)(199003)(42186005)(64706001)(62966003)(77156002)(86362001)(92566002)(87976001)(83506001)(2950100001)(66066001)(575784001)(68736005)(77096005)(47776003)(105586002)(101416001)(97736003)(50986999)(122386002)(76176999)(81156004)(33646002)(36756003)(106356001)(19580395003)(19580405001)(53416004)(69596002)(50466002)(46406003)(23726002)(54356999)(110136001)(40100003)(229853001)(46102003)(142923001); DIR:OUT; SFP:1102; SCL:1; SRVR:HKNPR06MB161; 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:HKNPR06MB161; X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jan 2015 04:58:46.5734 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: HKNPR06MB161 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 .alignment_shift 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 | 4 ++-- drivers/mmc/host/tmio_mmc.h | 1 - drivers/mmc/host/tmio_mmc_dma.c | 4 ++-- include/linux/mfd/tmio.h | 1 + 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/mmc/host/sh_mobile_sdhi.c b/drivers/mmc/host/sh_mobile_sdhi.c index 0db2a0a..782d8cf 100644 --- a/drivers/mmc/host/sh_mobile_sdhi.c +++ b/drivers/mmc/host/sh_mobile_sdhi.c @@ -241,10 +241,10 @@ static int sh_mobile_sdhi_probe(struct platform_device *pdev) dma_priv->slave_id_rx = p->dma_slave_rx; } } - - dma_priv->alignment_shift = 1; /* 2-byte alignment */ dma_priv->filter = shdma_chan_filter; + mmc_data->alignment_shift = 1; /* 2-byte alignment */ + /* * All SDHI blocks support 2-byte and larger block sizes in 4-bit * bus width mode. diff --git a/drivers/mmc/host/tmio_mmc.h b/drivers/mmc/host/tmio_mmc.h index a5d30bf..9482abc 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; - int alignment_shift; 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 ee0131e..d2b02de 100644 --- a/drivers/mmc/host/tmio_mmc_dma.c +++ b/drivers/mmc/host/tmio_mmc_dma.c @@ -52,7 +52,7 @@ static void tmio_mmc_start_dma_rx(struct tmio_mmc_host *host) dma_cookie_t cookie; int ret, i; bool aligned = true, multiple = true; - unsigned int align = (1 << host->dma->alignment_shift) - 1; + unsigned int align = (1 << host->pdata->alignment_shift) - 1; for_each_sg(sg, sg_tmp, host->sg_len, i) { if (sg_tmp->offset & align) @@ -128,7 +128,7 @@ static void tmio_mmc_start_dma_tx(struct tmio_mmc_host *host) dma_cookie_t cookie; int ret, i; bool aligned = true, multiple = true; - unsigned int align = (1 << host->dma->alignment_shift) - 1; + unsigned int align = (1 << host->pdata->alignment_shift) - 1; for_each_sg(sg, sg_tmp, host->sg_len, i) { if (sg_tmp->offset & align) diff --git a/include/linux/mfd/tmio.h b/include/linux/mfd/tmio.h index 7a5c279..28a12d1 100644 --- a/include/linux/mfd/tmio.h +++ b/include/linux/mfd/tmio.h @@ -122,6 +122,7 @@ struct tmio_mmc_data { unsigned long flags; u32 ocr_mask; /* available voltages */ unsigned int cd_gpio; + int alignment_shift; void (*set_pwr)(struct platform_device *host, int state); void (*set_clk_div)(struct platform_device *host, int state); };