[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20231204150224.add8b07a59bf737edb0b5c1c@hugovil.com>
Date: Mon, 4 Dec 2023 15:02:24 -0500
From: Hugo Villeneuve <hugo@...ovil.com>
To: Mark Brown <broonie@...nel.org>
Cc: Jan Kundrát <jan.kundrat@...net.cz>,
Cosmin Tanislav <cosmin.tanislav@...log.com>,
linux-serial@...r.kernel.org,
Andy Shevchenko <andy.shevchenko@...il.com>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] tty: max310x: work around regmap->regcache data
corruption
On Mon, 4 Dec 2023 19:48:05 +0000
Mark Brown <broonie@...nel.org> wrote:
> On Mon, Dec 04, 2023 at 02:41:36PM -0500, Hugo Villeneuve wrote:
>
> > But that is not was my question was about. Here a pseudo code
> > example to select "page" 1:
>
> > 1. save original value of LCR register.
> > 2. write 0xBF to LCR register
> > 3. access desired register in page 1
> > 4. restore original LCR value saved in step 1
>
> > How do you do that with regmap range?
>
> Are you saying that the selector has other, non-selector functions?
Yes! There is no bit or bit range in that register that is used to
select a praticular set of registers or "page". It is only when
writing the special magic value of $BF that the IC switches to "page"
1. And if the value is NOT $BF, then it switches back to "page" 0.
When I told you if you could point to other IC/drivers that had the
same configuration, I tough you were aware of this. That explains some
of the confusion.
> This is truly innovative hardware,...
Well, I would not say innovative, but more "crappy" hardware design :)
> ...generally the selector is just a
> bitfield that you write paging values to.
This is also what I am accustomed to normally.
> You'd need to extend the core
> so that it knows about this quirk, right now that's not possible and
> we'll just leave the window pointing at whatever was last accessed.
Ok. I am not sure that adding support for it would make sense, since I
do not know of other ICs that could reuse this very specific and
particular method for switching "paged" registers.
Thank you,
Hugo Villeneuve
Powered by blists - more mailing lists