[U-Boot] [PATCH V3 3/5] mmc: sdhci: add mmc structure for host

Lei Wen leiwen at marvell.com
Sat Oct 8 15:47:14 CEST 2011


So that sdhci host would tell in the driver that the mmc current
attributes.

Signed-off-by: Lei Wen <leiwen at marvell.com>
---
Changelog:
V2: no change
V3: no change

 drivers/mmc/sdhci.c |    1 +
 include/sdhci.h     |    2 ++
 2 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c
index 4a92453..31c738e 100644
--- a/drivers/mmc/sdhci.c
+++ b/drivers/mmc/sdhci.c
@@ -377,6 +377,7 @@ int add_sdhci(struct sdhci_host *host, u32 max_clk, u32 min_clk)
 	}
 
 	mmc->priv = host;
+	host->mmc = mmc;
 
 	sprintf(mmc->name, "%s", host->name);
 	mmc->send_cmd = sdhci_send_command;
diff --git a/include/sdhci.h b/include/sdhci.h
index e84d2dc..e4e7ebe 100644
--- a/include/sdhci.h
+++ b/include/sdhci.h
@@ -27,6 +27,7 @@
 #define __SDHCI_HW_H
 
 #include <asm/io.h>
+#include <mmc.h>
 /*
  * Controller registers
  */
@@ -239,6 +240,7 @@ struct sdhci_host {
 	unsigned int quirks;
 	unsigned int version;
 	unsigned int clock;
+	struct mmc *mmc;
 	const struct sdhci_ops *ops;
 };
 
-- 
1.7.0.4



More information about the U-Boot mailing list