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

Commit 4e73469f authored by Mayank Rana's avatar Mayank Rana
Browse files

usb: dwc3-msm: Remove usage of QDSS based resize FIFO functionality



This change removes QDSS based resize fifo functionality as there is
always IMEM based memory allocated for USB QDSS BAM usecase. Hence
remove this functionality.

Change-Id: I77703f4fc5518cc094fae75903a79c285158af78
Signed-off-by: default avatarMayank Rana <mrana@codeaurora.org>
parent 7e681ea6
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -37,8 +37,6 @@ Optional properties :
  regulator node to the USB controller.
- qcom,dwc-usb3-msm-tx-fifo-size: If present, represents RAM size available for
		TX fifo allocation in bytes
- qcom,dwc-usb3-msm-qdss-tx-fifo-size: If present, represent RAM size available
		for TX fifo allocation in QDSS composition
- qcom,restore-sec-cfg-for-scm-dev-id: If present then device id value is
  passed to secure channel manager(scm) driver. scm driver uses this device
  id to restore USB controller related security configuration after coming
@@ -73,7 +71,6 @@ Example MSM USB3.0 controller device node :
		qcom,dwc-usb3-msm-dbm-eps = <4>
		qcom,dwc_usb3-adc_tm = <&pm8941_adc_tm>;
		qcom,dwc-usb3-msm-tx-fifo-size = <29696>;
		qcom,dwc-usb3-msm-qdss-tx-fifo-size = <16384>;
		qcom,usb-dbm = <&dbm_1p4>;
		qcom,lpm-to-suspend-delay-ms = <2>;
		qcom,vbus-present;
+0 −1
Original line number Diff line number Diff line
@@ -934,7 +934,6 @@ struct dwc3 {
	u8			lpm_nyet_thresh;
	atomic_t		in_lpm;
	int			tx_fifo_size;
	bool			tx_fifo_reduced;
	bool			b_suspend;

	/* IRQ timing statistics */
+0 −23
Original line number Diff line number Diff line
@@ -198,7 +198,6 @@ struct dwc3_msm {
	unsigned int		current_max;
	unsigned int		health_status;
	unsigned int		tx_fifo_size;
	unsigned int		qdss_tx_fifo_size;
	bool			vbus_active;
	bool			ext_inuse;
	bool			rm_pulldown;
@@ -863,23 +862,6 @@ int msm_ep_unconfig(struct usb_ep *ep)
	return 0;
}
EXPORT_SYMBOL(msm_ep_unconfig);

void dwc3_tx_fifo_resize_request(struct usb_ep *ep, bool qdss_enabled)
{
	struct dwc3_ep *dep = to_dwc3_ep(ep);
	struct dwc3 *dwc = dep->dwc;
	struct dwc3_msm *mdwc = dev_get_drvdata(dwc->dev->parent);

	if (qdss_enabled) {
		dwc->tx_fifo_reduced = true;
		dwc->tx_fifo_size = mdwc->qdss_tx_fifo_size;
	} else {
		dwc->tx_fifo_reduced = false;
		dwc->tx_fifo_size = mdwc->tx_fifo_size;
	}
}
EXPORT_SYMBOL(dwc3_tx_fifo_resize_request);

static void dwc3_resume_work(struct work_struct *w);

static void dwc3_restart_usb_work(struct work_struct *w)
@@ -2814,11 +2796,6 @@ static int dwc3_msm_probe(struct platform_device *pdev)
		dev_err(&pdev->dev,
			"unable to read platform data tx fifo size\n");

	if (of_property_read_u32(node, "qcom,dwc-usb3-msm-qdss-tx-fifo-size",
				 &mdwc->qdss_tx_fifo_size))
		dev_err(&pdev->dev,
			"unable to read platform data qdss tx fifo size\n");

	dwc3_set_notifier(&dwc3_msm_notify_event);

	/* Assumes dwc3 is the only DT child of dwc3-msm */
+0 −18
Original line number Diff line number Diff line
@@ -213,7 +213,6 @@ int dwc3_gadget_resize_tx_fifos(struct dwc3 *dwc)
				usb_endpoint_xfer_bulk(dep->endpoint.desc))
				|| usb_endpoint_xfer_isoc(dep->endpoint.desc))
			mult = 3;

		/*
		 * REVISIT: the following assumes we will always have enough
		 * space available on the FIFO RAM for all possible use cases.
@@ -226,23 +225,6 @@ int dwc3_gadget_resize_tx_fifos(struct dwc3 *dwc)
		 * packets
		 */
		tmp = mult * (dep->endpoint.maxpacket + mdwidth);

		if (dwc->tx_fifo_size &&
			(usb_endpoint_xfer_bulk(dep->endpoint.desc)
			|| usb_endpoint_xfer_isoc(dep->endpoint.desc))) {
			/*
			 * Allocate 3KB fifo size for bulk and isochronous TX
			 * endpoints irrespective of speed if tx_fifo is not
			 * reduced. Otherwise allocate 1KB for endpoints in HS
			 * mode and for non burst endpoints in SS mode. For
			 * interrupt ep, allocate fifo size of ep maxpacket.
			 */
			if (!dwc->tx_fifo_reduced)
				tmp = 3 * (1024 + mdwidth);
			else
				tmp = mult * (1024 + mdwidth);
		}

resize_fifo:
		tmp += mdwidth;

+1 −8
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@
 *
 * Copyright (C) 2008 Google, Inc.
 * Author: Brian Swetland <swetland@google.com>
 * Copyright (c) 2009-2014, The Linux Foundation. All rights reserved.
 * Copyright (c) 2009-2015, The Linux Foundation. All rights reserved.
 *
 * This software is licensed under the terms of the GNU General Public
 * License version 2, as published by the Free Software Foundation, and
@@ -665,7 +665,6 @@ static inline void msm_hw_bam_disable(bool bam_disable)
#ifdef CONFIG_USB_DWC3_MSM
int msm_ep_config(struct usb_ep *ep);
int msm_ep_unconfig(struct usb_ep *ep);
void dwc3_tx_fifo_resize_request(struct usb_ep *ep, bool qdss_enable);
int msm_data_fifo_config(struct usb_ep *ep, phys_addr_t addr, u32 size,
	u8 dst_pipe_idx);
bool msm_dwc3_reset_ep_after_lpm(struct usb_gadget *gadget);
@@ -691,12 +690,6 @@ static inline int msm_ep_unconfig(struct usb_ep *ep)
	return -ENODEV;
}

static inline void dwc3_tx_fifo_resize_request(
					struct usb_ep *ep, bool qdss_enable)
{
	return;
}

static inline void msm_dwc3_restart_usb_session(struct usb_gadget *gadget)
{
	return;