Johan Hovold
b2d110cd5d
interconnect: drop unused icc_link_destroy() interface
...
Now that the link array is deallocated when destroying nodes and the
explicit link removal has been dropped from the exynos driver there are
no further users of and no need for the icc_link_destroy() interface.
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Link: https://lore.kernel.org/r/20230306075651.2449-24-johan+linaro@kernel.org
Signed-off-by: Georgi Djakov <djakov@kernel.org >
2023-04-05 11:29:59 +03:00
Johan Hovold
419405c922
interconnect: drop racy registration API
...
Now that all interconnect drivers have been converted to the new
provider registration API, the old racy interface can be removed.
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org >
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Link: https://lore.kernel.org/r/20230306075651.2449-22-johan+linaro@kernel.org
Signed-off-by: Georgi Djakov <djakov@kernel.org >
2023-03-20 16:44:04 +02:00
Rob Herring
213913ff2b
interconnect: Use of_property_present() for testing DT property presence
...
It is preferred to use typed property access functions (i.e.
of_property_read_<type> functions) rather than low-level
of_get_property/of_find_property functions for reading properties. As
part of this, convert of_get_property/of_find_property calls to the
recently added of_property_present() helper when we just want to test
for presence of a property and nothing more.
Signed-off-by: Rob Herring <robh@kernel.org >
Link: https://lore.kernel.org/r/20230310144709.1542841-1-robh@kernel.org
Signed-off-by: Georgi Djakov <djakov@kernel.org >
2023-03-20 16:42:27 +02:00
Dmitry Baryshkov
f730038fe6
interconnect: qcom: osm-l3: drop unuserd header inclusion
...
The commit 4529992c94 ("interconnect: qcom: osm-l3: Use
platform-independent node ids") made osm-l3 driver use
platform-independent IDs, removing the need to include platform headers.
Fixes: 4529992c94 ("interconnect: qcom: osm-l3: Use platform-independent node ids")
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Bjorn Andersson <andersson@kernel.org >
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org >
Link: https://lore.kernel.org/r/20230103031159.1060075-1-dmitry.baryshkov@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org >
2023-03-20 16:42:27 +02:00
Dmitry Baryshkov
4c4161b4c8
interconnect: qcom: drop obsolete OSM_L3/EPSS defines
...
Since Qualcomm platforms have switched to the separate OSM_L3/EPSS
driver, old related defines became unused. Drop them now.
Suggested-by: Bjorn Andersson <andersson@kernel.org >
Fixes: 4529992c94 ("interconnect: qcom: osm-l3: Use platform-independent node ids")
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org >
Link: https://lore.kernel.org/r/20230103045717.1079067-1-dmitry.baryshkov@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org >
2023-03-20 16:42:27 +02:00
Vivek Aknurwar
558ea12354
interconnect: Skip call into provider if initial bw is zero
...
Currently framework sets bw even when init bw requirements are zero during
provider registration, thus resulting bulk of set bw to hw.
Avoid this behaviour by skipping provider set bw calls if init bw is zero.
Signed-off-by: Vivek Aknurwar <quic_viveka@quicinc.com >
Link: https://lore.kernel.org/r/1673647679-15216-1-git-send-email-quic_viveka@quicinc.com
Signed-off-by: Georgi Djakov <djakov@kernel.org >
2023-03-20 16:42:26 +02:00
Jean Delvare
4658842abc
interconnect: qcom: Drop obsolete dependency on COMPILE_TEST
...
Since commit 0166dc11be ("of: make CONFIG_OF user selectable"), it
is possible to test-build any driver which depends on OF on any
architecture by explicitly selecting OF. Therefore depending on
COMPILE_TEST as an alternative is no longer needed.
Signed-off-by: Jean Delvare <jdelvare@suse.de >
Cc: Andy Gross <agross@kernel.org >
Cc: Bjorn Andersson <andersson@kernel.org >
Cc: Konrad Dybcio <konrad.dybcio@somainline.org >
Cc: Georgi Djakov <djakov@kernel.org >
Link: https://lore.kernel.org/r/20230209101310.11942cd0@endymion.delvare
Signed-off-by: Georgi Djakov <djakov@kernel.org >
2023-03-20 16:42:26 +02:00
Johan Hovold
859ad5f177
interconnect: exynos: drop redundant link destroy
...
There is no longer any need to explicitly destroy node links as this is
now done when the node is destroyed as part of icc_nodes_remove().
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org >
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Link: https://lore.kernel.org/r/20230306075651.2449-17-johan+linaro@kernel.org
Signed-off-by: Georgi Djakov <djakov@kernel.org >
2023-03-13 21:13:48 +02:00
Johan Hovold
c9e46ca612
interconnect: exynos: fix registration race
...
The current interconnect provider registration interface is inherently
racy as nodes are not added until the after adding the provider. This
can specifically cause racing DT lookups to trigger a NULL-pointer
deference when either a NULL pointer or not fully initialised node is
returned from exynos_generic_icc_xlate().
Switch to using the new API where the provider is not registered until
after it has been fully initialised.
Fixes: 2f95b9d5cf ("interconnect: Add generic interconnect driver for Exynos SoCs")
Cc: stable@vger.kernel.org # 5.11
Cc: Sylwester Nawrocki <s.nawrocki@samsung.com >
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org >
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Link: https://lore.kernel.org/r/20230306075651.2449-16-johan+linaro@kernel.org
Signed-off-by: Georgi Djakov <djakov@kernel.org >
2023-03-13 21:13:48 +02:00
Johan Hovold
3aab264875
interconnect: exynos: fix node leak in probe PM QoS error path
...
Make sure to add the newly allocated interconnect node to the provider
before adding the PM QoS request so that the node is freed on errors.
Fixes: 2f95b9d5cf ("interconnect: Add generic interconnect driver for Exynos SoCs")
Cc: stable@vger.kernel.org # 5.11
Cc: Sylwester Nawrocki <s.nawrocki@samsung.com >
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org >
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Link: https://lore.kernel.org/r/20230306075651.2449-15-johan+linaro@kernel.org
Signed-off-by: Georgi Djakov <djakov@kernel.org >
2023-03-13 21:13:48 +02:00
Johan Hovold
bfe7bcd2b9
interconnect: qcom: msm8974: fix registration race
...
The current interconnect provider registration interface is inherently
racy as nodes are not added until the after adding the provider. This
can specifically cause racing DT lookups to fail.
Switch to using the new API where the provider is not registered until
after it has been fully initialised.
Fixes: 4e60a9568d ("interconnect: qcom: add msm8974 driver")
Cc: stable@vger.kernel.org # 5.5
Reviewed-by: Brian Masney <bmasney@redhat.com >
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org >
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Link: https://lore.kernel.org/r/20230306075651.2449-12-johan+linaro@kernel.org
Signed-off-by: Georgi Djakov <djakov@kernel.org >
2023-03-13 21:13:48 +02:00
Johan Hovold
74240a5beb
interconnect: qcom: rpmh: fix registration race
...
The current interconnect provider registration interface is inherently
racy as nodes are not added until the after adding the provider. This
can specifically cause racing DT lookups to fail.
Switch to using the new API where the provider is not registered until
after it has been fully initialised.
Fixes: 976daac4a1 ("interconnect: qcom: Consolidate interconnect RPMh support")
Cc: stable@vger.kernel.org # 5.7
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org >
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Link: https://lore.kernel.org/r/20230306075651.2449-11-johan+linaro@kernel.org
Signed-off-by: Georgi Djakov <djakov@kernel.org >
2023-03-13 21:13:48 +02:00
Johan Hovold
6570d1d46e
interconnect: qcom: rpmh: fix probe child-node error handling
...
Make sure to clean up and release resources properly also in case probe
fails when populating child devices.
Fixes: 57eb14779d ("interconnect: qcom: icc-rpmh: Support child NoC device probe")
Cc: stable@vger.kernel.org # 6.0
Cc: Luca Weiss <luca.weiss@fairphone.com >
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org >
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Link: https://lore.kernel.org/r/20230306075651.2449-10-johan+linaro@kernel.org
Signed-off-by: Georgi Djakov <djakov@kernel.org >
2023-03-13 21:13:47 +02:00
Johan Hovold
90ae93d8af
interconnect: qcom: rpm: fix registration race
...
The current interconnect provider registration interface is inherently
racy as nodes are not added until the after adding the provider. This
can specifically cause racing DT lookups to fail.
Switch to using the new API where the provider is not registered until
after it has been fully initialised.
Fixes: 62feb14ee8 ("interconnect: qcom: Consolidate interconnect RPM support")
Fixes: 30c8fa3ec6 ("interconnect: qcom: Add MSM8916 interconnect provider driver")
Cc: stable@vger.kernel.org # 5.7
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org >
Reviewed-by: Jun Nie <jun.nie@linaro.org >
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Link: https://lore.kernel.org/r/20230306075651.2449-9-johan+linaro@kernel.org
Signed-off-by: Georgi Djakov <djakov@kernel.org >
2023-03-13 21:12:16 +02:00
Johan Hovold
bc463201f6
interconnect: qcom: rpm: fix probe child-node error handling
...
Make sure to clean up and release resources properly also in case probe
fails when populating child devices.
Fixes: e39bf2972c ("interconnect: icc-rpm: Support child NoC device probe")
Cc: stable@vger.kernel.org # 5.17
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org >
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Link: https://lore.kernel.org/r/20230306075651.2449-7-johan+linaro@kernel.org
Signed-off-by: Georgi Djakov <djakov@kernel.org >
2023-03-07 22:19:05 +02:00
Johan Hovold
174941ed28
interconnect: qcom: osm-l3: fix registration race
...
The current interconnect provider registration interface is inherently
racy as nodes are not added until the after adding the provider. This
can specifically cause racing DT lookups to fail:
of_icc_xlate_onecell: invalid index 0
cpu cpu0: error -EINVAL: error finding src node
cpu cpu0: dev_pm_opp_of_find_icc_paths: Unable to get path0: -22
qcom-cpufreq-hw: probe of 18591000.cpufreq failed with error -22
Switch to using the new API where the provider is not registered until
after it has been fully initialised.
Fixes: 5bc9900add ("interconnect: qcom: Add OSM L3 interconnect provider support")
Cc: stable@vger.kernel.org # 5.7
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org >
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Link: https://lore.kernel.org/r/20230306075651.2449-6-johan+linaro@kernel.org
Signed-off-by: Georgi Djakov <djakov@kernel.org >
2023-03-07 22:19:05 +02:00
Johan Hovold
9fbd35520f
interconnect: imx: fix registration race
...
The current interconnect provider registration interface is inherently
racy as nodes are not added until the after adding the provider. This
can specifically cause racing DT lookups to fail.
Switch to using the new API where the provider is not registered until
after it has been fully initialised.
Fixes: f0d8048525 ("interconnect: Add imx core driver")
Cc: stable@vger.kernel.org # 5.8
Cc: Alexandre Bailon <abailon@baylibre.com >
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org >
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Tested-by: Luca Ceresoli <luca.ceresoli@bootlin.com > # i.MX8MP MSC SM2-MB-EP1 Board
Link: https://lore.kernel.org/r/20230306075651.2449-5-johan+linaro@kernel.org
Signed-off-by: Georgi Djakov <djakov@kernel.org >
2023-03-07 22:19:05 +02:00
Johan Hovold
eb59eca0d8
interconnect: fix provider registration API
...
The current interconnect provider interface is inherently racy as
providers are expected to be added before being fully initialised.
Specifically, nodes are currently not added and the provider data is not
initialised until after registering the provider which can cause racing
DT lookups to fail.
Add a new provider API which will be used to fix up the interconnect
drivers.
The old API is reimplemented using the new interface and will be removed
once all drivers have been fixed.
Fixes: 11f1ceca70 ("interconnect: Add generic on-chip interconnect API")
Fixes: 87e3031b6f ("interconnect: Allow endpoints translation via DT")
Cc: stable@vger.kernel.org # 5.1
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org >
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Tested-by: Luca Ceresoli <luca.ceresoli@bootlin.com > # i.MX8MP MSC SM2-MB-EP1 Board
Link: https://lore.kernel.org/r/20230306075651.2449-4-johan+linaro@kernel.org
Signed-off-by: Georgi Djakov <djakov@kernel.org >
2023-03-07 22:19:05 +02:00
Johan Hovold
e0e7089bf9
interconnect: fix icc_provider_del() error handling
...
The interconnect framework currently expects that providers are only
removed when there are no users and after all nodes have been removed.
There is currently nothing that guarantees this to be the case and the
framework does not do any reference counting, but refusing to remove the
provider is never correct as that would leave a dangling pointer to a
resource that is about to be released in the global provider list (e.g.
accessible through debugfs).
Replace the current sanity checks with WARN_ON() so that the provider is
always removed.
Fixes: 11f1ceca70 ("interconnect: Add generic on-chip interconnect API")
Cc: stable@vger.kernel.org # 5.1: 680f8666ba : interconnect: Make icc_provider_del() return void
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org >
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Tested-by: Luca Ceresoli <luca.ceresoli@bootlin.com > # i.MX8MP MSC SM2-MB-EP1 Board
Link: https://lore.kernel.org/r/20230306075651.2449-3-johan+linaro@kernel.org
Signed-off-by: Georgi Djakov <djakov@kernel.org >
2023-03-07 22:19:05 +02:00
Johan Hovold
a5904f415e
interconnect: fix mem leak when freeing nodes
...
The node link array is allocated when adding links to a node but is not
deallocated when nodes are destroyed.
Fixes: 11f1ceca70 ("interconnect: Add generic on-chip interconnect API")
Cc: stable@vger.kernel.org # 5.1
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org >
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Tested-by: Luca Ceresoli <luca.ceresoli@bootlin.com > # i.MX8MP MSC SM2-MB-EP1 Board
Link: https://lore.kernel.org/r/20230306075651.2449-2-johan+linaro@kernel.org
Signed-off-by: Georgi Djakov <djakov@kernel.org >
2023-03-07 22:19:05 +02:00
Konrad Dybcio
633a12fda6
interconnect: qcom: qcm2290: Fix MASTER_SNOC_BIMC_NRT
...
Due to what seems to be a copy-paste error, the _NRT master was
identical to the _RT master, which should not be the case.. Fix it
using the values available from the downstream kernel [1].
[1] https://android.googlesource.com/kernel/msm-extra/devicetree/+/refs/heads/android-msm-bramble-4.19-android11-qpr1/qcom/scuba-bus.dtsi#127
Fixes: 1a14b1ac39 ("interconnect: qcom: Add QCM2290 driver support")
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org >
Acked-by: Shawn Guo <shawn.guo@linaro.org >
Link: https://lore.kernel.org/r/20230103142120.15605-1-konrad.dybcio@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org >
2023-03-06 22:18:59 +02:00
Dmitry Baryshkov
0d00cd114f
interconnect: qcom: sm8550: switch to qcom_icc_rpmh_* function
...
Change sm8550 interconnect driver to use generic qcom_icc_rpmh_*
functions rather than embedding a copy of thema. This also fixes an
overallocation of memory for icc_onecell_data structure.
Fixes: e6f0d6a30f ("interconnect: qcom: Add SM8550 interconnect provider driver")
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Link: https://lore.kernel.org/r/20230105002221.1416479-4-dmitry.baryshkov@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org >
2023-03-06 16:48:38 +02:00
Dmitry Baryshkov
87e8fab191
interconnect: qcom: sm8450: switch to qcom_icc_rpmh_* function
...
Change sm8450 interconnect driver to use generic qcom_icc_rpmh_*
functions rather than embedding a copy of thema. This also fixes an
overallocation of memory for icc_onecell_data structure.
Fixes: fafc114a46 ("interconnect: qcom: Add SM8450 interconnect provider driver")
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Link: https://lore.kernel.org/r/20230105002221.1416479-3-dmitry.baryshkov@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org >
2023-03-06 16:48:32 +02:00
Dmitry Baryshkov
f77ebdda0e
interconnect: qcom: osm-l3: fix icc_onecell_data allocation
...
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.
Fortunately this overallocates memory rather then allocating less memory
than required.
Fix by replacing devm_kcalloc() with devm_kzalloc() and struct_size()
macro.
Fixes: 5bc9900add ("interconnect: qcom: Add OSM L3 interconnect provider support")
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Link: https://lore.kernel.org/r/20230105002221.1416479-2-dmitry.baryshkov@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org >
2023-03-06 16:48:23 +02:00
Greg Kroah-Hartman
3b65010018
Merge tag 'icc-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/djakov/icc into char-misc-next
...
Georgi writes:
interconnect changes for 6.3
Here are the interconnect changes for the 6.3-rc1 merge window with the
significant part being new drivers.
Driver changes:
- New driver for Qualcomm SM8550
- New driver for Qualcomm QDU1000/QRU1000
- New driver for Qualcomm SDM670
- New driver for Qualcomm SA8775P
- Drop the IP0 interconnects and migrate them to RPMh clocks instead
- Misc improvements in the DT schema for some existing drivers
Signed-off-by: Georgi Djakov <djakov@kernel.org >
* tag 'icc-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/djakov/icc: (25 commits)
dt-bindings: interconnect: samsung,exynos-bus: allow opp-table
dt-bindings: interconnect: qcom,sa8775p-rpmh: fix a typo
dt-bindings: interconnect: Exclude all non msm8939 from snoc-mm
interconnect: qcom: add a driver for sa8775p
dt-bindings: interconnect: qcom: document the interconnects for sa8775p
interconnect: qcom: add sdm670 interconnects
dt-bindings: interconnect: add sdm670 interconnects
dt-bindings: interconnect: OSM L3: Add SM6350 OSM L3 compatible
dt-bindings: interconnect: qcom-bwmon: document SM8550 compatibles
dt-bindings: interconnect: split SM8450 to own schema
dt-bindings: interconnect: split SC8280XP to own schema
dt-bindings: interconnect: split SC7280 to own schema
dt-bindings: interconnect: qcom: drop IPA_CORE related defines
dt-bindings: interconnect: qcom: Remove ipa-virt compatibles
interconnect: qcom: sc8280xp: Drop IP0 interconnects
interconnect: qcom: sc8180x: Drop IP0 interconnects
interconnect: qcom: sm8250: Drop IP0 interconnects
interconnect: qcom: sm8150: Drop IP0 interconnects
interconnect: move ignore_list out of of_count_icc_providers()
interconnect: qcom: sc7180: drop IP0 remnants
...
2023-02-06 19:00:54 +01:00
Georgi Djakov
b1f5e7ff0c
Merge branch 'icc-sa8775p' into icc-next
...
* icc-sa8775p
dt-bindings: interconnect: qcom: document the interconnects for sa8775p
interconnect: qcom: add a driver for sa8775p
dt-bindings: interconnect: qcom,sa8775p-rpmh: fix a typo
Link: https://lore.kernel.org/r/20230118140825.242544-2-brgl@bgdev.pl
Signed-off-by: Georgi Djakov <djakov@kernel.org >
2023-02-06 15:39:41 +02:00
Georgi Djakov
b9544fb577
Merge branch 'icc-sdm670' into icc-next
...
* icc-sdm670
dt-bindings: interconnect: add sdm670 interconnects
interconnect: qcom: add sdm670 interconnects
Link: https://lore.kernel.org/r/20230111005155.50452-1-mailingradian@gmail.com
Signed-off-by: Georgi Djakov <djakov@kernel.org >
2023-02-06 15:39:15 +02:00
Georgi Djakov
863ed40ea9
Merge branch 'icc-ip0-migration' into icc-next
...
Commits 2f3724930e ("interconnect: qcom: sc7180: Drop IP0
interconnects") and 2fb251c265 ("interconnect: qcom: sdx55: Drop IP0
interconnects") removed IP0 interconnects (and ipa-virt devices support)
in favour of the RPMH clocks. Follow this example for other platforms
defining IP0 RPMH resource. While we are at it, remove several leftover
from the mentioned patches.
* icc-ip0-migration:
interconnect: qcom: sdx55: drop IP0 remnants
interconnect: qcom: sc7180: drop IP0 remnants
interconnect: move ignore_list out of of_count_icc_providers()
interconnect: qcom: sm8150: Drop IP0 interconnects
interconnect: qcom: sm8250: Drop IP0 interconnects
interconnect: qcom: sc8180x: Drop IP0 interconnects
interconnect: qcom: sc8280xp: Drop IP0 interconnects
dt-bindings: interconnect: qcom: Remove ipa-virt compatibles
dt-bindings: interconnect: qcom: drop IPA_CORE related defines
Link: https://lore.kernel.org/r/20230109002935.244320-1-dmitry.baryshkov@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org >
2023-02-06 15:38:22 +02:00
Shazad Hussain
3655a63f96
interconnect: qcom: add a driver for sa8775p
...
Introduce QTI SA8775P-specific interconnect driver.
Signed-off-by: Shazad Hussain <quic_shazhuss@quicinc.com >
[Bartosz: made the driver ready for upstream]
Co-developed-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org >
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org >
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org >
Link: https://lore.kernel.org/r/20230118140825.242544-1-brgl@bgdev.pl
Signed-off-by: Georgi Djakov <djakov@kernel.org >
2023-01-19 20:23:00 +02:00
Richard Acayan
7e438e1887
interconnect: qcom: add sdm670 interconnects
...
The interconnects for Snapdragon 670 can be controlled via RPMh. Add
driver support for this.
This driver was generated by the linux-interconnect-driver-generator and
the virtual NoC's were merged with their parents.
Link: https://git.sr.ht/~z3ntu/linux-interconnect-driver-generator
Signed-off-by: Richard Acayan <mailingradian@gmail.com >
Link: https://lore.kernel.org/r/20230111005155.50452-3-mailingradian@gmail.com
Signed-off-by: Georgi Djakov <djakov@kernel.org >
2023-01-19 20:12:47 +02:00
Dmitry Baryshkov
b136d257ee
interconnect: qcom: sc8280xp: Drop IP0 interconnects
...
Similar to the sdx55 and sc7180, let's drop the MASTER_IPA_CORE and
SLAVE_IPA_CORE interconnects for this platform. There are no actual users
of this interconnect. The IP0 resource will be handled by clk-rpmh
driver.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Link: https://lore.kernel.org/r/20230109002935.244320-8-dmitry.baryshkov@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org >
2023-01-18 16:15:03 +02:00
Dmitry Baryshkov
c4801e2441
interconnect: qcom: sc8180x: Drop IP0 interconnects
...
Similar to the sdx55 and sc7180, let's drop the MASTER_IPA_CORE and
SLAVE_IPA_CORE interconnects for this platofm. There are no actual users
of this intercoonect. The IP0 resource will be handled by clk-rpmh
driver.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org >
Link: https://lore.kernel.org/r/20230109002935.244320-7-dmitry.baryshkov@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org >
2023-01-18 16:14:33 +02:00
Dmitry Baryshkov
10d13cb595
interconnect: qcom: sm8250: Drop IP0 interconnects
...
Similar to the sdx55 and sc7180, let's drop the MASTER_IPA_CORE and
SLAVE_IPA_CORE interconnects for this platform. There are no actual users
of this interconnect. The IP0 resource will be handled by clk-rpmh
driver.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org >
Link: https://lore.kernel.org/r/20230109002935.244320-6-dmitry.baryshkov@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org >
2023-01-18 16:14:13 +02:00
Dmitry Baryshkov
a532439199
interconnect: qcom: sm8150: Drop IP0 interconnects
...
Similar to the sdx55 and sc7180, let's drop the MASTER_IPA_CORE and
SLAVE_IPA_CORE interconnects for this platform. There are no actual users
of this interconnect. The IP0 resource will be handled by clk-rpmh
driver.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org >
Link: https://lore.kernel.org/r/20230109002935.244320-5-dmitry.baryshkov@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org >
2023-01-18 16:12:54 +02:00
Dmitry Baryshkov
88387e21d2
interconnect: move ignore_list out of of_count_icc_providers()
...
Move the const ignore_list definition out of the
of_count_icc_providers() function. This prevents the following stack
frame size warnings if the list is expanded:
drivers/interconnect/core.c:1082:12: warning: stack frame size (1216) exceeds limit (1024) in 'of_count_icc_providers' [-Wframe-larger-than]
Reported-by: kernel test robot <lkp@intel.com >
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org >
Link: https://lore.kernel.org/r/20230109002935.244320-4-dmitry.baryshkov@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org >
2023-01-18 16:12:32 +02:00
Dmitry Baryshkov
1c0c93d04e
interconnect: qcom: sc7180: drop IP0 remnants
...
Drop two defines leftover from the commit 2f3724930e ("interconnect:
qcom: sc7180: Drop IP0 interconnects"), which dropped handling of the
IP0 resource in favour of handling it in the clk-rpmh driver.
Fixes: 2f3724930e ("interconnect: qcom: sc7180: Drop IP0 interconnects")
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org >
Link: https://lore.kernel.org/r/20230109002935.244320-3-dmitry.baryshkov@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org >
2023-01-18 16:12:17 +02:00
Dmitry Baryshkov
7d6d7bfd4c
interconnect: qcom: sdx55: drop IP0 remnants
...
Drop two defines leftover from the commit 2fb251c265 ("interconnect:
qcom: sdx55: Drop IP0 interconnects"), which dropped handling of the IP0
resource in favour of handling it in the clk-rpmh driver.
Fixes: 2fb251c265 ("interconnect: qcom: sdx55: Drop IP0 interconnects")
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org >
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org >
Link: https://lore.kernel.org/r/20230109002935.244320-2-dmitry.baryshkov@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org >
2023-01-18 16:11:52 +02:00
Konrad Dybcio
dd42ec8ea5
interconnect: qcom: rpm: Use _optional func for provider clocks
...
It turned out that - very unfortunately - msm8996 needs a binding
update, adding 2 more clocks to the A2NoC node. Use the _optional
variant of devm_clk_get to make sure old DTs will still probe with
newer versions of the driver.
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Tested-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org > #db820c
Link: https://lore.kernel.org/r/20221210200353.418391-5-konrad.dybcio@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org >
2023-01-05 17:29:57 +02:00
Konrad Dybcio
4be39d5d86
interconnect: qcom: msm8996: Fix regmap max_register values
...
The device tree reg starts at BUS_BASE + QoS_OFFSET, but the regmap
configs in the ICC driver had values suggesting the reg started at
BUS_BASE. Shrink them down (where they haven't been already, so for
providers where QoS_OFFSET = 0) to make sure they stay within their
window.
Fixes: 7add937f52 ("interconnect: qcom: Add MSM8996 interconnect provider driver")
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Tested-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org > #db820c
Link: https://lore.kernel.org/r/20221210200353.418391-4-konrad.dybcio@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org >
2023-01-05 17:29:50 +02:00
Konrad Dybcio
60426ff08a
interconnect: qcom: msm8996: Provide UFS clocks to A2NoC
...
On eMMC devices the bootloader has no business enabling UFS clocks.
That results in a platform hang and hard reboot when trying to vote
on paths including MASTER_UFS and since sync_state guarantees that
it's done at boot time, this effectively prevents such devices from
booting. Fix that.
Fixes: 7add937f52 ("interconnect: qcom: Add MSM8996 interconnect provider driver")
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Tested-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org > #db820c
Link: https://lore.kernel.org/r/20221210200353.418391-3-konrad.dybcio@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org >
2023-01-05 17:29:40 +02:00
Georgi Djakov
163ea2048d
Merge branch 'icc-qdu1000' into icc-next
...
Add dt bindings and driver support for the Qualcomm QDU1000 and QRU1000
SoCs.
The Qualcomm Technologies, Inc. Distributed Unit 1000 and Radio Unit
1000 are new SoCs meant for enabling Open RAN solutions. See more at
https://www.qualcomm.com/content/dam/qcomm-martech/dm-assets/documents/qualcomm_5g_ran_platforms_product_brief.pdf
Link: https://lore.kernel.org/r/20221216230914.21771-1-quic_molvera@quicinc.com
Signed-off-by: Georgi Djakov <djakov@kernel.org >
2023-01-05 16:17:08 +02:00
Melody Olvera
1f51339f7d
interconnect: qcom: Add QDU1000/QRU1000 interconnect driver
...
Add interconnect provider driver for Qualcomm QDU1000 and QRU1000
platforms.
Signed-off-by: Melody Olvera <quic_molvera@quicinc.com >
Link: https://lore.kernel.org/r/20221216230914.21771-3-quic_molvera@quicinc.com
Signed-off-by: Georgi Djakov <djakov@kernel.org >
2023-01-05 16:16:49 +02:00
Abel Vesa
e6f0d6a30f
interconnect: qcom: Add SM8550 interconnect provider driver
...
Add driver for the Qualcomm interconnect buses found in SM8550 based
platforms. The topology consists of several NoCs that are controlled by
a remote processor that collects the aggregated bandwidth for each
master-slave pairs.
Signed-off-by: Abel Vesa <abel.vesa@linaro.org >
Link: https://lore.kernel.org/r/20221202232054.2666830-3-abel.vesa@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org >
2022-12-29 11:36:33 +02:00
Georgi Djakov
26e90ec7a8
Merge branch 'icc-sc8280xp-l3' into icc-next
...
The SC8280XP currently shows depressing results in memory benchmarks.
Fix this by introducing support for the platform in the OSM (and EPSS)
L3 driver and support for the platform in the bwmon binding.
Link: https://lore.kernel.org/r/20221111032515.3460-1-quic_bjorande@quicinc.com
Signed-off-by: Georgi Djakov <djakov@kernel.org >
2022-11-17 17:44:14 +02:00
Krzysztof Kozlowski
c1c537cf30
interconnect: qcom: sc8180x: constify pointer to qcom_icc_node
...
Pointers to struct qcom_icc_node are const.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org >
Link: https://lore.kernel.org/r/20221027154848.293523-3-krzysztof.kozlowski@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org >
2022-11-17 17:39:50 +02:00
Krzysztof Kozlowski
7870c7076a
interconnect: qcom: sc7180: drop double space
...
Drop double white-space.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org >
Link: https://lore.kernel.org/r/20221027154848.293523-2-krzysztof.kozlowski@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org >
2022-11-17 17:39:49 +02:00
Krzysztof Kozlowski
f24227a640
interconnect: qcom: sc7180: fix dropped const of qcom_icc_bcm
...
Pointers to struct qcom_icc_bcm are const, but the change was dropped
during merge.
Fixes: 016fca59f9 ("Merge branch 'icc-const' into icc-next")
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org >
Link: https://lore.kernel.org/r/20221027154848.293523-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org >
2022-11-17 17:39:49 +02:00
Shang XiaoJing
c423f01633
interconnect: qcom: icc-rpm: Remove redundant dev_err call
...
devm_ioremap_resource() prints error message in itself. Remove the
dev_err call to avoid redundant error message.
Signed-off-by: Shang XiaoJing <shangxiaojing@huawei.com >
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org >
Link: https://lore.kernel.org/r/20220924015043.25130-1-shangxiaojing@huawei.com
Signed-off-by: Georgi Djakov <djakov@kernel.org >
2022-11-17 17:39:49 +02:00
Bjorn Andersson
b6bcef163a
interconnect: qcom: osm-l3: Simplify osm_l3_set()
...
The aggregation over votes for all nodes in the provider will always
only find the bandwidth votes for the destination side of the path.
Further more, the average kBps value will always be 0.
Simplify the logic by directly looking at the destination node's peak
bandwidth request.
Signed-off-by: Bjorn Andersson <quic_bjorande@quicinc.com >
Tested-by: Steev Klimaszewski <steev@kali.org >
Reviewed-by: Sibi Sankar <quic_sibis@quicinc.com >
Link: https://lore.kernel.org/r/20221111032515.3460-5-quic_bjorande@quicinc.com
Signed-off-by: Georgi Djakov <djakov@kernel.org >
2022-11-14 15:05:30 +02:00
Bjorn Andersson
9235253ec7
interconnect: qcom: osm-l3: Add per-core EPSS L3 support
...
The EPSS instance in e.g. SM8350 and SC8280XP has per-core L3 voting
enabled. In this configuration, the "shared" vote is done using the
REG_L3_VOTE register instead of PERF_STATE.
Rename epss_l3 to clarify that it's affecting the PERF_STATE register
and add a new L3_VOTE description. Given platform lineage it's assumed
that the L3_VOTE-based case will be the predominant one, so use this for
a new generic qcom,epss-l3 compatible.
While adding the EPSS generic, also add qcom,osm-l3.
Signed-off-by: Bjorn Andersson <quic_bjorande@quicinc.com >
Tested-by: Steev Klimaszewski <steev@kali.org >
Reviewed-by: Sibi Sankar <quic_sibis@quicinc.com >
Link: https://lore.kernel.org/r/20221111032515.3460-4-quic_bjorande@quicinc.com
Signed-off-by: Georgi Djakov <djakov@kernel.org >
2022-11-14 15:05:30 +02:00