1248769 Commits

Author SHA1 Message Date
Arnd Bergmann
1b9df39edc firmware: tegra: Changes for v6.9-rc1
Contains a fix that makes sure we don't unnecessarily call kfree().
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEiOrDCAFJzPfAjcif3SOs138+s6EFAmXY1ZYACgkQ3SOs138+
 s6Hg+hAAgYulbZF0bMYgdFdVwRY3dL/pSu+5LKVjUcgaoUqrS8EmOHBZGhDZiBxC
 OXcvTr+715eXlsXbSSQhXcaV3jPmKUw605lNkmayOM8r5Rc00e1uVc2ZzdrA9eim
 i75/REtOGviDrMBzvBal3h6eBld9jI2tH77/yQUfe2PnpArduCJwE6zD0ZXpS3yr
 WzmC9xX+nE2qr1W7QAPfISdCudqDFICAyJzoSpkugSaGfhbKbMv+mQAVEMSsVbMZ
 Js+GSWSqn+9DC8KdL+xVPWaw9ghK0fRFI1OSAY4W3YNCQQLtuWo9HQa0m63tc5Yt
 a+zXZd/d3RS/qrxD1AYasaQdL+rQu3C6+Du9Q2QuIZbygRbcbs0VC8Mt6UwqSWo4
 3XxyAad9orWCRca33IMz4bmlM+aklxDoy3uCw9/a3of5rUM78SCGyfEKgB3kNEW7
 SmBH35WMreqsACFwICsEH8Hh45bTNuM07s8GiZj6z1TsdZtv4/NIL7ZsIW4Mddhc
 uIjafLz4MKyMkJC8w4XwpJZcxOphwn6LoChZKo2bhKfLw4dtLeM49AhJiYAoLP4w
 jcqfYBD2d0FiGMaMUI4QG0ccBPE2KOt4x/MrcNN71mUsC2rKnraIZdAK4IgCcJLk
 NrfEDG9lK/+zXKWSf1kIKPK8DbkHcXwpAdREhrNlipgY+d2QVPs=
 =G5/1
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmXl7ecACgkQYKtH/8kJ
 UieqAw//TAwFAXENXh9nDPB3vInOVIdqfc4F4sPkDcPUTZeA3bNLrbhNiwcMKAA/
 p9I6t4XZmGDP/J0H9eWUktXkSapCxoxvLiXyWNEELe6MDjUJKePrqe+dKVzbm2sJ
 yg8qRqLYr1h6qCqvVDgewoUsS2JJjUuWeBdO2rBv8XtOX6jGzxHzZ8MPXEUEOe3A
 05jP80vtAKbvGG1USUDzy9hchMZhPsbDTYUoaHx5p02V+2EzRiOC5GlIoEH3rsFp
 NoFP0m71WXcdgqhtvZGA5r8cntN/wjy/7I2E/tT7aimcgDcliFjYGZuD6s9yazpk
 H0mK+8S5SNia4net6AI6j8zHz16eVPmnCIAFYDVteVBqEZ4y01B2pP4iGGOMUIUJ
 3hFJCpAwCVEbiWxxc4HqRFbISmmc9LV1TbDipuHhepK9fNPpZmtFq9F1JiV/+1vY
 fc1JXP4mG0HROXH2xxDYvMciuuoGNb8NDes4rtfcSHW3TndUSHewTHWik1GEFafi
 R0IfHDZEneRDb0JrTRDigb/0UinRQdzD5QqHb3hZTwbcblrer53kY2LKSkwv3T+z
 /WDzqCLarVczo5hgVqt97T+87VigLw3eGAs9IX/gO2f6jZTXjzod/VMl/LuwewCI
 PiobIrdaGxrAvTpz3BWi0ytkKF3hJOWdWDql21tF8efvnPBUIFg=
 =FAN/
 -----END PGP SIGNATURE-----

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

firmware: tegra: Changes for v6.9-rc1

Contains a fix that makes sure we don't unnecessarily call kfree().

* tag 'tegra-for-6.9-firmware' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux:
  firmware: tegra: bpmp: Return directly after a failed kzalloc() in get_filename()

Link: https://lore.kernel.org/r/20240223174849.1509465-2-thierry.reding@gmail.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-03-04 16:51:03 +01:00
Arnd Bergmann
3326155e5b soc/tegra: Changes for v6.9-rc1
This set of changes adds ACPI support for the APBMISC driver and cleans
 up a few things like dependencies and unused code.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCA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sXTI7Lx
 mcGO8s5aggpBksuAZPzSGf2tbxmF1lQemjg69ciRGtGFR7EQ2bIdyrZoH+AzQnje
 tgxzk8sPJhqq0wbqbtrrIHbKLzmSH5R+0wXEUdRSvdinbL5VHKWkWOpeGS2ca0k1
 umZ/hAQWWVNmZylsEBpF4W3yX13SivpTfUPkmVdNKQfEnTez2GiDYZyOEWVuvbFj
 WhNxu2YTY44X4N8bY4lpJ7x9YCAUJm2Z8cuZ0m0lD22fM64rJQaG7dsGhAy9MK5M
 jO6S0xmNfehC8v5gn2RBNCikVpp25W1IzhTpfWPjLJi4pYSeM+wRwWsgGbX6QrfI
 me6WrRGVwgCFTbmyUgH/d3wgSLHf5J7hP2+NZ4VBjRhGc3ltwzo99crypQFpUlhY
 D39wYI3jb+16cLLfryRP4LEik1WND+0h5JrYMMG2x3lswzRVv66A+v/00LAiOSQj
 2DFxP0NS8Ig/AgkPR5g5KLBtCn7GvjrYm9+qFmCToZOcRbIqINA=
 =j1US
 -----END PGP SIGNATURE-----

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

soc/tegra: Changes for v6.9-rc1

This set of changes adds ACPI support for the APBMISC driver and cleans
up a few things like dependencies and unused code.

* tag 'tegra-for-6.9-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux:
  soc/tegra: pmc: Add SD wake event for Tegra234
  soc/tegra: pmc: Update scratch as an optional aperture
  soc/tegra: pmc: Update address mapping sequence for PMC apertures
  bus: tegra-aconnect: Update dependency to ARCH_TEGRA
  soc/tegra: Fix build failure on Tegra241
  soc/tegra: fuse: Fix crash in tegra_fuse_readl()
  soc/tegra: fuse: Define tegra194_soc_attr_group for Tegra241
  soc/tegra: fuse: Add support for Tegra241
  soc/tegra: fuse: Add ACPI support for Tegra194 and Tegra234
  soc/tegra: fuse: Add function to print SKU info
  soc/tegra: fuse: Add function to add lookups
  soc/tegra: fuse: Add tegra_acpi_init_apbmisc()
  soc/tegra: fuse: Refactor resource mapping
  soc/tegra: fuse: Use dev_err_probe for probe failures
  mm/util: Introduce kmemdup_array()
  soc/tegra: pmc: Remove some old and deprecated functions and constants

