lkml.org 
[lkml]   [2014]   [Feb]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH RFC] usb: gadget: Add xilinx axi usb2 device support
Date
On Friday 21 February 2014 16:51:07 Michal Simek wrote:
> > |
> > | if (res->flags & IORESOURCE_CACHEABLE)
> > | dest_ptr = devm_ioremap(dev, res->start, size);
> > | else
> > | dest_ptr = devm_ioremap_nocache(dev, res->start, size);
>
> I have read it just not sure if IORESOURCE_CACHEABLE is setup by default
> or not.
> If yes, then you have to setup res->flags in your driver and have to
> check it.

ioremap() and ioremap_nocache() are the same on all architectures.
If you want a cacheable mapping, you need to call ioremap_cache(),
which unfortunately doesn't exist on all architectures and also
doesn't have a devm_* variant.

I don't know how the above code made it into devm_ioremap_resource(),
it's clearly bogus. The only time we ever set IORESOURCE_CACHEABLE
is for ROM BARs on PCI, which in turn are rarely used in the kernel.
It's never set for any platform devices, aside from one use
in arch/arm/mach-clps711x/board-cdb89712.c.

Arnd


\
 
 \ /
  Last update: 2014-02-21 18:01    [W:0.067 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site