Commit graph

6 commits

Author SHA1 Message Date
Arnd Bergmann
f51df260e8 Reset controller updates for v6.14 (v2)
* Add support for A1 SoC in amlogic reset driver.
 * Drop aux registration helper from amlogic reset driver.
 -----BEGIN PGP SIGNATURE-----
 
 iI0EABYIADUWIQRRO6F6WdpH1R0vGibVhaclGDdiwAUCZ4fp4xcccC56YWJlbEBw
 ZW5ndXRyb25peC5kZQAKCRDVhaclGDdiwPZeAQC49hnPkGyg3ju+M3ZGxkVVkCUE
 ytv2GDykOGkM/Dz9AgD+J3x9+L1T2OqhpMc90nhZxMRouWtPJztMLzFqIcTa1Ac=
 =Mivr
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmeH6uUACgkQYKtH/8kJ
 UicJQQ//dKaFiMHfBqbw3edNbsL2/U5rCJmvxRitiKOavMm5w3npH9gl1bi/XZVA
 H3uiJDum6OBQpRAXHmwltSqNZJKtPumQ2xf6hiX6KRYlxlAyLwJK5RkmOXl7Ccil
 rCTaqajSWaqadUhZUljRhqcI1dpdFG1Adb4lPoxDxgFYLs/vNeJDBJgI3rIvA8aE
 XNc+HL4LXSQfo7XKZVwpgti/FAg3uXJqSdN2LLJA/MFjqqXaP1Ky2K5khuqUYY+q
 bbfEGg62UU199GEkNGzynRO5STpIFwlu/vLtc91a+97/9gYCmD6Y5SNJL4MgEi8K
 ZQGBGBSHLF2EVSGrW5dKXhcX/Ra4hhKqxNE/AeWMBrvCTehuzF4CpZ1zLdUuSt3r
 l+xMfoWh91ot/DDFut87kGEfKsXypiCrZGSJ5eUtzuWmyjAcYRNZ87qTD3uGlKG/
 7tEVb4RpXTjAKVZnIPS55ACf/sChiAk3hf02Iki5JMNspE8bXeXCSNVszTomQGL+
 XhlQoDxBWn6cyei6c5Asfu5guhPAI5NIMli80dutYT9ZxYI7CA1nuqCqRQ+uJ6n3
 xe2d98ISMRTUCahto/1QefT14c2tZF2AI6joSbMdz13F9N/64hrl3jrS2242IN0K
 Yj8n8LPdtBPjEjZlfQu47nH0SMGlUUwIVynGMXiTNyTG9khNJL8=
 =MjNd
 -----END PGP SIGNATURE-----

Merge tag 'reset-for-v6.14-2' of git://git.pengutronix.de/pza/linux into soc/drivers

Reset controller updates for v6.14 (v2)

* Add support for A1 SoC in amlogic reset driver.
* Drop aux registration helper from amlogic reset driver.

* tag 'reset-for-v6.14-2' of git://git.pengutronix.de/pza/linux:
  reset: amlogic: aux: drop aux registration helper
  reset: amlogic: aux: get regmap through parent device
  reset: amlogic: add support for A1 SoC in auxiliary reset driver
  dt-bindings: reset: add bindings for A1 SoC audio reset controller
  clk: amlogic: axg-audio: revert reset implementation
  Revert "clk: Fix invalid execution of clk_set_rate"

Link: https://lore.kernel.org/r/20250115170247.1303656-1-p.zabel@pengutronix.de
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2025-01-15 18:05:41 +01:00
Jerome Brunet
72bb8275a3 reset: amlogic: aux: drop aux registration helper
Having the aux registration helper along with the registered driver is not
great dependency wise. It does not allow the registering driver to be
properly decoupled from the registered auxiliary driver.

Drop the registration helper from the amlogic auxiliary reset driver.
This will be handled in the registering clock driver to start with while
a more generic solution is worked on.

Suggested-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20241209-meson-rst-aux-rework-v1-2-d2afb69cc72e@baylibre.com
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2025-01-15 17:59:31 +01:00
Jerome Brunet
ccfba09cee reset: amlogic: aux: get regmap through parent device
Get regmap directly from the parent device registering the
auxiliary reset driver, instead of using device data attached
to the auxiliary device.

This simplifies the registration a bit.

Suggested-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20241209-meson-rst-aux-rework-v1-1-d2afb69cc72e@baylibre.com
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2025-01-15 17:59:31 +01:00
Jan Dakinevich
64de6a3fed reset: amlogic: add support for A1 SoC in auxiliary reset driver
Add support for the reset controller present in the audio clock
controller of A1 SoC families, using the auxiliary bus.

Signed-off-by: Jan Dakinevich <jan.dakinevich@salutedevices.com>
Link: https://lore.kernel.org/r/20241112230056.1406222-3-jan.dakinevich@salutedevices.com
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2025-01-15 17:59:31 +01:00
Peter Zijlstra
cdd30ebb1b module: Convert symbol namespace to string literal
Clean up the existing export namespace code along the same lines of
commit 33def8498f ("treewide: Convert macro and uses of __section(foo)
to __section("foo")") and for the same reason, it is not desired for the
namespace argument to be a macro expansion itself.

Scripted using

  git grep -l -e MODULE_IMPORT_NS -e EXPORT_SYMBOL_NS | while read file;
  do
    awk -i inplace '
      /^#define EXPORT_SYMBOL_NS/ {
        gsub(/__stringify\(ns\)/, "ns");
        print;
        next;
      }
      /^#define MODULE_IMPORT_NS/ {
        gsub(/__stringify\(ns\)/, "ns");
        print;
        next;
      }
      /MODULE_IMPORT_NS/ {
        $0 = gensub(/MODULE_IMPORT_NS\(([^)]*)\)/, "MODULE_IMPORT_NS(\"\\1\")", "g");
      }
      /EXPORT_SYMBOL_NS/ {
        if ($0 ~ /(EXPORT_SYMBOL_NS[^(]*)\(([^,]+),/) {
  	if ($0 !~ /(EXPORT_SYMBOL_NS[^(]*)\(([^,]+), ([^)]+)\)/ &&
  	    $0 !~ /(EXPORT_SYMBOL_NS[^(]*)\(\)/ &&
  	    $0 !~ /^my/) {
  	  getline line;
  	  gsub(/[[:space:]]*\\$/, "");
  	  gsub(/[[:space:]]/, "", line);
  	  $0 = $0 " " line;
  	}

  	$0 = gensub(/(EXPORT_SYMBOL_NS[^(]*)\(([^,]+), ([^)]+)\)/,
  		    "\\1(\\2, \"\\3\")", "g");
        }
      }
      { print }' $file;
  done

Requested-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://mail.google.com/mail/u/2/#inbox/FMfcgzQXKWgMmjdFwwdsfgxzKpVHWPlc
Acked-by: Greg KH <gregkh@linuxfoundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2024-12-02 11:34:44 -08:00
Jerome Brunet
fb4c31587a reset: amlogic: add auxiliary reset driver support
Add support for the reset controller present in the audio clock
controller of the g12 and sm1 SoC families, using the auxiliary bus.

This is expected to replace the driver currently present directly
within the related clock driver.

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Link: https://lore.kernel.org/r/20240910-meson-rst-aux-v5-9-60be62635d3e@baylibre.com
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2024-10-01 10:40:32 +02:00