Commit Graph

456 Commits

Author SHA1 Message Date
Linus Torvalds
acc5965b9f Char/Misc and other driver changes for 6.11-rc1
Here is the "big" set of char/misc and other driver subsystem changes
 for 6.11-rc1.  Nothing major in here, just loads of new drivers and
 updates.  Included in here are:
   - IIO api updates and new drivers added
   - wait_interruptable_timeout() api cleanups for some drivers
   - MODULE_DESCRIPTION() additions for loads of drivers
   - parport out-of-bounds fix
   - interconnect driver updates and additions
   - mhi driver updates and additions
   - w1 driver fixes
   - binder speedups and fixes
   - eeprom driver updates
   - coresight driver updates
   - counter driver update
   - new misc driver additions
   - other minor api updates
 
 All of these, EXCEPT for the final Kconfig build fix for 32bit systems,
 have been in linux-next for a while with no reported issues.  The
 Kconfig fixup went in 29 hours ago, so might have missed the latest
 linux-next, but was acked by everyone involved.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 
 iG0EABECAC0WIQT0tgzFv3jCIUoxPcsxR9QN2y37KQUCZppR4w8cZ3JlZ0Brcm9h
 aC5jb20ACgkQMUfUDdst+ykwoQCeIaW3nbOiNTmOupvEnZwrN3yVNs8An3Q5L+Br
 1LpTASaU6A8pN81Z1m5g
 =6U1z
 -----END PGP SIGNATURE-----

Merge tag 'char-misc-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc

Pull char / misc and other driver updates from Greg KH:
 "Here is the "big" set of char/misc and other driver subsystem changes
  for 6.11-rc1. Nothing major in here, just loads of new drivers and
  updates. Included in here are:

   - IIO api updates and new drivers added

   - wait_interruptable_timeout() api cleanups for some drivers

   - MODULE_DESCRIPTION() additions for loads of drivers

   - parport out-of-bounds fix

   - interconnect driver updates and additions

   - mhi driver updates and additions

   - w1 driver fixes

   - binder speedups and fixes

   - eeprom driver updates

   - coresight driver updates

   - counter driver update

   - new misc driver additions

   - other minor api updates

  All of these, EXCEPT for the final Kconfig build fix for 32bit
  systems, have been in linux-next for a while with no reported issues.
  The Kconfig fixup went in 29 hours ago, so might have missed the
  latest linux-next, but was acked by everyone involved"

* tag 'char-misc-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (330 commits)
  misc: Kconfig: exclude mrvl-cn10k-dpi compilation for 32-bit systems
  misc: delete Makefile.rej
  binder: fix hang of unregistered readers
  misc: Kconfig: add a new dependency for MARVELL_CN10K_DPI
  virtio: add missing MODULE_DESCRIPTION() macro
  agp: uninorth: add missing MODULE_DESCRIPTION() macro
  spmi: add missing MODULE_DESCRIPTION() macros
  dev/parport: fix the array out-of-bounds risk
  samples: configfs: add missing MODULE_DESCRIPTION() macro
  misc: mrvl-cn10k-dpi: add Octeon CN10K DPI administrative driver
  misc: keba: Fix missing AUXILIARY_BUS dependency
  slimbus: Fix struct and documentation alignment in stream.c
  MAINTAINERS: CC dri-devel list on Qualcomm FastRPC patches
  misc: fastrpc: use coherent pool for untranslated Compute Banks
  misc: fastrpc: support complete DMA pool access to the DSP
  misc: fastrpc: add missing MODULE_DESCRIPTION() macro
  misc: fastrpc: Add missing dev_err newlines
  misc: fastrpc: Use memdup_user()
  nvmem: core: Implement force_ro sysfs attribute
  nvmem: Use sysfs_emit() for type attribute
  ...
2024-07-19 15:55:08 -07:00
Varadarajan Narayanan
d315311361 interconnect: icc-clk: Add devm_icc_clk_register
Wrap icc_clk_register to create devm_icc_clk_register to be
able to release the resources properly.

Acked-by: Georgi Djakov <djakov@kernel.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Varadarajan Narayanan <quic_varada@quicinc.com>
Link: https://lore.kernel.org/r/20240430064214.2030013-4-quic_varada@quicinc.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
2024-07-08 11:40:57 -05:00
Varadarajan Narayanan
f45b94ffc5 interconnect: icc-clk: Specify master/slave ids
Presently, icc-clk driver autogenerates the master and slave ids.
However, devices with multiple nodes on the interconnect could
have other constraints and may not match with the auto generated
node ids.

Hence, modify the driver to use the master/slave ids provided by
the caller instead of auto generating.

Also, update clk-cbf-8996 accordingly.

Acked-by: Georgi Djakov <djakov@kernel.org>
Signed-off-by: Varadarajan Narayanan <quic_varada@quicinc.com>
Link: https://lore.kernel.org/r/20240430064214.2030013-2-quic_varada@quicinc.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
2024-07-08 11:40:57 -05:00
Georgi Djakov
226e58b209 Merge branch 'icc-rpmh-qos' into icc-next
This series adds QoS support for QNOC type device which can be found on
SC7280 platform. It adds support for programming priority,
priority forward disable and urgency forwarding. This helps in
priortizing the traffic originating from different interconnect masters
at NOC (Network On Chip).

* icc-rpmh-qos
  dt-bindings: interconnect: add clock property to enable QOS on SC7280
  interconnect: qcom: icc-rpmh: Add QoS configuration support
  interconnect: qcom: sc7280: enable QoS configuration
  interconnect: qcom: Fix DT backwards compatibility for QoS

Link: https://lore.kernel.org/r/20240607173927.26321-1-quic_okukatla@quicinc.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2024-07-04 22:45:20 +03:00
Odelu Kukatla
8b6bd8391f interconnect: qcom: Fix DT backwards compatibility for QoS
Add qos_clks_required flag to skip QoS configuration if clocks property
is not populated in devicetree for providers which require clocks to be
enabled for accessing registers. This is to keep the QoS configuration
backwards compatible with devices that have older DTB.

