Enable the ARM SMMU driver as a module for direwolf GKI
and also enable other IOMMU configs for direwolf QGKI.
Change-Id: I3b27eda0efbf64411de22a36a430121356bb79bd
Signed-off-by: Vivek Kumar <vivekuma@codeaurora.org>
Signed-off-by: Veera Vegivada <vvegivad@codeaurora.org>
Enable IPCC driver as a loadable kernel module for direwolf.
Change-Id: I03bdc05193b9892e99a02c9855dcfe3e6a20a69e
Signed-off-by: Vivek Kumar <vivekuma@codeaurora.org>
Signed-off-by: Shreyas K K <shrekk@codeaurora.org>
Get rid of access to pciedev_table. Update data type
for bdf from unsigned long to u32. Prevent iATU config
for root port BDF. Do not save config values to rc_shadow
as iATU is configured dynamically.
Change-Id: I9e7254d1e6d91869db71c71f1c5b699a4d6376f4
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
For endpoint event registration do not depend on
num_ep, active_num_ep and pending_ep_reg variables.
Instead, create a list of registered endpoints and
notify an endpoint by iterating over the list of
registered endpoints with their corresponding
registered event. This also removes dependency on
PCIe device table and simplifies
msm_pcie_config_device_table function. Keep the
handling of upstream port I/O, memory and BME.
Change-Id: I5ab25ef300f0bc59ae5c2d973c662a0f81e44f43
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
Decouple endpoint event registration from link suspend.
Instead of relying on pending_ep_reg and num_active_ep
create an enumerated endpoint list at the time of endpoint
enumeration and move it to suspended endpoint list up
on link suspend. If enumerated endpoint list becomes
empty allow link suspend. Move endpoint back to enumerated
list upon resume. This also removes a race where all
endpoints have not completed their enumeration and one of
the endpoints request to suspend the link.
Change-Id: I22ac6e52a4c93d294d2a365da63cc7292e5e36ce
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
Instead of using global array of msm_pcie_dev use
existing PCIe device pointer in the function. Also
fix the indentation of the debug log strings.
Change-Id: I82eaaf2bfcbd4f588d1970131e0185f51d0f8ea5
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
It possible that EP gets PCI probe and tries to access EP config
space before driver could finish setting up PCIe device table.
Due to this race before driver could populate the config base
address in table, operation config call back from framework
tries to de-reference config base address which is NULL. Fix
this issue by dynamically configuring iATU with config space
address range mapping to the BDF for which config space is
requested for. This prevents access to pcie device table which
is used for static mapping for multiple device config space to
its BDF.
Change-Id: Ie6a83355087912369e46f028d8ffe5e4b5a5fba5
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
AER handler is directly using raw read and write APIs to access
endpoint config space. Instead, use PCI framework provided APIs
as well as the register macros to stream line all config space
reads and writes to go through PCI read and write operation.
Also, use PCI framework APIs to find the pci device using BDF
this removes the dependency on local pci device table.
Change-Id: I5b0fa2dc6eb383d9db2dc42f026a2b6cb85b3d71
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
AER handling requires finding the source pci device on
the bus which causes the AER. Source pci device is found
using bus, device and function number. Finding pci device
requires sleeping context because bus is walked by holding
semaphore. Hence move AER handling to threaded irq context.
Change-Id: Ia51b91560326be2a85e17ce98315ea39d25641e2
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
Add support for Camera, Display, GPU and Video
AHB clocks.
Change-Id: I1c60f2f720b57659ab92e770448c1ce1c27a359e
Signed-off-by: Jagadeesh Kona <jkona@codeaurora.org>
The stringification operator, `#`, in the preprocessor escapes strings.
For example, `# "foo"` becomes `"\"foo\""`. GCC and Clang differ in how
they treat section names that contain \".
The portable solution is to not use a string literal with the
preprocessor stringification operator.
Change-Id: I7ec44bd2ef15fa8019f2fa5efe2eddf40585ab5a
Link: https://bugs.llvm.org/show_bug.cgi?id=42950
Fixes: fe15b50cde ("srcu: Allocate per-CPU data for DEFINE_SRCU() in modules")
Reviewed-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Nathan Chancellor <natechancellor@gmail.com>
Tested-by: Nathan Chancellor <natechancellor@gmail.com>
Reviewed-by: Sedat Dilek <sedat.dilek@gmail.com>
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Git-commit: c1370c128cf49147f1d4c670b7101134231b3dc5
Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: lixiang <lixiang@codeaurora.org>
veth_ipa_suspend function returning an error when the interface
is already in deactivated is fixed. Changed the return
value from -EPERM to non error as there is no error in this case.
Change-Id: I10f283e767a442e6897c4d35cc370bbc84dd2d9d
Acked-by: Sarosh Hasan <sarohasa@qti.qualcomm.com>
Signed-off-by: Bojun Pan <bojunp@codeaurora.org>
Enable A/B support by appending slot suffix based on
androidboot.slot_suffix.
Change-Id: I7bdc798f6203ba026606d56cf0bc76e0cfbb6b4a
Signed-off-by: Venkata Rao Kakani <vkakani@codeaurora.org>
Dump MHI/PBL/SBL debug data periodically during MHI power on
in order to debug issues if anything is stuck during power on.
Change-Id: I300bf18e36ac74a0bb1ea924cbc401ed283862fe
Signed-off-by: Yue Ma <yuem@codeaurora.org>
For link training Data link layer, active bit is checked
in link status register of the root complex. Hence create
a new function msm_pcie_dll_link_active() to check the link
status. Use same function in msm_pcie_confirm_linkup() as well.
In order to check endpoint access use pci_device_is_present()
provided by framework. This allows all ep config space access
to go through operation config callback from framework.
Also, remove reading of root complex vendor id and device id
which is redundant now.
Change-Id: I46fdb566ed20759d38d991ceeb23703759c04ecd
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
Currently advanced error reporting is enabled by pci msm
controller driver using custom API. Since AER root port
service driver provides exported API
pci_enable_pcie_error_reporting() use this API to enable
support for AER and get rid of custom API. Framework API
needs to be wrapped under QGKI kernel config to prevent
GKI ABI breakage.
Change-Id: I3856fdc958a6234fe5e0a888733ce9f57fa5a48e
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
For invalid ioctl inputs from user, kgsl already returns -ENOIOCTLCMD error
code. Avoid flooding kernel log with such errors.
Change-Id: Iaf9c8eb0c51b221738482e2b4b02289913a2878e
Signed-off-by: Kamal Agrawal <kamaagra@codeaurora.org>
Added check to return fastrpc ioctl call when process exit sequence is
in progress.
Change-Id: I83915cb3fb75cc69d245a56800dcf42b492e01ea
Acked-by: Nishant Chaubey <chaubey@qti.qualcomm.com>
Signed-off-by: Jeya R <jeyr@codeaurora.org>