Commit Graph

3756 Commits

Author SHA1 Message Date
Greg Kroah-Hartman
d69d804845 driver core: have match() callback in struct bus_type take a const *
In the match() callback, the struct device_driver * should not be
changed, so change the function callback to be a const *.  This is one
step of many towards making the driver core safe to have struct
device_driver in read-only memory.

Because the match() callback is in all busses, all busses are modified
to handle this properly.  This does entail switching some container_of()
calls to container_of_const() to properly handle the constant *.

For some busses, like PCI and USB and HV, the const * is cast away in
the match callback as those busses do want to modify those structures at
this point in time (they have a local lock in the driver structure.)
That will have to be changed in the future if they wish to have their
struct device * in read-only-memory.

Cc: Rafael J. Wysocki <rafael@kernel.org>
Reviewed-by: Alex Elder <elder@kernel.org>
Acked-by: Sumit Garg <sumit.garg@linaro.org>
Link: https://lore.kernel.org/r/2024070136-wrongdoer-busily-01e8@gregkh
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-07-03 15:16:54 +02: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
Linus Torvalds
89601f675b USB / Thunderbolt changes for 6.10-rc1
Here is the big set of USB and Thunderbolt changes for 6.10-rc1.
 Nothing hugely earth-shattering, just constant forward progress for
 hardware support of new devices and cleanups over the drivers.
 
 Included in here are:
   - Thunderbolt / USB 4 driver updates
   - typec driver updates
   - dwc3 driver updates
   - gadget driver updates
   - uss720 driver id additions and fixes (people use USB->arallel port
     devices still!)
   - onboard-hub driver rename and additions for new hardware
   - xhci driver updates
   - other small USB driver updates and additions for quirks and api
     changes
 
 All of these have been in linux-next for a while with no reported
 problems.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 
 iG0EABECAC0WIQT0tgzFv3jCIUoxPcsxR9QN2y37KQUCZk4E7w8cZ3JlZ0Brcm9h
 aC5jb20ACgkQMUfUDdst+yn0kACgr3uvAWXvfb9R4vCpC65F4f49ZQwAoIkHQBPl
 /5HdrlIIYW2OzdUixH3e
 =e3pI
 -----END PGP SIGNATURE-----

Merge tag 'usb-6.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb

Pull USB / Thunderbolt updates from Greg KH:
 "Here is the big set of USB and Thunderbolt changes for 6.10-rc1.
  Nothing hugely earth-shattering, just constant forward progress for
  hardware support of new devices and cleanups over the drivers.

  Included in here are:

   - Thunderbolt / USB 4 driver updates

   - typec driver updates

   - dwc3 driver updates

   - gadget driver updates

   - uss720 driver id additions and fixes (people use USB->arallel port
     devices still!)

   - onboard-hub driver rename and additions for new hardware

   - xhci driver updates

   - other small USB driver updates and additions for quirks and api
     changes

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

* tag 'usb-6.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (154 commits)
  drm/bridge: aux-hpd-bridge: correct devm_drm_dp_hpd_bridge_add() stub
  usb: fotg210: Add missing kernel doc description
  usb: dwc3: core: Fix unused variable warning in core driver
  usb: typec: tipd: rely on i2c_get_match_data()
  usb: typec: tipd: fix event checking for tps6598x
  usb: typec: tipd: fix event checking for tps25750
  dt-bindings: usb: qcom,dwc3: fix interrupt max items
  usb: fotg210: Use *-y instead of *-objs in Makefile
  usb: phy: tegra: Replace of_gpio.h by proper one
  usb: typec: ucsi: displayport: Fix potential deadlock
  usb: typec: qcom-pmic-typec: split HPD bridge alloc and registration
  usb: musc: Remove unused list 'buffers'
  usb: dwc3: Wait unconditionally after issuing EndXfer command
  usb: gadget: u_audio: Clear uac pointer when freed.
  usb: gadget: u_audio: Fix race condition use of controls after free during gadget unbind.
  dt-bindings: usb: dwc3: Add QDU1000 compatible
  usb: core: Remove the useless struct usb_devmap which is just a bitmap
  MAINTAINERS: Remove {ehci,uhci}-platform.c from ARM/VT8500 entry
  USB: usb_parse_endpoint: ignore reserved bits
  usb: xhci: compact 'trb_in_td()' arguments
  ...
2024-05-22 11:40:09 -07:00
Linus Torvalds
e2b4a5bf32 spi: Updates for v6.10
The diffstat for this release is dominated by the new Airoha driver,
 mainly as a result of this being a generally quite quiet release.  There
 were a couple of cleanups in the core but nothing substantial, the
 updates here are almost all driver specific ones.
 
  - Support for multi-word mode in the OMAP2 McSPI driver.
  - Overhaul of the PXA2xx driver, mostly API updates.
  - A number of DT binding conversions.
  - Support for Airoha NAND controllers, Cirrus Logic CS35L56, Mobileye
    EYEQ5 and Renesas R8A779H0.
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmZB2z0ACgkQJNaLcl1U
 h9CCxgf/ZSy6jKbUejdq/JtdrhVCamaEVQ1X5FAk18wlumQVwFC/Bsntr1hVWDjg
 Ai+G/UYWtfabyVePZKh1zCcoloSuZheHcxAMP+43un1doWcHps6leiPfb9yAysux
 VxeIBfSUOfeFbN697Jz8PDTIhxHMUh0R4QYqqIyrT1RSS0alRZoDyaQpTWied0Nt
 pOUWi9SVt0jm/G+X29a6Q/pFsr0oEJHxZgvriwlJAyzWr1OModFXdTfdK+qMS1Hn
 huafVu4bWCEognGlnXCQSRL94Fxo1nab1PvMuWK2VXNDL7xexqQ33cp4VILZvJo1
 qR9YtiRXpScAmO7f8ccGcSlz8vw5jQ==
 =x3Vz
 -----END PGP SIGNATURE-----

Merge tag 'spi-v6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi

Pull spi updates from Mark Brown:
 "The diffstat for this release is dominated by the new Airoha driver,
  mainly as a result of this being a generally quite quiet release.
  There were a couple of cleanups in the core but nothing substantial,
  the updates here are almost all driver specific ones.

   - Support for multi-word mode in the OMAP2 McSPI driver

   - Overhaul of the PXA2xx driver, mostly API updates

   - A number of DT binding conversions

   - Support for Airoha NAND controllers, Cirrus Logic CS35L56, Mobileye
     EYEQ5 and Renesas R8A779H0"

* tag 'spi-v6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: (87 commits)
  spi: dw: Bail out early on unsupported target mode
  spi: Remove unneded check for orig_nents
  MAINTAINERS: repair file entry in AIROHA SPI SNFI DRIVER
  spi: pxa2xx: Drop the stale entry in documentation TOC
  spi: pxa2xx: Don't provide struct chip_data for others
  spi: pxa2xx: Remove timeout field from struct chip_data
  spi: pxa2xx: Remove DMA parameters from struct chip_data
  spi: pxa2xx: Drop struct pxa2xx_spi_chip
  spi: pxa2xx: Don't use "proxy" headers
  spi: pxa2xx: Remove outdated documentation
  spi: pxa2xx: Move contents of linux/spi/pxa2xx_spi.h to a local one
  spi: pxa2xx: Provide num-cs for Sharp PDAs via device properties
  spi: pxa2xx: Allow number of chip select pins to be read from property
  spi: dt-bindings: ti,qspi: convert to dtschema
  spi: bitbang: Add missing MODULE_DESCRIPTION()
  spi: bitbang: Use NSEC_PER_*SEC rather than hard coding
  spi: dw: Drop default number of CS setting
  spi: dw: Convert dw_spi::num_cs to u32
  spi: dw: Add a number of native CS auto-detection
  spi: dw: Convert to using BITS_TO_BYTES() macro
  ...
