30 Dec, 2020

2 commits

  • [ Upstream commit 428bb001143cf5bfb65aa4ae90d4ebc95f82d007 ]

    platform_get_resource_byname() may fail and in this case a NULL
    dereference will occur.

    Fix it to use devm_platform_ioremap_resource_byname() instead of calling
    platform_get_resource_byname() and devm_ioremap().

    This is detected by Coccinelle semantic patch.

    @@
    expression pdev, res, n, t, e, e1, e2;
    @@

    res = \(platform_get_resource\|platform_get_resource_byname\)(pdev, t,
    n);
    + if (!res)
    + return -EINVAL;
    ... when != res == NULL
    e = devm_ioremap(e1, res->start, e2);

    Fixes: ad7fcbc308b0 ("slimbus: qcom: Add Qualcomm Slimbus controller driver")
    Signed-off-by: Zhang Changzhong
    Link: https://lore.kernel.org/r/1607392473-20610-1-git-send-email-zhangchangzhong@huawei.com
    Signed-off-by: Greg Kroah-Hartman
    Signed-off-by: Sasha Levin

    Zhang Changzhong
     
  • [ Upstream commit 39014ce6d6028614a46395923a2c92d058b6fa87 ]

    Attempting to send a power request during PM operations, when the QMI
    handle isn't initialized results in a NULL pointer dereference. So check
    if the QMI handle has been initialized before attempting to post the
    power requests.

    Fixes: 917809e2280b ("slimbus: ngd: Add qcom SLIMBus NGD driver")
    Signed-off-by: Bjorn Andersson
    Signed-off-by: Srinivas Kandagatla
    Link: https://lore.kernel.org/r/20201127102451.17114-7-srinivas.kandagatla@linaro.org
    Signed-off-by: Greg Kroah-Hartman
    Signed-off-by: Sasha Levin

    Bjorn Andersson
     

25 Sep, 2020

3 commits

  • In QMI new server notification we enable the NGD however during
    delete server notification we do not disable the NGD.

    This can lead to multiple instances of NGD being enabled, so make
    sure that we disable NGD in delete server callback to fix this issue!

    Fixes: 917809e2280b ("slimbus: ngd: Add qcom SLIMBus NGD driver")
    Signed-off-by: Srinivas Kandagatla
    Link: https://lore.kernel.org/r/20200925095520.27316-4-srinivas.kandagatla@linaro.org
    Signed-off-by: Greg Kroah-Hartman

    Srinivas Kandagatla
     
  • Let the controller logic decide when to enter into clock pause mode!
    Entering in to pause mode during unregistration does not really make
    sense as the controller is totally going down at that point in time.

    Fixes: 4b14e62ad3c9e ("slimbus: Add support for 'clock-pause' feature")
    Signed-off-by: Srinivas Kandagatla
    Link: https://lore.kernel.org/r/20200925095520.27316-3-srinivas.kandagatla@linaro.org
    Signed-off-by: Greg Kroah-Hartman

    Srinivas Kandagatla
     
  • logical address can be either assigned by the SLIMBus controller or the core.
    Core uses IDA in cases where get_addr callback is not provided by the
    controller.
    Core already has this check while allocating IDR, however during absence
    reporting this is not checked. This patch fixes this issue.

    Fixes: 46a2bb5a7f7e ("slimbus: core: Add slim controllers support")
    Signed-off-by: Srinivas Kandagatla
    Link: https://lore.kernel.org/r/20200925095520.27316-2-srinivas.kandagatla@linaro.org
    Signed-off-by: Greg Kroah-Hartman

    Srinivas Kandagatla
     

15 May, 2020

