Thread (22 messages) 22 messages, 5 authors, 2024-10-02

Re: [PATCH v6 2/7] reset: mchp: sparx5: Use the second reg item when cpu-syscon is not present

From: "Arnd Bergmann" <arnd@arndb.de>
Date: 2024-10-02 09:30:09
Also in: linux-arm-kernel, linux-devicetree, linux-pci, lkml

On Tue, Oct 1, 2024, at 16:30, Herve Codina wrote:
quoted hunk ↗ jump to hunk
On Mon, 30 Sep 2024 16:26:16 +0200
Herve Codina [off-list ref] wrote:
--- 8< ---
In mchp_sparx5_map_syscon(), I will call the syscon API or the local
function based on the device compatible string:
	--- 8< ---
	if (of_device_is_compatible(pdev->dev.of_node, 
"microchip,lan966x-switch-reset"))
		regmap = mchp_lan966x_syscon_to_regmap(&pdev->dev, syscon_np);
	else
		regmap = syscon_node_to_regmap(syscon_np);
	--- 8< ---

Is this kind of solution you were expecting?
If you have thought about something different, can you give me some pointers?
Hi Hervé,

The way I had imagined this was to not need an if() check
at all but unconditionally map the syscon registers in the
reset driver.

The most important part here is to have sensible bindings
that don't need to describe the difference between PCI
and SoC mode. This seems fine for the lan966x case, but
I'm not sure why you need to handle sparx5 differently here.
Do you expect the syscon to be shared with other drivers
on sparx5 but not lan966x?

I don't thinkt this bit matters too much and what you suggest
works fine, I just want to be sure I understand what you are
doing.

      Arnd
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help