2024-05-14 14:41:01 -07:00
Linus Torvalds
0c181b1d97 Power management updates for 6.10-rc1
- Rework the handling of disabled turbo in the intel_pstate driver and
    make it update the maximum CPU frequency consistently regardless of
    the reason on top of a number of cleanups (Rafael Wysocki).
 
  - Add missing checks for NULL .exit() cpufreq driver callback to the
    cpufreq core (Viresh Kumar).
 
  - Prevent pulicy->max from going above the frequency QoS maximum value
    when cpufreq_frequency_table_verify() is used (Xuewen Yan).
 
  - Prevent a negative CPU number or frequency value from being printed
    if they are really large (Joshua Yeong).
 
  - Update MAINTAINERS entry for amd-pstate to add two new submaintainers
    and a designated reviewer (Huang Rui).
 
  - Clean up the amd-pstate driver and update its documentation (Gautham
    Shenoy).
 
  - Fix the highest frequency issue in the amd-pstate driver which limits
    performance (Perry Yuan).
 
  - Enable CPPC v2 for certain processors in the family 17H, as requested
    by TR40 processor users who expect improved performance and lower
    system temperature (Perry Yuan).
 
  - Change latency and delay values to be read from platform firmware
    firstly for more accurate timing (Perry Yuan).
 
  - A new quirk is introduced for supporting amd-pstate on legacy
    processors which either lack CPPC capability, or only only have CPPC
    v2 capability (Perry Yuan).
 
  - Sun50i cpufreq: Add support for opp_supported_hw, H616 platform and
    general cleanups (Andre Przywara, Martin Botka, Brandon Cheo Fusi,
    Dan Carpenter, Viresh Kumar).
 
  - CPPC cpufreq: Fix possible null pointer dereference (Aleksandr
    Mishin).
 
  - Eliminate uses of of_node_put() from cpufreq (Javier Carrasco,
    Shivani Gupta).
 
  - brcmstb-avs: ISO C90 forbids mixed declarations (Portia Stephens).
 
  - mediatek cpufreq: Add support for MT7988A (Sam Shih).
 
  - cpufreq-qcom-hw: Add SM4450 compatibles in DT bindings (Tengfei Fan).
 
  - Fix struct cpudata::epp_cached kernel-doc in the intel_pstate cpufreq
    driver (Jeff Johnson).
 
  - Fix kerneldoc description of ladder_do_selection() (Jeff Johnson).
 
  - Convert the cpuidle kirkwood driver to platform remove callback
    returning void (Yangtao Li).
 
  - Replace deprecated strncpy() with strscpy() in the hibernation core
    code (Justin Stitt).
 
  - Use %ps to simplify debug output in the core system-wide suspend and
    resume code (Len Brown).
 
  - Remove unnecessary else from device_init_wakeup() and make
    device_wakeup_disable() return void (Dhruva Gole).
 
  - Enable PMU support in the Intel TPMI RAPL driver (Zhang Rui).
 
  - Add support for ArrowLake-H platform to the Intel RAPL driver (Zhang
    Rui).
 
  - Avoid explicit cpumask allocation on stack in DTPM (Dawei Li).
 
  - Make the Samsung exynos-asv driver update the Energy Model after
    adjusting voltage on top of some preliminary changes of the OPP and
    Enery Model generic code (Lukasz Luba).
 
  - Remove a reference to a function that has been dropped from the power
    management documentation (Bjorn Helgaas).
 
  - Convert the platfrom remove callback to .remove_new for the
    exyno-nocp, exynos-ppmu, mtk-cci-devfreq, sun8i-a33-mbus, and
    rk3399_dmc devfreq drivers (Uwe Kleine-König).
 
  - Use DEFINE_SIMPLE_PM_OPS for exyno-bus.c driver (Anand Moon).
 -----BEGIN PGP SIGNATURE-----
 
 iQJGBAABCAAwFiEE4fcc61cGeeHD/fCwgsRv/nhiVHEFAmZCZrASHHJqd0Byand5
 c29ja2kubmV0AAoJEILEb/54YlRxH3cP/RwYN6V3H+XUlhxN0M1GXb8zkLGTLm9X
 mGRKzDAoElGwYJVSpGPPtP0F+IaS3Sb7JnB719lSS7u7LmYIcqivTaBRdDIHWILJ
 qWbTSy7+84Zakf0RZ5qRr3GIGcNHmY5QDZf3/jC0AX4VBnFqFCjpaW04zmUjmAqn
 k13V3vfHl0J2/qKkm/JIvg2hubcAQzcP9UMgsjRE/S9QzNScEe7910v+0pv8XyUW
 4kdjSItUG8CaJV5er/XarYl4bh39OqT8Lvuo4wbaCFvOyRsMHoXqStxZVLTb9iEI
 j96vBXdy5Bfs503vc+Bu3TGcKPQTfjeRkEYDlwvpxwtJfMGnRQemgidSQwsbz208
 oQaybFxU0UHMgsVh1R0VrbdrhUuMxUz1OrCPSg6rhYJTZ1UhTwISoDTdf+SstGCC
 ODZgG59m6ez5udFAeavLA319jQEGL/oWPkHckVld4Gr10qrMu7SWseflx/+RY2dG
 Rjvd/Kv9FYWVyrIttQf3YIFlc3SLhM5K4IxPhzvj94MDs4spbwAx3wk5lR1Nw2ct
 HIVVjfBS+9I5dlRI7+VLM7VzD1JUxOOeZH84aTMDL080hiFZLEJaD+TkCc2QCa02
 5fGSa1DM5wX87TCdltRtW+OP715Q+97OXdeRQtwgIewfM8zPi0m2ctODNj08+EO1
 qmlFSJYTmFhR
 =el5Y
 -----END PGP SIGNATURE-----

Merge tag 'pm-6.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull power management updates from Rafael Wysocki:
 "These are mostly cpufreq updates, including a significant intel-pstate
  driver update and several amd-pstate improvements plus some updates of
  ARM cpufreq drivers, general fixes and cleanups.

  Also included are changes related to system sleep, power capping
  updates adding support for a new platform and a new hardware feature
  (among other things), a Samsung exynos-asv driver update allowing it
  to change its Energy Model after adjusting voltage, minor cpuidle and
  devfreq updates and a small documentation cleanup.

  Specifics:

   - Rework the handling of disabled turbo in the intel_pstate driver
     and make it update the maximum CPU frequency consistently
     regardless of the reason on top of a number of cleanups (Rafael
     Wysocki)

   - Add missing checks for NULL .exit() cpufreq driver callback to the
     cpufreq core (Viresh Kumar)

   - Prevent pulicy->max from going above the frequency QoS maximum
     value when cpufreq_frequency_table_verify() is used (Xuewen Yan)

   - Prevent a negative CPU number or frequency value from being printed
     if they are really large (Joshua Yeong)

   - Update MAINTAINERS entry for amd-pstate to add two new
     submaintainers and a designated reviewer (Huang Rui)

   - Clean up the amd-pstate driver and update its documentation
     (Gautham Shenoy)

   - Fix the highest frequency issue in the amd-pstate driver which
     limits performance (Perry Yuan)

   - Enable CPPC v2 for certain processors in the family 17H, as
     requested by TR40 processor users who expect improved performance
     and lower system temperature (Perry Yuan)

   - Change latency and delay values to be read from platform firmware
     firstly for more accurate timing (Perry Yuan)

   - A new quirk is introduced for supporting amd-pstate on legacy
     processors which either lack CPPC capability, or only only have
     CPPC v2 capability (Perry Yuan)

   - Sun50i cpufreq: Add support for opp_supported_hw, H616 platform and
     general cleanups (Andre Przywara, Martin Botka, Brandon Cheo Fusi,
     Dan Carpenter, Viresh Kumar)

   - CPPC cpufreq: Fix possible null pointer dereference (Aleksandr
     Mishin)

   - Eliminate uses of of_node_put() from cpufreq (Javier Carrasco,
     Shivani Gupta)

   - brcmstb-avs: ISO C90 forbids mixed declarations (Portia Stephens)

   - mediatek cpufreq: Add support for MT7988A (Sam Shih)

   - cpufreq-qcom-hw: Add SM4450 compatibles in DT bindings (Tengfei
     Fan)

   - Fix struct cpudata::epp_cached kernel-doc in the intel_pstate
     cpufreq driver (Jeff Johnson)

   - Fix kerneldoc description of ladder_do_selection() (Jeff Johnson)

   - Convert the cpuidle kirkwood driver to platform remove callback
     returning void (Yangtao Li)

   - Replace deprecated strncpy() with strscpy() in the hibernation core
     code (Justin Stitt)

   - Use %ps to simplify debug output in the core system-wide suspend
     and resume code (Len Brown)

   - Remove unnecessary else from device_init_wakeup() and make
     device_wakeup_disable() return void (Dhruva Gole)

   - Enable PMU support in the Intel TPMI RAPL driver (Zhang Rui)

   - Add support for ArrowLake-H platform to the Intel RAPL driver
     (Zhang Rui)

   - Avoid explicit cpumask allocation on stack in DTPM (Dawei Li)

   - Make the Samsung exynos-asv driver update the Energy Model after
     adjusting voltage on top of some preliminary changes of the OPP and
     Enery Model generic code (Lukasz Luba)

   - Remove a reference to a function that has been dropped from the
     power management documentation (Bjorn Helgaas)

   - Convert the platfrom remove callback to .remove_new for the
     exyno-nocp, exynos-ppmu, mtk-cci-devfreq, sun8i-a33-mbus, and
     rk3399_dmc devfreq drivers (Uwe Kleine-König)

   - Use DEFINE_SIMPLE_PM_OPS for exyno-bus.c driver (Anand Moon)"

* tag 'pm-6.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (68 commits)
  PM / devfreq: exynos: Use DEFINE_SIMPLE_DEV_PM_OPS for PM functions
  PM / devfreq: rk3399_dmc: Convert to platform remove callback returning void
  PM / devfreq: sun8i-a33-mbus: Convert to platform remove callback returning void
  PM / devfreq: mtk-cci: Convert to platform remove callback returning void
  PM / devfreq: exynos-ppmu: Convert to platform remove callback returning void
  PM / devfreq: exynos-nocp: Convert to platform remove callback returning void
  cpufreq: amd-pstate: fix the highest frequency issue which limits performance
  cpufreq: intel_pstate: fix struct cpudata::epp_cached kernel-doc
  cpuidle: ladder: fix ladder_do_selection() kernel-doc
  powercap: intel_rapl_tpmi: Enable PMU support
  powercap: intel_rapl: Introduce APIs for PMU support
  PM: hibernate: replace deprecated strncpy() with strscpy()
  cpufreq: Fix up printing large CPU numbers and frequency values
  MAINTAINERS: cpufreq: amd-pstate: Add co-maintainers and reviewer
  cpufreq: amd-pstate: remove unused variable lowest_nonlinear_freq
  cpufreq: amd-pstate: fix code format problems
  cpufreq: amd-pstate: Add quirk for the pstate CPPC capabilities missing
  cppc_acpi: print error message if CPPC is unsupported
  cpufreq: amd-pstate: get transition delay and latency value from ACPI tables
  cpufreq: amd-pstate: Bail out if min/max/nominal_freq is 0
  ...
2024-05-14 13:19:15 -07:00
Rafael J. Wysocki
de1c2722e0 Merge branches 'pm-em' and 'pm-docs'
Merge Enery Model update and a power management documentation update for
6.10:

 - Make the Samsung exynos-asv driver update the Energy Model after
   adjusting voltage on top of some preliminary changes of the OPP and
   Enery Model generic code (Lukasz Luba).

 - Remove a reference to a function that has been dropped from the power
   management documentation (Bjorn Helgaas).

* pm-em:
  soc: samsung: exynos-asv: Update Energy Model after adjusting voltage
  PM: EM: Add em_dev_update_chip_binning()
  PM: EM: Refactor em_adjust_new_capacity()
  OPP: OF: Export dev_opp_pm_calc_power() for usage from EM

* pm-docs:
  Documentation: PM: Update platform_pci_wakeup_init() reference
2024-05-13 20:19:58 +02:00
Linus Torvalds
14a60290ed soc: drivers for 6.10
As usual, these are updates for drivers that are specific to certain
 SoCs or firmware running on them. Notable updates include
 
  - The new STMicroelectronics STM32 "firewall" bus driver that is
    used to provide a barrier between different parts of an SoC
 
  - Lots of updates for the Qualcomm platform drivers, in particular
    SCM, which gets a rewrite of its initialization code
 
  - Firmware driver updates for Arm FF-A notification interrupts
    and indirect messaging, SCMI firmware support for pin control
    and vendor specific interfaces, and TEE firmware interface
    changes across multiple TEE drivers
 
  - A larger cleanup of the Mediatek CMDQ driver and some related bits
 
  - Kconfig changes for riscv drivers to prepare for adding Kanaan
    k230 support
 
  - Multiple minor updates for the TI sysc bus driver, memory controllers,
    hisilicon hccs and more
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmY+dbEACgkQYKtH/8kJ
 UifGTBAA3lh2qw++S5i6nk71388/nswb5fZKwqPKl1m+44SndE7r0/nauGm7IZhd
 oM5xiBZzsoYCKuesSuejkBNgPmUPtUhyHBJKSKjwrcak4k1mrjDgXxfSxCqGptVZ
 Ps683koJ/Ic7O/LQNxlVzUlssG/3gmhJELfpaVIB7rG8pmdgF9ocM73+iJrRwW1Q
 fTFXUXeCcXJ2N5Yki7z2+4oB3RebPzTBz4NeIYNdGQj5/u61oG0KzXwvk8eqWhNb
 0KJYsfAQZGzdyAys6XU1MHv4T4L2a3DQL6NMgLnovVEMhP2Hk0XlBmI7X+uAXYiM
 2z289d9Wx3HMoiekulDJ+rpDUPxPXrEqaRkfWZ8G+HSY4KcIeSP7YGmhylr0kdvw
 +Qo6orxZ9lkSPaT1aUkNIIywDzet/E2hY8zV1EcLBu9GWjkybAvT/Uy2lSSN+LLH
 yEQyDf+s90N6QuZwdXN8a3QliP39tHqlye8wou6UQG8aZ7z870fKAKlvA6DjTfPM
 JyhY1rXYH/bvC87sVTi5Qb09+2R6ftvk5xijiMOyXugPpO/6PQKULVataeUnzwgs
 YTgOPhaqXVadDR/nkrG3FzEtvpYeTspwGpDiEpDrNHf5H1tFg6VfPNS8y0QOlSPY
 JcmylQNCtwxCRLTw2NHOb3tLcY4ruDHNmrWf5INTzf6cJe49jaU=
 =4rf0
 -----END PGP SIGNATURE-----

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

Pull SoC driver updates from Arnd Bergmann:
 "As usual, these are updates for drivers that are specific to certain
  SoCs or firmware running on them.

  Notable updates include

   - The new STMicroelectronics STM32 "firewall" bus driver that is used
     to provide a barrier between different parts of an SoC

   - Lots of updates for the Qualcomm platform drivers, in particular
     SCM, which gets a rewrite of its initialization code

   - Firmware driver updates for Arm FF-A notification interrupts and
     indirect messaging, SCMI firmware support for pin control and
     vendor specific interfaces, and TEE firmware interface changes
     across multiple TEE drivers

   - A larger cleanup of the Mediatek CMDQ driver and some related bits

   - Kconfig changes for riscv drivers to prepare for adding Kanaan k230
     support

   - Multiple minor updates for the TI sysc bus driver, memory
     controllers, hisilicon hccs and more"

* tag 'soc-drivers-6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (103 commits)
  firmware: qcom: uefisecapp: Allow on sc8180x Primus and Flex 5G
  soc: qcom: pmic_glink: Make client-lock non-sleeping
  dt-bindings: soc: qcom,wcnss: fix bluetooth address example
  soc/tegra: pmc: Add EQOS wake event for Tegra194 and Tegra234
  bus: stm32_firewall: fix off by one in stm32_firewall_get_firewall()
  bus: etzpc: introduce ETZPC firewall controller driver
  firmware: arm_ffa: Avoid queuing work when running on the worker queue
  bus: ti-sysc: Drop legacy idle quirk handling
  bus: ti-sysc: Drop legacy quirk handling for smartreflex
  bus: ti-sysc: Drop legacy quirk handling for uarts
  bus: ti-sysc: Add a description and copyrights
  bus: ti-sysc: Move check for no-reset-on-init
  soc: hisilicon: kunpeng_hccs: replace MAILBOX dependency with PCC
  soc: hisilicon: kunpeng_hccs: Add the check for obtaining complete port attribute
  firmware: arm_ffa: Fix memory corruption in ffa_msg_send2()
  bus: rifsc: introduce RIFSC firewall controller driver
  of: property: fw_devlink: Add support for "access-controller"
  soc: mediatek: mtk-socinfo: Correct the marketing name for MT8188GV
  soc: mediatek: mtk-socinfo: Add entry for MT8395AV/ZA Genio 1200
  soc: mediatek: mtk-mutex: Add support for MT8188 VPPSYS
  ...
2024-05-13 08:48:42 -07:00
Greg Kroah-Hartman
adeab5bfb8 Linux 6.9-rc7
-----BEGIN PGP SIGNATURE-----
 
 iQFSBAABCAA8FiEEq68RxlopcLEwq+PEeb4+QwBBGIYFAmY39LkeHHRvcnZhbGRz
 QGxpbnV4LWZvdW5kYXRpb24ub3JnAAoJEHm+PkMAQRiGaB8H+wWcwT1O7K2SQx1a
 sHDYJSXfbjgShS7Wt+gbDNvhGJqG/5FkpHyBmBKUdElZs8QMf21GAbIfJvzcNThA
 g+FakIMjfhNH/dr6TJXHWbb2NZV67exDbbuaQDyMhNhIZqil4BH/OEPbLYIdquvm
 /HDGFB/whVoHVC+Ug8esEOL3Uy+rizBDlsT/K4ZgpOC3TuUmlRpptSVACwjcCGXM
 PFKyyTIr0ZnKcz3+4yTEtpDFm6e/ujxMwM66GBCgmPaZ3lJp5ruY3kGpBTmSyoqV
 Rh3CQlIhBo8gwlAx/yQXfxEZomhxT6DfRpc6s/1W0J1UZN/j2pYy056OYyckG32c
 uQ9ujxQ=
 =M0wP
 -----END PGP SIGNATURE-----

Merge 6.9-rc7 into usb-next

We want the USB fixes in here as well, and resolve a merge conflict in
drivers/usb/dwc3/core.c

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-05-10 09:38:01 +01:00
Arnd Bergmann
1c97fe39fb A few more Qualcomm driver updates for v6.10
This fixes a sleep-while-atomic issue in pmic_glink, stemming from the
 fact that the GLINK callback comes from interrupt context.
 
 It fixes the Bluetooth address in the example of qcom,wcnss, and it
 enables UEFI variables on SC8180X devices (Primus and Flex 5G).
 -----BEGIN PGP SIGNATURE-----
 
 iQJJBAABCAAzFiEEBd4DzF816k8JZtUlCx85Pw2ZrcUFAmY63o4VHGFuZGVyc3Nv
 bkBrZXJuZWwub3JnAAoJEAsfOT8Nma3FgOgQAMl9EWX6GgsIZKIs70s5gfbVYh+0
 gtyT829P4Gg1Jq4QSxpGvUJUNRxUCRZ+XpRi/tkagDljudUS1WsRfg0lqdJ9mXw6
 zu0/8rjGpNbd2PLjFJVTSJ0MrmBSko0DTFcIdBuWK/Unq+QY1Du8Qrf7wa9w/of6
 wBf7dxlMz2zO2U/A57TEtuvB4WN5p7tOm0p7vXC5YZsnwmGjauq2ppXY2tJAQZfr
 b7APS7DsVHKHjEPfXFqjl4j+W+e+4YJTbysp5fP+lz4vZXrcnDXHkhFBtQ6pD/g+
 qHLMKYSRhw5O/7hUQCrs8v2sX/okLmjHg1aZzo32TlfiibY8cOF7oWCH9yPcHh3Y
 pBjTfG17LT3MLZMn8GgAz2Idvp/k+ORnJ/4cDvfB2cs9SluOPp4DM05Yc0a5aG4Q
 AmFhbbWMdauDsoL3URTPQwv4vDU7hOugNHGFwAgAoS5LPZfOG+fVty1jcWzNBiHK
 xc2gnHQ7JsO0wCoFdEticbkYazNjbIXQEdllcxX8q+JdOvgybCY6oLH9sDPQMl9C
 T92enUt7FEvd2UAjWtaE3ALB6irP7miRbgRzfjqluiQ0woSNGurH2EOAU21GO0ER
 e+UpyOcB/Sks9fq3e6KJsNbYzpZI9mw+b+dff5FFY6nEVnrMlA13aEy2oX4fDu6S
 tPhM6XeikIh6jx8D
 =rvvf
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmY7H4YACgkQYKtH/8kJ
 Uic+1hAA4bynTfdrRMtOz5SN9O4h2C1LyR8LXxXdX8IKcxytUMjxLwxd1kkQEIDs
 EuglrFNCS5+PaT2D7ZFmYV4ZdaoxT2u9AUtBYGUGHBLKwle/F+/1et9DmZOPnRR0
 6jwX4bj6lwJDL1B8ZQGD0lPqVoCiqlu6GEpxZVZdyOh9gas/bgAJ/cYIM3YGk/Fq
 TBWXJl5ayW2GfeKjD9CF8KktOtrZZwWL98ckwV7uuK4XvQyAEOQbsJpJ4gpw9L6O
 O1c3kxHAgo0GLeA25MQtS1QT0Iwu3ryq63Xp5BgwIB/LfnScbtH8nIbNDQLCzNNP
 WMtpxRn7r1iZKUF5LRiKU7rLy0Nmv40mWGJL0Qm2kQBPsbIMAemYhku1U5aiwyQe
 Af3TCoVFaxZLXv5K1NTbLlPpjepgJsJMscBYEMMzGSWFKL5Q/D7C0UxyhAXBahvi
 zHUHvdr8/b61RPdNHMbusCmlJ1RmElwqTx9wNW1jHeMf2D/IQNWeeCiiWXeL2AZb
 mJu8cDcdZs4Hw9cUGyvrD5mH1asEUVcRTJbDdTXslGE0E1BKOBnx096iFgXOMYx/
 jZwPU6aD0o9+1F+43S+Hr1IQMpINFjF0B//FM7dX9+fBgMaxVb59cYQsGXUVWTtO
 IJw/Ar9rsThTXwGmOFdEo/WK0hynPdMdUsW3QPBQ9rqpi4erDGw=
 =CB3q
 -----END PGP SIGNATURE-----

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

A few more Qualcomm driver updates for v6.10

This fixes a sleep-while-atomic issue in pmic_glink, stemming from the
fact that the GLINK callback comes from interrupt context.

It fixes the Bluetooth address in the example of qcom,wcnss, and it
enables UEFI variables on SC8180X devices (Primus and Flex 5G).

* tag 'qcom-drivers-for-6.10-2' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux:
  firmware: qcom: uefisecapp: Allow on sc8180x Primus and Flex 5G
  soc: qcom: pmic_glink: Make client-lock non-sleeping
  dt-bindings: soc: qcom,wcnss: fix bluetooth address example

