18 Dec, 2019

2 commits

  • commit f39488ea2a75c49634c8611090f58734f61eee7c upstream.

    As we will remove items off the list using list_del(), we need to use the
    safe version of list_for_each_entry().

    Fixes: 5e4e6c4d3ae0 ("interconnect: qcom: Add QCS404 interconnect provider driver")
    Reported-by: Dmitry Osipenko
    Reviewed-by: Bjorn Andersson
    Signed-off-by: Georgi Djakov
    Cc: # v5.4
    Link: https://lore.kernel.org/r/20191212075332.16202-4-georgi.djakov@linaro.org
    Signed-off-by: Greg Kroah-Hartman

    Georgi Djakov
     
  • commit b29b8113bb41285eb7ed55ce0c65017b5c0240f7 upstream.

    As we will remove items off the list using list_del(), we need to use the
    safe version of list_for_each_entry().

    Fixes: b5d2f741077a ("interconnect: qcom: Add sdm845 interconnect provider driver")
    Reported-by: Dmitry Osipenko
    Reviewed-by: Bjorn Andersson
    Signed-off-by: Georgi Djakov
    Cc: # v5.3+
    Link: https://lore.kernel.org/r/20191212075332.16202-3-georgi.djakov@linaro.org
    Signed-off-by: Greg Kroah-Hartman

    Georgi Djakov
     

20 Oct, 2019

2 commits

  • We must ensure that the tag is not changed while we aggregate the
    requests. Currently the icc_set_tag() is not using any locks and this
    may cause the values to be aggregated incorrectly. Fix this by acquiring
    the icc_lock while we set the tag.

    Link: https://lore.kernel.org/lkml/20191018141750.17032-1-georgi.djakov@linaro.org/
    Fixes: 127ab2cc5f19 ("interconnect: Add support for path tags")
    Reviewed-by: Bjorn Andersson
    Signed-off-by: Georgi Djakov

    Georgi Djakov
     
  • This is a struct with a trailing zero-length array of icc_node pointers
    but it's allocated as if it were a single array of icc_nodes instead.

    This allocates too much memory at probe time but shouldn't have any
    noticeable effect. Both sdm845 and qcs404 are affected.

    Fix by replacing kcalloc with kzalloc and using the "struct_size" macro.

    Signed-off-by: Leonard Crestez
    Fixes: 5e4e6c4d3ae0 ("interconnect: qcom: Add QCS404 interconnect provider driver")
    Link: https://lore.kernel.org/linux-pm/a7360abb6561917e30bbfaa6084578449152bf1d.1569348056.git.leonard.crestez@nxp.com/
    Signed-off-by: Georgi Djakov

    Leonard Crestez
     

20 Aug, 2019

1 commit

  • The macro to generate a Bus Controller Manager (BCM) TCS command is used
    by the interconnect driver but might also be interesting to other
    drivers that need to construct TCS commands for sub processors so move
    it out of the sdm845 specific file and into the header.

    Signed-off-by: Jordan Crouse
    Acked-by: Stephen Boyd
    Acked-by: Bjorn Andersson
    Signed-off-by: Georgi Djakov

    Jordan Crouse
     

15 Aug, 2019

1 commit

  • There is one compilation error when CONFIG_INTERCONNECT_QCOM_QCS404=y and
    CONFIG_INTERCONNECT_QCOM_SMD_RPM=y, as well as CONFIG_COMPILE_TEST=y,
    but CONFIG_QCOM_SMD_RPM is not set, logs as below:

    drivers/interconnect/qcom/smd-rpm.o: In function `qcom_icc_rpm_smd_send':
    smd-rpm.c:(.text+0xe4): undefined reference to `qcom_rpm_smd_write'
    Makefile:1071: recipe for target 'vmlinux' failed
    make: *** [vmlinux] Error 1

    This is because
    INTERCONNECT_QCOM_QCS404 depends on QCOM_SMD_RPM || COMPILE_TEST.
    Here CONFIG_COMPILE_TEST=y, so CONFIG_INTERCONNECT_QCOM_SMD_RPM
    is selected. If CONFIG_QCOM_SMD_RPM is not set, then
    qcom_rpm_smd_write() is not defined, and compilation error happen.
    Fix this by removing COMPILE_TEST from CONFIG_INTERCONNECT_QCOM_QCS404.

    Fixes: 5e4e6c4d3ae0 ("interconnect: qcom: Add QCS404 interconnect provider driver")
    Signed-off-by: Mao Wenan
    Signed-off-by: Georgi Djakov

    Mao Wenan
     

