
8 Aug
2006
8 Aug
'06
1:25 p.m.
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
========================================================================