Link: https://lore.kernel.org/r/20240508020900.204413-1-andersson@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-05-08 08:45:26 +02:00
Arnd Bergmann
a3116c8881 RISC-V SoC Kconfig Updates for v6.10
A few different bits of SoC-related Kconfig work. The first part of
 this is shared with the DT updates - the modification of all SOC_CANAAN
 users to SOC_CANAAN_K210 to split the existing m-mode nommu k210 away
 from the k230 that is able to be used in a "common" kernel.
 
 The other thing here is the removal of most of the SOC_VENDOR options,
 with their ARCH_VENDOR equivalents that've been waiting in the wings for
 1 year+ now made visible. Due a lapse on my part when originally adding
 the ARCH_VENDOR stuff, the Microchip transition isn't complete - the
 _POLARFIRE was a mistake to keep as there's gonna be non-PolarFire
 RISC-V stuff from Microchip soonTM.
 
 Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZjUIHwAKCRB4tDGHoIJi
 0r8RAQD+B5rJde/sQuQlmkJGrmZfyE/6/I1ZFxv0/xHhRPNWRAD/RFTTDthL/7c4
 frMGl/nWSD3fvGmXrQ7Dp6wc1APIdQI=
 =BWHh
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmY57kAACgkQYKtH/8kJ
 Uie0Sg/8D8tZVOtBrpVJG/P5F7W1QdcC336GHBMQCho38C0/4AK5ltvdyxmSxmCl
 k84qaLdYNrGIvJ5o6MRmSAZyzT3y3jLYVA8C2Zsrp+Do8KkvvJGl219pUvp5A0J3
 eoMApJ34wx6dQM9LfpLcvU9C3Z767KeiiRm0h5CTV0IUfJnZB/7IQgwSajEGLOr/
 CHtFZpbYK6VgCDgVhbacSY8495jJrIU4i5RDlILst5K64XrmS2UU2oen2L3X/u8h
 xi5nQ//3qCiIfp5UqvBY12OYF8lVzB+F/Uo9vDCpeF9HFiIE69qMgYJiSviCPbwH
 T54zue+oBPGfL57HQoMTYQGUG4GvlnW7JR841GsIlPjrs54uw2kXDZB586n3tqzN
 esAQCc/sNnCuUX9TYKKBzkIrmQ1oTPRdGO61r+lSgxjYQ/ed++eh6KStlbPmttVo
 piEaxSpLS7TOZcVOyXHFrWK6OR4yB6MD6ZvOGJlJKJZSdfMNTlGcoymiJ0j7hVQb
 QJSr3LaIfQMP+Uf5ZWWlNZIxvwxQKER8v6MbyH3vGAVYa+DnDBzaj9Fh364thJnt
 Uybpz7SDQMIugnB+uSe+D1o65XfTEKOn/OHXYEQVYyoWs63QfTE9012+Q4KqBFBQ
 5ylIkvM9r3xMBkzZT3EU8lgr5gx9r5QQuX9czJ7INSBxo4SmuKE=
 =QGOJ
 -----END PGP SIGNATURE-----

Merge tag 'riscv-config-for-v6.10' of https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux into soc/drivers

RISC-V SoC Kconfig Updates for v6.10

A few different bits of SoC-related Kconfig work. The first part of
this is shared with the DT updates - the modification of all SOC_CANAAN
users to SOC_CANAAN_K210 to split the existing m-mode nommu k210 away
from the k230 that is able to be used in a "common" kernel.

The other thing here is the removal of most of the SOC_VENDOR options,
with their ARCH_VENDOR equivalents that've been waiting in the wings for
1 year+ now made visible. Due a lapse on my part when originally adding
the ARCH_VENDOR stuff, the Microchip transition isn't complete - the
_POLARFIRE was a mistake to keep as there's gonna be non-PolarFire
RISC-V stuff from Microchip soonTM.

Signed-off-by: Conor Dooley <conor.dooley@microchip.com>

* tag 'riscv-config-for-v6.10' of https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux:
  riscv: config: enable ARCH_CANAAN in defconfig
  RISC-V: drop SOC_VIRT for ARCH_VIRT
  RISC-V: drop SOC_SIFIVE for ARCH_SIFIVE
  RISC-V: drop SOC_MICROCHIP_POLARFIRE for ARCH_MICROCHIP
  RISC-V: Drop unused SOC_CANAAN
  reset: k210: Deprecate SOC_CANAAN and use SOC_CANAAN_K210
  pinctrl: k210: Deprecate SOC_CANAAN and use SOC_CANAAN_K210
  clk: k210: Deprecate SOC_CANAAN and use SOC_CANAAN_K210
  soc: canaan: Deprecate SOC_CANAAN and use SOC_CANAAN_K210 for K210
  riscv: Kconfig.socs: Split ARCH_CANAAN and SOC_CANAAN_K210

Link: https://lore.kernel.org/r/20240503-mardi-underling-3d81a9f97329@spud
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-05-07 11:02:56 +02:00
Arnd Bergmann
e067863132 TI SoC driver updates for v6.10
Generic Cleanups/Fixes:
 - wkup_m3_ipc: Minor optimization to send NULL dummy message instead of empty pointer message
 - ti_sci: Register restart handler unconditionally
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEE+KKGk1TrgjIXoxo03bWEnRc2JJ0FAmYyM8kACgkQ3bWEnRc2
 JJ2vJxAAiGOfi4ylAvwCovwV8x4o/xrvdnywn5qU7y4aNwauiS7TW7gJZe1h7TTr
 H2oArK3KWPP/NVvEyuciR7v1IfG1WMTrYRJ9xXoFLSPNesDpX9O3CkDra0/FgEQH
 nSsq2L2CsTftItJhh2a+X+TrPcyCLPXRkTG1AsuYyNRo1zx2Wx0EmpLDkVb7D9sA
 iUSfCHeZ2DyA9qBP4R73QOtSqAqhXem/DZ9nrblJW79IcWt/lLdyXfB0oDdebOEP
 T9xXi609L2S08yzLp8N6JPCf80sP2DEx68DI/TVsE2tGfm7qC+qV0FRebxWZvdQB
 95zeZDWy2V5droaDNWi5zOSL5JotQqYfRzxuvmZQ7XE0YVt5VETOzRMrKs3rGTwN
 JeoK92c5JW1HgrKO1tvtVCbxCSZqJOQ1EAszcRiUlApIsaDhGfgfrtUCIvnh4UE2
 XYSYoxz6G3q6S8bjKQDec6gG/2z3YoQBf6ChmM+M275rvbEbGCOVGCz8JvetT9XK
 geB89Ct87DuI+CDRGu7qyRxl7180zjMOgtpCt9g5qdLRmCMyMzb+D6Pv3cncFHXB
 H1kgsuKCchPFofe6IWyi+rXhkGyORAWOc2tzcn49KToaoybq+As4sGOHG4wNGtYb
 1+L9hV8EmhO5Yd//OOhBgrFd+m329gyCuyFf1WSLmkKdwndl5vk=
 =p2y6
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmYzkSEACgkQYKtH/8kJ
 UicMGBAAgZe7R/djBTG9eFI+J/m2KHHsmAPbD67EJEt9DbAa4nxF02kBbiFnHigU
 V0dNyUIqCh47RnSzbFxpre+IBeAwutc8H2MU9TSx41t2cMW0BKT5JZOOF9kFOtGT
 u/4HBO8+Q/Sa/kA37ALmt1eDxRSO4KLwUqnc2LhNyBaFLxa3rwuU8tx6ZduxdO7N
 EJ35tgeSoGL9iMMlhkoYz8wmW1E8PLCfIAXqRDtffYe9/0Rx2yjvqbeSqEN0ot3h
 /4lQrkKmLdFjuYzLC98K1bnwa5w+GKHykcVC9XdWGVJnAlXJEhaj8J7ajmdj3/1B
 w2wdyhvVVSoxrlmzj4dQUFTJwZpneMn2/9jFZxBfg50InFKxNkcVkS6barWZwh/E
 8JQdD9MNIcwlhHR24bkeo5WCfkVXo7DL7NhgM1Hd0fYyFdtyUmpBM5dOIxlq1Bxl
 2HvLKDOmVFbYB1ze1cU4uy2F9lpuol9THwUiAbt3VxNHnuO4DDjowC9yFF2CrBty
 WfL5hzChgzi46SQyJFfEk5JeHoDmwAnu1mwfayi91qZWBk+O23CYfb4N+poxX0/N
 /rziN7x97gYPBAeyt6Goyuy15unGVqydvr8dLeM6cX42q1nNbY/E6jiRyAeYMW4b
 PWf9FK7yXxICGPfGTk6hmxMR8C1OGAImeWYY6ynsFntqNpLYhC4=
 =lMgA
 -----END PGP SIGNATURE-----

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

TI SoC driver updates for v6.10

Generic Cleanups/Fixes:
- wkup_m3_ipc: Minor optimization to send NULL dummy message instead of empty pointer message
- ti_sci: Register restart handler unconditionally

* tag 'ti-driver-soc-for-v6.10' of https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux:
  soc: ti: wkup_m3_ipc: Send NULL dummy message instead of pointer message
  firmware: ti_sci: Unconditionally register reset handler
  firmware: ti_sci: Use devm_register_restart_handler()

Link: https://lore.kernel.org/r/20240501124300.i5jzeugdlrlnfg22@undrafted
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-05-02 15:12:01 +02:00
Bjorn Andersson
9329933699 soc: qcom: pmic_glink: Make client-lock non-sleeping
The recently introduced commit '635ce0db8956 ("soc: qcom: pmic_glink:
don't traverse clients list without a lock")' ensured that the clients
list is not modified while traversed.

But the callback is made from the GLINK IRQ handler and as such this
mutual exclusion can not be provided by a (sleepable) mutex.

Replace the mutex with a spinlock.

