Commit graph

563439 commits

Author SHA1 Message Date
Subhash Jadavani
09ed2d9d3c block: don't allow nr_pending to go negative
nr_pending can go negative if we attempt to decrement it without matching
increment call earlier. If nr_pending goes negative, LLD's runtime suspend
might race with the ongoing request. This change allows decrementing
nr_pending only if it is non-zero.

Change-Id: I5f1e93ab0e0f950307e2e3c4f95c7cb01e83ffdd
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
2016-03-22 11:02:02 -07:00
Venkat Gopalakrishnan
a627c73479 block/fs: make tracking dirty task debug only
Adding a new element "tsk_dirty" to struct page increases the size
of mem_map/vmemmap, restrict this to a debug only functionality to
save few MB of memory.

Considering a system with 1G of RAM, there will be nearly 262144
pages and thus that many number of page structures in mem_map/vmemmap.
With pointer size of 8 bytes on a 64 bit system, adding this
pointer to "struct page" means an increase of "2MB" for mem_map.

CRs-Fixed: 738692
Change-Id: Idf3217dcbe17cf1ab4d462d2aa8d39da1ffd8b13
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
[venkatg@codeaurora.org: Fixed trivial merge conflict]
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
2016-03-22 11:02:01 -07:00
Venkat Gopalakrishnan
014929f975 block/fs: keep track of the task that dirtied the page
Background writes happen in the context of a background thread.
It is very useful to identify the actual task that generated the
request instead of background task that submited the request.
Hence keep track of the task when a page gets dirtied and dump
this task info while tracing. Not all the pages in the bio are
dirtied by the same task but most likely it will be, since the
sectors accessed on the device must be adjacent.

Change-Id: I6afba85a2063dd3350a0141ba87cf8440ce9f777
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
[venkatg@codeaurora.org: Fixed trivial merge conflicts]
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
2016-03-22 11:02:00 -07:00
Gilad Broner
a27d5a2f83 block: test-iosched: fix spinlock recursion
spin_lock_irq() / spin_unlock_irq() is used so interrupts are
enabled after unlocking the spinlock. However, it is not guaranteed
they were enabled before.
This change uses the proper irqsave / irqrestore variants instead.
Without it, a spinlock recursion on the scsi request completion path
is possible if completion interrupt occurs when used for UFS testing.

Change-Id: I25a9bf6faaa2bbfedc807111fbcb32276cccea2f
Signed-off-by: Gilad Broner <gbroner@codeaurora.org>
2016-03-22 11:01:59 -07:00
Lee Susman
b5bec249a9 block: test-iosched: expose sector_range variable to user
Expose "sector_range", which will indicate to the low-level driver
unit-tests the size (in sectors, starting from "start_sector") of the
address space in which they can perform I/O operations. This user-defined
variable can be used to change the address space size from the default
512MiB.

Change-Id: I515a6849eb39b78e653f4018993a2c8e64e2a77f
Signed-off-by: Lee Susman <lsusman@codeaurora.org>
2016-03-22 11:01:58 -07:00
Gilad Broner
f3664f905d block: test-iosched: fix bio allocation for test requests
Unit tests submit large requests of 512KB made of 128 bios.
Current allocation was done via kmalloc which may not be able
to allocate such a large buffer which is also physically contiguous.
Using kmalloc to allocate each bio separately is also problematic as
it might not be page aligned. Some bio may end up using more than a
single memory segment which will fail the mapping of the bios to
the request which supports up to 128 physical segments.
To avoid such failure, allocate a separate page for each bio
(bio size is single page size).

Change-Id: Id0da394d458942e093d924bc7aa23aa3231cdca7
Signed-off-by: Gilad Broner <gbroner@codeaurora.org>
[venkatg@codeaurora.org: Drop changes to mmc_block_test.c]
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
2016-03-22 11:01:58 -07:00
Gilad Broner
60f3461f17 block: test-iosched: enable running of simultaneous tests
Current test-iosched design enables running only a single test
for a single block device.
This change modifies the test-iosched framework to allow running
several tests on several block devices.

Change-Id: I051d842733873488b64e89053d9c4e30e1249870
Signed-off-by: Gilad Broner <gbroner@codeaurora.org>
[merez@codeaurora.org: fix conflicts due to removal of BKOPs UT]
Signed-off-by: Maya Erez <merez@codeaurora.org>
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
[venkatg@codeaurora.org: Drop changes to ufs_test.c and
mmc_block_test.c]
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
2016-03-22 11:01:57 -07:00
Gilad Broner
ddb20cd6f0 block: test-iosched: fix spinlock recursion
blk_run_queue() takes the queue spinlock and disabled irqs.
Consider the following callstack:

blk_run_queue
 ->__blk_run_queue
  -> scsi_request_fn
   -> blk_peek_request
    -> __elv_next_request
     -> elevator_dispatch_fn
      -> test_dispatch_requests
       -> test_dispatch_from

test_dispatch_from() will release the test-iosched spinlock
using spin_unlock_irq which will enable interrupts, however,
caller is assuming interrupts are disabled.
An interrupt can occur now and scsi soft-irq may be scheduled
with the following call stack:

scsi_softirq_done
 -> scsi_finish_command
  -> scsi_device_unbusy

scsi_device_unbusy() tries to lock the queue spinlock which was
previously locked when blk_run_queue was called, resulting in a
spinlock recursion.

Change test_dispatch_from() to use the spinlock irq save/restore variants
to prevent enabling the irq in case they were previously disabled.

Change-Id: Icaea4f9ba54771edb0302c6005047fcc5478ce8d
Signed-off-by: Gilad Broner <gbroner@codeaurora.org>
2016-03-22 11:01:56 -07:00
Gilad Broner
2e5c505a50 block: test-iosched: remove test timeout timer
When running a test, a timer was set to detect test timeout
and to unblock the wait_event() function which is waiting for the
test to finish. This is redundant as wait_event timeout variant
gives the same functionality without the overhead of managing a
timer for this purpose and improve code readability.

Change-Id: Icbd3cb0f3fcb5854673f4506b102b0c80e97d6bb
Signed-off-by: Gilad Broner <gbroner@codeaurora.org>
2016-03-22 11:01:55 -07:00
Maya Erez
e355904bbf block: test-iosched: expose APIs to allow compiling ufs_test as a module
The UFS tests are used for testing the functionality and performance
of the UFS driver. Some of the tests call compare_buffer_to_pattern
for data integrity checking. This function should be exposed in order
to allow compilation of ufs_test as a module.

Change-Id: I2279b0ae9dbdf4ecad073fab2b15116be2ea1713
Signed-off-by: Gilad Broner <gbroner@codeaurora.org>
Signed-off-by: Maya Erez <merez@codeaurora.org>
2016-03-22 11:01:54 -07:00
Dolev Raviv
949aad284e scsi: ufs: mixed long sequential
The test will verify correctness of sequential data pattern
written to the device while new data (with same pattern) is
written simultaneously.
First this test will run a long sequential write scenario.
This first stage will write the pattern that will be read
later. Second, sequential read requests will read and
compare the same data. The second stage reads, will issue in
Parallel to write requests with the same LBA and size.
NOTE: The test requires a long timeout.

The purpose of this test is to mix read and write requests on the same
LBA while checking for the read data correctness.

Change-Id: I6a437ce689b66233af3055d07a7f62f1e7b40765
Signed-off-by: Dolev Raviv <draviv@codeaurora.org>
[venkatg@codeaurora.org: Changes to ufs_test.c are already
present as part of earlier commit, hence drop them here]
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
2016-03-22 11:01:53 -07:00
Dolev Raviv
0c46efdd45 scsi: ufs: add support for test specific completion check
Introduce a new callback 'check_test_completion_fn' to test-iosched
framework. This callback is necessary to determine if a test has
completed or not in situation where the request queue is empty, but the
test was not completed.

Change-Id: I60bd8cccffacab11a5a7cba78caccf53fea3e1d8
Signed-off-by: Dolev Raviv <draviv@codeaurora.org>
[venkatg@codeaurora.org: Changes to ufs_test.c are already
present as part of earlier commit, hence drop them here]
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
2016-03-22 11:01:52 -07:00
Lee Susman
d4670e5bb0 scsi: ufs: long sequential read/write tests
This test adds the ability to test the UFS task management feature
in the driver. It loads the queue with requests in order to allow
the task management to operate in full capacity.

Modify test-iosched infrastructure to support the new tests:
- expose  check_test_completion()

Note: we submit 16-bio requests since the current HW is very slow
and we don't want to exceed the timeout duration.

