From: wdenk Date: Mon, 9 Sep 2002 09:15:47 +0000 (+0000) Subject: Fix bugs in ARMBoot merge X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=3fe21ea55ce270f8972cc77cd9fd49dfea66f328;p=users%2Frw%2Fppcboot.git Fix bugs in ARMBoot merge --- diff --git a/board/dnp1110/dnp1110.c b/board/dnp1110/dnp1110.c index 80e707e..d6b1815 100644 --- a/board/dnp1110/dnp1110.c +++ b/board/dnp1110/dnp1110.c @@ -54,5 +54,5 @@ int dram_init (void) gd->bd->bi_dram[0].start = PHYS_SDRAM_1; gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE; - return PHYS_SDRAM_1_SIZE; + return (0); } diff --git a/board/ep7312/ep7312.c b/board/ep7312/ep7312.c index 8191b12..4f9e5ac 100644 --- a/board/ep7312/ep7312.c +++ b/board/ep7312/ep7312.c @@ -55,5 +55,5 @@ int dram_init (void) gd->bd->bi_dram[0].start = PHYS_SDRAM_1; gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE; - return PHYS_SDRAM_1_SIZE; + return (0); } diff --git a/board/impa7/impa7.c b/board/impa7/impa7.c index b95e910..12eb0db 100644 --- a/board/impa7/impa7.c +++ b/board/impa7/impa7.c @@ -57,5 +57,5 @@ int dram_init (void) gd->bd->bi_dram[1].start = PHYS_SDRAM_2; gd->bd->bi_dram[1].size = PHYS_SDRAM_2_SIZE; - return PHYS_SDRAM_1_SIZE + PHYS_SDRAM_2_SIZE; + return (0); } diff --git a/board/lart/lart.c b/board/lart/lart.c index a50aa70..20f22ea 100644 --- a/board/lart/lart.c +++ b/board/lart/lart.c @@ -61,8 +61,5 @@ int dram_init (void) bd->bi_dram[3].start = PHYS_SDRAM_4; bd->bi_dram[3].size = PHYS_SDRAM_4_SIZE; - return (PHYS_SDRAM_1_SIZE + - PHYS_SDRAM_2_SIZE + - PHYS_SDRAM_3_SIZE + - PHYS_SDRAM_4_SIZE ); + return (0); } diff --git a/board/shannon/shannon.c b/board/shannon/shannon.c index 2dd708f..a55626d 100644 --- a/board/shannon/shannon.c +++ b/board/shannon/shannon.c @@ -99,18 +99,5 @@ int dram_init (void) bd->bi_dram[3].size = PHYS_SDRAM_4_SIZE; #endif - return ( 0 -#ifdef PHYS_SDRAM_1 - + PHYS_SDRAM_1_SIZE -#endif -#ifdef PHYS_SDRAM_2 - + PHYS_SDRAM_2_SIZE -#endif -#ifdef PHYS_SDRAM_3 - + PHYS_SDRAM_3_SIZE -#endif -#ifdef PHYS_SDRAM_4 - + PHYS_SDRAM_4_SIZE -#endif - ); + return (0); } diff --git a/board/smdk2400/flash.c b/board/smdk2400/flash.c index 61529a3..c8d54bb 100644 --- a/board/smdk2400/flash.c +++ b/board/smdk2400/flash.c @@ -63,8 +63,7 @@ ulong flash_init(void) int i, j; ulong size = 0; - for (i = 0; i < CFG_MAX_FLASH_BANKS; i++) - { + for (i = 0; i < CFG_MAX_FLASH_BANKS; i++) { ulong flashbase = 0; flash_info[i].flash_id = (INTEL_MANUFACT & FLASH_VENDMASK) | diff --git a/board/smdk2400/smdk2400.c b/board/smdk2400/smdk2400.c index deff7a7..361bf5e 100644 --- a/board/smdk2400/smdk2400.c +++ b/board/smdk2400/smdk2400.c @@ -64,7 +64,7 @@ int board_init (void) /* adress of boot parameters */ gd->bd->bi_boot_params = 0x0C000100; - return 1; + return 0; } int dram_init (void) @@ -73,5 +73,6 @@ int dram_init (void) gd->bd->bi_dram[0].start = PHYS_SDRAM_1; gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE; - return PHYS_SDRAM_1_SIZE; + + return 0; } diff --git a/board/smdk2410/smdk2410.c b/board/smdk2410/smdk2410.c index 9fecce5..587ed64 100644 --- a/board/smdk2410/smdk2410.c +++ b/board/smdk2410/smdk2410.c @@ -116,5 +116,6 @@ int dram_init (void) gd->bd->bi_dram[0].start = PHYS_SDRAM_1; gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE; - return PHYS_SDRAM_1_SIZE; + + return 0; } diff --git a/lib_arm/board.c b/lib_arm/board.c index e9d3335..104fe59 100644 --- a/lib_arm/board.c +++ b/lib_arm/board.c @@ -168,6 +168,7 @@ init_fnc_t *init_sequence[] = { dram_init, /* configure available RAM banks */ display_dram_config, + NULL, }; void start_armboot (void) @@ -181,10 +182,8 @@ void start_armboot (void) /* Pointer is writable since we allocated a register for it */ gd = &gd_data; - gd->bd = &bd_data; - - /* initialize internal data strucuture */ memset (gd, 0, sizeof (gd_t)); + gd->bd = &bd_data; memset (gd->bd, 0, sizeof (bd_t)); for (init_fnc_ptr = init_sequence; *init_fnc_ptr; ++init_fnc_ptr) {