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

2019-04-29 Thread Andy Shevchenko
On Mon, Apr 29, 2019 at 12:12:35PM +0200, Enrico Weigelt, metux IT consult wrote: > On 28.04.19 17:39, Andy Shevchenko wrote: > seems I've forgot to add "RFC:" in the subject - I'm not entirely happy > w/ that patch myself, just want to hear your oppinions. > > Moreover, the size argument seems

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

2019-04-29 Thread Enrico Weigelt, metux IT consult
On 28.04.19 17:39, Andy Shevchenko wrote: Hi, seems I've forgot to add "RFC:" in the subject - I'm not entirely happy w/ that patch myself, just want to hear your oppinions. >> -port->port.iotype = UPIO_MEM;>> - port->port.mapbase = >> pci_resource_start(pcidev, bar) + offset;>> + uar

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

2019-04-29 Thread Enrico Weigelt, metux IT consult
On 29.04.19 09:03, Esben Haabendal wrote: > Why not simply replace iobase, mapbase and mapsize with a struct > resource value instead? That was actually my original goal, when I started this. But the situation is a bit more tricky. Many drivers (especially the old ones) initialize these fields in

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

2019-04-29 Thread Esben Haabendal
"Enrico Weigelt, metux IT consult" 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 instea

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

2019-04-29 Thread Esben Haabendal
"Enrico Weigelt, metux IT consult" writes: > @@ -131,7 +133,8 @@ int __init hp300_setup_serial_console(void) > pr_info("Serial console is HP DCA at select code %d\n", scode); > > port.uartclk = HPDCA_BAUD_BASE * 16; > - port.mapbase = (pa + UART_OFFSET);

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

2019-04-28 Thread Andy Shevchenko
On Sat, Apr 27, 2019 at 02:52:21PM +0200, Enrico Weigelt, metux IT consult wrote: > 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

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

2019-04-27 Thread Enrico Weigelt, metux IT consult
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 th