Commit Graph

3937 Commits

Author SHA1 Message Date
Linus Torvalds
5c2b050848 A set of updates for the interrupt subsystem:
- Tree wide:
 
     * Make nr_irqs static to the core code and provide accessor functions
       to remove existing and prevent future aliasing problems with local
       variables or function arguments of the same name.
 
   - Core code:
 
     * Prevent freeing an interrupt in the devres code which is not managed
       by devres in the first place.
 
     * Use seq_put_decimal_ull_width() for decimal values output in
       /proc/interrupts which increases performance significantly as it
       avoids parsing the format strings over and over.
 
     * Optimize raising the timer and hrtimer soft interrupts by using the
       'set bit only' variants instead of the combined version which checks
       whether ksoftirqd should be woken up. The latter is a pointless
       exercise as both soft interrupts are raised in the context of the
       timer interrupt and therefore never wake up ksoftirqd.
 
     * Delegate timer/hrtimer soft interrupt processing to a dedicated thread
       on RT.
 
       Timer and hrtimer soft interrupts are always processed in ksoftirqd
       on RT enabled kernels. This can lead to high latencies when other
       soft interrupts are delegated to ksoftirqd as well.
 
       The separate thread allows to run them seperately under a RT
       scheduling policy to reduce the latency overhead.
 
   - Drivers:
 
     * New drivers or extensions of existing drivers to support Renesas
       RZ/V2H(P), Aspeed AST27XX, T-HEAD C900 and ATMEL sam9x7 interrupt
       chips
 
     * Support for multi-cluster GICs on MIPS.
 
       MIPS CPUs can come with multiple CPU clusters, where each CPU cluster
       has its own GIC (Generic Interrupt Controller). This requires to
       access the GIC of a remote cluster through a redirect register block.
 
       This is encapsulated into a set of helper functions to keep the
       complexity out of the actual code paths which handle the GIC details.
 
     * Support for encrypted guests in the ARM GICV3 ITS driver
 
       The ITS page needs to be shared with the hypervisor and therefore
       must be decrypted.
 
     * Small cleanups and fixes all over the place
 -----BEGIN PGP SIGNATURE-----
 
 iQJHBAABCgAxFiEEQp8+kY+LLUocC4bMphj1TA10mKEFAmc7ggcTHHRnbHhAbGlu
 dXRyb25peC5kZQAKCRCmGPVMDXSYoaf7D/9G6FgJXx/60zqnpnOr9Yx0hxjaI47x
 PFyCd3P05qyVMBYXfI99vrSKuVdMZXJ/fH5L83y+sOaTASyLTzg37igZycIDJzLI
 FnHh/m/+UA8k2aIC5VUiNAjne2RLaTZiRN15uEHFVjByC5Y+YTlCNUE4BBhg5RfQ
 hKmskeffWdtui3ou13CSNvbFn+pmqi4g6n1ysUuLhiwM2E5b1rZMprcCOnun/cGP
 IdUQsODNWTTv9eqPJez985M6A1x2SCGNv7Z73h58B9N0pBRPEC1xnhUnCJ1sA0cJ
 pnfde2C1lztEjYbwDngy0wgq0P6LINjQ5Ma2YY2F2hTMsXGJxGPDZm24/u5uR46x
 N/gsOQMXqw6f5yvbiS7Asx9WzR6ry8rJl70QRgTyozz7xxJTaiNm2HqVFe2wc+et
 Q/BzaKdhmUJj1GMZmqD2rrgwYeDcb4wWYNtwjM4PVHHxYlJVq0mEF1kLLS8YDyjf
 HuGPVqtSkt3E0+Br3FKcv5ltUQP8clXbudc6L1u98YBfNK12hW8L+c3YSvIiFoYM
 ZOAeANPM7VtQbP2Jg2q81Dd3CShImt5jqL2um+l8g7+mUE7l9gyuO/w/a5dQ57+b
 kx7mHHIW2zCeHrkZZbRUYzI2BJfMCCOVN4Ax5OZxTLnLsL9VEehy8NM8QYT4TS8R
 XmTOYW3U9XR3gw==
 =JqxC
 -----END PGP SIGNATURE-----

Merge tag 'irq-core-2024-11-18' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull interrupt subsystem updates from Thomas Gleixner:
 "Tree wide:

   - Make nr_irqs static to the core code and provide accessor functions
     to remove existing and prevent future aliasing problems with local
     variables or function arguments of the same name.

  Core code:

   - Prevent freeing an interrupt in the devres code which is not
     managed by devres in the first place.

   - Use seq_put_decimal_ull_width() for decimal values output in
     /proc/interrupts which increases performance significantly as it
     avoids parsing the format strings over and over.

   - Optimize raising the timer and hrtimer soft interrupts by using the
     'set bit only' variants instead of the combined version which
     checks whether ksoftirqd should be woken up. The latter is a
     pointless exercise as both soft interrupts are raised in the
     context of the timer interrupt and therefore never wake up
     ksoftirqd.

   - Delegate timer/hrtimer soft interrupt processing to a dedicated
     thread on RT.

     Timer and hrtimer soft interrupts are always processed in ksoftirqd
     on RT enabled kernels. This can lead to high latencies when other
     soft interrupts are delegated to ksoftirqd as well.

     The separate thread allows to run them seperately under a RT
     scheduling policy to reduce the latency overhead.

  Drivers:

   - New drivers or extensions of existing drivers to support Renesas
     RZ/V2H(P), Aspeed AST27XX, T-HEAD C900 and ATMEL sam9x7 interrupt
     chips

   - Support for multi-cluster GICs on MIPS.

     MIPS CPUs can come with multiple CPU clusters, where each CPU
     cluster has its own GIC (Generic Interrupt Controller). This
     requires to access the GIC of a remote cluster through a redirect
     register block.

     This is encapsulated into a set of helper functions to keep the
     complexity out of the actual code paths which handle the GIC
     details.

   - Support for encrypted guests in the ARM GICV3 ITS driver

     The ITS page needs to be shared with the hypervisor and therefore
     must be decrypted.

   - Small cleanups and fixes all over the place"

* tag 'irq-core-2024-11-18' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (50 commits)
  irqchip/riscv-aplic: Prevent crash when MSI domain is missing
  genirq/proc: Use seq_put_decimal_ull_width() for decimal values
  softirq: Use a dedicated thread for timer wakeups on PREEMPT_RT.
  timers: Use __raise_softirq_irqoff() to raise the softirq.
  hrtimer: Use __raise_softirq_irqoff() to raise the softirq
  riscv: defconfig: Enable T-HEAD C900 ACLINT SSWI drivers
  irqchip: Add T-HEAD C900 ACLINT SSWI driver
  dt-bindings: interrupt-controller: Add T-HEAD C900 ACLINT SSWI device
  irqchip/stm32mp-exti: Use of_property_present() for non-boolean properties
  irqchip/mips-gic: Fix selection of GENERIC_IRQ_EFFECTIVE_AFF_MASK
  irqchip/mips-gic: Prevent indirect access to clusters without CPU cores
  irqchip/mips-gic: Multi-cluster support
  irqchip/mips-gic: Setup defaults in each cluster
  irqchip/mips-gic: Support multi-cluster in for_each_online_cpu_gic()
  irqchip/mips-gic: Replace open coded online CPU iterations
  genirq/irqdesc: Use str_enabled_disabled() helper in wakeup_show()
  genirq/devres: Don't free interrupt which is not managed by devres
  irqchip/gic-v3-its: Fix over allocation in itt_alloc_pool()
  irqchip/aspeed-intc: Add AST27XX INTC support
  dt-bindings: interrupt-controller: Add support for ASPEED AST27XX INTC
  ...
2024-11-19 15:54:19 -08:00
Arnd Bergmann
bbfbb57958 Qualcomm driver fixes for v6.12
The Qualcomm EDAC driver's configuration of interrupts is made optional,
 to avoid violating security constriants on X Elite platform .
 
 The SCM drivers' detection mechanism for the presence of SHM bridge in QTEE,
 is corrected to handle the case where firmware successfully returns that
 the interface isn't supported.
 
 The GLINK driver and the PMIC GLINK interface is updated to handle
 buffer allocation issues during initialization of the communication
 channel.
 
 Allocation error handling in the socinfo dirver is corrected, and then
 the fix is corrected.
 -----BEGIN PGP SIGNATURE-----
 
 iQJJBAABCAAzFiEEBd4DzF816k8JZtUlCx85Pw2ZrcUFAmck/kgVHGFuZGVyc3Nv
 bkBrZXJuZWwub3JnAAoJEAsfOT8Nma3FqV8QAMEYiZp4KnS6QkT4h47ET/dl3AiY
 EIyUge41uXjJYO4rK2JpYWi2Y30CXXwb0MRuhfZyI47mU2xYqP30hLEliqZLQqU3
 ulc4hmVyPeelRtpSX36UyZQWcaTcr0IyWnhnPSPoIr/WuyvFojBVucnAzHGFYHw6
 0Wl0Uwg0vaoptAXnAxC671ggkbXeUuxR1sOMnVAzAL9sUgZMAjDHg+Yc/Oz0i7KZ
 16OcOPFWhN+PegrIAPKx5J3X9PUsEoPqE83y3DdRVv62c58RU5tfhrhEIhmo3DVn
 ruTbrf1vV6cE1iWfGQIxyVt0WJGnY/dZqQjQxinZF0U9dlJl5+ke9ZTsaRxF0s0J
 wejMDOoqtRbNeotLxhQAp0KbPbcUHg8kkUrYMiTZLMh4eNIEBi4yLT8KhDT7IUgT
 SEP6jK4z482xpaTrDf5hDmnIMSfAO9fC50QiUMc8eNGL84XYIJgcYfi+LAP7TSiV
 wP6PI1moQcSvq034csy4AfHlsULxMdqzqh86N4DSdkoa/om2JRiYIXfTkZOteOEg
 GR4gPYigdBV8X4jj4XDiRbk+hbf+bbc6qet0HKvBPjYcKyvpH+SEVMsuxzAO8ybP
 RjP5pDrOSb7mLlx/q8RBUwyuVWk6gtDhL6tgvwfP+qu+dxTcHgRSqAi5BQfOWMvf
 2K4QO3/0tYunyqaf
 =H31v
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmcoyr0ACgkQYKtH/8kJ
 UiebJA/+OwoABEZcspBT92CnlAaIgIITx0znuO9srUcaiNxOTrZH2+T6z+sKHvOV
 bfhj0JZyK0Qk6sxU9PoczIXb2Xc42lemkZwL6TfDjQlOI10mvfTOgnIFPldG1RIp
 FcFjI3Tb6SKqh9GxDm5qLdxFn8ZoGKTLtUpP3FuV6lQNpiS7jLJILSNFXbVVMnk/
 U2HY76YQ8u2DPk5ZXmjrw49NRDvQ22ufwxJJctE0fvVyr+AUhTFBHH9h6fo3RxbC
 4IMCmEfVLnJ+ye9CqB4ahkcbu4gwzzU0eRpMb7mZ2GhufuCjgfBYA4U2XZhdEv0w
 9GenVlPr0Hs1dtpUBxvfNf0kJ2uyti4UGkW7gn8+m/sl73bMVIGPX72rxdk3vbir
 yztmdl3Nya0Nh9fPJxwP4BT6JsMshsz0POzvIOqeRTUw9yKD+wIQg9a+cwWWqdlu
 jNvBGprW7MS03uQWIWYTGkjqDsStZVJaFO//PHx+ZZ0eY/H2Lminf3GL2tsAYUtE
 pIVsS4NUcCygEELb7cEbi+S9EMkgQZPd71VAex9bjKNquBs60fSU1GZr3oOuHluv
 2XI2O+FPwdTH+yAXzqRlCj5Rczum0joa9q2lHW7hs/h7AKVSNCfzj+0YjDFIhu2E
 BnS0nbwm5axYm7vsnfA4O4QkE6AtGlRpmVfiumLg/Vif8KsA3N8=
 =2qZ7
 -----END PGP SIGNATURE-----

Merge tag 'qcom-drivers-fixes-for-6.12' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/fixes

Qualcomm driver fixes for v6.12

The Qualcomm EDAC driver's configuration of interrupts is made optional,
to avoid violating security constriants on X Elite platform .

The SCM drivers' detection mechanism for the presence of SHM bridge in QTEE,
is corrected to handle the case where firmware successfully returns that
the interface isn't supported.

The GLINK driver and the PMIC GLINK interface is updated to handle
buffer allocation issues during initialization of the communication
channel.

Allocation error handling in the socinfo dirver is corrected, and then
the fix is corrected.

* tag 'qcom-drivers-fixes-for-6.12' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux:
  soc: qcom: pmic_glink: Handle GLINK intent allocation rejections
  rpmsg: glink: Handle rejected intent request better
  soc: qcom: socinfo: fix revision check in qcom_socinfo_probe()
  firmware: qcom: scm: Return -EOPNOTSUPP for unsupported SHM bridge enabling
  EDAC/qcom: Make irq configuration optional
  firmware: qcom: scm: fix a NULL-pointer dereference
  firmware: qcom: scm: suppress download mode error
  soc: qcom: Add check devm_kasprintf() returned value
  MAINTAINERS: Qualcomm SoC: Match reserved-memory bindings

Link: https://lore.kernel.org/r/20241101161455.746290-1-andersson@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-11-04 14:23:09 +01:00
Bjorn Andersson
f8c8791924 soc: qcom: pmic_glink: Handle GLINK intent allocation rejections
Some versions of the pmic_glink firmware does not allow dynamic GLINK
intent allocations, attempting to send a message before the firmware has
allocated its receive buffers and announced these intent allocations
will fail. When this happens something like this showns up in the log:

    pmic_glink_altmode.pmic_glink_altmode pmic_glink.altmode.0: failed to send altmode request: 0x10 (-125)
    pmic_glink_altmode.pmic_glink_altmode pmic_glink.altmode.0: failed to request altmode notifications: -125
    ucsi_glink.pmic_glink_ucsi pmic_glink.ucsi.0: failed to send UCSI read request: -125
    qcom_battmgr.pmic_glink_power_supply pmic_glink.power-supply.0: failed to request power notifications

GLINK has been updated to distinguish between the cases where the remote
is going down (-ECANCELED) and the intent allocation being rejected
(-EAGAIN).

Retry the send until intent buffers becomes available, or an actual
error occur.

To avoid infinitely waiting for the firmware in the event that this
misbehaves and no intents arrive, an arbitrary 5 second timeout is
used.

This patch was developed with input from Chris Lew.

Reported-by: Johan Hovold <johan@kernel.org>
Closes: https://lore.kernel.org/all/Zqet8iInnDhnxkT9@hovoldconsulting.com/#t
Cc: stable@vger.kernel.org # rpmsg: glink: Handle rejected intent request better
Fixes: 58ef4ece1e ("soc: qcom: pmic_glink: Introduce base PMIC GLINK driver")
Tested-by: Johan Hovold <johan+linaro@kernel.org>
Reviewed-by: Johan Hovold <johan+linaro@kernel.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@oss.qualcomm.com>
Reviewed-by: Chris Lew <quic_clew@quicinc.com>
Link: https://lore.kernel.org/r/20241023-pmic-glink-ecancelled-v2-2-ebc268129407@oss.qualcomm.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
2024-10-24 13:03:37 -05:00
Manikanta Mylavarapu
128fdbf36c soc: qcom: socinfo: fix revision check in qcom_socinfo_probe()
In success case, the revision holds a non-null pointer. The current
logic incorrectly returns an error for a non-null pointer, whereas
it should return an error for a null pointer.

The socinfo driver for IPQ9574 and IPQ5332 is currently broken,
resulting in the following error message
qcom-socinfo qcom-socinfo: probe with driver qcom-socinfo failed with
error -12

Add a null check for the revision to ensure it returns an error only in
failure case (null pointer).

Fixes: e694d2b5c5 ("soc: qcom: Add check devm_kasprintf() returned value")
Signed-off-by: Manikanta Mylavarapu <quic_mmanikan@quicinc.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20241016144852.2888679-1-quic_mmanikan@quicinc.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
2024-10-24 09:46:20 -05:00
Fabrizio Castro
0d7605e75a irqchip: Add RZ/V2H(P) Interrupt Control Unit (ICU) driver
Add driver for the Renesas RZ/V2H(P) Interrupt Control Unit (ICU).

This driver supports the external interrupts NMI, IRQn, and TINTn.

Signed-off-by: Fabrizio Castro <fabrizio.castro.jz@renesas.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/all/20241009230817.798582-3-fabrizio.castro.jz@renesas.com
2024-10-16 00:01:06 +02:00
Arnd Bergmann
dec17c8b36 FSL SOC fixes for v6.12:
- Fix a "cast to pointer from integer of different size" build error
 due to IS_ERROR_VALUE() used with something which is not a pointer.
 
 - Fix an unused data build warning.
 -----BEGIN PGP SIGNATURE-----
 
 iJIEABYKADoWIQQQ/+b4s5DeF6zCYyNoqS/rAbjdeAUCZv4m/xwcY2hyaXN0b3Bo
 ZS5sZXJveUBjc2dyb3VwLmV1AAoJEGipL+sBuN14EhQBAM18WZPM03Lmf7FEy+qX
 ZCLd3DPRF2jXu8TfL83zwS3oAQC6fyYxtq0U2Wbo66TTtmjWfTXMgbK8AebDa92J
 4hugDg==
 =1fza
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmcI9+EACgkQYKtH/8kJ
 Uidt3Q/+MBugJ593wFZ3BMvsinUUJ8i21vJj7pSMZ1QDsiWQiuZtq5yvWv4RfGfc
 qUiY7kg7mbS4t8+wP5iwAYK6oBqxGV9Jc8XvPyVUrTPsb+MUkDARjSoP9urQTmR+
 ndfYbV+sFQuyoxgIBX6+GWVHHXZ9WEz+RgToIzmqbegXEX38AKszPY9XQG+CEGgO
 BcrgxoViXHLAc8qfg84s64j1WYJCuajDJvF4b5GYjiYsf0WzJZdlkUxEGjslz9/O
 jdoG2HVtdUwtDcI4r5XnZq9Ck+zuYZNp7ZKXqZYSpbJb7gHEa2+ju3hlpCkeW/gN
 +mBnp7xxJhhppaISCbwNG3LFRAX814DDcq86XYDbGfMH271Nrv5yUko8t+qwCyBq
 yCEpXtjVRVPoOkn52CfFAU49Khn3Kdjp38uakpKOJx8NfoNlSX+Sex7gHkUkxjej
 4p77tugWoNyev8Gvaoy7b04v6JmRkXvwfjonEGwnNVMOzrokFgihkNziCEcyzaEn
 8FITIRmuLbXfBqottBzgeauKhG4W/2zLtjuHeTUP3swV3Zf4WF8+DcXiASVEnULg
 UYGfWWnGg4dktNDPtAxN558W1qPkf/goOaKG9GYjzvp6HVTc7h2aACnx8HhbnBS7
 pzP7fcVlPp0mijfJcSMtIeos4SMP2PYy5GbXvx313z94hQNL0c0=
 =s55C
 -----END PGP SIGNATURE-----

Merge tag 'soc_fsl-6.12-3' of https://github.com/chleroy/linux into arm/fixes

FSL SOC fixes for v6.12:

- Fix a "cast to pointer from integer of different size" build error
due to IS_ERROR_VALUE() used with something which is not a pointer.

- Fix an unused data build warning.

* tag 'soc_fsl-6.12-3' of https://github.com/chleroy/linux:
  soc: fsl: cpm1: qmc: Fix unused data compilation warning
  soc: fsl: cpm1: qmc: Do not use IS_ERR_VALUE() on error pointers

Link: https://lore.kernel.org/r/c954bdb0-0c16-491a-8662-37e58f07208f@csgroup.eu
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-10-11 10:03:13 +00:00
Rajendra Nayak
0a97195d21 EDAC/qcom: Make irq configuration optional
On most modern qualcomm SoCs, the configuration necessary to enable the
Tag/Data RAM related irqs being propagated to the SoC irq controller is
already done in firmware (in DSF or 'DDR System Firmware')

On some like the x1e80100, these registers aren't even accesible to the
kernel causing a crash when edac device is probed.

Hence, make the irq configuration optional in the driver and mark x1e80100
as the SoC on which this should be avoided.

Fixes: af16b00578 ("arm64: dts: qcom: Add base X1E80100 dtsi and the QCP dts")
Reported-by: Bjorn Andersson <andersson@kernel.org>
Signed-off-by: Rajendra Nayak <quic_rjendra@quicinc.com>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Reviewed-by: Abel Vesa <abel.vesa@linaro.org>
Link: https://lore.kernel.org/r/20240903101510.3452734-1-quic_rjendra@quicinc.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
2024-10-05 22:17:08 -05:00
Herve Codina
1117b916f5 soc: fsl: cpm1: qmc: Fix unused data compilation warning
In some configuration, compilation raises warnings related to unused
data. Indeed, depending on configuration, those data can be unused.

mark those data as __maybe_unused to avoid compilation warnings.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202409071707.ou2KFNKO-lkp@intel.com/
Fixes: eb680d5630 ("soc: fsl: cpm1: qmc: Add support for QUICC Engine (QE) implementation")
Signed-off-by: Herve Codina <herve.codina@bootlin.com>
Link: https://lore.kernel.org/r/20240909121129.57067-1-herve.codina@bootlin.com
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
2024-10-02 23:29:38 +02:00
Geert Uytterhoeven
122019f051 soc: fsl: cpm1: qmc: Do not use IS_ERR_VALUE() on error pointers
ppc64_book3e_allmodconfig:

    drivers/soc/fsl/qe/qmc.c: In function ‘qmc_qe_init_resources’:
    include/linux/err.h:28:49: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
       28 | #define IS_ERR_VALUE(x) unlikely((unsigned long)(void *)(x) >= (unsigned long)-MAX_ERRNO)
	  |                                                 ^
    include/linux/compiler.h:77:45: note: in definition of macro ‘unlikely’
       77 | # define unlikely(x)    __builtin_expect(!!(x), 0)
	  |                                             ^
    drivers/soc/fsl/qe/qmc.c:1764:13: note: in expansion of macro ‘IS_ERR_VALUE’
     1764 |         if (IS_ERR_VALUE(info)) {
	  |             ^~~~~~~~~~~~

IS_ERR_VALUE() is only meant for pointers.  Fix this by checking for a
negative error value instead, which matches the documented behavior of
devm_qe_muram_alloc() aka devm_cpm_muram_alloc().
While at it, remove the unneeded print in case of a memory allocation
failure, and propagate the returned error code.

Fixes: eb680d5630 ("soc: fsl: cpm1: qmc: Add support for QUICC Engine (QE) implementation")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Tested-by: Herve Codina <herve.codina@bootlin.com>
Acked-by: Herve Codina <herve.codina@bootlin.com>
Link: https://lore.kernel.org/r/8b113596b2c8cdda6655346232cc603efdeb935a.1727708905.git.geert+renesas@glider.be
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
2024-10-02 23:28:46 +02:00
Al Viro
5f60d5f6bb move asm/unaligned.h to linux/unaligned.h
asm/unaligned.h is always an include of asm-generic/unaligned.h;
might as well move that thing to linux/unaligned.h and include
that - there's nothing arch-specific in that header.

auto-generated by the following:

for i in `git grep -l -w asm/unaligned.h`; do
	sed -i -e "s/asm\/unaligned.h/linux\/unaligned.h/" $i
done
for i in `git grep -l -w asm-generic/unaligned.h`; do
	sed -i -e "s/asm-generic\/unaligned.h/linux\/unaligned.h/" $i
done
git mv include/asm-generic/unaligned.h include/linux/unaligned.h
git mv tools/include/asm-generic/unaligned.h tools/include/linux/unaligned.h
sed -i -e "/unaligned.h/d" include/asm-generic/Kbuild
sed -i -e "s/__ASM_GENERIC/__LINUX/" include/linux/unaligned.h tools/include/linux/unaligned.h
2024-10-02 17:23:23 -04:00
Charles Han
e694d2b5c5 soc: qcom: Add check devm_kasprintf() returned value
devm_kasprintf() can return a NULL pointer on failure but this
returned value in qcom_socinfo_probe() is not checked.

Signed-off-by: Charles Han <hanchunchao@inspur.com>
Link: https://lore.kernel.org/r/20240929072349.202520-1-hanchunchao@inspur.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
2024-09-30 22:23:46 -05:00
Linus Torvalds
075dbe9f6e soc: convert ep93xx to devicetree
This concludes a long journey towards replacing the old
 board files with devictree description on the Cirrus Logic
 EP93xx platform.
 
 Nikita Shubin has been working on this for a long time,
 for details see the last post on
 https://lore.kernel.org/lkml/20240909-ep93xx-v12-0-e86ab2423d4b@maquefel.me/
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmb1croACgkQYKtH/8kJ
 UicY0g//XXEXcBgE2CLfKzGimN3gREIElEqFCpd7v32XWGIQNFdS7StiGqNx1MeU
 UYdILm97ldgpx+NnHd3Cb9HbLQ1CTIIvAZ2ngFLDeeZO+wgzBVxWTrdUUp57ZIBn
 5Fq0hNaR1bfqSr+J+ZbgizH5N96EvLr3OPz/eJetY7egVBUID/0OpwssPJxW1Ns0
 f+W+yIc7BomVa71xGgI+RkHrG/5DSaoFtrB+ESt7q1nNUIeMn32JqBYqE0U2iCRN
 ADO8I+WfAjIcO1uN5n3KM3tigZI3GKSrBdllByr8wWNbp9l5rMYfFAPEaI109iyI
 7PFrB6qhAlY9LckXMNhwLyjlnWt6qrI0B+tyg+3tW6+4OwFnpPN0cIhszFPOmrhv
 njsDSvybp0q9V6Mn7f394H6v9sk9RHr68mpu12hO65UBP7Qe7mrdl3snnFcm0FHL
 jCLnvjdmCSqRlV6YFsKDHuDzZOG88sAwH0mySKd3c/CVvgaNDsaJduelPGpuXlXX
 P7op6D8kyKFKfmwK0kz3t+3+2ozgYq3nu4amI7rJ72MOvJKBocTwwqpAesIuegde
 bn3ZN30yZDTbfEFuveOAzx7rqDlZYX/tN0uspL4VBN0rdayxBng5hneV2PypTtW0
 wE9ptz5qIz8AssJ7NInwpgRTDjEut4SY3m3CS2/66V08B4EznAA=
 =Y3Cd
 -----END PGP SIGNATURE-----

Merge tag 'soc-ep93xx-dt-6.12' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc

Pull SoC update from Arnd Bergmann:
 "Convert ep93xx to devicetree

  This concludes a long journey towards replacing the old board files
  with devictree description on the Cirrus Logic EP93xx platform.

  Nikita Shubin has been working on this for a long time, for details
  see the last post on

    https://lore.kernel.org/lkml/20240909-ep93xx-v12-0-e86ab2423d4b@maquefel.me/"

* tag 'soc-ep93xx-dt-6.12' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (47 commits)
  dt-bindings: gpio: ep9301: Add missing "#interrupt-cells" to examples
  MAINTAINERS: Update EP93XX ARM ARCHITECTURE maintainer
  soc: ep93xx: drop reference to removed EP93XX_SOC_COMMON config
  net: cirrus: use u8 for addr to calm down sparse
  dmaengine: cirrus: use snprintf() to calm down gcc 13.3.0
  dmaengine: ep93xx: Fix a NULL vs IS_ERR() check in probe()
  pinctrl: ep93xx: Fix raster pins typo
  spi: ep93xx: update kerneldoc comments for ep93xx_spi
  clk: ep93xx: Fix off by one in ep93xx_div_recalc_rate()
  clk: ep93xx: add module license
  dmaengine: cirrus: remove platform code
  ASoC: cirrus: edb93xx: Delete driver
  ARM: ep93xx: soc: drop defines
  ARM: ep93xx: delete all boardfiles
  ata: pata_ep93xx: remove legacy pinctrl use
  pwm: ep93xx: drop legacy pinctrl
  ARM: ep93xx: DT for the Cirrus ep93xx SoC platforms
  ARM: dts: ep93xx: Add EDB9302 DT
  ARM: dts: ep93xx: add ts7250 board
  ARM: dts: add Cirrus EP93XX SoC .dtsi
  ...
2024-09-26 12:00:25 -07:00
Lukas Bulwahn
84db6f27b2 soc: ep93xx: drop reference to removed EP93XX_SOC_COMMON config
Commit 6eab0ce6e1 ("soc: Add SoC driver for Cirrus ep93xx") adds the
config EP93XX_SOC referring to the config EP93XX_SOC_COMMON.

Within the same patch series of the commit above, the commit 046322f1e1
("ARM: ep93xx: DT for the Cirrus ep93xx SoC platforms") then removes the
config EP93XX_SOC_COMMON. With that the reference to this config is
obsolete.

Simplify the expression in the EP93XX_SOC config definition.

Signed-off-by: Lukas Bulwahn <lukas.bulwahn@redhat.com>
Reviewed-by: Nikita Shubin <nikita.shubin@maquefel.me>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-09-26 12:58:18 +00:00
Linus Torvalds
b8979c6b4d soc: driver updates for 6.12
The driver updates seem larger this time around, with changes
 is many of the SoC specific drivers, both the custom drivers/soc
 ones and the closely related subsystems (memory, bus, firmware,
 reset, ...).
 
 The at91 platform gains support for sam9x7 chips in the soc and
 power management code. This is the latest variant of one of the
 oldest still supported SoC families, using the ARM9 (ARMv5) core.
 
 As usual, the qualcomm snapdragon platform gets a ton of updates in many
 of their drivers to add more features and additional SoC support. Most
 of these are somewhat firmware related as the platform has a number of
 firmware based interfaces to the kernel. A notable addition here is the
 inclusion of trace events to two of these drivers.
 
 Herve Codina and Christophe Leroy are now sending updates for
 drivers/soc/fsl/ code through the SoC tree, this contains both PowerPC
 and Arm specific platforms and has previously been problematic to
 maintain. The first update here contains support for newer PowerPC
 variants and some cleanups.
 
 The turris mox firmware driver has a number of updates, mostly cleanups.
 
 The Arm SCMI firmware driver gets a major rework to modularize
 the existing code into separately loadable drivers for the various
 transports, the addition of custom NXP i.MX9 interfaces and a
 number of smaller updates.
 
 The Arm FF-A firmware driver gets a feature update to support
 the v1.2 version of the specification.
 
 The reset controller drivers have some smaller cleanups and a newly
 added driver for the Intel/Mobileye EyeQ5/EyeQ6 MIPS SoCs.
 
 The memory controller drivers get some cleanups and refactoring
 for Tegra, TI, Freescale/NXP and a couple more platforms.
 
 Finally there are lots of minor updates to firmware (raspberry pi,
 tegra, imx), bus (sunxi, omap, tegra) and soc (rockchips, tegra, amlogic,
 mediatek) drivers and their DT bindings.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmboJicACgkQYKtH/8kJ
 Uicc+RAAlc6lY0CKqZhAKzyGsjEHzPYcTN5axNf1WrTdgv3assF+yEeiQtkd+Re7
 IIbtrWYWmLouOazRm5y7OjOUUy78FRThgRaVlZLPiCZze3rlZjIHj2XJx7R1hdjv
 aXBSe13i1KfmOsIDVNxAJbFa5UveeAvKKxRb6SJtSwl46KGhhgI3Jwq347sR7bYY
 QpiVMRVZTkH7++hlE9KE5qv+I6QVlbhneU1ErHjy0g4av+UycQe0eJFOtZV+Y5Aj
 7k65D3GC33eOAK56iDCUH9OfYLFu7k3LF7V0zdLIhel1tFuoYUbjkC5iQr4VAMjc
 Ysw0vwXdnUoG3oDiGLOIK4u56flWqT7I8gSQwRhtp6Ikc47gdlA2zJLE4MNN/4Yh
 fMP9LUxzr0sJ67LUq4urtnRfVtgKRRZ44v6A+CHY0l3x6rqeNbkJd38mXeVMMIWo
 gW8cf/fJsEdNE+1neGXq7lRrUmCwvkYUAd7y3gt1BiUq/Abas6ityvzk9Xig87I2
 uq3p5nASgrl+o8OlmIBT770BeS2jY8tAGJm1ocCtYN2ZWGh37LeES4Bo/58BPTGE
 tydBhlBK41h2dUCYQRZFNUt/2/xCELQ2X4mUiOaL2gqmiJq3Q6fdR1d+DAOB+4a5
 KL1yt5yIrBl0XMQ76kir3VmqTeKNka7aS23yefgTZfQAVb+JDw4=
 =EauF
 -----END PGP SIGNATURE-----

Merge tag 'soc-drivers-6.12' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc

Pull SoC driver updates from Arnd Bergmann:
 "The driver updates seem larger this time around, with changes is many
  of the SoC specific drivers, both the custom drivers/soc ones and the
  closely related subsystems (memory, bus, firmware, reset, ...).

  The at91 platform gains support for sam9x7 chips in the soc and power
  management code. This is the latest variant of one of the oldest still
  supported SoC families, using the ARM9 (ARMv5) core.

  As usual, the qualcomm snapdragon platform gets a ton of updates in
  many of their drivers to add more features and additional SoC support.
  Most of these are somewhat firmware related as the platform has a
  number of firmware based interfaces to the kernel. A notable addition
  here is the inclusion of trace events to two of these drivers.

  Herve Codina and Christophe Leroy are now sending updates for
  drivers/soc/fsl/ code through the SoC tree, this contains both PowerPC
  and Arm specific platforms and has previously been problematic to
  maintain. The first update here contains support for newer PowerPC
  variants and some cleanups.

  The turris mox firmware driver has a number of updates, mostly
  cleanups.

  The Arm SCMI firmware driver gets a major rework to modularize the
  existing code into separately loadable drivers for the various
  transports, the addition of custom NXP i.MX9 interfaces and a number
  of smaller updates.

  The Arm FF-A firmware driver gets a feature update to support the v1.2
  version of the specification.

  The reset controller drivers have some smaller cleanups and a newly
  added driver for the Intel/Mobileye EyeQ5/EyeQ6 MIPS SoCs.

  The memory controller drivers get some cleanups and refactoring for
  Tegra, TI, Freescale/NXP and a couple more platforms.

  Finally there are lots of minor updates to firmware (raspberry pi,
  tegra, imx), bus (sunxi, omap, tegra) and soc (rockchips, tegra,
  amlogic, mediatek) drivers and their DT bindings"

* tag 'soc-drivers-6.12' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (212 commits)
  firmware: imx: remove duplicate scmi_imx_misc_ctrl_get()
  platform: cznic: turris-omnia-mcu: Fix error check in omnia_mcu_register_trng()
  bus: sunxi-rsb: Simplify code with dev_err_probe()
  soc: fsl: qe: ucc: Export ucc_mux_set_grant_tsa_bkpt
  soc: fsl: cpm1: qmc: Fix dependency on fsl_soc.h
  dt-bindings: arm: rockchip: Add rk3576 compatible string to pmu.yaml
  soc: fsl: qbman: Remove redundant warnings
  soc: fsl: qbman: Use iommu_paging_domain_alloc()
  MAINTAINERS: Add QE files related to the Freescale QMC controller
  soc: fsl: cpm1: qmc: Handle QUICC Engine (QE) soft-qmc firmware
  soc: fsl: cpm1: qmc: Add support for QUICC Engine (QE) implementation
  soc: fsl: qe: Add missing PUSHSCHED command
  soc: fsl: qe: Add resource-managed muram allocators
  soc: fsl: cpm1: qmc: Introduce qmc_version
  soc: fsl: cpm1: qmc: Rename SCC_GSMRL_MODE_QMC
  soc: fsl: cpm1: qmc: Handle RPACK initialization
  soc: fsl: cpm1: qmc: Rename qmc_chan_command()
  soc: fsl: cpm1: qmc: Introduce qmc_{init,exit}_xcc() and their CPM1 version
  soc: fsl: cpm1: qmc: Introduce qmc_init_resource() and its CPM1 version
  soc: fsl: cpm1: qmc: Re-order probe() operations
  ...
2024-09-17 10:48:09 +02:00
Nikita Shubin
6eab0ce6e1 soc: Add SoC driver for Cirrus ep93xx
Add an SoC driver for the ep93xx. Currently there is only one thing
not fitting into any other framework, and that is the swlock setting.

Used for clock settings, pinctrl and restart.

Signed-off-by: Nikita Shubin <nikita.shubin@maquefel.me>
Tested-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
Acked-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-09-12 14:33:10 +00:00
Arnd Bergmann
5f79d76727 pmic warpper:
- reduce size by constifying data structures
 - use devm_clk_bulk_det_all_enable
 
 mutex:
 - reduce size by changing variable bit size
 -----BEGIN PGP SIGNATURE-----
 
 iQJLBAABCAA1FiEEUdvKHhzqrUYPB/u8L21+TfbCqH4FAmbfFCQXHG1hdHRoaWFz
 LmJnZ0BnbWFpbC5jb20ACgkQL21+TfbCqH7fARAAnHCF02WuAonLe5rWfJyR9kJF
 azH489t/umLCvnBm9tNwlFocrFwSspqkvaZO/47VOQINKcyEzy7idl917NuCy1WS
 yCo26BKTmapW7zCv619vku13JKzX78DotUUMJdUARxyzGUqD1o+pSuArWIRU2BV5
 UxzkPAJljlgsVMgFgOUgv3e+qptDYFVE33qHfBGThfSbHcigChPLeVupa3oOxkXx
 oMFO1Tr79oBt82yR+dQgNIVfxOoviiOvS6+4WZD+a4Ud64GojmIN2iJN2Tu8I8C3
 IMO6v/RU6HQl8UXvLBHq2nCrnU15gxpAoSSoBZ4ptWGmUdSqyVxUVU8AkHz0SMmC
 uf6qeCnVQONaUcL5c+iWcZY0vlM5c8NgHzs+dXU329HZnFlAe+QwqC9cwBSO0qE0
 qk/w1GycASCe5aV2jzIq6MwTNd4xPf0wk9QqtIzFt9nfUEfl2Nv+i3Zun/xEcqC2
 IqcBUNPrmSq3j0hg8bI/y1Zk61QgGTxK4jHnFozltDA9aOtyFP6vNg8ab/3ooyBw
 Cj+iVNHf8pL6/ACRH9OcfodILyQcaTYmiWqBvmKwu5+MgHI6WRbXw7QBeixW4gAR
 ogIoieLcUqdJxMBaudkp4TNtyYvn0vvJjaS368xl/swM/A3hucjJdLhOO7dgA+Hl
 SCRKBvMaoNpIhM1kj38=
 =f/35
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmbhWxcACgkQYKtH/8kJ
 UieLRA//fv0PpQxPbv4iD5AUrk6iqESIJH2whZPnRjmkSrkJ02nqu+9HYKqBpFdY
 sZL4pY+ujM48/hfwNG6GCZXYYZCBuoanLbS+pYXm6l7ufmk34ysIIvsx6EcdzHx3
 +ivsNnytBAWUzmUgkTgpbzHLfjCqoQ9X4kZc/kzA14hH6Ll6pqPwUOSYvtRBlDs9
 2r+f1HVj9uWciLoXjmd7vbtsSeBRzatbptk2KE+9hB9l1dK4iAZVHpT0WQGFRUg5
 0Md0o50hnS94LHMXVtPi7di/bXyVNWQxJcs+1mBTpnqGJIAWpqJkdjy95FHvtRaq
 8Em1tP2jp6c50FEa3Ijfram0uyVF+kvfYbcjSvwRKnTk+XJp1dGKnt9rD/ubNs0g
 FSwD/RbsowHtGSiTFdyzRtE1XMYBpC+DfrZUOwgL+QYubYNEN6t5SieNIwUaiGPG
 yHB67XHn51eREPK07NtTu2l6XwgzeY2SwOR1rsSx7IHWxG7WqJm4Xg8+sZW6muup
 8xqQADACAp5+jCi+PN9O+ZQ/Rzpmc92SdhjTsJF+cGVx6JwgsFkEaLDxYWi3Lkf0
 skGA9tQUc/Zq+FUzYRPm23RvFU8Czc1XDulpf+QHB5od0so4Z4ocPNdvPLCmnv+N
 YiTmrLpwXXxqONfr3vNl9yKm+mjnnbcz69IVPfgeksKtMPMrB0M=
 =qG9s
 -----END PGP SIGNATURE-----

Merge tag 'v6.11-next-soc' of https://git.kernel.org/pub/scm/linux/kernel/git/mediatek/linux into soc/drivers

pmic warpper:
- reduce size by constifying data structures
- use devm_clk_bulk_det_all_enable

mutex:
- reduce size by changing variable bit size

* tag 'v6.11-next-soc' of https://git.kernel.org/pub/scm/linux/kernel/git/mediatek/linux:
  soc: mediatek: mtk-mutex: Reduce type size for mtk_mutex_data members
  soc: mediatek: pwrap: Use devm_clk_bulk_get_all_enable()
  soc: mediatek: pwrap: Constify some struct int[]
  soc: mediatek: pwrap: Constify struct pmic_wrapper_type

Link: https://lore.kernel.org/r/bfa9ab87-9de8-41fc-bfd1-de5ec324cfe0@gmail.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-09-11 08:55:51 +00:00
Arnd Bergmann
249d30b515 Amlogic drivers changes for v6.12:
- Support new Amlogic SoCs in meson-gx-ao-secure & meson-gx-socinfo
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEPVPGJshWBf4d9CyLd9zb2sjISdEFAmbZpzYACgkQd9zb2sjI
 SdEKrA//dmv5QdrxkmLHtuHtbUhq3f6FNcgi0NtsgSZq5q0DQFpBu7c8mj8DmSyz
 AfYxpchv8gKY/3aYn0bXjEpPLSPD/CNwi0iehG3MnHiQBSJh9Ab/9fk6u/GODewG
 mYLKZRcHpWVqtrqlsUrWPGaBZpUdYuLbDJGIzitnAvKJicqMVAk/zBRL7Zdpad5W
 zhhOw3uOah1l1ErysueOy2XS4XZeZJN7etFyjz/mPMYi80fjbtyheAUvzAMX9Nk8
 SBZwuh+KdoKvpPcogGCNhR5RqmUPqk9qfVyyBIniYjNdL6WGTJcEBPk8SFt6zHE6
 br9Eqr37BRMVZVcoDhY5Y3S9ZppGVEPgPPg3XR0HmRISNfj8A6qzw3cuoeO/qy+k
 nP4vJ7fp7oxCA4JLEfw+f8OaLteuG1E5PjTJbk55TL4VSSVKD8ciDKpl7moyAWKv
 0CRHxNzUB/CYHJjpwXdg+JzXH6u5CAEvD4ZFFnRaeMvm0S/TZ8rZFHN38PIwtlRj
 bqs2youXEYRY5Tibg7JYdSNk6R78FUWNtIpPmPB08/4k+Xw1vvwFgOpF3f3l9vCZ
 X15m4HB2AQjeGz3xoJW7CE51OJnJSsuH5bakUPPD/+hHwamuY8ti143ffr2Hr2or
 jeX9tb6dZWwzK2xAvElOd1JVKzBEUEmefZ+j3rSPAhN23q0pXIk=
 =5Dbf
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmbZwpcACgkQYKtH/8kJ
 UifkHhAAzGUlmsTEAYmYDf+xdfcZ6OFMl3jtX7XXAG3R6HV7Ney3aF97OhB5kRz2
 G8NW9Fg7wIVPd/LlJY1try2LZJdRvJvUgt7E6oaFHArmBXwaFHOUeh23NYLCa3as
 g8gAyPyj8ZDoQoLyfesc83JdI5MocJdmlw6w8KmY6fLv6dJ2nM0Jts4P8a7MT+UQ
 qa9KyiwHIs1oWSX6Uw9fZg7XXFU5n6d2OzIquJPtHfKJ1SmIedN7i1bmOHyc3sRi
 uzp6nK4sCQfaBcs7jm33njtsYQaWsdJZhg5zpdZmXxoFbUlkwfkOQhLpp3WuOYqU
 f3PDC14U/q4PYybGcKJtTdBt+OVtedqZsKJNCdd1+N9O1kD+KqzbY9b/vWoHol3n
 eaQVb/EI2eA3HIMoWgkf5GQIFlUKeST2rxu7MEH8VIe7//Q7Ag3Bp4abSRtcX9XV
 hJDcdVmAcvVcYzsuEFd4LCj4NzpG5B3Q8iZk6JIRMpDFB7a+Xg54IPAM+rKVj5pv
 LfjG6dGob0KEfGtyrtJE3g7tPmnWblhTvU4MxQgCxGd5bP5nz9hl1yx1Wq1sQ3Bs
 LggYO+NuZcp0fBMJfK03Xsm1nNFUn8xatw09uIcQFXiksb25UOJIuwZkwR3insE5
 9N6nu8N5OctucqdG/n8jgtdUuJbERpjRdmd+udsZAGGndWfM6zg=
 =7dty
 -----END PGP SIGNATURE-----

Merge tag 'amlogic-drivers-for-v6.12' of https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux into soc/drivers

Amlogic drivers changes for v6.12:
- Support new Amlogic SoCs in meson-gx-ao-secure & meson-gx-socinfo

* tag 'amlogic-drivers-for-v6.12' of https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux:
  soc: amlogic: meson-gx-socinfo: add new SoCs id
  dt-bindings: arm: amlogic: meson-gx-ao-secure: support more SoCs

Link: https://lore.kernel.org/r/577ad7fe-19b1-468a-b994-573855493fd7@linaro.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-09-05 14:39:18 +00:00
Arnd Bergmann
6d67480404 Qualcomm driver updates for v6.12
Support is added for making SCM driver configure the system either for a
 full or minimal ramdump following a system crash. The ramdump mode is
 changed from being enable-only to enable/disable as requested.
 
 The QSEECOM uefisecapp interface is allow-listed on Surface Laptop 7 and
 Lenovo Thinkpad T14s, providing EFI variable access.
 
 The change to match the SMD RPM driver based on the SMD channel name is
 reverted, in favor of stepping back to OF-based matching, as a means to
 get module autoloading to work properly.
 
 AOSS, APR, ICE, OCMEM, PBS and SMP2P drivers has error handling cleaned
 up using scoped resources.
 
 Trace events are added to the BWMON and SMP2P drivers, for better
 insights into their operations.
 
 The X1E LLCC configuration data is updated based on recommended values.
 
 A number of platforms are added to the in-kernel PD-mapper.
 
 SocInfo driver is extended with IDs from SM7325, QCS8275 and QCS8300
 families.
 -----BEGIN PGP SIGNATURE-----
 
 iQJJBAABCAAzFiEEBd4DzF816k8JZtUlCx85Pw2ZrcUFAmbYs3AVHGFuZGVyc3Nv
 bkBrZXJuZWwub3JnAAoJEAsfOT8Nma3FjywP/1IDWiKrOrIBYc6ndmssYrQLzlRw
 SSt/Q0YjPKogxl4qwTjTQUmBI/1I+vOa7kf9i0/BNpuslnhJYW51r9bZrcI0n3PW
 P1Pm7J32WGOIauFU9XoGmqzdlPBCVZKcfeCV3n9xTvF0pAipQqz46+O5mVg77jVU
 L5MaVIr4guk/glBJTym97KOlkSSbBsSmheistxiBJUIkUlZqX3YwBQE0Cih1VYOn
 DcQy29EjTpxhbLqI5BqFN3iJqGaV3RS32hL9hM8nYlXth0u8ZBy/H9AEViEK8M1K
 YakDoRkGyihj0M7oFV405yJdSskEbTBlxAfX7LH7x37XocRpsFf+u/Ti8VWxLMnt
 VUciuWA8bg6LnhMK1tQKEGM+3Wp2NZDJStKtV+OnYkvWbKN9QwS4DyiWdPvJGsgJ
 j4qq4B3nF3JU8Pu8Ih59LtPPFTa9/jMkOkqmF7smNehji8gjzHmkAhw6fWPCE5+h
 p8EC/XrYvXCwkBwPWE5vopip8CIpl3bMPb5bbHYGb4NuY59ztht40EExYxnhQzoN
 3ezg+J2jIEaG/HQiBcxt0NrjyLRzkWJVryRxigg1co8Alcmxh7B1UNshiWRI70MA
 P3Emjh8Snixnp7ZD5O5hyiJ4yahomsfuCoDjVL6Vk4AYjon4ZjZ8pgcGBLgB1gry
 Zvkj5b5vc+8VNHnd
 =hZ0b
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmbZvJUACgkQYKtH/8kJ
 Uice9w//SXO0VlWitafyNuWwwqZfWZY953j2sjAjPWC2OWLGgjTQPL2sDKaOnvWG
 FRl8dZmYRcaEb7C7NeWvs1QrUztvxKDXOCDKlmt82EotyBlH1vLFWJK5KJ3oO0sD
 0kQLWDr/KS/QIooXT/PcoFJ0mkpMqYKWV+XLLi+NDQsScMZsGyhZiDdv+qwX3qBw
 9lt/srB1VfgW8gBrOGAxmS/WDQ4wup7/KPNpaUTIdPR8JMNFgoMCVY03LkB+FCcM
 4s/MeecFzHavshFnZqcWzppf1FNX70lcaWEcbbNopM/bekZICFjGWZGoi+tK/8fZ
 WFj3OWZwDGYtxkYjT9M/zvxEJK2xDLosIOICV1dm+OcUN6LAXwknHBuCGMMNDQI1
 jOQjZBXn3A+aT/Amy5GpKV0ci4K/tTI6AfBGdlZJq9jsQOMfP8Cygsv6leRp3dpJ
 06v2ifSWUTv8+ucwYn/Oz0rZDZAe8ucswybzQo0lyor4Qg8lTZJFIU6iNoT/ZCCZ
 wlNg7t1OfkGGr08SuiAhV6+c5/CK2WivxCfKfZjw8+iMLJXyjE57fnf2HaU9Yfwp
 iJrV1euITVkLjmyMCg2YJSyWVl8O43T+LBcqreZel2iDJOBgY84zfk5hB/2sLLXj
 bo3H9QHD7IlQ3yOafT8zuxtanw3cJfBId34afsYD8h9khVz8OmI=
 =6GV4
 -----END PGP SIGNATURE-----

Merge tag 'qcom-drivers-for-6.12' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into soc/drivers

Qualcomm driver updates for v6.12

Support is added for making SCM driver configure the system either for a
full or minimal ramdump following a system crash. The ramdump mode is
changed from being enable-only to enable/disable as requested.

The QSEECOM uefisecapp interface is allow-listed on Surface Laptop 7 and
Lenovo Thinkpad T14s, providing EFI variable access.

The change to match the SMD RPM driver based on the SMD channel name is
reverted, in favor of stepping back to OF-based matching, as a means to
get module autoloading to work properly.

AOSS, APR, ICE, OCMEM, PBS and SMP2P drivers has error handling cleaned
up using scoped resources.

Trace events are added to the BWMON and SMP2P drivers, for better
insights into their operations.

The X1E LLCC configuration data is updated based on recommended values.

A number of platforms are added to the in-kernel PD-mapper.

SocInfo driver is extended with IDs from SM7325, QCS8275 and QCS8300
families.

* tag 'qcom-drivers-for-6.12' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: (33 commits)
  firmware: qcom: scm: Allow QSEECOM on Surface Laptop 7 models
  dt-bindings: soc: qcom: qcom,pmic-glink: Document SM7325 compatible
  soc: qcom: pd_mapper: Add SM7325 compatible
  soc: qcom: socinfo: Add Soc IDs for SM7325 family
  dt-bindings: arm: qcom,ids: Add IDs for SM7325 family
  soc: qcom: socinfo: add QCS8275/QCS8300 SoC ID
  dt-bindings: arm: qcom,ids: add SoC ID for QCS8275/QCS8300
  soc: qcom: smp2p: use scoped device node handling to simplify error paths
  soc: qcom: pbs: use scoped device node handling to simplify error paths
  soc: qcom: ocmem: use scoped device node handling to simplify error paths
  soc: qcom: ice: use scoped device node handling to simplify error paths
  soc: qcom: aoss: simplify with scoped for each OF child loop
  soc: qcom: apr: simplify with scoped for each OF child loop
  soc: qcom: smd-rpm: add qcom,smd-rpm compatible
  dt-bindings: soc: qcom: smd-rpm: add generic compatibles
  Revert "soc: qcom: smd-rpm: Match rpmsg channel instead of compatible"
  firmware: qcom: scm: Add multiple download mode support
  firmware: qcom: scm: Refactor code to support multiple dload mode
  soc: qcom: pd_mapper: Add more older platforms without domains
  soc: qcom: pd_mapper: Add X1E80100
  ...

Link: https://lore.kernel.org/r/20240904193042.15118-1-andersson@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-09-05 14:13:41 +00:00
Arnd Bergmann
3b42530638 Microchip AT91 SoC updates for v6.12
It contains:
 - support for the Microchip SAM9X7 SoC:
 -- power management
 -- SoC identification
 -- sysreg documentation updates
 -- necessary Kconfig updates
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQTsZ8eserC1pmhwqDmejrg/N2X7/QUCZtMiTwAKCRCejrg/N2X7
 /W78AP9+to1Ma9E6F97THV3DE1qUQltEY+G0Ms2ZJNXy61lX0AEAgUk7u7tIpxfL
 6aMRYhAWG/lUMAKFt3AWZSWLxhUzKAY=
 =vq3+
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmbZvHoACgkQYKtH/8kJ
 Uiemzw//Y2DRc8xF8cFX6ZudKwSFykIs6MghUwYsoGGUDikFzl/mgBTqQ3qOCb3N
 iS1I5EVEuI4IKgTk11PCU7tDXg6NHXbiFS7vMJhh0MtrZk+b6EO+GVJKbaLGi53P
 /OKOYe3ZZec37ZfHb8jRr1sZ380bcGHLLxfepQN8luP8b/+Nc7+fjWp7BKcg2H6g
 O4d86lt60jRFI4DMNNPJsWatalfMCAEficqzrOiv/tbZ324ab0IhbS92EWef+lAC
 0zq4jMffG5d4RVyHJSB45lij3JWxpaioNPYZBdv+h5U4c8CmfknFwcBqiwZa7mqT
 B75DO+QHa+Mofbu+tjOpmPeamIuf262d5lHHDzSAqzxy5VCzoXdslbtQCd7qT1UQ
 Zf6t4PlCylSo/IJ3w2dxMARviDfF4ebujsQ1coXYEd+mXjrO9EvqVaBRRLvsefPg
 4Irsf0zaOU4rSCdrTWkKaNh6gJRHhZ1sP2OOdJ4F+Gd5/mcyGe9gNjWdFjGqFcjb
 /SnO9TOtoH+DZjibe9beJu1cjpO13TXgQ2RjcfeKtcXq4gdV3SVsl9oaOUqZFDtC
 VtKQHRWm9PYHWi2qfAsVzPbVoBECys7m7HVOadBGD5Ayo11Yv2+jduW8x4qVK/QH
 l9iqiLFRYdRnVhIsFfOrGxBTmG4bdG8BdGHxXlvkje15SDYh3Cs=
 =FOWc
 -----END PGP SIGNATURE-----

Merge tag 'at91-soc-6.12' of https://git.kernel.org/pub/scm/linux/kernel/git/at91/linux into soc/drivers

Microchip AT91 SoC updates for v6.12

It contains:
- support for the Microchip SAM9X7 SoC:
-- power management
-- SoC identification
-- sysreg documentation updates
-- necessary Kconfig updates

* tag 'at91-soc-6.12' of https://git.kernel.org/pub/scm/linux/kernel/git/at91/linux:
  ARM: at91: Kconfig: add config flag for SAM9X7 SoC
  ARM: at91: add support in SoC driver for new sam9x7
  ARM: at91: pm: add sam9x7 SoC init config
  ARM: at91: pm: add support for sam9x7 SoC family
  dt-bindings: atmel-sysreg: add sam9x7

Link: https://lore.kernel.org/r/20240901133110.2038675-3-claudiu.beznea@tuxon.dev
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-09-05 14:13:14 +00:00
Herve Codina
dc2b17fbd5
soc: fsl: qe: ucc: Export ucc_mux_set_grant_tsa_bkpt
When TSA is compiled as module the following error is reported:
  "ucc_mux_set_grant_tsa_bkpt" [drivers/soc/fsl/qe/tsa.ko] undefined!

Indeed, the ucc_mux_set_grant_tsa_bkpt symbol is not exported.

Simply export ucc_mux_set_grant_tsa_bkpt.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202409051409.fszn8rEo-lkp@intel.com/
Signed-off-by: Herve Codina <herve.codina@bootlin.com>
Acked-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-09-05 14:12:15 +00:00
Arnd Bergmann
b1cd063981 TI SoC driver updates for v6.12
- pm33xx/knav_qmss_queue/pruss: Cleanups around device_node scope based cleanups
 - knav: Additional fixes around of property
 - k3-ringacc: Optimizations for data structure
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEE+KKGk1TrgjIXoxo03bWEnRc2JJ0FAmbXKZQACgkQ3bWEnRc2
 JJ1zjg//eKhFYh7lXHPUgq0HdmnT4nsmsGk3VI9zAiyz/vEeMX5L1WfmolrQSjsM
 Tnak6/6Chg6nA8IlO26VcthKBY1C3CmExkAX28kgHYPfIm43LeQ3sYmoE9PmmufH
 dAErNTeFmuVXk+cWx560GK0XwbIS3Jtv+9I1DLsPUq8u8oCu0LrARY0fzrxx5n6h
 v9IvEiLwkARGRLdhyNOENZZ50onefHiB0N6t/SPwIfHAjATItvDbwRJJ8K3zYlqz
 x9FrraYuRfKj9QAyLQq6WQoPgHanolwQhHwnEouaosjy4kA1v/koyoN/ZRrCKb0j
 QehD9fRZr0aFzsxXetnhUGpRMb56Va3AiQ5Ghy9Je86JrYij4hjF/1O326to6rUs
 shoxM8LY7Vla6VvCCEGARy2qaJS3maV/u41LDvKKX3PkIxA6GZu+wfd9VGgM3jt9
 1jU2AiYHkw/BgaZIh9N9t3S9VqbpR8ry9a+UIPY6dLwIhXPjK8yKkarhcbY+hfV7
 ci3j5idoGGlIyegczgxjCEt2aAWAzTnjreftFgpmPLblufGUtjim0UQULPSjfKc/
 C/CuRJhQqQsrx6Skge8/NkpD8tsvl0agGjmtyNtM6j3uj3SeQZeBp2UYE3XpsI+i
 ZqGxZOkOyI4vbYnZhMY1OXGE3fZvONwk5bQ0kQkEC4pEOIBbnec=
 =nmZf
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmbYLLcACgkQYKtH/8kJ
 UifbDQ/+KZjsDFQTvErtJ5s9NA0/6/AkdkGAUymccd9BqVQ1yBU+c0ti/RahTgOK
 neKYg0iomagQOW4+ufXyLQkEXTvJwKCGlbr4S4kRKiI+RGd5B86/JU19zKgLvNLd
 ZFZX9jYi0vqWR4o9qjDiMK5azdauXXJecXKuONtI8tHeX0qKNbXREzQxNkllUhDg
 6OWGKs6ZQGT21OazXHmwsdFnHBbTzGiyqitIHXW/Uk6OQVHSWIMKd7HuwMXtXfqd
 p4OEdBBGcIEytfd+UNcOj+YGxFLx2GZEejaWSZLBYw7/qAbI/ilIsSxSejfHM/kh
 fxE2a13CcHlMNNJo57MBRwae/AqSj18il48Xi01dWDuVyqAlE1rOCQFX3Klp5vuV
 2aojFIpgbx5yCNTaw678u4nLxiDcJ7diZcPwPtkw5KGV2ERX+Zd/vFPZyEFJzVrC
 4huM1OzEv0QqDZ/8XUpS2dQ7BbnEZePdevSjgNwY3cdzgGLZoRQTspEhdutG6ENA
 vKzmKgpgtsy+qIMUQmrNCglf7v0XJ49BG6NL+l8D5W8hbSzRi19xZ6Qo0u7BDixi
 +chdNVJuVd+OUr+wLGaXwaZr5nZT/JpPuIw4h0RuaFM8ot/Kx18y/O2O3dPqFg3m
 veVt49giWFRyZBb5Q4aJQ2CaitSwVWiVhnsHZr3yAR4Yd9NZwCA=
 =5Idy
 -----END PGP SIGNATURE-----

Merge tag 'ti-driver-soc-for-v6.12' of https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux into soc/drivers

TI SoC driver updates for v6.12

- pm33xx/knav_qmss_queue/pruss: Cleanups around device_node scope based cleanups
- knav: Additional fixes around of property
- k3-ringacc: Optimizations for data structure

* tag 'ti-driver-soc-for-v6.12' of https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux:
  soc: ti: pm33xx: do device_node auto cleanup
  soc: ti: knav_qmss_queue: do device_node auto cleanup
  soc: ti: pruss: do device_node auto cleanup
  soc: ti: pruss: factor out memories setup
  soc: ti: knav: Use of_property_read_variable_u32_array()
  soc: ti: knav: Drop unnecessary check for property presence
  soc: ti: k3-ringacc: Constify struct k3_ring_ops

Link: https://lore.kernel.org/r/20240903155632.525twuumykwnfkiz@subtitle
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-09-04 09:47:35 +00:00
Christophe Leroy
d205c06a32 soc: fsl: cpm1: qmc: Fix dependency on fsl_soc.h
QMC driver requires fsl_soc.h to use function get_immrbase().
This header is provided by powerpc architecture and the functions
it declares are defined only when FSL_SOC is selected.

Today the dependency is the following:

	depends on CPM1 || QUICC_ENGINE || \
		   (FSL_SOC && (CPM || QUICC_ENGINE) && COMPILE_TEST)

This dependency tentatively ensure that FSL_SOC is there when doing a
COMPILE_TEST.

CPM1 is only selected by PPC_8xx and cannot be selected manually.
CPM1 selects FSL_SOC

QUICC_ENGINE on the other hand can be selected by ARM or ARM64 which
doesn't select FSL_SOC. QUICC_ENGINE can also be selected with just
COMPILE_TEST.

It is therefore possible to end up with CPM_QMC selected
without FSL_SOC.

So fix it by making it depend on FSL_SOC at all time.

The rest of the above dependency is the same as the one for CPM_TSA on
which CPM_QMC also depends, so it can go away, leaving only a simple
dependency on FSL_SOC.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Closes: https://lore.kernel.org/lkml/20240904104859.020fe3a9@canb.auug.org.au/
Fixes: 8655b76b70 ("soc: fsl: cpm1: qmc: Handle QUICC Engine (QE) soft-qmc firmware")
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Acked-by: Herve Codina <herve.codina@bootlin.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-09-04 09:30:53 +00:00
Arnd Bergmann
a0e199ecf9 - A series from Hervé Codina that bring support for the newer version
of QMC (QUICC Multi-channel Controller) and TSA (Time Slots Assigner)
 found on MPC 83xx micro-controllers.
 
 - Misc changes for qbman freescale drivers for removing a redundant
 warning and using iommu_paging_domain_alloc()
 -----BEGIN PGP SIGNATURE-----
 
 iJIEABYKADoWIQQQ/+b4s5DeF6zCYyNoqS/rAbjdeAUCZtapTxwcY2hyaXN0b3Bo
 ZS5sZXJveUBjc2dyb3VwLmV1AAoJEGipL+sBuN14I48A/03qjl8XZiNs8OEqjEt3
 ubo2NcFBXO20FadLfJfhgPqWAQC3xKuhLGXf0rn8yHtTol8fmYKbt8H58/D6nAPF
 T1qiBw==
 =rYkp
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmbWtFAACgkQYKtH/8kJ
 UiffHw/5AR9xaPWmwSbBa7CSFwRJL1OwNrSjhxAq4+J63FxUaQhAmW9ED8pdPJSw
 BP3n3ma3WvDWDzzN5LN0P8PmjWceDQ5K3rUPjqz2TmT7V6CnzlVzfb9fInhcCCAv
 84ThxgZ9LQVC1vpV/4Po9iV2dnYG+4T8CSUSY6ASl5UcWkTfuGRqHTJTdIe3E6+q
 lG+LhVX2Hl7O4QOmkkjBIpAy0FcxPNoRznmiekFhWEKFX6AOr+utGCjsCWPksEf1
 ScPQwSVKnZ7o9bQhacn9T0E+CA6pVH9VWuS3OUdiBmGYGM9imrj+l+ym8JVHzFdr
 OLfY1ZcqEWrARfvK9G7QvWoEeOyyL9xH9vKHh/YxQUdrv39bi8Z64Trh1EIIOhnY
 ToJtqNsijzLPVyCndLn9fm+qqU6XKUJ+Ms2kj3kHpoMcwTx16qidGJsQu0CZw+R3
 uw89bz0H0xKpvn3sv50zHiMgBuN78G2hKo9JI/IHgpI/X7xAFrBvrZLdAJ13bvu8
 644X8H04/fWx1o2NCh/ECpJeBBVxD2b6s8Y2j7PKcGiiy3SBUHfeayB+ipHMT7lK
 q9Ei4P1nUBWMSRULhs8Dr5oJiZKRBoUqnF2rjWz3XkK5UusmrxagPeykv8DlqC+R
 EVW6g6xBCjE3qIgkcnA4OBZtxcj0/xXAf/Se2nomsz1P1vziVec=
 =7DGO
 -----END PGP SIGNATURE-----

Merge tag 'soc_fsl-6.12-2' of https://github.com/chleroy/linux into soc/drivers

- A series from Hervé Codina that bring support for the newer version
of QMC (QUICC Multi-channel Controller) and TSA (Time Slots Assigner)
found on MPC 83xx micro-controllers.

- Misc changes for qbman freescale drivers for removing a redundant
warning and using iommu_paging_domain_alloc()

* tag 'soc_fsl-6.12-2' of https://github.com/chleroy/linux: (38 commits)
  soc: fsl: qbman: Remove redundant warnings
  soc: fsl: qbman: Use iommu_paging_domain_alloc()
  MAINTAINERS: Add QE files related to the Freescale QMC controller
  soc: fsl: cpm1: qmc: Handle QUICC Engine (QE) soft-qmc firmware
  soc: fsl: cpm1: qmc: Add support for QUICC Engine (QE) implementation
  soc: fsl: qe: Add missing PUSHSCHED command
  soc: fsl: qe: Add resource-managed muram allocators
  soc: fsl: cpm1: qmc: Introduce qmc_version
  soc: fsl: cpm1: qmc: Rename SCC_GSMRL_MODE_QMC
  soc: fsl: cpm1: qmc: Handle RPACK initialization
  soc: fsl: cpm1: qmc: Rename qmc_chan_command()
  soc: fsl: cpm1: qmc: Introduce qmc_{init,exit}_xcc() and their CPM1 version
  soc: fsl: cpm1: qmc: Introduce qmc_init_resource() and its CPM1 version
  soc: fsl: cpm1: qmc: Re-order probe() operations
  soc: fsl: cpm1: qmc: Introduce qmc_data structure
  dt-bindings: soc: fsl: cpm_qe: Add QUICC Engine (QE) QMC controller
  soc: fsl: cpm1: qmc: Add missing spinlock comment
  soc: fsl: cpm1: qmc: Fix 'transmiter' typo
  soc: fsl: cpm1: qmc: Remove unneeded parenthesis
  soc: fsl: cpm1: qmc: Fix blank line and spaces
  ...

Link: https://lore.kernel.org/r/326d9a7d-7674-4c28-aa40-dd2c190244dd@csgroup.eu
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-09-03 07:01:36 +00:00
Christophe Leroy
7a99b1c0bc Merge branch 'support-for-quicc-engine-tsa-and-qmc'
Herve Codina says:

================
This series add support for the QUICC Engine (QE) version of TSA and QMC
components.

CPM1 version is already supported and, as the QE version of those
component are pretty similar to the CPM1 version, the series extend
the already existing drivers to support for the QE version.

The TSA and QMC components are tightly coupled and so the series
provides modifications on both components.
Of course, this series can be split if it is needed. Let me know.

The series is composed of:
- Patches 1 and 2: Fixes related to TRNSYNC in the QMC driver
- Patches 3..6: Fixes of checkpatch detected issues in the TSA driver
- Patch 7: The QE TSA device-tree binding
- Patches 8..13: TSA driver preparations for adding support for QE
- Patches 14 and 15: The support for QE in TSA + MAINTAINERS update
- Patch 16: A TSA API improvement needed for the QE QMC driver
- Patch 17: A clarification in the QE QMC driver
- Patches 18..22: Fixes of checkpatch detected issues in the QMC driver
- Patch 23: The QE QMC device-tree binding
- Patches 24..31: QMC driver preparations for adding support for QE
- Patches 32 and 33: Missing features additions in QE code
- Patches 34..36: The QMC support for QE in QMC + MAINTAINERS update

Compared to the previous iteration, this v2 series updates device-tree
bindings and fixes issues detected by kernel test robots.

Related to the QE QMC device-tree binding, I kept the unit address in
decimal and the 3 compatible strings.
================

Link: https://lore.kernel.org/r/20240808071132.149251-1-herve.codina@bootlin.com
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Tested-by: Christophe Leroy <christophe.leroy@csgroup.eu>
2024-09-03 07:51:34 +02:00
Xiaolei Wang
e266aa8b35 soc: fsl: qbman: Remove redundant warnings
This warning was added by commit 07f86917a4 ("soc/fsl/qbman: Use
shared-dma-pool for QMan private memory allocations") but
RESERVEDMEM_OF_DECLARE usage was removed by
commit 3e62273ac6 ("soc: fsl: qbman: Remove RESERVEDMEM_OF_DECLARE
usage") . For non-popwerpc platforms, such as ls1043, this warning
is redundant. ls1043 itself uses shared-dma-mem.

Fixes: 3e62273ac6 ("soc: fsl: qbman: Remove RESERVEDMEM_OF_DECLARE usage")
Signed-off-by: Xiaolei Wang <xiaolei.wang@windriver.com>
Link: https://lore.kernel.org/r/20240802021651.3854295-1-xiaolei.wang@windriver.com
[chleroy: Added more details in commit message]
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
2024-09-03 07:50:57 +02:00
Lu Baolu
77a1a51308 soc: fsl: qbman: Use iommu_paging_domain_alloc()
An iommu domain is allocated in portal_set_cpu() and is attached to
pcfg->dev in the same function.

Use iommu_paging_domain_alloc() to make it explicit.

Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Link: https://lore.kernel.org/r/20240610085555.88197-14-baolu.lu@linux.intel.com
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
2024-09-03 07:50:57 +02:00
Herve Codina
8655b76b70 soc: fsl: cpm1: qmc: Handle QUICC Engine (QE) soft-qmc firmware
The QUICC Engine (QE) QMC can use a firmware to have the QMC working in
'soft-qmc' mode.

Handle this optional 'soft-qmc' firmware.

Signed-off-by: Herve Codina <herve.codina@bootlin.com>
Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Link: https://lore.kernel.org/r/20240808071132.149251-36-herve.codina@bootlin.com
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
2024-09-03 07:49:21 +02:00
Herve Codina
eb680d5630 soc: fsl: cpm1: qmc: Add support for QUICC Engine (QE) implementation
Add support for the QMC (QUICC Multichannel Controller) available in
some PowerQUICC SoC that uses a QUICC Engine (QE) block such as MPC8321.

This QE QMC is similar to the CPM QMC except that it uses UCCs (Unified
Communication Controllers) instead of SCCs (Serial Communication
Controllers). Also, compared against the CPM QMC, this QE QMC does not
use a fixed area for the UCC/SCC parameters area but it uses a dynamic
area allocated and provided to the hardware at runtime.

Signed-off-by: Herve Codina <herve.codina@bootlin.com>
Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Link: https://lore.kernel.org/r/20240808071132.149251-35-herve.codina@bootlin.com
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
2024-09-03 07:49:20 +02:00
Herve Codina
c6f39c7c16 soc: fsl: qe: Add resource-managed muram allocators
Introduce devm_cpm_muram_alloc() and devm_cpm_muram_alloc_fixed(), the
resource-managed version of cpm_muram_alloc and cpm_muram_alloc_fixed().

These resource-managed versions simplify the user avoiding the need to
call cpm_muram_free(). Indeed, the allocated area returned by these
functions will be automatically freed on driver detach.

Signed-off-by: Herve Codina <herve.codina@bootlin.com>
Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Link: https://lore.kernel.org/r/20240808071132.149251-33-herve.codina@bootlin.com
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
2024-09-03 07:49:20 +02:00
Herve Codina
b741b66f1c soc: fsl: cpm1: qmc: Introduce qmc_version
Current code handles the CPM1 version of QMC.

In order to prepare the support for the QUICC Engine (QE) version of
QMC, introduce qmc_version to identify versions. This will enable the
code to make the distinction between several QMC implementations.

Signed-off-by: Herve Codina <herve.codina@bootlin.com>
Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Link: https://lore.kernel.org/r/20240808071132.149251-32-herve.codina@bootlin.com
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
2024-09-03 07:49:20 +02:00
Herve Codina
8f55d06b4c soc: fsl: cpm1: qmc: Rename SCC_GSMRL_MODE_QMC
Current code handles CPM1 version of QMC. Even if GSMRL is specific to
the CPM1 version, the exact same purpose and format register (GUMRL) is
present in the QUICC Engine (QE) version of QMC. Compared to the QE
version, the values defined for the mode bitfield are different and the
0x0A value defined for the QMC mode is CPM1 specific.

In order to prepare the support for the QE version, rename this bitfield
value to clearly identify it as CPM1 specific.

Signed-off-by: Herve Codina <herve.codina@bootlin.com>
Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Link: https://lore.kernel.org/r/20240808071132.149251-31-herve.codina@bootlin.com
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
2024-09-03 07:49:20 +02:00
Herve Codina
278d799caa soc: fsl: cpm1: qmc: Handle RPACK initialization
Current code handles the CPM1 version of QMC, RPACK does not need to
be initialized. This is not the case in the QUICC Engine (QE) version.

In preparation of the support for QE, initialize the RPACK register
when the receiver is initialized and each time it is restarted.

This additional RPACK initialization has no impact in the CPM1 version
of QMC.

Signed-off-by: Herve Codina <herve.codina@bootlin.com>
Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Link: https://lore.kernel.org/r/20240808071132.149251-30-herve.codina@bootlin.com
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
2024-09-03 07:49:20 +02:00
Herve Codina
ef0878a5ba soc: fsl: cpm1: qmc: Rename qmc_chan_command()
Current code handles CPM1 version of QMC and qmc_chan_command() is
clearly CPM1 specific.

In order to prepare the support for the QUICC Engine (QE) version,
rename qmc_chan_command() to reflect that point.

Signed-off-by: Herve Codina <herve.codina@bootlin.com>
Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Link: https://lore.kernel.org/r/20240808071132.149251-29-herve.codina@bootlin.com
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
2024-09-03 07:49:20 +02:00
Herve Codina
de5fdb7d14 soc: fsl: cpm1: qmc: Introduce qmc_{init,exit}_xcc() and their CPM1 version
Current code handles the CPM1 version of QMC and initialize the QMC used
SCC. The QUICC Engine (QE) version uses an UCC (Unified Communication
Controllers) instead of the SCC (Serial Communication Controllers) used
in the CPM1 version. These controllers serve the same purpose and are
used in the same way but their inializations are slightly different.

In order to prepare the support for QE version of QMC, introduce
qmc_init_xcc() to initialize theses controllers (UCC in QE and SCC in
CPM1) and isolate the CPM1 specific SCC initialization in a specific
function.

Also introduce qmc_exit_xcc() for consistency to revert operations done
in qmc_init_xcc().

Signed-off-by: Herve Codina <herve.codina@bootlin.com>
Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Link: https://lore.kernel.org/r/20240808071132.149251-28-herve.codina@bootlin.com
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
2024-09-03 07:49:20 +02:00
Herve Codina
727b3ab490 soc: fsl: cpm1: qmc: Introduce qmc_init_resource() and its CPM1 version
Current code handles the CPM1 version of QMC. Resources initialisations
(i.e. retrieving base addresses and offsets of different parts) will
be slightly different in the QUICC Engine (QE) version. Indeed, in QE
version, some resources need to be allocated and are no more "staticaly"
defined.

In order to prepare the support for QE version, introduce
qmc_init_resource() to initialize those resources and isolate the CPM1
specific operations in a specific function.

Signed-off-by: Herve Codina <herve.codina@bootlin.com>
Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Link: https://lore.kernel.org/r/20240808071132.149251-27-herve.codina@bootlin.com
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
2024-09-03 07:49:20 +02:00
Herve Codina
a13bf60534 soc: fsl: cpm1: qmc: Re-order probe() operations
Current code handles CPM1 version of QMC. In the QUICC Engine (QE)
version, some operations done at probe() need to be done in a different
order.

In order to prepare the support for the QE version, changed the sequence
of operation done at probe():
- Retrieve the tsa_serial earlier, before initializing resources.
- Group SCC initialisation and do this initialization when it is really
  needed in the probe() sequence.

Having the QE compatible sequence in the CPM1 version does not lead to
any issue and works correctly without any regressions.

Signed-off-by: Herve Codina <herve.codina@bootlin.com>
Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Link: https://lore.kernel.org/r/20240808071132.149251-26-herve.codina@bootlin.com
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
2024-09-03 07:49:20 +02:00
Herve Codina
d23ae9f181 soc: fsl: cpm1: qmc: Introduce qmc_data structure
Current code handles CPM1 version of QMC. Some hardcoded values are used
several times to initialize the QMC state machine. In the QUICC Engine
(QE) version of QMC, these values are different.

In order to prepare the support for the QE version of QMC and avoid the
copy of the hardcoded values, introduce the qmc_data structure to define
these version specific values.

Signed-off-by: Herve Codina <herve.codina@bootlin.com>
Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Link: https://lore.kernel.org/r/20240808071132.149251-25-herve.codina@bootlin.com
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
2024-09-03 07:49:19 +02:00
Herve Codina
211ddf7cc3 soc: fsl: cpm1: qmc: Add missing spinlock comment
checkpatch.pl raises the following issue
  CHECK: spinlock_t definition without comment

Add the missing comments.

Signed-off-by: Herve Codina <herve.codina@bootlin.com>
Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Link: https://lore.kernel.org/r/20240808071132.149251-23-herve.codina@bootlin.com
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
2024-09-03 07:49:19 +02:00
Herve Codina
e49dd637e0 soc: fsl: cpm1: qmc: Fix 'transmiter' typo
checkpatch.pl raises the following issue
  CHECK: 'transmiter' may be misspelled - perhaps 'transmitter'?

Indeed, fix it.

Signed-off-by: Herve Codina <herve.codina@bootlin.com>
Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Link: https://lore.kernel.org/r/20240808071132.149251-22-herve.codina@bootlin.com
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
2024-09-03 07:49:19 +02:00
Herve Codina
1934f6aa5e soc: fsl: cpm1: qmc: Remove unneeded parenthesis
checkpatch.pl raises the following issue in several places
  CHECK: Unnecessary parenthesis around ...

Remove them.

Signed-off-by: Herve Codina <herve.codina@bootlin.com>
Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Link: https://lore.kernel.org/r/20240808071132.149251-21-herve.codina@bootlin.com
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
2024-09-03 07:49:19 +02:00
Herve Codina
f06ab938bc soc: fsl: cpm1: qmc: Fix blank line and spaces
checkpatch.pl raises the following issues
  CHECK: Please don't use multiple blank lines
  CHECK: Alignment should match open parenthesis

Fix them.

Signed-off-by: Herve Codina <herve.codina@bootlin.com>
Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Link: https://lore.kernel.org/r/20240808071132.149251-20-herve.codina@bootlin.com
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
2024-09-03 07:49:19 +02:00
Herve Codina
44beb343d8 soc: fsl: cpm1: qmc: Use BIT(), GENMASK() and FIELD_PREP() macros
checkpatch.pl signals the following improvement for qmc.c
  CHECK: Prefer using the BIT macro

Follow its suggestion and convert the code to BIT() and related macros.

Signed-off-by: Herve Codina <herve.codina@bootlin.com>
Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Link: https://lore.kernel.org/r/20240808071132.149251-19-herve.codina@bootlin.com
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
2024-09-03 07:49:19 +02:00
Herve Codina
e8344905b3 soc: fsl: cpm1: qmc: Rename QMC_TSA_MASK
QMC_TSA_MASK is a bitfield. The value defined is a specific value of
this bitfield and correspond to the use of 8bit resolution for the
routing entry.

Be accurate and rename the defined constant to reflect this point.

Signed-off-by: Herve Codina <herve.codina@bootlin.com>
Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Link: https://lore.kernel.org/r/20240808071132.149251-18-herve.codina@bootlin.com
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
2024-09-03 07:49:19 +02:00
Herve Codina
3825890981 soc: fsl: cpm1: tsa: Introduce tsa_serial_get_num()
TSA consumers in CPM1 implementation don't need to know about the serial
device number used by the TSA component. In QUICC Engine implementation,
this information is needed.

Improve the TSA API with tsa_serial_get_num() in order to provide this
information.

Signed-off-by: Herve Codina <herve.codina@bootlin.com>
Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Link: https://lore.kernel.org/r/20240808071132.149251-17-herve.codina@bootlin.com
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
2024-09-03 07:49:19 +02:00
Herve Codina
7ac947021d soc: fsl: cpm1: tsa: Add support for QUICC Engine (QE) implementation
Add support for the time slot assigner (TSA) available in some
PowerQUICC SoC that uses a QUICC Engine (QE) block such as MPC8321.

The QE TSA is similar to the CPM1 TSA except that it uses UCCs (Unified
Communication Controllers) instead of SCCs (Serial Communication
Controllers).
Also, compared against the CPM1 TSA, this QE TSA can handle up to 4 TDMs
instead of 2 and allows to configure the logic level of sync signals.

At a lower level, compared against CPM TSA implementation, some
registers are slightly different even if same features are present.

Signed-off-by: Herve Codina <herve.codina@bootlin.com>
Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Link: https://lore.kernel.org/r/20240808071132.149251-15-herve.codina@bootlin.com
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
2024-09-03 07:49:18 +02:00
Herve Codina
572312a5bb soc: fsl: cpm1: tsa: Introduce tsa_version
Current code handles CPM1 version of TSA.

In order to prepare the support for the QUICC Engine (QE) version of
TSA, introduce tsa_version to identify versions. This will enable the
code to make the distinction between several TSA implementations.

Signed-off-by: Herve Codina <herve.codina@bootlin.com>
Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Link: https://lore.kernel.org/r/20240808071132.149251-14-herve.codina@bootlin.com
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
2024-09-03 07:49:18 +02:00
Herve Codina
9c6c022d1c soc: fsl: cpm1: tsa: Isolate specific CPM1 part from tsa_serial_{dis}connect()
Current code handles the CPM1 version of TSA. Connecting and
disconnecting the SCC to/from the TSA consists in handling SICR register
which is CPM1 specific. The connection and disconnection operation in
the QUICC Engine (QE) version are slightly different.

In order to prepare the support for the QE version, clearly identify
SICR register as specific to CPM1 and isolate its handling done in
connect and disconnect functions.

Signed-off-by: Herve Codina <herve.codina@bootlin.com>
Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Link: https://lore.kernel.org/r/20240808071132.149251-13-herve.codina@bootlin.com
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
2024-09-03 07:49:18 +02:00
Herve Codina
8d600cc337 soc: fsl: cpm1: tsa: Introduce tsa_setup() and its CPM1 compatible version
Current code handles the CPM1 version of TSA. Setting up TSA consists in
handling SIMODE and SIGMR registers. These registers are CPM1 specific.

Setting up the QUICC Engine (QE) version of TSA is slightly different.

In order to prepare the support for QE version, clearly identify these
registers as CPM1 compatible and isolate their handling in a CPM1
specific function.

Signed-off-by: Herve Codina <herve.codina@bootlin.com>
Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Link: https://lore.kernel.org/r/20240808071132.149251-12-herve.codina@bootlin.com
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
2024-09-03 07:49:18 +02:00
Herve Codina
8c8e1ba3e9 soc: fsl: cpm1: tsa: Make SIRAM entries specific to CPM1
Current code handles the CPM1 version of TSA. Compared against QUICC
Engine (QE) version of TSA, CPM1 SIRAM entries are slightly different.

In order to prepare the support for the QE version, clearly identify
these entries and functions handling them as CPM1 compatible.

Signed-off-by: Herve Codina <herve.codina@bootlin.com>
Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Link: https://lore.kernel.org/r/20240808071132.149251-11-herve.codina@bootlin.com
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
2024-09-03 07:49:18 +02:00
Herve Codina
58edcace87 soc: fsl: cpm1: tsa: Use ARRAY_SIZE() instead of hardcoded integer values
Loops handling the tdm array use hardcoded size and the initialization
part uses hardcoded indexes to initialize the array.

Use ARRAY_SIZE() to avoid the hardcoded size and initialize the array
using a loop.

Signed-off-by: Herve Codina <herve.codina@bootlin.com>
Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Link: https://lore.kernel.org/r/20240808071132.149251-10-herve.codina@bootlin.com
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
2024-09-03 07:49:18 +02:00