[PATCH v2 01/13] mfd: pruss mfd driver.
Russell King - ARM Linux
linux at arm.linux.org.uk
Wed Feb 23 08:09:52 EST 2011
On Tue, Feb 22, 2011 at 11:31:27AM +0100, Samuel Ortiz wrote:
> So, if you have a:
>
> static u32 reg_offset(struct device *dev, u8 pru_num)
> {
> struct da8xx_pruss *pru = dev_get_drvdata(dev->parent);
>
> switch (pru_num) {
> case DA8XX_PRUCORE_0:
> return (u32) pru->ioaddr + 0x7000;
> case DA8XX_PRUCORE_1:
> return (u32) pru->ioaddr + 0x7800;
> default:
> return 0;
> }
No. Please don't encourage people to have 'u32' as valid cookies for
readl,writel et.al. Always make the mmio cookies __iomem pointer like.
More information about the linux-arm-kernel
mailing list