Link: https://lore.kernel.org/r/20240223174849.1509465-1-thierry.reding@gmail.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-03-04 16:48:25 +01:00
Arnd Bergmann
857a96e9df Arm SCMI updates for v6.9
Quite a few changes to extend support to SCMI v3.2 specification,
 to enhance notification handling and other miscellaneous updates.
 
 1. Enhancements to notification handling
 
    Until now, trying to register a notifier for an unsuppported
    notification returned an error genrating unneeded message exchanges
    with the SCMI platform. This can be avoided by looking up in advance
    the specific protocol and resources available.
 
    With these changes SCMI driver user will fail to register a notifier
    if the related command or resource is not supported (like before)
    without the need of exchanging any message.
 
    Perf notifications are also extended to provide the pre-calculated
    frequencies corresponding to the level or index carried by the
 
 2. More SCMI v3.2 related updates
 
    One of the main addition includes a centralized support to the SCMI
    core to handle v3.2 optional protocol version negotiation, so that
    at protocol initialization time, if the platform advertised version
    is newer than supported by the kernel and protocol version negotiation
    is supported, the SCMI core will attempt to negotiate an older protocol
    version.
 
    It also includes the clock get permissions which indicates if any of
    the clock operations are forbidden by the platform for the OSPM agent.
    It can be used in the clock driver to avoid unnecessary message
    exchanges between the kernel and the platform which will always end
    up with the failure. It also includes other missing bits of clock
    v3.2 protocol so that the supported protocol version can be bumped
    to 0x30000 (v3.2).
 
 3. Miscellaneous updates
 
    This includes addition of warning if the domain frequency multiplier
    is 0 or rounded off to indicate the actual frequencies are either
    wrong ot rounded off, hardening of clock domain info lookups, addition
    of multiple protocols registration support within a SCMI driver,
    update to SCMI entry in MAINTAINERS to include HWMON driver and
    constifying the scmi_bus_type structure.
 
    This also includes couple for fixes to minor issues: double free in
    SMC transport cleanup path and struct kernel-doc warnings in optee
    transport.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEunHlEgbzHrJD3ZPhAEG6vDF+4pgFAmXYA+gACgkQAE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OQZq8rGKwUdkXOhyFOBiYP
 O0T8DnqMigOLCSkA10sUVfdt2LrlhP9/Zdb5sogl/rRTlrCBC0e3R5c8pmPIO+H/
 sj+TJOzV5GfKTfYjUT7Xo8tyw5zE0skxx/YcmGuDVR4olYCpkF25ZwFaV6U+9SX6
 bT96JDaEoVGF12GaHb4f7eG7YBd7rTP4G1N5doQWnpOVytsJcxZSQV2QoJObEERC
 hSn3rCZlxuUoPGGSB6kxhn1fkp/vSDZQC9OTGH5S5kB45XQiLxBfv+o513krAp/+
 KMOz7BQc2L+pnIlzsuYkGU+6tACtOpzeI+IgFIwd2zs2Hkl+u0RkSpd4QkyQLQCb
 SI9AsmNWoBs3OP7hVUa3PxaNk5ggBBLM9eu4HLAXFTz2tdrLSv1ZqMWTB0xRIZUA
 UWE7pW41JFMgx50nCLTdBgKNRiJ1aXjup4uuQAq8DZGXrT0fk8I=
 =X90P
 -----END PGP SIGNATURE-----

Merge tag 'scmi-updates-6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into soc/drivers

Arm SCMI updates for v6.9

Quite a few changes to extend support to SCMI v3.2 specification,
to enhance notification handling and other miscellaneous updates.

1. Enhancements to notification handling

   Until now, trying to register a notifier for an unsuppported
   notification returned an error genrating unneeded message exchanges
   with the SCMI platform. This can be avoided by looking up in advance
   the specific protocol and resources available.

   With these changes SCMI driver user will fail to register a notifier
   if the related command or resource is not supported (like before)
   without the need of exchanging any message.

   Perf notifications are also extended to provide the pre-calculated
   frequencies corresponding to the level or index carried by the

2. More SCMI v3.2 related updates

   One of the main addition includes a centralized support to the SCMI
   core to handle v3.2 optional protocol version negotiation, so that
   at protocol initialization time, if the platform advertised version
   is newer than supported by the kernel and protocol version negotiation
   is supported, the SCMI core will attempt to negotiate an older protocol
   version.

   It also includes the clock get permissions which indicates if any of
   the clock operations are forbidden by the platform for the OSPM agent.
   It can be used in the clock driver to avoid unnecessary message
   exchanges between the kernel and the platform which will always end
   up with the failure. It also includes other missing bits of clock
   v3.2 protocol so that the supported protocol version can be bumped
   to 0x30000 (v3.2).

3. Miscellaneous updates

   This includes addition of warning if the domain frequency multiplier
   is 0 or rounded off to indicate the actual frequencies are either
   wrong ot rounded off, hardening of clock domain info lookups, addition
   of multiple protocols registration support within a SCMI driver,
   update to SCMI entry in MAINTAINERS to include HWMON driver and
   constifying the scmi_bus_type structure.

   This also includes couple for fixes to minor issues: double free in
   SMC transport cleanup path and struct kernel-doc warnings in optee
   transport.

* tag 'scmi-updates-6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux: (29 commits)
  MAINTAINERS: Update SCMI entry with HWMON driver
  firmware: arm_scmi: Update the supported clock protocol version
  firmware: arm_scmi: Add standard clock OEM definitions
  firmware: arm_scmi: Add clock check for extended config support
  firmware: arm_scmi: Add support for v3.2 NEGOTIATE_PROTOCOL_VERSION
  firmware: arm_scmi: Fix struct kernel-doc warnings in optee transport
  firmware: arm_scmi: Report frequencies in the perf notifications
  firmware: arm_scmi: Use opps_by_lvl to store opps
  firmware: arm_scmi: Implement is_notify_supported callback in powercap protocol
  firmware: arm_scmi: Implement is_notify_supported callback in reset protocol
  firmware: arm_scmi: Implement is_notify_supported callback in sensor protocol
  firmware: arm_scmi: Implement is_notify_supported callback in clock protocol
  firmware: arm_scmi: Implement is_notify_supported callback in system power protocol
  firmware: arm_scmi: Implement is_notify_supported callback in power protocol
  firmware: arm_scmi: Implement is_notify_supported callback in perf protocol
  firmware: arm_scmi: Add a common helper to check if a message is supported
  firmware: arm_scmi: Check for notification support
  firmware: arm_scmi: Make scmi_bus_type const
  firmware: arm_scmi: Fix double free in SMC transport cleanup path
  firmware: arm_scmi: Implement clock get permissions
  ...