2 commits

  • Adding missing corresponding of_node_put

    Fixes: 7588a511bdb4 ("slimbus: core: add support to device tree helper")
    Signed-off-by: Saravana Kannan
    [Srini: added fixes tag, removed NULL check and updated log]
    Signed-off-by: Srinivas Kandagatla
    Link: https://lore.kernel.org/r/20200511151334.362-3-srinivas.kandagatla@linaro.org
    Signed-off-by: Greg Kroah-Hartman

    Saravana Kannan
     
  • When setting the of_node for a newly created device, also set the
    fwnode. This allows fw_devlink feature to work for slimbus devices.

    Also, remove some unnecessary NULL checks. The functions in question
    already do NULL checks.

    Signed-off-by: Saravana Kannan
    [Srini: removed unnecessary NULL check from other patch]
    Signed-off-by: Srinivas Kandagatla
    Link: https://lore.kernel.org/r/20200511151334.362-2-srinivas.kandagatla@linaro.org
    Signed-off-by: Greg Kroah-Hartman

    Saravana Kannan
     

28 Apr, 2020

2 commits


12 Mar, 2020

1 commit


15 Jan, 2020

3 commits

  • The remove misses to disable and unprepare rclk and hclk.
    Add calls to clk_disable_unprepare to fix it.

    Signed-off-by: Chuhong Yuan
    Signed-off-by: Srinivas Kandagatla
    Link: https://lore.kernel.org/r/20200109103148.5612-5-srinivas.kandagatla@linaro.org
    Signed-off-by: Greg Kroah-Hartman

    Chuhong Yuan
     
  • This patch corrects the SPDX License Identifier style in
    header file related to SLIMbus driver.
    For C header files Documentation/process/license-rules.rst
    mandates C-like comments (opposed to C source files where
    C++ style should be used).

    Changes made by using a script provided by Joe Perches here:
    https://lkml.org/lkml/2019/2/7/46.

    Suggested-by: Joe Perches
    Signed-off-by: Nishad Kamdar
    Signed-off-by: Srinivas Kandagatla
    Link: https://lore.kernel.org/r/20200109103148.5612-4-srinivas.kandagatla@linaro.org
    Signed-off-by: Greg Kroah-Hartman

    Nishad Kamdar
     
  • dma_request_slave_channel() is a wrapper on top of dma_request_chan()
    eating up the error code.

    By using dma_request_chan() directly the driver can support deferred
    probing against DMA.

    Signed-off-by: Peter Ujfalusi
    Signed-off-by: Srinivas Kandagatla
    Link: https://lore.kernel.org/r/20200109103148.5612-3-srinivas.kandagatla@linaro.org
    Signed-off-by: Greg Kroah-Hartman

    Peter Ujfalusi
     

18 Aug, 2019

2 commits

  • fix below issue reported by coccicheck
    ./drivers/slimbus/slimbus.h:440:3-46: duplicated argument to && or ||

    Looks like this was a typo, SLIM_MSG_MC_REQUEST_CHANGE_VALUE is command
    which requires transaction ID, so fix it, this also fix the warning.

    Reported-by: Hariprasad Kelam
    Signed-off-by: Srinivas Kandagatla
    Link: https://lore.kernel.org/r/20190818093902.29993-3-srinivas.kandagatla@linaro.org
    Signed-off-by: Greg Kroah-Hartman

    Srinivas Kandagatla
     
  • Each iteration of for_each_available_child_of_node puts the previous
    node, but in the case of a return from the middle of the loop, there is
    no put, thus causing a memory leak. Hence add an of_node_put before the
    return in two places.
    Issue found with Coccinelle.

    Signed-off-by: Nishka Dasgupta
    Reviewed-by: Bjorn Andersson
    Signed-off-by: Srinivas Kandagatla
    Link: https://lore.kernel.org/r/20190818093902.29993-2-srinivas.kandagatla@linaro.org
    Signed-off-by: Greg Kroah-Hartman

    Nishka Dasgupta
     

20 Jun, 2019

2 commits


11 Jun, 2019

1 commit

  • The kerneldoc comments in drivers/slimbus/stream.c were not properly
    formatted, leading to a distinctly unsatisfying "no structured comments
    found" warning in the docs build. Sprinkle some asterisks around so that
    the comments will be properly recognized.

    Signed-off-by: Jonathan Corbet
    Signed-off-by: Greg Kroah-Hartman

    Jonathan Corbet
     

26 Apr, 2019

1 commit


22 Jan, 2019

4 commits


06 Dec, 2018

2 commits


