On 07/03/2013 10:40:35 PM, Kuo-Jung Su wrote:
+#ifndef __ARMEB__
+               put_unaligned_le32(readl(&regs->dr), buf + off);
+#else
+               put_unaligned_be32(readl(&regs->dr), buf + off);
+#endif

Can't you just use plain put_unaligned()? Be sure to cast buf + off to a 32-bit pointer.

Also, when you *do* need to have an if/else, use positive logic -- ifdef rather than ifndef, with the if/else swapped.

-Scott
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to