Change-Id: I8ee752cba3c6838d8edc05747fa0288c4b347ef6
Signed-off-by: Dolev Raviv <draviv@codeaurora.org>
Signed-off-by: Lee Susman <lsusman@codeaurora.org>
[merez@codeaurora.org: fix trivial conflicts in ufs_test.c]
Signed-off-by: Maya Erez <merez@codeaurora.org>
[venkatg@codeaurora.org: Changes to ufs_test.c are already
present as part of earlier commit, hence drop them here]
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
2016-03-22 11:01:51 -07:00
Maya Erez
2dcf7d92a9 block: test-iosched: fix test-iosched compilation
Fix test-iosched compilation issues due to differences in data
structures in kernel-3.14.

Signed-off-by: Maya Erez <merez@codeaurora.org>
2016-03-22 11:01:51 -07:00
Lee Susman
fcb6ce0633 block: add test bio size define to test-iosched
Add a define for the test bio size (which is the size of a page),
this is used for allocating the right sized buffer for the bio during
test request creation.

Change-Id: I9505c85c4352009bdee442172eb8ae8f4254cfb0
Signed-off-by: Lee Susman <lsusman@codeaurora.org>
2016-03-22 11:01:50 -07:00
Maya Erez
819ba4dd19 mmc: Unit test fix for logging
Update logging with:
- prefix with module name
- add '\n' in the end
- test_pr_* removed

Change-Id: I465c9809def9d294dcbb3f7cf7f474c189f5fdbf
Signed-off-by: Konstantin Dorfman <kdorfman@codeaurora.org>
[merez@codeaurora.org: fix conflicts due to removal of bkops tests]
Signed-off-by: Maya Erez <merez@codeaurora.org>
[venkatg@codeaurora.org: Drop changes to mmc_block_test.c]
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
2016-03-22 11:01:49 -07:00
Dolev Raviv
dbe45fb01e block: test-iosched: disable statistic flag on request
The flag REQ_IO_STAT is enabled by default this assumes statistics are
initialized and might cause NULL references in the kernel. To avoid it
this flag is cleared in the request and stats are not updated.

Change-Id: I6a1890dde51dfa8ffdd376b13f4466c9db0ae05b
Signed-off-by: Dolev Raviv <draviv@codeaurora.org>
2016-03-22 11:01:48 -07:00
Lee Susman
ef94ce156f mmc: card: change long_sequential_test time measurements to ktime
Change time measurements in long_sequential_test from jiffies to ktime,
and make the relevant change in test-iosched infrastructure.

In long_sequential_test we measure throughput, and the jiffies resolution
is not sensitive enough for this calculation.

Change-Id: If7c9a03c687f61996609c014e056bcd7132b9012
Signed-off-by: Lee Susman <lsusman@codeaurora.org>
[venkatg@codeaurora.org: Drop changes to mmc_block_test.c]
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
2016-03-22 11:01:47 -07:00
Dolev Raviv
2bf9babb4d block: fix test crashing due to synchronization issue
The __blk_run_queue function is called from several contexts. The fix is
replacing it with blk_run_queue function, this function is guarded with
a lock, thus making it thread safe and prevents the crashing.

Change-Id: I3e12fa9c8b9e161375fffa3570abfa46b223a60b
Signed-off-by: Dolev Raviv <draviv@codeaurora.org>
2016-03-22 11:01:46 -07:00
Lee Susman
da2d513f18 mmc: enhance long_sequential_test for higher throughput
Change the test design so that requests are dynamically created
and freed. This enables running tests with more than 128 requests,
therefore more than 50MiB can be written/read and makes it possible
to measure driver write/read throughput more accurately.

Change-Id: I56c9d6c1afba5c91a0621a16d97feafd4689521d
Signed-off-by: Lee Susman <lsusman@codeaurora.org>
[merez@codeaurora.org: fix conflicts due to BKOPS tests removal]
Signed-off-by: Maya Erez <merez@codeaurora.org>
[venkatg@codeaurora.org: Drop changes to mmc_block_test.c]
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
2016-03-22 11:01:45 -07:00
Dolev Raviv
a3c942633c block: test-iosched: Add support for setting rq_disk
Some block devices requires the rq_disk field to be assigned.
This patch exposes a new API to the block device test utility for
getting the rq_disk assigned, in the created request.

Change-Id: I61dc4dad50eb7600728156a6cd08bb1ee134df0d
Signed-off-by: Dolev Raviv <draviv@codeaurora.org>
2016-03-22 11:01:45 -07:00
Lee Susman
28e42664db mmc: new request notification unit-test
The new request notification test checks the following scenario:
A new request arrives after a NULL request was sent to the mmc_queue,
which is waiting for completion of a former request.

