Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 651f5e49 authored by Kuninori Morimoto's avatar Kuninori Morimoto Committed by Felipe Balbi
Browse files

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: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent 0c6ef985
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -292,6 +292,14 @@ void usbhs_irq_callback_update(struct usbhs_priv *priv, struct usbhs_mod *mod)
	u16 intenb0 = 0;
	struct usbhs_mod_info *info = usbhs_priv_to_modinfo(priv);

	/*
	 * BEMPENB/BRDYENB are picky.
	 * below method is required
	 *
	 *  - clear  INTSTS0
	 *  - update BEMPENB/BRDYENB
	 *  - update INTSTS0
	 */
	usbhs_write(priv, INTENB0, 0);

	usbhs_write(priv, BEMPENB, 0);
@@ -324,5 +332,6 @@ void usbhs_irq_callback_update(struct usbhs_priv *priv, struct usbhs_mod *mod)
		}
	}

	if (intenb0)
		usbhs_write(priv, INTENB0, intenb0);
}