Dear Jason Jin, In message <1302597610-15646-6-git-send-email-jason....@freescale.com> you wrote: > commit a45dde2293c816138e53c26eca6fd0322583f9a6 changed the dm9000 > direct register access to standard IO. This should work > on the ColdFire platform as there are corresponding macros for > the LE devices. But the hardware settings on M5253DEMO board had > swapped the byte order which make the original macros such as out_le16 > cannot work. To avoid changing the common io access code on ColdFire > platform, the DM9000_BYTE_SWAPPED define added to make the dm9000 use > __raw* IO access on ColdFire M5253DEMO board. ... > +#ifndef DM9000_BYTE_SWAPPED > #define DM9000_outb(d,r) writeb(d, (volatile u8 *)(r)) > #define DM9000_outw(d,r) writew(d, (volatile u16 *)(r)) > #define DM9000_outl(d,r) writel(d, (volatile u32 *)(r)) > #define DM9000_inb(r) readb((volatile u8 *)(r)) > #define DM9000_inw(r) readw((volatile u16 *)(r)) > #define DM9000_inl(r) readl((volatile u32 *)(r)) > +#else > +#define DM9000_outb(d,r) __raw_writeb(d, (volatile u8 *)(r)) > +#define DM9000_outw(d,r) __raw_writew(d, (volatile u16 *)(r)) > +#define DM9000_outl(d,r) __raw_writel(d, (volatile u32 *)(r)) > +#define DM9000_inb(r) __raw_readb((volatile u8 *)(r)) > +#define DM9000_inw(r) __raw_readw((volatile u16 *)(r)) > +#define DM9000_inl(r) __raw_readl((volatile u32 *)(r)) > +#endif
All these "volatile something *" casts are not needed and should be removed. 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 When a program is being tested, it is too late to make design changes. -- Geoffrey James, "The Tao of Programming" _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot