Re: [PATCH 1/3 v4] usb: chipidea: Reallocate regmap only if lpm is detected

2013-12-03 Thread Marc Kleine-Budde
On 12/03/2013 09:01 AM, Chris Ruehl wrote:
 usb: chipidea: Reallocate regmap only if lpm is detected
 
 The regmap only needs to reallocate if the hw_read on the CAP register shows
 lpm is used. Therefore the if() statement check the change.
 
 Signed-off-by: Chris Ruehl chris.ru...@gtsys.com.hk
 Acked-by: Peter Chen peter.c...@freescale.com
 ---
  drivers/usb/chipidea/core.c |7 ++-
  1 file changed, 6 insertions(+), 1 deletion(-)
 
 diff --git a/drivers/usb/chipidea/core.c b/drivers/usb/chipidea/core.c
 index 5d8981c..9a5ef20 100644
 --- a/drivers/usb/chipidea/core.c
 +++ b/drivers/usb/chipidea/core.c
 @@ -208,7 +208,8 @@ static int hw_device_init(struct ci_hdrc *ci, void 
 __iomem *base)
   reg = hw_read(ci, CAP_HCCPARAMS, HCCPARAMS_LEN) 
   __ffs(HCCPARAMS_LEN);
   ci-hw_bank.lpm  = reg;
 - hw_alloc_regmap(ci, !!reg);
 + if (reg)
 + hw_alloc_regmap(ci, !!reg);
   ci-hw_bank.size = ci-hw_bank.op - ci-hw_bank.abs;
   ci-hw_bank.size += OP_LAST;
   ci-hw_bank.size /= sizeof(u32);
 @@ -642,6 +643,10 @@ static int ci_hdrc_probe(struct platform_device *pdev)
   : CI_ROLE_GADGET;
   }
  
 + /* only update vbus status for peripheral */
 + if (ci-role == CI_ROLE_GADGET)
 + ci_handle_vbus_change(ci);
 +

This change seems unrelated to me.

Marc

   ret = ci_role_start(ci, ci-role);
   if (ret) {
   dev_err(dev, can't start %s role\n, ci_role(ci)-name);
 


-- 
Pengutronix e.K.  | Marc Kleine-Budde   |
Industrial Linux Solutions| Phone: +49-231-2826-924 |
Vertretung West/Dortmund  | Fax:   +49-5121-206917- |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |



signature.asc
Description: OpenPGP digital signature


RE: [PATCH 1/3 v4] usb: chipidea: Reallocate regmap only if lpm is detected

2013-12-03 Thread Peter Chen

 
 
  Signed-off-by: Chris Ruehl chris.ru...@gtsys.com.hk
  Acked-by: Peter Chen peter.c...@freescale.com
  ---
   drivers/usb/chipidea/core.c |7 ++-
   1 file changed, 6 insertions(+), 1 deletion(-)
 
  diff --git a/drivers/usb/chipidea/core.c b/drivers/usb/chipidea/core.c
  index 5d8981c..9a5ef20 100644
  --- a/drivers/usb/chipidea/core.c
  +++ b/drivers/usb/chipidea/core.c
  @@ -208,7 +208,8 @@ static int hw_device_init(struct ci_hdrc *ci, void
 __iomem *base)
  reg = hw_read(ci, CAP_HCCPARAMS, HCCPARAMS_LEN) 
  __ffs(HCCPARAMS_LEN);
  ci-hw_bank.lpm  = reg;
  -   hw_alloc_regmap(ci, !!reg);
  +   if (reg)
  +   hw_alloc_regmap(ci, !!reg);
  ci-hw_bank.size = ci-hw_bank.op - ci-hw_bank.abs;
  ci-hw_bank.size += OP_LAST;
  ci-hw_bank.size /= sizeof(u32);
  @@ -642,6 +643,10 @@ static int ci_hdrc_probe(struct platform_device
 *pdev)
  : CI_ROLE_GADGET;
  }
 
  +   /* only update vbus status for peripheral */
  +   if (ci-role == CI_ROLE_GADGET)
  +   ci_handle_vbus_change(ci);
  +
 
 This change seems unrelated to me.
 
 Marc

Hi Chris. Why above change is there, it is not existed at your v3 patch.

Peter

 
  ret = ci_role_start(ci, ci-role);
  if (ret) {
  dev_err(dev, can't start %s role\n, ci_role(ci)-name);
 
 
 
 --
 Pengutronix e.K.  | Marc Kleine-Budde   |
 Industrial Linux Solutions| Phone: +49-231-2826-924 |
 Vertretung West/Dortmund  | Fax:   +49-5121-206917- |
 Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |

N�r��yb�X��ǧv�^�)޺{.n�+{��^n�r���z���h����G���h�(�階�ݢj���m��z�ޖ���f���h���~�m�

Re: [PATCH 1/3 v4] usb: chipidea: Reallocate regmap only if lpm is detected

2013-12-03 Thread Chris Ruehl

@@ -642,6 +643,10 @@ static int ci_hdrc_probe(struct platform_device *pdev)
: CI_ROLE_GADGET;
}

+   /* only update vbus status for peripheral */
+   if (ci-role == CI_ROLE_GADGET)
+   ci_handle_vbus_change(ci);
+


This change seems unrelated to me.

Marc


My fault I test a patch from Fabio on the wrong working branch. I must be
more careful.

Chris
--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html