Change-Id: I05db0959ded400e292eb5e84e1ecfc579b78ee62
Signed-off-by: Konstantin Dorfman <kdorfman@codeaurora.org>
Signed-off-by: Lee Susman <lsusman@codeaurora.org>
[merez@codeaurora.org: fixed conflicts due to removal of BKOPS tests]
Signed-off-by: Maya Erez <merez@codeaurora.org>
[venkatg@codeaurora.org: Drop changes to mmc_block_test.c]
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
2016-03-22 11:01:44 -07:00
Lee Susman
ed448b7a78 block: test-iosched infrastructure enhancement
Add functionality to test-iosched so that it could simulate the
ROW scheduler behaviour. The main additions are:
- 3 distinct requests queue with counters
- support for urgent request pending
- reinsert request implementation (callback + dispatch behavior)

Change-Id: I83b5d9e3d2b8cd9a2353afa6a3e6a4cbc83b0cd4
Signed-off-by: Konstantin Dorfman <kdorfman@codeaurora.org>
Signed-off-by: Lee Susman <lsusman@codeaurora.org>
[merez@codeaurora.org: fixed conflicts due to bkops tests removal]
Signed-off-by: Maya Erez <merez@codeaurora.org>
[venkatg@codeaurora.org: Dropping elevator is_urgent_fn and
reinsert_req_fn ops fn as they are not present in 3.18 kernel]
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
2016-03-22 11:01:43 -07:00
Maya Erez
613fc2f667 mmc: Enable eMMC unit-tests
Enable the compilation of eMMC4.5 unit-tests, required by APT team.
This will allow the APT team to test the storage activity on released
builds.
The storage tests are disabled in normal operation and in order to
activate them a test I/O scheduler should be chosen and the test should
be triggered via debugfs. Therefore they have no effect on normal eMMC
driver operation.

Change-Id: I179c567f67cc8fab9ed1edab8246483de18bc76a
Signed-off-by: Maya Erez <merez@codeaurora.org>
[venkatg@codeaurora.org: Fixed trivial merge conflict]
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
2016-03-22 11:01:41 -07:00
Lee Susman
4f84e1c313 mmc: improve mmc_block_test printouts
Change the printout format to be more readable.
Specifically, add quotes around the test case name
strings.

Change-Id: I51b0c1b94389e4b51af84c5e993207b18efc2226
Signed-off-by: Lee Susman <lsusman@codeaurora.org>
[merez@codeaurora.org: fix conflicts as BKOPS tests were removed]
Signed-off-by: Maya Erez <merez@codeaurora.org>
[venkatg@codeaurora.org: Drop changes to mmc_block_test.c]
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
2016-03-22 11:01:41 -07:00
Lee Susman
0162f826f3 mmc: card: Add long sequential read test to test-iosched
Long sequential read test measures read throughput
at the driver level by reading large requests sequentially.

Change-Id: I3b6d685930e1d0faceabbc7d20489111734cc9d4
Signed-off-by: Lee Susman <lsusman@codeaurora.org>
[merez@codeaurora.org: Fix conflicts as BKOPS tests were removed]
Signed-off-by: Maya Erez <merez@codeaurora.org>
[venkatg@codeaurora.org: Drop changes to mmc_block_test.c]
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
2016-03-22 11:01:40 -07:00
Tatyana Brokhman
a98628c1c4 block: test-iosched: Sleep before each test
In order to be sure that the packing statistics collected after the test
reflect *only* requests issued by the test (and not real request from
FS) - sleep before each test in order to give an already dispatched
requests time to complete.

Change-Id: If2f40efad1d79084a8ea85afe93cce58e49ff698
CRs-Fixed: 453712
Signed-off-by: Tatyana Brokhman <tlinder@codeaurora.org>
2016-03-22 11:01:39 -07:00
Maya Erez
ae83bbb322 block: test-iosched error handling fixes
- Fix test-iosched crash when running multiple tests
- Free the BIOs memory when a request is not completed

Change-Id: I1baa916c04ae73c809dee7e67ec63f4546dc71aa
Signed-off-by: Maya Erez <merez@codeaurora.org>
2016-03-22 11:01:38 -07:00
Maya Erez
395df99674 block: Add test-iosched scheduler
The test scheduler allows testing a block device by dispatching
specific requests according to the test case and declare PASS/FAIL
according to the requests completion error code

