Merge branch 'master' of git://git.denx.de/u-boot
[oweals/u-boot.git] / examples / standalone / mem_to_mem_idma2intr.c
index e466c904a7866235dae68f5e5c780085501b4e15..17da8db9b91fd36218d708e5718a86657ffcfe90 100644 (file)
@@ -28,6 +28,7 @@
 
 
 #include <common.h>
+#include <console.h>
 #include <exports.h>
 
 DECLARE_GLOBAL_DATA_PTR;
@@ -309,7 +310,8 @@ int idma_init (void)
 
        memaddr = dpalloc (sizeof (pram_idma_t), 64);
 
-       *(volatile ushort *) &immap->im_dprambase[PROFF_IDMA2_BASE] = memaddr;
+       *(volatile u16 *)&immap->im_dprambase16
+               [PROFF_IDMA2_BASE / sizeof(u16)] = memaddr;
        piptr = (volatile pram_idma_t *) ((uint) (immap) + memaddr);
 
        piptr->pi_resv1 = 0;            /* manual says: clear it */