Re: [PATCH RESEND v7 2/2] mmc: host: sdhci: Add support to disable SDR104/SDR50/DDR50 based on capability register 0.

2015-06-05 Thread Dong Aisheng
On Mon, Jun 01, 2015 at 01:38:47PM +0530, Suman Tripathi wrote:
Hi Aisheng,
On Wed, May 27, 2015 at 7:46 PM, Suman Tripathi [1]stripa...@apm.com
wrote:
 
  On Tue, May 26, 2015 at 6:06 PM, Ulf Hansson [2]ulf.hans...@linaro.org
  wrote:
 
On 21 May 2015 at 10:43, Suman Tripathi [3]stripa...@apm.com wrote:
 The sdhci framework disables SDR104/SDR50/DDR50 based on only quirk.
 This patch adds the support to disable SDR104/SDR50/DDR50 based on
 reading the capability register 0.

 Signed-off-by: Suman Tripathi [4]stripa...@apm.com
 ---
 ---
  drivers/mmc/host/sdhci.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)

 diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
 index 58c1770..a3d9b8a 100644
 --- a/drivers/mmc/host/sdhci.c
 +++ b/drivers/mmc/host/sdhci.c
 @@ -3118,7 +3118,8 @@ int sdhci_add_host(struct sdhci_host *host)
 }
 }

 -   if (host-quirks2  SDHCI_QUIRK2_NO_1_8_V)
 +   if (host-quirks2  SDHCI_QUIRK2_NO_1_8_V ||
 +   !(caps[0]  SDHCI_CAN_VDD_180))
 caps[1] = ~(SDHCI_SUPPORT_SDR104 |
SDHCI_SUPPORT_SDR50 |
SDHCI_SUPPORT_DDR50);

 --
 1.8.2.1

 
I have no problem with this patch, except that it would be nice to get
a few tested by to make sure it doesn't break UHS support for some
SoCs.
 
Kind regards
Uffe
 
  Can anyone test this in some other SoC ? Appreciate your help ..
 
Can you test this patch  on imx SoC ?
 

(Your email have some format issue.)

I have tested this patch and it does not break imx SoC.
You can add my tag.
Tested-by: Dong Aisheng aisheng.d...@freescale.com

However, it looks to me SDHCI_CAN_VDD_180 is only indicating the host VDD
capabiliies, not IO voltage capability.
SD3.0 cards require 1.8v IO voltage support.
So should this bit affect SD3.0 support?
e.g. some hosts can only work at VDD_330 (most VDD of SD slot on IMX boards
is using external regulator and is fixed to 3.3v), but it can support 1.8v
IO voltage, so it can support SD3.0 cards as well.

Ulf,
Can you help confirm it?

Regards
Dong Aisheng

  --
  Thanks,
  with regards,
  Suman Tripathi
 
--
Thanks,
with regards,
Suman Tripathi
 
 References
 
Visible links
1. mailto:stripa...@apm.com
2. mailto:ulf.hans...@linaro.org
3. mailto:stripa...@apm.com
4. mailto:stripa...@apm.com
 perl: warning: Setting locale failed.
 perl: warning: Please check that your locale settings:
   LANGUAGE = (unset),
   LC_ALL = (unset),
   LC_TIME = zh_CN.UTF-8,
   LC_MONETARY = zh_CN.UTF-8,
   LC_ADDRESS = zh_CN.UTF-8,
   LC_TELEPHONE = zh_CN.UTF-8,
   LC_NAME = zh_CN.UTF-8,
   LC_MEASUREMENT = zh_CN.UTF-8,
   LC_IDENTIFICATION = zh_CN.UTF-8,
   LC_NUMERIC = zh_CN.UTF-8,
   LC_PAPER = zh_CN.UTF-8,
   LANG = en_US.UTF-8
 are supported and installed on your system.
 perl: warning: Falling back to the standard locale (C).
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [PATCH v2 1/1] of: reform prom_update_property function

2012-07-06 Thread Dong Aisheng
On Tue, Jun 26, 2012 at 07:40:10AM +0800, Rob Herring wrote:
 On 06/25/2012 01:28 AM, Dong Aisheng wrote:
  From: Dong Aisheng dong.aish...@linaro.org
  
  prom_update_property() currently fails if the property doesn't
  actually exist yet which isn't what we want. Change to add-or-update
  instead of update-only, then we can remove a lot duplicated lines.
  
  Suggested-by: Grant Likely grant.lik...@secretlab.ca
  Signed-off-by: Dong Aisheng dong.aish...@linaro.org
 
 Acked-by: Rob Herring rob.herr...@calxeda.com
 
 Ben, you can merge this via powerpc.
 
 Rob
 
Ping...

Regards
Dong Aisheng

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


[PATCH v2 1/1] of: reform prom_update_property function

2012-06-25 Thread Dong Aisheng
From: Dong Aisheng dong.aish...@linaro.org

prom_update_property() currently fails if the property doesn't
actually exist yet which isn't what we want. Change to add-or-update
instead of update-only, then we can remove a lot duplicated lines.

