]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - arch/blackfin/lib/board.c
Merge branch 'u-boot-imx/master' into 'u-boot-arm/master'
[karo-tx-uboot.git] / arch / blackfin / lib / board.c
index 2d424a2da0b9029fe42576a354609beef6d14a3e..75b6c463d87ba0348af947a5a1466a51c94aae4b 100644 (file)
@@ -77,8 +77,8 @@ static void display_global_data(void)
        bd = gd->bd;
        printf(" gd: %p\n", gd);
        printf(" |-flags: %lx\n", gd->flags);
-       printf(" |-board_type: %lx\n", gd->board_type);
-       printf(" |-baudrate: %lu\n", gd->baudrate);
+       printf(" |-board_type: %lx\n", gd->arch.board_type);
+       printf(" |-baudrate: %u\n", gd->baudrate);
        printf(" |-have_console: %lx\n", gd->have_console);
        printf(" |-ram_size: %lx\n", gd->ram_size);
        printf(" |-env_addr: %lx\n", gd->env_addr);
@@ -86,7 +86,6 @@ static void display_global_data(void)
        printf(" |-jt(%p): %p\n", gd->jt, *(gd->jt));
        printf(" \\-bd: %p\n", gd->bd);
        printf("   |-bi_baudrate: %x\n", bd->bi_baudrate);
-       printf("   |-bi_ip_addr: %lx\n", bd->bi_ip_addr);
        printf("   |-bi_boot_params: %lx\n", bd->bi_boot_params);
        printf("   |-bi_memstart: %lx\n", bd->bi_memstart);
        printf("   |-bi_memsize: %lx\n", bd->bi_memsize);
@@ -97,6 +96,13 @@ static void display_global_data(void)
 
 #define CPLB_PAGE_SIZE (4 * 1024 * 1024)
 #define CPLB_PAGE_MASK (~(CPLB_PAGE_SIZE - 1))
+#if defined(__ADSPBF60x__)
+#define CPLB_EX_PAGE_SIZE (16 * 1024 * 1024)
+#define CPLB_EX_PAGE_MASK (~(CPLB_EX_PAGE_SIZE - 1))
+#else
+#define CPLB_EX_PAGE_SIZE CPLB_PAGE_SIZE
+#define CPLB_EX_PAGE_MASK CPLB_PAGE_MASK
+#endif
 void init_cplbtables(void)
 {
        volatile uint32_t *ICPLB_ADDR, *ICPLB_DATA;
@@ -128,6 +134,11 @@ void init_cplbtables(void)
        icplb_add(0xFFA00000, L1_IMEMORY);
        dcplb_add(0xFF800000, L1_DMEMORY);
        ++i;
+#if defined(__ADSPBF60x__)
+       icplb_add(0x0, 0x0);
+       dcplb_add(CONFIG_SYS_FLASH_BASE, SDRAM_EBIU);
+       ++i;
+#endif
 
        if (CONFIG_MEM_SIZE) {
                uint32_t mbase = CONFIG_SYS_MONITOR_BASE;
@@ -151,9 +162,11 @@ void init_cplbtables(void)
                }
        }
 
+#ifndef __ADSPBF60x__
        icplb_add(0x20000000, SDRAM_INON_CHBL);
        dcplb_add(0x20000000, SDRAM_EBIU);
        ++i;
+#endif
 
        /* Add entries for the rest of external RAM up to the bootrom */
        extern_memory = 0;
@@ -168,10 +181,11 @@ void init_cplbtables(void)
        ++i;
 #endif
 
-       while (i < 16 && extern_memory < (CONFIG_SYS_MONITOR_BASE & CPLB_PAGE_MASK)) {
+       while (i < 16 && extern_memory <
+               (CONFIG_SYS_MONITOR_BASE & CPLB_EX_PAGE_MASK)) {
                icplb_add(extern_memory, SDRAM_IGENERIC);
                dcplb_add(extern_memory, SDRAM_DGENERIC);
-               extern_memory += CPLB_PAGE_SIZE;
+               extern_memory += CPLB_EX_PAGE_SIZE;
                ++i;
        }
        while (i < 16) {
@@ -210,7 +224,7 @@ static int global_board_data_init(void)
        gd->bd = bd;
 
        bd->bi_r_version = version_string;
-       bd->bi_cpu = MK_STR(CONFIG_BFIN_CPU);
+       bd->bi_cpu = __stringify(CONFIG_BFIN_CPU);
        bd->bi_board_name = BFIN_BOARD_NAME;
        bd->bi_vco = get_vco();
        bd->bi_cclk = get_cclk();
@@ -285,9 +299,7 @@ void board_init_f(ulong bootflag)
        init_baudrate();
        serial_early_puts("Serial init\n");
        serial_init();
-#ifdef CONFIG_SERIAL_MULTI
        serial_initialize();
-#endif
        serial_early_puts("Console init flash\n");
        console_init_f();
        serial_early_puts("End of early debugging\n");
@@ -298,7 +310,13 @@ void board_init_f(ulong bootflag)
 
        printf("Clock: VCO: %s MHz, ", strmhz(buf, get_vco()));
        printf("Core: %s MHz, ", strmhz(buf, get_cclk()));
+#if defined(__ADSPBF60x__)
+       printf("System0: %s MHz, ", strmhz(buf, get_sclk0()));
+       printf("System1: %s MHz, ", strmhz(buf, get_sclk1()));
+       printf("Dclk: %s MHz\n", strmhz(buf, get_dclk()));
+#else
        printf("System: %s MHz\n", strmhz(buf, get_sclk()));
+#endif
 
        if (CONFIG_MEM_SIZE) {
                printf("RAM:   ");
@@ -320,15 +338,8 @@ static void board_net_init_r(bd_t *bd)
        bb_miiphy_init();
 #endif
 #ifdef CONFIG_CMD_NET
-       char *s;
-
-       if ((s = getenv("bootfile")) != NULL)
-               copy_filename(BootFile, s, sizeof(BootFile));
-
-       bd->bi_ip_addr = getenv_IPaddr("ipaddr");
-
        printf("Net:   ");
-       eth_initialize(gd->bd);
+       eth_initialize(bd);
 #endif
 }