Thread (34 messages) 34 messages, 8 authors, 2022-05-08

Re: [RFC v2 01/39] Kconfig: introduce HAS_IOPORT option and select it as necessary

From: "Maciej W. Rozycki" <macro@orcam.me.uk>
Date: 2022-05-06 13:40:29
Also in: linux-alpha, linux-arch, linux-arm-kernel, linux-m68k, linux-mips, linux-pci, linux-riscv, linux-sh, lkml, sparclinux

On Fri, 6 May 2022, Geert Uytterhoeven wrote:
A loooong time ago,  it was suggested to add register accessor
functions to struct device, so e.g. readl(dev, offset) would call
into these accessors, which would implement the bus-specific behavior.
No more worries about readl(), __raw_readl(), ioread32b(), or whatever
quirk is needed, at the (small on nowadays' machines) expense of
some indirection...
 I guess you'd need an additional parameter for the endianness policy 
required (to match either bit or byte lanes, according to ultimate data 
interpretation) where crossing between buses of a different endianness 
each.  Otherwise you'd end up with the mess elsewhere.

  Maciej
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help