Mercurial > ecos
changeset 2868:6338fd43e9be
Fix 16as8 macros
| author | bartv |
|---|---|
| date | Tue, 21 Apr 2009 10:13:26 +0000 |
| parents | 05a4930e2f1a |
| children | b05be09f157f |
| files | packages/devs/flash/amd/am29xxxxxv2/current/ChangeLog packages/devs/flash/amd/am29xxxxxv2/current/src/am29xxxxx.c |
| diffstat | 2 files changed, 10 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/packages/devs/flash/amd/am29xxxxxv2/current/ChangeLog +++ b/packages/devs/flash/amd/am29xxxxxv2/current/ChangeLog @@ -1,3 +1,8 @@ +2009-04-20 Rene Schipp von Branitz Nielsen <rbn@vitesse.com> + + * src/am29xxxxx.c: Added set of parentheses around macro + parameters used in multiplications. Fixes 16as8 bug. + 2008-12-19 Jonathan Larmour <jifl@eCosCentric.com> * cdl/flash_am29xxxxx_v2.cdl: Doh, fix doc link properly.
--- a/packages/devs/flash/amd/am29xxxxxv2/current/src/am29xxxxx.c +++ b/packages/devs/flash/amd/am29xxxxxv2/current/src/am29xxxxx.c @@ -139,10 +139,10 @@ #define AM29_OFFSET_CFI_Q AM29_OFFSET_CFI_DATA(0x0010) #define AM29_OFFSET_CFI_SIZE AM29_OFFSET_CFI_DATA(0x0027) #define AM29_OFFSET_CFI_BLOCK_REGIONS AM29_OFFSET_CFI_DATA(0x002C) -#define AM29_OFFSET_CFI_BLOCK_COUNT_LSB(_i_) AM29_OFFSET_CFI_DATA(0x002D + (4 * _i_)) -#define AM29_OFFSET_CFI_BLOCK_COUNT_MSB(_i_) AM29_OFFSET_CFI_DATA(0x002E + (4 * _i_)) -#define AM29_OFFSET_CFI_BLOCK_SIZE_LSB(_i_) AM29_OFFSET_CFI_DATA(0x002F + (4 * _i_)) -#define AM29_OFFSET_CFI_BLOCK_SIZE_MSB(_i_) AM29_OFFSET_CFI_DATA(0x0030 + (4 * _i_)) +#define AM29_OFFSET_CFI_BLOCK_COUNT_LSB(_i_) AM29_OFFSET_CFI_DATA(0x002D + (4 * (_i_))) +#define AM29_OFFSET_CFI_BLOCK_COUNT_MSB(_i_) AM29_OFFSET_CFI_DATA(0x002E + (4 * (_i_))) +#define AM29_OFFSET_CFI_BLOCK_SIZE_LSB(_i_) AM29_OFFSET_CFI_DATA(0x002F + (4 * (_i_))) +#define AM29_OFFSET_CFI_BLOCK_SIZE_MSB(_i_) AM29_OFFSET_CFI_DATA(0x0030 + (4 * (_i_))) #define AM29_STATUS_DQ7 AM29_SWAP(AM29_PARALLEL(0x0080)) #define AM29_STATUS_DQ6 AM29_SWAP(AM29_PARALLEL(0x0040)) @@ -509,6 +509,6 @@ am29_get_block_info(struct cyg_flash_dev #define AM29_OFFSET_DEVID3 0x001E #define AM29_OFFSET_AT49_LOCK_STATUS 04 #define AM29_OFFSET_CFI 0x00AA -#define AM29_OFFSET_CFI_DATA(_idx_) (2 * _idx_) +#define AM29_OFFSET_CFI_DATA(_idx_) (2 * (_idx_)) #include "am29xxxxx_aux.c"
