From: Kuninori Morimoto Date: Tue, 11 Oct 2011 05:06:35 +0000 (-0700) Subject: usb: gadget: renesas_usbhs: make sure SOF packet sending-out control X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=a9be4a45627c0eaa5f3f16987243530f4df6b514;p=linux-beck.git usb: gadget: renesas_usbhs: make sure SOF packet sending-out control It is enabled to set SOF packet output bit when USBRST bit was set. And USBRST bit should be set 0 when SOF packet was output. Signed-off-by: Kuninori Morimoto Signed-off-by: Felipe Balbi --- diff --git a/drivers/usb/renesas_usbhs/common.c b/drivers/usb/renesas_usbhs/common.c index 1161d78e1665..895eb44a1a51 100644 --- a/drivers/usb/renesas_usbhs/common.c +++ b/drivers/usb/renesas_usbhs/common.c @@ -181,6 +181,13 @@ void usbhs_usbreq_set_val(struct usbhs_priv *priv, struct usb_ctrlrequest *req) */ void usbhs_bus_send_sof_enable(struct usbhs_priv *priv) { + u16 status = usbhs_read(priv, DVSTCTR) & (USBRST | UACT); + + if (status != USBRST) { + struct device *dev = usbhs_priv_to_dev(priv); + dev_err(dev, "usbhs should be reset\n"); + } + usbhs_bset(priv, DVSTCTR, (USBRST | UACT), UACT); }