[U-Boot] [PATCH v2 13/22] omap4: add clock support

Wolfgang Denk wd at denx.de
Sat Jun 25 15:05:44 CEST 2011


Dear Aneesh V,

In message <4E05CF18.4020800 at ti.com> you wrote:
> 
> > It's more.  When using base+offset, the compiler will know nothing
> > about the data type, so it canot warn you if you use a 32 bit accessor
> > on a 8 bit register, or vice versa.  When you pass a struct element,
> > it can check type information.
> 
> Is this really valid in our context? readl()/writel() and friends just
> cast the address to the target type pointer. I tried writeb() on my 32
> bit register represented using the struct approach and the compiler
> didn't give any warning (as expected)!

Yes, we should fix the I/O accessors definitons on ARM to provide
strict type checking.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
 The software required `Windows 95 or better', so I installed Linux.


More information about the U-Boot mailing list