This driver allows clients to send messages to Alway On processor
using QMP transport. Users can echo a frequency into an exposed sysfs
node to send to AOP. The driver expects the Cap frequency of DDR based
on SKU.
Change-Id: I083c1ec2da6990c5815550f897069ff27c6b7617
Signed-off-by: Vinay Sudra <vsudra@codeaurora.org>
Consider a case where DWC3_DEPCMD_ENDTRANSFER command times out,
then controller will not receive DWC3_DEPEVT_EPCMDCMPLT event and
request queued will not be given back to the function driver from
remove_requests. Now, if a function driver(e.g mass storage)
tries to dequeue the request, gadget driver will move the request
from started_list to cancelled_list but will not giveback the
request to function driver causing it to wait forever for the
transfer to be completed. This can lead the tasks to be in hung
state causing a crash.
Fix this by giving back the request from ep_dequeue by cleaning up
the cancelled requests.
Change-Id: I08b7a766d34992808260788a907054c835402c45
Signed-off-by: Pratham Pratap <prathampratap@codeaurora.org>
Enable Configs for API level 30. These are needed for android support.
Change-Id: I62c0ab4266211716e54a76197e872e8288a10d6a
Signed-off-by: Singa Reddy Dasari <singredd@codeaurora.org>
Enable Configs for API level 30. These are needed for android support.
Change-Id: Ib59eb8ea8a85c7f2a4af4318353dbe16b033616f
Signed-off-by: Singa Reddy Dasari <singredd@codeaurora.org>
Return error code on failure to get tsync time though sys entry.
Change-Id: I46302b5af314325f752aaf586b4ca6cd4608d82a
Signed-off-by: Vivek Pernamitta <vpernami@codeaurora.org>
This change initializes length to zero value. This is
needed when rpmh_unit_base is not present.
Change-Id: I91af06a49a69433f119c2b73376606df34820838
Signed-off-by: Tushar Nimkar <tnimkar@codeaurora.org>
sync_file_create increases refcount of fence, so need release dma fence
handler after it.
Change-Id: I3cc60d6a7e8a32138bfee611864cee00c2ac7dd3
Signed-off-by: Kasin Li <donglil@codeaurora.org>
This patch contains changes for disabling
ASD regulator if HST is attached.
Change-Id: Ic1f6515861600f8bebc1d065ce51d7df5a3f28db
Signed-off-by: priyankar <prigup@codeaurora.org>
CNSS_BDF_DUMMY type board data file is no longer used. Hence remove
it. A BDF file with regular name and dummy content should be sent as
dummy BDF instead of just sending a dummy string.
Change-Id: I7483a6801584f56ac4e87e2074280291c9734472
Signed-off-by: Yue Ma <yuem@codeaurora.org>
In fs_ready_store(), only dereference plat_priv pointer after NULL
check.
Change-Id: I222139d02a8cc8aef19e2ff879a953977896a08c
Signed-off-by: Yue Ma <yuem@codeaurora.org>
Currently the driver requires pwr_evt_irq to be compulsorily
passed from DT unless the core is dual port. Now consider a core
that does not allow SSPHY autosuspend during operational mode,
instead allowing it only as a part of dwc3_msm_ssphy_autosuspend.
As soon as autosuspend is enabled, there is a chance that
pwr_evt_irq is fired with IN_P3 bit set. Although the driver will
be marking mdwc->in_p3 in the pwr_evt_handler, it will fail to
see IN_P3 bit to be set(because it has been cleared in handler)
during the 5ms wait time in the ssphy_autosuspend function and
prepare_suspend will again set mdwc->in_p3 to 0. This leads to
failure of runtime/system suspend.
Fix this by not passing pwr_evt_irq from DT for the cores which
disable SSPHY autosuspend.
Change-Id: I85ca7e45337fe35c570d163766e7638e11537201
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
F_FS function driver allocated ffs_eps and updates ffs_ep->ep
to corresponding usb_ep during func->bind and never clears it.
On bind it also saves ffs_ep context in epfile->ep.
During func->disable, it clears only ffs_ep context in epfile->ep
and on func->unbind it frees ffs_eps memory.
ffs_epfile_io routine currently relies on ffs_ep->ep (which is
never cleared and ffs_ep could be freed on unbind) to detect any
disconnect during active IO. This can result in various issues e.g.
use after free use of ffs_ep if unbind finished before epfile_io
could resume or "stop adbd" trying to dequeue a freed USB request
when epfile_io could execute only after F_FS got disabled as
'if (ep->ep)' check would be TRUE.
Fix this by checking stored ffs_ep context against latest epfile->ep
to figure out if endpoint got disabled or changed before acquiring
spin_lock.
Change-Id: I6bdcdf0dff0813ed7b2af8c24f544a22796b0369
Signed-off-by: Manu Gautam <mgautam@codeaurora.org>
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
Signed-off-by: Jack Pham <jackp@codeaurora.org>
Porting the FDE functionality from msm-4.14 branch commit
<b8f1b6a6> (Add support for block disk encryption).
Modified to be compatible with the 5.4 Kernel.
Test:
1. Basic_SimpleEncryption.
2. ModifyEnforcedFiles_FileCreationWithinEnforcedFolder.
3. PIN, pattern, password.
4. Verified filename encryption.
5. Generate/set ICE keys.
6. Enable ICE state for userdata partition.
7. Format the userdata partition.
8. Check if partition is encrypted via ICE.
Change-Id: I307d75b7cdf25f7a9ad2b4f948e64d13278e6f03
Signed-off-by: Neeraj Soni <neersoni@codeaurora.org>
Signed-off-by: Victor Zaharchuk <vzaharch@codeaurora.org>
Different GPU can have a different GMEM size so need to configure
UCHE GMEM base address accordingly. Having a fix base as 0x100000
results in RB and UCHE GMEM range overlap on GPUs with GMEM size >1MB.
Also, adjust SVM 32bit base based on GMEM UCHE range end to prevent
GMEM UCHE and SVM 32bit range overlap.
Change-Id: I41330a33b79bf8c79b593ecd89593a796230b074
Signed-off-by: Deepak Kumar <dkumar@codeaurora.org>
The version numbers shall be copied into the local variables for
any potential version comparison.
Change-Id: I08ac6359df0890a2605dbb6279b73abe09060ec8
Signed-off-by: Yong Ding <yongding@codeaurora.org>
The prink() could consume enough CPU when the retry eventually takes
a lot of times before it could succeed.
Change-Id: I4f49d0650ee3ae06700d2ce592acd0532bbf38cd
Signed-off-by: Yong Ding <yongding@codeaurora.org>
Since for the Genoa or the SP that doesn't need
regdb.bin for Hasting, it should happen search
regdb.bin failure issue that cause 60s timeout.
So add one compile macro CNSS_REQ_FW_DIRECT to
replace request_firmware_direct with request_
firmware for regdb.bin and only search the folder
that set by fw_path, which can avoid 60s timeout
while search file failure in the user space.
static const char * const fw_path[] = {
fw_path_para,
"/lib/firmware/updates/" UTS_RELEASE,
"/lib/firmware/updates",
"/lib/firmware/" UTS_RELEASE,
"/lib/firmware"
};
Above piece of code is the definition of fw_path
from drivers/base/firmware_loader/main.c.
Change-Id: I79c2fce33a8befecb0242a70b7eee1eef9a76e9b
Signed-off-by: Chaoli Zhou <zchaoli@codeaurora.org>
Signed-off-by: Kuichu Ni <kuichun@codeaurora.org>
Currently power_role is accessed by set_prop and get_prop
functions of typec_power_role without any locking mechanism,
there can be a scenario where both function calls were invoked
simultaneously and power_role variable is not correctly
updated, and it leads to enumeration issues when connected to PC.
Fix it by adding locking mechanism to power_role.
Change-Id: I4f5dc38a9536b535510dc2b112712a5cbd2b3f84
Signed-off-by: Kavya Nunna <knunna@codeaurora.org>
In the process of idle shutdown, cnss_pci_power_off_mhi()
already done with CNSS_MHI_POWER_OFF state set, but
cnss_suspend_pci_link() doesn't complete yet, so PCI_LINK_DOWN
won't be set, at the same time system suspend comes, it will be
failed with CNSS_MHI_SUSPEND state set checking at
cnss_pci_suspend_bus()/cnss_pci_set_mhi_state().
When mhi state is already CNSS_MHI_POWER_OFF, no need to do pci
suspend link related operation while such actions also will be done
through cnss_qca6290_shutdown()/cnss_suspend_pci_link(). Fix is to
check CNSS_MHI_POWER_OFF state in cnss_pci_suspend_bus().
Change-Id: I2e03dffdc29b5c9743209cbd29c16345d414af35
Signed-off-by: Huashan Qu <hqu@codeaurora.org>
Only when SMMU S1 enabled, CNSS driver will send IOVA range in
HOST_CAP message, and let firmware to configure ATU.
Change-Id: Idd19063da975c0105d91e0e31575d0b0d1edd8e2
Signed-off-by: Lin Bai <lbai@codeaurora.org>
Currently CNSS2 driver does not support multi chips. This is a update of
the CNSS2 driver to support multi chips with converged dts.
Change-Id: Ie3efb526220c2de21e021320322d46c345d770bc
Signed-off-by: wei yang <yangwei@codeaurora.org>
Signed-off-by: Kuichu Ni <kuichun@codeaurora.org>
Remove all the leading and trailing whitespaces in the string copied
from userspace.
Change-Id: I627416dcdb1155303ad6a8ed172910a8653dd67b
Signed-off-by: Jay Jayanna <jayanna@codeaurora.org>
mhi_ring_start() does not check whether we once ever allocated DMA buffer
or not , causing it to leak memory if channel reset/stop happens.
Also removing the free logic in mhi_deinit() as the check would suffice
to prevent reallocation.
Change-Id: I569560f9de9facc690131c56f657eadb77a12811
Signed-off-by: Subramanian Ananthanarayanan <skananth@codeaurora.org>
Signed-off-by: Gauri Joshi <gaurjosh@codeaurora.org>
Client may initiate read transfers when MHI state is in suspend
state. Change adds a check to prevent read transfers.
Change-Id: I51954a3493a845ed1778713c10b20400d95489a8
Signed-off-by: Subramanian Ananthanarayanan <skananth@codeaurora.org>
Signed-off-by: Gauri Joshi <gaurjosh@codeaurora.org>
Maintain a copy of the event ring read pointer in DMA coherent
memory before scheduling asynchronous DMA to update the host.
This is needed to ensure the correct read pointer value is updated
to host (for which the event DMA was done). Also schedule MSI via
IPA/EDMA to avoid potential early delivery to host (before the event
itself) when it is triggered via the PCIE controller.
Change-Id: I4fdd5b8802677b434a0c2a12118065f264802442
Signed-off-by: Siva Kumar Akkireddi <sivaa@codeaurora.org>
Signed-off-by: Gauri Joshi <gaurjosh@codeaurora.org>