27 Nov, 2018

2 commits

  • QCOM_QMI_HELPERS is a hidden kconfig, so the proper usage is
    to select it, not depend upon it.

    Because of this change, we now also need to depend on the same
    Kconfigs as QCOM_QMI_HELPERS depends on.

    Signed-off-by: Niklas Cassel
    Signed-off-by: Srinivas Kandagatla
    Signed-off-by: Greg Kroah-Hartman

    Niklas Cassel
     
  • on non DT platforms like x86 of_match_node is set to NULL, dereferencing
    directly would throw an error.
    Fix this by doing this in two steps, get the match then the data.

    Reported-by: Greg KH
    Signed-off-by: Srinivas Kandagatla
    Signed-off-by: Greg Kroah-Hartman

    Srinivas Kandagatla
     

07 Nov, 2018

1 commit

  • SLIM_MSG_CLK_PAUSE_SEQ_FLG is never set in any of the slim core,
    so performing a check in ngd driver is totally unnecessary.

    Also this patch fixes warning about mc field overflow reported
    with CoverityScan.

    Making clk pause feature optional will be added to slim core in
    next development cycle.

    Reported-by: Colin Ian King
    Fixes: 917809e2280b ("slimbus: ngd: Add qcom SLIMBus NGD driver")
    Signed-off-by: Srinivas Kandagatla
    Signed-off-by: Greg Kroah-Hartman

    Srinivas Kandagatla
     

26 Sep, 2018

7 commits


14 Sep, 2018

1 commit

  • qcom_slim_ngd_runtime_suspend is protected by an #ifdef,
    qcom_slim_ngd_runtime_idle is now, which causes a build time warning:

    drivers/slimbus/qcom-ngd-ctrl.c:1470:12: error: 'qcom_slim_ngd_runtime_idle' defined but not used [-Werror=unused-function]

    Marking both as __maybe_unused lets us get rid of the warning
    as well as the #ifdef.

    Fixes: 917809e2280b ("slimbus: ngd: Add qcom SLIMBus NGD driver")
    Signed-off-by: Arnd Bergmann
    Signed-off-by: Greg Kroah-Hartman

    Arnd Bergmann
     

08 Jul, 2018

1 commit

  • This patch fixes below warning during building htmldoc:
    slimbus.h:352: warning: Function parameter or member 'name'
    not described in 'slim_stream_runtime'

    This patch also removes documentation for state variable
    in struct slim_stream_runtime which was redundant and removed.

    Reported-by: kbuild test robot
    Signed-off-by: Srinivas Kandagatla
    Signed-off-by: Greg Kroah-Hartman

    Srinivas Kandagatla
     

07 Jul, 2018

3 commits

  • This patch adds support to stream support, this involve implementing
    user specific implementation of Data channel management and channel
    management SLIMbus messages.

    Signed-off-by: Srinivas Kandagatla
    Signed-off-by: Greg Kroah-Hartman

    Srinivas Kandagatla
     
  • This patch adds support to SLIMbus stream apis for slimbus device.
    SLIMbus streaming involves adding support to Data Channel Management and
    channel Reconfiguration Messages to slim core plus few stream apis.
    >From slim device side the apis are very simple mostly inline with other
    stream apis.

    Currently it only supports Isochronous and Push/Pull transport protocols,
    which are sufficient for audio use cases.

    Signed-off-by: Srinivas Kandagatla
    Signed-off-by: Greg Kroah-Hartman

    Srinivas Kandagatla
     
  • This patch adds suppor to Qualcomm SLIMBus Non-Generic Device (NGD)
    controller driver.
    This is light-weight SLIMBus controller driver responsible for
    communicating with slave HW directly over the bus using messaging
    interface, and communicating with master component residing on ADSP
    for bandwidth and data-channel management

    Based on intial work from
    Karthikeyan Ramasubramanian and
    Sagar Dharia

    Signed-off-by: Srinivas Kandagatla
    Tested-by: Craig Tatlor
    Reviewed-by: Vinod Koul
    Signed-off-by: Greg Kroah-Hartman

    Srinivas Kandagatla