* Re: Regmap and register ranges [not found] ` <20130517205025.GQ1627@sirena.org.uk> @ 2013-05-17 21:52 ` Dmitry Torokhov 2013-05-18 11:23 ` Mark Brown 0 siblings, 1 reply; 2+ messages in thread From: Dmitry Torokhov @ 2013-05-17 21:52 UTC (permalink / raw) To: Mark Brown; +Cc: linux-kernel On Fri, May 17, 2013 at 09:50:25PM +0100, Mark Brown wrote: > On Fri, May 17, 2013 at 09:24:30AM -0700, Dmitry Torokhov wrote: > > > I am looking at regmap and I wonder if I am missing something with the > > way it checks if a window crosses another range boundary or if a > > selector is in some other window as it seem to be always tripping on > > itself. Should we skip the current range as we iterate through them > > and do sanity checks? > > > The setup: a device with 0x0000 - 0xffff potential register range, paged > > in chunks of 256 registers with page selector register repeated at 0xff. > > The general idea is that the pages should be mapped in to virtual > addresses rather than real ones so in your example you might add a > prefix so all the registers are numbered 0x10000 to 0x1ffff. The > physical registers and the ones inside the paged range aren't supposed > to overlap. The issue I have with doing an arbitrary offset is that then data exposed in debugfs does not match the data from device's specification. > > We should probably either do sanity checks for this at init time or come > up with a sensible way to support this in case someone does decide to do > it, though this is the first time anyone noticed. Does this mean you'll be open to patches allowing this scenario? Thanks. -- Dmitry ^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Regmap and register ranges 2013-05-17 21:52 ` Regmap and register ranges Dmitry Torokhov @ 2013-05-18 11:23 ` Mark Brown 0 siblings, 0 replies; 2+ messages in thread From: Mark Brown @ 2013-05-18 11:23 UTC (permalink / raw) To: Dmitry Torokhov; +Cc: linux-kernel [-- Attachment #1: Type: text/plain, Size: 1166 bytes --] On Fri, May 17, 2013 at 02:52:46PM -0700, Dmitry Torokhov wrote: > On Fri, May 17, 2013 at 09:50:25PM +0100, Mark Brown wrote: > > The general idea is that the pages should be mapped in to virtual > > addresses rather than real ones so in your example you might add a > > prefix so all the registers are numbered 0x10000 to 0x1ffff. The > > physical registers and the ones inside the paged range aren't supposed > > to overlap. > The issue I have with doing an arbitrary offset is that then data > exposed in debugfs does not match the data from device's specification. Adding a random prefix on the front does mean you can just ignore the prefix. But this seems a fairly odd way for the device to do things to be honest... paging every single register is a bit random. > > We should probably either do sanity checks for this at init time or come > > up with a sensible way to support this in case someone does decide to do > > it, though this is the first time anyone noticed. > Does this mean you'll be open to patches allowing this scenario? Obviously I'm always open to patches that aren't crazy, though I do reserve the right to define what's crazy :) [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 836 bytes --] ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-05-18 11:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <1657392.sx3qBqNYrh@dtor-d630.eng.vmware.com>
[not found] ` <20130517205025.GQ1627@sirena.org.uk>
2013-05-17 21:52 ` Regmap and register ranges Dmitry Torokhov
2013-05-18 11:23 ` Mark Brown
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox
Powered by JetHome