]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - board/hermes/hermes.c
Change initdram() return type to phys_size_t
[karo-tx-uboot.git] / board / hermes / hermes.c
index 7490324cb0e7a5c86e2d57c5935b7cf1b96bf35a..f9b57204f0a5b4b748dcdf5d388fd50969bf575f 100644 (file)
@@ -32,6 +32,8 @@
 # define SHOW_BOOT_PROGRESS(arg)
 #endif
 
+DECLARE_GLOBAL_DATA_PTR;
+
 /* ------------------------------------------------------------------------- */
 
 static long int dram_size (long int, long int *, long int);
@@ -105,10 +107,8 @@ const uint sdram_table[] = {
 
 int checkboard (void)
 {
-       DECLARE_GLOBAL_DATA_PTR;
-
-       unsigned char *s = getenv ("serial#");
-       unsigned char *e;
+       char *s = getenv ("serial#");
+       char *e;
 
        puts ("Board: ");
 
@@ -134,7 +134,7 @@ int checkboard (void)
 
 /* ------------------------------------------------------------------------- */
 
-long int initdram (int board_type)
+phys_size_t initdram (int board_type)
 {
        volatile immap_t *immap = (immap_t *) CFG_IMMR;
        volatile memctl8xx_t *memctl = &immap->im_memctl;
@@ -179,7 +179,7 @@ long int initdram (int board_type)
         *
         * try 8 column mode
         */
-       size8 = dram_size (CFG_MAMR_8COL, (ulong *) SDRAM_BASE_PRELIM,
+       size8 = dram_size (CFG_MAMR_8COL, (long *) SDRAM_BASE_PRELIM,
                                           SDRAM_MAX_SIZE);
 
        udelay (1000);
@@ -187,7 +187,7 @@ long int initdram (int board_type)
        /*
         * try 9 column mode
         */
-       size9 = dram_size (CFG_MAMR_9COL, (ulong *) SDRAM_BASE_PRELIM,
+       size9 = dram_size (CFG_MAMR_9COL, (long *) SDRAM_BASE_PRELIM,
                                           SDRAM_MAX_SIZE);
 
        if (size8 < size9) {            /* leave configuration at 9 columns */
@@ -597,6 +597,7 @@ void show_boot_progress (int status)
 {
        volatile immap_t *immr = (immap_t *) CFG_IMMR;
 
+       if (status < -32) status = -1;  /* let things compatible */
        status ^= 0x0F;
        status = (status & 0x0F) << 14;
        immr->im_cpm.cp_pbdat = (immr->im_cpm.cp_pbdat & ~PB_LED_ALL) | status;