Link: https://lore.kernel.org/r/20240223033435.118028-1-sudeep.holla@arm.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-03-04 15:50:07 +01:00
Arnd Bergmann
6208050973 Arm FF-A update for v6.9
Another single and simple update to just constify the ffa_bus_type
 structure similar to other changes done treewide following the driver
 core changes to accomodate the same.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEunHlEgbzHrJD3ZPhAEG6vDF+4pgFAmXX+2AACgkQAEG6vDF+
 4ph9fQ/+IgSJ13MyClBrpTcmSgkPc8KIvVI+75kjBeH/OJiqQoiCsQG8MwLHP5u0
 xUW7xFaHOaDwi/hxQUIWwCYXh4kSqxyxnfgCqsPzqrtIvZo5WninYrHbZz9tE7NB
 X4ClY8isNqxJx9R95Eh4N8yf+9LpuFqyPejA0WAQ3x6360DlRqpuIEJjSp0pnW5m
 qK9vTBPKahV+kAfH93EMlDlRL8vb5efpyCAJ1ga3pmJ6adWVmZDP5VGe477OmMbw
 MAMYoZtendw69tlX+L7ZXsUyQKfn85mE/T7iHgkNJiAuOq1fyivnoZlWbWVYnOUG
 riy+nMUSmrP2V+YgRKw/TmqAN6VwAuj5vr4RNgC0V8PybiBY99EEzL3IJ8zgSyJC
 zzUhfh7Zi6lJxcZJPAmfavfvVB/viEXctpwl0mqLd09kiuPtVo/np9jS+gTcYcXj
 3s690CdNTP9pqeVQBdOMQ+s+fmtf5egtmW4+TnN0alKoX0N1RyEnKldomM4eHNhx
 W3RUIk9YBDciL2XNWQ9faEtw1ofFY/WW2KDh6rK0Rylm3en190N1isjPk9so37vK
 oXkoHdVwWbbZGsQTSY6APvtzxfq2K9tc58F0XBSBs2mWq/Pn6YR3nVLMV/N6r/CY
 Fkc/kxyHK54a7I5YpgUvLce0u2P9ZgyWhTVL+1y7ykLq7PW8RJI=
 =dcUt
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmXl31IACgkQYKtH/8kJ
 UiesVQ/+O7yIh/hfZHnhnqry32nwN69lKkjwNYBpRvZhfP7BgtM8VV3lfqTOAVHk
 RqYZiu+qJ36iT/8ESdI0EbHytBewEvCjpPhBNgx9hSPAlvgEdniSgi1J4QuY4Kaw
 F3bPwJZQ3Nhc23vcFVT3WYBLUODSpF6h2ByqGykeadAnNwwHBekS0HLgpQXVstoL
 SPZmtMpHPvHtf0pRG1ZxuoDi1JWV6CapMJTkCK+sVuEI6oILPz7ribrNTvJnvwDU
 Qc91ewKBCNX8q8qyEZcekbZGRt0Pa+VvkImOflXgITI9cmSOUCH24XqArTpUUE5k
 ff7q6Cu+9viJkfmxnc6Wd0C4tZMueLngdBfYGU+pynBVNwjzSDuKROl83atv0mV9
 fnZSakl5IlL6yu0FT5emIqb7DCSynpvtUlx/rEijVa/K53aGWUfOjDDiR+j/LweR
 UedppB2i7TbZAcNYygR3VFA1xXMfjV7Mowp7iu7rN9uIhMaiLd+z5v6D0p+hxUOf
 2Ziu0zXYa0vsbJ7p00Du+Iqtp/t+TeIxp8FCVgL9+EZRGfaFj5Jpg/Xt5/6JXVD3
 RPibDDbqsR2KTIl8zlr65dtPr6bDYFNrBqGwIbF8hJTr/44/wIysOf9A5/zRq3X6
 Ke14dzveIaxuwIi9k6D3jQcgL8/llhy6zPKITCskM6AEB7Sb4EM=
 =w0Sv
 -----END PGP SIGNATURE-----

Merge tag 'ffa-update-6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into soc/drivers

Arm FF-A update for v6.9

Another single and simple update to just constify the ffa_bus_type
structure similar to other changes done treewide following the driver
core changes to accomodate the same.

* tag 'ffa-update-6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux:
  firmware: arm_ffa: Make ffa_bus_type const

Link: https://lore.kernel.org/r/20240223033250.117878-1-sudeep.holla@arm.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-03-04 15:48:49 +01:00
Florian Fainelli
c2f0961a45 MAINTAINERS: Update SCMI entry with HWMON driver
scmi-hwmon.c is tightly coupled with the SCMI subsystem, fold it under
the SCMI subsystem MAINTAINERS umbrella.

Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
Link: https://lore.kernel.org/r/20240222193027.920006-1-florian.fainelli@broadcom.com
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2024-02-23 02:01:13 +00:00
Cristian Marussi
5e0d2fe70c firmware: arm_scmi: Update the supported clock protocol version
And finally update the supported clock protocol version to v3.2(0x30000).

Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Link: https://lore.kernel.org/r/20240214183006.3403207-6-cristian.marussi@arm.com
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2024-02-22 08:17:11 +00:00
Cristian Marussi
62092c428f firmware: arm_scmi: Add standard clock OEM definitions
Add a common enum to define the standard clock OEM types defined by the
SCMI specification, so as to enable the configuration of such extended
configuration properties with the existent clock protocol operations.

Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Link: https://lore.kernel.org/r/20240214183006.3403207-5-cristian.marussi@arm.com
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2024-02-22 08:17:11 +00:00
Cristian Marussi
e4ad2b0130 firmware: arm_scmi: Add clock check for extended config support
SCMI v3.2 added support to set/get clock custom OEM types; such support is
conditionally present, though, depending on an extended config attribute
bit possibly advertised by the platform server on a per-domain base.

Add a check to verify if OEM types are supported before allowing any kind
of OEM-specific get/set operation. Also add a check around all the new
v3.2 clock features.

Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Link: https://lore.kernel.org/r/20240214183006.3403207-4-cristian.marussi@arm.com
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2024-02-22 08:17:10 +00:00
Cristian Marussi
8c80c42ad4 firmware: arm_scmi: Add support for v3.2 NEGOTIATE_PROTOCOL_VERSION
Freshly introduced NEGOTIATE_PROTOCOL_VERSION allows the agent to ascertain
upfront if a specific protocol(usually older) version is supported by the
platform.

It is used by the agent in case the platform has advertised the support of
a newer protocol version than the latest version supported by the agent,
since backward compatibility cannot be automatically assumed.

Emit a warning about possible incompatibility when negotiation was not
possible or just print the successfully negotiated protocol.

Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Link: https://lore.kernel.org/r/20240214183006.3403207-3-cristian.marussi@arm.com
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2024-02-22 08:17:10 +00:00
Randy Dunlap
a9c049f47e firmware: arm_scmi: Fix struct kernel-doc warnings in optee transport
Fix the kernel-doc notation for the nested union in struct
scmi_optee_channel to eliminate kernel-doc warnings:

  |  optee.c:130: warning: Excess struct member 'shmem' description
  |			   in 'scmi_optee_channel'
  |  optee.c:131: warning: Function parameter or struct member 'req'
  |			   not described in 'scmi_optee_channel'

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Sudeep Holla <sudeep.holla@arm.com>
Cc: Cristian Marussi <cristian.marussi@arm.com>
Cc:  <linux-arm-kernel@lists.infradead.org>
Reviewed-by: Cristian Marussi <cristian.marussi@arm.com>
Link: https://lore.kernel.org/r/20240221062157.8694-1-rdunlap@infradead.org
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2024-02-22 08:17:10 +00:00
Markus Elfring
1315848f1f firmware: tegra: bpmp: Return directly after a failed kzalloc() in get_filename()
The kfree() function was called in one case by
the get_filename() function during error handling
even if the passed variable contained a null pointer.
This issue was detected by using the Coccinelle software.

