[U-Boot] [PATCH v4 4/7] jz4740 nand driver

Scott Wood scottwood at freescale.com
Mon Jan 10 19:33:36 CET 2011


On Sun, 9 Jan 2011 18:35:56 +0800
Xiangfu Liu <xiangfu at openmobilefree.net> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On 01/05/2011 04:16 AM, Scott Wood wrote:
> > On Wed, Dec 08, 2010 at 12:20:46AM -0600, Xiangfu Liu wrote:
> >> +	writel(readl(EMC_NFECR) & ~EMC_NFECR_ECCE, EMC_NFECR);
> > 
> > readl() and other I/O accessors take pointers, not integer addresses.
> Hi Scott
> 
> I fixed the others error, only this one I don't know how to do that.
> can you point me to some example. 

You need a pointer of appropriate type (u32, in this case) that points
to the address.  Usually this is done with a struct that describes the
register layout (e.g. struct nfc_regs in drivers/mtd/nand/mxc_nand.c).

The alternative is to cast the address to a pointer before passing it
to the accessor, though Wolfgang doesn't like this.

-Scott



More information about the U-Boot mailing list