usb: phy: omap-usb3: Improve DPLL parameter lookup code
authorRoger Quadros <rogerq@ti.com>
Tue, 9 Jul 2013 11:38:31 +0000 (14:38 +0300)
committerFelipe Balbi <balbi@ti.com>
Mon, 29 Jul 2013 10:58:09 +0000 (13:58 +0300)
commit519c6013d356fef95c9e45cfb533b3e68b47dbf4
tree04597d1061d4f76b121c31ef19a7ddda70eecb64
parent88650d62a12de7fb9437b5508cc7f6b28da58cbf
usb: phy: omap-usb3: Improve DPLL parameter lookup code

Use a mapping table (dpll_map) to match the possible system clock rates
to the appropriate DPLL parameters.

Introduce a function "omap_usb3_get_dpll_params()" that will
return the matching DPLL parameters for the given clock rate.

Also, bail out on phy init if DPLL locking fails.

Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/phy/phy-omap-usb3.c