Skip to content

syscon: update syscon_regmap_lookup_by_phandle

Patrick Delaunay u-boot 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2syscon: update syscon_regmap_lookup_by_phandlearch/sandbox/dts/test.dts drivers/core/syscon-uclass.c test/dm/syscon.c+68 -251 reply
2/2sysreset: use syscon_regmap_lookup_by_phandledrivers/sysreset/sysreset_syscon.c+2 -130 replies

Reviews trailers per patch

1 of 2 patches has a Reviewed-by or Acked-by.

PatchSimon Glass
1/2R-b
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [U-Boot] [PATCH 0/2] syscon: update syscon_regmap_lookup_by_phandle

Change the function syscon_regmap_lookup_by_phandle() introduced by commit 6c3af1f24e4b ("syscon: dm: Add a new method to get a regmap from DTS") to have Linux-compatible syscon API and add test for this case:
phandle to node with generic "syscon" compatible not bound as syscon UCLASS by default.

Without the patch the added test failed.

And I also update sysreset-syscon driver to use this function and simplify the code,
tested on my stm32mp1 board with:

	rcc_reboot: rcc-reboot at 50000000 {
		compatible = "syscon-reboot";
		regmap = <&rcc>;
		offset = <0x404>;
		mask = <0x1>;
	};

	rcc: rcc at 50000000 {
		compatible = "st,stm32mp1-rcc", "syscon";
		reg = <0x50000000 0x1000>;
		#clock-cells = <1>;
		#reset-cells = <1>;
	};

PS: compatible st,stm32mp1-rcc is bound to driver
drivers/misc/stm32_rcc.c

Patrick Delaunay (2):
syscon: update syscon_regmap_lookup_by_phandle
sysreset: use syscon_regmap_lookup_by_phandle

 arch/sandbox/dts/test.dts          |  3 +-
 drivers/core/syscon-uclass.c       | 83 +++++++++++++++++++++++++++-----------
 drivers/sysreset/sysreset_syscon.c | 15 +------
 test/dm/syscon.c                   |  7 ++++
 4 files changed, 70 insertions(+), 38 deletions(-)
Signature · 1 line
2.7.4