Merge git://www.denx.de/git/u-boot
[oweals/u-boot.git] / board / freescale / common / pixis.c
index af98157dfd724d51acedd911a5e74c6b2aacc616..ae4bef1877e909a7982d4b1ac5c92a3651dce2da 100644 (file)
@@ -27,6 +27,8 @@
 #include <watchdog.h>
 #include <asm/cache.h>
 
+#ifdef CONFIG_FSL_PIXIS
+
 #include "pixis.h"
 
 
@@ -321,10 +323,10 @@ static ulong strfractoint(uchar *strptr)
                mulconst = 1;
                for (i = 0; i < decarr_len; i++)
                        mulconst *= 10;
-               decval = simple_strtoul(decarr, NULL, 10);
+               decval = simple_strtoul((char *)decarr, NULL, 10);
        }
 
-       intval = simple_strtoul(intarr, NULL, 10);
+       intval = simple_strtoul((char *)intarr, NULL, 10);
        intval = intval * mulconst;
 
        retval = intval + decval;
@@ -362,7 +364,7 @@ pixis_reset_cmd(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 
                val = set_px_sysclk(simple_strtoul(argv[2], NULL, 10));
 
-               corepll = strfractoint(argv[3]);
+               corepll = strfractoint((uchar *)argv[3]);
                val = val + set_px_corepll(corepll);
                val = val + set_px_mpxpll(simple_strtoul(argv[4], NULL, 10));
                if (val == 3) {
@@ -410,7 +412,7 @@ pixis_reset_cmd(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
                        read_from_px_regs(0);
                        read_from_px_regs_altbank(0);
                        val = set_px_sysclk(simple_strtoul(argv[3], NULL, 10));
-                       corepll = strfractoint(argv[4]);
+                       corepll = strfractoint((uchar *)argv[4]);
                        val = val + set_px_corepll(corepll);
                        val = val + set_px_mpxpll(simple_strtoul(argv[5],
                                                                 NULL, 10));
@@ -470,3 +472,4 @@ U_BOOT_CMD(
        "    pixis_reset altbank cf <SYSCLK freq> <COREPLL ratio> <MPXPLL ratio>\n"
        "    pixis_reset cf <SYSCLK freq> <COREPLL ratio> <MPXPLL ratio>\n"
        );
+#endif /* CONFIG_FSL_PIXIS */