[U-Boot] [PATCH v6 03/12] nand: add Faraday FTNANDC021 NAND controller support
    Scott Wood 
    scottwood at freescale.com
       
    Tue Jul  9 01:59:23 CEST 2013
    
    
  
On 07/03/2013 10:40:35 PM, Kuo-Jung Su wrote:
> +#ifndef __ARMEB__
> +		put_unaligned_le32(readl(®s->dr), buf + off);
> +#else
> +		put_unaligned_be32(readl(®s->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
    
    
More information about the U-Boot
mailing list