Reported-by: Bjorn Andersson <andersson@kernel.org>
Closes: https://lore.kernel.org/all/ciji6nlxn752ina4tmh6kwvek52nxpnguomqek6plwvwgvoqef@yrtexkpmn5br/
Signed-off-by: Odelu Kukatla <quic_okukatla@quicinc.com>
Tested-by: Bjorn Andersson <andersson@kernel.org>
Fixes: fbd908bb8b ("interconnect: qcom: sc7280: enable QoS configuration")
Link: https://lore.kernel.org/r/20240704125515.22194-1-quic_okukatla@quicinc.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2024-07-04 22:43:59 +03:00
Georgi Djakov
19990ff048 Merge branch 'icc-msm8953' into icc-next
Add interconnect driver for MSM8953-based devices.

* icc-msm8953
  dt-bindings: interconnect: qcom: Add Qualcomm MSM8953 NoC
  interconnect: qcom: Add MSM8953 driver

Link: https://lore.kernel.org/r/20240628-msm8953-interconnect-v3-0-a70d582182dc@mainlining.org
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2024-07-04 22:41:12 +03:00
Georgi Djakov
f61207ad09 Merge branch 'icc-fixes' into icc-next
* icc-fixes
  interconnect: qcom: qcm2290: Fix mas_snoc_bimc RPM master ID

Signed-off-by: Georgi Djakov <djakov@kernel.org>
2024-07-04 22:40:33 +03:00
Vladimir Lypak
90b400170b interconnect: qcom: Add MSM8953 driver
Add driver for interconnect busses found in MSM8953 based platforms.
The topology consists of four NoCs that are partially controlled by a
RPM processor.

Note that one of NoCs (System NoC) has a counterpart (System NoC MM)
that is modelled as child device to avoid resource conflicts, since it
uses same MMIO space for configuration.

Signed-off-by: Vladimir Lypak <vladimir.lypak@gmail.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Barnabás Czémán <barnabas.czeman@mainlining.org>
Link: https://lore.kernel.org/r/20240628-msm8953-interconnect-v3-2-a70d582182dc@mainlining.org
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2024-06-28 21:11:25 +03:00
Konrad Dybcio
cd5ce45890 interconnect: qcom: qcm2290: Fix mas_snoc_bimc RPM master ID
The value was wrong, resulting in misprogramming of the hardware.
Fix it.

Fixes: 1a14b1ac39 ("interconnect: qcom: Add QCM2290 driver support")
Reported-by: Stephan Gerhold <stephan@gerhold.net>
Closes: https://lore.kernel.org/linux-arm-msm/ZgMs_xZVzWH5uK-v@gerhold.net/
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Link: https://lore.kernel.org/r/20240618-topic-2290_icc_2-v1-1-64446888a133@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2024-06-24 15:51:04 +03:00
Odelu Kukatla
fbd908bb8b interconnect: qcom: sc7280: enable QoS configuration
Enable QoS configuration for master ports with predefined values
for priority and urgency forawrding.

Signed-off-by: Odelu Kukatla <quic_okukatla@quicinc.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Link: https://lore.kernel.org/r/20240607173927.26321-3-quic_okukatla@quicinc.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2024-06-24 15:20:27 +03:00
Odelu Kukatla
0a7be6b35d interconnect: qcom: icc-rpmh: Add QoS configuration support
Add QoS support for QNOC device for configuring priority,
priority forward disable and urgency forwarding. QoS is required
to prioritize the traffic originating from different interconnect
masters at NoC (Network On Chip).

Signed-off-by: Odelu Kukatla <quic_okukatla@quicinc.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Link: https://lore.kernel.org/r/20240607173927.26321-2-quic_okukatla@quicinc.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2024-06-24 15:20:27 +03:00
Georgi Djakov
de0818e945 Merge branch 'icc-mtk' into icc-next
MediaTek DVFSRC Bus Bandwidth and Regulator knobs

This series adds support for the MediaTek Dynamic Voltage and Frequency
Scaling Resource Controller (DVFSRC), found on many MediaTek SoCs.

This hardware collects requests from both software and the various remote
processors embededd into the SoC, and decides about a minimum operating
voltage and a minimum DRAM frequency to fulfill those requests, in an
effort to provide the best achievable performance per watt.

Such hardware IP is capable of transparently performing direct register
R/W on all of the DVFSRC-controlled regulators and SoC bandwidth knobs.

Summarizing how the DVFSRC works for Interconnect:

             ICC provider         ICC Nodes
                              ----          ----
             _________       |CPU |   |--- |VPU |
    _____   |         |-----  ----    |     ----
   |     |->|  DRAM   |       ----    |     ----
   |DRAM |->|scheduler|----- |GPU |   |--- |DISP|
   |     |->|  (EMI)  |       ----    |     ----
   |_____|->|_________|---.   -----   |     ----
               /|\         `-|MMSYS|--|--- |VDEC|
                |             -----   |     ----
                |                     |     ----
                | change DRAM freq    |--- |VENC|
             --------                 |     ----
    SMC --> | DVFSRC |                |     ----
             --------                 |--- |IMG |
                                      |     ----
                                      |     ----
                                      |--- |CAM |
                                            ----

* icc-mtk
  dt-bindings: interconnect: Add MediaTek EMI Interconnect bindings
  interconnect: mediatek: Add MediaTek MT8183/8195 EMI Interconnect driver
  interconnect: mediatek: remove unneeded semicolon

Link: https://lore.kernel.org/r/20240610085735.147134-1-angelogioacchino.delregno@collabora.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2024-06-24 15:08:28 +03:00
Jiapeng Chong
9265ea04a7 interconnect: mediatek: remove unneeded semicolon
No functional modification involved.

./drivers/interconnect/mediatek/icc-emi.c:71:2-3: Unneeded semicolon.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=9401
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Link: https://lore.kernel.org/r/20240624025326.69551-1-jiapeng.chong@linux.alibaba.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2024-06-24 15:07:25 +03:00
Jeff Johnson
b14aa62c83 interconnect: qcom: add missing MODULE_DESCRIPTION() macros
With ARCH=arm64, make allmodconfig && make W=1 C=1 reports:
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/interconnect/qcom/interconnect_qcom.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/interconnect/qcom/icc-rpmh.o

Add the missing invocations of the MODULE_DESCRIPTION() macro.

Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Link: https://lore.kernel.org/r/20240612-md-drivers-interconnect-qcom-v1-1-da0462d6301b@quicinc.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2024-06-13 16:12:26 +03:00
Jeff Johnson
c136ef2315 interconnect: imx: add missing MODULE_DESCRIPTION() macros
make allmodconfig && make W=1 C=1 reports:
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/interconnect/imx/imx-interconnect.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/interconnect/imx/imx8mm-interconnect.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/interconnect/imx/imx8mq-interconnect.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/interconnect/imx/imx8mn-interconnect.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/interconnect/imx/imx8mp-interconnect.o

Add the missing invocations of the MODULE_DESCRIPTION() macro.

Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Link: https://lore.kernel.org/r/20240603-md-interconnect-imx-v1-1-348a9205506c@quicinc.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2024-06-13 16:12:10 +03:00
AngeloGioacchino Del Regno
b45293799f interconnect: mediatek: Add MediaTek MT8183/8195 EMI Interconnect driver
Add an interconnect driver for the External Memory Interface (EMI),
voting for bus bandwidth over the Dynamic Voltage and Frequency Scaling
Resource Collector (DVFSRC).

             ICC provider         ICC Nodes
                              ----          ----
             ---------       |CPU |   |--- |VPU |
    -----   |         |-----  ----    |     ----
   |DRAM |--|DRAM     |       ----    |     ----
   |     |--|scheduler|----- |GPU |   |--- |DISP|
   |     |--|(EMI)    |       ----    |     ----
   |     |--|         |       -----   |     ----
    -----   |         |----- |MMSYS|--|--- |VDEC|
             ---------        -----   |     ----
               /|\                    |     ----
                |change DRAM freq     |--- |VENC|
             ----------               |     ----
            |  DVFSR   |              |
            |          |              |     ----
             ----------               |--- |IMG |
                                      |     ----
                                      |     ----
                                      |--- |CAM |
                                            ----

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20240610085735.147134-8-angelogioacchino.delregno@collabora.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2024-06-13 14:31:43 +03:00
Steven Rostedt (Google)
2c92ca849f tracing/treewide: Remove second parameter of __assign_str()
With the rework of how the __string() handles dynamic strings where it
saves off the source string in field in the helper structure[1], the
assignment of that value to the trace event field is stored in the helper
value and does not need to be passed in again.

This means that with:

  __string(field, mystring)

Which use to be assigned with __assign_str(field, mystring), no longer
needs the second parameter and it is unused. With this, __assign_str()
will now only get a single parameter.

There's over 700 users of __assign_str() and because coccinelle does not
handle the TRACE_EVENT() macro I ended up using the following sed script:

  git grep -l __assign_str | while read a ; do
      sed -e 's/\(__assign_str([^,]*[^ ,]\) *,[^;]*/\1)/' $a > /tmp/test-file;
      mv /tmp/test-file $a;
  done

I then searched for __assign_str() that did not end with ';' as those
were multi line assignments that the sed script above would fail to catch.

Note, the same updates will need to be done for:

  __assign_str_len()
  __assign_rel_str()
  __assign_rel_str_len()

I tested this with both an allmodconfig and an allyesconfig (build only for both).

[1] https://lore.kernel.org/linux-trace-kernel/20240222211442.634192653@goodmis.org/

Link: https://lore.kernel.org/linux-trace-kernel/20240516133454.681ba6a0@rorschach.local.home

Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Julia Lawall <Julia.Lawall@inria.fr>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Acked-by: Jani Nikula <jani.nikula@intel.com>
Acked-by: Christian König <christian.koenig@amd.com> for the amdgpu parts.
Acked-by: Thomas Hellström <thomas.hellstrom@linux.intel.com> #for
Acked-by: Rafael J. Wysocki <rafael@kernel.org> # for thermal
Acked-by: Takashi Iwai <tiwai@suse.de>
Acked-by: Darrick J. Wong <djwong@kernel.org>	# xfs
Tested-by: Guenter Roeck <linux@roeck-us.net>
2024-05-22 20:14:47 -04:00
Greg Kroah-Hartman
eacdd8e36d interconnect changes for 6.10
This pull request contains the interconnect changes for the 6.10-rc1 merge
 window. It contains some small driver changes listed below:
 
 Driver changes:
 - Cleanup sm6115 QoS port numbering.
 - Fix incorrect port value in qcm2290 driver.
 
 Signed-off-by: Georgi Djakov <djakov@kernel.org>
 -----BEGIN PGP SIGNATURE-----
 
 iQIcBAABAgAGBQJmNK6fAAoJEIDQzArG2BZjYtQP/3SjjMcXKV0eDjrH1AKwbg+c
 B3ePdDExkKa5sDi2X4a2TEz/cQD8pVb8BhtI7SR4uqbsYGHHAAqeXvPz2fw6am0z
 XVAMFZ6CkQIBDAIxJ0rPjc3LJ8GxXjipFnI0L5hLFRjNmGV9r7TS3Q7m/1OrTLHm
 YP6sS5LvPm0nfJfaELI+WPdO3mTol48owV5CDkkFwMWMB3E9kf/hTaBcP+q9h+5b
 Kr92jH4jq5cwp57mfIUXZlohK0S8owJutk3aCB1uC7eun9HFKvb1ejKl4GXowbPi
 SUC5FZwA/GThvMjVhbF2qcuzg6QGaR6HhnvAwHCmusXek1p7DwpHx/LUq7m6pv70
 YYHwoe9cepL/Oii1fuUmveW23fzHWXcryv1zucB5o4hqTDFxSUL5ctHTpFiULrYx
 kkRiNIwc6VusH6sJ2jYqG/L+TBnkEiiuQ/Pl2kmtwqlJ7n1JqbFq4XNHfknfnWIb
 35rqZ1jommQ1eR2Z6suCyOSCBOuC0YwNknVjshpGDzfn+6m5bNnQDYgi44TfYenA
 d3jSkxO3VixEIIYgnILoKxa2NepBhwGMJTcpFbvvaA9zeSHGoE4QSk4iA2cwV6Fp
 SM0Ovbw1fN22efyEcbCLlQbVLQ4CN2+w+lnjcTSI9CONlopo0hCjw/rMdkUVlX7a
 9jlmrMZEY0NwmrqyxEbo
 =UapV
 -----END PGP SIGNATURE-----

Merge tag 'icc-6.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/djakov/icc into char-misc-next

Georgi writes:

interconnect changes for 6.10

This pull request contains the interconnect changes for the 6.10-rc1 merge
window. It contains some small driver changes listed below:

Driver changes:
- Cleanup sm6115 QoS port numbering.
- Fix incorrect port value in qcm2290 driver.

Signed-off-by: Georgi Djakov <djakov@kernel.org>

* tag 'icc-6.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/djakov/icc:
  interconnect: qcom: qcm2290: Fix mas_snoc_bimc QoS port assignment
  interconnect: qcom: sm6115: Unspaghettify SNoC QoS port numbering
2024-05-04 09:47:38 +02:00
Konrad Dybcio
230d05b117 interconnect: qcom: qcm2290: Fix mas_snoc_bimc QoS port assignment
The value was wrong, resulting in misprogramming of the hardware.
Fix it.

Fixes: 1a14b1ac39 ("interconnect: qcom: Add QCM2290 driver support")
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Link: https://lore.kernel.org/r/20240326-topic-rpm_icc_qos_cleanup-v1-2-357e736792be@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2024-04-11 20:46:26 +03:00
Konrad Dybcio
2adc731188 interconnect: qcom: sm6115: Unspaghettify SNoC QoS port numbering
When I was creating this driver, my bright mind overlooked the existence
of desc->qos_offset and decided to make up for the difference it made by
adding 21 (0x15) to the port index on SNoC and its downstream buses.

Undo this mistake to make the indices actually mean something.

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20240326-topic-rpm_icc_qos_cleanup-v1-1-357e736792be@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2024-04-11 20:46:01 +03:00
Greg Kroah-Hartman
64fe9a8f9f interconnect fixes for v6.9-rc
Here are fixes for two reported issues. One of them is a fix for
 a driver that tries to access a non-existent resource which prints
 a warning message during boot. The other one is fixing a race
 condition in the core framework where one struct member has been
 left unprotected by mutex.
 
 - interconnect: qcom: x1e80100: Remove inexistent ACV_PERF BCM
 - interconnect: Don't access req_list while it's being manipulated
 
 Signed-off-by: Georgi Djakov <djakov@kernel.org>
 -----BEGIN PGP SIGNATURE-----
 
 iQIcBAABAgAGBQJmBWPGAAoJEIDQzArG2BZj5EIP/im57/L6BX3IfvoS+2y3xrxD
 p8AzJnFxuiqPH1azaN9jvqH0iMNfb6ysjYklweCRbxPG0PuODeZq44SLTRbl8eF7
 YR31G/AYTftM7AZcVRiJZ+CCqFruE4g91wVTKMhnmUKH8VhQDz0bwP7S94ym5Ps2
 CUsnXa7fjoFp/Qp/uxWvr+cLD3foKj6EdSNuDYuv+ClmDOU7lUZ3jE6khDe4FioS
 9KjRVaaEO+kBC8nMOFUk/JEyxKOPpD8GItqrppkeC917gAO/2D5FL7/uO4BsU10n
 4a2X+CEr44k4KN6BXpGh/lc3PRhFjEiNYUdTLJMBCytfNALhnO58LGfkWdENiBEn
 yPpXLalJOz9wgAENS06LI52rF0LyU8kS2/QO2k9oC7WvTW8uttaCgEzUeSyxq2CO
 FUAeA0+y9uYIg7l6Zotpcl4i5CAV4A1w3zloIAGpFolnZ/YiGb0xNNp7OXu8pb86
 Kgz16jiH+HecO8RMlHkT4r7SnSKOaDtOscF5SKP7/6afhWYa5K4c4ECQXlCaAndj
 m0h70+rCAQ8GP77GGMtQQgMaycFnr2G67kvalAe7DYuI9OVg8XZMBWLWVUpb5Hch
 Kdm4bIyjHWPz79df7JweErj64hZeXsY55ggwjho5SPCPcxyZvjSDGDo9h/0RB/lq
 Jyl1o3DyBb/0ZDdTJrTg
 =FkyX
 -----END PGP SIGNATURE-----

Merge tag 'icc-6.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/djakov/icc into char-work-linus

Georgi writes:

interconnect fixes for v6.9-rc

Here are fixes for two reported issues. One of them is a fix for
a driver that tries to access a non-existent resource which prints
a warning message during boot. The other one is fixing a race
condition in the core framework where one struct member has been
left unprotected by mutex.

- interconnect: qcom: x1e80100: Remove inexistent ACV_PERF BCM
- interconnect: Don't access req_list while it's being manipulated

Signed-off-by: Georgi Djakov <djakov@kernel.org>

* tag 'icc-6.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/djakov/icc:
  interconnect: Don't access req_list while it's being manipulated
  interconnect: qcom: x1e80100: Remove inexistent ACV_PERF BCM
2024-04-11 14:44:49 +02:00
Mike Tipton
de1bf25b6d interconnect: Don't access req_list while it's being manipulated
The icc_lock mutex was split into separate icc_lock and icc_bw_lock
mutexes in [1] to avoid lockdep splats. However, this didn't adequately
protect access to icc_node::req_list.

The icc_set_bw() function will eventually iterate over req_list while
only holding icc_bw_lock, but req_list can be modified while only
holding icc_lock. This causes races between icc_set_bw(), of_icc_get(),
and icc_put().

Example A:

  CPU0                               CPU1
  ----                               ----
  icc_set_bw(path_a)
    mutex_lock(&icc_bw_lock);
                                     icc_put(path_b)
                                       mutex_lock(&icc_lock);
    aggregate_requests()
      hlist_for_each_entry(r, ...
                                       hlist_del(...
        <r = invalid pointer>

Example B:

  CPU0                               CPU1
  ----                               ----
  icc_set_bw(path_a)
    mutex_lock(&icc_bw_lock);
                                     path_b = of_icc_get()
                                       of_icc_get_by_index()
                                         mutex_lock(&icc_lock);
                                         path_find()
                                           path_init()
    aggregate_requests()
      hlist_for_each_entry(r, ...
                                             hlist_add_head(...
        <r = invalid pointer>

Fix this by ensuring icc_bw_lock is always held before manipulating
icc_node::req_list. The additional places icc_bw_lock is held don't
perform any memory allocations, so we should still be safe from the
original lockdep splats that motivated the separate locks.

[1] commit af42269c35 ("interconnect: Fix locking for runpm vs reclaim")

Signed-off-by: Mike Tipton <quic_mdtipton@quicinc.com>
Fixes: af42269c35 ("interconnect: Fix locking for runpm vs reclaim")
Reviewed-by: Rob Clark <robdclark@chromium.org>
Link: https://lore.kernel.org/r/20240305225652.22872-1-quic_mdtipton@quicinc.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2024-03-14 13:51:44 +02:00
Konrad Dybcio
59097a2a5e interconnect: qcom: x1e80100: Remove inexistent ACV_PERF BCM
Booting the kernel on X1E results in a message like:

[    2.561524] qnoc-x1e80100 interconnect-0: ACV_PERF could not find RPMh address

And indeed, taking a look at cmd-db, no such BCM exists. Remove it.

Fixes: 9f19677284 ("interconnect: qcom: Add X1E80100 interconnect provider driver")
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Reviewed-by: Mike Tipton <quic_mdtipton@quicinc.com>
Link: https://lore.kernel.org/r/20240302-topic-faux_bcm_x1e-v1-1-c40fab7c4bc5@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2024-03-14 13:51:25 +02:00
Greg Kroah-Hartman
17bcddcd4a interconnect changes for 6.9
This pull request contains the interconnect changes for the 6.9-rc1 merge
 window. The highlights are below:
 
 Core changes:
 - Constify the of_phandle_args in xlate functions.
 
 Driver changes:
 - New interconnect driver for the MSM8909 platform.
 - New interconnect driver for the SM7150 platform.
 - Clean-up and removal of unused resources in drivers.
 - Constify some pointers to structs.
 
 Signed-off-by: Georgi Djakov <djakov@kernel.org>
 -----BEGIN PGP SIGNATURE-----
 
 iQIcBAABAgAGBQJl6G4mAAoJEIDQzArG2BZjOQUQAMFME5pN7vAPFIYRdQSseax0
 2Ncjr5LCWbXHd1mfKutSkx/aABu3t7ywYC0y0EUDkQoqNXBXw+awHCQLVH9K9Apr
 QbhU6a7H0ZKSRpRVx2ZAgz5EO/OMcq8rXnPtuSeG8QLjo52DBNUNFBwxKrNJiMV9
 cW6qzfP7KE8rznmpYbpOdS2Y6P/aAjH6RHBiMcBeCJBdXHzVYBuKwB3JGxYhqUrR
 jykPMWCsjT5PARaHHXfKbt6HXx1vZi5CJogcOJ6asGWoxOTTZpldO/CLk/zdTies
 wqOYIZ6c3TJs6k8qerHo+2Cn0ghRjKUyreEnzWlzrRrg6gzwRrny70VEPHY5Sy7D
 0m2QzTehhcZsN4X1bJ+96XFiYl6WW6NLsKy1Onbqo/trcwIGMip5ZR9Q6IF014Kp
 kdVGZFLE93HZuQMNp14hF2nFLS+L+JTllS2caO92ddJz7aPnDRlBYHROyD4iCC5a
 L8eoAFgBZQU6lLqeMrff5RBDVCV1s+roBHk6G2CzXcpDM8ZAAtnbwDYE4hX7CwxK
 nbTSagYyW8/tIXgCJZc2RyhpUKmLTi4ruNQY3TxjJHSnZIwlx1KIflqtp9iSSwd8
 JYSCxCS+rmnloARMK6rJM5jP7hcObLluPACsBxVnXsoCiwriZU4PbTFAnvOLEKtH
 Ianlhvr3v36OXcCOM90J
 =ZOoD
 -----END PGP SIGNATURE-----

Merge tag 'icc-6.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/djakov/icc into char-misc-next

Georgi writes:

interconnect changes for 6.9

This pull request contains the interconnect changes for the 6.9-rc1 merge
window. The highlights are below:

Core changes:
- Constify the of_phandle_args in xlate functions.

Driver changes:
- New interconnect driver for the MSM8909 platform.
- New interconnect driver for the SM7150 platform.
- Clean-up and removal of unused resources in drivers.
- Constify some pointers to structs.

Signed-off-by: Georgi Djakov <djakov@kernel.org>

* tag 'icc-6.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/djakov/icc:
  interconnect: qcom: Add SM7150 driver support
  dt-bindings: interconnect: Add Qualcomm SM7150 DT bindings
  interconnect: constify of_phandle_args in xlate
  dt-bindings: interconnect: qcom,rpmh: Fix bouncing @codeaurora address
  interconnect: qcom: x1e80100: constify pointer to qcom_icc_bcm
  interconnect: qcom: sa8775p: constify pointer to qcom_icc_bcm
  interconnect: qcom: sm6115: constify pointer to qcom_icc_node
  interconnect: qcom: sm8250: constify pointer to qcom_icc_node
  interconnect: qcom: sa8775p: constify pointer to qcom_icc_node
  interconnect: qcom: msm8909: constify pointer to qcom_icc_node
  interconnect: qcom: x1e80100: Remove bogus per-RSC BCMs and nodes
  dt-bindings: interconnect: Remove bogus interconnect nodes
  interconnect: qcom: sm8550: Remove bogus per-RSC BCMs and nodes
  interconnect: qcom: Add MSM8909 interconnect provider driver
  dt-bindings: interconnect: Add Qualcomm MSM8909 DT bindings
2024-03-06 14:03:31 +00:00
Georgi Djakov
d1c1649113 Merge branch 'icc-sm7150' into icc-next
Add dt-bindings and interconnect driver support for the Qualcomm SM7150 SoC.

* icc-sm7150
  dt-bindings: interconnect: Add Qualcomm SM7150 DT bindings
  interconnect: qcom: Add SM7150 driver support

Link: https://lore.kernel.org/r/20240222174250.80493-1-danila@jiaxyga.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2024-02-29 22:43:01 +02:00
Danila Tikhonov
4a1574cea0 interconnect: qcom: Add SM7150 driver support
Add a driver that handles the different NoCs found on SM7150, based on the
downstream dtb.

Signed-off-by: Danila Tikhonov <danila@jiaxyga.com>
Link: https://lore.kernel.org/r/20240222174250.80493-3-danila@jiaxyga.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2024-02-29 22:42:38 +02:00
Georgi Djakov
6025a81ae6 Merge branch 'icc-cleanup' into icc-next
* icc-cleanup
  interconnect: qcom: sm8550: Remove bogus per-RSC BCMs and nodes
  dt-bindings: interconnect: Remove bogus interconnect nodes
  interconnect: qcom: x1e80100: Remove bogus per-RSC BCMs and nodes
  interconnect: qcom: sa8775p: constify pointer to qcom_icc_node
  interconnect: qcom: sm8250: constify pointer to qcom_icc_node
  interconnect: qcom: sm6115: constify pointer to qcom_icc_node
  interconnect: qcom: sa8775p: constify pointer to qcom_icc_bcm
  interconnect: qcom: x1e80100: constify pointer to qcom_icc_bcm
  dt-bindings: interconnect: qcom,rpmh: Fix bouncing @codeaurora address
  interconnect: constify of_phandle_args in xlate

Signed-off-by: Georgi Djakov <djakov@kernel.org>
2024-02-26 00:42:03 +02:00
Krzysztof Kozlowski
0dc5b8abfa interconnect: constify of_phandle_args in xlate
The xlate callbacks are supposed to translate of_phandle_args to proper
provider without modifying the of_phandle_args.  Make the argument
pointer to const for code safety and readability.

Acked-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Acked-by: Thierry Reding <treding@nvidia.com> # Tegra
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Acked-by: Alim Akhtar <alim.akhtar@samsung.com> # Samsung
Link: https://lore.kernel.org/r/20240220072213.35779-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2024-02-26 00:38:17 +02:00
Krzysztof Kozlowski
a804adfb75 interconnect: qcom: x1e80100: constify pointer to qcom_icc_bcm
Pointers to struct qcom_icc_bcm are const.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Andrew Halaney <ahalaney@redhat.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Link: https://lore.kernel.org/r/20240208105056.128448-7-krzysztof.kozlowski@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2024-02-11 22:38:08 +02:00
Krzysztof Kozlowski
e6e1bf1359 interconnect: qcom: sa8775p: constify pointer to qcom_icc_bcm
Pointers to struct qcom_icc_bcm are const.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Andrew Halaney <ahalaney@redhat.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Link: https://lore.kernel.org/r/20240208105056.128448-6-krzysztof.kozlowski@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2024-02-11 22:38:06 +02:00
Krzysztof Kozlowski
57d6c77e02 interconnect: qcom: sm6115: constify pointer to qcom_icc_node
Pointers to struct qcom_icc_node are const.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Andrew Halaney <ahalaney@redhat.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Link: https://lore.kernel.org/r/20240208105056.128448-5-krzysztof.kozlowski@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2024-02-11 22:38:04 +02:00
Krzysztof Kozlowski
bf6c62fb80 interconnect: qcom: sm8250: constify pointer to qcom_icc_node
Pointers to struct qcom_icc_node are const.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Andrew Halaney <ahalaney@redhat.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Link: https://lore.kernel.org/r/20240208105056.128448-4-krzysztof.kozlowski@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2024-02-11 22:38:01 +02:00
Krzysztof Kozlowski
79144087d9 interconnect: qcom: sa8775p: constify pointer to qcom_icc_node
Pointers to struct qcom_icc_node are const.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Andrew Halaney <ahalaney@redhat.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Link: https://lore.kernel.org/r/20240208105056.128448-3-krzysztof.kozlowski@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2024-02-11 22:37:54 +02:00
Krzysztof Kozlowski
5f1b39718d interconnect: qcom: msm8909: constify pointer to qcom_icc_node
Pointers to struct qcom_icc_node are const.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Andrew Halaney <ahalaney@redhat.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Link: https://lore.kernel.org/r/20240208105056.128448-2-krzysztof.kozlowski@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2024-02-11 22:37:29 +02:00
Mike Tipton
5464e7acea interconnect: qcom: x1e80100: Add missing ACV enable_mask
The ACV BCM is voted using bitmasks. Add the proper mask for this
target.

Fixes: 9f19677284 ("interconnect: qcom: Add X1E80100 interconnect provider driver")
Signed-off-by: Mike Tipton <quic_mdtipton@quicinc.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Tested-by: Abel Vesa <abel.vesa@linaro.org>
Link: https://lore.kernel.org/r/20240202014806.7876-3-quic_mdtipton@quicinc.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2024-02-04 23:36:06 +02:00
Mike Tipton
a40f93e928 interconnect: qcom: sm8650: Use correct ACV enable_mask
The ACV enable_mask is historically BIT(3), but it's BIT(0) on this
target. Fix it.

Fixes: c062bcab59 ("interconnect: qcom: introduce RPMh Network-On-Chip Interconnect on SM8650 SoC")
Signed-off-by: Mike Tipton <quic_mdtipton@quicinc.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20240202014806.7876-2-quic_mdtipton@quicinc.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2024-02-04 23:35:50 +02:00
Konrad Dybcio
a3973318e7 interconnect: qcom: x1e80100: Remove bogus per-RSC BCMs and nodes
The downstream kernel has infrastructure for passing votes from different
interconnect nodes onto different RPMh RSCs. This neither implemented, not
is going to be implemented upstream (in favor of a different solution
using ICC tags through the same node).

Unfortunately, as it happens, meaningless (in the upstream context) parts
of the vendor driver were copied, ending up causing havoc - since all
"per-RSC" (in quotes because they all point to the main APPS one) BCMs
defined within the driver overwrite the value in RPMh on every
aggregation.

To both avoid keeping bogus code around and possibly introducing
impossible-to-track-down bugs (busses shutting down for no reason), get
rid of the duplicated BCMs and their associated ICC nodes.

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Reviewed-by: Rajendra Nayak <quic_rjendra@quicinc.com>
Link: https://lore.kernel.org/r/20240102-topic-x1e_fixes-v1-1-70723e08d5f6@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2024-01-31 15:48:32 +02:00
Konrad Dybcio
c32e00d909 interconnect: qcom: sm8550: Remove bogus per-RSC BCMs and nodes
The downstream kernel has infrastructure for passing votes from different
interconnect nodes onto different RPMh RSCs. This neither implemented, not
is going to be implemented upstream (in favor of a different solution
using ICC tags through the same node).

Unfortunately, as it happens, meaningless (in the upstream context) parts
of the vendor driver were copied, ending up causing havoc - since all
"per-RSC" (in quotes because they all point to the main APPS one) BCMs
defined within the driver overwrite the value in RPMh on every
aggregation.

To both avoid keeping bogus code around and possibly introducing
impossible-to-track-down bugs (busses shutting down for no reason), get
rid of the duplicated BCMs and their associated ICC nodes.

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Reviewed-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20231218-topic-8550_fixes-v1-1-ce1272d77540@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2024-01-31 15:47:47 +02:00
Adam Skladowski
1cef9f2d1e interconnect: qcom: Add MSM8909 interconnect provider driver
Add driver for interconnect busses found in MSM8909 based platforms.
The topology consists of three NoCs that are partially controlled by
a RPM processor.

In the downstream/vendor kernel from Qualcomm there is an additional
"mm-snoc". However, it actually ends up using the same RPM "snoc_clk"
as the normal "snoc". It looks like this is actually the same NoC
in hardware and the "mm-snoc" was only defined to assign a different
"qcom,util-fact" to increase bandwidth requests by a static margin.
In mainline we can represent this by assigning the equivalent "ab_coeff"
to all the nodes that are part of "mm-snoc" downstream.

Signed-off-by: Adam Skladowski <a39.skl@gmail.com>
[Stephan: Drop separate mm-snoc that exists downstream since it's
 actually the same NoC as SNoC in hardware, add qos_offset for BIMC,
 add ab_coeff for mm-snoc nodes and BIMC]
Signed-off-by: Stephan Gerhold <stephan.gerhold@kernkonzept.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Link: https://lore.kernel.org/r/20231220-icc-msm8909-v2-2-3b68bbed2891@kernkonzept.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2024-01-31 15:08:57 +02:00
Linus Torvalds
296455ade1 Char/Misc and other Driver changes for 6.8-rc1
Here is the big set of char/misc and other driver subsystem changes for
 6.8-rc1.  Lots of stuff in here, but first off, you will get a merge
 conflict in drivers/android/binder_alloc.c when merging this tree due to
 changing coming in through the -mm tree.
 
 The resolution of the merge issue can be found here:
 	https://lore.kernel.org/r/20231207134213.25631ae9@canb.auug.org.au
 or in a simpler patch form in that thread:
 	https://lore.kernel.org/r/ZXHzooF07LfQQYiE@google.com
 
 If there are issues with the merge of this file, please let me know.
 
 Other than lots of binder driver changes (as you can see by the merge
 conflicts) included in here are:
  - lots of iio driver updates and additions
  - spmi driver updates
  - eeprom driver updates
  - firmware driver updates
  - ocxl driver updates
  - mhi driver updates
  - w1 driver updates
  - nvmem driver updates
  - coresight driver updates
  - platform driver remove callback api changes
  - tags.sh script updates
  - bus_type constant marking cleanups
  - lots of other small driver updates
 
 All of these have been in linux-next for a while with no reported issues
 (other than the binder merge conflict.)
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 
 iG0EABECAC0WIQT0tgzFv3jCIUoxPcsxR9QN2y37KQUCZaeMMQ8cZ3JlZ0Brcm9h
 aC5jb20ACgkQMUfUDdst+ynWNgCfQ/Yz7QO6EMLDwHO5LRsb3YMhjL4AoNVdanjP
 YoI7f1I4GBcC0GKNfK6s
 =+Kyv
 -----END PGP SIGNATURE-----

Merge tag 'char-misc-6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc

Pull char/misc and other driver updates from Greg KH:
 "Here is the big set of char/misc and other driver subsystem changes
  for 6.8-rc1.

  Other than lots of binder driver changes (as you can see by the merge
  conflicts) included in here are:

   - lots of iio driver updates and additions

   - spmi driver updates

   - eeprom driver updates

   - firmware driver updates

   - ocxl driver updates

   - mhi driver updates

   - w1 driver updates

   - nvmem driver updates

   - coresight driver updates

   - platform driver remove callback api changes

   - tags.sh script updates

   - bus_type constant marking cleanups

   - lots of other small driver updates

  All of these have been in linux-next for a while with no reported
  issues"

* tag 'char-misc-6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (341 commits)
  android: removed duplicate linux/errno
  uio: Fix use-after-free in uio_open
  drivers: soc: xilinx: add check for platform
  firmware: xilinx: Export function to use in other module
  scripts/tags.sh: remove find_sources
  scripts/tags.sh: use -n to test archinclude
  scripts/tags.sh: add local annotation
  scripts/tags.sh: use more portable -path instead of -wholename
  scripts/tags.sh: Update comment (addition of gtags)
  firmware: zynqmp: Convert to platform remove callback returning void
  firmware: turris-mox-rwtm: Convert to platform remove callback returning void
  firmware: stratix10-svc: Convert to platform remove callback returning void
  firmware: stratix10-rsu: Convert to platform remove callback returning void
  firmware: raspberrypi: Convert to platform remove callback returning void
  firmware: qemu_fw_cfg: Convert to platform remove callback returning void
  firmware: mtk-adsp-ipc: Convert to platform remove callback returning void
  firmware: imx-dsp: Convert to platform remove callback returning void
  firmware: coreboot_table: Convert to platform remove callback returning void
  firmware: arm_scpi: Convert to platform remove callback returning void
  firmware: arm_scmi: Convert to platform remove callback returning void
  ...
2024-01-17 16:47:17 -08:00
Konrad Dybcio
24406f6794 interconnect: qcom: sm8550: Enable sync_state
To ensure the interconnect votes are actually meaningful and in order to
prevent holding all buses at FMAX, introduce the sync state callback.

Fixes: e6f0d6a30f ("interconnect: qcom: Add SM8550 interconnect provider driver")
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Reviewed-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20231218-topic-8550_fixes-v1-2-ce1272d77540@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2024-01-10 15:16:46 +02:00
Konrad Dybcio
85e985a4f4 interconnect: qcom: sc8180x: Mark CO0 BCM keepalive
The CO0 BCM needs to be up at all times, otherwise some hardware (like
the UFS controller) loses its connection to the rest of the SoC,
resulting in a hang of the platform, accompanied by a spectacular
logspam.

Mark it as keepalive to prevent such cases.

Fixes: 9c8c6bac1a ("interconnect: qcom: Add SC8180x providers")
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Link: https://lore.kernel.org/r/20231214-topic-sc8180_fixes-v1-1-421904863006@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2024-01-10 15:16:26 +02:00
Georgi Djakov
c9de516ef6 Merge branch 'icc-sm6115' into icc-next
Add DT bindings and a driver for managing NoC providers on SM6115.

* icc-sm6115
  dt-bindings: interconnect: Add Qualcomm SM6115 NoC
  interconnect: qcom: Add SM6115 interconnect provider driver
  dt-bindings: interconnect: qcom,msm8998-bwmon: Add SM6115 bwmon instance
  interconnect: qcom: sm6115: Fix up includes

Link: https://lore.kernel.org/r/20231125-topic-6115icc-v3-2-bd8907b8cfd7@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2023-12-15 00:42:31 +02:00
Konrad Dybcio
a9a36e4b4a interconnect: qcom: sm6115: Fix up includes
Remove some unnecessary includes and get rid of the abusive of_platform
in favor of the correct headers.

Reported-by: Rob Herring <robh+dt@kernel.org>
Reported-by: Georgi Djakov <djakov@kernel.org>
Fixes: 2eab57b131 ("interconnect: qcom: Add SM6115 interconnect provider driver")
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Link: https://lore.kernel.org/r/20231214-topic-6115iccfix-v1-1-9ad999683a7d@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2023-12-15 00:40:44 +02:00
Konrad Dybcio
2eab57b131 interconnect: qcom: Add SM6115 interconnect provider driver
Add a driver for managing NoC providers on SM6115.

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Link: https://lore.kernel.org/r/20231125-topic-6115icc-v3-2-bd8907b8cfd7@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2023-12-06 17:16:15 +02:00
Bjorn Andersson
9085b23b66 interconnect: qcom: icc-rpm: Fix peak rate calculation
Per the commit message of commit 'dd014803f260 ("interconnect: qcom:
icc-rpm: Add AB/IB calculations coefficients")', the peak rate should be
100/ib_percent. But, in what looks like a typical typo, the numerator
value is discarded in the calculation.

Update the implementation to match the described intention.

Fixes: dd014803f2 ("interconnect: qcom: icc-rpm: Add AB/IB calculations coefficients")
Cc: stable@vger.kernel.org
Signed-off-by: Bjorn Andersson <quic_bjorande@quicinc.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Link: https://lore.kernel.org/r/20231205-qcom_icc_calc_rate-typo-v1-1-9d4378dcf53e@quicinc.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2023-12-06 17:00:42 +02:00
Konrad Dybcio
bfc7db1cb9 interconnect: qcom: sm8250: Enable sync_state
Add the generic icc sync_state callback to ensure interconnect votes
are taken into account, instead of being pegged at maximum values.

Fixes: b95b668eaa ("interconnect: qcom: icc-rpmh: Add BCMs to commit list in pre_aggregate")
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Link: https://lore.kernel.org/r/20231130-topic-8250icc_syncstate-v1-1-7ce78ba6e04c@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2023-11-30 17:33:32 +02:00
Georgi Djakov
ecd3439595 Merge branch 'icc-x1e80100' into icc-next
* icc-x1e80100
  dt-bindings: interconnect: document the RPMh Network-On-Chip Interconnect in Qualcomm SM8650 SoC
  interconnect: qcom: introduce RPMh Network-On-Chip Interconnect on SM8650 SoC
  dt-bindings: interconnect: qcom-bwmon: document SM8650 BWMONs

This series adds interconnect support for the Qualcomm X1E80100 platform,
aka Snapdragon X Elite.

Our v1 post of the patchsets adding support for Snapdragon X Elite SoC had
the part number sc8380xp which is now updated to the new part number x1e80100
based on the new branding scheme and refers to the exact same SoC.
Release Link: https://www.qualcomm.com/news/releases/2023/10/qualcomm-unleashes-snapdragon-x-elite--the-ai-super-charged-plat

Link: https://lore.kernel.org/r/20231123135028.29433-1-quic_sibis@quicinc.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2023-11-24 00:27:30 +02:00
Rajendra Nayak
9f19677284 interconnect: qcom: Add X1E80100 interconnect provider driver
Add driver for the Qualcomm interconnect buses found in X1E80100 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.

Co-developed-by: Abel Vesa <abel.vesa@linaro.org>
Signed-off-by: Abel Vesa <abel.vesa@linaro.org>
Signed-off-by: Rajendra Nayak <quic_rjendra@quicinc.com>
Co-developed-by: Sibi Sankar <quic_sibis@quicinc.com>
Signed-off-by: Sibi Sankar <quic_sibis@quicinc.com>
Link: https://lore.kernel.org/r/20231123135028.29433-3-quic_sibis@quicinc.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2023-11-24 00:24:14 +02:00
Georgi Djakov
70ad2111d0 Merge branch 'icc-platform-remove' into icc-next
* icc-platform-remove
  interconnect: qcom: Make qnoc_remove return void
  interconnect: imx8mm: Convert to platform remove callback returning void
  interconnect: imx8mn: Convert to platform remove callback returning void
  interconnect: imx8mp: Convert to platform remove callback returning void
  interconnect: imx8mq: Convert to platform remove callback returning void
  interconnect: qcom/msm8974: Convert to platform remove callback returning void
  interconnect: qcom/osm-l3: Convert to platform remove callback returning void
  interconnect: qcom/smd-rpm: Convert to platform remove callback returning void
  interconnect: exynos: Convert to platform remove callback returning void

This series converts all platform drivers below drivers/interconnect to
use .remove_new(). Compared to the traditional .remove() callback
.remove_new() returns no value. This is a good thing because the driver
core doesn't (and cannot) cope for errors during remove. The only effect
of a non-zero return value in .remove() is that the driver core emits a
warning. The device is removed anyhow and an early return from .remove()
usually yields resource leaks and/or use-after-free bugs.

See commit 5c5a7680e6 ("platform: Provide a remove callback that
returns no value") for an extended explanation and the eventual goal.

All drivers converted here already returned zero unconditionally in
.remove(), so they are converted here trivially. The imx drivers could
be slightly simplified, because the remove callback only called a single
function with the same prototype as .remove_new().

Link: https://lore.kernel.org/r/20231031222851.3126434-11-u.kleine-koenig@pengutronix.de
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2023-11-24 00:21:12 +02:00