All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3 v4] usb: chipidea: Reallocate regmap only if lpm is detected
@ 2013-12-03  8:01 Chris Ruehl
  2013-12-03  8:01 ` [PATCH 2/3 v4] Fix Internal error: : 808 [#1] ARM related to STS flag Chris Ruehl
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Chris Ruehl @ 2013-12-03  8:01 UTC (permalink / raw)
  To: peter.chen; +Cc: gregkh, linux-usb, linux-kernel, Chris Ruehl

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.ruehl@gtsys.com.hk>
Acked-by: Peter Chen <peter.chen@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);
+
 	ret = ci_role_start(ci, ci->role);
 	if (ret) {
 		dev_err(dev, "can't start %s role\n", ci_role(ci)->name);
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2014-01-24 10:18 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-03  8:01 [PATCH 1/3 v4] usb: chipidea: Reallocate regmap only if lpm is detected Chris Ruehl
2013-12-03  8:01 ` [PATCH 2/3 v4] Fix Internal error: : 808 [#1] ARM related to STS flag Chris Ruehl
2013-12-03  8:01 ` [PATCH 3/3 v4] usb: chipidea: hw_phymode_configure moved before ci_usb_phy_init Chris Ruehl
2013-12-03 14:27   ` Peter Chen
2014-01-22  9:49   ` Regression on next-20140116 [Was: [PATCH 3/3 v4] usb: chipidea: hw_phymode_configure moved before ci_usb_phy_init] Uwe Kleine-König
2014-01-22 21:41     ` Uwe Kleine-König
2014-01-23  1:22       ` Peter Chen
2014-01-23  4:59         ` Chris Ruehl
2014-01-24 10:18         ` Uwe Kleine-König
2013-12-03 11:12 ` [PATCH 1/3 v4] usb: chipidea: Reallocate regmap only if lpm is detected Marc Kleine-Budde
2013-12-03 13:57   ` Peter Chen
2013-12-04  1:37   ` Chris Ruehl

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.