Thus return directly after a call of the function “kzalloc” failed
at the beginning.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2024-02-21 17:10:32 +01:00
Arnd Bergmann
d22ee157fb Memory controller drivers for v6.9
1. TI EMIF: Simplify handling CONFIG_DEBUG_FS, CONFIG_OF and
    platform_driver_probe().
 2. Narrow regex in Nvidia Tegra20 EMC binding.
 -----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCgAuFiEE3dJiKD0RGyM7briowTdm5oaLg9cFAmXSTJ0QHGtyemtAa2Vy
 bmVsLm9yZwAKCRDBN2bmhouD1/GXD/4/0S/QS4PH8yZ8PcooNs8jFUDCz3cFgJyX
 UBWaYSVo9FJDr0D9suK5xoHePUHWSpR4dlj54kPwW9/fPKapstNVWxDb75B624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LdiT6Az3lpHaVy81ujAYxTPsExREqDD3gwM4r6
 RQBZPM1nr3iG2W35CwmJigjTMsXxF6pcVBAo0R1QdAiw5avY9zPEmXETs6GFDxwV
 8rR48eEaDy/7ANxNyz2jVJ1WeU3UMBwBgYlFnMvc/a+i9AellL4XMp0TfG5T1PkU
 6WRusP0QPlMYTDBcSxq70sNIQZNPd0maIi87MZO0Kj+ram7IP7AvUMJA4DzwMTqL
 jo+c5Lq+PxaxNF7SlKv3P2BIMdXG7OVn5o/N4PPeBXm3caOTNtadyMT7rj7gAXF3
 E92xL0IPL0JPqYaLuyXo5oKvOzL2/NeNI09tY/A4Oxm2Psw6ans=
 =xCE0
 -----END PGP SIGNATURE-----

Merge tag 'memory-controller-drv-6.9' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl into soc/drivers

Memory controller drivers for v6.9

1. TI EMIF: Simplify handling CONFIG_DEBUG_FS, CONFIG_OF and
   platform_driver_probe().
2. Narrow regex in Nvidia Tegra20 EMC binding.

* tag 'memory-controller-drv-6.9' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl:
  dt-bindings: memory-controllers: narrow regex for unit address to hex numbers
  memory: emif: Drop usage of platform_driver_probe()
  memory: emif: Simplify code handling CONFIG_OF
  memory: emif: Simplify code handling CONFIG_DEBUG_FS

Link: https://lore.kernel.org/r/20240218183046.32721-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-02-20 22:04:04 +01:00
Arnd Bergmann
b256c24cf8 Samsung SoC driver changes for v6.9
1. Add bindings for Google GS101 I2C controller and SYSREG sycon block.
 2. Remove Tomasz Figa from Samsung clock and pinctrl maintainer entries.
 -----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCgAuFiEE3dJiKD0RGyM7briowTdm5oaLg9cFAmXSR3oQHGtyemtAa2Vy
 bmVsLm9yZwAKCRDBN2bmhouD1/QSD/9trC30LHc/7Eh0SjfGWTtRKrfaf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SqLlgY9RxRjGXg6xsdhJIRo752PGI0dQ39YL4QFjEXBOd9O5jdlU
 5t+4aa090O5AVlj208GQQuR0vbKpHzI8BWbyAFZnTMRF2pzjaxLIl14/DcxbcBd0
 7sifOQ5nvPAdgWeNQZ9542dlJIDzlzFFGKjmykXdhlGZt+HGYzbiie5yd0dP8xdG
 q/KumukkJXZ57ntwJk1QgSzNIqTp6Uwx/h2ynFa+WLiEJwiiqSr436qiyeqGkjBs
 nP13MLUxiQ75NmHBrcnnOLPWWBeYZciZ3s1uWldtTUaNgbScH1w7n5H19fSEPFbb
 gxiThCyrb0fH2hyb9xEOFWDn7jowahpK7FyMReiAQKoXzSzrunP7VCc1xOI0w6J6
 CaqhOLNQCezXLWtGGIkY4Ya1Y9C/SHdH24NOtEGlL44F8atAht8=
 =NrEP
 -----END PGP SIGNATURE-----

Merge tag 'samsung-drivers-6.9' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into soc/drivers

Samsung SoC driver changes for v6.9

1. Add bindings for Google GS101 I2C controller and SYSREG sycon block.
2. Remove Tomasz Figa from Samsung clock and pinctrl maintainer entries.

* tag 'samsung-drivers-6.9' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux:
  MAINTAINERS: Remove Tomasz from Samsung clock and pinctrl entries
  dt-bindings: samsung: exynos-sysreg: gs101-peric0/1 require a clock
  dt-bindings: i2c: exynos5: add google,gs101-hsi2c compatible

Link: https://lore.kernel.org/r/20240218182141.31213-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-02-20 22:02:40 +01:00
Arnd Bergmann
6e66213fd5 Renesas driver updates for v6.9
- Initial support for the Renesas R-Car V4M (R8A779H0) SoC.
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQQ9qaHoIs/1I4cXmEiKwlD9ZEnxcAUCZcYuwAAKCRCKwlD9ZEnx
 cGo9AQC3eWubHoOL3cfOo9m51KhD6sHqp7HtdLphkIJvezbYDwD/d2IsqBUqnpWG
 QwdXTxGPkcFWdCYo7rwSkBL/6W3uyAI=
 =vDJf
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmXVEtoACgkQYKtH/8kJ
 UicqtA//YAy0MHXf8vjKb/fThWrUA8rkmbQAGLQ5tbC6OmQIRocxHTyPGeWin+fg
 Sf0xDO70efcyzl8nFMCbk18hrf9t4fHixDg/sdizUNO2l90Af7mHI7tZmN/WPW6z
 B0XREa9Kp7MfIfhMeGTlT+Tm8R3WhlzNZZ3A7tkK0LCBZu1J9Fqfynn8PylwFynj
 X/H5gfY46cAUnO06j8kpdEy7df3BW8+WfkmIw0RApn+91bN6xcR4qO1e4lMmXGdZ
 uCxVSUxfJQ4qd5Q//nSRdp6iYZGBKWd9v+zHg279nGu1rpo9snXvuQInruljSdJ9
 6W24EdacVXydk2YTkLzmfUXOAEH6H7k1IkgV3pA/BO3Z4F5Aiue88bitG7kPabqW
 dpRhenvUamepBbZVcwkiXskB39eoQcq13kcJYBeUYmywuv0ts7i1Ez8QridgvgT4
 bw65/6GZ/tM9avZqBf4v52/bQYX1fv7ohoBe/DTVi95p4SVKmRCGDZx0Gbx85q+2
 GOu2ir4WIHZl4S+wrwtWXoSPB1K9hnM9zYyZNkBrTo2jM7NfuBu8WJP+A4wTv++2
 GERbcHsd7tgZIx/pQI44MEmJ6GjNPD83e6wRueFEzACzanC/u2Mfq7spWOBWXkm0
 YYz723etFBWm0i9I1OxYrszhSEnZdejBV+46w0afI0S5mvPE8RU=
 =cDa0
 -----END PGP SIGNATURE-----

