]> git.sur5r.net Git - u-boot/blobdiff - board/bf533-stamp/bf533-stamp.c
Merge branch 'master' of git://git.denx.de/u-boot-sh
[u-boot] / board / bf533-stamp / bf533-stamp.c
index 69e425bf974e7cf69a96d31067feca236416d3a4..0c6324b4b673a8bd75d4a5d68cee7d87f6bb13a1 100644 (file)
@@ -26,7 +26,6 @@
  */
 
 #include <common.h>
-#include <asm/mem_init.h>
 #include <asm/io.h>
 #include "bf533-stamp.h"
 
@@ -43,19 +42,12 @@ DECLARE_GLOBAL_DATA_PTR;
 
 int checkboard(void)
 {
-#if (BFIN_CPU == ADSP_BF531)
-       printf("CPU:   ADSP BF531 Rev.: 0.%d\n", *pCHIPID >> 28);
-#elif (BFIN_CPU == ADSP_BF532)
-       printf("CPU:   ADSP BF532 Rev.: 0.%d\n", *pCHIPID >> 28);
-#else
-       printf("CPU:   ADSP BF533 Rev.: 0.%d\n", *pCHIPID >> 28);
-#endif
        printf("Board: ADI BF533 Stamp board\n");
        printf("       Support: http://blackfin.uclinux.org/\n");
        return 0;
 }
 
-long int initdram(int board_type)
+phys_size_t initdram(int board_type)
 {
 #ifdef DEBUG
        printf("SDRAM attributes:\n");
@@ -63,11 +55,11 @@ long int initdram(int board_type)
            ("  tRCD:%d Cycles; tRP:%d Cycles; tRAS:%d Cycles; tWR:%d Cycles; "
             "CAS Latency:%d cycles\n", (SDRAM_tRCD >> 15), (SDRAM_tRP >> 11),
             (SDRAM_tRAS >> 6), (SDRAM_tWR >> 19), (SDRAM_CL >> 2));
-       printf("SDRAM Begin: 0x%x\n", CFG_SDRAM_BASE);
+       printf("SDRAM Begin: 0x%x\n", CONFIG_SYS_SDRAM_BASE);
        printf("Bank size = %d MB\n", 128);
 #endif
-       gd->bd->bi_memstart = CFG_SDRAM_BASE;
-       gd->bd->bi_memsize = CFG_MAX_RAM_SIZE;
+       gd->bd->bi_memstart = CONFIG_SYS_SDRAM_BASE;
+       gd->bd->bi_memsize = CONFIG_SYS_MAX_RAM_SIZE;
        return (gd->bd->bi_memsize);
 }
 
@@ -76,9 +68,9 @@ void swap_to(int device_id)
 
        if (device_id == ETHERNET) {
                *pFIO_DIR = PF0;
-               sync();
+               SSYNC();
                *pFIO_FLAG_S = PF0;
-               sync();
+               SSYNC();
        } else if (device_id == FLASH) {
                *pFIO_DIR = (PF4 | PF3 | PF2 | PF1 | PF0);
                *pFIO_FLAG_S = (PF4 | PF3 | PF2);
@@ -88,7 +80,7 @@ void swap_to(int device_id)
                *pFIO_EDGE = (PF8 | PF7 | PF6 | PF5);
                *pFIO_INEN = (PF8 | PF7 | PF6 | PF5);
                *pFIO_FLAG_D = (PF4 | PF3 | PF2);
-               sync();
+               SSYNC();
        } else {
                printf("Unknown bank to switch\n");
        }
@@ -155,15 +147,15 @@ void cf_outb(unsigned char val, volatile unsigned char *addr)
         */
        *pFIO_FLAG_S = CF_PF0;
        *pFIO_FLAG_C = CF_PF1;
-       sync();
+       SSYNC();
 
        *(addr) = val;
-       sync();
+       SSYNC();
 
        /* Setback PF1 PF0 to 0 0 to address external
         * memory banks  */
        *(volatile unsigned short *)pFIO_FLAG_C = CF_PF1_PF0;
-       sync();
+       SSYNC();
 }
 
 unsigned char cf_inb(volatile unsigned char *addr)
@@ -172,13 +164,13 @@ unsigned char cf_inb(volatile unsigned char *addr)
 
        *pFIO_FLAG_S = CF_PF0;
        *pFIO_FLAG_C = CF_PF1;
-       sync();
+       SSYNC();
 
        c = *(addr);
-       sync();
+       SSYNC();
 
        *pFIO_FLAG_C = CF_PF1_PF0;
-       sync();
+       SSYNC();
 
        return c;
 }
@@ -189,15 +181,15 @@ void cf_insw(unsigned short *sect_buf, unsigned short *addr, int words)
 
        *pFIO_FLAG_S = CF_PF0;
        *pFIO_FLAG_C = CF_PF1;
-       sync();
+       SSYNC();
 
        for (i = 0; i < words; i++) {
                *(sect_buf + i) = *(addr);
-               sync();
+               SSYNC();
        }
 
        *pFIO_FLAG_C = CF_PF1_PF0;
-       sync();
+       SSYNC();
 }
 
 void cf_outsw(unsigned short *addr, unsigned short *sect_buf, int words)
@@ -206,15 +198,15 @@ void cf_outsw(unsigned short *addr, unsigned short *sect_buf, int words)
 
        *pFIO_FLAG_S = CF_PF0;
        *pFIO_FLAG_C = CF_PF1;
-       sync();
+       SSYNC();
 
        for (i = 0; i < words; i++) {
                *(addr) = *(sect_buf + i);
-               sync();
+               SSYNC();
        }
 
        *pFIO_FLAG_C = CF_PF1_PF0;
-       sync();
+       SSYNC();
 }
 #endif
 
@@ -235,7 +227,7 @@ void stamp_led_set(int LED1, int LED2, int LED3)
                *pFIO_FLAG_S = PF4;
        else
                *pFIO_FLAG_C = PF4;
-       sync();
+       SSYNC();
 }
 
 void show_boot_progress(int status)