Suggested-by: Grant Likely grant.lik...@secretlab.ca
Signed-off-by: Dong Aisheng dong.aish...@linaro.org
---
ChangeLog v1-v2:
* keep reconfig.c behavior the same as before after changes
---
 arch/powerpc/platforms/85xx/p1022_ds.c|8 +---
 arch/powerpc/platforms/pseries/mobility.c |8 +---
 arch/powerpc/platforms/pseries/reconfig.c |   16 ++--
 drivers/of/base.c |   15 +++
 fs/proc/proc_devtree.c|5 +
 include/linux/of.h|3 +--
 6 files changed, 25 insertions(+), 30 deletions(-)

diff --git a/arch/powerpc/platforms/85xx/p1022_ds.c 
b/arch/powerpc/platforms/85xx/p1022_ds.c
index f700c81..d66631c 100644
--- a/arch/powerpc/platforms/85xx/p1022_ds.c
+++ b/arch/powerpc/platforms/85xx/p1022_ds.c
@@ -348,13 +348,7 @@ void __init p1022_ds_pic_init(void)
  */
 static void __init disable_one_node(struct device_node *np, struct property 
*new)
 {
-   struct property *old;
-
-   old = of_find_property(np, new-name, NULL);
-   if (old)
-   prom_update_property(np, new, old);
-   else
-   prom_add_property(np, new);
+   prom_update_property(np, new);
 }
 
 /* TRUE if there is a video=fslfb command-line parameter. */
diff --git a/arch/powerpc/platforms/pseries/mobility.c 
b/arch/powerpc/platforms/pseries/mobility.c
index 029a562..dd30b12 100644
--- a/arch/powerpc/platforms/pseries/mobility.c
+++ b/arch/powerpc/platforms/pseries/mobility.c
@@ -67,7 +67,6 @@ static int update_dt_property(struct device_node *dn, struct 
property **prop,
  const char *name, u32 vd, char *value)
 {
struct property *new_prop = *prop;
-   struct property *old_prop;
int more = 0;
 
/* A negative 'vd' value indicates that only part of the new property
@@ -117,12 +116,7 @@ static int update_dt_property(struct device_node *dn, 
struct property **prop,
}
 
if (!more) {
-   old_prop = of_find_property(dn, new_prop-name, NULL);
-   if (old_prop)
-   prom_update_property(dn, new_prop, old_prop);
-   else
-   prom_add_property(dn, new_prop);
-
+   prom_update_property(dn, new_prop);
new_prop = NULL;
}
 
diff --git a/arch/powerpc/platforms/pseries/reconfig.c 
b/arch/powerpc/platforms/pseries/reconfig.c
index 7b3bf76..db1b7b1 100644
--- a/arch/powerpc/platforms/pseries/reconfig.c
+++ b/arch/powerpc/platforms/pseries/reconfig.c
@@ -432,7 +432,7 @@ static int do_update_property(char *buf, size_t bufsize)
unsigned char *value;
char *name, *end, *next_prop;
int rc, length;
-   struct property *newprop, *oldprop;
+   struct property *newprop;
buf = parse_node(buf, bufsize, np);
end = buf + bufsize;
 
@@ -443,6 +443,9 @@ static int do_update_property(char *buf, size_t bufsize)
if (!next_prop)
return -EINVAL;
 
+   if (!strlen(name)
+   return -ENODEV;
+
newprop = new_property(name, length, value, NULL);
if (!newprop)
return -ENOMEM;
@@ -450,18 +453,11 @@ static int do_update_property(char *buf, size_t bufsize)
if (!strcmp(name, slb-size) || !strcmp(name, ibm,slb-size))
slb_set_size(*(int *)value);
 
-   oldprop = of_find_property(np, name,NULL);
-   if (!oldprop) {
-   if (strlen(name))
-   return prom_add_property(np, newprop);
-   return -ENODEV;
-   }
-
upd_value.node = np;
upd_value.property = newprop;
pSeries_reconfig_notify(PSERIES_UPDATE_PROPERTY, upd_value);
 
-   rc = prom_update_property(np, newprop, oldprop);
+   rc = prom_update_property(np, newprop);
if (rc)
return rc;
 
@@ -486,7 +482,7 @@ static int do_update_property(char *buf, size_t bufsize)
 
rc = pSeries_reconfig_notify(action, value);
if (rc) {
-   prom_update_property(np, oldprop, newprop);
+   prom_update_property(np, newprop);
return rc;
}
}
diff --git a/drivers/of/base.c b/drivers/of/base.c
index d9bfd49..a14f109 100644
--- a/drivers/of/base.c
+++ b/drivers/of/base.c
@@ -1051,7 +1051,8 @@ int prom_remove_property(struct device_node *np, struct 
property *prop)
 }
 
 /*
- * prom_update_property - Update a property in a node.
+ * prom_update_property - Update a property in a node, if the property does
+ * not exist, add it.
  *
  * Note that we don't actually remove it, since we have given out
  * who-knows-how-many pointers to the data