X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=board%2Fmx1ads%2Fmx1ads.c;h=4266048981c678f8aa2531701b37f23fa84304c8;hb=7d7c497d592de6b7f8a0478d1f28011f24c13598;hp=f8ce2108c1c5f6de196f1a2d82b3ea30e299a239;hpb=3aa8b68d80dbcb6829af60485c1e388b39af793d;p=platform%2Fkernel%2Fu-boot.git diff --git a/board/mx1ads/mx1ads.c b/board/mx1ads/mx1ads.c index f8ce210..4266048 100644 --- a/board/mx1ads/mx1ads.c +++ b/board/mx1ads/mx1ads.c @@ -7,26 +7,14 @@ * * Ming-Len Wu * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * 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 + * SPDX-License-Identifier: GPL-2.0+ */ #include #include /*#include */ #include +#include DECLARE_GLOBAL_DATA_PTR; @@ -78,10 +66,8 @@ void SetAsynchMode (void) static u32 mc9328sid; -int board_init (void) +int board_early_init_f(void) { - volatile unsigned int tmp; - mc9328sid = SIDR; GPCR = 0x000003AB; /* I/O pad driving strength */ @@ -107,15 +93,11 @@ int board_init (void) GIUS (0) &= 0xFF3FFFFF; GPR (0) &= 0xFF3FFFFF; - tmp = *(unsigned int *) (0x1500000C); - tmp = *(unsigned int *) (0x1500000C); + readl(0x1500000C); + readl(0x1500000C); SetAsynchMode (); - gd->bd->bi_arch_number = MACH_TYPE_MX1ADS; - - gd->bd->bi_boot_params = 0x08000100; /* adress of boot parameters */ - icache_enable (); dcache_enable (); @@ -133,6 +115,15 @@ int board_init (void) return 0; } +int board_init(void) +{ + gd->bd->bi_arch_number = MACH_TYPE_MX1ADS; + + gd->bd->bi_boot_params = 0x08000100; /* adress of boot parameters */ + + return 0; +} + int board_late_init (void) { @@ -161,12 +152,18 @@ int board_late_init (void) return 0; } -int dram_init (void) +int dram_init(void) +{ + /* dram_init must store complete ramsize in gd->ram_size */ + gd->ram_size = get_ram_size((void *)PHYS_SDRAM_1, + PHYS_SDRAM_1_SIZE); + return 0; +} + +void dram_init_banksize(void) { gd->bd->bi_dram[0].start = PHYS_SDRAM_1; gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE; - - return 0; } #ifdef CONFIG_CMD_NET