From: Stefan Roese <sr@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/9] mmc: sdhci: Add support for optional controller specific set_ios_post()
Date: Thu, 19 Jan 2017 08:39:34 +0100 [thread overview]
Message-ID: <20170119073941.8057-2-sr@denx.de> (raw)
In-Reply-To: <20170119073941.8057-1-sr@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 <sr@denx.de>
Cc: Jaehoon Chung <jh80.chung@samsung.com>
Cc: Simon Glass <sjg@chromium.org>
---
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
next prev parent reply other threads:[~2017-01-19 7:39 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20170119074123epcas4p41de3533e3465771004b7d800684021db@epcas4p4.samsung.com>
2017-01-19 7:39 ` [U-Boot] [PATCH 1/9] mmc: sdhci: Clear SDHCI_CLOCK_CONTROL before configuring the new value Stefan Roese
2017-01-19 7:39 ` Stefan Roese [this message]
2017-01-24 6:55 ` [U-Boot] [PATCH 2/9] mmc: sdhci: Add support for optional controller specific set_ios_post() Jaehoon Chung
2017-01-19 7:39 ` [U-Boot] [PATCH 3/9] mmc: Add Marvell Xenon SDHCI controller driver Stefan Roese
2017-01-19 23:16 ` Masahiro Yamada
2017-01-20 5:48 ` Stefan Roese
2017-01-19 7:39 ` [U-Boot] [PATCH 4/9] arm64: mvebu: Armada 3700: Add SDHCI device tree nodes Stefan Roese
2017-01-19 7:39 ` [U-Boot] [PATCH 5/9] arm64: mvebu: Armada 3720-db: " Stefan Roese
2017-01-19 7:39 ` [U-Boot] [PATCH 6/9] arm64: mvebu: Enable SDHCI/MMC support for the db-88f3720 Stefan Roese
2017-01-19 7:39 ` [U-Boot] [PATCH 7/9] arm64: mvebu: Armada 7k/8k: Add SDHCI device tree nodes Stefan Roese
2017-01-19 7:39 ` [U-Boot] [PATCH 8/9] arm64: mvebu: Armada 7040-db: " Stefan Roese
2017-01-19 7:39 ` [U-Boot] [PATCH 9/9] arm64: mvebu: Enable SDHCI/MMC support for the db-88f7040/8040 Stefan Roese
2017-01-24 6:55 ` [U-Boot] [PATCH 1/9] mmc: sdhci: Clear SDHCI_CLOCK_CONTROL before configuring the new value Jaehoon Chung
2017-01-25 7:43 ` Stefan Roese
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170119073941.8057-2-sr@denx.de \
--to=sr@denx.de \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox