Commit graph

440480 commits

Author SHA1 Message Date
Abhijeet Dharmapurikar eaee65799e power: qpnp-smbcharger: introduce FCC voting
Instead of having callsites track other reasons and their values before
updating FastChargeCurrent (FCC), use the pmic-voter to do this.

Change-Id: I7c3bea5529377b8233a5c697b1a042477c2834ac
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
2015-12-03 04:06:36 -08:00
Abhijeet Dharmapurikar d5d7a6580d power: qpnp-smbcharger: parallel: step reduce ICL by 100mA and rerun AICL
Currently while in parallel charging we reduce the total ICL to the
PMI's AICL result plus the current drawn from parallel charger.

The problem with this approach is that if AICL is low, we could
prematurely reduce the ICL.

Instead reduce the total ICL by 100mA per step. Also rerun AICL if the
PMI's ICL is higher than PMI's AICL result. This gives another chance
for AICL to settle higher than previous, enabling us to draw more
current.

Change-Id: I9e945ebc092d00c3b8caabb82ffa7af9d089f080
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
2015-12-03 04:06:19 -08:00
Abhijeet Dharmapurikar 0339df41c1 power: qpnp-smbcharger: fix parallel enable
Currently the parallel enable function checks for few conditions and
could decide to disable parallel charging. That is against the
function's charter.

Move these checks to the smbchg_is_parallel_usb_ok() function where it
really belongs. Since the calculation of USB current is done there,
return it back. The call sites are expected to pass the returned
USB current to the enable() function if they decide to enable
parallel charging.

Change-Id: Ibc1f716bc287b65602960c87fbde84fc83b57b41
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
2015-12-03 04:06:05 -08:00
Abhijeet Dharmapurikar ef25e5b24b power: qpnp-smbcharger: don't call parallel enable directly
The FCC setting code, tries to enable parallel charger by calling
smbchg_parallel_usb_enable();

Instead change it to go through the smbchg_parallel_usb_check_ok()
api.

Change-Id: I672e0cf63f8dade94b799935fa7e183fb966a7b7
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
2015-12-03 04:05:51 -08:00
Abhijeet Dharmapurikar ed1edacb4d power: qpnp-smbcharger: enable parallel charger immediately
When an event happens which could change parallel charger
current distribution, the current driver won't act on it immediately.
It waits for a timed delay before reconfiguring.

If parallel charger is already in progress, don't delay for
reconfiguration. Act on it immediately.

Change-Id: I2685b1d19e0c5985a9bb1e0ce411e03e9f26154d
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
2015-12-03 04:05:31 -08:00
Anirudh Ghayal 012309b6af power: smbcharger: Suspend USB for IUSB requests <= 2mA
In certain conditions (such as RESET event) the USB driver
can request 0mA IUSB. Force the USB to suspend for all
ISUB requests <= 2mA.

Change-Id: Iaafaffc7327dc0ea0e55f473395d5aadfb3c1ddd
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
2015-12-03 04:05:14 -08:00
Xiaozhe Shi df2099c1c4 power: qpnp-smbcharger: support flash icl loop disable workaround
Support setting the FLASH_TRIGGER power supply property in order to
disable the input current limit regulation loop when flash is strobing
without OTG connected.

Change-Id: I8d8dba8050a3fe066bbea108e4aaafda6045123b
Signed-off-by: Xiaozhe Shi <xiaozhes@codeaurora.org>
2015-12-03 04:04:54 -08:00
Xiaozhe Shi 03cdf48df1 power_supply: add POWER_SUPPLY_PROP_FLASH_TRIGGER
Add the power_supply property FLASH_TRIGGER in order to run algorithms
and workarounds for when the flash led need to strobe.

Change-Id: Icb2b25ffaaba329132f095f2377a22078633bf63
Signed-off-by: Xiaozhe Shi <xiaozhes@codeaurora.org>
2015-12-03 04:04:38 -08:00
Xiaozhe Shi 5e1f29dfa2 power: qpnp-smbcharger: fix software esr pulse algorithm
The current implementation of the software ESR pulse does not work.
Lowering the FCC of the charger by 200mA does nothing if the charge
current is not FCC limited.

Instead, create an artificial ESR pulse by lowering the FCC to the
current battery current and subtracting 200mA from it. Cap this at the
termination current + 200mA though so that it does not accidentally
trigger charge termination.

In order to read the correct termination current, also read the battery
profile for the termination current in case termination is being done by
the fuel gauge.