Merge tag 'renesas-drivers-for-v6.9-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into soc/drivers

Renesas driver updates for v6.9

  - Initial support for the Renesas R-Car V4M (R8A779H0) SoC.

* tag 'renesas-drivers-for-v6.9-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel:
  soc: renesas: rcar-rst: Add support for R-Car V4M
  soc: renesas: Identify R-Car V4M
  soc: renesas: Introduce ARCH_RCAR_GEN4

Link: https://lore.kernel.org/r/cover.1707487830.git.geert+renesas@glider.be
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-02-20 22:00:10 +01:00
Arnd Bergmann
d4aece85e8 MediaTek soc driver updates for v6.9
The only addition here is the MediaTek SoC Information driver,
 registering socinfo for various MediaTek SoCs.
 -----BEGIN PGP SIGNATURE-----
 
 iJ4EABYKAEYWIQQn3Xxr56ypAcSHzXSaNgTPrZeEeAUCZdNSSygcYW5nZWxvZ2lv
 YWNjaGluby5kZWxyZWdub0Bjb2xsYWJvcmEuY29tAAoJEJo2BM+tl4R4jA0A/0Ok
 7VsiAyB+G3v+OvkVnsgt1TQF5cRyNfAPSWGwGFynAQDYvSKOx/LeyU0uY1O3i+Yn
 1o/y2UPSboYMhR/6xcOmDA==
 =nuX6
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmXVEE4ACgkQYKtH/8kJ
 UicS3Q//VoL/9cK3HdQPmrPcOC04LzZEWJ+cS7WjExXusOCI5HcOCAYvCgEohKIH
 CHgbE6eyXHlYtPcPcI49YJvQY7jtPqtzDJxGUNLEOn9VI3HYlySGHZLhiMpGwSfl
 AMZW3NIpZSKJgtnerbxP4zXrr5lxVaVSV0K+fDgZnzW9z8wQ2+C+xMTAW8CvHZMi
 fQ3v2FfizFotFVdEBaYRWraD+eVJFWnR0ShWqmnRyQOXPE8QgdG/LFHwGuGwdp2c
 Gw3oyFqJT0x5vbKraVuFr/Q2Vqvk9iQYfbQkX0fZn9JR+ITi37I/gchcV3ziFmij
 XS+Wj4XPqGnuocdW3eBm23zBMzOxTuc5nt0QYU2s2LeXfnv3twn+V0Ube8d3VHRT
 04cbptaXtgZMG4cztCXQYmfFZ80tbxEs+LRpZh0T54Z/z8I/LhDcowgAYrNCYjgg
 bbHkcTFNcFhTvhVB3yBo8xoEA4wXJZpjtVyyBzbrCJoo+XMXRPJgkvyJMkPgctD+
 kM4wza5LkMmBgREXCg55keYDDCIHDWEA7YmCCfl420hCcLL2/urb7ilPf1UgOzJC
 C7NlsK7wYyx6qdnaoqkAC5wu+UcXkInHQnXi3FSiXV8W07HKXVtr+MRHvW4SM+Cm
 cgojseRIQu8ur1rhTrjWQ7nZiDhhUy6nGt9S/Ez91lPz88Wxg4w=
 =zkVA
 -----END PGP SIGNATURE-----

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

MediaTek soc driver updates for v6.9

The only addition here is the MediaTek SoC Information driver,
registering socinfo for various MediaTek SoCs.

* tag 'mtk-soc-for-v6.9' of https://git.kernel.org/pub/scm/linux/kernel/git/mediatek/linux:
  soc: mediatek: mtk-socinfo: Add extra entry for MT8183
  soc: mediatek: mtk-socinfo: Clean up NVMEM cell read
  soc: mediatek: mtk-socinfo: Add driver for getting chip information

Link: https://lore.kernel.org/r/20240219131230.157792-2-angelogioacchino.delregno@collabora.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-02-20 21:49:18 +01:00
Cristian Marussi
22ffc748a6 firmware: arm_scmi: Report frequencies in the perf notifications
Extend the perf notification report to include pre-calculated frequencies
corresponding to the reported limits/levels event; such frequencies are
properly computed based on the stored known OPPs information taking into
consideration if the current operating mode is level indexed or not.

Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Link: https://lore.kernel.org/r/20240212123233.1230090-12-cristian.marussi@arm.com
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2024-02-20 12:22:29 +00:00
Cristian Marussi
23443a3c7c firmware: arm_scmi: Use opps_by_lvl to store opps
Store all the discovered OPPs into the XArray opps_by_lvl even when
level_indexing mode is not used, since it comes handy to easily retrieve
OPPs by level.

Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Link: https://lore.kernel.org/r/20240212123233.1230090-11-cristian.marussi@arm.com
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2024-02-20 12:22:29 +00:00
Cristian Marussi
e85beaf760 firmware: arm_scmi: Implement is_notify_supported callback in powercap protocol
Add a preliminary check to verify if the powercap protocol related notify
enable commands are supported at all by the SCMI platform, and then
provide the callback needed to allow the core SCMI notification
subsytem to do a fine-grain check if a specific resource domain
supports notifications.

Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Link: https://lore.kernel.org/r/20240212123233.1230090-10-cristian.marussi@arm.com
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2024-02-20 12:22:29 +00:00
Cristian Marussi
12d6a03f32 firmware: arm_scmi: Implement is_notify_supported callback in reset protocol
Add a preliminary check to verify if the reset protocol related notify
enable commands are supported at all by the SCMI platform, and then
provide the callback needed to allow the core SCMI notification
subsytem to do a fine-grain check if a specific resource domain
supports notifications.

Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Link: https://lore.kernel.org/r/20240212123233.1230090-9-cristian.marussi@arm.com
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2024-02-20 12:22:29 +00:00
Cristian Marussi
7ac7932df2 firmware: arm_scmi: Implement is_notify_supported callback in sensor protocol
Add a preliminary check to verify if the sensor protocol related notify
enable commands are supported at all by the SCMI platform, and then
provide the callback needed to allow the core SCMI notification
subsytem to do a fine-grain check if a specific resource domain
supports notifications.

Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Link: https://lore.kernel.org/r/20240212123233.1230090-8-cristian.marussi@arm.com
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2024-02-20 12:22:29 +00:00
Cristian Marussi
cf1bba2775 firmware: arm_scmi: Implement is_notify_supported callback in clock protocol
Add a preliminary check to verify if the clock protocol related notify
enable commands are supported at all by the SCMI platform, and then
provide the callback needed to allow the core SCMI notification
subsytem to do a fine-grain check if a specific resource domain
supports notifications.

Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Link: https://lore.kernel.org/r/20240212123233.1230090-7-cristian.marussi@arm.com
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2024-02-20 12:22:18 +00:00
Ricardo B. Marliere
989e8661dc firmware: arm_ffa: Make ffa_bus_type const
Now that the driver core can properly handle constant struct bus_type,
move the ffa_bus_type variable to be a constant structure as well,
placing it into read-only memory which can not be modified at runtime.

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Ricardo B. Marliere <ricardo@marliere.net>
Reviewed-by: Cristian Marussi <cristian.marussi@arm.com>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lore.kernel.org/r/20240211-bus_cleanup-firmware2-v1-1-1851c92c7be7@marliere.net
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2024-02-20 06:40:34 +00:00
Cristian Marussi
9f5ddbc222 firmware: arm_scmi: Implement is_notify_supported callback in system power protocol
Add a preliminary check to verify if the system power protocol related
notify enable commands are supported at all by the SCMI platform, and
then provide the callback needed to allow the core SCMI notification
subsytem to do a fine-grain check if a specific resource domain supports
notifications.

Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Link: https://lore.kernel.org/r/20240212123233.1230090-6-cristian.marussi@arm.com
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2024-02-20 06:35:55 +00:00
Cristian Marussi
b7e400bc2e firmware: arm_scmi: Implement is_notify_supported callback in power protocol
Add a preliminary check to verify if the power related notify enable
commands are supported at all by the SCMI platform, and then provide
the callback needed to allow the core SCMI notification subsytem to do
a fine-grain check if a specific resource domain supports notifications.

Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Link: https://lore.kernel.org/r/20240212123233.1230090-5-cristian.marussi@arm.com
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2024-02-20 06:35:55 +00:00
Cristian Marussi
120d26312a firmware: arm_scmi: Implement is_notify_supported callback in perf protocol
Add a preliminary check to verify if the performance related notify
enable commands are supported at all by the SCMI platform, and then
provide the callback needed to allow the core SCMI notification
subsytem to do a fine-grain check if a specific resource domain
supports notifications.

Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Link: https://lore.kernel.org/r/20240212123233.1230090-4-cristian.marussi@arm.com
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2024-02-20 06:35:55 +00:00
Cristian Marussi
637b6d6cae firmware: arm_scmi: Add a common helper to check if a message is supported
A common helper is provided to check if a specific protocol message is
supported or not.

Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Link: https://lore.kernel.org/r/20240212123233.1230090-3-cristian.marussi@arm.com
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2024-02-20 06:35:55 +00:00
Cristian Marussi
8733e86a80 firmware: arm_scmi: Check for notification support
When registering protocol events, use the optional .is_notify_supported
callback provided by the protocol to check if that specific notification
type is available for that particular resource on the running system,
marking it as unsupported otherwise.

