summaryrefslogtreecommitdiff
path: root/include (follow)
Commit message (Collapse)AuthorAge
...
* | | | soc: qcom: Add socinfo driver snapshotAbhimanyu Kapur2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a snapshot of the socinfo driver as of msm-3.14 commit: 3bc54cf86bdc7affa7cd4bf7faa3c57fe8f8819d (Merge "msm: camera: Add dummy sub module in sensor pipeline") Change-Id: I6b5b866ede0e84432fad460e9d95babfdbc556fc Signed-off-by: Abhimanyu Kapur <abhimany@codeaurora.org>
* | | | soc: qcom: watchdog_v2: Add support to trigger watchdog bite on panicSubbaraman Narayanamurthy2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In certain cases during a kernel panic,the interrupts on non-panicking CPUs are disabled. Since CPU context cannot be collected by sending IPI to those CPUs, we're limited to debug the problem. Forcing a watchdog bite during kernel panic will ensure us getting the proper CPU context. Hence adding support for the same. Change-Id: Id06030d9bc46d94209da7f0ef8c47bfd3477baf6 Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org> [abhimany: resolve trivial merge conflicts] Signed-off-by: Abhimanyu Kapur <abhimany@codeaurora.org>
* | | | power: reset: replace upstream msm-poweroff driverJosh Cartwright2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a snapshot of the msm-poweroff driver as of msm-3.10 commit acdce027751d5a7488b283f0ce3111f873a5816d (Merge "defconfig: arm64: Enable ONESHOT_SYNC for msm8994") In addition, make this driver selectable when ARCH_MSM || ARCH_QCOM. Signed-off-by: Josh Cartwright <joshc@codeaurora.org> [abhimany: resolve trivial merge conflicts] Signed-off-by: Abhimanyu Kapur <abhimany@codeaurora.org> Change-Id: Ifca5e017ad67cd78cbd507864fd3a0ee37d8713e
* | | | block/fs: make tracking dirty task debug onlyVenkat Gopalakrishnan2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | block/fs: keep track of the task that dirtied the pageVenkat Gopalakrishnan2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | block: test-iosched: expose sector_range variable to userLee Susman2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | block: test-iosched: fix bio allocation for test requestsGilad Broner2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | block: test-iosched: enable running of simultaneous testsGilad Broner2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | block: test-iosched: remove test timeout timerGilad Broner2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | scsi: ufs: mixed long sequentialDolev Raviv2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | scsi: ufs: add support for test specific completion checkDolev Raviv2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | scsi: ufs: long sequential read/write testsLee Susman2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | block: add test bio size define to test-ioschedLee Susman2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | mmc: card: change long_sequential_test time measurements to ktimeLee Susman2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | mmc: enhance long_sequential_test for higher throughputLee Susman2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | block: test-iosched: Add support for setting rq_diskDolev Raviv2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | block: test-iosched infrastructure enhancementLee Susman2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | mmc: card: Add long sequential read test to test-ioschedLee Susman2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | block: Add test-iosched schedulerMaya Erez2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | block: blk-flush: Add support for Barrier flagDolev Raviv2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | block: Definition for barrier requests flagDolev Raviv2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | PM / devfreq: Add new flag to do simple clock scalingSahitya Tummala2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | block: add REQ_URGENT to request flagsTatyana Brokhman2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: include device.h in scsi.hMatt Wagantall2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | UAPI: scsi: move ioctl related informationAbhimanyu Kapur2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | UAPI: scsi: move the scsi ioctl related filesAbhimanyu Kapur2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | scsi: Allow auto suspend override by low-level driverSujit Reddy Thumma2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | scsi: Adjust DBD setting in mode sense for caching mode page per LLDMaya Erez2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | scsi/phy: Remove orphaned files after renamingVenkat Gopalakrishnan2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Delete renamed orphan files after rebasing 3.18 ufs driver changes onto 4.4 ufs driver. Change-Id: Id241ad01bbb0fa74e209c66f8a2d97c05088e33b Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
* | | | scsi: ufs: allow updating bBootLunEn via ioctlSubhash Jadavani2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "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>
* | | | scsi: ufs-debug: add debugfs capability to collect query statisticsYaniv Gardi2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | scsi: ufs: use symbolic print for tracingGilad Broner2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | tracing: ufs: create a trace event class template for common eventsGilad Broner2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | test-iosched: ufs_test: fix gendisk usage in testDolev Raviv2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | scsi: ufs: minimize exposure of ufs header filesYaniv Gardi2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | soc: qcom: Include the kryo-l2-accessors driver in buildDevesh Jhunjhunwala2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | Add the kryo-l2-accessors driver to the build. Signed-off-by: Devesh Jhunjhunwala <deveshj@codeaurora.org>
* | | | scsi: ufs-qcom: implement pre and post notification for clock scalingSubhash Jadavani2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | phy: ufs-qcom: disable RX LineCfgSubhash Jadavani2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | scsi: ufs-qcom: allow HS-G3Subhash Jadavani2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | scsi: ufs: add load based scaling of UFS gearSubhash Jadavani2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | scsi: ufs: add UFS power collapse support during hibern8Subhash Jadavani2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | scsi: ufs-qcom: change device reference clock controlGilad Broner2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | scsi: ufs-qcom: expose debug registers by debugfsDov Levenglick2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | scsi: ufs-qcom: add debug prints for test busDov Levenglick2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | scsi: ufs-qcom: add ICE debug printsDov Levenglick2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | scsi: ufs-qcom: add print suppressing debugfs mechanismDov Levenglick2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | scsi: ufs-qcom: set device ref. clk bitGilad Broner2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | scsi: ufs: add print suppressing debugfs mechanismDov Levenglick2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | scsi: ufs: perform ice_init as part of UFS initializationMaya Erez2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | scsi: ufs: set right GenSelectorIndex for M-PHY attributesSubhash Jadavani2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>