From patchwork Thu Jan 19 07:39:34 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Roese X-Patchwork-Id: 716970 X-Patchwork-Delegate: sr@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 3v3wph1jFmz9ssP for ; Thu, 19 Jan 2017 18:44:44 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id A7133A75F3; Thu, 19 Jan 2017 08:44:40 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6nF8Tzymo8po; Thu, 19 Jan 2017 08:44:40 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 2D471B3897; Thu, 19 Jan 2017 08:44:06 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 3362AA75E6 for ; Thu, 19 Jan 2017 08:40:04 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id eT1OVtNmNw_D for ; Thu, 19 Jan 2017 08:40:04 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mx2.mailbox.org (mx2.mailbox.org [80.241.60.215]) by theia.denx.de (Postfix) with ESMTPS id 8B05BA75FA for ; Thu, 19 Jan 2017 08:40:00 +0100 (CET) Received: from smtp1.mailbox.org (smtp1.mailbox.org [80.241.60.240]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx2.mailbox.org (Postfix) with ESMTPS id 3ED4E4430C; Thu, 19 Jan 2017 08:40:00 +0100 (CET) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp1.mailbox.org ([80.241.60.240]) by gerste.heinlein-support.de (gerste.heinlein-support.de [91.198.250.173]) (amavisd-new, port 10030) with ESMTP id yRS7GVq8QkMY; Thu, 19 Jan 2017 08:39:43 +0100 (CET) From: Stefan Roese To: u-boot@lists.denx.de Date: Thu, 19 Jan 2017 08:39:34 +0100 Message-Id: <20170119073941.8057-2-sr@denx.de> In-Reply-To: <20170119073941.8057-1-sr@denx.de> References: <20170119073941.8057-1-sr@denx.de> Subject: [U-Boot] [PATCH 2/9] mmc: sdhci: Add support for optional controller specific set_ios_post() X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Some SDHCI drivers might need to do some special controller configuration after the common clock set_ios() function has been called (speed / width configuration). This patch adds a call to the newly created function set_ios_port() when its configured in the host driver. This will be used by the Xenon SDHCI controller driver used on the Marvell Armada 3700 and 7k/8k ARM64 SoCs. Signed-off-by: Stefan Roese Cc: Jaehoon Chung Cc: Simon Glass Reviewed-by: Jaehoon Chung --- drivers/mmc/sdhci.c | 4 ++++ include/sdhci.h | 1 + 2 files changed, 5 insertions(+) diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c index 081b014a17..f34f565aeb 100644 --- a/drivers/mmc/sdhci.c +++ b/drivers/mmc/sdhci.c @@ -458,6 +458,10 @@ static int sdhci_set_ios(struct mmc *mmc) sdhci_writeb(host, ctrl, SDHCI_HOST_CONTROL); + /* If available, call the driver specific "post" set_ios() function */ + if (host->ops && host->ops->set_ios_post) + host->ops->set_ios_post(host); + return 0; } diff --git a/include/sdhci.h b/include/sdhci.h index 7544b494b1..0cd4e59d67 100644 --- a/include/sdhci.h +++ b/include/sdhci.h @@ -235,6 +235,7 @@ struct sdhci_ops { #endif int (*get_cd)(struct sdhci_host *host); void (*set_control_reg)(struct sdhci_host *host); + void (*set_ios_post)(struct sdhci_host *host); void (*set_clock)(struct sdhci_host *host, u32 div); };