Re: Question about regmap_range_cfg and regmap_mmio

From: Mark Brown
Date: Wed Mar 04 2020 - 07:03:25 EST


On Wed, Mar 04, 2020 at 12:25:09PM +0100, Lars Möllendorf wrote:

> this mail is copied from internal issue written in markdown - I hope
> this is still readable as mail.

Not really frankly. I *think* you are saying that paging doesn't work
due to relying on having register read and write operations?

> My assumption is that paging is not a common use case for Memory-mapped
> I/O and thus has not been implemented for this case.

> - Are my assumptions correct?
> - If so, what would you recommend me to do:
> - Continue using `regmap-mmio` and implement my custom paging
> functions on top of that?

This will obviously work.

> - Enhance the current `regmap-mmio` implementation so it does paging
> and submit a patch?

That's not really possible since MMIO never writes the register address
to the bus.

> - Write my own `better-regmap-mmio` implementation?

It's not clear what that would mean.

You could also look into making the paging code not rely on explicit
register read and write operations.

Attachment: signature.asc
Description: PGP signature