Change-Id: Ief91f9fed6e3c3c75627d27264d5252ea14f10ad
Signed-off-by: Maya Erez <merez@codeaurora.org>
2016-03-22 11:01:37 -07:00
Dolev Raviv
5904916689 block: blk-flush: Add support for Barrier flag
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>
2016-03-22 11:01:36 -07:00
Dolev Raviv
7472ef2e31 block: Definition for barrier requests flag
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>
2016-03-22 11:01:35 -07:00
Sahitya Tummala
c1877ca741 PM / devfreq: Add new flag to do simple clock scaling
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>
2016-03-22 11:01:34 -07:00
Tatyana Brokhman
f87c25862f block: add REQ_URGENT to request flags
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>
2016-03-22 11:01:33 -07:00
Venkat Gopalakrishnan
2f82ca7bf8 scsi: pm: Remove use of CONFIG_PM_RUNTIME
CONFIG_PM_RUNTIME has been eliminated as of kernel 4.4 in favor of
just using CONFIG_PM, hence remove its use.

Change-Id: I096cde564c7bf2c7a041f0948617a7d74df71dd9
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
2016-03-22 11:01:33 -07:00
Venkat Gopalakrishnan
38f31fa535 defconfig: msm: Enable SCSI UFS low level driver
Enable SCSI UFS configs to support Universal Flash Storage
Controller.

Change-Id: I65287b5f7c312266af69f84b8063f881f0398cb0
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
2016-03-22 11:01:32 -07:00
Subhash Jadavani
f4b811368a phy: qcom-ufs-qmp-14nm: disable filler symbol relock
FILLER relock on error recovery may create an alignment that is not
compatible with host controller. When this issue happens, host controller
no longer detects symbols until LINE-RESET is done by host controller as
a recovery sequence. This change disables FILLER symbol relock.

Change-Id: Id7147bfb0de6be45de4936fe3429a9ad76a3868b
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
2016-03-22 11:01:31 -07:00
Subhash Jadavani
927cc54089 phy: qcom-ufs-qmp-14nm: update rx min stall noconfig time
Hibernate entry failures have been observed with some UFS devices.
The UFS PHY Rx termination is not disabled within the specified
RX_Min_STALL_NoConfig_Time_Capability of 15 SI.  The UFS device enables
mid-termination after RX_Min_STALL_NoConfig_Time_Capability SI.  The
combination of Rx terminated and device Tx mid-termination collapses
the line state to near the differential mid-point.  The signal detect
may report the line state incorrectly as DIF-P.  The incorrect DIF-P
moves the Rx FSM into the HS-Burst state rather than the intended
Hibern8 state.  Fix this issue by setting the UFS PHY's
RX_MIN_STALL_NOCONFIG_TIME_CAPABILITY to 40.

Change-Id: I475e03686831e8131fd7ec1c30e6e8f53a6e188c
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
2016-03-22 11:01:30 -07:00
Yaniv Gardi
415748c434 phy: qcom-ufs: add QRBTC V2 UFS phy to makefile
This change adds the qrbtc-v2 files to the phy makefile.

Change-Id: I32a1cd2804f11d5b8cc68ae625301be08e710dc8
Signed-off-by: Gilad Broner <gbroner@codeaurora.org>
Signed-off-by: Yaniv Gardi <ygardi@codeaurora.org>
[venkatg@codeaurora.org: resolved trivial merge conflicts]
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
2016-03-22 11:01:29 -07:00
Yaniv Gardi
31155086bb phy: phy-qocm-ufs: update initialization sequence for msmcobalt RUMI
This change updates the initialization sequence of the QRBTC-V2
phy, for msmcobalt RUMI platform.

Change-Id: I369608b41e0b150334e9a7e9ad99b7cde8341dae
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
Signed-off-by: Yaniv Gardi <ygardi@codeaurora.org>
2016-03-22 11:01:28 -07:00
Yaniv Gardi
c8d92a5e44 phy: phy-qcom-ufs: don't error out if some callbacks are not defined
Some callbacks may not be supported which is a valid case, and should not
be considered as error.
In such cases, and in order to reduce unnecessary logs, we better
remove this error messages.

Change-Id: I75b9e02a2189a330e0ca46387394be4a8c60ef5b
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
Signed-off-by: Yaniv Gardi <ygardi@codeaurora.org>
2016-03-22 11:01:27 -07:00
Yaniv Gardi
3037e7b380 phy: qcom-ufs: update phy register offsets and calibration values
This change updates the offsets and calibration values of the
ufs-qmp-v3 phy.

