#include <i2c.h>
#include "blackfin_board.h"
#include <asm/cplb.h>
-#include "../drivers/smc91111.h"
+#include "../drivers/net/smc91111.h"
-#if defined(CONFIG_BF537)&&defined(CONFIG_POST)
+#if defined(CONFIG_POST)
#include <post.h>
int post_flag;
#endif
+DECLARE_GLOBAL_DATA_PTR;
+
#ifndef CFG_NO_FLASH
extern flash_info_t flash_info[];
#endif
{
sprintf(version_string, VERSION_STRING_FORMAT, VERSION_STRING);
printf("%s\n", version_string);
+ printf("CPU: ADSP " MK_STR(CONFIG_BFIN_CPU) " (Detected Rev: 0.%d)\n", bfin_revid());
return (0);
}
static int init_baudrate(void)
{
- DECLARE_GLOBAL_DATA_PTR;
-
char tmp[64];
int i = getenv_r("baudrate", tmp, sizeof(tmp));
gd->bd->bi_baudrate = gd->baudrate = (i > 0)
#ifdef DEBUG
static void display_global_data(void)
{
- DECLARE_GLOBAL_DATA_PTR;
bd_t *bd;
bd = gd->bd;
printf("--flags:%x\n", gd->flags);
}
j++;
}
-#if defined(CONFIG_BF561)
- /* MAC space */
- icplb_table[j][0] = 0x2C000000;
- icplb_table[j][1] = SDRAM_INON_CHBL;
- j++;
- /* Async Memory space */
- for (i = 0; i < 3; i++) {
- icplb_table[j][0] = 0x20000000 + i * 4 * 1024 * 1024;
- icplb_table[j][1] = SDRAM_INON_CHBL;
- j++;
- }
-#else
icplb_table[j][0] = 0x20000000;
icplb_table[j][1] = SDRAM_INON_CHBL;
-#endif
j = 0;
dcplb_table[j][0] = 0xFF800000;
dcplb_table[j][1] = L1_DMEMORY;
j++;
}
-#if defined(CONFIG_BF561)
- /* MAC space */
- dcplb_table[j][0] = 0x2C000000;
- dcplb_table[j][1] = SDRAM_EBIU;
- j++;
-
- /* Flash space */
- for (i = 0; i < 3; i++) {
- dcplb_table[j][0] = 0x20000000 + i * 4 * 1024 * 1024;
- dcplb_table[j][1] = SDRAM_EBIU;
- j++;
- }
-#else
dcplb_table[j][0] = 0x20000000;
dcplb_table[j][1] = SDRAM_EBIU;
-#endif
}
/*
void board_init_f(ulong bootflag)
{
- DECLARE_GLOBAL_DATA_PTR;
ulong addr;
bd_t *bd;
int i;
memset((void *)bd, 0, sizeof(bd_t));
/* Initialize */
- init_IRQ();
+ irq_init();
env_init(); /* initialize environment */
init_baudrate(); /* initialze baudrate settings */
serial_init(); /* serial communications setup */
get_vco() / 1000000, get_cclk() / 1000000, get_sclk() / 1000000);
printf("SDRAM: ");
print_size(initdram(0), "\n");
-#if defined(CONFIG_BF537)&&defined(CONFIG_POST)
+#if defined(CONFIG_POST)
post_init_f();
post_bootmode_init();
post_run(NULL, POST_ROM | post_bootmode_get(0));
void board_init_r(gd_t * id, ulong dest_addr)
{
- DECLARE_GLOBAL_DATA_PTR;
ulong size;
extern void malloc_bin_reloc(void);
char *s, *e;
gd->flags |= GD_FLG_RELOC; /* tell others: relocation done */
bd = gd->bd;
-#if defined(CONFIG_BF537) && defined(CONFIG_POST)
+#if defined(CONFIG_POST)
post_output_backlog();
post_reloc();
#endif
-#if (CONFIG_STAMP || CONFIG_BF537 || CONFIG_EZKIT561) && !defined(CFG_NO_FLASH)
+#if !defined(CFG_NO_FLASH)
/* There are some other pointer constants we must deal with */
/* configure available FLASH banks */
size = flash_init();
misc_init_r();
#endif
-#if ((BFIN_CPU == ADSP_BF537) || (BFIN_CPU == ADSP_BF536))
+#ifdef CONFIG_CMD_NET
printf("Net: ");
eth_initialize(bd);
#endif
display_global_data();
#endif
-#if defined(CONFIG_BF537) && defined(CONFIG_POST)
+#if defined(CONFIG_POST)
if (post_flag)
post_run(NULL, POST_RAM | post_bootmode_get(0));
#endif