Commit Graph

256112 Commits

Author SHA1 Message Date
Abhijeet Dharmapurikar
930bf7bfd7 mfd: pm8xxx-irq: workaround for lost interrupt issue
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>
2011-10-03 10:27:09 -07:00
David Collins
4317676a54 msm: board-msm8960: Add enable times for PM8921 regulators
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>
2011-10-03 10:27:08 -07:00
Gagan Mac
6d7738a783 msm: msm_bus: Fix compilation error on enabling debug flag
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>
2011-10-03 10:27:08 -07:00
Ravishangar Kalyanam
7b57bb815b msm_fb: display: Use __va instead of ioremap for framebuffer memory map
Signed-off-by: Ravishangar Kalyanam <rkalya@codeaurora.org>
2011-10-03 10:27:07 -07:00
Yaniv Gardi
3e327763c9 msm: sdio: adding multi channel and multi device test for LPM
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>
2011-10-03 10:27:06 -07:00
Laxminath Kasam
885f510f6f ASOC: msm8x60: support to device_mute is added.
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>
2011-10-03 10:27:06 -07:00
Abhijeet Dharmapurikar
a3c0d94209 mfd: pmic8058: fix for lost adc interrupt
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>
2011-10-03 10:27:05 -07:00
Laura Abbott
1e36a02967 pmem: ensure SMI correctness
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>
2011-10-03 10:27:04 -07:00
Peter Krystad
f453bb396a Bluetooth: Add support for L2CAP Extended Flow Spec option.
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
2011-10-03 10:27:04 -07:00
Amy Maloche
2d0280311f board: msm8960: add machine_is option for fluid i2c registry
Signed-off-by: Amy Maloche <amaloche@codeaurora.org>
2011-10-03 10:27:03 -07:00
Joel King
4ebccc63cf msm: 8064: add support for gpio/tlmm.
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>
2011-10-03 10:27:03 -07:00
Kobi Cohen Arazi
18b04783a0 Add missing header guards in msm_rotator.h
msm_rotator.h was missing define __MSM_ROTATOR_H__

Signed-off-by: Kobi Cohen-Arazi <kobic@codeaurora.org>
2011-10-03 10:27:02 -07:00
Lucille Sylvester
57996e3add msm: kgsl: Only bind kgsl to CPU0, not CPU1
Signed-off-by: Lucille Sylvester <lsylvest@codeaurora.org>
2011-10-03 10:27:01 -07:00
Gopikrishnaiah Anandan
60f8007df4 vidc: vdec: Pass alignment flag to mapping api's.
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
2011-10-03 10:27:01 -07:00
Abhijeet Dharmapurikar
5a7df4e511 power: pm8921-charger: warn when battery is low
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>
2011-10-03 10:27:00 -07:00
Abhijeet Dharmapurikar
78d812ffc8 power: pm8921-bms: fix the pc calculation algorithm
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>
2011-10-03 10:26:59 -07:00
Mayank Rana
9825dc6c79 msm_serial_hs_lite: Add support for higher baud rate
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>
2011-10-03 10:26:59 -07:00
Pratik Patel
cfca519f00 Revert "workqueue: add workqueue_empty() api"
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>
2011-10-03 10:26:58 -07:00
Pratik Patel
529461b70c power: fix suspend_sys_sync_wait()
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
2011-10-03 10:26:58 -07:00
Jeremy Gebben
4e8aada5f3 msm: kgsl: split mh and mmu initialization
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>
2011-10-03 10:26:57 -07:00
Patrick Lai
831561ea10 ASoC: msm: not call afe_close in prepare
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>
2011-10-03 10:26:56 -07:00
Siddartha Mohanadoss
72d796e208 board: msm8x60: Add delay between toggle of bahama reset
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>
2011-10-03 10:26:56 -07:00
Stephen Boyd
b6900e1671 msm: kgsl: Replace open-coded register call with SCM atomic
Instead of open-coding the SCM register calling convention, use
the SCM atomic apis.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2011-10-03 10:26:55 -07:00
Stephen Boyd
e2016608c6 msm: scm-io: Replace open-coded register call with SCM atomic
Instead of open-coding the SCM register calling convention, use
the SCM atomic apis.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2011-10-03 10:26:54 -07:00
Stephen Boyd
551cd96450 msm: scm: Add atomic SCM APIs
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>
2011-10-03 10:26:54 -07:00
Michael Bohan
ccd78a45dc arm: mm: Exclude additional mem_map entries from free
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>
2011-10-03 10:26:53 -07:00
Kiran Kumar H N
5b7afbc106 msm: camera: Change max number of application buffers
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>
2011-10-03 10:26:53 -07:00
Kiran Kumar H N
9cbf523afd msm: camera: Fix raw snapshot functionality.
- 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>
2011-10-03 10:26:52 -07:00
David Collins
63e1f9ff17 regulator: pm8921-regulator: Add enable_time platform data entry
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>
2011-10-03 10:26:51 -07:00
Kevin Chan
89d8c1dff8 msm: camera: Improve camera IRQ stability
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>
2011-10-03 10:26:51 -07:00
Jeffrey Chuang
4bdf0232f0 defconfig: msm8960: Disable Ethernet Driver
Disable CONFIG_KS8851

Signed-off-by: Jeffrey Chuang <fchuang@codeaurora.org>
2011-10-03 10:26:50 -07:00
Yan He
160633ed06 platform-drivers: msm: sps: add DFAB clock support for SPS driver.
Signed-off-by: Yan He <yanhe@codeaurora.org>
2011-10-03 10:26:49 -07:00
Gagan Mac
3893b3b807 msm: 8960: Correct port representation for nodes
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>
2011-10-03 10:26:49 -07:00
Deepika Pepakayala
4288de3af5 msm: vidc: Set Y and C size registers to allocated size.
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>
2011-10-03 10:26:48 -07:00
Matt Wagantall
30011d2028 msm: clock-8x60: Don't disable clocks in reg_init
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>
2011-10-03 10:26:47 -07:00
Ananda Kishore
c63847bcdd vidc: add change to print MFC firmware version
CRs-Fixed: 296531
Signed-off-by: Ananda Kishore <kananda@codeaurora.org>
2011-10-03 10:26:47 -07:00
Joel King
0581896d5d msm: 8064: add support for DMOV in 8064 baseport.
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>
2011-10-03 10:26:46 -07:00
Larry Bassel
7fb0b25174 msm: do not create memory pools from unstable memory
When reserving memory for memory pools, do not use
memory which can potentially be powered off.

Signed-off-by: Larry Bassel <lbassel@codeaurora.org>
2011-10-03 10:26:46 -07:00
Stephen Boyd
151d00111f msm: clock-8960: Remove Q6 PLL4 proxy vote
Now that the Q6 is properly voting for PLL4 this can be safely
removed.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2011-10-03 10:26:45 -07:00
Tarun Karra
16346b0a11 msm: kgsl: shaders must be repartitioned during gmem save/restore
Signed-off-by: Tarun Karra <tkarra@codeaurora.org>
2011-10-03 10:26:44 -07:00
Suresh Vankadara
851bdc41e1 msm: camera: Fix GPIO issues in sensor drivers
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>
2011-10-03 10:26:44 -07:00
Rohit Vaswani
a513aa8dbf msm: Move gpiomux.h to include/mach
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>
2011-10-03 10:26:43 -07:00
Amy Maloche
edd5fd79fb input: cyttsp-i2c: choose firmware start address
Firmware start address changes from GEN3 to GEN2 devices.
Select proper firmware start address based on chip generation.

Signed-off-by: Amy Maloche <amaloche@codeaurora.org>
2011-10-03 10:26:42 -07:00
kuogee hsieh
405dc3051b msm_fb: display: add ioctl for mixer info
Add new ioctl to allow user to query mdp mixer detail configuration.

Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
2011-10-03 10:26:42 -07:00
Manish Dewangan
5a3695011a msm: audio: qdsp5: Add timeout for read call of pcm in driver
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>
2011-10-03 10:26:41 -07:00
Swaminathan Sathappan
70765cd7a3 msm: audio: qdsp6v2: Add support for aac dual mono playback
Signed-off-by: Swaminathan Sathappan <Swami@codeaurora.org>
2011-10-03 10:26:40 -07:00
Vijayakumar Muthuvel Manickam
9a9e76e0de mfd: marimba_core: Add debugfs interface for ADIE
Create debugfs entry for Marimba, Timpani, Bahama ADIE

Signed-off-by: Vijayakumar Muthuvel Manickam <vmuthuve@codeaurora.org>
2011-10-03 10:26:40 -07:00
David Collins
d090389b32 msm: rpm-regulator-8960: change request packing format
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>
2011-10-03 10:26:39 -07:00
Yan He
15f8646855 platform-drivers: msm: sps: add spinlock for BAM
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>
2011-10-03 10:26:39 -07:00
Vamsi Krishna
603d1cb143 usb: gadget: Check for pending requests before priming the ep
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>
2011-10-03 10:26:38 -07:00