Then, when a notification enable request is received, return an error if
it was previously marked as unsuppported, so avoiding to send a needless
notification enable command and check the returned value for failure.

Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Link: https://lore.kernel.org/r/20240212123233.1230090-2-cristian.marussi@arm.com
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2024-02-20 06:35:55 +00:00
Ricardo B. Marliere
961745b2c4 firmware: arm_scmi: Make scmi_bus_type const
Now that the driver core can properly handle constant struct bus_type,
move the scmi_bus_type variable to be a constant structure as well,
placing it into read-only memory which can not be modified at runtime.

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Ricardo B. Marliere <ricardo@marliere.net>
Reviewed-by: Cristian Marussi <cristian.marussi@arm.com>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lore.kernel.org/r/20240211-bus_cleanup-firmware2-v1-2-1851c92c7be7@marliere.net
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2024-02-20 06:35:55 +00:00
Andre Przywara
f1d71576d2 firmware: arm_scmi: Fix double free in SMC transport cleanup path
When the generic SCMI code tears down a channel, it calls the chan_free
callback function, defined by each transport. Since multiple protocols
might share the same transport_info member, chan_free() might want to
clean up the same member multiple times within the given SCMI transport
implementation. In this case, it is SMC transport. This will lead to a NULL
pointer dereference at the second time:

    | scmi_protocol scmi_dev.1: Enabled polling mode TX channel - prot_id:16
    | arm-scmi firmware:scmi: SCMI Notifications - Core Enabled.
    | arm-scmi firmware:scmi: unable to communicate with SCMI
    | Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000
    | Mem abort info:
    |   ESR = 0x0000000096000004
    |   EC = 0x25: DABT (current EL), IL = 32 bits
    |   SET = 0, FnV = 0
    |   EA = 0, S1PTW = 0
    |   FSC = 0x04: level 0 translation fault
    | Data abort info:
    |   ISV = 0, ISS = 0x00000004, ISS2 = 0x00000000
    |   CM = 0, WnR = 0, TnD = 0, TagAccess = 0
    |   GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0
    | user pgtable: 4k pages, 48-bit VAs, pgdp=0000000881ef8000
    | [0000000000000000] pgd=0000000000000000, p4d=0000000000000000
    | Internal error: Oops: 0000000096000004 [#1] PREEMPT SMP
    | Modules linked in:
    | CPU: 4 PID: 1 Comm: swapper/0 Not tainted 6.7.0-rc2-00124-g455ef3d016c9-dirty #793
    | Hardware name: FVP Base RevC (DT)
    | pstate: 61400009 (nZCv daif +PAN -UAO -TCO +DIT -SSBS BTYPE=--)
    | pc : smc_chan_free+0x3c/0x6c
    | lr : smc_chan_free+0x3c/0x6c
    | Call trace:
    |  smc_chan_free+0x3c/0x6c
    |  idr_for_each+0x68/0xf8
    |  scmi_cleanup_channels.isra.0+0x2c/0x58
    |  scmi_probe+0x434/0x734
    |  platform_probe+0x68/0xd8
    |  really_probe+0x110/0x27c
    |  __driver_probe_device+0x78/0x12c
    |  driver_probe_device+0x3c/0x118
    |  __driver_attach+0x74/0x128
    |  bus_for_each_dev+0x78/0xe0
    |  driver_attach+0x24/0x30
    |  bus_add_driver+0xe4/0x1e8
    |  driver_register+0x60/0x128
    |  __platform_driver_register+0x28/0x34
    |  scmi_driver_init+0x84/0xc0
    |  do_one_initcall+0x78/0x33c
    |  kernel_init_freeable+0x2b8/0x51c
    |  kernel_init+0x24/0x130
    |  ret_from_fork+0x10/0x20
    | Code: f0004701 910a0021 aa1403e5 97b91c70 (b9400280)
    | ---[ end trace 0000000000000000 ]---

Simply check for the struct pointer being NULL before trying to access
its members, to avoid this situation.

This was found when a transport doesn't really work (for instance no SMC
service), the probe routines then tries to clean up, and triggers a crash.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Fixes: 1dc6558062da ("firmware: arm_scmi: Add smc/hvc transport")
Reviewed-by: Cristian Marussi <cristian.marussi@arm.com>
Link: https://lore.kernel.org/r/20240126122325.2039669-1-andre.przywara@arm.com
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2024-02-20 06:35:54 +00:00
Peng Fan
dc36561e15 firmware: arm_scmi: Implement clock get permissions
ARM SCMI v3.2 introduces clock get permission command. To implement the
same let us stash the values of those permissions in the scmi_clock_info.
They indicate if the operation is forbidden or not.

If the CLOCK_GET_PERMISSIONS command is not supported, the default
permissions are set to allow the operations, otherwise they will be set
according to the response of CLOCK_GET_PERMISSIONS from the SCMI
platform firmware.

