[lkml]   [2019]   [Feb]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] tty/nozomi: use pci_iomap instead of ioremap_nocache
On Sun, Feb 10, 2019 at 10:45:00PM +0100, Hugo Lefeuvre wrote:
> > Use pci_iomap instead of ioremap_nocache in nozomi_card_init(). This
> > is a cleaner way to do PCI MMIO (performs additional checks) and
> > allows to drop the manual call to pci_resource_start.
> >
> > pci_iomap relies on ioremap for MMIO and thus has uncached behavior.
> there's still something unclear to me about dc->card_type being used as
> size argument to ioremap_nocache().
> dc->base_addr is the sum of all six io region lengths, not the size of
> region 0 which we are trying to map here. Why not using the size of region
> 0 instead ?

No idea, that might just be how the card is layed out.

> If the goal is to map all six regions "at once", I'm not sure how this is
> supposed to work. Is there any kind of guarantee that all six regions will
> be adjacent?

For some reason, it must happen that way, otherwise the driver would not
work very well :)

> If this is a bug then this patch "somehow" already adresses it since
> pci_iomap calls pci_resource_len itself. Otherwise this patch is broken.

Let's apply it and see if anyone screams...


greg k-h

 \ /
  Last update: 2019-02-12 10:26    [W:0.092 / U:2.220 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site