Re: [PATCH 3/3 v2] dmaengine: Add Freescale i.MX SDMA support
From: Marek Vasut
Date: Sat Aug 28 2010 - 11:27:59 EST
Dne So 28. srpna 2010 17:18:17 Linus Walleij napsal(a):
> 2010/8/23 Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx>:
> >> + evt = readl(SDMA_H_EVTOVR);
> >> + mcu = readl(SDMA_H_HOSTOVR);
> >> + dsp = readl(SDMA_H_DSPOVR);
> >
> > __raw_readl?
>
> Sorry I never understood this __raw_[read|write][b|w|l] vs.
> plain read[b|w|l] proliferation in some drivers and code.
>
> What's the reason for?
Hey,
this trick is, if you create the VA<->PA mapping at the kernel start (eg. see
how pxa_map_io() is replacedon some devices for instance), you then use the VA
address you specified and use __raw_{read,write}[b,w,l](). So use
__raw_{read,write}[b,w,l]() on drivers specific for certain device and use
{read,write}[b,w,l]() on ioremap()ed memory areas, aka. in common drivers.
Cheers
>
> Yours,
> Linus Walleij
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@xxxxxxxxxxxxxxxxxxx
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
--
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/