[PATCH 40/41] drivers: tty: serial: helper for setting mmio range

Esben Haabendal esben at haabendal.dk
Mon Apr 29 17:03:16 AEST 2019


"Enrico Weigelt, metux IT consult" <info at metux.net> writes:

> Introduce a little helpers for settings the mmio range from an
> struct resource or start/len parameters with less code.
> (also setting iotype to UPIO_MEM)
>
> Also converting drivers to use these new helpers as well as
> fetching mapsize field instead of using hardcoded values.
> (the runtime overhead of that should be negligible)
>
> The idea is moving to a consistent scheme, so later common
> calls like request+ioremap combination can be done by generic
> helpers.

Why not simply replace iobase, mapbase and mapsize with a struct
resource value instead?

Incidentally, that would allow to specify a memory resource with a
parent memory resource :)

/Esben


More information about the Linuxppc-dev mailing list