Re: [PATCH RFC] usb: gadget: Add xilinx axi usb2 device support
From: Arnd Bergmann
Date: Fri Feb 21 2014 - 11:15:41 EST
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/