From fa45bd498a1970574f4b7539b67cc2286f1324fa Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Tue, 3 Nov 2009 06:28:22 -0500 Subject: Blackfin: kill off useless initdram() usage While the initdram() function makes sense on some arches, it doesn't for Blackfin systems as it's always implemented the same way. Signed-off-by: Mike Frysinger --- lib_blackfin/board.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib_blackfin/board.c') diff --git a/lib_blackfin/board.c b/lib_blackfin/board.c index 6cade7d..b414b2a 100644 --- a/lib_blackfin/board.c +++ b/lib_blackfin/board.c @@ -239,6 +239,8 @@ void board_init_f(ulong bootflag) bd->bi_vco = get_vco(); bd->bi_cclk = get_cclk(); bd->bi_sclk = get_sclk(); + bd->bi_memstart = CONFIG_SYS_SDRAM_BASE; + bd->bi_memsize = CONFIG_SYS_MAX_RAM_SIZE; /* Initialize */ serial_early_puts("IRQ init\n"); @@ -262,7 +264,7 @@ void board_init_f(ulong bootflag) printf("System: %s MHz\n", strmhz(buf, get_sclk())); printf("RAM: "); - print_size(initdram(0), "\n"); + print_size(bd->bi_memsize, "\n"); #if defined(CONFIG_POST) post_init_f(); post_bootmode_init(); -- cgit v1.1 From 7527feef06b13e9fd5b6d10a4bfc81b59ee56f27 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Mon, 9 Nov 2009 19:38:23 -0500 Subject: Blackfin: support boards with no external memory Signed-off-by: Mike Frysinger --- lib_blackfin/board.c | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) (limited to 'lib_blackfin/board.c') diff --git a/lib_blackfin/board.c b/lib_blackfin/board.c index b414b2a..ed4e77b 100644 --- a/lib_blackfin/board.c +++ b/lib_blackfin/board.c @@ -130,17 +130,26 @@ void init_cplbtables(void) dcplb_add(0xFF800000, L1_DMEMORY); ++i; - icplb_add(CONFIG_SYS_MONITOR_BASE & CPLB_PAGE_MASK, SDRAM_IKERNEL); - dcplb_add(CONFIG_SYS_MONITOR_BASE & CPLB_PAGE_MASK, SDRAM_DKERNEL); - ++i; - - /* If the monitor crosses a 4 meg boundary, we'll need - * to lock two entries for it. - */ - if ((CONFIG_SYS_MONITOR_BASE & CPLB_PAGE_MASK) != ((CONFIG_SYS_MONITOR_BASE + CONFIG_SYS_MONITOR_LEN) & CPLB_PAGE_MASK)) { - icplb_add((CONFIG_SYS_MONITOR_BASE + CONFIG_SYS_MONITOR_LEN) & CPLB_PAGE_MASK, SDRAM_IKERNEL); - dcplb_add((CONFIG_SYS_MONITOR_BASE + CONFIG_SYS_MONITOR_LEN) & CPLB_PAGE_MASK, SDRAM_DKERNEL); + if (CONFIG_MEM_SIZE) { + uint32_t mbase = CONFIG_SYS_MONITOR_BASE; + uint32_t mend = mbase + CONFIG_SYS_MONITOR_LEN; + mbase &= CPLB_PAGE_MASK; + mend &= CPLB_PAGE_MASK; + + icplb_add(mbase, SDRAM_IKERNEL); + dcplb_add(mbase, SDRAM_DKERNEL); ++i; + + /* + * If the monitor crosses a 4 meg boundary, we'll need + * to lock two entries for it. We assume it doesn't + * cross two 4 meg boundaries ... + */ + if (mbase != mend) { + icplb_add(mend, SDRAM_IKERNEL); + dcplb_add(mend, SDRAM_DKERNEL); + ++i; + } } icplb_add(0x20000000, SDRAM_INON_CHBL); -- cgit v1.1 From e54c8209913a3f26ae28819e3515df53ec2b4548 Mon Sep 17 00:00:00 2001 From: Cliff Cai Date: Fri, 20 Nov 2009 08:24:43 +0000 Subject: Blackfin: convert bfin_sdh to generic mmc Signed-off-by: Cliff Cai Signed-off-by: Mike Frysinger --- lib_blackfin/board.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib_blackfin/board.c') diff --git a/lib_blackfin/board.c b/lib_blackfin/board.c index ed4e77b..90da2b4 100644 --- a/lib_blackfin/board.c +++ b/lib_blackfin/board.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include @@ -340,6 +341,11 @@ void board_init_r(gd_t * id, ulong dest_addr) nand_init(); /* go init the NAND */ #endif +#ifdef CONFIG_GENERIC_MMC + puts("MMC: "); + mmc_initialize(bd); +#endif + /* relocate environment function pointers etc. */ env_relocate(); -- cgit v1.1