usb: chipidea: add proper delay for waiting correct PHY status
authorPeter Chen <peter.chen@freescale.com>
Wed, 23 Apr 2014 07:56:41 +0000 (15:56 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 24 Apr 2014 19:56:34 +0000 (12:56 -0700)
commit90893b90d372f9c721ab8cd64b66230670deded3
tree30276d209812d4e9ddbaf4fa97ff098b6e71b935
parentc4a8b6392a3f131259aa2392cfc6bb6d0ca549f9
usb: chipidea: add proper delay for waiting correct PHY status

After the PHY has powered and initialized, it needs some delay
for controller to reflect PHY's status. Some status and values
for id, vbus, dp/dm are only stable after this delay. The current
code tries to clear id/vbus status without enough delay, it
causes the status are not cleared properly.

This patch add 2ms delay after phy has initialized, and clear the
unexpected status after that.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Tested-by: Li Jun <b47624@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/chipidea/core.c