]> git.sur5r.net Git - u-boot/blobdiff - examples/test_burst.c
Makefile/at91sam9: move some at91sam9 to the correct subsection for arm926ejs
[u-boot] / examples / test_burst.c
index f09707ff907b6b2cdcc0119f7ce383ba10906e49..7109c098ef18495ad28bbadc257b14bfbb775bb1 100644 (file)
 /* Define GPIO ports to signal start of burst transfers and errors */
 #ifdef CONFIG_LWMON
 /* Use PD.8 to signal start of burst transfers */
-#define GPIO1_DAT      (((volatile immap_t *)CFG_IMMR)->im_ioport.iop_pddat)
+#define GPIO1_DAT      (((volatile immap_t *)CONFIG_SYS_IMMR)->im_ioport.iop_pddat)
 #define GPIO1_BIT      0x0080
 /* Configure PD.8 as general purpose output */
 #define GPIO1_INIT \
-       ((volatile immap_t *)CFG_IMMR)->im_ioport.iop_pdpar &= ~GPIO1_BIT; \
-       ((volatile immap_t *)CFG_IMMR)->im_ioport.iop_pddir |=  GPIO1_BIT;
+       ((volatile immap_t *)CONFIG_SYS_IMMR)->im_ioport.iop_pdpar &= ~GPIO1_BIT; \
+       ((volatile immap_t *)CONFIG_SYS_IMMR)->im_ioport.iop_pddir |=  GPIO1_BIT;
 /* Use PD.9 to signal error */
-#define GPIO2_DAT      (((volatile immap_t *)CFG_IMMR)->im_ioport.iop_pddat)
+#define GPIO2_DAT      (((volatile immap_t *)CONFIG_SYS_IMMR)->im_ioport.iop_pddat)
 #define GPIO2_BIT      0x0040
 /* Configure PD.9 as general purpose output */
 #define GPIO2_INIT \
-       ((volatile immap_t *)CFG_IMMR)->im_ioport.iop_pdpar &= ~GPIO2_BIT; \
-       ((volatile immap_t *)CFG_IMMR)->im_ioport.iop_pddir |=  GPIO2_BIT;
+       ((volatile immap_t *)CONFIG_SYS_IMMR)->im_ioport.iop_pdpar &= ~GPIO2_BIT; \
+       ((volatile immap_t *)CONFIG_SYS_IMMR)->im_ioport.iop_pddir |=  GPIO2_BIT;
 #endif /* CONFIG_LWMON */
 
 
@@ -173,7 +173,7 @@ static int test_burst_start (unsigned long size, unsigned long pattern)
        int i, n;
        int res = 1;
 
-       printf ("Test pattern %08x ...", pattern);
+       printf ("Test pattern %08lx ...", pattern);
 
        n = size / 4;
 
@@ -248,7 +248,7 @@ static void test_desc(unsigned long size)
 {
        printf(
        "The following tests will be conducted:\n"
-       "1)  Map %d-byte region of physical RAM at 0x%08x\n"
+       "1)  Map %ld-byte region of physical RAM at 0x%08x\n"
        "    into two virtual regions:\n"
        "    one cached at 0x%08x and\n"
        "    the the other uncached at 0x%08x.\n",
@@ -277,8 +277,8 @@ static void test_error(
        p[1] = val;
        p[2] = pattern;
 
-       printf ("\nError at step %s, addr %08x: read %08x, pattern %08x",
-               step, addr, val, pattern);
+       printf ("\nError at step %s, addr %08lx: read %08lx, pattern %08lx",
+               step, (unsigned long)addr, val, pattern);
 }
 
 static void signal_init(void)