Fixes: 635ce0db89 ("soc: qcom: pmic_glink: don't traverse clients list without a lock")
Signed-off-by: Bjorn Andersson <quic_bjorande@quicinc.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20240430-pmic-glink-sleep-while-atomic-v1-1-88fb493e8545@quicinc.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
2024-05-01 13:39:51 -05:00
Arnd Bergmann
d1734cfcec MediaTek driver updates for v6.10
This adds a much needed cleanup for the MediaTek CMDQ helper driver and
 also some more helper functions which will be used in drivers using the
 MediaTek Global Command Engine (GCE) HW.
 
 Also adds support for MT8188's VPPSYS mutex for MDP3 support, a new SoC
 in the mtk-socinfo driver and changes the marketing name for the pre
 existing MT8188 SoC.
 -----BEGIN PGP SIGNATURE-----
 
 iJ4EABYKAEYWIQQn3Xxr56ypAcSHzXSaNgTPrZeEeAUCZi+cOCgcYW5nZWxvZ2lv
 YWNjaGluby5kZWxyZWdub0Bjb2xsYWJvcmEuY29tAAoJEJo2BM+tl4R4QsoBAPuI
 rGRlN0B+gFmkv/Q90EXVRd3UoIDCUK7rlqWjegWaAP0eb8s/Rtl2xy0x5OrEFX+R
 AfGVBb6frmdRGFYi7gl7Bg==
 =XSlW
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmYwAqUACgkQYKtH/8kJ
 UicmOQ/9HoCY3U9BGmOCLc+XuTS+7BqIkLpeOdFWg9uyResDbTalyrfhzam2RLba
 G83y8HLmlhkQJh844Z/NOU4hMfcgtOD4MM80y6HSMfmI3giWNpgLe8v8wuA1pxJ7
 xAbVfWrmW4PiRdSxEj7TzHN04xYAhroYioSnvljYFinaPuk3Z64ACZlomk6I/tVa
 zh9b+5A7aQsIG6iAJgwYr/pxIiGVyz/TVhulUDAxjuD2GkyFlaqa087P3f+V9Ciq
 ryGkBM4pdmFhK9ajZaCVK0CZcAA++BHEBfZ+PUBkyzoHUSCMINCujvk3wW/GU0j7
 41czEO2z345WeClvOOEMEcGLRPAUvYnd7JgtKthY94vx40di8ddboPRYX4aeYG/M
 4aQHNXetjDoozrzOmT2EyUuMgcVFwz/4l81QHEGuJ6K/9b1DESK8YWS3jVUrtV0/
 bPWrs9ldS9OCtpd8UHMb7n2XunFBrBOmEHmM6qKPPMh7KI11VEScMGe9M5vhDqyh
 ibCw9R5E+FuWjOT5CSws0mVvIalkYcyHbFRC80AVOEdzGLVb3YjzuK1CFANatLUh
 eyCsTOFUUviIgSgl26i9zvKhU4ftGii/9QSXUsPUPxlAMBSTvGk8OFwGldyBZBfF
 p2424FOGjP9n5ZmFblSqgVWDSazJH6SGl0R9Tm0Kh/49p92EMng=
 =Nyho
 -----END PGP SIGNATURE-----

Merge tag 'mtk-soc-for-v6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/mediatek/linux into soc/drivers

MediaTek driver updates for v6.10

This adds a much needed cleanup for the MediaTek CMDQ helper driver and
also some more helper functions which will be used in drivers using the
MediaTek Global Command Engine (GCE) HW.

Also adds support for MT8188's VPPSYS mutex for MDP3 support, a new SoC
in the mtk-socinfo driver and changes the marketing name for the pre
existing MT8188 SoC.

* tag 'mtk-soc-for-v6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/mediatek/linux:
  soc: mediatek: mtk-socinfo: Correct the marketing name for MT8188GV
  soc: mediatek: mtk-socinfo: Add entry for MT8395AV/ZA Genio 1200
  soc: mediatek: mtk-mutex: Add support for MT8188 VPPSYS
  soc: mediatek: socinfo: Advertise about unknown MediaTek SoC
  soc: mediatek: cmdq: Don't log an error when gce-client-reg is not found
  soc: mediatek: mtk-cmdq: Add cmdq_pkt_acquire_event() function
  soc: mediatek: mtk-cmdq: Add cmdq_pkt_poll_addr() function
  soc: mediatek: mtk-cmdq: Add cmdq_pkt_mem_move() function
  soc: mediatek: mtk-cmdq: Add specific purpose register definitions for GCE
  soc: mediatek: cmdq: Refine cmdq_pkt_create() and cmdq_pkt_destroy()
  soc: mediatek: cmdq: Remove cmdq_pkt_flush_async() helper function
  soc: mediatek: cmdq: Add cmdq_pkt_eoc() helper function
  soc: mediatek: cmdq: Add cmdq_pkt_jump_rel() helper function
  soc: mediatek: cmdq: Rename cmdq_pkt_jump() to cmdq_pkt_jump_abs()
  soc: mediatek: cmdq: Add parameter shift_pa to cmdq_pkt_jump()
  soc: mediatek: cmdq: Fix typo of CMDQ_JUMP_RELATIVE

Link: https://lore.kernel.org/r/20240429140245.238210-2-angelogioacchino.delregno@collabora.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-04-29 22:27:17 +02:00
Arnd Bergmann
02c2c1900f Qualcomm driver updates for v6.10
The Qualcomm SCM driver initialization order is improved, to avoid any
 potential for a client to find a half-initialized SCM instance.
 The handling of download mode bits is updated to not attempt
 QCOM_SCM_BOOT_SET_DLOAD_MODE if a io-address for the update is
 specified, and that path is changed to perform a read-modify-write to
 avoid updating unrelated bits.  Error handling is corrected in the
 peripheral authentication service (PAS) functions, to release
 interconnect bandwidth votes in the case of an error. An unwanted error
 print on allocation error is also removed from this code path.
 
 The QSEECOM allow list is marked __maybe_unused to avoid build warnings
 when built with !OF. The error handling related to the interconnect API
 is cleaned up to avoid handling the impossible IS_ERR() condition.
 
 initcall level is bumped to "core" for cmd-db and rpmh-rsc, as dependent
 drivers like regulators, interconnects and clocks are registered at this
 level.
 
 Another attempt is made to remove the strncpy() usage in cmd-db, this
 time with strtomem_pad() which has the correct characteristics.
 
 The bwmon regmap cache is changed to maple tree.
 
 After an attempt to add missing MODULE_DEVICE_TABLEs to debug drivers,
 the intention of not having them automatically load is documented.
 
 Operations on the pmic_glink client list is put under mutual exclusion,
 to avoid races when clients are being registered. pmic_glink client
 registered after the firmware notification arrived was not informed that
 the firmware was up, this is resolved.
 
 More DSPs and the apss subsystem is added to the Qualcomm sleep stats driver.
 
 Checks for in-flight regulator requests in the RPMh RSC driver is
 improved to deal with the fact that these occupy multiple registers, so
 it's insufficient to just to direct address comparison.
 
 The socinfo drivers learns about X1 Elite and SMB2360 PMIC.
 
 The maintainers entry is split between the linux-arm-msm list and
 subset that is maintained in the qcom-soc tree, to avoid some confusion
 about maintainership.
 -----BEGIN PGP SIGNATURE-----
 
 iQJJBAABCAAzFiEEBd4DzF816k8JZtUlCx85Pw2ZrcUFAmYtIvQVHGFuZGVyc3Nv
 bkBrZXJuZWwub3JnAAoJEAsfOT8Nma3FmLMQANqfDnrplxf3OpL3I8JEqeHYvdLF
 e12jXZyBlSCWRBEbphHZLKj8qSTFqpFgvqxIJ1fNqZ1AG9GeJTP8aGSkSnaYoym8
 7uvSWRv2lZ13mQmaCM8PQMYJ7UhLitVfwKrLfSwV7GgqxqyJ5+tnTGpEdNE3VEhW
 VaiknaR7kV2T3mUmrrgivy+0rMLimDMOVu7TcLkw5aY4SaQuerElXz1/IZO29GLK
 QOqEbDsf8TcImZnMsnmMvbLO+AJ/NgmhpD9SDGTbzYtGEqsbVebklQDZNj9QXjWy
 o6zPoCsPn93x95jBwFp0HgdTye4UWZZ3cix/LkyyLja4l0hMJM2QOdDstmtgymbM
 itmWJ3rGfcK8Gjl6NEh+OSMq0rH84uJfXR0VrT/tRDkn4eTSk6DeZJD6lvpp1x43
 2RwELsdlLobfS1znuq2hz+fkVBMh35USNadfC+B2xNyhihPKI1asG8UHu8mUz2MH
 /feyBxygaI3k9G3C6G4qNg3cjvY2MDqy+u6hOv9cG3CoS5z6aRxoGfxXS6I40ABz
 izoFaaae798Kau+VNAKw5OKC56UbRLlTSAVCmM5FItktK+5YIxbOIxRiMxgDxL8B
 JO6fUH5xUE0nF4Ni0OF233+qmfkO+0tRqiVUVEG4mNveyBgTiJtgrZOMAnqzoVmI
 BkagrDlbfbG2TvKb
 =E1Yk
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmYwAbIACgkQYKtH/8kJ
 Uicn4g//Te5hh/YrSw7z42Yu9Zj9N45JhxATZ5Vzsirr9s0YfdF40bbKnHQWeL+O
 qTf/3+egSwn5Dow0vQaEDhRTDJgaQFI9hie+ahR28vtrrgHUWjyXJx/L2yGR9kCX
 1voErjOtCNomq0clDifo/Tr9v7l5Ky0+5OCeZx0TOHkcRjQo9p/ivTdYRhQzw7HN
 jfB23b3rqioUDOErsu+dpC9HFaPeP7iaM0IlPZyqjtW9Vir7Li7pZsmvhlLhFcwS
 xap0Zo77vKoojLTlVhKpJPCTq1qg1/s/WvPR4t1HnfxPcgaEFb0e9ZiFhmzQ5SzT
 tnA61jO/yIlvg3ScUdTlwC6TyI9h1dsNYLhhWyKyHdVn9mQDBAOgxd1+o8jFYx5L
 C2SznOzBxAQPhA81GNi5GJTRlVpixrwd5QsJ7MeQYM59J4+VbQeCjxgZLU0qzI4X
 OyKSx/i4zn7hRYxkuvCQns3fUQ8j8NZEF8HmkDmNeGKCD2UxdexmFFRQBQQzbhpL
 yQxyWoqrlf/iMimfnxjJ1xViTxfJdzdnif9Ah+vjWsplC5P1pty9lAutkLj++zOR
 cAJVV4IDSYhSlDiDo8jsOhfDCclVNw/gOFemUlG5Lf5VdZJ7F/lHTwouq6y7GTZ3
 h3pF8xrGTnfM19zlznq/JTyafph/gTxTiTUH5ymBLm54xOzYd4E=
 =+dt0
 -----END PGP SIGNATURE-----

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

Qualcomm driver updates for v6.10

The Qualcomm SCM driver initialization order is improved, to avoid any
potential for a client to find a half-initialized SCM instance.
The handling of download mode bits is updated to not attempt
QCOM_SCM_BOOT_SET_DLOAD_MODE if a io-address for the update is
specified, and that path is changed to perform a read-modify-write to
avoid updating unrelated bits.  Error handling is corrected in the
peripheral authentication service (PAS) functions, to release
interconnect bandwidth votes in the case of an error. An unwanted error
print on allocation error is also removed from this code path.

The QSEECOM allow list is marked __maybe_unused to avoid build warnings
when built with !OF. The error handling related to the interconnect API
is cleaned up to avoid handling the impossible IS_ERR() condition.

initcall level is bumped to "core" for cmd-db and rpmh-rsc, as dependent
drivers like regulators, interconnects and clocks are registered at this
level.

Another attempt is made to remove the strncpy() usage in cmd-db, this
time with strtomem_pad() which has the correct characteristics.

The bwmon regmap cache is changed to maple tree.

After an attempt to add missing MODULE_DEVICE_TABLEs to debug drivers,
the intention of not having them automatically load is documented.

Operations on the pmic_glink client list is put under mutual exclusion,
to avoid races when clients are being registered. pmic_glink client
registered after the firmware notification arrived was not informed that
the firmware was up, this is resolved.

More DSPs and the apss subsystem is added to the Qualcomm sleep stats driver.

Checks for in-flight regulator requests in the RPMh RSC driver is
improved to deal with the fact that these occupy multiple registers, so
it's insufficient to just to direct address comparison.

The socinfo drivers learns about X1 Elite and SMB2360 PMIC.

The maintainers entry is split between the linux-arm-msm list and
subset that is maintained in the qcom-soc tree, to avoid some confusion
about maintainership.

* tag 'qcom-drivers-for-6.10' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: (21 commits)
  soc: qcom: cmd-db: replace deprecated strncpy with strtomem
  soc: qcom: rpmh-rsc: Enhance check for VRM in-flight request
  firmware: qcom: scm: Modify only the download bits in TCSR register
  firmware: qcom: scm: Fix __scm and waitq completion variable initialization
  firmware: qcom: scm: Rework dload mode availability check
  firmware: qcom: scm: Remove redundant scm argument from qcom_scm_waitq_wakeup()
  firmware: qcom: scm: Remove log reporting memory allocation failure
  soc: qcom: pmic_glink: notify clients about the current state
  soc: qcom: pmic_glink: don't traverse clients list without a lock
  soc: qcom: mention intentionally broken module autoloading
  firmware: qcom: qcm: fix unused qcom_scm_qseecom_allowlist
  MAINTAINERS: Split Qualcomm SoC and linux-arm-msm entries
  soc: qcom: qcom_stats: Add DSPs and apss subsystem stats
  dt-bindings: soc: qcom: qcom,pmic-glink: document QCM6490 compatible
  soc: qcom: socinfo: Add SMB2360 PMIC
  soc: qcom: socinfo: Add X1E80100 SoC ID table entry
  dt-bindings: arm: qcom,ids: Add SoC ID for X1E80100
  soc: qcom: Update init level to core_initcall() for cmd-db and rpmh-rsc
  soc: qcom: icc-bwmon: Convert to use maple tree register cache
  firmware: qcom_scm: remove IS_ERR() checks from qcom_scm_bw_{en,dis}able()
  ...

Link: https://lore.kernel.org/r/20240427160917.1431354-1-andersson@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-04-29 22:23:14 +02:00
Arnd Bergmann
cc0739fe2e soc/tegra: Changes for v6.10-rc1
This contains a single commit that adds a wake event for Ethernet for
 some devices.
 -----BEGIN PGP SIGNATURE-----
 
 iQIyBAABCAAdFiEEiOrDCAFJzPfAjcif3SOs138+s6EFAmYr5e0ACgkQ3SOs138+
 s6FQxA/xAWCQ3Wdb3+dfPsPtb20/WS5UOYnuB2rw2lg1Xxiv2JvuLbIHKjcl67xy
 4Na0qbkFqZfgeUjEfo0xPb1D1JRAXX1lHNoMMCmDUnoZzBxd2IGORR/GEJ5nct4w
 QstCEwDzQToVzwmcceAiiZkYlblbCMmJDax178nVm1GXVn3lXGJPgODk+QlgRE9s
 q01Hhg0UFmKVx3CQD/9mGOnZXnCE608EjJcC086dn/YSWTWYRp384IvSFCHjW5rV
 SODR7WBevEqmn1JDPmfS0Ab4l3mtE5kfNKJ18pG75p+AbbVu9YiAa4Ld5oSwumy6
 uLLPa9m1D6f7J0z/iW8zrivYQm+mp/1mGfAHKm2FOhlW7hsDpBlQ5SY5C3F7VzXP
 6ZXvOR+n6I4XZqkY+R8yYr6pl3VVmiVA/TqTHrboAaRuclDFGx2rQcVsOB3d2F9L
 nx5i7W/f8rlozSEPOimYybzUBKyA5WdL1BqfJKS/ogL3f4+aCTOdahsZ+SCkfaOu
 fUBBBHmOYumxbeiTR88/Smu6UO7q3Do+CpDvBOAxyx6Sx2eh9e7KvTY8Xk5hFuu4
 0fjWg4PEJvxO8/VcgGUpNXC9jyQ5ihxi1hxFXKNdOOiJSVmjwHll4VUAI4+y1m8L
 Du7Jxr14JJ5ujE3WK0P2zGzgkN33kDZCWq/0jp1vsqQ90Ay3rQ==
 =Mw2q
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmYwAXEACgkQYKtH/8kJ
 UidJtw/+Lyi3qIrU/pqmyowZ3jJkJ5WO9wYIpXRmda6aNL43yCaEaqgNlLTfKe1i
 gahj498OIXX1u2TUg3cG6VAMn/Pm69s8nobWZbOIezBo4ncASNQBzcXh/T2Z8EVv
 JaKnYWWrfg3fcl9avSfd2Z8m8rXDH6rRpL84qqHue6eqxTCwjOJtYP1sYezzezr/
 Jy+xDSRdw9UoWXHQVt//EXDtMwLd6tHdnLs3LoRQ+HUHwVJZoqfsGbqGCrRHalXR
 FM0kuhA3ZzV6IIedlUa1Y8ViaZ7lDf9KEfs8FN8W1wM0xDz2j6KAEyg06zJRX2R4
 wJxcBceVih/rAFmMeBk3/mHy6SeSpMTI74lZztUdkczXshEElrOfRSDycI4ZQoyf
 wu96VSFNjj3tTktSRrIeoPlm3cFxZ4QCxvSYA5eu+D0nvasd2hAkHD7l9WZ2BIw7
 AO8+0JBdtVk1mek1vHNVyzAnpFY9TbRVwm0eKBd5VTRY20z4NcomelVM40QECon4
 eE77/dlrwT/d8XDDvD+4HjKVxiB00k5XjZmfj892hVQCrdZIVmGs/EAywXRuwLwG
 qsLPBI7/SZZDmIPQZrjPod7jKbI7OBvTm1M8LLsqem4B/hArXeZP/hkq3Tz7NE2q
 Hyj+oFKJ+BiQBX7L96/rGYuf1s8RXe9aCfEg0mvR58FjDrCgCMQ=
 =Kd59
 -----END PGP SIGNATURE-----

Merge tag 'tegra-for-6.10-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into soc/drivers

soc/tegra: Changes for v6.10-rc1

This contains a single commit that adds a wake event for Ethernet for
some devices.

* tag 'tegra-for-6.10-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux:
  soc/tegra: pmc: Add EQOS wake event for Tegra194 and Tegra234

Link: https://lore.kernel.org/r/20240426180519.3972626-1-thierry.reding@gmail.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-04-29 22:22:09 +02:00
Arnd Bergmann
29a7020067 HiSilicon driver updates for v6.10
- Add the check for obtaining complete port attribute in the HCCS driver
 - Replace MAILBOX dependency with PCC for the HCCS driver
 -----BEGIN PGP SIGNATURE-----
 
 iQJJBAABCgAzFiEEQeMYD8qOQTc1R/snC8hXbtmJZlwFAmYpvTMVHHh1d2VpNUBo
 aXNpbGljb24uY29tAAoJEAvIV27ZiWZcm5AP/0/9N7W48vsLHiWzFYUEbe0XK7DY
 ELG83+NhZylWYnYeBj6nxlldvJrWA5dtH+5kfDfR+jllhEi14dLVSF3k7uJ9rNiP
 J1NZrU9oO1BZHPv77/Grg+41+qP3FTCusUasch0OviBuexyf7XPnq5mVPYhX8cie
 DEEC+X3S2NEFdCqh1C7y41ecjHkmawLbmpvQ1bnGumka8y8SdOd86JTwOOoxBHe7
 xqrFh8CzRzCDQF4BKU3HLG54mUGTjrFlGsTmI4wHGOQnYFv0dzZn4NnaOLdpLJxm
 lmxgLfkESsPhZ9yHwQmgX5MIWqkKeuwXiuM4Ecp1blvMkyM0Pma8BPHNdylZZdP7
 AKEaAjFQrHodSUSHGTMD++PFg5uV3MgwOJTTwP8gz8edvJ9C0v2aPFZ4m7NGMZj7
 Ums7kqAfix0EBI+dWQZkxrmKYSy6GOLp6u74iTWfRDf4kmbOKuyNdNYaIKkW0wdO
 Dfl2rsYDqKeEDmw18FCIK+BU5TaUMYdN5JmME/+Ah5pnHWuVtB6uciswzBAFYn09
 eYt1tW+aPxXIIqZJsmk/D8RGVnFcX+gXvWoD7Qia6xOFz6NQb+MCeGnCZgsORqvo
 2tNJChIyPOxEO01NuW6pI5mxhK038zljXlU4luSCy7nE397GaIjcFpbV+9nQJL1o
 CLSeIRM0kIRCsW5N
 =hOU5
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmYwADoACgkQYKtH/8kJ
 UicshBAAhEmPzN+q5BDz8S5e/VAgSwor/mxtKbCWTev8Ema1OsrnDpE3KcX8ydOy
 5q9u5vGyv8iOIeEzBzbue71uvjyHHv9ooi733fBftCkbh5DYM/LJ5VkJZ962p8bo
 t9S6mpcyqkx7Dzl6+LHN40s7KOB2QUXgRL25uMF80niyrdt8UCGra5GXi03kwtEJ
 tKhO+/frg2ibposOek+14tet5daE46nkAWuvKuXgC+lXYkzSrEdbuqNFAoHmz2kF
 0/MAPbCUcMmIIPaT5zLd87TFrdFhPWxg0wipG0fdzl642Sxye/I0Saw7pSLAHp3i
 eMuvhL5jhgeQRcJeOexPlunMJg4x6LBT9+vx/8dw0dJUt+Ujy1bzWh0NDFrols36
 KAa/XZCr2/p41ohNtxu+x5y4Ii1JAfe8KKQojWD/kLt782tWyl3uGavNUj62JwS/
 FxDXWcPZjX91uJ23qDQvoTLTAPIrnS8o9UE5PRO5JzsdVb99MQ4k9l5cUDYlQptW
 Ju7oc+yE6C5O5s61YsOzeXRDWlya5/OWeeDPYvLZHwxajQirQJlT7ZsocFLxkD9w
 AepfdxpgWbeHUo7NTaeY2vr+EN+x1eoBrIS1p2UlosKv0BeRQjUIZ9+ikkQNwFwk
 2ChTqjJ69F0fovw8ocFa5ufbbi0YDM4V596gWLdUV/z61jT8GmI=
 =ypb3
 -----END PGP SIGNATURE-----

Merge tag 'hisi-drivers-for-6.10' of https://github.com/hisilicon/linux-hisi into soc/drivers

HiSilicon driver updates for v6.10

- Add the check for obtaining complete port attribute in the HCCS driver
- Replace MAILBOX dependency with PCC for the HCCS driver

* tag 'hisi-drivers-for-6.10' of https://github.com/hisilicon/linux-hisi:
  soc: hisilicon: kunpeng_hccs: replace MAILBOX dependency with PCC
  soc: hisilicon: kunpeng_hccs: Add the check for obtaining complete port attribute

Link: https://lore.kernel.org/r/662A3EDE.5070708@hisilicon.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-04-29 22:16:58 +02:00
Jon Hunter
de024f63ce soc/tegra: pmc: Add EQOS wake event for Tegra194 and Tegra234
Add the wake event for the EQOS ethernet controller on Tegra194 and
Tegra234 devices, so that system can be woken up by an event from this
ethernet controller.

Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2024-04-26 17:36:10 +02:00
Huisong Li
95d6333e06 soc: hisilicon: kunpeng_hccs: replace MAILBOX dependency with PCC
The kunpeng_hccs driver depends on the Platform Communication Channel
Driver. If the PCC driver is not enabled, this driver will be failed
to probe. And since the PCC driver depends on the MAILBOX, replace
the MAILBOX dependency with the PCC.

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Wei Xu <xuwei5@hisilicon.com>
2024-04-25 02:09:46 +00:00
Huisong Li
192f97fe16 soc: hisilicon: kunpeng_hccs: Add the check for obtaining complete port attribute
The hccs_get_all_port_attr() is used to obtain the attribute of all the
ports on a specified DIE from the firmware. However this interface doesn't
ensure whether the firmware reports the complete attribute of all the ports
or not. So this patch adds the check for this.

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Wei Xu <xuwei5@hisilicon.com>
2024-04-25 01:30:33 +00:00
Jason-ch Chen
8a87e1d21e
soc: mediatek: mtk-socinfo: Correct the marketing name for MT8188GV
Change 'Kompanio 830' to 'Kompanio 838'.

Signed-off-by: Jason-ch Chen <Jason-ch.Chen@mediatek.com>
Reviewed-by: Fei Shao <fshao@chromium.org>
Link: https://lore.kernel.org/r/20240409035355.27659-1-jason-ch.chen@mediatek.com
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
2024-04-23 12:16:56 +02:00
AngeloGioacchino Del Regno
bc98f77d80
soc: mediatek: mtk-socinfo: Add entry for MT8395AV/ZA Genio 1200
Add an entry for the MT8395 SoC with commercial name Genio 1200.

Reviewed-by: Christopher Obbard <chris.obbard@collabora.com>
Tested-by: Christopher Obbard <chris.obbard@collabora.com>
Reviewed-by: Alexandre Mergnat <amergnat@baylibre.com>
Link: https://lore.kernel.org/r/20240404082056.93454-1-angelogioacchino.delregno@collabora.com
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
2024-04-23 12:16:56 +02:00
AngeloGioacchino Del Regno
26bb17dae6
soc: mediatek: mtk-mutex: Add support for MT8188 VPPSYS
Add MT8188 VPPSYS0 and VPPSYS1 mutex info to driver data

Link: https://lore.kernel.org/r/20240322092845.381313-3-angelogioacchino.delregno@collabora.com
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
2024-04-23 12:16:56 +02:00
AngeloGioacchino Del Regno
7843b6b83d
soc: mediatek: socinfo: Advertise about unknown MediaTek SoC
In case we're running on a MediaTek SoC that is not declared in the
socinfo_data_table, print a message stating that and, with it, also
print out the read eFuse data: this allows to easily add a new SoC
in the table, granted that its actual soc/segment/marketing names
are already previously known.

This is especially useful when booting an already known SoC that
already has socinfo support, but has a different silicon version
and/or revision, hence different model information in the eFuses.

Link: https://lore.kernel.org/r/20240314113015.121940-1-angelogioacchino.delregno@collabora.com
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
2024-04-23 12:16:56 +02:00
Nícolas F. R. A. Prado
27e69538b8
soc: mediatek: cmdq: Don't log an error when gce-client-reg is not found
Most of the callers to this function do not require CMDQ support, it is
optional, so the missing property shouldn't cause an error message.
However, it could result on degraded performance, so the fact that it's
missing should still be alerted. Furthermore, the callers that do
require CMDQ support already log at the error level when an error is
returned.

Change the log message in this helper to be printed at the warning level
instead.

Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20240229-gce-client-reg-log-dbg-v2-1-4975077173d0@collabora.com
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
2024-04-23 12:16:55 +02:00
Jason-JH.Lin
69ff68332d
soc: mediatek: mtk-cmdq: Add cmdq_pkt_acquire_event() function
Add cmdq_pkt_acquire_event() function to support CMDQ user making
an instruction for acquiring event.

CMDQ users can use cmdq_pkt_acquire_event() as `mutex_lock`
and cmdq_pkt_clear_event() as `mutex_unlock` to protect the global
resource modified instructions between them.

cmdq_pkt_acquire_event() would wait for event to be cleared.
After event is cleared by cmdq_pkt_clear_event() in other GCE threads,
cmdq_pkt_acquire_event() would set event and keep executing next
instruction. So the mutex would work like this:

    cmdq_pkt_acquire_event() /* mutex lock */

    /* critical secton instructions that modified global resource */

    cmdq_pkt_clear_event() /* mutex unlock */

Prevent the critical section instructions from being affected by other
GCE threads.

Signed-off-by: Jason-JH.Lin <jason-jh.lin@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20240307013458.23550-5-jason-jh.lin@mediatek.com
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
2024-04-23 12:16:55 +02:00
Jason-JH.Lin
400e2fa805
soc: mediatek: mtk-cmdq: Add cmdq_pkt_poll_addr() function
Add cmdq_pkt_poll_addr function to support CMDQ user making
an instruction for polling a specific address of hardware rigster
to check the value with or without mask.

POLL is a legacy operation in GCE, so it does not support SPR and
CMDQ_CODE_LOGIC. To support polling the register address which doesn't
have the subsys id, CMDQ users need to make an instruction with GPR and
CMDQ_CODE_MASK operation to move the register address to be poll into GPR.
Then users can make an POLL instruction with GPR to poll the register
address assigned in previous instruction.

Signed-off-by: Jason-JH.Lin <jason-jh.lin@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20240307013458.23550-4-jason-jh.lin@mediatek.com
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
2024-04-23 12:16:55 +02:00
Jason-JH.Lin
263801f8e5
soc: mediatek: mtk-cmdq: Add cmdq_pkt_mem_move() function
Add cmdq_pkt_mem_move() function to support CMDQ user making
an instruction for moving a value from a source address to a
destination address.

Signed-off-by: Jason-JH.Lin <jason-jh.lin@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20240307013458.23550-3-jason-jh.lin@mediatek.com
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
2024-04-23 12:16:55 +02:00
Chun-Kuang Hu
b81b2d5534
soc: mediatek: cmdq: Refine cmdq_pkt_create() and cmdq_pkt_destroy()
cmdq_pkt_create() and cmdq_pkt_destroy() is not suitable for
client drivers so each client driver has implement its own
function. This refinement would pass struct cmdq_pkt pointer into
cmdq_pkt_create(). In addition, client driver has the struct
cmdq_client information, so it's not necessary to store this
information in struct cmdq_pkt. After this refinement, client
drivers could use these helper funciton instead of implementing
its own version.

Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
Link: https://lore.kernel.org/r/20240222154120.16959-8-chunkuang.hu@kernel.org
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
2024-04-23 12:16:54 +02:00
Chun-Kuang Hu
9935af96a7
soc: mediatek: cmdq: Remove cmdq_pkt_flush_async() helper function
cmdq_pkt_flush_async() is not used by all client drivers (MediaTek
drm driver and MediaTek mdp3 driver), so remove it.

Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
Link: https://lore.kernel.org/r/20240222154120.16959-7-chunkuang.hu@kernel.org
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
2024-04-23 12:16:54 +02:00
Chun-Kuang Hu
3d86ced95d
soc: mediatek: cmdq: Add cmdq_pkt_eoc() helper function
cmdq_pkt_eoc() append eoc command to CMDQ packet. eoc command
would ask GCE to generate IRQ. It's usually appended to the end
of packet to notify all command in the packet is done.

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
Link: https://lore.kernel.org/r/20240222154120.16959-6-chunkuang.hu@kernel.org
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
2024-04-23 12:16:54 +02:00
Chun-Kuang Hu
698cdcb195
soc: mediatek: cmdq: Add cmdq_pkt_jump_rel() helper function
cmdq_pkt_jump_rel() append relative jump command to the packet.
Relative jump change PC to the target address with offset from
current PC.

Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20240222154120.16959-5-chunkuang.hu@kernel.org
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
2024-04-23 12:16:54 +02:00
Chun-Kuang Hu
7218be3b6f
soc: mediatek: cmdq: Rename cmdq_pkt_jump() to cmdq_pkt_jump_abs()
In order to distinguish absolute jump and relative jump,
cmdq_pkt_jump() append absolute jump command, so rename it to
cmdq_pkt_jump_abs().

Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20240222154120.16959-4-chunkuang.hu@kernel.org
[Angelo: Added temporary wrapper to avoid build breakage]
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
2024-04-23 12:16:53 +02:00
Chun-Kuang Hu
ade1765341
soc: mediatek: cmdq: Add parameter shift_pa to cmdq_pkt_jump()
In original design, cmdq_pkt_jump() call cmdq_get_shift_pa() every
time to get shift_pa. But the shift_pa is constant value for each
SoC, so client driver just need to call cmdq_get_shift_pa() once
and pass shift_pa to cmdq_pkt_jump() to prevent frequent function
call.

Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
Link: https://lore.kernel.org/r/20240222154120.16959-3-chunkuang.hu@kernel.org
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
2024-04-23 12:16:53 +02:00
Chun-Kuang Hu
ed4d5ab179
soc: mediatek: cmdq: Fix typo of CMDQ_JUMP_RELATIVE
For cmdq jump command, offset 0 means relative jump and offset 1
means absolute jump. cmdq_pkt_jump() is absolute jump, so fix the
typo of CMDQ_JUMP_RELATIVE in cmdq_pkt_jump().

