ARM: SAMSUNG: Modified to change of bus width and host caps
authorHyuk Lee <hyuk1.lee@samsung.com>
Fri, 8 Oct 2010 09:03:23 +0000 (18:03 +0900)
committerKukjin Kim <kgene.kim@samsung.com>
Mon, 25 Oct 2010 07:02:41 +0000 (16:02 +0900)
This patch adds to change bus width and host capability of HSMMC,
when HSMMC is only configured with another value of bus width
and host capability from default one.

Signed-off-by: Hyuk Lee <hyuk1.lee@samsung.com>
Signed-off-by: Jeongbae Seo <jeongbae.seo@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
arch/arm/plat-samsung/dev-hsmmc.c
arch/arm/plat-samsung/dev-hsmmc1.c
arch/arm/plat-samsung/dev-hsmmc2.c
arch/arm/plat-samsung/dev-hsmmc3.c

index 9d2be0941410946877f042c6d36976bc93103b92..5b8aacb5cbc60a9e00731ba3adaad64dc540080f 100644 (file)
@@ -59,17 +59,18 @@ void s3c_sdhci0_set_platdata(struct s3c_sdhci_platdata *pd)
 {
        struct s3c_sdhci_platdata *set = &s3c_hsmmc0_def_platdata;
 
-       set->max_width = pd->max_width;
        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;
+               set->host_caps |= pd->host_caps;
 }
index a6c8295840afdb23fa61d91815915a902dc42602..9b52828644d67da2a4c8f6bb04e0155e9aca5f15 100644 (file)
@@ -59,17 +59,18 @@ void s3c_sdhci1_set_platdata(struct s3c_sdhci_platdata *pd)
 {
        struct s3c_sdhci_platdata *set = &s3c_hsmmc1_def_platdata;
 
-       set->max_width = pd->max_width;
        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;
+               set->host_caps |= pd->host_caps;
 }
index cb0d7143381a1fe06cfbc75181339548d1309c82..df9e36b54c0d3283160c4872c18db8028e7d9925 100644 (file)
@@ -60,17 +60,18 @@ void s3c_sdhci2_set_platdata(struct s3c_sdhci_platdata *pd)
 {
        struct s3c_sdhci_platdata *set = &s3c_hsmmc2_def_platdata;
 
-       set->max_width = pd->max_width;
        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;
+               set->host_caps |= pd->host_caps;
 }
index 335bc35044d35bab5ab11346413d90397355a9d1..ca80897b0d7c75fd4c9d3cf5f45b5d820115f0ae 100644 (file)
@@ -63,15 +63,18 @@ void s3c_sdhci3_set_platdata(struct s3c_sdhci_platdata *pd)
 {
        struct s3c_sdhci_platdata *set = &s3c_hsmmc3_def_platdata;
 
-       set->max_width = pd->max_width;
        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;
 }