[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <BN8PR11MB366816A34B16BE29A5FD7912E9019@BN8PR11MB3668.namprd11.prod.outlook.com>
Date: Thu, 10 Nov 2022 17:18:46 +0000
From: <Kumaravel.Thiagarajan@...rochip.com>
To: <gregkh@...uxfoundation.org>
CC: <linux-kernel@...r.kernel.org>, <linux-serial@...r.kernel.org>,
<jirislaby@...nel.org>, <andriy.shevchenko@...ux.intel.com>,
<ilpo.jarvinen@...ux.intel.com>, <macro@...am.me.uk>,
<jay.dolan@...esio.com>, <cang1@...e.co.uk>,
<u.kleine-koenig@...gutronix.de>, <wander@...hat.com>,
<etremblay@...tech-controls.com>, <jk@...abs.org>,
<biju.das.jz@...renesas.com>, <geert+renesas@...der.be>,
<phil.edworthy@...esas.com>, <lukas@...ner.de>,
<UNGLinuxDriver@...rochip.com>
Subject: RE: [PATCH v3 tty-next 1/3] 8250: microchip: pci1xxxx: Add driver for
quad-uart support.
> -----Original Message-----
> From: Greg KH <gregkh@...uxfoundation.org>
> Sent: Wednesday, November 9, 2022 5:31 PM
> To: Kumaravel Thiagarajan - I21417 <Kumaravel.Thiagarajan@...rochip.com>
> Subject: Re: [PATCH v3 tty-next 1/3] 8250: microchip: pci1xxxx: Add driver for
> quad-uart support.
>
> On Mon, Nov 07, 2022 at 06:15:15PM +0530, Kumaravel Thiagarajan wrote:
> > +++ b/drivers/tty/serial/8250/8250_pcilib.c
> > @@ -0,0 +1,31 @@
> > +// SPDX-License-Identifier: GPL-2.0
> > +/* Microchip pci1xxxx 8250 library. */
>
> Better name and a copyright line?
Yes Greg. I think "8250 PCI library" would be the correct name. Is that fine?
Regarding the copyright, we moved the "setup_port" function from 8250_pci.c to this new file.
Can I use the same copyright statement from 8250_pci.c "Copyright (C) 2001 Russell King, All Rights Reserved."?
>
> > +
> > +#include <linux/pci.h>
> > +#include "8250.h"
> > +
> > +int pci_setup_port(struct pci_dev *dev, struct uart_8250_port *port,
> > + u8 bar, unsigned int offset, int regshift) {
> > + if (bar >= PCI_STD_NUM_BARS)
> > + return -EINVAL;
> > +
> > + if (pci_resource_flags(dev, bar) & IORESOURCE_MEM) {
> > + if (!pcim_iomap(dev, bar, 0) && !pcim_iomap_table(dev))
> > + return -ENOMEM;
> > +
> > + port->port.iotype = UPIO_MEM;
> > + port->port.iobase = 0;
> > + port->port.mapbase = pci_resource_start(dev, bar) + offset;
> > + port->port.membase = pcim_iomap_table(dev)[bar] + offset;
> > + port->port.regshift = regshift;
> > + } else {
> > + port->port.iotype = UPIO_PORT;
> > + port->port.iobase = pci_resource_start(dev, bar) + offset;
> > + port->port.mapbase = 0;
> > + port->port.membase = NULL;
> > + port->port.regshift = 0;
> > + }
> > + return 0;
> > +}
> > +EXPORT_SYMBOL_GPL(pci_setup_port);
>
> This needs a better name, 8250_pci_setup_port()? This is not a pci core
> function.
Yes. I will rename as you mentioned.
Thank You.
Regards,
Kumar
Powered by blists - more mailing lists