From patchwork Mon Jan 5 07:03:03 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 5565201 Return-Path: X-Original-To: patchwork-linux-mmc@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 2A78EBFE6A for ; Mon, 5 Jan 2015 07:03:12 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5906E20035 for ; Mon, 5 Jan 2015 07:03:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6B0FF2015A for ; Mon, 5 Jan 2015 07:03:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751125AbbAEHDI (ORCPT ); Mon, 5 Jan 2015 02:03:08 -0500 Received: from relmlor3.renesas.com ([210.160.252.173]:6394 "EHLO relmlie2.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751087AbbAEHDH (ORCPT ); Mon, 5 Jan 2015 02:03:07 -0500 Received: from unknown (HELO relmlir3.idc.renesas.com) ([10.200.68.153]) by relmlie2.idc.renesas.com with ESMTP; 05 Jan 2015 16:03:06 +0900 Received: from relmlac3.idc.renesas.com (relmlac3.idc.renesas.com [10.200.69.23]) by relmlir3.idc.renesas.com (Postfix) with ESMTP id 90A9042A0B; Mon, 5 Jan 2015 16:03:06 +0900 (JST) Received: by relmlac3.idc.renesas.com (Postfix, from userid 0) id 8B46E1806F; Mon, 5 Jan 2015 16:03:06 +0900 (JST) Received: from relmlac3.idc.renesas.com (localhost [127.0.0.1]) by relmlac3.idc.renesas.com (Postfix) with ESMTP id 845511800A; Mon, 5 Jan 2015 16:03:06 +0900 (JST) Received: from relmlii2.idc.renesas.com [10.200.68.66] by relmlac3.idc.renesas.com with ESMTP id SAP05183; Mon, 5 Jan 2015 16:03:06 +0900 X-IronPort-AV: E=Sophos;i="5.07,698,1413212400"; d="scan'208";a="178002816" Received: from mail-sg1lp0086.outbound.protection.outlook.com (HELO APAC01-SG1-obe.outbound.protection.outlook.com) ([207.46.51.86]) by relmlii2.idc.renesas.com with ESMTP/TLS/AES256-SHA; 05 Jan 2015 16:03:05 +0900 Received: from remon.renesas.com (211.11.155.132) by SIXPR06MB176.apcprd06.prod.outlook.com (10.242.151.25) with Microsoft SMTP Server (TLS) id 15.1.49.12; Mon, 5 Jan 2015 07:03:03 +0000 Message-ID: <87tx05ogj8.wl%kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH 4/9] mmc: tmio: tmio_mmc_host has .clk_enable User-Agent: Wanderlust/2.14.0 Emacs/23.3 Mule/6.0 To: Ulf Hansson , Chris Ball , Simon CC: Linux-SH , linux-mmc , Kuninori Morimoto In-Reply-To: <87zj9xogln.wl%kuninori.morimoto.gx@renesas.com> References: <87zj9xogln.wl%kuninori.morimoto.gx@renesas.com> MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Date: Mon, 5 Jan 2015 07:03:03 +0000 X-Originating-IP: [211.11.155.132] X-ClientProxiedBy: HKNPR06CA0034.apcprd06.prod.outlook.com (10.141.16.24) To SIXPR06MB176.apcprd06.prod.outlook.com (10.242.151.25) Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=kuninori.morimoto.gx@renesas.com; X-DmarcAction: None X-Microsoft-Antispam: UriScan:; X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(3005003);SRVR:SIXPR06MB176; X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004); SRVR:SIXPR06MB176; X-Forefront-PRVS: 0447DB1C71 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(6009001)(189002)(199003)(23726002)(87976001)(77096005)(33646002)(68736005)(77156002)(62966003)(31966008)(4396001)(46102003)(97736003)(2950100001)(50466002)(36756003)(105586002)(66066001)(120916001)(99396003)(69596002)(122386002)(229853001)(107046002)(81156004)(40100003)(106356001)(53416004)(19580395003)(19580405001)(83506001)(50986999)(54356999)(76176999)(20776003)(46406003)(86362001)(575784001)(101416001)(42186005)(47776003)(21056001)(92566001)(64706001); DIR:OUT; SFP:1102; SCL:1; SRVR:SIXPR06MB176; 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:SIXPR06MB176; X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jan 2015 07:03:03.8332 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: SIXPR06MB176 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 .clk_enable is implemented under tmio_mmc_data. It goes to tmio_mmc_host by this patch. Signed-off-by: Kuninori Morimoto --- drivers/mmc/host/sh_mobile_sdhi.c | 2 +- drivers/mmc/host/tmio_mmc.h | 1 + drivers/mmc/host/tmio_mmc_pio.c | 5 ++--- include/linux/mfd/tmio.h | 1 - 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/mmc/host/sh_mobile_sdhi.c b/drivers/mmc/host/sh_mobile_sdhi.c index 6ffd981..178ae0f 100644 --- a/drivers/mmc/host/sh_mobile_sdhi.c +++ b/drivers/mmc/host/sh_mobile_sdhi.c @@ -213,8 +213,8 @@ static int sh_mobile_sdhi_probe(struct platform_device *pdev) host->dma = dma_priv; host->write16_hook = sh_mobile_sdhi_write16_hook; + host->clk_enable = sh_mobile_sdhi_clk_enable; - mmc_data->clk_enable = sh_mobile_sdhi_clk_enable; mmc_data->clk_disable = sh_mobile_sdhi_clk_disable; mmc_data->capabilities = MMC_CAP_MMC_HIGHSPEED; mmc_data->multi_io_quirk = sh_mobile_sdhi_multi_io_quirk; diff --git a/drivers/mmc/host/tmio_mmc.h b/drivers/mmc/host/tmio_mmc.h index 2fb87ea..0634a94 100644 --- a/drivers/mmc/host/tmio_mmc.h +++ b/drivers/mmc/host/tmio_mmc.h @@ -96,6 +96,7 @@ struct tmio_mmc_host { bool sdio_irq_enabled; int (*write16_hook)(struct tmio_mmc_host *host, int addr); + int (*clk_enable)(struct platform_device *pdev, unsigned int *f); }; struct tmio_mmc_host* tmio_mmc_host_alloc(struct platform_device *pdev); diff --git a/drivers/mmc/host/tmio_mmc_pio.c b/drivers/mmc/host/tmio_mmc_pio.c index 8bc0c77..511ce96 100644 --- a/drivers/mmc/host/tmio_mmc_pio.c +++ b/drivers/mmc/host/tmio_mmc_pio.c @@ -835,13 +835,12 @@ fail: static int tmio_mmc_clk_update(struct tmio_mmc_host *host) { struct mmc_host *mmc = host->mmc; - struct tmio_mmc_data *pdata = host->pdata; int ret; - if (!pdata->clk_enable) + if (!host->clk_enable) return -ENOTSUPP; - ret = pdata->clk_enable(host->pdev, &mmc->f_max); + ret = host->clk_enable(host->pdev, &mmc->f_max); if (!ret) mmc->f_min = mmc->f_max / 512; diff --git a/include/linux/mfd/tmio.h b/include/linux/mfd/tmio.h index 0872ca1..472587a 100644 --- a/include/linux/mfd/tmio.h +++ b/include/linux/mfd/tmio.h @@ -126,7 +126,6 @@ struct tmio_mmc_data { void (*set_pwr)(struct platform_device *host, int state); void (*set_clk_div)(struct platform_device *host, int state); /* clock management callbacks */ - int (*clk_enable)(struct platform_device *pdev, unsigned int *f); void (*clk_disable)(struct platform_device *pdev); int (*multi_io_quirk)(struct mmc_card *card, unsigned int direction, int blk_size);