Commit Graph

7 Commits

Author SHA1 Message Date
Chandana Kishori Chiluveru
9ff1e2f9c2 usb: gadget: Enable/Disable USB_BAM based on composition
BAM is used only in USB BAM mode. If platform has BAM enabled
by default in peripheral mode then it may slow down DDR access
by USB and also observing throughput degradation for software path
transfers. Since, USB legacy mode doesn't use BAM2BAM mode disable
the same for USB legacy mode and enable USB BAM based on composition.

Change-Id: I564caea896fb6b7b7acef12dc72e1bf179977b3f
Signed-off-by: Chandana Kishori Chiluveru <cchiluve@codeaurora.org>
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
2018-04-05 18:53:25 +05:30
Vijayavardhan Vennapusa
2f66a26f7d USB: gadget: Fix USB EP flush issues on disconnect
Currently if cable is disconnected or composition switch happens
during BAM2BAM data transfers, USB driver tries to flush USB
endpoint as part of disconnect, which is failing. This eventually
leads to NOC error. Fix the issue by making sure pipes are empty
and IPA endpoints are disabled and perform USB bam reset before
disabling USB endpoints as part of new sequence implementation
recommended by HW designers.

Change-Id: I17000fd380d95497629372a9f6371902f04ca2d9
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
2018-04-04 09:31:12 -07:00
Ajay Agarwal
b7f8e95ea4 usb: f_rmnet: Add support for BAM DMUX data path
Add support for RMNET and DPL functions to work in SW mode using
the BAM DMUX transport driver.

Also clean up the BAM2BAM support from u_bam_dmux.c along with
fixing compilation issues. Also edit the Makefile to compile
BAM DMUX driver.

Change-Id: I5887f4fd599fcd82c3567be3972ad4248c7b7a23
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
2018-02-22 21:03:52 +05:30
Mayank Rana
c40bb37792 USB: Add functionality to map QDSS BAM address space with USB
This change adds functionality to map QDSS BAM address space within
USB context bank, and pass that information to SPS driver.

Change-Id: Idbd13e6faed52be79d36c4bd95674636821ba3ed
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
2017-11-30 11:12:08 -08:00
Ziqi Chen
fc0528ee02 msm: usb_bam: Fix failure of remove by of_platform_depopulate
If device is created by of_platform_populate and removed by
of_platform_depopulate from parent device driver, platform_data
will be released twice and lead to kernel panic.

of_platform_depopulate will free platform_data of each device driver.
Usually we use devm_kzalloc to malloc for platform_data so it can be
released during driver unregister. So if device is removed by
of_platform_depopulate and platform_data is malloced by devm_kzalloc,
platform_data will be freed twice. To fix it, move this data into
struct usb_bam_ctx_type and then store usb_bam_ctx_type into device
driver data. In this way, it can be get in remove function.

The member regs of usb_bam_ctx_type is not necessary. It is only
used for ioremap which already has been done by virt_addr of
struct sps_bam_props.

Without sps_deregister_bam_device, bam child device will not be
created again during defer probe. So deregister in remove function.

Change-Id: Ibae80745be5810d400a1c05566a99efcc2190020
Signed-off-by: Ziqi Chen <ziqic@codeaurora.org>
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
2017-10-05 16:17:51 -07:00
Mayank Rana
f2d0f827ac usb_bam: Fix compilation errors
This change adds required support to compile usb_bam driver as
msm_hsusb.h is removed now.

Change-Id: I4bc57ab37ce7445cf9ec4802885cad733fcbf0c0
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
2017-02-28 13:57:52 -08:00
Mayank Rana
c295e34e3b platform: msm: Add snapshot of USB BAM driver
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.4 commit 6f4dec2b0c31 ("qcom:
qpnp-smb2: Reset switcher_power_ok irq count when USBIN_UV fires").

This change also fixes different coding style related warnings like
inline comment, spelling correction, indentation, usage of sscanf().

Change-Id: I23c3177f525f7b71e7c5b43d8260680da6c8ac99
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
2017-02-28 13:42:54 -08:00