Fixes: 946f1792d3 ("soc: mediatek: cmdq: add jump function")
Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20240222154120.16959-2-chunkuang.hu@kernel.org
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
2024-04-23 12:16:53 +02:00
Daniel Golle
ab6cd6bb33
soc: mediatek: mtk-socinfo: depends on CONFIG_SOC_BUS
The mtk-socinfo driver uses symbols 'soc_device_register' and
'soc_device_unregister' which are part of the bus driver for
System-on-Chip devices.

Select SOC_BUS to make sure that driver is built and the symbols are
available.

Fixes: 423a54da3c ("soc: mediatek: mtk-socinfo: Add driver for getting chip information")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Reviewed-by: Chen-Yu Tsai <wenst@chromium.org>
Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/cc8f7f7da5bdccce514a320e0ae7468659cf7346.1707327680.git.daniel@makrotopia.org
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
2024-04-23 12:09:12 +02:00
AngeloGioacchino Del Regno
7ca803b489
soc: mediatek: mtk-svs: Append "-thermal" to thermal zone names
The thermal framework registers thermal zones as specified in DT and
including the "-thermal" suffix: append that to the driver specified
tzone_name to actually match the thermal zone name as registered by
the thermal API.

Fixes: 2bfbf82956 ("soc: mediatek: mtk-svs: Constify runtime-immutable members of svs_bank")
Link: https://lore.kernel.org/r/20240318113237.125802-1-angelogioacchino.delregno@collabora.com
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
2024-04-23 12:09:12 +02:00
Justin Stitt
166db01007 soc: qcom: cmd-db: replace deprecated strncpy with strtomem
strncpy() is an ambiguous and potentially dangerous interface [1]. We
should prefer more robust and less ambiguous alternatives.

@query is marked as __nonstring and doesn't need to be NUL-terminated.

Since we are doing a string to memory copy, we can use the aptly named
"strtomem" -- specifically, the "pad" variant to also ensure NUL-padding
throughout the destination buffer.

Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#strncpy-on-nul-terminated-strings [1]
Link: https://manpages.debian.org/testing/linux-manual-4.8/strscpy.9.en.html [2]
Link: https://github.com/KSPP/linux/issues/90
Cc: linux-hardening@vger.kernel.org
Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Justin Stitt <justinstitt@google.com>
Link: https://lore.kernel.org/r/20240319-strncpy-drivers-soc-qcom-cmd-db-c-v3-1-aeb5c5180c32@google.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
2024-04-21 12:26:47 -05:00
Maulik Shah
f592cc5794 soc: qcom: rpmh-rsc: Enhance check for VRM in-flight request
Each RPMh VRM accelerator resource has 3 or 4 contiguous 4-byte aligned
addresses associated with it. These control voltage, enable state, mode,
and in legacy targets, voltage headroom. The current in-flight request
checking logic looks for exact address matches. Requests for different
addresses of the same RPMh resource as thus not detected as in-flight.

Add new cmd-db API cmd_db_match_resource_addr() to enhance the in-flight
request check for VRM requests by ignoring the address offset.

This ensures that only one request is allowed to be in-flight for a given
VRM resource. This is needed to avoid scenarios where request commands are
carried out by RPMh hardware out-of-order leading to LDO regulator
over-current protection triggering.

Fixes: 658628e7ef ("drivers: qcom: rpmh-rsc: add RPMH controller for QCOM SoCs")
Cc: stable@vger.kernel.org
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Tested-by: Elliot Berman <quic_eberman@quicinc.com> # sm8650-qrd
Signed-off-by: Maulik Shah <quic_mkshah@quicinc.com>
Link: https://lore.kernel.org/r/20240215-rpmh-rsc-fixes-v4-1-9cbddfcba05b@quicinc.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
2024-04-21 12:11:40 -05:00
Dmitry Baryshkov
d6cbce2cd3 soc: qcom: pmic_glink: notify clients about the current state
In case the client is registered after the pmic-glink recived a response
from the Protection Domain mapper, it is going to miss the notification
about the state. Notify clients about the current state upon
registration.

Fixes: 58ef4ece1e ("soc: qcom: pmic_glink: Introduce base PMIC GLINK driver")
Reviewed-by: Andrew Halaney <ahalaney@redhat.com>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Mukesh Ojha <quic_mojha@quicinc.com>
Tested-by: Xilin Wu <wuxilin123@gmail.com> # on QCS8550 AYN Odin 2
Link: https://lore.kernel.org/r/20240403-pmic-glink-fix-clients-v2-2-aed4e02baacc@linaro.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
2024-04-21 12:00:10 -05:00
Dmitry Baryshkov
635ce0db89 soc: qcom: pmic_glink: don't traverse clients list without a lock
Take the client_lock before traversing the clients list at the
pmic_glink_state_notify_clients() function. This is required to keep the
list traversal safe from concurrent modification.

Fixes: 58ef4ece1e ("soc: qcom: pmic_glink: Introduce base PMIC GLINK driver")
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Andrew Halaney <ahalaney@redhat.com>
Reviewed-by: Mukesh Ojha <quic_mojha@quicinc.com>
Tested-by: Xilin Wu <wuxilin123@gmail.com> # on QCS8550 AYN Odin 2
Link: https://lore.kernel.org/r/20240403-pmic-glink-fix-clients-v2-1-aed4e02baacc@linaro.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
2024-04-21 12:00:10 -05:00
Krzysztof Kozlowski
77706838f8 soc: qcom: mention intentionally broken module autoloading
Qualcomm PMIC ChargerPD ULOG and RPM Master Statistics drivers are
solely for debugging purposes and should not be autoloaded as modules.
Add comments to annotate missing MODULE_DEVICE_TABLE.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/20240410184522.271889-1-krzk@kernel.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
2024-04-21 11:22:11 -05:00
Andrew Davis
ddbf3204f6 soc: ti: wkup_m3_ipc: Send NULL dummy message instead of pointer message
mbox_send_message() sends a u32 bit message, not a pointer to a message.
We only convert to a pointer type as a generic type. If we want to send
a dummy message of 0, then simply send 0 (NULL).

Signed-off-by: Andrew Davis <afd@ti.com>
Link: https://lore.kernel.org/r/20240325165507.30323-1-afd@ti.com
Signed-off-by: Nishanth Menon <nm@ti.com>
2024-04-09 11:11:59 -05:00
Lukasz Luba
a5bb5e0877 soc: samsung: exynos-asv: Update Energy Model after adjusting voltage
When the voltage for OPPs is adjusted there is a need to also update
Energy Model framework. The EM data contains power values which depend
on voltage values. The EM structure is used for thermal (IPA governor)
and in scheduler task placement (EAS) so it should reflect the real HW
model as best as possible to operate properly.

Based on data on Exynos5422 ASV tables the maximum power difference might
be ~29%. An Odroid-XU4 (with a random sample SoC in this chip lottery)
showed power difference for some OPPs ~20%. Therefore, it's worth to
update the EM.

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Dietmar Eggemann <dietmar.eggemann@arm.com>
Signed-off-by: Lukasz Luba <lukasz.luba@arm.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2024-04-08 16:05:15 +02:00
Yangyu Chen
915fb0e31c soc: canaan: Deprecate SOC_CANAAN and use SOC_CANAAN_K210 for K210
Since SOC_FOO should be deprecated from patch [1], and cleanup for other
SoCs is already in the mailing list [2,3,4], we remove the use of
SOC_CANAAN and use ARCH_CANAAN for SoCs vendored by Canaan instead from now
on. Thus, we should also change the Makefile here to use ARCH_CANAAN.

Then, since we have introduced SOC_CANAAN_K210 for K210-specific drivers,
we should replace its drivers depends on SOC_CANAAN_K210 and default select
when it has the symbol SOC_CANAAN_K210.

[1] https://lore.kernel.org/linux-riscv/20221121221414.109965-1-conor@kernel.org/
[2] https://lore.kernel.org/linux-riscv/20240305-praying-clad-c4fbcaa7ed0a@spud/
[3] https://lore.kernel.org/linux-riscv/20240305-fled-undrilled-41dc0c46bb29@spud/
[4] https://lore.kernel.org/linux-riscv/20240305-stress-earflap-d7ddb8655a4d@spud/

Signed-off-by: Yangyu Chen <cyy@cyyself.name>
Acked-by: Guo Ren <guoren@kernel.org>
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
2024-04-05 16:42:50 +01:00
Dmitry Baryshkov
6151c02160 soc: qcom: pmic_glink: enable UCSI on sc8180x
Now as all UCSI issues have been fixed, enable UCSI subdevice on the
Qualcomm SC8180X platform.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20240329-qcom-ucsi-fixes-v2-11-0f5d37ed04db@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-04-04 17:07:03 +02:00
Dmitry Baryshkov
3f91a0bf4a soc: qcom: pmic_glink: reenable UCSI on sc8280xp
Now as all UCSI issues have been fixed, reenable UCSI subdevice on the
Qualcomm SC8280XP platform.

Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20240329-qcom-ucsi-fixes-v2-10-0f5d37ed04db@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-04-04 17:07:03 +02:00
Bjorn Andersson
bdfe9fd845 Merge branch 'drivers-for-6.10' onto 'v6.9-rc1'
Merge the patches that was picked up for v6.10 before v6.9-rc1 became
available onto v6.9-rc1 to reduce the risk for conflicts etc.
2024-03-28 08:58:03 -05:00
Geert Uytterhoeven
3d2db954d2 soc: renesas: Enable TMU support on R-Car Gen2
All Renesas R-Car Gen2 SoCs have Timer Units (TMU).  Enable support for
them by selecting the SYS_SUPPORTS_SH_TMU gatekeeper config symbol.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Link: https://lore.kernel.org/r/b7b9fdd6f517a8b29bf5754e7f083d3b71805130.1710865761.git.geert+renesas@glider.be
2024-03-26 09:25:06 +01:00
Lad Prabhakar
0be9a32230 soc: renesas: Add identification support for RZ/V2H SoC
Add support to identify the RZ/V2H (R9A09G057) SoC.

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Fabrizio Castro <fabrizio.castro.jz@renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/20240227232531.218159-4-prabhakar.mahadev-lad.rj@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
2024-03-26 09:24:41 +01:00
Andy Shevchenko
b5867a5c0d
spi: pxa2xx: Use proper SSP header in soc/pxa/ssp.c
There is nothing from pxa2xx_spi.h used by soc/pxa/ssp.c.
Replace it with pxa2xx_ssp.h.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Link: https://msgid.link/r/20240307195056.4059864-4-andriy.shevchenko@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-03-25 00:49:17 +00:00