X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;ds=sidebyside;f=lib_blackfin%2Fboard.c;h=36a969e7318e2748a4dce752a34ca1ec754e9c6c;hb=f28e1bd9daa6de5eb33ae4822bda6b008ccb4e9e;hp=1a0a2826c0631d84f89d812aac9fb7510d7326bc;hpb=a17824c749aac3df0bbb528bb5d33af68296b0b1;p=u-boot diff --git a/lib_blackfin/board.c b/lib_blackfin/board.c index 1a0a2826c0..36a969e731 100644 --- a/lib_blackfin/board.c +++ b/lib_blackfin/board.c @@ -1,7 +1,7 @@ /* * U-boot - board.c First C file to be called contains init routines * - * Copyright (c) 2005 blackfin.uclinux.org + * Copyright (c) 2005-2007 Analog Devices Inc. * * (C) Copyright 2000-2004 * Wolfgang Denk, DENX Software Engineering, wd@denx.de. @@ -21,8 +21,8 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, - * MA 02111-1307 USA + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + * MA 02110-1301 USA */ #include @@ -182,7 +182,7 @@ void init_cplbtables(void) icplb_table[j][1] = L1_IMEMORY; j++; - for (i = 0; i <= CONFIG_MEM_SIZE / 4; i++) { + for (i = 0; i < CONFIG_MEM_SIZE / 4; i++) { icplb_table[j][0] = (i * 4 * 1024 * 1024); if (i * 4 * 1024 * 1024 <= CFG_MONITOR_BASE && (i + 1) * 4 * 1024 * 1024 >= CFG_MONITOR_BASE) { @@ -193,14 +193,19 @@ void init_cplbtables(void) 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_IGENERIC; + 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_IGENERIC; + icplb_table[j][1] = SDRAM_INON_CHBL; #endif j = 0; dcplb_table[j][0] = 0xFF800000; @@ -220,13 +225,15 @@ void init_cplbtables(void) #if defined(CONFIG_BF561) /* MAC space */ - dcplb_table[j++][0] = CONFIG_ASYNC_EBIU_BASE; - dcplb_table[j++][1] = SDRAM_EBIU; + dcplb_table[j][0] = 0x2C000000; + dcplb_table[j][1] = SDRAM_EBIU; + j++; /* Flash space */ - for (i = 0; i < 2; i++) { - dcplb_table[j++][0] = 0x20000000 + i * 4 * 1024 * 1024; - dcplb_table[j++][1] = SDRAM_EBIU; + 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; @@ -290,7 +297,7 @@ void board_init_f(ulong bootflag) } checkboard(); -#if defined(CONFIG_RTC_BF533) && (CONFIG_COMMANDS & CFG_CMD_DATE) +#if defined(CONFIG_RTC_BF533) && defined(CONFIG_CMD_DATE) rtc_init(); #endif timer_init(); @@ -384,13 +391,13 @@ void board_init_r(gd_t * id, ulong dest_addr) if ((s = getenv("loadaddr")) != NULL) { load_addr = simple_strtoul(s, NULL, 16); } -#if (CONFIG_COMMANDS & CFG_CMD_NET) +#if defined(CONFIG_CMD_NET) if ((s = getenv("bootfile")) != NULL) { copy_filename(BootFile, s, sizeof(BootFile)); } #endif -#if (CONFIG_COMMANDS & CFG_CMD_NAND) +#if defined(CONFIG_CMD_NAND) puts("NAND: "); nand_init(); /* go init the NAND */ #endif