From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Roese Date: Thu, 19 Jan 2017 08:39:34 +0100 Subject: [U-Boot] [PATCH 2/9] mmc: sdhci: Add support for optional controller specific set_ios_post() In-Reply-To: <20170119073941.8057-1-sr@denx.de> References: <20170119073941.8057-1-sr@denx.de> Message-ID: <20170119073941.8057-2-sr@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 --- 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); }; -- 2.11.0