A barrier request is used to control ordering of write requests without
clearing the device's cache. LLD support for barrier is optional. If LLD
doesn't support barrier, flush will be issued instead to insure logical
correctness.
To maintain this fallback flush s/w path and flags are appended.
This patch implements the necessary requests marking in order to support
the barrier feature in the block layer.
This patch implements two major changes required for the barrier support.
(1) A new flush execution-policy is added to support "ordered" requests
and a fallback , in case barrier is not supported by LLD.
(2) If there is a flush pending in the flush-queue, the received barrier
is ignored, in order not to miss a demand for an actual flush.
Change-Id: I6072d759e5c3bd983105852d81732e949da3d448
Signed-off-by: Dolev Raviv <draviv@codeaurora.org>
A barrier request is a type of flush request used to control ordering of
write requests without clearing the device's cache. LLD support for
barrier is optional. To maintain backward compatibility, barrier request
has to maintain flush s/w path and flags.
This patch introduces those flags to define interface between the block
layer and the LLD.
Change-Id: Iefa8e9a5c1b5e8256eaeb0322c435becd4669de9
Signed-off-by: Dolev Raviv <draviv@codeaurora.org>
[imaund@codeaurora.org: Resolved context conflicts]
Signed-off-by: Ian Maund <imaund@codeaurora.org>
Add new flag "simple_scaling" to on demand governor so that
the clocks can be scaled up only when the load is more than
up threshold and can be scaled down only when the load is less
than down differential data as provided within
struct devfreq_simple_ondemand_data.
Change-Id: Ibc6ab6297c1b64b6e6eaaa76d735d0b9ae0f6477
Signed-off-by: Sahitya Tummala <stummala@codeaurora.org>
[venkatg@codeaurora.org: dereference stat variables]
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
This patch adds a new flag to be used in cmd_flags field of struct request
for marking request as urgent.
Urgent request is the one that should be given priority currently handled
(regular) request by the device driver. The decision of a request urgency
is taken by the scheduler.
Change-Id: Ic20470987ef23410f1d0324f96f00578f7df8717
Signed-off-by: Tatyana Brokhman <tlinder@codeaurora.org>
[subhashj@codeaurora.org: resolved trivial merge conflicts]
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
[venkatg@codeaurora.org: resolved trivial merge conflict]
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
scsi.h reference 'struct device', the definition for which is not
included. Most users of this header compile because struct device
happens to be defined before scsi.h is included. Less-fortunate
drivers encounter:
linux/include/scsi/scsi.h:565:49: warning: 'struct device'
declared inside parameter list
Change-Id: I6352b0fc1d1ab296e500f6007b0b20be3b85a1f9
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
[venkatg@codeaurora.org: resolved trivial merge conflict]
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
The ioctl information should be in header files that expose it
to userspace.
Change-Id: Iabf1e53a1357c2ce22ecdc8dc0270377759effc8
Signed-off-by: Krishna Konda <kkonda@codeaurora.org>
Signed-off-by: Abhimanyu Kapur <abhimany@codeaurora.org>
[venkatg@codeaurora.org: resolved trivial merge conflicts]
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
The scsi ioctl related files are meant to be used from
userspace and hence should be in the appropriate include/uapi
directory.
Change-Id: Id6b14f353284a9ddac0d58b6b90e17561e2645aa
Signed-off-by: Krishna Konda <kkonda@codeaurora.org>
Signed-off-by: Abhimanyu Kapur <abhimany@codeaurora.org>
Until now the scsi mid-layer forbids runtime suspend till userspace
enables it. This is mainly to quarantine some disks with broken
runtime power management or have high latencies executing suspend
resume callbacks. If the userspace doesn't enable the runtime suspend
the underlying hardware will be always on even when it is not doing
any useful work and thus wasting power.
Some low-level drivers for the controllers can efficiently use runtime
power management to reduce power consumption and improve battery life.
Allow runtime suspend parameters override within the LLD itself
instead of waiting for userspace to control the power management.
Change-Id: I03e96a89d19c174deeb5bd4f94136c77073eb009
Signed-off-by: Sujit Reddy Thumma <sthumma@codeaurora.org>
[subhashj@codeaurora.org: resolved trivial merge conflicts]
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
Host sends MODE_SENSE_10 with caching mode page, to check if the device
supports the cache feature.
Some LLD standards requires DBD field to be set to 1.
This patch allows LLD to define the setting of DBD if required.
Change-Id: I7f6c0ff6613516c3ef49aacc0679b96b8bd9ccc8
Signed-off-by: Maya Erez <merez@codeaurora.org>
[mattw@codeaurora.org: resolved a trivial context conflict in
Scsi_Host struct definition]
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
[subhashj@codeaurora.org: resolved trivial merge conflicts]
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
"bBootLunEn" attribute value decides the active Boot LUN but there could
be a case where userspace may want to change it during image update.
This change allows writing to this parameter.
Change-Id: I6e8d630606d8caf6197ef662003ec1ee646afe81
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
This patch adds a new debugfs capability to collect query statistics.
It counts how many times each IDN (index) was sent to device for each
query opcode.
A usage example:
1. to clean current query statistics:
echo 1 > /d/ufshcd0/stats/query_stats
2. to dump the current query statistics:
cat /d/ufshcd0/stats/query_stats
This capability is always on, and can not be turned off.
Change-Id: I46ec405aae480c0dc161dca015b407bde6335cf7
Signed-off-by: Yaniv Gardi <ygardi@codeaurora.org>
Passing strings instead of enums for tracing events uses more of
the tracing buffer. Instead, pass the enum integer value and
convert to string when tracing event is formated using the
__print_symbolic() macro.
Change-Id: I91c4374fd079c6ea150373548975f2b259eb2d59
Signed-off-by: Gilad Broner <gbroner@codeaurora.org>
[subhashj@codeaurora.org: resolved trivial merge conflicts]
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
[venkatg@codeaurora.org: resolved trivial merge conflicts]
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
The following three trace events:
ufshcd_clk_gating, ufshcd_hibern8_on_idle and ufshcd_auto_bkops_state
share the same arguments and meaning - logging some state change
in the UFS driver.
Defining those as template instances takes up less memory compared
to be defined as separate trace events.
Change-Id: I92c2bf3eada6f876b8c9e8a7bfc4568c7886548f
Signed-off-by: Gilad Broner <gbroner@codeaurora.org>
Adding a new access api for gendisk without using scsi private
headers.
This patch fixes multiple errors:
1. Relative include path in ufs_test.c to <../sd.h>
2. Allowing suspend after first test run.
Change-Id: I152d34667ab63790b643abb55111fc5b67c90ac9
Signed-off-by: Dolev Raviv <draviv@codeaurora.org>
[merez@codeaurora.org: fix trivial conflicts in ufs_test.c]
Signed-off-by: Maya Erez <merez@codeaurora.org>
[venkatg@codeaurora.org: resolved trivial merge conflicts,
use scsi_disk_get instead of __scsi_disk_get]
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
Until now, the phy-qcom-ufs-*.* files used ufs data structures and
macros and thus, we had to expose most of them in include/linux/scsi/ufs
path. But now, after removing support for phy 28nm in apq8084 under
kernel 3.14, we can minimize the exposure of code to essential minimum.
To do that, we relocate the ufs.h, unipro.h, ufshcd.h and ufs-qcom.h
files back to reside internally in the driver.
Also this patch contains some very minor changes suggested by the
upstream checkpatch script.
Change-Id: Id2a923a6a0b1c76565c25f2797a666f3a0d1315f
Signed-off-by: Yaniv Gardi <ygardi@codeaurora.org>
[subhashj@codeaurora.org: resolved merge conflicts]
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
[venkatg@codeaurora.org: fixed header includes and other
trivial merge conflicts]
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
QUniPro controller requires additional configuration before and after
clock scaling, this change adds the support for it.
Change-Id: I0add27ff3ab54f72b8b79e1e554541c2e492a4c8
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
Some UFS devices send incorrect LineCfg data as part of power mode change
sequence which may cause host PHY to go into bad state. Currently we
workaround this issue by disabling the device's TX LCC but disabling TX
LCC is much more complicated if both host and device supports UniPro 1.6
specification. To simplify the workaround, this change disables the host
PHY's RX LineCfg to skip processing incorrect LineCfg from device.
Change-Id: I1eac56c11dd001eb0c53ba8e16aa512a656ab9ea
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
[venkatg@codeaurora.org: resolved trivial merge conflicts]
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
Change the maximum high speed gear to HS-G3 so if both host and device
supports HS-G3, UFS link will be allowed to operate in HS-G3.
Change-Id: I1117990948f9c09ae103cd1e692716e0010362cb
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
UFS driver's load based clock scaling feature scales down the ufs related
clocks in order to allow low power modes of chipsets. UniPro 1.6 supports
maximum gear up to HS-G3 (High Speed Gear3) and some of the chipsets
low power modes may not be allowed in HS-G3 hence this change adds support
to scale gear between HS-G3 and HS-G2 based on same existing load based
clock scaling logic.
Change-Id: I25c70230a77321efd654af7c496c43936324ae40
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
[subhashj@codeaurora.org: resolved trivial merge conflicts]
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
[venkatg@codeaurora.org: resolved trivial merge conflicts]
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
UFS host controller hardware may allow the host controller
to be power collapsed when UFS link is hibern8 state, this
change allows the UFS host controller to be power collapsed
during hibern8.
Change-Id: I42f962484b9d6635be1139b1fc6447dd2ca2200c
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
[subhashj@codeaurora.org: resolved trivial merge conflicts]
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
[venkatg@codeaurora.org: resolved trivial merge conflicts]
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
As of HW major version 2, bit 'UFS_DEV_REF_CLK_EN' which is used to
gate/ungate the ref_clk to external UFS device, was moved into the
UFS register space to UFS_CFG1 register. This change adds support
to appropriately control the device reference clock and it also
adds the missing documentation for the device reference clock control
register address space.
Change-Id: I66a6a75dc5a1cf130b1cee90ae20f9f950edfb3a
Signed-off-by: Gilad Broner <gbroner@codeaurora.org>
[subhashj@codeaurora.org: resolved trivial merge conflicts]
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
Add support for exposing debug registers via debugfs. This
can be used for runtime debugging of failures/errors without
the need to add more prints to the console.
In order to avoid unnecessary code duplication, the function
for dumping registers to a file (in debugfs.c) has been
slightly modified and exposed as an external function.
Signed-off-by: Dov Levenglick <dovl@codeaurora.org>
Change-Id: I77f9f3a6d041f805a93d095446f3e8077977036f
Adds support for configuring and reading the test bus and debug
registers. The configuration is controlled by debugfs. Reading can
be triggered either by debugfs or by the kernel code.
Change-Id: I943e3c1b1e383a91a8abbb8dab9714434c56b6f5
Signed-off-by: Dov Levenglick <dovl@codeaurora.org>
[imaund@codeaurora.org: Resolved context conflicts]
Signed-off-by: Ian Maund <imaund@codeaurora.org>
Add ICE debug prints for debugging purposes. These prints
will be shown as part of dumping registers during error handling.
Enabling can be controlled by debugfs.
Change-Id: I7d070cc8df099e6c526997d39973a3e1c161091b
Signed-off-by: Dov Levenglick <dovl@codeaurora.org>
Provide a mechanism for the userspace to suppress specific
debug prints via debugfs. This is useful in order to avoid
cases where too much printing would cause watchdog timers
to expire.
Change-Id: I2500b7621b631e260d98595ed8cfe7d5a496dc10
Signed-off-by: Dov Levenglick <dovl@codeaurora.org>
As of HW major version 2, a new bit 'UFS_DEV_REF_CLK_EN' was added
to UFS_CFG1 register which needs to be set as part of hibernate
enter/exit sequences during suspend/resume.
Change-Id: I66a6a75dc5a1cf130b1cee90ae20f9f950edfb3a
Signed-off-by: Gilad Broner <gbroner@codeaurora.org>
[imaund@codeaurora.org: Resolved context conflicts and updated a
conditional in ufs_qcom_advertise_quirks to use the ufs_qcom_host
struct when querying major hw versions]
Signed-off-by: Ian Maund <imaund@codeaurora.org>
[subhashj@codeaurora.org: resolved trivial merge conflicts]
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
[venkatg@codeaurora.org: resolved trivial merge conflicts,
drop changes to include/linux/phy/phy-qcom-ufs.h]
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
Provides a mechanism for the userspace to suppress specific
debug prints via the debugfs. This is useful in order to avoid
cases where too much printing would cause watchdog timers to expire.
Change-Id: I1ab068cd616ddac767ec5f30ab130e3b1ac34e15
Signed-off-by: Dov Levenglick <dovl@codeaurora.org>
[imaund@codeaurora.org: Resolved context conflicts]
Signed-off-by: Ian Maund <imaund@codeaurora.org>
[subhashj@codeaurora.org: resolved trivial merge conflicts]
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
ice_init may need UFS clocks to be enabled in order to allow
enabling ICE as part of its initialization. To allow that,
ice_init should be done as part of UFS initialization sequence.
In such a case ice_reset is no longer needed to be called as part of
UFS initialization and should be moved to host reset scenarios.
Change-Id: Iaa851083a9f73045c7ca02d69dd65b3a00b85bff
Signed-off-by: Maya Erez <merez@codeaurora.org>
DME attributes read/write commands need GenSelectorIndex argument and
according to UFS host controller specification, it should specify the
targeted M-PHY data lane.
This is the valid range of GenSelectorIndex for M-PHY attributes:
0 to (2 * PA_MaxDataLanes - 1)
Example (Note: PA_MaxDataLanes is UniPro protocol constant set to 4):
---------------------------------------
MPHY Access target | GenSelectorIndex
---------------------------------------
TX Lane0 | 0
TX Lane1 | 1
RX Lane0 | 4
RX Lane1 | 5
---------------------------------------
This change make sure that correct GenSelectorIndex is passed for M-PHY
attributes
Change-Id: I38c14b5801ece7fce7a7970385756859618efd32
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
[venkatg@codeaurora.org: resolved trivial merge conflicts]
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
New revisions of UFS host controller supports the new UniPro
hardware controller (referred as QUniPro). This patch adds
the support to enable this new UniPro controller hardware.
Change-Id: Iccbcc38c36e6d9b9fcbb5c7fd7a3e3326c1c4ce0
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
[subhashj@codeaurora.org: resolved trivial merge conflicts]
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
Since support for 28nm phy removed in kernel 3.14, all related code
that is specific to phy 28nm is also removed.
Specifically the quirk that enables save/restore phy configuration
is removed (and all its relevant callbacks) as it's unique to 28nm
ufs phy.
Change-Id: Ie723885bacb52548573fc1140d09b0ea5f067382
Signed-off-by: Yaniv Gardi <ygardi@codeaurora.org>
[venkatg@codeaurora.org: drop changes to
include/linux/phy/phy-qcom-ufs.h]
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
Different platform may have different number of lanes
for the UFS link.
Add parameter to device tree specifying how many lanes
should be configured for the UFS link.
Change-Id: Ida8b13b916f76b3cc7afd3da3d04219e95627678
Signed-off-by: Gilad Broner <gbroner@codeaurora.org>
[subhashj@codeaurora.org: resolved trivial merge conflicts]
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
ufshcd_queuecommand() vote for the resources in this order: clocks,
pm_qos latency, hibern8 exit. If any of these votes are not already
applied, each one has to be applied asynchronously and in that case we are
releasing all the previously applied resource votes (for example, if
hibern8 exit has to be completed asynchronously, we release the votes for
pm_qos and clocks as well). This is not a optimal solution instead we
should skip scheduling the unvoting work for already voted resources.
Change-Id: Ie700d9b3bf64370a5885787f7313d41adb5b3566
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
Details printed for each request that is aborted can overload the
target as there can be several requests that are aborted at once.
This change will print full request details only for the first
aborted request since the last link reset, and minimal details
for other subsequent requests.
Change-Id: I2868262e0b687c9ddd771a52708428b7de14bea2
Signed-off-by: Gilad Broner <gbroner@codeaurora.org>
[subhashj@codeaurora.org: resolved trivial merge conflicts]
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
Analyzing crash logs is made easier when the different UFS objects
state is accessible. Save a pointer to the main ufs_qcom_host
object when it is allocated.
Change-Id: I8eb909729dee7209e5d9b1af2652fe76ccd3c0ca
Signed-off-by: Gilad Broner <gbroner@codeaurora.org>
On certain error conditions request abort task itself might fail
when aborting a request. In such case, subsequent request aborts
should skip issuing the abort task as it is expected to fail as well,
and device reset handler will be called next.
Change-Id: I28c111c58e8c7fd54b836c6933d5fc56682c28b9
Signed-off-by: Gilad Broner <gbroner@codeaurora.org>
Some vendor's UFS device sends back to back NACs for the DL data frames
causing the host controller to raise the DFES error status. Sometimes
such UFS devices send back to back NAC without waiting for new
retransmitted DL frame from the host and in such cases it might be possible
the Host UniPro goes into bad state without raising the DFES error
interrupt. If this happens then all the pending commands would timeout
only after respective SW command (which is generally too large).
This change workarounds such device behaviour like this:
- As soon as SW sees the DL NAC error, it would schedule the error handler
- Error handler would sleep for 50ms to see if there any fatal errors
raised by UFS controller.
- If there are fatal errors then SW does normal error recovery.
- If there are no fatal errors then SW sends the NOP command to device
to check if link is alive.
- If NOP command times out, SW does normal error recovery
- If NOP command succeed, skip the error handling.
If DL NAC error is seen multiple times with some vendor's UFS devices then
enable this quirk to initiate quick error recovery and also silence related
error logs to reduce spamming of kernel logs.
Change-Id: Id2f0c05c414d700ba923513f8c9e3d1e6a8a749a
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
Errors such as UIC errors, illegal OCS values, and others may require
information kept in non standard UFS registers but controller debug
registers.
Implementing dbg_register_dump cb gives access to such register while
debugging those issues.
Change-Id: I259c3d691b95f72ea62ed162492f9081d472de80
Signed-off-by: Dolev Raviv <draviv@codeaurora.org>
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
Errors such as UIC error, illegal OCS values, and others may require
more information for debugging. Such information could be hibern8 events,
events sequences, recoverable errors, error history, and more.
This patch improves tracking of important errors and events in debug level
to be enabled when debugging a such issues. It includes:
* UIC error history
* Successful hibern8 events
* Successful command after hibern8 exit
* Clk-freq info
* Failed device command
* Infrastructure for dumping host controller debug information
Change-Id: If3b38b86caeec4ffc669d001b452050a4a6b5173
Signed-off-by: Dolev Raviv <draviv@codeaurora.org>
[subhashj@codeaurora.org: resolved trivial merge conflicts]
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
Use the ftrace infrastructure to conditionally trace ufs command events.
New trace event is created, which samples the following ufs command data:
- device name
- optional identification string
- task tag
- doorbell register
- number of transfer bytes
- interrupt status register
- request start LBA
- command opcode
Currently we only fully trace read(10) and write(10) commands.
All other commands which pass through ufshcd_send_command() will be
printed with "-1" in the lba and transfer_len fields.
Usage:
echo 1 > /sys/kernel/debug/tracing/events/ufs/enable
cat /sys/kernel/debug/tracing/trace_pipe
Change-Id: Id6e16a8c0b2a833c5453ed9923384f641e374a71
Signed-off-by: Lee Susman <lsusman@codeaurora.org>
[gbroner@codeaurora.org: fix merge conflict]
Signed-off-by: Gilad Broner <gbroner@codeaurora.org>
[subhashj@codeaurora.org: resolved merge conflicts and compilation error]
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
Add PM QOS cpu-dma latency request to the driver.
Latency parameter value is taken from the device tree node
using an optional parameter 'qcom,cpu-dma-latency-us'.
Unless specified, a default of 200us is used.
Change-Id: I3e10da9e65fc7324897c866b0c2a40cc5e6ca070
Signed-off-by: Gilad Broner <gbroner@codeaurora.org>
[subhashj@codeaurora.org: resolved trivial merge conflicts]
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
[venkatg@codeaurora.org: resolved trivial merge conflicts]
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
This patch adds the profiling support for some of the time critical
operations like hibern8 enter/exit, clock gating & clock scaling.
Change-Id: I4dde1078dcd2af47f051639b03c44c423ee344fa
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
UFS device requires to perform bkops (back ground operations) periodically
but host can control (via auto-bkops parameter of device) when device can
perform bkops based on its performance requirements. In general, host
would like to enable the device's auto-bkops only when it's not doing any
regular data transfer but sometimes device may not behave properly if host
keeps the auto-bkops disabled. This change adds the capability to let the
device auto-bkops always enabled except suspend.
Change-Id: I92c4531f88cb75a563568270584926eb73b53c98
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
Provide an option to enable/disable hibern8 on idle functionality during
runtime. Write 1 or 0 to "hibern8_on_idle_enable" sysfs node to
enable/disable hibern8 on idle functionality.
Change-Id: Id4b6253c3c53ed71575c05596abbd4dd99821eff
[subhashj@codeaurora.org: resolved trivial merge conflicts]
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
[venkatg@codeaurora.org: resolved trivial merge conflicts]
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
In order to save power we should put the UFS link into hibern8 as soon as
UFS link is idle and power measurement of active usecases (like audio/video
playback/recording) show that putting UFS link in hibern8 @ 10ms of idle
(if not earlier) would save significant power.
Our current available solution is to do hibern8 with clock gating @idle
timeout of 150ms. As clock gating has huge latencies (7ms each in enter and
exit), we cannot bring down the idle timeout to <=10ms without degrading
UFS throughput. Hence this change has added support to enter into hibern8
with another idle timer.
Change-Id: I5a31f18fc21015d4a68236da9fd94f3f016e1d44
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
[subhashj@codeaurora.org: resolved trivial merge conflicts]
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
Optimal values of local UniPro parameters like PA_Hibern8Time &
PA_TActivate can help reduce the hibern8 exit latency. If both host and
device supports UniPro ver1.6 or later, these parameters will be
automatically tuned during link startup itself. But if either host or
device doesn't support UniPro ver 1.6 or later, we have to manually tune
them. But to keep manual tuning logic simple, we will only do manual
tuning if local unipro version doesn't support ver1.6 or later.
Change-Id: I533afe9b62a35602e4e766d76912db7ac9a480b6
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
[venkatg@codeaurora.org: resolved trivial merge conflicts]
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>