1 /* 2 * K2G EVM : Board initialization 3 * 4 * (C) Copyright 2015 5 * Texas Instruments Incorporated, <www.ti.com> 6 * 7 * SPDX-License-Identifier: GPL-2.0+ 8 */ 9 #include <common.h> 10 #include <asm/arch/clock.h> 11 12 static struct pll_init_data main_pll_config = {MAIN_PLL, 100, 1, 4}; 13 static struct pll_init_data tetris_pll_config = {TETRIS_PLL, 100, 1, 4}; 14 static struct pll_init_data uart_pll_config = {UART_PLL, 64, 1, 4}; 15 static struct pll_init_data nss_pll_config = {NSS_PLL, 250, 3, 2}; 16 static struct pll_init_data ddr3_pll_config = {DDR3_PLL, 250, 3, 10}; 17 18 struct pll_init_data *get_pll_init_data(int pll) 19 { 20 struct pll_init_data *data = NULL; 21 22 switch (pll) { 23 case MAIN_PLL: 24 data = &main_pll_config; 25 break; 26 case TETRIS_PLL: 27 data = &tetris_pll_config[speed]; 28 break; 29 case NSS_PLL: 30 data = &nss_pll_config; 31 break; 32 case UART_PLL: 33 data = &uart_pll_config; 34 break; 35 case DDR3_PLL: 36 data = &ddr_pll_config; 37 break; 38 default: 39 data = NULL; 40 } 41 42 return data; 43 } 44 45 s16 divn_val[16] = { 46 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 47 }; 48 49 #ifdef CONFIG_BOARD_EARLY_INIT_F 50 int board_early_init_f(void) 51 { 52 init_plls(); 53 54 return 0; 55 } 56 #endif 57 58 #ifdef CONFIG_SPL_BUILD 59 void spl_init_keystone_plls(void) 60 { 61 init_plls(); 62 } 63 #endif 64