CRs-Fixed: 838574
Change-Id: I41e8c9ecb39e489792637a91178cf5d4cdc6e837
Signed-off-by: Xiaozhe Shi <xiaozhes@codeaurora.org>
2015-12-03 04:04:14 -08:00
Xiaozhe Shi 3143ae113e power: qpnp-smbcharger: register the batt-ov interrupt
Register the battery over voltage interrupt in order to print warnings
when it happens.

CRs-Fixed: 901362
Change-Id: Ia4bb47caa0ea01022c00afeddc1c12b3b78fbe5c
Signed-off-by: Xiaozhe Shi <xiaozhes@codeaurora.org>
2015-12-03 04:03:50 -08:00
Devesh Jhunjhunwala 75fe72450c power: qpnp-smbcharger: Update get_prop_batt_status method
Since the hvdcp 3 detection sequence fakes disconnecting and
reconnecting the usb, this makes it look like the battery
charging status is glitching. So update the get_batt_prop_status
method to return CHARGING if the hvdcp_3_det_ignore_uv flag is
set.

CRs-Fixed: 899401
Change-Id: I675e5c14286fe376ef4ff747b2fc746e149513c4
Signed-off-by: Devesh Jhunjhunwala <deveshj@codeaurora.org>
2015-12-03 04:03:19 -08:00
Xiaozhe Shi d5c1ce6e12 power: qpnp-smbcharger: only set CHARGE_DONE if terminated
The charger sets the POWER_SUPPLY_PROP_CHARGE_DONE on the bms power
supply during the chg_term interrupt handler function regardless of
whether charging actually terminated. In the cases of an instant
recharge trigger or manually calling the interrupt handler, the
CHARGE_DONE property will be falsely set.

Fix this by checking the real time status bit of the termination
interrupt before setting the charge_done property on the bms power
supply.

CRs-Fixed: 899712
Change-Id: I27e5969e462caba644e58095d6885e3b7e3c4523
Signed-off-by: Xiaozhe Shi <xiaozhes@codeaurora.org>
2015-12-03 04:02:24 -08:00
Xiaozhe Shi eb75f76f74 power: qpnp-smbcharger: lower fcc by 200mA during SW ESR pulse
Currently the charger driver configures the fast charge current to 300mA
during a software ESR pulse. This is incorrect. FCC should be lowered by
a total delta of 200mA, not to 300mA.

Fix this in the charger driver.

CRs-Fixed: 872937
Change-Id: If7e8a52775d323f0b21d754a4322b85119b15ccc
Signed-off-by: Xiaozhe Shi <xiaozhes@codeaurora.org>
2015-12-03 04:01:57 -08:00
Xiaozhe Shi 0c133c866b power: qpnp-smbcharger: increase parallel charger fcc
The parallel charger's VSYS is not connected on parallel charging
designs. All of the charge current flows through the CHGOUT to the
battery. However, if the primary charger is input current limited and
there is a large system load, then the parallel charger's current will
flow into the primary charger's CHGOUT. This will supplement the system
load instead of charging the battery.

This is a problem because all the current provided by the secondary
charger is fed through the batfet, and is sensed as charge current. The
amount of current provided to the battery is actually less than that
because the current is partially supplied to the system instead. This
results in the parallel charger not drawing enough current to charge the
battery even though there is plenty of current left before the input
current limit is hit.

Work around this issue by increasing the fast charge current on the
secondary charger and lowering it on the primary charger. This way, the
primary charger has more current to feed the system and the secondary
charger is less likely to be limited by the false charge current limit.

CRs-Fixed: 895883
Change-Id: I792ed9450bdac87d96b24707c1fb63fe93925b70
Signed-off-by: Xiaozhe Shi <xiaozhes@codeaurora.org>
2015-12-03 04:00:12 -08:00
Xiaozhe Shi cccc8144e6 qpnp-smbcharger: update current and voltage tables for PMi8996
Update the current and voltage tables for the qpnp-smbcharger driver so
that it also correctly supports the PMi8996 charger.

CRs-Fixed: 88862
Change-Id: I5b40ae169deb2b81bce99527cd18e71ea661be99
Signed-off-by: Xiaozhe Shi <xiaozhes@codeaurora.org>
2015-12-03 03:59:49 -08:00
Xiaozhe Shi e492606e79 power: qpnp-smbcharger: fix workaround settings for PMi8994
Currently in the workaround select function, there is a missing break
statement after the PMI8994 subtype case. This causes PMi8994 chargers
to be configured with additional unnecessary workarounds for PMi8950.

