An issue of missing interrupt was observed while resuming the device.
The genirq framework calls __enable_irq on all the interrupts during
resume. This inturn calls unmask in the pm8xxx which caused the
pending status to drop for that interrupt. Later when the summary
handler is called, it does not see that interrupt pending and so its
handler is never called.
The pm8xxx irq module has a hardware bug where writing to the config
bits clears the pending status of the interrupt.
Fix it by avoiding unmasking the interrupt again if it is already
unmasked. This will prevent us from writing to the interrupt config
state, thus preventing dropping of the pending bit if set.
CRs-Fixed: 297320
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
Specify board specific enable times for each of the PMIC 8921
regulators. Assume worst case values for each.
CRs-Fixed: 296183
Signed-off-by: David Collins <collinsd@codeaurora.org>
After refactoring the driver, fabric debug messages need to be
corrected as fabrics are abstracted out of rpm file.
Signed-off-by: Gagan Mac <gmac@codeaurora.org>
The testing mechanism and correctness checking had to be changed
in order to support multi channels and multi devices LPM test.
To support that, all the LPM info must be configured and saved per device,
while each device decides whether to go to sleep according to all its
channels.
Signed-off-by: Yaniv Gardi <ygardi@codeaurora.org>
Device mute control is added which can mute the
respective dev_id to volume zero.
msm_device_mute() in user space will use this
control.
CRs-Fixed: 295399
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
An issue of missing interrupt was observed while resuming the device.
The msm_charger resume called adc conversion to get the battery
voltage. The adc conversion function enables the interrupt and
starts the conversion. Then pmic8058_resume gets called now which
re-enables the adc interrupt causing the pending bit to drop. With
the ADC EOC interrupt missed, the msm_charger does not receive a
completion event, causing a watchdog timeout.
The pmic8058 irq module has a hardware bug where writing to the config
bits clears the pending status of the interrupt.
Fix it using a sysdev where the pmic interrupts are switched before
any of the subdevices resume and use nonwakeup interrupts. Since
in sysdev resume we only enable non wakeup interrupts the status of
wakeup interrupts remains intact.
CRs-Fixed: 295261
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
Due to hardware constraints, the SMI should not be mapped
in the kernel space when not in use. Unmap the SMI from
the kernel address space when the last allocation is freed.
Vote for bus bandwidth as well while the SMI is allocated.
CRs-Fixed: 281723
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
Add send and receive of Extended Flow Spec option during L2CAP
lockstep configuration and passing the flow specs to HCI.
Signed-off-by: Peter Krystad <pkrystad@codeaurora.org>
Conflicts:
include/net/bluetooth/hci.h
include/net/bluetooth/hci_core.h
net/bluetooth/l2cap_core.c
Added Kconfig entry to enable the GPIOMUX driver.
Updated Makefile to compile gpiomux driver files.
Added io map for TLMM device, and perform gpiomux
initialization without installing any gpios.
Gpios will be mapped when the peripheral connections
are finalized for virtio, cdp or other targets.
Signed-off-by: Joel King <joelking@codeaurora.org>
Mapping api by default assumes 4K alignment.
Video core requires output buffer to be aligned
to 8K.This change will pass aligment information to
the mapper API.
Signed-off-by: Gopikrishnaiah Anandan <gopikr@codeaurora.org>
Conflicts:
drivers/video/msm/vidc/common/init/vidc_init.c
If the battery is very low print a warning in the kernel logs. This will
help debugging restart issues because of a low battery.
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
The current algorithm compares if an ocv is between two temperature
columns of the same row. This is not valid since the data in one
temperature column is collected independently of the data in another
temperature column.
It is incorrect to assume a relation between ocv values for the same
percent row for different temeperature columns.
Fix it by finding a percent charge for a bounding temperatures and
then interpolating these percent charges based on battery temperature.
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
Currently driver supports max baud rate as 115200 bps.
This change allows to use higher baud rate like 230400 bps
and 460800 bps.
CRs-fixed: 298417
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
This reverts commit bccb069835ef880e437c68a7fed9529c2549605f.
Since the workqueue code deletes the work before executing it,
checking for no work item being currently queued to the workqueue
is not sufficient to guarantee that all the works have finished
execution. Hence, we have moved to using a counter based solution
and so this change is no longer required.
Signed-off-by: Pratik Patel <pratikp@codeaurora.org>
Since the workqueue code deletes the work before executing it,
checking for no work item being currently queued to the workqueue
is not sufficient to guarantee that all the works have finished
execution.
Use a counter to guarantee that all the pending suspend_sys_sync()
works have finished execution before returning from
suspend_sys_sync_wait().
CRs-Fixed: 293595
Signed-off-by: Pratik Patel <pratikp@codeaurora.org>
Conflicts:
kernel/power/wakelock.c
The MH block should be initialized even if the gpu mmu
is not enabled so that AXI error interrupts will still
be generated.
Signed-off-by: Jeremy Gebben <jgebben@codeaurora.org>
The original purpose of calling afe_close() is to
recover from audio hardware error such as SLIMBUS
overflow/underflow case. However, soc-dsp framework
currently calls prepare function of backend dai link
as part of start process of newly opened FE PCM device.
So, prepare of backend is called unnecessarily in
multiple frontend to single backend case. This behavior
not only can manifest undesirable audio artifact but also
cause instability due to quick stop and start of Q6 AFE
port. As SLIMBUS overflow/underflow issue encountered
so far is mostly due to mishandling of hardware bring-up
sequence, having afe_close() called in prepare does more harm
than good. The decision is not to call afe close in prepare
until soc-dsp framework is being enhanced in handling prepare of
backend.
Signed-off-by: Patrick Lai <plai@codeaurora.org>
Bahama and Timpani devices share the same i2c bus line.
Add delay between toggling the reset line for bahama to
ensure each of the device on the i2c has sufficient time
to reset before bringing the core out of reset. Multiple
NACK failure's during bootup on one device could cause
lockup of the whole bus and other i2c devices could fail
when its core is being bought out of reset.
CRs-Fixed: 296521
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
The atomic SCM APIs are useful for commands that are guaranteed
by the secure side to be uninterruptable, atomic and SMP safe.
The calling convention use registers for passing parameters and
return values between the secure and non-secure side. Support
this interface with scm_call_atomic[1-2]() functions
corresponding to the number of arguments passed.
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
A previous patch addressed the issue of move_freepages_block()
trampling on erronously freed mem_map entries for the bank end
pfn. We also need to restrict the start pfn in a
complementary manner.
Also make macro usage consistent by adopting the use of
round_down and round_up.
Signed-off-by: Michael Bohan <mbohan@codeaurora.org>
allowed.
During AXI configuration, the buffer addresses are
stored in a msm_pmem_region array of size 16. This
limits the maximum number of buffers that can be
used by the application to 16. But in ZSL mode,
the application can allocate more than 16 buffers.
Increase the maximum number of buffers and
dynamically allocate memory for this structure.
Signed-off-by: Kiran Kumar H N <hurlisal@codeaurora.org>
- Thumbnail image is not generated in case of
raw snapshot. Hence dont configure thumbnail
buffers in case of raw snapshot.
- Remove couple of duplicate log messages.
CRs-Fixed: 297230
Signed-off-by: Kiran Kumar H N <hurlisal@codeaurora.org>
Add an enable_time platform data member which can be used to specify
the board dependent enable (rise) time of each regulator.
Signed-off-by: David Collins <collinsd@codeaurora.org>
CSI irq is trigger too often causing the platform to be unstable.
Modified csid and csiphy irq to only trigger for errors.
Signed-off-by: Kevin Chan <ktchan@codeaurora.org>
Multiple ports for a single master should be treated as
separate nodes to enable halting of individual ports.
Multiple ports for a single slave should be combined under
the same slave node to aid division of bandwidth from gateway.
Signed-off-by: Gagan Mac <gmac@codeaurora.org>
Currently the Y and C sizes are set based on the
size of video being decoded. In case of smooth
streaming, decoded sizes are not the same as allocated
sizes. This change will set the Y and C sizes to
allocated sizes.
Signed-off-by: Deepika Pepakayala <deepikap@codeaurora.org>
Prevent the register initialization function from disabling
clocks that are already running. This will allow enabled
clocks that are not rate-settable to be smoothly handed off
from bootloader to Linux control.
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
Added io mapping for dmov device.
Added the platform device for dmov. The device is using security
domain 0 for now until TZ comes in, at which point this would
be moved to security domain 1.
Signed-off-by: Joel King <joelking@codeaurora.org>
Keep GPIO 153 and 151 to low power state when
camera is not in active state.
CRs-Fixed: 294992
Signed-off-by: Suresh Vankadara <svankada@codeaurora.org>
The gpiomux interface is required for drivers
to manipulate the pinmux functionality of their gpios
at runtime.
Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>
Any unexpected events such as sdcard removal can delay the
reading of recorded packets and results in pcm driver running
out of frame buffers. But read calls of application gets blocked
for such unknown or abrupt errors.
Add timeout of two seconds for read call in pcm in driver to avoid
application getting blocked on driver read calls in any error cases
which can result in improper application behavior.
Signed-off-by: Manish Dewangan <manish@codeaurora.org>
Change the packing format of LDO and SMPS RPM regulator requests
to mirror changes made to interface on the RPM side.
Signed-off-by: David Collins <collinsd@codeaurora.org>
When client drivers use spinlock and embrace SPS APIs that use mutex,
scheduling error may happen. Use spinlock for these SPS APIs instead.
Signed-off-by: Yan He <yanhe@codeaurora.org>
For any data to be transferred over usb endpoint, USB S/W
configures the data to be transferred in queue heads and transfer
descriptors and requests h/w to process the data by priming the
endpoint. Sometimes it is observed that endpoint priming is
failing when usb requests are being queued back to back. Although
the h/w is recovering later, some unprocessed requests are
pending in ep requests queue. To avoid this issue, check for
stale requests before priming the endpoint and add the current
request at the endpoint of request queue.
Signed-off-by: Vamsi Krishna <vskrishn@codeaurora.org>