Aw: Re: avoid syscon fallback class for getting regmap
Frank Wunderlich
frank-w at public-files.de
Mon Jul 15 22:50:10 CEST 2024
> Gesendet: Samstag, 13. Juli 2024 um 17:13 Uhr
> Von: "Simon Glass" <sjg at chromium.org>
> Betreff: Re: avoid syscon fallback class for getting regmap
>
> Hi Frank,
>
> On Wed, 10 Jul 2024 at 14:43, Frank Wunderlich <frank-w at public-files.de> wrote:
> >
> > Hi,
> >
> > i'm working on OF_UPSTREAM for mediatek boards and noticed missing syscon-fallback on some (mt7988) devicetree nodes.
> >
> > i know that u-boot uses this fallback to get the regmap shared across drivers, but only initializing once with the syscon_uclass.
> >
> > i tried adding the syscon-fallback to linux device tree and got pointed [1] back to uboot to solve the issue there...
> >
> > are there any ways to avoid syscon in device tree and get the regmap of different node?
> >
> > i guess i could use [2], but then it is possible to aquire same regmap multiple times which may result in issues (e.g. race-conditions).
> > I also want to avoid creating multiple drivers doing the exactily same thing like syscon.
> >
> > one easy (but maybe unwanted way) is to add all compatibles for affected syscons to the syscon driver...but then it is no more generic (baed on compatibles then vendor-specific).
>
> One option is to create a new driver in a new file and have its ops
> use the syscon ops. See for example
> arch/arm/mach-rockchip/rk3399/syscon_rk3399.c
Hi Simon,
thanks for the suggestion, but i have not got it working yet
still fails here (drivers/net/mtk_eth.c):
priv->xfi_pll_regmap = syscon_node_to_regmap(args.node);
this is how i tried:
https://github.com/frank-w/u-boot/commit/a1060c88152fe8aa8a092f087591240f930146b3
do i miss something (i guess i do not need the data-field as i only need the regmap)?
regards Frank
More information about the U-Boot
mailing list