[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <trinity-93a5ed81-b890-4d49-bfec-1bbb1219cb65-1720611282583@3c-app-gmx-bs04>
Date: Wed, 10 Jul 2024 13:34:42 +0200
From: Frank Wunderlich <frank-w@...lic-files.de>
To: AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>
Cc: Frank Wunderlich <linux@...web.de>, Michael Turquette
<mturquette@...libre.com>, Stephen Boyd <sboyd@...nel.org>, Rob Herring
<robh@...nel.org>, Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley
<conor+dt@...nel.org>, Matthias Brugger <matthias.bgg@...il.com>, Wim Van
Sebroeck <wim@...ux-watchdog.org>, Guenter Roeck <linux@...ck-us.net>,
Daniel Golle <daniel@...rotopia.org>, linux-clk@...r.kernel.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-mediatek@...ts.infradead.org,
linux-watchdog@...r.kernel.org
Subject: Aw: Re: [PATCH v1 0/4] add syscon requirement for mt7988
Hi
> Gesendet: Mittwoch, 10. Juli 2024 um 12:45 Uhr
> Von: "AngeloGioacchino Del Regno" <angelogioacchino.delregno@...labora.com>
> Betreff: Re: [PATCH v1 0/4] add syscon requirement for mt7988
>
> Il 09/07/24 12:13, Frank Wunderlich ha scritto:
> > From: Frank Wunderlich <frank-w@...lic-files.de>
> >
> > Some nodes require the syscon fallback at least in u-boot when using
> > OF_UPSTREAM.
> >
> > This is because uboot driver uses syscon_node_to_regmap in mtk_eth.c for
> > "mediatek,toprgu", "mediatek,xfi_pll" and reset pointing to watchdog-node.
> >
>
> I wonder what's the major blocker here to modify the u-boot driver to take
> the upstream devicetree as-is, instead of using syscon_node_to_regmap?
in uboot there is no driver for all syscon and to handle parallel access this is done with the syscon fallback.
The syscon uclass is a small driver which is generic and only handle the regmap in global context.
In theory it could be possible that regmap is aquired twice when used from 2+ other drivers...to prevent this without
adding the syscon fallback each syscon needs a dedicated driver like in linux which does only syscon stuff (code
duplication at its best :) ).
of course i can use regmap_init_mem in the uboot ethernet driver
https://elixir.bootlin.com/u-boot/latest/source/drivers/core/regmap.c#L242
like it's done once for syscon-uclass.
but i will cause issues when a second device tries to access this regmap. So it was be much easier (for me) to add this
fallback and not writing 3 device-drivers in uboot doing the exactly same as syscon.
if you have a better idea how to handle it, let me know :)
regards Frank
> Regards,
> Angelo
Powered by blists - more mailing lists