Fix this bug by adding the break statement after the PMI8994 subtype
case.

CRs-Fixed: 892014
Change-Id: I66c5e2b49d88d4cc57445e802edd4ee115f0ec33
Signed-off-by: Xiaozhe Shi <xiaozhes@codeaurora.org>
2015-12-03 03:56:20 -08:00
Nicholas Troast 6e6162e4f7 power: qpnp-smbcharger: add support for PMI8996
Recognize the new PMIC subtype 0x13 as PMI8996.

Change-Id: If629f73695c16b966dcbbfec7fb5a93bc0f42265
Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
2015-12-03 03:55:59 -08:00
Yeleswarapu Nagaradhesh 676c042483 ARM: dts: msm: correct stereo wsa speaker setting for 8976 devices
When BUSID pin is connected to ground, wsa speaker should be
set as left. When it is connected to VDD, wsa speaker should
be set as right. Current setting is inversed.
Correct stereo wsa speaker left/right setting for 8976.

Change-Id: If2b44be202f084d76cd9e58307d36c3fce802e3f
Signed-off-by: Yeleswarapu Nagaradhesh <nagaradh@codeaurora.org>
2015-12-03 03:51:57 -08:00
Abhijeet Dharmapurikar c68d71b87e power: qpnp-smbcharger: add support to skip USB notifications
Some hardware configurations allow the USB driver to detect presence
and type without charger's APSD. This is true especially when the external
muxes are used to multiplex an USB port and a docking station on the usbin
input line.

The USB port when active, ends up notifying the USB driver via a gpio.
When docking station is active, USB side need not know about it.

Note that this change also removes the null checks for usb_psy. It is
initialized at probe and probe's success is dependent on proper usb_psy
detection and initialization.

Change-Id: I7e300ce19d82861f34ccf37545f3317221f727a9
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
2015-12-03 03:46:31 -08:00
Devesh Jhunjhunwala 6d83eaeef6 power: qpnp-smbcharger: Implement a voter class for the pmic clients
Since there are many clients that control common resources like
input/battery current limit, implement a voting scheme to vote on
these resource values.

Change-Id: I2e7c114a8985030d3e54e7c98687c94aeb3c3c73
Signed-off-by: Devesh Jhunjhunwala <deveshj@codeaurora.org>
2015-12-03 03:46:06 -08:00
Abhijeet Dharmapurikar f001391cb0 power: qpnp-smbcharger: unsuspend dc path during init
The dc path could be suspended while exiting the bootloader. Enable it
again at initialization.

CRs-Fixed: 883886
Change-Id: If25c0d8e4ed01d0c7637f1b06643a23cec330af4
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
2015-12-03 03:45:13 -08:00
Chunmei Cai def14f8d07 power: qpnp-smbcharger: Add support for detecting damaged battery
Detect safety timer expired condition from charger and notify it to FG
through safety_timer_expired property. This can be used for PMi8952 V2.0
and future PMi chips. While at it, rename the safety-timeout irq to
wdog-timeout irq.

CRs-Fixed: 866074
Change-Id: I3a0f1f053a0038349bf5f704cf29eb5b84de2601
Signed-off-by: Chunmei Cai <ccai@codeaurora.org>
2015-12-03 03:44:44 -08:00
Xiaozhe Shi 93bb14eeb5 msm: revid: add pmic names to the revid_data structure
Add the pmic names to the revid structure for consumers.

Change-Id: I4887a2bd736d2568d23b0e6dd774436e064379e9
Signed-off-by: Xiaozhe Shi <xiaozhes@codeaurora.org>
2015-12-03 03:43:36 -08:00
Sudheer Papothi 1455868f44 soundwire: put soundwire in suspend state when system is idle
Put soundwire in suspend state when system is in idle state.
This will avoid power consumption on speakers when system is in
idle state.