Change-Id: I443a857b7b6620a65acd14e3a805eea9c00fd61c
Signed-off-by: Yaniv Gardi <ygardi@codeaurora.org>
2016-03-22 11:01:26 -07:00
Yaniv Gardi
9d7a697056 Revert "phy: qcom-ufs: add ufs phy type selection"
This reverts commit 6ed4bd3af2c153ae3246d89c2d62cfe7919d0320
("phy: qcom-ufs: add ufs phy type selection")

Since a single boot.img should support all phy-qcom-ufs configurations,
all phy-qcom-ufs files should be compiled all together.

Change-Id: I81b3891fb44d927046f39bbe72b5ed24dd9d99d2
Signed-off-by: Yaniv Gardi <ygardi@codeaurora.org>
[venkatg@codeaurora.org: resolved trivial merge conflicts]
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
2016-03-22 11:01:25 -07:00
Subhash Jadavani
6d3b062f31 phy: qcom-ufs-qmp-14nm: add PHY initialization table for version 2.2.0
This change adds the UFS PHY initialization table for UFS controller
version 2.2.0.

Change-Id: Ia77dec85433041e2fab3c89df10cc4727e4a47e9
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
2016-03-22 11:01:24 -07:00
Yaniv Gardi
014e52504b phy: qcom-ufs: add UFS PHY support for msmcobalt rumi platform
Add support for QRBTC V2 UFS PHY that is used in msmcobalt rumi platform.

Change-Id: I21ad3f0db23ea16d05ba40593cc7650e1a443702
Signed-off-by: Yaniv Gardi <ygardi@codeaurora.org>
2016-03-22 11:01:23 -07:00
Yaniv Gardi
75fd8ad82b phy: qcom-ufs: add support in UFS PHY for msmcobalt platform
Add support for new QCOM UFS PHY that is used in
future platforms.

Change-Id: I53f162738668ae9f24f5edb9c42a17f947e68b40
Signed-off-by: Yaniv Gardi <ygardi@codeaurora.org>
[venkatg@codeaurora.org: resolved trivial merge conflict]
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
2016-03-22 11:01:22 -07:00
Yaniv Gardi
cab11920a9 phy: qcom-ufs: remove hard-coded vdda-phy voltage definition
This patch removes the hard-coded voltage number of vdda-phy regulator
and instead, gets it by using the appropriate API.

Change-Id: Iab753c7e94424dd3ccce95296258bba264979cf2
Signed-off-by: Yaniv Gardi <ygardi@codeaurora.org>
2016-03-22 11:01:21 -07:00
Yaniv Gardi
38a427e870 phy: qcom-ufs: remove failure when rx/tx_iface_clk are absence
Since in future UFS Phy's the tx_iface_clk and rx_iface_clk
are no longer exist, we should not fail when their initialization
fail, but rather just report with debug message.

Change-Id: I87e4deca632d4d4ee9e35a03f2fc9c22987255b3
Signed-off-by: Yaniv Gardi <ygardi@codeaurora.org>
2016-03-22 11:01:21 -07:00
Gilad Broner
918a022943 phy: qcom-ufs-qmp-14nm: update PHY power up sequence
Hardware programming guide has updated the PHY power up sequence,
this change adds the relevant changes.

Change-Id: I320e38f501cdafc053d47bf2b21ba7f69b1b12a7
Signed-off-by: Gilad Broner <gbroner@codeaurora.org>
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
2016-03-22 11:01:20 -07:00
Gilad Broner
08eef6c05c phy: qcom-ufs: add ufs phy type selection
Currently both 14nm phy and 20nm phy are compiled and built into
the kernel, while only one type is actually present and used.
Add a choice selection to the kernel configuration to specify
which phy type shall be used.

Change-Id: I5608d32fb4815db15e91a970e53099762eabbddd
Signed-off-by: Gilad Broner <gbroner@codeaurora.org>
[venkatg@codeaurora.org: resolved trivial merge conflicts]
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
2016-03-22 11:01:19 -07:00
Gilad Broner
b4b16fc7d9 phy: qcom-ufs: export phy functions
In order to allow UFS PHY and UFS driver to be built as
kernel modules, the driver must export its functions so
they can be used by external code.

Change-Id: Ic617daf1038b5727dcd4b24a4c12a1f1bb8d730e
Signed-off-by: Gilad Broner <gbroner@codeaurora.org>
[venkatg@codeaurora.org: keep upstream version of EXPORT_SYMBOL_GPL]
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
2016-03-22 11:01:18 -07:00