From f4fd094cdfd124d7653a500e81ec3bb7ae3e9919 Mon Sep 17 00:00:00 2001 From: Robert Jarzmik Date: Fri, 17 Oct 2014 22:43:06 +0200 Subject: [PATCH] usb: gadget: pxa27x_udc: fix clock prepare and enable As the udc clock controls both the output signals and the internal IP, it must be enabled before any UDC register is touched. The bug is revealed when the clock framework disables the clock for a couple of milliseconds during the boot sequence, and the endpoint configuration is lost. The bug is hidden when clock framework is not used, because no "unused clocks disable" occurs. This patch fixes the wrong behaviour by ensuring that : - whenever a UDC register is read or written, the clock is enabled - reworks the endpoints programming to have it done under running clock - reworks suspend/resume to ensure the same thing Signed-off-by: Robert Jarzmik Signed-off-by: Felipe Balbi --- Reading git-format-patch failed