From patchwork Fri Apr 26 05:18:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yoshihiro Shimoda X-Patchwork-Id: 10918209 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 264AA1575 for ; Fri, 26 Apr 2019 05:23:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 177E528D88 for ; Fri, 26 Apr 2019 05:23:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 08F8428D92; Fri, 26 Apr 2019 05:23:14 +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=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=unavailable 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 E6CB628D88 for ; Fri, 26 Apr 2019 05:23:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726995AbfDZFXM (ORCPT ); Fri, 26 Apr 2019 01:23:12 -0400 Received: from relmlor1.renesas.com ([210.160.252.171]:58411 "EHLO relmlie5.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725877AbfDZFXM (ORCPT ); Fri, 26 Apr 2019 01:23:12 -0400 X-IronPort-AV: E=Sophos;i="5.60,396,1549897200"; d="scan'208";a="14381044" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie5.idc.renesas.com with ESMTP; 26 Apr 2019 14:23:09 +0900 Received: from localhost.localdomain (unknown [10.166.17.210]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id 7978741AF7E3; Fri, 26 Apr 2019 14:23:09 +0900 (JST) From: Yoshihiro Shimoda To: ulf.hansson@linaro.org, wsa+renesas@sang-engineering.com Cc: linux-mmc@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Yoshihiro Shimoda Subject: [PATCH 1/3] mmc: tmio: add init_card ops Date: Fri, 26 Apr 2019 14:18:48 +0900 Message-Id: <1556255930-18188-2-git-send-email-yoshihiro.shimoda.uh@renesas.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1556255930-18188-1-git-send-email-yoshihiro.shimoda.uh@renesas.com> References: <1556255930-18188-1-git-send-email-yoshihiro.shimoda.uh@renesas.com> 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 Since renesas_sdhi_internal_dmac driver would like to use the init_card() ops in the future, this patch adds init_card ops into the struct tmio_mmc_host and struct tmio_mmc_dma_ops. Signed-off-by: Yoshihiro Shimoda Reviewed-by: Simon Horman --- drivers/mmc/host/tmio_mmc.h | 2 ++ drivers/mmc/host/tmio_mmc_core.c | 9 +++++++++ 2 files changed, 11 insertions(+) diff --git a/drivers/mmc/host/tmio_mmc.h b/drivers/mmc/host/tmio_mmc.h index c5ba13f..cb2c42b 100644 --- a/drivers/mmc/host/tmio_mmc.h +++ b/drivers/mmc/host/tmio_mmc.h @@ -118,6 +118,7 @@ struct tmio_mmc_dma_ops { void (*release)(struct tmio_mmc_host *host); void (*abort)(struct tmio_mmc_host *host); void (*dataend)(struct tmio_mmc_host *host); + void (*init_card)(struct tmio_mmc_host *host, struct mmc_card *card); }; struct tmio_mmc_host { @@ -178,6 +179,7 @@ struct tmio_mmc_host { void (*hw_reset)(struct tmio_mmc_host *host); void (*prepare_tuning)(struct tmio_mmc_host *host, unsigned long tap); bool (*check_scc_error)(struct tmio_mmc_host *host); + void (*init_card)(struct tmio_mmc_host *host, struct mmc_card *card); /* * Mandatory callback for tuning to occur which is optional for SDR50 diff --git a/drivers/mmc/host/tmio_mmc_core.c b/drivers/mmc/host/tmio_mmc_core.c index 130b91c..6019628 100644 --- a/drivers/mmc/host/tmio_mmc_core.c +++ b/drivers/mmc/host/tmio_mmc_core.c @@ -1047,6 +1047,14 @@ static void tmio_mmc_hs400_complete(struct mmc_host *mmc) host->hs400_complete(host); } +static void tmio_mmc_init_card(struct mmc_host *mmc, struct mmc_card *card) +{ + struct tmio_mmc_host *host = mmc_priv(mmc); + + if (host->init_card) + host->init_card(host, card); +} + static const struct mmc_host_ops tmio_mmc_ops = { .request = tmio_mmc_request, .set_ios = tmio_mmc_set_ios, @@ -1059,6 +1067,7 @@ static const struct mmc_host_ops tmio_mmc_ops = { .prepare_hs400_tuning = tmio_mmc_prepare_hs400_tuning, .hs400_downgrade = tmio_mmc_hs400_downgrade, .hs400_complete = tmio_mmc_hs400_complete, + .init_card = tmio_mmc_init_card, }; static int tmio_mmc_init_ocr(struct tmio_mmc_host *host)