[PATCH v6 2/7] reset: mchp: sparx5: Use the second reg item when cpu-syscon is not present
Arnd Bergmann
arnd at arndb.de
Mon Sep 30 06:57:01 PDT 2024
On Mon, Sep 30, 2024, at 12:15, Herve Codina wrote:
> In the LAN966x PCI device use case, syscon cannot be used as syscon
> devices do not support removal [1]. A syscon device is a core "system"
> device and not a device available in some addon boards and so, it is not
> supposed to be removed.
>
> In order to remove the syscon usage, use a local mapping of a reg
> address range when cpu-syscon is not present.
>
> Link: https://lore.kernel.org/all/20240923100741.11277439@bootlin.com/ [1]
> Signed-off-by: Herve Codina <herve.codina at bootlin.com>
> ---
>> err = mchp_sparx5_map_syscon(pdev, "cpu-syscon", &ctx->cpu_ctrl);
> - if (err)
> + switch (err) {
> + case 0:
> + break;
> + case -ENODEV:
I was expecting a patch that would read the phandle and map the
syscon node to keep the behavior unchanged, but I guess this one
works as well.
The downside of your approach is that it requires an different
DT binding, which only works as long as there are no other
users of the syscon registers.
Arnd
More information about the linux-arm-kernel
mailing list