mmc: sdhci: add mmc structure for host
authorLei Wen <leiwen@marvell.com>
Sat, 8 Oct 2011 04:14:56 +0000 (04:14 +0000)
committerAndy Fleming <afleming@freescale.com>
Thu, 3 Nov 2011 07:14:59 +0000 (02:14 -0500)
So that sdhci host would tell in the driver that the mmc current
attributes.

Signed-off-by: Lei Wen <leiwen@marvell.com>
drivers/mmc/sdhci.c
include/sdhci.h

index 4a92453463c671186c4c7f1f446206b9a8ac8564..31c738e9aff4fbe1dcde3306c7060b326ef713c6 100644 (file)
@@ -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;
index e84d2dc2366b935b6b0efced8d7287330b8cfa7b..0690938046844a769ee340ad4e175b8a9d08c2ed 100644 (file)
@@ -27,6 +27,8 @@
 #define __SDHCI_HW_H
 
 #include <asm/io.h>
+#include <mmc.h>
+
 /*
  * Controller registers
  */
@@ -239,6 +241,7 @@ struct sdhci_host {
        unsigned int quirks;
        unsigned int version;
        unsigned int clock;
+       struct mmc *mmc;
        const struct sdhci_ops *ops;
 };