UHS-I SD cards support SDR104 mode which runs the SD card interface
clock upto 208 MHz. But we may see repeated CRC errors in SDR104
with some SDCC controllers. If this happens, this change would
reinit the card to lower speed (SDR50) hoping that CRC error
rate would reduce at lower clock speed (100MHz for SDR50).
Change-Id: I140d29fdf500bb89881a0f2c1f768fe0c5afa9d5
Signed-off-by: Asutosh Das <asutoshd@codeaurora.org>
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
On Certain chipsets, SDR104 mode might be unstable causing CRC error on
the interface. So we need a workaround which would skip printing register
dumps on CRC errors and also downgrade bus speed mode to SDR50/DDR50 in
case of continuous CRC errors. This patch adds "qcom,sdr104-wa" property
to enable this workaround if required.
Change-Id: I626d8ef45a97e8e6558e7f20be496de1f5a2a438
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
If Ultra High Speed SD card supports both SDR50 and DDR50 modes then
this change will give preference to SDR50 over DDR50 mode as it seems
to be more reliable for board designs. While we are doing this, this
change also fixes some indentation issues in the function we are have
modified.
Change-Id: Ifa075563ec41f43584d93f669caecbaed9369e24
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
This is the reference driver source code for ST
Touchscreen of version 4.1.0. It is used for QVR8998
touchscreen.
(cherry picked from commit 2cd09314337d614e69d0ebd99afb71d99d31b69a)
Signed-off-by: chenx <chenxiang0527@thundersoft.com>
Git-commit: 2cd09314337d614e69d0ebd99afb71d99d31b69a
Git-repo: https://source.codeaurora.org/quic/la/kernel/msm-3.10
CRs-Fixed: 1106217
Change-Id: I5c26deaa3943ff300ce9835678bb4a550e40f096
Signed-off-by: Jin Fu <jinf@codeaurora.org>
In case count is not multiple of 4, there is a read access in
wil_memcpy_toio_32() from outside src buffer boundary.
In wil_memcpy_fromio_32(), in case count is not multiple of 4, there
is a write access to outside dst io memory boundary.
Fix these issues with proper handling of the last 1 to 4 copied bytes.
Change-Id: Iff7853bc4803a01449ddcee996a54a0dccc1db1a
Signed-off-by: Dedy Lansky <dlansky@codeaurora.org>
Skip checking the SWITCHABLE_SIGNALING_VOLTAGE bit of MCI_GENERICS
register while checking power status on SDHC v5.0 onwards.
This bit shows whether controller supports switching of IO signaling
voltage or not. On SDHC v5.0, switchable signaling voltage support
is present by default and this bit was removed. So we can skip checking
this bit in case of v5.0 controller.
Without this patch, driver tries to read a non-existing bit field which is
causing driver to proceed without waiting for pwr-irq. In some case its
turning off the clock even before pwr irq finishes thus resulting in
un-clocked access errors.
Change-Id: I5beaf5bf043999522e3f2ec537568524c5aec4bf
Signed-off-by: Veerabhadrarao Badiganti <vbadigan@codeaurora.org>
In case the application is still issuing the requests after
the low-level driver is shutdown, IO errors are expected.
Ratelimit those errors with the default ratelimit to avoid
watchdog bark issue in some cases.
Change-Id: Ida436cbf1be9556f456652e72bc1dac508abd047
Signed-off-by: Sahitya Tummala <stummala@codeaurora.org>
While checking the profile integrity word to determine whether a
profile load is required or not, whitelist the values so that
profile loading cannot be skipped because of a garbage value
present.
Change-Id: Iff1d116541d07dbb39de966d98fa69b76aeab93d
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
Instead of using a flag to retain the interrupt enabled status
of delta_bsoc interrupt, switch it to use a votable instead. This
improves the readability of code by not worrying about the flag.
While at it, fix cleaning up the resources in some error paths
during driver probe.
Change-Id: I2c17a9d90c7b549435caa75da81f4c4779ea3344
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
Create a sysfs entry for each RC (root complex) so
that clients can manually trigger enumeration from
userspace.
Change-Id: I88b1276d95a2a894759a2f122621e10e171d6528
Signed-off-by: Tony Truong <truong@codeaurora.org>
Add qnovo as pl charging voter and disable parallel charging when
qnovo is enabled with fcc below 2A.
Change-Id: Ic03a18318a89344f2bd5c8a72445abe22cd3d142
Signed-off-by: Harry Yang <harryy@codeaurora.org>
Report status that indicates individual charger errors,
including JEITA, battery, charing disabled, etc.
Change-Id: I5a02d9f86237ae1a05b71e78f17db8c39f35594f
Signed-off-by: Harry Yang <harryy@codeaurora.org>
Add property qnovo_enable to enable qnovo charging. Also add
property pt_enable to enable pulse train.
Extend QNOVO algorithm's control of voltage and current after
pulse train stops and as long as qnovo_enable = 1.
The interrupt ptrain_done is configured wakeup capable.
CRs-Fixed: 2013069
Change-Id: Icb61e0e0169283f5f52a4994431489dde0af1c73
Signed-off-by: Harry Yang <harryy@codeaurora.org>
The variable cb_data is accessed from parallel threads where one thread
can free it anytime, this creates use after free scenerio.
To avoid use after free cases cb_data is freed only when kref count
goes to zero.
CRs-Fixed: 2023620
Change-Id: I74225fc61f8ede03a40ff35d2b963d90c0d4689f
Signed-off-by: Dhoat Harpal <hdhoat@codeaurora.org>
This fix allows to avoid possible race condition while
accessing mdlog session info. Without this check there
is a possibility of poison overwritten occurrence.
Also this fix allows mdlog client to check the validity
of process descriptor. Without this fix there is
possibility of crash.
CRs-Fixed: 2022664
Change-Id: Ia10e83c7376de5cab92dd2ec4ec4aa8074223ff3
Signed-off-by: Gopikrishna Mogasati <gmogas@codeaurora.org>
Because of HW issues, burst mode access cannot be done with
pm660 parts. Use IMA in single mode for it.
Change-Id: I4e86601d713140e559ba8a6f92715f2075c7b8ee
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
Currently, based on the number of bytes read/written, IMA is
configured for single or burst mode. Add an option to override
to single mode whenever required.
While at it, change pr_err() statements to print some more debug
information which might be useful.
Change-Id: If19e135ed4014732a0efe56250f56f0760a1fb93
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
In current pm_qos implementation - when the new pm_qos vote request
comes, the previous cpu group where pm_qos vote was put
is determined and removed if the current cpu group is different
than previous.
If the pm_qos vote of performance mode latency is put during
initialization, there can be a case where this vote will never be
released - since during init phase we can't cache the prev pm_qos cpu
group (pm_qos_prev_cpu = -1). Thus during the actual I/O sdhci_request
the pm_qos_prev_cpu will be -1 and unless the request comes once onto
each of those cpu group, the pm_qos voting can never be released.
Hence change this pm_qos vote for all cpu groups to PM_QOS_DEFAULT_VALUE
during init phase.
Change-Id: I71249b58f41850a8a84e6165d6df936eba13b218
Signed-off-by: Ritesh Harjani <riteshh@codeaurora.org>
fw_crashed is atomic state variable, use atomic
read operation for reading the value
Change-Id: Ieaad558cad684a0eb7daaad9d220b44c032d69ca
Signed-off-by: Govind Singh <govinds@codeaurora.org>
FAB_ID can be used across multiple drivers that gets revid
information from qpnp-revid driver. Move the FAB_ID definitions
in RR_ADC driver for pmi8998 and pm660 so that they can be
reused by other clients.
Change-Id: Ia61af56244161c948b0f458a77e699c1cac871b1
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
Explicitly clear the subsystem loading address in case of any
memory failure. It will help to avoid any platform dependency.
Change-Id: I3be8f6318d68f02c02e637fc34f4a868e9fafa45
Signed-off-by: Gaurav Kohli <gkohli@codeaurora.org>