
Got it. It's a little bit misleading to read your patch alone.
Your patch is mostly the same with Roy's latest patch, but with a more generic name. So, I prefer your version. :)
Best Regards, Leo
-----Original Message----- From: Yuli Barcohen [mailto:yuli@arabellasw.com] Sent: Tuesday, August 08, 2006 7:26 PM To: Li Yang-r58472 Cc: u-boot-users@lists.sourceforge.net; Sam Song; Wolfgang Denk Subject: RE: [U-Boot-Users] [RFC] CFI Driver Little-Endian write Issue
Li Yang writes:
Li> +#if defined(__LITTLE_ENDIAN) && !defined(CFG_FLASH_CFI_SWAP) Li> +#define CFG_FLASH_CFI_SWAP Li> +#endif Li> + [snip] Li> -#if defined(__LITTLE_ENDIAN) Li> +#if defined(CFG_FLASH_CFI_SWAP) Li> Why use CFG_FLASH_CFI_SWAP instead of __LITTLE_ENDIAN. It
seems
Li> that they are equivalent.
No, they aren't. First of all, on big-endian systems __LITTLE_ENDIAN
is
never defined and on little-endian systems it's always defined automatically while CFG_FLASH_CFI_SWAP must be defined manually if
your
board has such a flash. On little-endian systems, the driver should
work
without the need to define CFG_FLASH_CFI_SWAP. Also, there are places
in
the code for __LITTLE_ENDIAN only, not for CFG_FLASH_CFI_SWAP.
--
========================================================================
Yuli Barcohen | Phone +972-9-765-1788 | Software Project
Leader
yuli@arabellasw.com | Fax +972-9-765-7494 | Arabella Software,
Israel
========================================================================