diff options
author | Banajit Goswami <banajit.g@samsung.com> | 2011-08-18 15:32:01 +0400 |
---|---|---|
committer | Kukjin Kim <kgene.kim@samsung.com> | 2011-09-16 10:43:15 +0400 |
commit | 5e8e0a109e3c1b08c1407c615684bb9981aca28f (patch) | |
tree | e3e685d8bdd9ddcaafd23ade8fe8266256e3150d /arch/arm/plat-samsung/platformdata.c | |
parent | 3e461977d1aff9b4d1785815f4eb2098657a0500 (diff) | |
download | linux-5e8e0a109e3c1b08c1407c615684bb9981aca28f.tar.xz |
ARM: SAMSUNG: Consolidate common function to set SDHCI plat data
Moves similar functions to set SDHCI platform data for all Samsung
boards to a common location, thereby saves a few lines.
Signed-off-by: Banajit Goswami <banajit.g@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Diffstat (limited to 'arch/arm/plat-samsung/platformdata.c')
-rw-r--r-- | arch/arm/plat-samsung/platformdata.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/arch/arm/plat-samsung/platformdata.c b/arch/arm/plat-samsung/platformdata.c index 7cf2e1e3b20f..6de1a3825927 100644 --- a/arch/arm/plat-samsung/platformdata.c +++ b/arch/arm/plat-samsung/platformdata.c @@ -14,6 +14,7 @@ #include <linux/platform_device.h> #include <plat/devs.h> +#include <plat/sdhci.h> void __init *s3c_set_platdata(void *pd, size_t pdsize, struct platform_device *pdev) @@ -35,3 +36,24 @@ void __init *s3c_set_platdata(void *pd, size_t pdsize, pdev->dev.platform_data = npd; return npd; } + +void s3c_sdhci_set_platdata(struct s3c_sdhci_platdata *pd, + struct s3c_sdhci_platdata *set) +{ + set->cd_type = pd->cd_type; + set->ext_cd_init = pd->ext_cd_init; + set->ext_cd_cleanup = pd->ext_cd_cleanup; + set->ext_cd_gpio = pd->ext_cd_gpio; + set->ext_cd_gpio_invert = pd->ext_cd_gpio_invert; + + if (pd->max_width) + set->max_width = pd->max_width; + if (pd->cfg_gpio) + set->cfg_gpio = pd->cfg_gpio; + if (pd->cfg_card) + set->cfg_card = pd->cfg_card; + if (pd->host_caps) + set->host_caps |= pd->host_caps; + if (pd->clk_type) + set->clk_type = pd->clk_type; +} |