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

Commit 1b898c3c authored by Manu Gautam's avatar Manu Gautam
Browse files

USB: ci13xxx_msm: Disable TXFIFO_IDLE_FORCE bit to prevent corruption



There is a possibility of TX buffer corruption in core (device mode)
if TXFIFO_IDLE_FORCE chicken bit is left enabled. As this bit is not
required with the current core configuration, disable it.

CRs-fixed: 674673
Change-Id: I91c7ca3d02585858bb07c39444a577b3e59fc9c3
Signed-off-by: default avatarManu Gautam <mgautam@codeaurora.org>
parent 3bb9501c
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -143,10 +143,16 @@ static void ci13xxx_msm_reset(void)
	struct ci13xxx *udc = _udc;
	struct usb_phy *phy = udc->transceiver;
	struct device *dev = udc->gadget.dev.parent;
	int	temp;

	writel_relaxed(0, USB_AHBBURST);
	writel_relaxed(0x08, USB_AHBMODE);

	/* workaround for rx buffer collision issue */
	temp = readl_relaxed(USB_GENCONFIG);
	temp &= ~GENCONFIG_TXFIFO_IDLE_FORCE_DISABLE;
	writel_relaxed(temp, USB_GENCONFIG);

	if (udc->gadget.l1_supported)
		ci13xxx_msm_set_l1(udc);

+1 −0
Original line number Diff line number Diff line
@@ -75,6 +75,7 @@
#define ULPI_DATA_READ(n)     (((n) >> 8) & 255)

#define GENCONFIG_BAM_DISABLE (1 << 13)
#define GENCONFIG_TXFIFO_IDLE_FORCE_DISABLE (1 << 4)

/* synopsys 28nm phy registers */
#define ULPI_PWR_CLK_MNG_REG	0x88