Re: [PATCH v3 07/42] soc: Add SoC driver for Cirrus ep93xx
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- Subject: Re: [PATCH v3 07/42] soc: Add SoC driver for Cirrus ep93xx
- From: Andy Shevchenko <andy.shevchenko@xxxxxxxxx>
- Date: Mon, 13 Nov 2023 12:19:56 +0200
- Cc: Andy Shevchenko <andy@xxxxxxxxxx>, nikita.shubin@xxxxxxxxxxx, Hartley Sweeten <hsweeten@xxxxxxxxxxxxxxxxxxx>, Lennert Buytenhek <kernel@xxxxxxxxxxxxxx>, Russell King <linux@xxxxxxxxxxxxxxx>, Lukasz Majewski <lukma@xxxxxxx>, Linus Walleij <linus.walleij@xxxxxxxxxx>, Bartosz Golaszewski <brgl@xxxxxxxx>, Rob Herring <robh+dt@xxxxxxxxxx>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@xxxxxxxxxx>, Conor Dooley <conor+dt@xxxxxxxxxx>, Michael Turquette <mturquette@xxxxxxxxxxxx>, Stephen Boyd <sboyd@xxxxxxxxxx>, Daniel Lezcano <daniel.lezcano@xxxxxxxxxx>, Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Alessandro Zummo <a.zummo@xxxxxxxxxxxx>, Alexandre Belloni <alexandre.belloni@xxxxxxxxxxx>, Wim Van Sebroeck <wim@xxxxxxxxxxxxxxxxxx>, Guenter Roeck <linux@xxxxxxxxxxxx>, Sebastian Reichel <sre@xxxxxxxxxx>, Thierry Reding <thierry.reding@xxxxxxxxx>, Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx>, Mark Brown <broonie@xxxxxxxxxx>, "David S. Miller" <davem@xxxxxxxxxxxxx>, Eric Dumazet <edumazet@xxxxxxxxxx>, Jakub Kicinski <kuba@xxxxxxxxxx>, Paolo Abeni <pabeni@xxxxxxxxxx>, Vinod Koul <vkoul@xxxxxxxxxx>, Miquel Raynal <miquel.raynal@xxxxxxxxxxx>, Richard Weinberger <richard@xxxxxx>, Vignesh Raghavendra <vigneshr@xxxxxx>, Damien Le Moal <dlemoal@xxxxxxxxxx>, Sergey Shtylyov <s.shtylyov@xxxxxx>, Dmitry Torokhov <dmitry.torokhov@xxxxxxxxx>, Arnd Bergmann <arnd@xxxxxxxx>, Olof Johansson <olof@xxxxxxxxx>, soc@xxxxxxxxxx, Liam Girdwood <lgirdwood@xxxxxxxxx>, Jaroslav Kysela <perex@xxxxxxxx>, Takashi Iwai <tiwai@xxxxxxxx>, Michael Peters <mpeters@xxxxxxxxxxxxxx>, Kris Bahnsen <kris@xxxxxxxxxxxxxx>, linux-arm-kernel@xxxxxxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, linux-gpio@xxxxxxxxxxxxxxx, devicetree@xxxxxxxxxxxxxxx, linux-clk@xxxxxxxxxxxxxxx, linux-rtc@xxxxxxxxxxxxxxx, linux-watchdog@xxxxxxxxxxxxxxx, linux-pm@xxxxxxxxxxxxxxx, linux-pwm@xxxxxxxxxxxxxxx, linux-spi@xxxxxxxxxxxxxxx, netdev@xxxxxxxxxxxxxxx, dmaengine@xxxxxxxxxxxxxxx, linux-mtd@xxxxxxxxxxxxxxxxxxx, linux-ide@xxxxxxxxxxxxxxx, linux-input@xxxxxxxxxxxxxxx, alsa-devel@xxxxxxxxxxxxxxxx
- In-reply-to: <c49f77492cacc5a30079720af58a9f2fca761609.camel@gmail.com>
- References: <20230605-ep93xx-v3-0-3d63a5f1103e@maquefel.me> <20230605-ep93xx-v3-7-3d63a5f1103e@maquefel.me> <ZLqSo6B5cJXVRJS/@smile.fi.intel.com> <c49f77492cacc5a30079720af58a9f2fca761609.camel@gmail.com>
On Sat, Nov 11, 2023 at 11:33 PM Alexander Sverdlin
<alexander.sverdlin@xxxxxxxxx> wrote:
> On Fri, 2023-07-21 at 17:13 +0300, Andy Shevchenko wrote:
...
> > > + spin_lock_irqsave(&ep93xx_swlock, flags);
> > > +
> > > + regmap_read(map, EP93XX_SYSCON_DEVCFG, &val);
> > > + val &= ~clear_bits;
> > > + val |= set_bits;
> > > + regmap_write(map, EP93XX_SYSCON_SWLOCK, EP93XX_SWLOCK_MAGICK);
> > > + regmap_write(map, EP93XX_SYSCON_DEVCFG, val);
> >
> > Is this sequence a must?
> > I.o.w. can you first supply magic and then update devcfg?
> >
> > > + spin_unlock_irqrestore(&ep93xx_swlock, flags);
...
> > > +void ep93xx_swlocked_update_bits(struct regmap *map, unsigned int reg,
> > > + unsigned int mask, unsigned int val)
> > Same Q as above.
>
> EP93xx User Manual [1] has most verbose description of SWLock for ADC
> block:
> "Writing 0xAA to this register will unlock all locked registers until the
> next block access. The ARM lock instruction prefix should be used for the
> two consequtive write cycles when writing to locked chip registers."
>
> One may conclude that RmW (two accesses to the particular block) sequence
> is not appropriate.
It's not obvious to me. The terms "block access" and "block cycle"
occur only once in the very same section that describes ADCSWLock. The
meaning of these terms is not fully understandable. So, assuming that
you have tried it differently and it indeed doesn't work, let's go
with this one.
> [1] https://cdn.embeddedts.com/resource-attachments/ts-7000_ep9301-ug.pdf
--
With Best Regards,
Andy Shevchenko
[Index of Archives]
[Linux Kernel]
[Linux ARM (vger)]
[Linux ARM MSM]
[Linux Omap]
[Linux Arm]
[Linux Tegra]
[Fedora ARM]
[Linux for Samsung SOC]
[eCos]
[Linux Fastboot]
[Gcc Help]
[Git]
[DCCP]
[IETF Announce]
[Security]
[Linux MIPS]
[Yosemite Campsites]
|