Re: omap: update omap README

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Aug 31, 2008 at 02:52:49PM +0100, Russell King - ARM Linux wrote:
> On Sat, Aug 30, 2008 at 10:33:35PM +0300, Felipe Balbi wrote:
> >  4. General guidelines to write clean and OMAP Linux compatible code
> >  -------------------------------------------------------------------
> >  
> > +- For register access use the __raw_{read,write}[bwl]() functions. At the
> > +moment, see first example in arch/arm/plat-omap/include/mach/hardware.h.
> 
> (looking at mainline) which example?
> 
> > +#define OMAP_ID_REG  0xfffed400
> > +#define DPLL_CTL_REG 0xfffecf00
> 
> This is unclear; it looks to me like it's trying to suggest that:
> 
> 	__raw_readl(OMAP_ID_REG)
> 
> is somehow valid.  It isn't; you're passing a physical address to a
> function which takes a virtual address - I'm cooking a patch which will
> make __raw_readl() and friends only accept void __iomem pointers.
> 
> The correct way is to do something like:
> 
> 	__raw_readl(IO_ADDRESS(OMAP_ID_REG))
> 
> where IO_ADDRESS is some function which translates the physical address
> to a virtual address _and_ casts to a void __iomem pointer.
> 
> See my recent patch which fixes most of the virtual vs physical address
> confusion that's present in the omap kernel (which was sent for comment
> but got completely ignored.)

Cool, thanks for the review. I'll update the patch and repost soon.

-- 
balbi
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux