This change prevents enabling cache for cards with
product name MMC16G.
This change is workaround the problem of long timeouts for cache
operations.
Change-Id: Ib683809faed8afc74bf0faff8636ead210013e6f
Signed-off-by: Talel Shenhar <tatias@codeaurora.org>
This change allows us to prevent cache enable for certain
cards that have broken cache functionality.
Change-Id: Iea3f8c8f4e5498a8742fa408a19e3e169d1fa8cb
Signed-off-by: Talel Shenhar <tatias@codeaurora.org>
[subhashj@codeaurora.org: fixed trivial merge conflicts]
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
Certain cards might get broken when HPI feature is used.
This patch uses the HPI quirk to avoid the usage
of HPI on Kingston MMC16G cards that have
EXT_CSD_REV = 5 (mmc version 4.41)
Change-Id: I4572eb9e71a281b56e25e5b4864d5777b16e2bc2
Signed-off-by: Talel Shenhar <tatias@codeaurora.org>
Certain cards might get broken when HPI feature is used.
This patch allows host to avoid using HPI for such
buggy cards by adding new quirk.
As some of the other features like BKOPs/Cache are
dependent on HPI feature, those features would also
get disabled if HPI is disabled.
Change-Id: I93a8810e4031eafcd44b5152296e065dc3330b63
Signed-off-by: Talel Shenhar <tatias@codeaurora.org>
In case of a flush request timeout, an error is returned
to the block layer.
The problem with this is that the eMMC card is left in
programming state and while the device is in the
programming state it cannot serve any request.
This commit moves the card out of the programming state,
in case of timeout, by issuing HPI, thereby allowing the
device to continue serving requests.
Some filesystems, such as EXT4, remount the partition as
read-only after receiving an error from the block layer, thus
this change will allow the remounted partition to work as the
card can serve read request thanks to the HPI.
In case where the card doesn't even respond to HPI it
cannot serve any request, thereby, this commit reset the
card in such catastrophic cases.
Change-Id: Idbca6ff3a420a954c61cf4fb79c9094542888d89
Signed-off-by: Talel Shenhar <tatias@codeaurora.org>
This change allows the usage of quirks based on
the register value of EXT_CSD_REV. It was seen for several
eMMC cards that same issues, such as data corruption
while using cache, were relevant for all eMMC cards
having the same EXT_CSD_REV value.
This change allows us to distinguish between cards based
on this register.
Change-Id: I1663891c367a59b520bc505641c6c4ddad56fd1a
Signed-off-by: Talel Shenhar <tatias@codeaurora.org>
The latest version of the SDCC core requires a change in the reset
sequence for DLL tuning. Make necessary changes as needed.
Change-Id: I69e972c08e89efebff9822de6d0e59692784652e
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
During MMC_POWER_UP the clocks are turned off when enabling power
to the card. Make sure the controller clocks are enabled for
normal register access.
Change-Id: Iad6fc4dfc6e44d0a609b66432b0985d589c3e5b9
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
Disable the following pm functionalities till they are functional:
* clk scaling (need to verify full functionality)
* clk gating (crashes when ungating the clock)
Change-Id: I0962d46d85415e77b978e1f7dd9f2f49446655bb
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
[subhashj@codeaurora.org: fixed trivial merge conflicts]
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
A new timing mode has been introduced to differentiate SD/MMC
DDR timing modes. Use the MMC specific DDR timing mode in addition
to the SD specific one when checking for timing modes.
Change-Id: Id151c0fd0dc8eccdec8f842a5ee13af415b7ffe6
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
The reset functionality has been converted to a library function.
Update the sdhci_ops function table to use the generic
sdhci_reset() library function.
Change-Id: I6c535cd5a641e23399bad284e9a1f89ac8811e62
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
The generic bus width setup has been converted to a library function.
Update the sdhci_ops function table to use the generic
sdhci_set_bus_width() library function.
Change-Id: I0fb1345cab1055ed2f5f2e36debf5ea273241628
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
As part of 3.14 kernel upgrade some capabilities have been removed,
added and renamed. Make those adjusments in the sdhci-msm platform
driver.
Change-Id: Icb14a3e997875e3ab094ef51a2307972d0788a89
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
The function signature changed for sdhci_pltfm_init as part of 3.14
kernel upgrade. Make changes to reflect that.
Change-Id: I6ac6fbd9703253d31a14c07399423b1c8a0b3301
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
Add missing register defines that were removed as part of dropping
stop transmission support.
Rearrange the defines as part of 3.14 kernel upgrade.
Change-Id: Ie7c38721b4f96d066260e7aeb01043a5a909ed01
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
sdhci_update_clock() has been removed and host ops set_clock() is called
directly in various places. Release the host spinlock before calling
host ops set_clock().
Change-Id: Ia12917286a7d791e6a6ad826c0b7edd71c8694ae
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
The array values are readonly and initialized during declaration.
Change-Id: I3abbf15a441300af9828ac907ea67975302d5352
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
Add a capability to identify hosts that need additional tuning for HS400
and perform a post tuning process that maybe needed for proper HS400
functionality.
Change-Id: I3895aabddce4dbecb208e3c522957e656f37e30d
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
[subhashj@codeaurora.org: fixed trivial merge conflicts]
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
There is no need to prepare anything additional before tuning for HS400
other than updating the HS400 timing mode, so just do that.
Change-Id: Ib7a72a4bb9b901e32413acf440c925c4cd50a73d
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
[subhashj@codeaurora.org: fixed trivial merge conflicts]
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
With some bad SD cards, it is possible that the error recovery
procedure goes into a state where it retries the failed command
infinitely leading to CPU hog.
Fix inifinite retries when the bad SD card isn't responding to
a command even when the SD card reset mechanism is successful.
CRs-Fixed: 671153
Change-Id: Ic6db66b571aa425aec32c82d52789c68fe0cb0e9
Signed-off-by: Sujit Reddy Thumma <sthumma@codeaurora.org>
[merez@codeaurora.org: fix conflicts due to removal of sanitize
from block.c in 3.14]
Signed-off-by: Maya Erez <merez@codeaurora.org>
[subhashj@codeaurora.org: fixed trivial merge conflicts]
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
When handling a DISCARD operation, the MMC request data structure may be
freed in memory. Therefore, it can't be used to retrieve the cmd_flags
for checking if MMC_REQ_NOREINSERT_MASK is set:
(!(mq->mqrq_cur->req->cmd_flags & MMC_REQ_NOREINSERT_MASK)))).
To prevent the issue we should use the local variable of cmd_flags.
Change-Id: Idef53d5bd66fa6f1faaf79644c8efb5177c75e89
Signed-off-by: Maya Erez <merez@codeaurora.org>
Signed-off-by: Konstantin Dorfman <kdorfman@codeaurora.org>
[merez@codeaurora.org: fix conflicts due to removal of stop transmission]
Signed-off-by: Maya Erez <merez@codeaurora.org>
Enhance the error handling/recovery path during eMMC resume by
adding retry mechanism and by adding additional error messages
to failure cases. This may help some of the bad parts which fail
to resume sporadically.
Change-Id: I895068edb487e6a44205e0769342b2ec2c89c876
Signed-off-by: Sahitya Tummala <stummala@codeaurora.org>
[merez@codeaurora.org: fix conflicts due to addition of __mmc_resume
in 3.14 and different bus speed implementation]
Signed-off-by: Maya Erez <merez@codeaurora.org>
[venkatg@codeaurora.org: Fix args for mmc_power_up and
mmc_select_voltage to use with 3.14 kernel]
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
[subhashj@codeaurora.org: fixed trivial merge conflicts]
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
Fix a race condition that can lead to null pointer dereference
while the MMC transfers are going on.
1) mmc_request_done() -> mmc_wait_for_data_done ->
step1: update is_done_rcv
step2: wake_up sleeping thread (mmcqd) waiting for is_done_rcv
2) mmcqd -> mmc_wait_for_data_req_done
step4: wait for is_done_rcv or is_new_req
step5: is_new_req set from block layer context and mmcqd
is woken up
step6: let's say step1 is done, so complete the current request
step7: fetch new request and issue to host layer
step8: fetch one more request and wait for previous request to
complete
In the above execution contexts, if step4-step8 happens between step1 and
step2 a null pointer dereference is observed -
[ 29.483302] Unable to handle kernel NULL pointer dereference
at virtual address 00000488
[ 29.490366] pgd = c0004000
[ 29.493054] [00000488] *pgd=00000000
[ 29.518937] PC is at do_raw_spin_lock+0x8/0x13c
[ 29.523445] LR is at _raw_spin_lock_irqsave+0x20/0x28
[ 30.108789] [<c0339cd4>] (do_raw_spin_lock+0x8/0x13c) from
[ 30.118418] [<c095d178>] (_raw_spin_lock_irqsave+0x20/0x28) from
[ 30.127445] [<c0142ef4>] (__wake_up+0x20/0x50) from
[ 30.136124] [<c0663f70>] (mmc_request_done+0x30c/0x368) from
[ 30.145932] [<c067bd98>] (sdhci_tasklet_finish+0x130/0x13c) from
Change-Id: I9a21431b5fd9bb9bbcb5c18a9895096fe845e64b
Signed-off-by: Sujit Reddy Thumma <sthumma@codeaurora.org>
[merez@codeaurora.org: fixed conflicts due to missing stop transmission]
Signed-off-by: Maya Erez <merez@codeaurora.org>
[subhashj@codeaurora.org: fixed trivial merge conflicts]
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
Fix race condition between mmcqd thread and the mmc_queue_suspend
updating a shared variable mq->flags, which can lead to potential
null pointer dereference as following-
Unable to handle kernel NULL pointer dereference at
virtual address 00000020
pgd = c0004000
[00000020] *pgd=00000000
mmcqd/0: 186] Internal error: Oops: 5 [#1] PREEMPT SMP ARM
CPU: 0 Tainted: G W (3.4.0-1251694-eng #1)
PC is at mmc_blk_err_check+0x20c/0x3b8
LR is at mmc_start_req+0x198/0x718
cpu0 | cpu1
x |= 1 | x |= 2
final value of x can be x = 1 or x = 2
Change-Id: Ie0fff6d6dba5aebb3584cba9fb98de24515c4cd8
Signed-off-by: Sujit Reddy Thumma <sthumma@codeaurora.org>
[merez@codeaurora.org: fix conflicts due to missing stop transmission
and changes in new request implementation in 3.14]
Signed-off-by: Maya Erez <merez@codeaurora.org>
[venkatg@codeaurora.org: Fix conflicts due to changes in 3.14 kernel]
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
[subhashj@codeaurora.org: fixed trivial merge conflicts]
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
If the mmc_hw_reset() fails, then host->card might be NULL in some
cases. Hence, check for reset errors and report it to the caller so
that the current request can be aborted and also check for host->card
before accessing it so as to prevent NULL pointer dereference issue.
Change-Id: Iba0f0be314474e607a40383bc0b28eef66a31d63
Signed-off-by: Sahitya Tummala <stummala@codeaurora.org>
[subhashj@codeaurora.org: fixed trivial merge conflicts]
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
eMMC and SD card specifications restrict the usage of a class of
commands while commands in other class are in progress. For example,
during erase operations the SD/eMMC spec. allows only CMD35, CMD36,
CMD38. If clock scaling is enabled and decide to scale up the clocks
it may be possible that CMD19/21 tuning commands are sent in between
erase commands, which is illegal as per specification.
Fix such illegal transactions to the card and also make clock scaling
statistics accountable only for read/write commands instead of time
consuming commands, like CMD38 erase, where transactions are independent
of bus frequency.
Change-Id: Iffba175787837e7f95bde8970f19d0f0f9d7d67d
Signed-off-by: Sujit Reddy Thumma <sthumma@codeaurora.org>
[merez@codeaurora.org: fix conflicts as mmc_update_clk_scaling is missing on 3.14]
Signed-off-by: Maya Erez <merez@codeaurora.org>
After removing the SD/MMC 'card' from the driver model we
are cancelling the pending clock scaling work which accesses
card->dev. This could cause NULL pointer issue as the card
is already removed.
CRs-Fixed: 640344
Change-Id: I8c5ee817e3f116dedf0bf4fb51eb6b70d52467b7
Signed-off-by: Pratibhasagar V <pratibha@codeaurora.org>
Get the various drive types other than the default supported
by the card.
Change-Id: I122971e4fb4a3ab98f0078ceafca3380e9c0e2d1
Signed-off-by: Krishna Konda <kkonda@codeaurora.org>
[subhashj@codeaurora.org: fixed merge conflicts and fixed compilation
errors]
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
mmc block data can be NULL. Hence, check for NULL before
dereferencing md.
CRs-Fixed: 562259
Change-Id: I0182c216ec73347cdd2ea464f593839fffd242a9
Signed-off-by: Asutosh Das <asutoshd@codeaurora.org>
[merez@codeaurora.org: fix conflicts due to removal of BKOPS statistics]
Signed-off-by: Maya Erez <merez@codeaurora.org>
[subhashj@codeaurora.org: fixed trivial merge conflicts]
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
In low memory conditions at runtime, allocation of max_segs may
fail. Retry with a scaled down max_segs until allocation succeeds.
CRs-fixed: 583267
Change-Id: I072724afa44854dacc58654e6329531c1bb11120
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
Signed-off-by: Asutosh Das <asutoshd@codeaurora.org>
In case of any error within mmc_blk_alloc_req(), the bitmaps
that keep track of devices are not getting cleared. This may
result in failure to detect a card in case it reaches maximum
devices limitation. Fix it by clearing those bitmaps appropriately.
CRs-fixed: 563264
Change-Id: I0e23c45856355565534146f5fabb957fd4b1d007
Signed-off-by: Sahitya Tummala <stummala@codeaurora.org>
Added checks to check if card is NULL before accessing it.
CRs-Fixed: 548450
Change-Id: Idc005b8420a78b3566164102fbeaa243a8e73c7c
Signed-off-by: Asutosh Das <asutoshd@codeaurora.org>
[subhashj@codeaurora.org: fixed trivial merge conflicts]
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
This patch adds clock scaling support to HS400 cards.
Scaling down to 52MHz from HS400 involves:
- switching the bus-speed mode to HS at 52MHz
Scaling up to HS400 would require all of the initialization
process upto HS400 mode selection.
Change-Id: I8196d6666bcc0ef327659253df53a17792fa51f7
Signed-off-by: Asutosh Das <asutoshd@codeaurora.org>
Signed-off-by: Krishna Konda <kkonda@codeaurora.org>
[venkatg@codeaurora.org: fix mmc_select_hs args and MAX_DTRs
as used in 3.14 kernel]
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
[subhashj@codeaurora.org: fixed merge conflicts]
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
In the MMC card debug_fs the read and write handlers use the strlcat
and sscanf, without checking the pointer given.
Since the pointer is not checked it is possible to write
everywhere (ring 0 or 3).
In order to fix it, an access_ok function is being used to verify
the buffer's pointer supplied by user is valid.
CRs-fixed: 545716
Change-Id: Ia710b6af5a95974fc930ca902e8ff18afa4e17ba
Signed-off-by: Raviv Shvili <rshvili@codeaurora.org>
[merez@codeaurora.org: Fixed conflicts due to missing BKOPS statistics]
Signed-off-by: Maya Erez <merez@codeaurora.org>
The SD cards functionality on QRD devices are failing
with CRC errors when used with higher clock / bus modes.
So reduce the clock speed for SD card slot.
CRs-Fixed: 491789
Change-Id: I24b8bfe44cee4367c22846747f439365d8795d2e
Signed-off-by: Pratibhasagar V <pratibha@codeaurora.org>
[merez@codeaurora.org: msm8226-qrd-dtsi is not included in 3.14]
This patch whitelists the AR6004 card for clock-gating.
The controller supports asynchronous interrupt functionality
which enables to receive interrupts from the card when clocks
are off. Hence, clocks can be turned off when idle.
This patch whitelists the card, to let the clock-gating
framework gate the clock during idle time.
Change-Id: I651f86e42595cc82f99093c06ee220a1d0ec95a9
Signed-off-by: Asutosh Das <asutoshd@codeaurora.org>
During voltage sequence (for UHS SD/SDIO cards), host first sends the
voltage switch command (CMD11) to card and then host must stop the clock
at least for 5ms but currently there is a possibility (if clkgate_delay
is 0) that clock may be gated off immediately after the CMD11 response
from card and then get turned on before 5ms itself. This patch ensures
that clock is gated off at least for 5ms after receiving the card
response for voltage switch command.
Change-Id: I131b3d154adab29bef367c8ce31c2f2edd159fd2
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
[subhashj@codeaurora.org: fixed merge conflicts]
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
For several MoviNAND eMMC parts, there are known issues with secure
erase and secure trim. For these specific MoviNAND devices, we skip
these operations.
Specifically, there is a bug in the eMMC firmware that causes
unrecoverable corruption when the MMC is erased with MMC_CAP_ERASE
enabled.
References:
http://forum.xda-developers.com/showthread.php?t=1644364https://plus.google.com/111398485184813224730/posts/21pTYfTsCkB#111398485184813224730/posts/21pTYfTsCkB
Change-Id: I9946828b9c9063da312f95483fcc47e26585489a
Signed-off-by: Ian Chen <ian.cy.chen@samsung.com>
Reviewed-by: Namjae Jeon <linkinjeon@gmail.com>
Acked-by: Jaehoon Chung <jh80.chung@samsung.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Cc: stable <stable@vger.kernel.org> [3.0+]
Signed-off-by: Chris Ball <cjb@laptop.org>
Signed-off-by: Pratibhasagar V <pratibha@codeaurora.org>
Patch-mainline: v3.6
Git-commit: 3550ccdb9d
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
This patch initializes wakeup source if the detected card
is a sdio card and enables the wakeup capability.
Platform drivers would have to invoke:
* pm_wakeup_event on this card device to signal a wakeup
* corresponding pm_relax have to be invoked
Change-Id: Ic8d5c98073e8ed3f676eb42fc0ce1f13a11cb40f
Signed-off-by: Asutosh Das <asutoshd@codeaurora.org>
[merez@codeaurora.org: fix conflicts due to different PM in 3.14]
Signed-off-by: Maya Erez <merez@codeaurora.org>
[subhashj@codeaurora.org: fixed trivial merge conflicts]
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
During suspend, eMMC VCC can be turned off. So instead of sending
a power off notification, send a sleep command. According to the
eMMC 4.5 specification, this is the only time where its clearly
mentioned that the VCC regulator can be turned OFF.
This has been clarified in eMMC 5.0 specification and this applies
even if PON with sleep is not sent to the card.
Change-Id: I6c424bed3158132af7f9c2a2a701af7369fd5ec7
Signed-off-by: Krishna Konda <kkonda@codeaurora.org>
[merez@codeaurora.org: fix conflicts due to changes in 3.14]
Signed-off-by: Maya Erez <merez@codeaurora.org>
During the copy the last character was getting truncated.
Update the buffer copy to include all the characters.
CRs-Fixed: 499579
Change-Id: I8e1df1d1f2294e85068aebcc876bef701e088b07
Signed-off-by: Pratibhasagar V <pratibha@codeaurora.org>
mmc_queue_suspend() function returns the -EBUSY error if the MMC request
queue is not empty as this function was getting called from the system
suspend path which enforces time limit on the completion of the driver
suspend callback.
But recently the driver shutdown routine also started using
mmc_queue_suspend() function but in shutdown case, we would really want
to wait for the MMC request queue to be empty.
To fix above issue, this change have added new argument named "wait" to
mmc_queue_suspend() function which would tell whether it needs to wait
for the MMC request queue to be empty or not. Driver shutdown callback
will tell the mmc_queue_suspend() to wait but suspend callback won't.
CRs-Fixed: 503227
Change-Id: I86f32d68ec4c4799648785681c5776f090ea6e36
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
Verify drv and card pointers before calling for driver shutdown.
Change-Id: I855e32f988ec1af475df6ed91f04618525e1a59f
Signed-off-by: Eugene Yasman <eyasman@codeaurora.org>
[merez@codeaurora.org: fix conflicts due to changes in 3.14]
Signed-off-by: Maya Erez <merez@codeaurora.org>
At the moment only POWER_OFF_SHORT is sent to the device in case the host
is suspended. This patch adds the support of sending POWER_OFF_LONG
notification in case the device is powered off.
According to device vendors the POWER_OFF_LONG notification will shorten
the initialization time of the eMMC card during next boot up.
Change-Id: I3c6f224398450cf10463cbb316613fd430d1e8d2
Signed-off-by: Tatyana Brokhman <tlinder@codeaurora.org>
Signed-off-by: Sujit Reddy Thumma <sthumma@codeaurora.org>
[merez@codeaurora.org: fix conflicts as some of the code was already included]
Signed-off-by: Maya Erez <merez@codeaurora.org>
[venkatg@codeaurora.org: Remove PM related code]
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
[subhashj@codeaurora.org: fixed trivial merge conflicts]
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
SDIO 3.0 specification has added the support for asynchronous interrupt
period during which card allows the clock to be gated off. Host needs
to first read the "Support Asynchronous Interrupt" bit in CCCR register
space to check if the card supports the feature or not. If yes and if
the host wants to enable the feature, host needs to write '1' to
"Enable Asynchronous Interrupt" bit in CCCR register space.
This change allows the host controller driver to control whether to enable
the asynchronous interrupt in card or not and if the asynchronous interrupt
is enabled then clock gating feature would be enabled for such cards.
Change-Id: I678cffb63af6a2013640a5eafa6ce9bfad8a51d6
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
[merez@codeaurora.org: fix CAPS2 index]
Signed-off-by: Maya Erez <merez@codeaurora.org>
[subhashj@codeaurora.org: fixed trivial merge conflicts]
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
Host drivers can participate in clock scaling by registering
->notify_load host operation, which allows host driver to carry out
platform specific operations for further power savings or increasing
throughput based on whether load is LOW or HIGH respectively. This
can be applicable to non-ultra high speed cards as well so remove
the check for ultra high speed cards to initialize clock scaling.
Change-Id: Icaab9520135e384f5470db68b2f25c5cdce5663a
Signed-off-by: Sujit Reddy Thumma <sthumma@codeaurora.org>
[merez:codeaurora@org: fix conflicts due to removal of stop transmission]
Signed-off-by: Maya Erez <merez@codeaurora.org>
[subhashj@codeaurora.org: fixed trivial merge conflicts]
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
In the current implementation packing is enabled according to a statically
defined trigger. This patch updates the packing control mechanism to use a
dynamically defined trigger.
The trigger's value is calculated by the relation
between the number of potential packed write requests and the mean
value of all previous potential values:
If the current potential is greater than the mean potential then
the heuristic is that the following workload will contain many write
requests, therefore we lower the packed trigger. In the opposite case
we want to increase the trigger in order to get less packing events.
In case we get an urgent request we 'punish' the packing control by
increasing the trigger.
Change-Id: I775e1582ad32a8f798e8b2bd2b3178aef357e747
Signed-off-by: Lee Susman <lsusman@codeaurora.org>