Re: [PATCH v2 tty-next 1/3] 8250: microchip: pci1xxxx: Add driver for quad-uart support.
From: Andy Shevchenko
Date: Tue Oct 04 2022 - 05:50:36 EST
On Mon, Oct 3, 2022 at 10:36 PM Christophe JAILLET
<christophe.jaillet@xxxxxxxxxx> wrote:
> Le 01/10/2022 à 08:15, Kumaravel Thiagarajan a écrit :
...
> > + if (pci_resource_flags(dev, 0) & IORESOURCE_MEM) {
> > + if (!pcim_iomap(dev, 0, 0) && !pcim_iomap_table(dev))
> > + return -ENOMEM;
> > +
> > + port->port.iotype = UPIO_MEM;
> > + port->port.iobase = 0;
> > + port->port.mapbase = pci_resource_start(dev, 0) + offset;
> > + port->port.membase = pcim_iomap_table(dev)[0] + offset;
> Is it needed to call pcim_iomap_table(dev) twice? (here and a few lines
> above in the 'if')
Yes. But the main question I asked (if we really need IO ports
support) still remains.
> > + port->port.regshift = 0;
> > + } else {
> > + port->port.iotype = UPIO_PORT;
> > + port->port.iobase = pci_resource_start(dev, 0) + offset;
> > + port->port.mapbase = 0;
> > + port->port.membase = NULL;
> > + port->port.regshift = 0;
> > + }
--
With Best Regards,
Andy Shevchenko