From patchwork Mon Aug 7 16:01:38 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kishon Vijay Abraham I X-Patchwork-Id: 9885753 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 784BF60363 for ; Mon, 7 Aug 2017 16:04:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7CE0D2863B for ; Mon, 7 Aug 2017 16:04:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 718A6286B8; Mon, 7 Aug 2017 16:04:37 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 00F2D2863B for ; Mon, 7 Aug 2017 16:04:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751973AbdHGQEX (ORCPT ); Mon, 7 Aug 2017 12:04:23 -0400 Received: from lelnx194.ext.ti.com ([198.47.27.80]:16503 "EHLO lelnx194.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751905AbdHGQCD (ORCPT ); Mon, 7 Aug 2017 12:02:03 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by lelnx194.ext.ti.com (8.15.1/8.15.1) with ESMTP id v77G1xeu016531; Mon, 7 Aug 2017 11:01:59 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1502121719; bh=sxHLURqwMsFjnv4zeNA5AzzhT7Z3WR61pZQuXEFw+88=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=Lf3U79fVai6KkmXalL918NSyzifdnCZ1aZQLgj3Vk+O1Vjmizxp6GgfcSTLYSmhRJ Yprww6TAumSqFFkIvAdk2lgocxvoDcdXeZ7Qnc69qe51aII7QO+vgtvLxYEWdI+yn0 uBcmXgJQuc6vi723QCFLGzhe64uGPdSQVteAsOY0= Received: from DLEE70.ent.ti.com (dlee70.ent.ti.com [157.170.170.113]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id v77G1xf1007487; Mon, 7 Aug 2017 11:01:59 -0500 Received: from dlep32.itg.ti.com (157.170.170.100) by DLEE70.ent.ti.com (157.170.170.113) with Microsoft SMTP Server id 14.3.294.0; Mon, 7 Aug 2017 11:01:58 -0500 Received: from a0393678ub.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id v77G1jGt023497; Mon, 7 Aug 2017 11:01:56 -0500 From: Kishon Vijay Abraham I To: Ulf Hansson , Tony Lindgren , Rob Herring , Adrian Hunter CC: , , , , , Subject: [RFC PATCH 3/7] mmc: sdhci: Add callback to set bus mode Date: Mon, 7 Aug 2017 21:31:38 +0530 Message-ID: <20170807160142.12134-4-kishon@ti.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170807160142.12134-1-kishon@ti.com> References: <20170807160142.12134-1-kishon@ti.com> MIME-Version: 1.0 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add callback to set bus mode in sdhci library so that the controller driver can perform any bus mode specific configurations in the callback function. Signed-off-by: Kishon Vijay Abraham I --- drivers/mmc/host/sdhci.c | 3 +++ drivers/mmc/host/sdhci.h | 1 + 2 files changed, 4 insertions(+) diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index fff0baadbc3e..d5050ec42481 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -1747,6 +1747,9 @@ void sdhci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) if (host->quirks & SDHCI_QUIRK_RESET_CMD_DATA_ON_IOS) sdhci_do_reset(host, SDHCI_RESET_CMD | SDHCI_RESET_DATA); + if (host->ops->set_bus_mode) + host->ops->set_bus_mode(host, ios->bus_mode); + mmiowb(); } EXPORT_SYMBOL_GPL(sdhci_set_ios); diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h index d778034e324d..39c7a2723906 100644 --- a/drivers/mmc/host/sdhci.h +++ b/drivers/mmc/host/sdhci.h @@ -583,6 +583,7 @@ struct sdhci_ops { void (*adma_workaround)(struct sdhci_host *host, u32 intmask); void (*card_event)(struct sdhci_host *host); void (*voltage_switch)(struct sdhci_host *host); + void (*set_bus_mode)(struct sdhci_host *host, unsigned int mode); }; #ifdef CONFIG_MMC_SDHCI_IO_ACCESSORS