Re: [PATCH 07/18] regmap: mmio: add config option to allow relaxed MMIO accesses

2020-10-14 Thread Adrian Ratiu
On Wed, 14 Oct 2020, Mark Brown wrote: On Wed, Oct 14, 2020 at 02:51:14PM +0300, Adrian Ratiu wrote: On Tue, 13 Oct 2020, Mark Brown wrote: > On Mon, Oct 12, 2020 at 11:59:46PM +0300, Adrian Ratiu wrote: > > - writeb(val, ctx->regs + reg); + if > > (ctx->relaxed_mmio) + writeb_relaxed(val,

Re: [PATCH 07/18] regmap: mmio: add config option to allow relaxed MMIO accesses

2020-10-14 Thread Mark Brown
On Wed, Oct 14, 2020 at 02:51:14PM +0300, Adrian Ratiu wrote: > On Tue, 13 Oct 2020, Mark Brown wrote: > > On Mon, Oct 12, 2020 at 11:59:46PM +0300, Adrian Ratiu wrote: > > > - writeb(val, ctx->regs + reg); + if (ctx->relaxed_mmio) + > > > writeb_relaxed(val, ctx->regs + reg); + else + writeb(v

Re: [PATCH 07/18] regmap: mmio: add config option to allow relaxed MMIO accesses

2020-10-14 Thread Adrian Ratiu
Hello Mark, On Tue, 13 Oct 2020, Mark Brown wrote: On Mon, Oct 12, 2020 at 11:59:46PM +0300, Adrian Ratiu wrote: - writeb(val, ctx->regs + reg); + if (ctx->relaxed_mmio) + writeb_relaxed(val, ctx->regs + reg); + else + writeb(val, ctx->regs + reg); There is no point in doing a conditional

Re: [PATCH 07/18] regmap: mmio: add config option to allow relaxed MMIO accesses

2020-10-13 Thread Mark Brown
On Mon, Oct 12, 2020 at 11:59:46PM +0300, Adrian Ratiu wrote: > - writeb(val, ctx->regs + reg); > + if (ctx->relaxed_mmio) > + writeb_relaxed(val, ctx->regs + reg); > + else > + writeb(val, ctx->regs + reg); There is no point in doing a conditional operation on

[PATCH 07/18] regmap: mmio: add config option to allow relaxed MMIO accesses

2020-10-12 Thread Adrian Ratiu
On some platforms (eg armv7 due to the CONFIG_ARM_DMA_MEM_BUFFERABLE) MMIO R/W operations always add memory barriers which can increase load, decrease battery life or in general reduce performance unnecessarily on devices which access a lot of configuration registers and where ordering does not mat