Change-Id: I4f38457fa7681957e21ff1381f9bd841533bd7b5
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2015-12-03 02:55:59 -08:00
Subhash Jadavani e3e44f4ecb mmc: block: workaround for timeout issue with some vendor devices
Commit 66a7393a3ba9685d1eddfbce72e3ef8f4848f19f ("mmc: block: ensure CMDQ
is empty before queuing cache flush") added a workaround for particular
vendor's eMMC devices. Workaround was to wait for all the outstanding
requests to finish up before queuing the flush request. Now detailed
root cause analysis from vendor shows that original issue can happen only
if DCMD command is sent to device too quickly (within less than 6
microseconds) after completion of previous small sector (less than 8
sectors) read operations. Hence with this change, we are fine tuning the
previous workaround such that it would almost have no impact on the storage
benchmark performance numbers.

Change-Id: I1df1c5d7bbcd7b526236651077b7dade2626cb30
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
Signed-off-by: Sahitya Tummala <stummala@codeaurora.org>
2015-12-03 12:05:48 +05:30
Subhash Jadavani cf4633a5f0 mmc: block: ensure CMDQ is empty before queuing cache flush
Some devices might stop responding to new commands if device cache flush
is queued to host controller while host controller is still processing
outstanding requests.

To workaround this issue, we are making the cmdq thread to wait for all
the oustanding requests to be finished before queuing cache flush command
on host controller.

Change-Id: I15387734f51ca4cadfc9e11270f14d8a0806a00f
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
Signed-off-by: Sahitya Tummala <stummala@codeaurora.org>
2015-12-03 12:02:06 +05:30
Katish Paran 00e67db445 memshare: Release the memory only if no allocation is done
Currently, memshare relies on the system monitor only for
releasing memory for the allocated clients. It may happen that
XPU is still intact on the modem side while driver tries to
release the memory. This patch ensures that memory release only
happens if XPU is released.

Change-Id: I45716c0abe6bc08559854782ff73a332e148a7cb
Signed-off-by: Katish Paran <kparan@codeaurora.org>
2015-12-02 04:31:00 -08:00
Linux Build Service Account 8f5716be95 Merge "ARM: dts: msm: Increase max hw load by 1fps" 2015-12-02 01:11:15 -08:00
Linux Build Service Account 41b5cd59c4 Merge "ARM: dts: msm: enable SSC for DSI PLL for msm8956/8976 v1.1" 2015-12-02 01:10:40 -08:00
Linux Build Service Account f3aa88cb2b Merge "clk: qcom: mdss: fix precision loss in VCO clock rate calculation" 2015-12-02 01:10:39 -08:00
Linux Build Service Account 9bd88f9d60 Merge "clk: qcom: mdss: add support for MDSS PLL Spread Spectrum" 2015-12-02 01:10:39 -08:00
Taniya Das 36f72253cb clk: qcom: clock-cpu-8976: Add required fmax rates to OPP
Currently clock driver would try to get all the supported clock rates and
add to OPP framework. Avoid this by adding only the required fmaxes to opp
for clients to extract freq/voltage.

Change-Id: I7bd1de1a67da819f487ea1a7d79e326bb15bfbca
Signed-off-by: Taniya Das <tdas@codeaurora.org>
2015-12-02 00:43:16 -08:00
Laxminath Kasam 984910d8e0 ASoC: wcd9335: add fixes for TX pop and spkr gain updates
Port fixes for TX pop and spkr gain updates for tasha.
Also add fix in WSA for retry when device re-enumeration.

Change-Id: I6573517a101a4e5b0c34ef07a78c7dd0a4f127e5
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2015-12-01 02:38:44 -08:00
Anoop Kumar Yerukala 21a4fec644 ARM: dts: msm: Remove 133Mhz power level
Remove lowest power level to improve headroom in gpu active
for gmail scroll use case.

Change-Id: I531d5364273c1ac5240c5c5ffcd160323428854d
Signed-off-by: Anoop Kumar Yerukala <ayeruk@codeaurora.org>
2015-11-30 23:44:18 -08:00
Anoop Kumar Yerukala 53fffeaed7 ARM: dts: msm: Modify floor values for gpu bus votes
Update bus votes for SVS power levels to improve
power in some of DOU use cases.

Change-Id: I4dff436a6ca147d4f94ceef56fb106f374cfde96
Signed-off-by: Anoop Kumar Yerukala <ayeruk@codeaurora.org>
2015-11-30 23:43:38 -08:00
Lingutla Chandrasekhar 9939071f3f Revert "ARM: unwinder: fix excessive logging issue"
This reverts commit aa22a57d7e.

As Android is using arm-eabi- tool chain for 32-bit kernel
compilation, To avoid unwind errors, we use arm-eabi-
tool chain instead of arm-linux-androideabi- for 32-bit kernel
compilation.
So this workaround is no longer required for arm-eabi- tool chain.

Change-Id: Id38c06d504fefba7894ab0ede6e482ee187902d3
Signed-off-by: Lingutla Chandrasekhar <clingutla@codeaurora.org>
2015-12-01 12:09:38 +05:30
Ashwin Namjoshi 2926617744 ARM: dts: msm: update mincpubw voting for MSM8976/8956
Updating mincpubw voting to 192Mhz for MSM8976/8956.

Change-Id: I231e3af7c8db6e23f973f04b76127835827af9d5
Signed-off-by: Ashwin Namjoshi <anamjosh@codeaurora.org>
2015-11-30 22:24:06 -08:00
Anand N Sunkad b7c2015390 ARM: dts: msm: configure pc disable latency for 8976
Configure PC disable latency value for 8976 target when  pm_qos
request to disable power collapse for DDR during SSR and coldboot.

CRs-Fixed: 914674
Change-Id: I65a2ca8b4a94a337195e8c4e8e4743e38f57197e
Signed-off-by: Anand N Sunkad <asunka@codeaurora.org>
2015-11-30 22:14:38 -08:00
Joonwoo Park b9c755e46f sched: encourage idle load balance and discourage active load balance
Encourage IDLE and NEWLY_IDLE load balance by ignoring cache hotness and
discourage active load balance when by increasing busy balancing failure
threshold to initiate active load balancer in order to reduce scheduler
latency and avoid unnecessary active migration within a same domain.

Change-Id: I22f6aba11932ccbb82a436c0532589c46f9148ed
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
[pkondeti@codeaurora.org: resolved minor merge conflicts]
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
2015-11-30 22:12:16 -08:00
Ritesh Harjani a157845abc mmc: block: Do not call post_req in DCMD case
No need to call post_req if it's a DCMD request
completion.

Change-Id: Id11165967e316b1e556aaeb6d67bd18844cee6e1
Signed-off-by: Ritesh Harjani <riteshh@codeaurora.org>
2015-12-01 11:40:53 +05:30
Ritesh Harjani f53309905e mmc: block: cmdq discard should use softirq completion path
Currently cmdq discard requests are not using same
softirq completion path as other cmdq request. So there
is no way to detect any error and handle it in case
of error of DCMD requests.

Make cmdq discard requests use blk_complete_requests
which complete via softirq completion path.

Change-Id: I1e03c81bc6fee8266cf1c86bada015e548770d7a
Signed-off-by: Ritesh Harjani <riteshh@codeaurora.org>
2015-12-01 11:40:53 +05:30
Ritesh Harjani b12c635f5f mmc: block: Error handling fixes and support of reset_all
This does following:

1. Adds support to handle multiple cmdq software requests timeout.
   Currently we schedule error handling work for the first timedout
   request. We requeue all pending tasks, knock off all tasks from
   device queue and reset card and controller as part of this, then
   for all other software requests timeout, if it comes while executing
   error work, we return BLK_EH_NOT_HANDLED.
   This fixes BUG_ON in case of multiple requests timesout together.

2. Current code resets CQE, power cycle the card and requeue all the
   requests in case of any error.

3. mmc_blk_cmdq_err work takes care freeing up all resource allocation
   like clk and rpm hold, in case of reset_all.

4. Currently we were never clearing error CMDQ_STATE_ERR in case of any
   error. This patch takes care of this bug.

Change-Id: I83d483c11fe2d7f2e462086cc3c0932057304c0d
Signed-off-by: Ritesh Harjani <riteshh@codeaurora.org>
2015-12-01 11:40:53 +05:30
Ritesh Harjani 02a34eb670 mmc: core: cmdq helper for reset and claim host context
This patch does following-

This adds an API(mmc_cmdq_hw_reset), for RESET_ALL
of SDHCI, power cycle mmc card and
reintialize it, which enables cmdq as well(if supported).

This acquires claim_host before calling mmc_power_restore.
mmc_power_restore should be called with claim_host acquired,
since this function is required from non-claim-host context in
cmdq error handling.

Change-Id: I31c4449dead1d4ad4e10a4822cce2298ec5fb4b6
Signed-off-by: Ritesh Harjani <riteshh@codeaurora.org>
2015-12-01 11:40:53 +05:30
Ritesh Harjani f9fd6cae32 mmc: core: Call cmdq_post_req with tag info instead of mrq
Call mmc_/cmdq_post_req with tag number instead of
mrq. This is needed in error handling as part of multiple
request error handling.

Change-Id: I175432639d28378ec74669e31deb4d1667c49bb8
Signed-off-by: Ritesh Harjani <riteshh@codeaurora.org>
2015-12-01 11:40:53 +05:30
Ritesh Harjani 9d7ed09d4b mmc: cmdq_hci: Add CQE WA for CQE HW bugs
This adds WA to handle few CQE error which
can cause HALT to fail or can give CQTERRI info
as NULL.
Like - currently there is a HW bug that in
case of ADMA error CQE will not stop and CQTERRI
register will not be updated with any valid values.
Halt will also most likely fail in case of ADMA error.

Thus possible WA for this is to disable CQE,
do reset_all and requeue all the requests in flight.

Change-Id: I5aaddbb7bec1de7dbc959144dc2f1a5ad16789ff
Signed-off-by: Ritesh Harjani <riteshh@codeaurora.org>
2015-12-01 11:40:53 +05:30
Ritesh Harjani e468bb8bee mmc: queue: Check for CQE disable state and remove requeuing
1. Add a check in mmc_cmdq_should_pull_reqs to not pull.
Any requests in case if CQE is disabled and card is not suspended.
This means that CQE must be in error state and so mmc_cmdq_thread
should stop issuing requests.

2. Do not requeue the request in case of error in issue path.
Ideally there should not be any error in the issue path
of request. Even if there is an error, we should not
requeue this request as (like in case of DCMD,
blk_end_request with partial bytes of completion will
make sure that request is not finished and still can be
fetched). So requeing the same request which is still in
elevator is illegal.

Change-Id: I0c5e6556d3d881f1a675db4fff4f995de024ddf8
Signed-off-by: Ritesh Harjani <riteshh@codeaurora.org>
2015-12-01 11:40:52 +05:30
Ritesh Harjani 348e810963 mmc: cmdq_hci: Helper API/info in cmdq for halt
This patch adds following helper API/info -

1. cmdq_halt_poll to halt the controller using polling
method. This is to be mainly used in case of an error
from cmdq_irq context.

2. Adds num_cq_slots & dcmd_cq_slot info to
mmc_host structure. This can be useful info
for mmc host structure like in case of handling
of multiple error requests

3. Adds CMDQ_STATE_CQ_DISABLE for cmdq host.
In case of an error if halt also fails, CQE error handling
code will disable CQ. So block layer needs to know
- to not pull any requests in such case.

Change-Id: I8e9a8d5094db82336917fcca4361ce84316c34ef
Signed-off-by: Ritesh Harjani <riteshh@codeaurora.org>
2015-12-01 11:40:52 +05:30
Ritesh Harjani 4582eff771 mmc: sdhci: Handle cmdq_irq before clearing error interrupt.
cmdq_irq should be handled before clearning error interrupt.
Because in case of an error CQE needs to be halted/disabled
in cmdq_irq, before we clear the error interrupt.
Otherwise, CQE might start processing other requests whose
doorbell is set, even in case of error in previous completed
request.

Change-Id: I8c77ca08dcf440293844120c1b59d2dada84bac5
Signed-off-by: Ritesh Harjani <riteshh@codeaurora.org>
2015-12-01 11:40:52 +05:30
Venkat Gopalakrishnan 887c497271 mmc: block: fix DCMD timeout err handling
DCMD requests don't have data, check for the data pointer before
accessing it to prevent null pointer dereference in case of DCMD
timeout err. Also signal a completion event for non flush requests
like discard that wait for the completion of DCMD request.

Change-Id: Ia71a5f1e278a039ba22f6ac42614d9ae79dba7e9
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
2015-12-01 11:40:52 +05:30
Taniya Das 9bd8ec0970 clk: qcom: clock-pll: Print PLL registers in case of pll lock failure
Occasionally, SR/HF rate PLLs may fail to achieve a lock, and the
output frequency may not match what software expects after configuring
a L value for a certain frequency. If the PLL fails to lock, that is,
the lock detection bit does not go high even after waiting for the
mandated amount of time, record additional PLL debug information in the
kernel log before panic().

Also update the SR PLL power up sequence to assert PLL_RESET_N and
PLL_BYPASSNL together.

Change-Id: Ib98d9b64cc8c8c11138ba75dea9eac649921c1e2
Signed-off-by: Taniya Das <tdas@codeaurora.org>
2015-11-29 22:01:12 -08:00