diff options
author | Thomas Abraham <thomas.abraham@linaro.org> | 2012-09-17 18:16:41 +0000 |
---|---|---|
committer | Chris Ball <cjb@laptop.org> | 2012-10-03 10:05:18 -0400 |
commit | 17403f235e94dcccf95b43138b197c4de2ab6816 (patch) | |
tree | ec54f858116e05aa134bf8d8d9f6cbeb82f405cf /drivers/mmc/host/dw_mmc-pltfm.c | |
parent | c91eab4b2564f2424268113ab348eacf9381c2d9 (diff) | |
download | blackbird-obmc-linux-17403f235e94dcccf95b43138b197c4de2ab6816.tar.gz blackbird-obmc-linux-17403f235e94dcccf95b43138b197c4de2ab6816.zip |
mmc: dw_mmc: prepare functions in dw_mmc-pltfm for reuse
Platform implementations of dw-mshc controller may choose to extend the
features of the standard dw-mshc controller such as adding additional
clocking options or modifying the bus interface. Support for such
implementation specific extensions can be incorporated into dw_mmc-pltfm,
but including multiple such platform specific implementations would
convolute the existing dw_mmc-pltfm code.
Instead, it would be better to create implementation specific platform
drivers to support implementation specific features. Such platforms
drivers can reuse the existing infrastructure in dw_mmc-pltfm for
resource identification and controller registration and provide support
for implementation specific features. So, allow the infrastructure in
dw_mmc-pltfm to be reused by other implementation specific platform
drivers.
Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org>
Acked-by: Will Newton <will.newton@imgtec.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers/mmc/host/dw_mmc-pltfm.c')
-rw-r--r-- | drivers/mmc/host/dw_mmc-pltfm.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/mmc/host/dw_mmc-pltfm.c b/drivers/mmc/host/dw_mmc-pltfm.c index 72059050540f..e17da912efff 100644 --- a/drivers/mmc/host/dw_mmc-pltfm.c +++ b/drivers/mmc/host/dw_mmc-pltfm.c @@ -23,7 +23,7 @@ #include "dw_mmc.h" -static int __devinit dw_mci_pltfm_probe(struct platform_device *pdev) +int dw_mci_pltfm_register(struct platform_device *pdev) { struct dw_mci *host; struct resource *regs; @@ -52,6 +52,12 @@ static int __devinit dw_mci_pltfm_probe(struct platform_device *pdev) ret = dw_mci_probe(host); return ret; } +EXPORT_SYMBOL_GPL(dw_mci_pltfm_register); + +static int __devinit dw_mci_pltfm_probe(struct platform_device *pdev) +{ + return dw_mci_pltfm_register(pdev); +} static int __devexit dw_mci_pltfm_remove(struct platform_device *pdev) { @@ -61,6 +67,7 @@ static int __devexit dw_mci_pltfm_remove(struct platform_device *pdev) dw_mci_remove(host); return 0; } +EXPORT_SYMBOL_GPL(dw_mci_pltfm_remove); #ifdef CONFIG_PM_SLEEP /* @@ -94,7 +101,8 @@ static int dw_mci_pltfm_resume(struct device *dev) #define dw_mci_pltfm_resume NULL #endif /* CONFIG_PM_SLEEP */ -static SIMPLE_DEV_PM_OPS(dw_mci_pltfm_pmops, dw_mci_pltfm_suspend, dw_mci_pltfm_resume); +SIMPLE_DEV_PM_OPS(dw_mci_pltfm_pmops, dw_mci_pltfm_suspend, dw_mci_pltfm_resume); +EXPORT_SYMBOL_GPL(dw_mci_pltfm_pmops); static const struct of_device_id dw_mci_pltfm_match[] = { { .compatible = "snps,dw-mshc", }, |