X-Git-Url: https://git.kernelconcepts.de/?p=karo-tx-uboot.git;a=blobdiff_plain;f=board%2Fti%2Fks2_evm%2Fboard.c;h=859a26011c4c67d69b1524ca58883c5e43da0407;hp=40294934525c9b0518d2a53118c45c6da22fdc13;hb=c0f1d684dc6851e3b647637a1fe39c8c4d4f379f;hpb=5aa7bece1045c28806ce919099616ebe8fa63325 diff --git a/board/ti/ks2_evm/board.c b/board/ti/ks2_evm/board.c index 4029493452..859a26011c 100644 --- a/board/ti/ks2_evm/board.c +++ b/board/ti/ks2_evm/board.c @@ -35,18 +35,20 @@ static struct aemif_config aemif_configs[] = { int dram_init(void) { - ddr3_init(); + u32 ddr3_size; + + ddr3_size = ddr3_init(); gd->ram_size = get_ram_size((long *)CONFIG_SYS_SDRAM_BASE, CONFIG_MAX_RAM_BANK_SIZE); aemif_init(ARRAY_SIZE(aemif_configs), aemif_configs); - ddr3_init_ecc(KS2_DDR3A_EMIF_CTRL_BASE); + ddr3_init_ecc(KS2_DDR3A_EMIF_CTRL_BASE, ddr3_size); return 0; } int board_init(void) { - gd->bd->bi_boot_params = CONFIG_LINUX_BOOT_PARAM_ADDR; + gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100; return 0; } @@ -78,7 +80,6 @@ int board_eth_init(bd_t *bis) return -1; if (psc_enable_module(KS2_LPSC_CRYPTO)) return -1; - pass_pll_pa_clk_enable(); port_num = get_num_eth_ports(); @@ -114,7 +115,7 @@ u32 spl_boot_device(void) #endif #if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) -void ft_board_setup(void *blob, bd_t *bd) +int ft_board_setup(void *blob, bd_t *bd) { int lpae; char *env; @@ -122,7 +123,6 @@ void ft_board_setup(void *blob, bd_t *bd) int nbanks; u64 size[2]; u64 start[2]; - char name[32]; int nodeoffset; u32 ddr3a_size; int unitrd_fixup = 0; @@ -158,15 +158,13 @@ void ft_board_setup(void *blob, bd_t *bd) } /* reserve memory at start of bank */ - sprintf(name, "mem_reserve_head"); - env = getenv(name); + env = getenv("mem_reserve_head"); if (env) { start[0] += ustrtoul(env, &endp, 0); size[0] -= ustrtoul(env, &endp, 0); } - sprintf(name, "mem_reserve"); - env = getenv(name); + env = getenv("mem_reserve"); if (env) size[0] -= ustrtoul(env, &endp, 0); @@ -220,6 +218,8 @@ void ft_board_setup(void *blob, bd_t *bd) } } } + + return 0; } void ft_board_setup_ex(void *blob, bd_t *bd)