14 Aug, 2019

5 commits

  • Add driver for the interconnect buses found in Qualcomm QCS404-based
    platforms. The topology consists of three NoCs that are controlled by
    a remote processor. This remote processor collects the aggregated
    bandwidth for each master-slave pairs.

    Signed-off-by: Bjorn Andersson
    Signed-off-by: Georgi Djakov

    Bjorn Andersson
     
  • On some Qualcomm SoCs, there is a remote processor, which controls some of
    the Network-On-Chip interconnect resources. Other CPUs express their needs
    by communicating with this processor. Add a driver to handle communication
    with this remote processor.

    Reviewed-by: Bjorn Andersson
    Signed-off-by: Georgi Djakov

    Georgi Djakov
     
  • Add support for wake and sleep commands by using a tag to indicate
    whether or not the aggregate and set requests fall into execution
    state specific bucket.

    Signed-off-by: David Dai
    Reviewed-by: Evan Green
    Signed-off-by: Georgi Djakov

    David Dai
     
  • Introduce an optional callback in interconnect provider drivers. It can be
    used for implementing actions, that need to be executed before the actual
    aggregation of the bandwidth requests has started.

    The benefit of this for now is that it will significantly simplify the code
    in provider drivers.

    Suggested-by: Evan Green
    Reviewed-by: Evan Green
    Signed-off-by: Georgi Djakov

    Georgi Djakov
     
  • Consumers may have use cases with different bandwidth requirements based
    on the system or driver state. The consumer driver can append a specific
    tag to the path and pass this information to the interconnect platform
    driver to do the aggregation based on this state.

    Introduce icc_set_tag() function that will allow the consumers to append
    an optional tag to each path. The aggregation of these tagged paths is
    platform specific.

    Reviewed-by: Evan Green
    Signed-off-by: Georgi Djakov

    Georgi Djakov
     

21 May, 2019

1 commit


06 Apr, 2019

1 commit


22 Jan, 2019

5 commits

  • When consumers report their bandwidth needs with icc_set_bw(), it's
    possible that the requested amount of bandwidth is not available or just
    the new configuration fails to apply on some path. In this case revert to
    the previous configuration and propagate the error back to the consumers
    to let them know that bandwidth is not available, hardware is busy or
    whatever error is returned by the interconnect platform driver.

    Signed-off-by: Georgi Djakov
    Signed-off-by: Greg Kroah-Hartman

    Georgi Djakov
     
  • Introduce Qualcomm SDM845 specific provider driver using the
    interconnect framework.

    Signed-off-by: David Dai
    Acked-by: Rob Herring
    Signed-off-by: Georgi Djakov
    Signed-off-by: Greg Kroah-Hartman

    David Dai
     
  • Add a functionality to provide information about the current constraints
    per each node and provider.

    Reviewed-by: Evan Green
    Signed-off-by: Georgi Djakov
    Signed-off-by: Greg Kroah-Hartman

    Georgi Djakov
     
  • Currently we support only platform data for specifying the interconnect
    endpoints. As now the endpoints are hard-coded into the consumer driver
    this may lead to complications when a single driver is used by multiple
    SoCs, which may have different interconnect topology.
    To avoid cluttering the consumer drivers, introduce a translation function
    to help us get the board specific interconnect data from device-tree.

    Reviewed-by: Evan Green
    Signed-off-by: Georgi Djakov
    Signed-off-by: Greg Kroah-Hartman

    Georgi Djakov
     
  • This patch introduces a new API to get requirements and configure the
    interconnect buses across the entire chipset to fit with the current
    demand.

    The API is using a consumer/provider-based model, where the providers are
    the interconnect buses and the consumers could be various drivers.
    The consumers request interconnect resources (path) between endpoints and
    set the desired constraints on this data flow path. The providers receive
    requests from consumers and aggregate these requests for all master-slave
    pairs on that path. Then the providers configure each node along the path
    to support a bandwidth that satisfies all bandwidth requests that cross
    through that node. The topology could be complicated and multi-tiered and
    is SoC specific.

    Reviewed-by: Evan Green
    Signed-off-by: Georgi Djakov
    Signed-off-by: Greg Kroah-Hartman

    Georgi Djakov