USB: octeon2-common: Don't reinitialize the clocks.
authorDavid Daney <ddaney@caviumnetworks.com>
Wed, 27 Apr 2011 17:54:20 +0000 (10:54 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 3 May 2011 17:09:31 +0000 (10:09 -0700)
commitf5ced99725d05f521ef0f597e688c19835e59c55
treead43e943897b61d26d009a14c325fe9782aa1765
parentdbc265465a3fc8ac8d75d3ede7e84ea122a8fd0a
USB: octeon2-common: Don't reinitialize the clocks.

The UCTL clock initialization will cause the ehci and ohci blocks to
become inoperable if the clocks are reinitialized.

Check to see if the clocks have already been initialized.

Also use a mutex to protect the clock initialization code so that
there can be no attempt to use the clocks before they are fully
configured.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/host/octeon2-common.c