2013/4/18 Wolfgang Denk <w...@denx.de>: > Dear Kuo-Jung Su, > > In message <1366277139-29728-6-git-send-email-dant...@gmail.com> you wrote: > ... >> +/* Register access macros */ >> +#define SPI_READ(r) le32_to_cpu(readl(r)) >> +#define SPI_WRITE(v, r) writel(cpu_to_le32(v), r) >> +#define SPI_SETBITS(m, r) setbits_le32(r, m) >> +#define SPI_CLRBITS(m, r) clrbits_le32(r, m) > > Ad before: drop these. >
Got it, thanks >> +#ifdef CONFIG_FTSSP010_GPIO_BASE >> +#define SPI_GPIO_READ(p, r) \ >> + le32_to_cpu(readl((p)->gpio.iobase + (r))) >> +#define SPI_GPIO_WRITE(p, v, r) \ >> + writel(cpu_to_le32(v), (p)->gpio.iobase + (r)) >> +#define SPI_GPIO_SETBITS(p, m, r) \ >> + setbits_le32((p)->gpio.iobase + (r), m) >> +#define SPI_GPIO_CLRBITS(p, m, r) \ >> + clrbits_le32((p)->gpio.iobase + (r), m) >> +#endif /* #ifdef CONFIG_FTSSP010_GPIO_BASE */ > > We do not allos I/O accesses throug base addrss plus offset. > Please use proper C structs instead. > > Got it, thanks > 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: w...@denx.de > Sorry, but my karma just ran over your dogma. -- Best wishes, Kuo-Jung Su _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot