This change adds QUSB-V2 driver capabilities on
MSM platforms.This snapshot was taken as of msm-4.14
commit <cd3fb8ae2f0d> ("usb: phy: qusb2: Add regulator
support which powers refgen").
Change-Id: I2620e8d3e45ad9b0d5d63b4d246f120ce85474df
Signed-off-by: Sriharsha Allenki <sallenki@codeaurora.org>
ucsi callback may called immediately once register,
move gpio init earlier will avoid issue.
Change-Id: I0f154c964016c141486b7fefb86329193ae49119
Signed-off-by: Linyu Yuan <linyyuan@codeaurora.org>
Currently driver is enabling auto-resume irrespective of whether
peripheral is connected to the host or not. Adding PHY flags before
enabling auto-resume ensures that some peripheral must have been
connected before bus suspend. This change enables auto-resume only
during host mode real bus suspend.
Change-Id: Ifed2f0a773ace31738628a988062f96e92efad44
Signed-off-by: Pratham Pratap <prathampratap@codeaurora.org>
Holi build looking for __cfi_sowpath_diag which is no
longer exported by the kernel. So, build was failing with
undefined symbol error. To fix it disabling CONFIG_CFI_PERMISSIVE.
Change-Id: I6381c28ae3d476a03a56b7b1e35a257a060e8cb2
Signed-off-by: Yogesh Lal <ylal@codeaurora.org>
Make the log prints more consistent when displaying memory addresses.
Change %pK to %pa for phys_addr_t, print hex instead of decimal for
the iova/vas. Also print the offset of the SG entries.
Change-Id: I885156b8b680c2bfb8c4c640c5ec0ff6cfbae88e
Signed-off-by: Jack Pham <jackp@codeaurora.org>
If SMEM has not been initialized yet, before returning EPROBE_DEFER, make
the global minidump table pointer NULL. This avoids the kernel page fault
while trying to dereference the pointer later.
Change-Id: I76cbbee82e5b9fa02e0caaac57db2d6ce8f6ea6e
Signed-off-by: Prakruthi Deepak Heragu <pheragu@codeaurora.org>
Add SDC1 master port as it is for client to request
the bandwidth.
Change-Id: Ib459a6f156df05f088c0ec5a58b6dbb73cb39a5f
Signed-off-by: Odelu Kukatla <okukatla@codeaurora.org>
Add SDC1 master ID as it is for client to request
the bandwidth.
Change-Id: I2be2c4866a64a1a2ade2299d7d9b78f4e2d85933
Signed-off-by: Odelu Kukatla <okukatla@codeaurora.org>
Enable Display and debug clock controllers for SHIMA.
Change-Id: I69b8e770c8f286d32f6ebfd876284bf52a74c380
Signed-off-by: Jagadeesh Kona <jkona@codeaurora.org>
Add debug clock controller to support measure functionality for all
clock controllers.
Change-Id: I4fde3ad197220264329126ca788aa70a7c75bcb7
Signed-off-by: Jagadeesh Kona <jkona@codeaurora.org>
Add the display clock controller to support display port
related branches, PLLs and RCGs.
Change-Id: I3f366c3880823199ed4cd34bb9e608baf804e1bc
Signed-off-by: Jagadeesh Kona <jkona@codeaurora.org>
Etr_buf will be NULL when disable etr hw. It is before stopping byte-cntr
and sw usb data transfer which may cause null pointer issue. Use sysfs_buf
to avoid this issue.
Change-Id: I5967fd4183a9f36fca22059bb08fd8d357c8e5af
Signed-off-by: Mao Jinlong <jinlmao@codeaurora.org>
Add support for pm ops for Camera, Graphics and Video clock
controllers.
Change-Id: Ic9c01a35385a8c24899b66c9652810135bc42ac7
Signed-off-by: Jagadeesh Kona <jkona@codeaurora.org>
Adding synchronization access to allocated memory of userPD
to avoid double-freeing the buffer when multiple calls are
made to create dynamic userPD process.
Change-Id: I07b2c290cc400007ce00d96b36c5b40b17ea43c9
Signed-off-by: Edgar Flores <edgarf@codeaurora.org>
The minimum timeout that can be set is 10 ms due to the clamping being
done in led_set_flash_timeout() in the flash LED class framework. Change
the minimum to allow zero timeout to be set, and also disallow setting
strobe in this case.
Change-Id: Ic34057197c05daf640c2a7d21cbae8e4638319ee
Signed-off-by: Guru Das Srinagesh <gurus@codeaurora.org>
Print the data instead of the pointer in qti_flash_led_write(), update
the print in qti_flash_led_masked_write(), and fix qti_flash_led_read()
so that it returns a pointer to more than one byte.
Change-Id: Ic9cbc35a6552f8978ff9e36da2aafeec69885b9a
Signed-off-by: Guru Das Srinagesh <gurus@codeaurora.org>
Decoder information moves to generic field. Delete
redundant definition.
Change-Id: I0cfa2e0bd94f150f5c35b9d14c0188e05fea72f1
Signed-off-by: Xiaojun Sang <xsang@codeaurora.org>
Glink IRQ mostly is taken by the silver cluster. RPC driver vote
for sliver cluster prevents collapsing gold cluster. This saves
significant power.
Depends-On: I8ec5056ea6929d39e74b6e97114094da0a264edb
Change-Id: Ic24bddceb7ae37d1182d2fca683c622b4ab71a55
Acked-by: Tadakamalla Krishnaiah <ktadakam@qti.qualcomm.com>
Signed-off-by: Mohammed Nayeem Ur Rahman <mohara@codeaurora.org>
Signed-off-by: Edgar Flores <edgarf@codeaurora.org>
Har har, after I moved the slab freelist pointer into the middle of the
slab, now it looks like the contents are getting poisoned. Adjust the
test to avoid the freelist pointer again.
Fixes: 3202fa62fb43 ("slub: relocate freelist pointer to middle of object")
Cc: stable@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/20200625203704.317097-3-keescook@chromium.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
bug: 156889933
(cherry picked from commit e12145cf1c3a8077e6d9f575711e38dd7d8a3ebc)
Change-Id: Iad65d562dcd0efbda569ae47f015ec8d1ccaef41
Signed-off-by: Prasad Sodagudi <psodagud@codeaurora.org>
It seems at least Clang is able to throw away writes it knows are
destined for read-only memory, which makes things like the WRITE_RO test
fail, as the write gets elided. Instead, force the variable to be
volatile, and make similar changes through-out other tests in an effort
to avoid needing to repeat fixing these kinds of problems. Also includes
pr_err() calls in failure paths so that kernel logs are more clear in
the failure case.
Reported-by: Prasad Sodagudi <psodagud@codeaurora.org>
Suggested-by: Sami Tolvanen <samitolvanen@google.com>
Fixes: 9ae113ce5f ("lkdtm: add tests for additional page permissions")
Signed-off-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/20200625203704.317097-2-keescook@chromium.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
bug: 156889933
(cherry picked from commit 464e86b4abadfc490f426954b431e2ec6a9d7bd2)
[Resolved minor conflicts in drivers/misc/lkdtm/bugs.c for lkdtm_ARRAY_BOUNDS]
Change-Id: I084d34c7fc7685a3b980a8ac5d839d68684cae86
Signed-off-by: Prasad Sodagudi <psodagud@codeaurora.org>
Make use of the existing need_idle feature to incorporate upstream latency
sensitive tasks.
Change-Id: Ie1513187d024b93c8b619d9e0a35d84195488696
Signed-off-by: Shaleen Agrawal <shalagra@codeaurora.org>
When registering the QMI server during initialization there is
a chance that the handle creation can fail with -EPROBE_DEFER if
the IPC router service isn't ready yet. In that case, we should
not fail the module_init call as that results in the module
getting unloaded with no automatic mechanism to reload it (a la
driver probe deferral). Instead, move the uaudio_qmi_svc_init()
call to beginning of uaudio_qmi_plat_probe() so that in case it
defers the probe can be retried again later.
Change-Id: I07a1e2cee5194387884cb716e95ed7c414a22159
Signed-off-by: Jack Pham <jackp@codeaurora.org>
By default when ep0 gets enable, current code SET XFER resource command
for all USB endpoints including USB GSI endpoint. USB GSI endpoint related
configuration operation performs one more time SET XFER resource which
fails as USB controller is running out of XFER resource. Fix this issue
by not performing SET xfer resource by default, and let USB GSI endpoint
operation takes care.
Change-Id: I00d296c2c0b4f72e34ae57f5c3856b3e1e89f5ce
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
Since QCOM_RPMh is no longer built-in, remove it's symbols from
the symbol lists
Bug: 161478631
Bug: 161128971
Signed-off-by: Todd Kjos <tkjos@google.com>
Change-Id: I8f8179148e75a9b72d279a2575aac73f324effb2
QCOM_RPMH and QCOM_RPMHPD have been pulled out of the GKI
so move it to the db845c fragment config.
Bug: 161478631
Signed-off-by: John Stultz <john.stultz@linaro.org>
Change-Id: Ifcdec07ded287fc87908143ad6a6ff1ce4ae37ac
Per request from qcom, remove the QCOM_RPMH config from
the GKI kernel
Bug: 161478631
Signed-off-by: John Stultz <john.stultz@linaro.org>
Change-Id: I2cbe679bc95d294df1bbecb52b393fb78eaa3f9f
This removes GKI_QCOM_CLKS_CONFIGS and the one QCOM_RPMHPD
config it selects from the GKI_HACKS config entry, as
we will move it to being a module.
Bug: 161478631
Bug: 161128971
Signed-off-by: John Stultz <john.stultz@linaro.org>
Change-Id: Idc2eedf3ed3bfd3e88f9a577934943f86df16ab3
This patch allow the rpmh driver to be loaded as a permenent
module. Meaning it can be loaded from a module, but then cannot
be unloaded.
Ideally, it would include a remove hook and related logic, but
the rpmh driver is fairly core to the system, so once its loaded
with almost anythign else to get the system to go, the dependencies
are not likely to ever also be removed.
So making it a permenent module at least improves things slightly
over requiring it to be a built in driver.
Feedback would be appreciated!
Cc: Todd Kjos <tkjos@google.com>
Cc: Saravana Kannan <saravanak@google.com>
Cc: Andy Gross <agross@kernel.org>
Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: Rajendra Nayak <rnayak@codeaurora.org>
Cc: linux-arm-msm@vger.kernel.org
Signed-off-by: John Stultz <john.stultz@linaro.org>
Link: https://lore.kernel.org/lkml/20200326224459.105170-3-john.stultz@linaro.org/
Bug: 161478631
Change-Id: I26f57b76c1629e8311d97e6be8f7ff4fdac65ba9
This patch allow the rpmhpd driver to be loaded as a permenent
module. Meaning it can be loaded from a module, but then cannot
be unloaded.
Ideally, it would include a remove hook and related logic, but
apparently the genpd code isn't able to track usage and cleaning
things up?
So making it a permenent module at least improves things slightly
over requiring it to be a built in driver.
Cc: Todd Kjos <tkjos@google.com>
Cc: Saravana Kannan <saravanak@google.com>
Cc: Andy Gross <agross@kernel.org>
Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: Rajendra Nayak <rnayak@codeaurora.org>
Cc: linux-arm-msm@vger.kernel.org
Acked-by: Saravana Kannan <saravanak@google.com>
Tested-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Link: https://lore.kernel.org/r/20200326224459.105170-4-john.stultz@linaro.org
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
(cherry picked from commit d4889ec1fc6ac6321cc1e8b35bb656f970926a09)
Bug: 161478631
Bug: 161128971
Signed-off-by: John Stultz <john.stultz@linaro.org>
Change-Id: I39f8525cfbe206d27cfd268c2a0b7637bb07814c
On architectures that support the preservation of memblock metadata
after __init, allow drivers to call memblock_free() to free a
reservation made by early arch code. This is a hack to support the
freeing of bootsplash reservations passed to Linux by the bootloader.
(This should be reworked in future versions of Android; do not
cherry-pick this patch forward.)
Bug: 139653858
Change-Id: I32c0ee70c33c94deff70aa548896caa9978396fb
Signed-off-by: Alistair Delva <adelva@google.com>
Copy the entire userspace request buffer to local kernel
buffer and use that to send to TZ. Update the response
received in the local buffer to the actual userspace buffer
after the request is complete.
Change-Id: I673d74a32966816c5248778fc967eb91da5b6df5
Signed-off-by: Anmolpreet Kaur <anmolpre@codeaurora.org>
Remove the preprocessor if statement for checking the arch of the
target since this will not affect targets with a 32bit address space. This
change allows the driver to be compiled and used for targets that do not
define CONFIG_ARM64.
Change-Id: I6fc11e86d6799099fdaeec46df6d7093c1ca117f
Signed-off-by: Lina Iyer <ilina@codeaurora.org>
Signed-off-by: Tushar Nimkar <tnimkar@codeaurora.org>
Signed-off-by: Siddharth Gupta <sidgup@codeaurora.org>
Register for hotplug and dev_pm_qos notification only
for SMP so covering under CONFIG_SMP flag.
Change-Id: Ic3da9648a4dd5c762cd97dbb9f1915f79bd2481e
Signed-off-by: Lina Iyer <ilina@codeaurora.org>
Signed-off-by: Tushar Nimkar <tnimkar@codeaurora.org>
Currently, if debug_inface is enabled the list pool allocation is
done for ctrl_write_pool instead of data_write_pool. Therefore
when coresight calls qdss_write function it finds the data_write_pool
empty & since data is populated in ctrl_write_pool, it will return
-EIO. This restricts qdss to work on a composition where ctrl & data
write pool coexists.
Fix this by removing the control interface as it is no longer used.
Change-Id: I2d6368d8f5a1b0ada2634ec682f19bc99551c76c
Signed-off-by: Udipto Goswami <ugoswami@codeaurora.org>
ARM cannot natively read 64-bit address. As such the readq_ variants
are not defined for this architecture. Add a 32-bit equivalent to read 2
sequential 4-byte memory into a u64 value. Let's keep them locally
defined for now, since they are not native to the ARM architecture.
Change-Id: Ib0ce08c3b8a37af85c12c2ad72803bf871847f67
Signed-off-by: Lina Iyer <ilina@codeaurora.org>
Signed-off-by: Tushar Nimkar <tnimkar@codeaurora.org>
Update the gpll configuration values for GCC and GPUCC
and halt check for camera and video ahb clks for GCC
in HOLI.
Change-Id: I637b05f0ecc877a2d83990532b34462de28069de
Signed-off-by: Saurabh Sahu <sausah@codeaurora.org>