summaryrefslogtreecommitdiff
path: root/drivers/mmc/host/sdhci-pltfm.h
diff options
context:
space:
mode:
authorChristian Daudt <csd@broadcom.com>2013-05-29 13:50:05 -0700
committerChris Ball <cjb@laptop.org>2013-05-31 11:59:29 -0400
commit0e748234293f5f2caa8dbd152caba5efb754c707 (patch)
treed264cb090be41c375de32707478036f2374eb543 /drivers/mmc/host/sdhci-pltfm.h
parent7396e318b497cd46eb156effa5278126582ddde7 (diff)
mmc: sdhci: Add size for caller in init+register
Add a param to allow users of sdhci_pltfm to allocate private space in calls to sdhci_pltfm_init+sdhci_pltfm_register. This is implemented in the same way as sdhci does for its users. None of the users have been migrated yet and are passing in zero to retain their private allocation. - todo: migrate clients to using allocation this way - todo: remove priv variable once migration is complete Also removed unused variable in sdhci_pltfm_init fn Signed-off-by: Christian Daudt <csd@broadcom.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers/mmc/host/sdhci-pltfm.h')
-rw-r--r--drivers/mmc/host/sdhci-pltfm.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/drivers/mmc/host/sdhci-pltfm.h b/drivers/mmc/host/sdhci-pltfm.h
index 83d42c60a06f..e15ced79f7ed 100644
--- a/drivers/mmc/host/sdhci-pltfm.h
+++ b/drivers/mmc/host/sdhci-pltfm.h
@@ -28,6 +28,8 @@ struct sdhci_pltfm_host {
/* migrate from sdhci_of_host */
unsigned int clock;
u16 xfer_mode_shadow;
+
+ unsigned long private[0] ____cacheline_aligned;
};
#ifdef CONFIG_MMC_SDHCI_BIG_ENDIAN_32BIT_BYTE_SWAPPER
@@ -92,15 +94,22 @@ static inline void sdhci_be32bs_writeb(struct sdhci_host *host, u8 val, int reg)
extern void sdhci_get_of_property(struct platform_device *pdev);
extern struct sdhci_host *sdhci_pltfm_init(struct platform_device *pdev,
- const struct sdhci_pltfm_data *pdata);
+ const struct sdhci_pltfm_data *pdata,
+ size_t priv_size);
extern void sdhci_pltfm_free(struct platform_device *pdev);
extern int sdhci_pltfm_register(struct platform_device *pdev,
- const struct sdhci_pltfm_data *pdata);
+ const struct sdhci_pltfm_data *pdata,
+ size_t priv_size);
extern int sdhci_pltfm_unregister(struct platform_device *pdev);
extern unsigned int sdhci_pltfm_clk_get_max_clock(struct sdhci_host *host);
+static inline void *sdhci_pltfm_priv(struct sdhci_pltfm_host *host)
+{
+ return (void *)host->private;
+}
+
#ifdef CONFIG_PM
extern const struct dev_pm_ops sdhci_pltfm_pmops;
#define SDHCI_PLTFM_PMOPS (&sdhci_pltfm_pmops)