Call flow control API when RNDIS packet filter control message is
received. This allows to call the registered flow control call back
from rndis clients supporting hw accelerated path.
CRs-Fixed: 1013824
Change-Id: I87793e31d4db10acf1103127a2d1ad942d253c67
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
This change starts using dl_max_packet_size value sent by host
as part of USB RNDIS init message communication. Using default
dl_max_packet_size value results into low throughput with more
data loss on host side as host side RNDIS can't support
de-aggregation (applicable for Linux Host RNDIS driver) or it
ignores received more data then host side RNDIS can handle. To
use fine tune dl_max_packet_size for better throughput, driver
selects minimum value between host supported dl_max_packet_size
and default size (i.e. 9216 bytes as RNDIS IN aggregation size).
Change-Id: I00c81bc905a032867c537536b01bf32584c37e63
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
Signed-off-by: Jack Pham <jackp@codeaurora.org>
Add pkt_alignment_factor rndis parameter. This
parameter along with max_pkt_per_xfer allow rndis
function driver to aggregate more than one IP packets
per transfer. This is done by calling newly added API
rndis_set_pkt_alignment_factor().
Change-Id: Ic9c543c388f872452e708a3a26be4ae82b54c082
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
Signed-off-by: Jack Pham <jackp@codeaurora.org>
Allow registration for data flow control call back from
rndis functions supporting different transport i.e.
BAM2BAM_IPA, GSI_IPA.
Change-Id: I09df5f7f81e9d9ed0cfd5e54d481db87727bbc75
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
Signed-off-by: Jack Pham <jackp@codeaurora.org>
RNDIS protocol supports data aggregation on uplink and can help
reduce mips by reducing number of interrupts on device. Throughput
also improved by 20-30%. Aggregation is disabled by setting
aggregation packet size to 1. To help better UL throughput, set
as ul aggregation support to 3 rndis packets by default. It can be
configured via sysfs device attribute ul_max_pkt_per_xfer.
Change-Id: I689d37824e71835ed50bf15c3e35a0eced8f116d
Signed-off-by: Vamsi Krishna Samavedam <vskrishn@codeaurora.org>
Signed-off-by: Xerox Lin <xerox_lin@htc.com>
Signed-off-by: Jack Pham <jackp@codeaurora.org>
Some instances of USB controller get XO directly from the
pad and hence don't need a GCC clock to enable it. Allow
xo_clk to be optional if not specified in DT.
Speaking of optional clocks, remove the NULL checks and allow
clk_* APIs to get called unconditionally, since they already
handle NULL pointers. Finally remove the clk_put() call for
xo_clk since it is already devm managed.
Change-Id: I1864219b89c7a636989f44fa7d6640bf5f156453
Signed-off-by: Jack Pham <jackp@codeaurora.org>
Not all instances of the controller should be tied to the
USB power_supply. For example in cases of multiple instances,
we do not want all instances manipulating the SDP current
draw by setting the power_supply property, as there is only
usually only a single charger instance.
Replace power_supply lookup by "usb" name to a phandle lookup.
DT must specify a "qcom,usb-charger" property pointing to the
charger instance.
Change-Id: Ibd90337782b23f5e1a1a1c2af5a48c49be37823d
Signed-off-by: Jack Pham <jackp@codeaurora.org>
Add a helper function which a function driver such as f_gsi can
use to choose an endpoint by name, eg ep1in-gsi.
Change-Id: Id9fd42e423cb1c99c7c98a761dec0cd8bf150b82
Signed-off-by: Jack Pham <jackp@codeaurora.org>
Currently controller is enabling only shallow low power mode during
L1 suspend in host mode. Power savings can be improved by allowing
deep low power mode allowing PLL to be turned OFF. Configuring
the GUCTL1 register to enable this feature.
Change-Id: Iea6cfa2c9085a01f45a9f0d633c80368ad085806
Signed-off-by: Elson Roy Serrao <eserrao@codeaurora.org>
Signed-off-by: Jack Pham <jackp@codeaurora.org>
Ratelimit the logs indicating invalid packet status fields.
Support DL Frag rule status opcode. The logs introduces
delay during modem ssr.
Change-Id: I92ebf8776dd0e81653c968985818124cbe539d5f
Signed-off-by: Akshay Pandit <pandit@codeaurora.org>
This change adds the driver for the USB controller on QTI MSM
devices. This is a snapshot of the driver from msm-4.19 as of
commit 104eef6e1fe8 ("platform: msm: Remove unused local count
variable").
In addition to the msm-4.19 version, this change includes several
fixups to address the following:
- Building dwc3-msm as a module. It is easiest to just merge
dbm.c into dwc3-msm.c.
- Coccinelle warnings, such as assigning 0/1 to a boolean and
missing newlines from log strings.
- Conversion of defunct msm_bus API to the interconnect bus
scaling API.
- Remove dead host controller handling as it depends on a
USB_BUS_DIED notification added to usbcore on downstream and
has not yet been mainlined on this kernel. We will either have
to bring in the atomic notifier or switch to listening to the
"ERROR=DEAD" uevent and take action from userspace.
- Remove extcon blocking notifier and MED_HIGH_CURRENT.
- Remove usage of PM_QOS_REQ_AFFINE_IRQ as PM QoS support for
specifying IRQ/CPU affinity is not supported upstream. Just
request a QoS level for all cores.
- Endpoints' ep_type EP_TYPE_GSI is now reflected in dep->gsi
- dwc3_stop_active_transfer() takes a dep directly and added
an additional parameter to skip IOC
- Remove RESTART_USB_SESSION notification as the usb_gadget_ops
restart_session is not supported in upstream
- dwc3_request->started replaced by DWC3_REQUEST_STATUS_STARTED
- Switch USB_DR_MODE_DRD enum back to USB_DR_MODE_OTG
- Directly write GUSB3PIPECTL_SUSPHY and DEVTEN registers instead
of needing APIs from core
- Remove clk_set_flags. These aren't needed now.
- Remove FLOAT charger handling.
Change-Id: I9a13cb5bae2f5c1e98906d1cb52134c2dea0bc80
Signed-off-by: Jack Pham <jackp@codeaurora.org>
Pure carveouts (i.e. memory that is completely unmanaged by the
kernel) do not have any initialization routines associated
with them. So, ignore them when checking if a region has already
been initialized by the reserved memory framework.
Change-Id: Ied0db066a372751f40327460e583a81ad5b5429f
Signed-off-by: Isaac J. Manjarres <isaacm@codeaurora.org>
Synx driver manages synchronization and dependency
handling across heterogeneous cores.
Modified kernel APIs with support for kernel clients.
Changes to synx handle creation, synx object handling
and cleanup.
Support for building synx driver as loadable module.
Change-Id: I2d70d753872467895ef4cf5a85326b7a92310986
Signed-off-by: Sumukh Hallymysore Ravindra <shallymy@codeaurora.org>
The qrtr v1 packet header has values that are changed to le32. Use the
le32_to_cpu() macro before using any values from the header struct.
Change-Id: I84731380c22f1cd8e89f9a594e6da0279feb8c2b
Signed-off-by: Chris Lew <clew@codeaurora.org>
This change adds USB PHY drivers for high speed and super speed/plus
functionality on QTI MSM platforms. This snapshot is taken as of
msm-4.19 commit <8197f81ffc14> ("Merge "msm: kgsl: Correct HFI
acknowledgment failure condition"").
Change-Id: Iede74fa0fd037a0741ee3269d78adb372600ea8d
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
This change adds snapshot of USB BAM driver which allows USB BAM to
communicate with other peripherals' (e.g. QDSS or IPA) BAM.
This snapshot is taken as of msm-4.19 kernel commit <b318a6e04625>
("Merge "msm: ipa4: Fix to use common PM handle for coalescing and
default pipe"").
Change-Id: I747e4defab668d44bdc956e318492dd30880a166
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
This change adds USB CDEV function driver which creates USB
character device to provide DUN and NMEA functionality.
This snapshot is taken as of msm-4.19 commit 104eef6e1fe8 ("platform:
msm: Remove unused local count variable").
Change-Id: I2a20aec1c21a506f8981e907bc0f0f58fff7fe58
Signed-off-by: Jack Pham <jackp@codeaurora.org>
This USB CCID function driver will be a transport layer between the
userspace CCID component and the Windows Host. Data and control
commands from the Windows Host will be sent to the userspace component
and vice-versa. This snapshot is taken as of msm-4.19 commit 104eef6e1fe8
("platform: msm: Remove unused local count variable").
Change-Id: I47301a318cb04c814699abf3e5ed5a9aecd7fbee
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
The spss-util driver provides utilities required for the Secure
Processor Subsystem (SPSS). It provides the fuse state for key selection
and the SPSS HW version.
Add snapshot for spss-util driver from msm-4.19 commit a7793b40172f
("soc: qcom: spss_utils: fix spss SSR when IAR not active").
Change-Id: I6531cae56cec9d062fa03c573bcd70207d10f1a2
Signed-off-by: Konstantin Dorfman <kdorfman@codeaurora.org>
Update function definition to declare as static.
Change-Id: Id1f74aa53267e128c40cc8397928baa58cbaa2db
Signed-off-by: Maulik Shah <mkshah@codeaurora.org>
SWAO msr has been moved to SWAO csr. Add the support in driver
to program it.
Change-Id: Ied618265a117a5fcd385524e1ec9aa4ce4e84deb
Signed-off-by: Tingwei Zhang <tingwei@codeaurora.org>
According to the comment in dwc3_get_dr_mode() controller
revisions > 3.30a, including dwc_usb31, do not support OTG.
However, dual-role switching can still be supported with the
use of an extcon or usb_role_switch driver, so there is no
need to restrict the operation to host-only or peripheral-only.
Change-Id: I7dea9ff15f5ac15f673c4569ffe401981de04f22
Signed-off-by: Jack Pham <jackp@codeaurora.org>