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

Commit c4d66bde authored by Mayank Rana's avatar Mayank Rana
Browse files

dwc3: core: remove nominal_elastic_buffer related functionality



On newer platform, GUSB3PIPECTL.ELASTIC_BUFFER_MODE value is set
properly. Hence remove code which modifies this value.

Also remove unused usb3_u1u2_disable variable as u1u2 disable
related functionality is removed now.

Change-Id: Ieac97dc403d0c7223c54d889af39e2b1867d7af1
Signed-off-by: default avatarMayank Rana <mrana@codeaurora.org>
parent bed4cbb7
Loading
Loading
Loading
Loading
+0 −11
Original line number Diff line number Diff line
@@ -849,17 +849,6 @@ int dwc3_core_init(struct dwc3 *dwc)
	if (ret < 0)
		goto err2;

	/*
	 * clear Elastic buffer mode in GUSBPIPE_CTRL(0) register, otherwise
	 * it results in high link errors and could cause SS mode transfer
	 * failure.
	 */
	if (!dwc->nominal_elastic_buffer) {
		reg = dwc3_readl(dwc->regs, DWC3_GUSB3PIPECTL(0));
		reg &= ~DWC3_GUSB3PIPECTL_ELASTIC_BUF_MODE;
		dwc3_writel(dwc->regs, DWC3_GUSB3PIPECTL(0), reg);
	}

	switch (dwc->dr_mode) {
	case USB_DR_MODE_PERIPHERAL:
		dwc3_set_mode(dwc, DWC3_GCTL_PRTCAP_DEVICE);
+0 −3
Original line number Diff line number Diff line
@@ -925,7 +925,6 @@ struct dwc3_scratchpad_array {
 * 	3	- Reserved
 * @is_drd: device supports dual-role or not
 * @err_evt_seen: previous event in queue was erratic error
 * @usb3_u1u2_disable: if true, disable U1U2 low power modes in Superspeed mode.
 * @in_lpm: indicates if controller is in low power mode (no clocks)
 * @tx_fifo_size: Available RAM size for TX fifo allocation
 * @irq: irq number
@@ -1095,9 +1094,7 @@ struct dwc3 {
	unsigned		vbus_active:1;
	/* Indicate if software connect was issued by the usb_gadget_driver */
	unsigned		softconnect:1;
	unsigned		nominal_elastic_buffer:1;
	unsigned		err_evt_seen:1;
	unsigned		usb3_u1u2_disable:1;
	/* Indicate if need to disable controller internal clkgating */
	unsigned		disable_clk_gating:1;
	unsigned		enable_bus_suspend:1;