- 15 7月, 2016 2 次提交
-
-
由 Abhishek Sahu 提交于
1. The current QCOM I2C driver code is failing for transfer length greater than 255. This is happening due to improper segments length as the I2C DMA segments can be maximum of 256 bytes. 2. The transfer length tlen was being initialized with 0 for 256 bytes, which is being passed for DMA mappings resulting in improper DMA mapping length. This patch fixes the above said problems by initializing the block count with the values calculated in qup_i2c_set_blk_data and calculating the remaining length for last DMA segment. Also, the block data length need to be decremented after each transfer. Additionally, this patch corrects the tlen assignment for DMA mapping. Signed-off-by: NAbhishek Sahu <absahu@codeaurora.org> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Abhishek Sahu 提交于
1. Current QCOM I2C driver hangs when sending data to address 0x03-0x07 in some scenarios. The QUP controller generates invalid write in this case, since these addresses are reserved for different bus formats. 2. Also, the error handling is done by I2C QUP ISR in the case of DMA mode. The state need to be RESET in case of any error for clearing the available data in FIFO, which otherwise leaves the BAM DMA controller in hang state. This patch fixes the above two issues by clearing the error bits from I2C and QUP status in ISR in case of I2C error, QUP error and resets the QUP state to clear the FIFO data. Signed-off-by: NAbhishek Sahu <absahu@codeaurora.org> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 19 6月, 2016 4 次提交
-
-
由 Sricharan R 提交于
index gets incremented during check to determine if the messages can be transferred with dma. But not reset after that, resulting in wrong start value in subsequent loop, causing failure. Fix it. Signed-off-by: NSricharan R <sricharan@codeaurora.org> Signed-off-by: NWolfram Sang <wsa@the-dreams.de> Cc: stable@kernel.org
-
由 Naveen Kaje 提交于
qup_i2c_issue_read() derives the address from i2c_msg. This called in the read path when I2C_M_RD flag is set. Therefore, use the 8 bit address helper function. Signed-off-by: NNaveen Kaje <nkaje@codeaurora.org> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Sricharan R 提交于
Among the bus errors reported from the QUP_MASTER_STATUS register only NACK is considered and transfer gets suspended, while other errors are ignored. Correct this and suspend the transfer for other errors as well. This avoids unnecessary 'timeouts' which happens when waiting for events that would never happen when there is already an error condition on the bus. Also the error handling procedure should be the same for both NACK and other bus errors in case of dma mode. So correct that as well. Signed-off-by: NSricharan R <sricharan@codeaurora.org> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Sricharan R 提交于
With CONFIG_DEBUG_SG is enabled and when dma mode is used, below dump is seen, ------------[ cut here ]------------ kernel BUG at include/linux/scatterlist.h:140! Internal error: Oops - BUG: 0 [#1] PREEMPT SMP Modules linked in: CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.4.0-00459-g9f087b9-dirty #7 Hardware name: Qualcomm Technologies, Inc. APQ 8016 SBC (DT) task: ffffffc036868000 ti: ffffffc036870000 task.ti: ffffffc036870000 PC is at qup_sg_set_buf.isra.13+0x138/0x154 LR is at qup_sg_set_buf.isra.13+0x50/0x154 pc : [<ffffffc0005a0ed8>] lr : [<ffffffc0005a0df0>] pstate: 60000145 sp : ffffffc0368735c0 x29: ffffffc0368735c0 x28: ffffffc036873752 x27: ffffffc035233018 x26: ffffffc000c4e000 x25: 0000000000000000 x24: 0000000000000004 x23: 0000000000000000 x22: ffffffc035233668 x21: ffffff80004e3000 x20: ffffffc0352e0018 x19: 0000004000000000 x18: 0000000000000028 x17: 0000000000000004 x16: ffffffc0017a39c8 x15: 0000000000001cdf x14: ffffffc0019929d8 x13: ffffffc0352e0018 x12: 0000000000000000 x11: 0000000000000001 x10: 0000000000000001 x9 : ffffffc0012b2d70 x8 : ffffff80004e3000 x7 : 0000000000000018 x6 : 0000000030000000 x5 : ffffffc00199f018 x4 : ffffffc035233018 x3 : 0000000000000004 x2 : 00000000c0000000 x1 : 0000000000000003 x0 : 0000000000000000 Process swapper/0 (pid: 1, stack limit = 0xffffffc036870020) Stack: (0xffffffc0368735c0 to 0xffffffc036874000) sg_set_bug expects that the buf parameter passed in should be from lowmem and a valid pageframe. This is not true for pages from dma_alloc_coherent which can be carveouts, hence the check fails. Change allocation of sg buffers from dma_coherent memory to kzalloc to fix the issue. Note that now dma_map/unmap is used to make the kzalloc'ed buffers coherent before passing it to the dmaengine. Signed-off-by: NSricharan R <sricharan@codeaurora.org> Reviewed-by: NAndy Gross <andy.gross@linaro.org> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 12 4月, 2016 1 次提交
-
-
由 Wolfram Sang 提交于
Reviewed-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 04 3月, 2016 1 次提交
-
-
由 Sricharan R 提交于
After the addition of V2 support, there was a regression observed when testing it on MSM8996. The reason is driver puts the controller in to RUN state and writes the data to be 'tx' ed in fifo. But controller has to be put in to 'PAUSE' state and data has to written to fifo. Then should be put in to 'RUN' state separately. Signed-off-by: NSricharan R <sricharan@codeaurora.org> Tested-by: NPramod Gurav <gpramod@codeaurora.org> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 24 2月, 2016 1 次提交
-
-
由 Sricharan R 提交于
QUP cores can be attached to a BAM module, which acts as a dma engine for the QUP core. When DMA with BAM is enabled, the BAM consumer pipe transmitted data is written to the output FIFO and the BAM producer pipe received data is read from the input FIFO. With BAM capabilities, qup-i2c core can transfer more than 256 bytes, without a 'stop' which is not possible otherwise. Signed-off-by: NSricharan R <sricharan@codeaurora.org> Reviewed-by: NAndy Gross <andy.gross@linaro.org> Tested-by: NArchit Taneja <architt@codeaurora.org> Tested-by: NTelkar Nagender <ntelkar@codeaurora.org> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 13 2月, 2016 3 次提交
-
-
由 Sricharan R 提交于
The definition of i2c_msg says that "If this is the last message in a group, it is followed by a STOP. Otherwise it is followed by the next @i2c_msg transaction segment, beginning with a (repeated) START" So the expectation is that there is no 'STOP' bit inbetween individual i2c_msg segments with repeated 'START'. Adding the support for the same. This is required for some clients like touchscreen which keeps incrementing counts across individual transfers and 'STOP' bit inbetween resets the counter, which is not required. This patch adds the support in non-dma mode. Signed-off-by: NSricharan R <sricharan@codeaurora.org> Reviewed-by: NAndy Gross <andy.gross@linaro.org> Tested-by: NArchit Taneja <architt@codeaurora.org> Tested-by: NTelkar Nagender <ntelkar@codeaurora.org> [wsa: updated commit message] Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Sricharan R 提交于
QUP from version 2.1.1 onwards, supports a new format of i2c command tags. Tag codes instructs the controller to perform a operation like read/write. This new tagging version supports bam dma and transfers of more than 256 bytes without 'stop' in between. Adding the support for the same. For each block a data_write/read tag and data_len tag is added to the output fifo. For the final block of data write_stop/read_stop tag is used. Signed-off-by: NAndy Gross <andy.gross@linaro.org> Signed-off-by: NSricharan R <sricharan@codeaurora.org> Tested-by: NArchit Taneja <architt@codeaurora.org> Tested-by: NTelkar Nagender <ntelkar@codeaurora.org> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Sricharan R 提交于
qup_wait_writeready waits only on a output fifo empty event. Change the same function to accept the event and data length to wait as parameters. This way the same function can be used for timeouts in other places as well. Signed-off-by: NSricharan R <sricharan@codeaurora.org> Reviewed-by: NAndy Gross <andy.gross@linaro.org> Tested-by: NArchit Taneja <architt@codeaurora.org> Tested-by: NTelkar Nagender <ntelkar@codeaurora.org> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 13 3月, 2015 1 次提交
-
-
由 Wolfram Sang 提交于
Signed-off-by: NWolfram Sang <wsa@the-dreams.de> Tested-by: NIvan T. Ivanov <iivanov@mm-sol.com>
-
- 20 10月, 2014 1 次提交
-
-
由 Wolfram Sang 提交于
A platform_driver does not need to set an owner, it will be populated by the driver core. Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 03 10月, 2014 1 次提交
-
-
由 Andy Gross 提交于
The runtime pm calls need to be done before populating the children via the i2c_add_adapter call. If this is not done, a child can run into issues trying to do i2c read/writes due to the pm_runtime_sync failing. Signed-off-by: NAndy Gross <agross@codeaurora.org> Reviewed-by: NFelipe Balbi <balbi@ti.com> Acked-by: NBjorn Andersson <bjorn.andersson@sonymobile.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de> Cc: stable@kernel.org
-
- 07 8月, 2014 1 次提交
-
-
由 Pramod Gurav 提交于
This fixes a error handling scenario where clocks were not being disabled when QUP_OUTPUT_BLOCK_SIZE returns a size greater than the size of blk_sizes array. So this patch adds a statement to jump to the fail lable to release the clocks. Signed-off-by: NPramod Gurav <pramod.gurav@smartplayin.com> Acked-by: NIvan T. Ivanov <iivanov@mm-sol.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 15 5月, 2014 1 次提交
-
-
由 Andy Gross 提交于
This patch corrects the error check on the call to pm_runtime_get_sync. Signed-off-by: NAndy Gross <agross@codeaurora.org> Reviewed-by: NIvan T. Ivanov <iivanov@mm-sol.com> Acked-by: NBjorn Andersson <bjorn.andersson@sonymobile.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 06 4月, 2014 1 次提交
-
-
由 Wolfram Sang 提交于
It is used with of_property_read_u32(), so it should be u32. Signed-off-by: NWolfram Sang <wsa@the-dreams.de> Acked-by: NBjorn Andersson <bjorn.andersson@sonymobile.com> Fixes: 10c5a842 ('i2c: qup: New bus driver for the Qualcomm QUP I2C controller')
-
- 03 4月, 2014 1 次提交
-
-
由 Dan Carpenter 提交于
These should ">= ARRAY_SIZE()" instead of "> ARRAY_SIZE()". Fixes: 10c5a842 ('i2c: qup: New bus driver for the Qualcomm QUP I2C controller') Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 29 3月, 2014 1 次提交
-
-
由 Bjorn Andersson 提交于
This bus driver supports the QUP i2c hardware controller in the Qualcomm SOCs. The Qualcomm Universal Peripheral Engine (QUP) is a general purpose data path engine with input/output FIFOs and an embedded i2c mini-core. The driver supports FIFO mode (for low bandwidth applications) and block mode (interrupt generated for each block-size data transfer). Signed-off-by: NIvan T. Ivanov <iivanov@mm-sol.com> Signed-off-by: NBjorn Andersson <bjorn.andersson@sonymobile.com> Reviewed-by: NAndy Gross <agross@codeaurora.org> Tested-by: NPhilip Elcan <pelcan@codeaurora.org> [wsa: removed needless IS_ERR_VALUE] Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-