aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/renesas_usbhs/mod.c
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2011-10-11 01:01:15 -0400
committerFelipe Balbi <balbi@ti.com>2011-10-13 13:41:37 -0400
commit651f5e49dd3d369711bd622f4bc72c2fa30a3cf9 (patch)
tree40cc503c7aa52bf6f392fa82a2c7539305629865 /drivers/usb/renesas_usbhs/mod.c
parent0c6ef985ced753b60ecdc091fa49c3f5fa4a4f79 (diff)
usb: gadget: renesas_usbhs: tidyup INTENB0 method
This patch tidyup Interrupt Enable Register 0 (INTENB0) which has relationship with picky BEMPENB/BRDYENB. - add explain comment - ignore nonsense 0 write case Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/renesas_usbhs/mod.c')
-rw-r--r--drivers/usb/renesas_usbhs/mod.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/usb/renesas_usbhs/mod.c b/drivers/usb/renesas_usbhs/mod.c
index 621f6cc50db6..74ef49e7dd5f 100644
--- a/drivers/usb/renesas_usbhs/mod.c
+++ b/drivers/usb/renesas_usbhs/mod.c
@@ -292,6 +292,14 @@ void usbhs_irq_callback_update(struct usbhs_priv *priv, struct usbhs_mod *mod)
292 u16 intenb0 = 0; 292 u16 intenb0 = 0;
293 struct usbhs_mod_info *info = usbhs_priv_to_modinfo(priv); 293 struct usbhs_mod_info *info = usbhs_priv_to_modinfo(priv);
294 294
295 /*
296 * BEMPENB/BRDYENB are picky.
297 * below method is required
298 *
299 * - clear INTSTS0
300 * - update BEMPENB/BRDYENB
301 * - update INTSTS0
302 */
295 usbhs_write(priv, INTENB0, 0); 303 usbhs_write(priv, INTENB0, 0);
296 304
297 usbhs_write(priv, BEMPENB, 0); 305 usbhs_write(priv, BEMPENB, 0);
@@ -324,5 +332,6 @@ void usbhs_irq_callback_update(struct usbhs_priv *priv, struct usbhs_mod *mod)
324 } 332 }
325 } 333 }
326 334
327 usbhs_write(priv, INTENB0, intenb0); 335 if (intenb0)
336 usbhs_write(priv, INTENB0, intenb0);
328} 337}