changeset 3292:7f8e529b4d82 default tip

Fix FREESCALE_EDMA_NBYTES_MLOFFYES_MLOFF() so it works with negative offsets.
author vae
date Wed, 29 Apr 2015 23:31:48 +0000
parents 68c8985fd5f0
children
files packages/hal/misc/freescale/edma/current/ChangeLog packages/hal/misc/freescale/edma/current/include/freescale_edma.h
diffstat 2 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/packages/hal/misc/freescale/edma/current/ChangeLog
+++ b/packages/hal/misc/freescale/edma/current/ChangeLog
@@ -1,3 +1,9 @@
+2015-04-30  Ilija Kocho <ilijak@siva.com.mk>
+
+	* include/freescale_edma.h: Fix FREESCALE_EDMA_NBYTES_MLOFFYES_MLOFF()
+	so it works with negative offsets.
+	[ Bugzilla 1002061 ]
+
 2014-02-13  Ilija Kocho <ilijak@siva.com.mk>
 
 	* misc/freescale/edma/current/doc/edma.sgml
--- a/packages/hal/misc/freescale/edma/current/include/freescale_edma.h
+++ b/packages/hal/misc/freescale/edma/current/include/freescale_edma.h
@@ -354,7 +354,8 @@ typedef volatile struct cyghwr_hal_frees
 #define FREESCALE_EDMA_NBYTES_MLOFFYES_MLOFF_M          0x3FFFFC00
 #define FREESCALE_EDMA_NBYTES_MLOFFYES_MLOFF_S          10
 #define FREESCALE_EDMA_NBYTES_MLOFFYES_MLOFF(__val)     \
-        VALUE_(FREESCALE_EDMA_NBYTES_MLOFFYES_MLOFF_S, __val)
+        (VALUE_(FREESCALE_EDMA_NBYTES_MLOFFYES_MLOFF_S, (__val)) & \
+        FREESCALE_EDMA_NBYTES_MLOFFYES_MLOFF_M)
 #define FREESCALE_EDMA_NBYTES_MLOFFYES_DMLOE_M          0x40000000
 #define FREESCALE_EDMA_NBYTES_MLOFFYES_DMLOE_S          30
 #define FREESCALE_EDMA_NBYTES_MLOFFYES_SMLOE_M          0x80000000