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

Commit 11935de5 authored by Kuninori Morimoto's avatar Kuninori Morimoto Committed by Felipe Balbi
Browse files

usb: gadget: renesas_usbhs: change usbhsc_bus_ctrl() to usbsc_set_buswait()



renesas_usbhs will have register DVSTCTR control function for HOST support.
This patch changes usbhsc_bus_ctrl() to usbsc_set_buswait(),
to remove DVSTCTR access from it,

Signed-off-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent 651f5e49
Loading
Loading
Loading
Loading
+5 −10
Original line number Diff line number Diff line
@@ -149,18 +149,14 @@ int usbhs_frame_get_num(struct usbhs_priv *priv)
/*
 *		local functions
 */
static void usbhsc_bus_ctrl(struct usbhs_priv *priv, int enable)
static void usbhsc_set_buswait(struct usbhs_priv *priv)
{
	int wait = usbhs_get_dparam(priv, buswait_bwait);
	u16 data = 0;

	if (enable) {
	/* set bus wait if platform have */
	if (wait)
		usbhs_bset(priv, BUSWAIT, 0x000F, wait);
}
	usbhs_write(priv, DVSTCTR, data);
}

/*
 *		platform default param
@@ -191,10 +187,9 @@ static void usbhsc_power_ctrl(struct usbhs_priv *priv, int enable)

		/* USB on */
		usbhs_sys_clock_ctrl(priv, enable);
		usbhsc_bus_ctrl(priv, enable);
		usbhsc_set_buswait(priv);
	} else {
		/* USB off */
		usbhsc_bus_ctrl(priv, enable);
		usbhs_sys_clock_ctrl(priv, enable);

		/* disable PM */
+2 −0
Original line number Diff line number Diff line
@@ -101,6 +101,8 @@ struct renesas_usbhs_driver_param {
	 * option:
	 *
	 * for BUSWAIT :: BWAIT
	 * see
	 *	renesas_usbhs/common.c :: usbhsc_set_buswait()
	 * */
	int buswait_bwait;