Re: [PATCH 37/41] drivers: tty: serial: 8250: simplify io resource size computation
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: "Enrico Weigelt, metux IT consult" <info@xxxxxxxxx>
- Subject: Re: [PATCH 37/41] drivers: tty: serial: 8250: simplify io resource size computation
- From: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
- Date: Sun, 28 Apr 2019 18:21:03 +0300
- Cc: linux-kernel@xxxxxxxxxxxxxxx, gregkh@xxxxxxxxxxxxxxxxxxx, andrew@xxxxxxxx, macro@xxxxxxxxxxxxxx, vz@xxxxxxxxx, slemieux.tyco@xxxxxxxxx, khilman@xxxxxxxxxxxx, liviu.dudau@xxxxxxx, sudeep.holla@xxxxxxx, lorenzo.pieralisi@xxxxxxx, davem@xxxxxxxxxxxxx, jacmet@xxxxxxxxxx, linux@xxxxxxxxxxxxxxx, matthias.bgg@xxxxxxxxx, linux-mips@xxxxxxxxxxxxxxx, linux-serial@xxxxxxxxxxxxxxx, linux-ia64@xxxxxxxxxxxxxxx, linux-amlogic@xxxxxxxxxxxxxxxxxxx, linuxppc-dev@xxxxxxxxxxxxxxxx, sparclinux@xxxxxxxxxxxxxxx
- In-reply-to: <1556369542-13247-38-git-send-email-info@metux.net>
- Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo
- References: <1556369542-13247-1-git-send-email-info@metux.net> <1556369542-13247-38-git-send-email-info@metux.net>
- User-agent: Mutt/1.10.1 (2018-07-13)
On Sat, Apr 27, 2019 at 02:52:18PM +0200, Enrico Weigelt, metux IT consult wrote:
> Simpily io resource size computation by setting mapsize field.
>
> Some of the special cases handled by serial8250_port_size() can be
> simplified by putting this data to corresponding platform data
> or probe function.
> --- a/drivers/tty/serial/8250/8250.h
> +++ b/drivers/tty/serial/8250/8250.h
> @@ -105,6 +105,7 @@ struct serial8250_config {
>
> #define SERIAL8250_PORT(_base, _irq) SERIAL8250_PORT_FLAGS(_base, _irq, 0)
>
> +#define SERIAL_RT2880_IOSIZE 0x100
And why this is in the header file and not in corresponding C one?
> diff --git a/drivers/tty/serial/8250/8250_port.c b/drivers/tty/serial/8250/8250_port.c
> index d09af4c..51d6076 100644
> --- a/drivers/tty/serial/8250/8250_port.c
> +++ b/drivers/tty/serial/8250/8250_port.c
> @@ -2833,11 +2833,7 @@ unsigned int serial8250_port_size(struct uart_8250_port *pt)
> {
> if (pt->port.mapsize)
> return pt->port.mapsize;
> - if (pt->port.iotype == UPIO_AU) {
> - if (pt->port.type == PORT_RT2880)
> - return 0x100;
> - return 0x1000;
> - }
> +
> if (is_omap1_8250(pt))
> return 0x16 << pt->port.regshift;
This is good. We definitely need to get rid of custom stuff in generic
8250_port, etc.
--
With Best Regards,
Andy Shevchenko
[Index of Archives]
[Linux Kernel]
[Sparc Linux]
[DCCP]
[Linux ARM]
[Yosemite News]
[Linux SCSI]
[Linux x86_64]
[Linux for Ham Radio]