Uwe Kleine-König
c8fd5a3734
interconnect: qcom: Convert to platform remove callback returning void
...
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is ignored (apart
from emitting a warning) and this typically results in resource leaks.
To improve here there is a quest to make the remove callback return
void. In the first step of this quest all drivers are converted to
.remove_new() which already returns void. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().
Several drivers use qcom_icc_rpmh_remove() as remove callback which
returns zero unconditionally. Make it return void and use .remove_new in
the drivers. There is no change in behaviour.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de >
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org >
Link: https://lore.kernel.org/r/20231015135955.1537751-2-u.kleine-koenig@pengutronix.de
Signed-off-by: Georgi Djakov <djakov@kernel.org >
2023-10-18 13:37:39 +03:00
Konrad Dybcio
b32968a84c
interconnect: qcom: icc-rpmh: Retire DEFINE_QNODE
...
This helper has no users anymore. Kill it with heavy fire.
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org >
Reviewed-by: Bjorn Andersson <quic_bjorande@quicinc.com >
Link: https://lore.kernel.org/r/20230811-topic-icc_retire_macrosd-v1-10-c03aaeffc769@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org >
2023-08-22 15:07:06 +03:00
Mike Tipton
d8630f050d
interconnect: qcom: Add support for mask-based BCMs
...
Some BCMs aren't directly associated with the data path (i.e. ACV) and
therefore don't communicate using BW. Instead, they are simply
enabled/disabled with a simple bit mask. Add support for these.
Origin commit retrieved from:
2d1573e020
Signed-off-by: Mike Tipton <mdtipton@codeaurora.org >
[narmstrong: removed copyright change from original commit]
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org >
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org >
Link: https://lore.kernel.org/r/20230619-topic-sm8550-upstream-interconnect-mask-vote-v2-1-709474b151cc@linaro.org
Fixes: fafc114a46 ("interconnect: qcom: Add SM8450 interconnect provider driver")
Signed-off-by: Georgi Djakov <djakov@kernel.org >
2023-07-11 15:40:59 +03:00
Leo Yan
cb4805b5a5
interconnect: qcom: Move qcom_icc_xlate_extended() to a common file
...
since there have conflict between two headers icc-rpmh.h and icc-rpm.h,
the function qcom_icc_xlate_extended() is declared in icc-rpmh.h thus
it cannot be used by icc-rpm driver.
Move the function to a new common file icc-common.c so that allow it to
be called by multiple drivers.
Signed-off-by: Leo Yan <leo.yan@linaro.org >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Link: https://lore.kernel.org/r/20220712015929.2789881-3-leo.yan@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org >
2022-07-12 10:01:30 +03:00
Krzysztof Kozlowski
7123f88363
interconnect: qcom: constify qcom_icc_bcm pointers
...
Pointers to struct qcom_icc_bcm are not modified, so they can be made
const for safety. The contents of struct qcom_icc_bcm must stay
non-const.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org >
Link: https://lore.kernel.org/r/20220412102623.227607-3-krzysztof.kozlowski@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org >
2022-04-23 15:11:57 +03:00
Krzysztof Kozlowski
2ccf33c063
interconnect: qcom: constify icc_node pointers
...
Pointers to struct qcom_icc_node (and similar structures) are not
modified, so they can be made const for safety. The contents of struct
qcom_icc_node must stay non-const.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org >
Link: https://lore.kernel.org/r/20220412102623.227607-2-krzysztof.kozlowski@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org >
2022-04-23 15:11:48 +03:00
Mike Tipton
789a39ad39
interconnect: qcom: icc-rpmh: Consolidate probe functions
...
The current probe/remove functions are implemented separately for each
target, but they are almost identical. Replace them with common
functions that can be used across all rpmh targets.
Signed-off-by: Mike Tipton <mdtipton@codeaurora.org >
Reviewed-by: Matthias Kaehlcke <mka@chromium.org >
Link: https://lore.kernel.org/r/20210621214241.13521-1-mdtipton@codeaurora.org
Signed-off-by: Georgi Djakov <djakov@kernel.org >
2021-07-22 10:05:24 +03:00
Georgi Djakov
6caa3070fd
interconnect: qcom: Implement xlate_extended() to parse tags
...
Implement a function to parse the arguments of the "interconnects" DT
property and populate the interconnect path tags if this information
is available.
Tested-by: Sibi Sankar <sibis@codeaurora.org >
Reviewed-by: Sibi Sankar <sibis@codeaurora.org >
Link: https://lore.kernel.org/r/20200903133134.17201-4-georgi.djakov@linaro.org
Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org >
2020-09-08 16:29:00 +03:00
Mike Tipton
cb30e0292d
interconnect: qcom: Add support for per-BCM scaling factors
...
Currently, bcm-voter always assumes requests are made in KBps and that
BCM HW always wants them in Bps, so it always scales the requests by
1000. However, certain use cases and BCMs may use different units.
Thus, add support for BCM-specific scaling factors.
Signed-off-by: Mike Tipton <mdtipton@codeaurora.org >
Link: https://lore.kernel.org/r/20200903192149.30385-7-mdtipton@codeaurora.org
Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org >
2020-09-08 16:28:57 +03:00
Mike Tipton
65e0e4d679
dt-bindings: interconnect: Add generic qcom bindings
...
Add generic qcom interconnect bindings that are common across platforms. In
particular, these include QCOM_ICC_TAG_* macros that clients can use when
calling icc_set_tag().
Signed-off-by: Mike Tipton <mdtipton@codeaurora.org >
Acked-by: Rob Herring <robh@kernel.org >
Link: https://lore.kernel.org/r/20200903192149.30385-3-mdtipton@codeaurora.org
Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org >
2020-09-08 16:28:54 +03:00
David Dai
976daac4a1
interconnect: qcom: Consolidate interconnect RPMh support
...
Add bcm voter driver and add support for RPMh specific interconnect
providers which implements the set and aggregate functionalities that
translates bandwidth requests into RPMh messages. These modules provide
a common set of functionalities for all Qualcomm RPMh based interconnect
providers and should help reduce code duplication when adding new
providers.
Signed-off-by: David Dai <daidavid1@codeaurora.org >
Signed-off-by: Odelu Kukatla <okukatla@codeaurora.org >
Reviewed-by: Evan Green <evgreen@chromium.org >
Signed-off-by: Sibi Sankar <sibis@codeaurora.org >
Link: https://lore.kernel.org/r/20200228095951.15457-1-sibis@codeaurora.org
Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org >
2020-02-28 12:11:40 +02:00