Reviewed-by: Cristian Marussi <cristian.marussi@arm.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Link: https://lore.kernel.org/r/20240121110901.1414856-1-peng.fan@oss.nxp.com
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2024-02-20 06:29:43 +00:00
Cristian Marussi
2858f6e5f0 firmware: arm_scmi: Add multiple protocols registration support
Add the capability for a SCMI driver to register to the core SCMI stack
with multiple SCMI protocols. In such a case the SCMI driver probe
function will end up being called once for each registered protocol
which have been also found as implemented on the platform.

This is especially useful in testing scenarios.

Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Link: https://lore.kernel.org/r/20231221151129.325749-1-cristian.marussi@arm.com
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2024-02-20 06:29:37 +00:00
Cristian Marussi
dea893a66c firmware: arm_scmi: Rework clock domain info lookups
Accessing clock domains descriptors by the index from the SCMI drivers
can potentially lead to out-of-bound violations if the SCMI drivers
misbehaves.

Use a common helper to check the consistency of such accesses.

Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Link: https://lore.kernel.org/r/20240110120916.2482603-1-cristian.marussi@arm.com
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2024-02-20 06:29:31 +00:00
Sudeep Holla
534224b958 firmware: arm_scmi: Warn if domain frequency multiplier is 0 or rounded off
When (sustained_freq_khz * 1000) is less than sustained_perf_level, the
multiplier will be less than 1 and hence rounded down as 0. Similarly if
it is not multiple of sustained_perf_level the dom_info->mult_factor will
contain rounded down value and will end up impacting all the frequency
calculations done using it.

Add warning if and when the domain frequency multiplier is 0 or rounded
down so that it gives a clue to get the firmware tables fixed.

Suggested-by: Pierre Gondois <Pierre.Gondois@arm.com>
Reviewed-by: Pierre Gondois <pierre.gondois@arm.com>
Reviewed-by: Cristian Marussi <cristian.marussi@arm.com>
Link: https://lore.kernel.org/r/20240119152338.3047620-1-sudeep.holla@arm.com
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2024-02-20 06:29:26 +00:00
Prathamesh Shete
ae7d2d9b8e soc/tegra: pmc: Add SD wake event for Tegra234
Add SD wake event for Tegra234 so that system can be woken up from
suspend when SD card hot-plug/unplug event is detected.

Signed-off-by: Prathamesh Shete <pshete@nvidia.com>
Signed-off-by: Petlozu Pravareshwar <petlozup@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2024-02-16 12:35:56 +01:00
Petlozu Pravareshwar
ccd8e76fdb soc/tegra: pmc: Update scratch as an optional aperture
Scratch address space register is used to store reboot reason. For
some Tegra234 systems, the scratch space is not available to store
the reboot reason. This is because scratch region on these systems
is not accessible by the kernel as restricted by the Hypervisor.
Such systems would delist scratch aperture from PMC DT node.

Hence this change makes scratch as optional aperture and also avoids
registering reboot notifier if scratch address space isn't mapped.

Signed-off-by: Petlozu Pravareshwar <petlozup@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2024-02-16 12:17:55 +01:00
Petlozu Pravareshwar
6f4429e21a soc/tegra: pmc: Update address mapping sequence for PMC apertures
On Tegra SoCs prior to Tegra186, PMC has single address range only.
Starting from and after Tegra186, PMC has additional address ranges
apart from base address range. Currently in PMC driver, we try to
map these additional address ranges on all SoCs and if we fail then
we assume that the range is not valid for an SoC. This change makes
it more explicit on which address ranges are expected to be present
on which SoCs and maps the additional address ranges only on SoCs
from and after Tegra186.

Signed-off-by: Petlozu Pravareshwar <petlozup@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2024-02-16 12:17:54 +01:00
Peter Robinson
4acd21a45c bus: tegra-aconnect: Update dependency to ARCH_TEGRA
Update the architecture dependency to be the generic Tegra
because the driver works on the four latest Tegra generations
not just Tegra210, if you build a kernel with a specific
ARCH_TEGRA_xxx_SOC option that excludes Tegra210 you don't get
this driver.

Fixes: 46a88534afb59 ("bus: Add support for Tegra ACONNECT")
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
Cc: Jon Hunter <jonathanh@nvidia.com>
Cc: Thierry Reding <treding@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2024-02-16 12:11:47 +01:00
Tomasz Figa
97d4b55111 MAINTAINERS: Remove Tomasz from Samsung clock and pinctrl entries
I have been no longer at Samsung for a long time, the platforms
that I am knowledgable about (S3C24xx, S3C64xx, Exynos 4) are no longer
relevant and we have people with better capabilities as maintainers
already, so let me remove myself. Thanks for the nice collaboration
everyone!

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
Link: https://lore.kernel.org/r/20240201140134.4345-1-tomasz.figa@gmail.com
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
2024-02-07 16:35:26 +01:00
André Draszik
4544361672 dt-bindings: samsung: exynos-sysreg: gs101-peric0/1 require a clock
... otherwise it won't be accessible.

Update the schema to make this obvious.

Signed-off-by: André Draszik <andre.draszik@linaro.org>
Link: https://lore.kernel.org/r/20240126115517.1751971-1-andre.draszik@linaro.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
2024-02-07 16:35:25 +01:00
Arnd Bergmann
d820100a1b soc/tegra: Fix build failure on Tegra241
If all the other SoCs are disabled, the driver fails to build:

drivers/soc/tegra/fuse/fuse-tegra30.c:684:17: error: 'tegra30_fuse_read' undeclared here (not in a function); did you mean 'tegra_fuse_readl'?
  684 |         .read = tegra30_fuse_read,
      |                 ^~~~~~~~~~~~~~~~~
      |                 tegra_fuse_readl
drivers/soc/tegra/fuse/fuse-tegra30.c:694:17: error: 'tegra30_fuse_init' undeclared here (not in a function); did you mean 'tegra_fuse_info'?
  694 |         .init = tegra30_fuse_init,
      |                 ^~~~~~~~~~~~~~~~~

Fix the list of SoCs using this function to include the newly added one.

Fixes: dee509eb9cd5 ("soc/tegra: fuse: Add support for Tegra241")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-by: Kartik <kkartik@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2024-02-01 16:03:18 +01:00
Jon Hunter
81b3f0efbb soc/tegra: fuse: Fix crash in tegra_fuse_readl()
Commit c5b2d43e67bb ("soc/tegra: fuse: Add ACPI support for Tegra194 and
Tegra234") updated the Tegra fuse driver to add ACPI support and added a
test to the tegra_fuse_readl() function to check if the device is
booting with device-tree. This test passes 'fuse->dev' variable to
dev_fwnode() but does not check first is 'fuse->dev' is valid. This is
causing a crash to occur in Tegra XUSB PHY driver that calls the
tegra_fuse_readl() function before 'fuse->dev' variable has been
initialised ...

 Unable to handle kernel NULL pointer dereference at virtual address 0000000000000290
 Mem abort info:
   ESR = 0x0000000096000004
   EC = 0x25: DABT (current EL), IL = 32 bits
   SET = 0, FnV = 0
   EA = 0, S1PTW = 0
   FSC = 0x04: level 0 translation fault
 Data abort info:
   ISV = 0, ISS = 0x00000004, ISS2 = 0x00000000
   CM = 0, WnR = 0, TnD = 0, TagAccess = 0
   GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0
 [0000000000000290] user address but active_mm is swapper
 Internal error: Oops: 0000000096000004 [#1] PREEMPT SMP
 Modules linked in:
 CPU: 7 PID: 70 Comm: kworker/u16:4 Not tainted 6.8.0-rc1-next-20240129-02825-g596764183be8 #1
 Hardware name: NVIDIA Jetson AGX Xavier Developer Kit (DT)
 Workqueue: events_unbound deferred_probe_work_func
 pstate: 60400009 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
 pc : __dev_fwnode+0x0/0x18
 lr : tegra_fuse_readl+0x24/0x98
 sp : ffff80008393ba10
 x29: ffff80008393ba10 x28: 0000000000000000 x27: ffff800081233c10
 x26: 00000000000001c8 x25: ffff000080b7bc10 x24: ffff000082df3b00
 x23: fffffffffffffff4 x22: 0000000000000004 x21: ffff80008393ba84
 x20: 00000000000000f0 x19: ffff800082f1e000 x18: ffff800081d72000
 x17: 0000000000000001 x16: 0000000000000001 x15: ffff800082fcdfff
 x14: 0000000000000000 x13: 0000000003541000 x12: 0000000000000020
 x11: 0140000000000000 x10: ffff800080000000 x9 : 0000000000000000
 x8 : ffff000082df3b40 x7 : 0000000000000000 x6 : 000000000000003f
 x5 : 00000000ffffffff x4 : 0000000000000dc0 x3 : 00000000000000c0
 x2 : 0000000000000001 x1 : ffff80008393ba84 x0 : 0000000000000000
 Call trace:
  __dev_fwnode+0x0/0x18
  tegra186_xusb_padctl_probe+0xb0/0x1a8
  tegra_xusb_padctl_probe+0x7c/0xebc
  platform_probe+0x90/0xd8
  really_probe+0x13c/0x29c
  __driver_probe_device+0x7c/0x124
  driver_probe_device+0x38/0x11c
  __device_attach_driver+0x90/0xdc
  bus_for_each_drv+0x78/0xdc
  __device_attach+0xfc/0x188
  device_initial_probe+0x10/0x18
  bus_probe_device+0xa4/0xa8
  deferred_probe_work_func+0x80/0xb4
  process_scheduled_works+0x178/0x3e0
  worker_thread+0x164/0x2e8
  kthread+0xfc/0x11c
  ret_from_fork+0x10/0x20
 Code: a8c27bfd d65f03c0 128002a0 d65f03c0 (f9414801)
 ---[ end trace 0000000000000000 ]---

Fix this by verifying that 'fuse->dev' is valid before passing to
dev_fwnode().

Fixes: c5b2d43e67bb ("soc/tegra: fuse: Add ACPI support for Tegra194 and Tegra234")
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-by: Kartik <kkartik@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2024-02-01 15:58:20 +01:00
Kartik
7a849d0b75 soc/tegra: fuse: Define tegra194_soc_attr_group for Tegra241
Tegra241 SoC data uses tegra194_soc_attr_group, which is only defined
if config CONFIG_ARCH_TEGRA_194_SOC or CONFIG_ARCH_TEGRA_234_SOC or
both are enabled. This causes a build failure if both of these configs
are disabled and CONFIG_ARCH_TEGRA_241_SOC is enabled.

Define tegra194_soc_attr_group if CONFIG_ARCH_TEGRA_241_SOC is enabled.

Signed-off-by: Kartik <kkartik@nvidia.com>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Tested-by: Randy Dunlap <rdunlap@infradead.org> # build-tested
Signed-off-by: Thierry Reding <treding@nvidia.com>
2024-02-01 15:58:05 +01:00
Kartik
8402074f30 soc/tegra: fuse: Add support for Tegra241
Add support for Tegra241 which use ACPI boot.

Signed-off-by: Kartik <kkartik@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2024-02-01 15:58:05 +01:00
Kartik
972167c690 soc/tegra: fuse: Add ACPI support for Tegra194 and Tegra234
Add ACPI support for Tegra194 & Tegra243 SoC's. This requires
following modifications to the probe when ACPI boot is used:
 - Initialize soc data.
 - Add nvmem lookups.
 - Register soc device.
 - use devm_clk_get_optional() instead of devm_clk_get() to get
   fuse->clk, as fuse clocks are not required when using ACPI boot.

Also, drop '__init' keyword for tegra_soc_device_register() as this is also
used by tegra_fuse_probe() and use dev_err_probe() wherever applicable.

Signed-off-by: Kartik <kkartik@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2024-02-01 15:58:05 +01:00
Kartik
13a6935414 soc/tegra: fuse: Add function to print SKU info
Add helper function tegra_fuse_print_sku_info() to print Tegra SKU
information. So, it can be shared between tegra_fuse_init() and
ACPI probe which is to be introduced later.

Signed-off-by: Kartik <kkartik@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2024-02-01 15:58:05 +01:00
Kartik
71661c1c8c soc/tegra: fuse: Add function to add lookups
Add helper function tegra_fuse_add_lookups() to register Tegra fuse
nvmem lookups. So, this can be shared between tegra_fuse_init() and
ACPI probe, which is to be introduced later.

Use kmemdup_array to duplicate fuse->soc->lookups.

Signed-off-by: Kartik <kkartik@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2024-02-01 15:58:05 +01:00
Kartik
7b0c505eb3 soc/tegra: fuse: Add tegra_acpi_init_apbmisc()
In preparation to ACPI support in Tegra fuse driver add function
tegra_acpi_init_apbmisc() to initialize tegra-apbmisc driver.
Also, document the reason of calling tegra_init_apbmisc() at early init.

Note that function tegra_acpi_init_apbmisc() is not placed in the __init
section, because it will be called during probe.

Signed-off-by: Kartik <kkartik@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2024-02-01 15:58:05 +01:00
Kartik
f0139d6666 soc/tegra: fuse: Refactor resource mapping
To prepare for adding ACPI support to the tegra-apbmisc driver,
relocate the code responsible for mapping memory resources from
the function ‘tegra_init_apbmisc’ to the function
‘tegra_init_apbmisc_resources.’ This adjustment will allow the
code to be shared between ‘tegra_init_apbmisc’ and the upcoming
‘tegra_acpi_init_apbmisc’ function.

Signed-off-by: Kartik <kkartik@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2024-02-01 15:58:05 +01:00
Kartik
4569e604b5 soc/tegra: fuse: Use dev_err_probe for probe failures
Currently, in tegra_fuse_probe() if clock/reset get fails, then the
driver prints an error if the error is not caused by -EPROBE_DEFER.
This can be improved by using dev_err_probe() instead.

So, return dev_err_probe() if clock/reset get fails.

Signed-off-by: Kartik <kkartik@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2024-02-01 15:58:05 +01:00
Kartik
7092e9b3be mm/util: Introduce kmemdup_array()
Introduce kmemdup_array() API to duplicate `n` number of elements
from a given array. This internally uses kmemdup to allocate and duplicate
the `src` array.

Signed-off-by: Kartik <kkartik@nvidia.com>
Acked-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2024-02-01 15:58:05 +01:00