]> git.kernelconcepts.de Git - karo-tx-uboot.git/blob - arch/arm/mach-uniphier/clk/dpll-ld20.c
ARM: uniphier: add PLL init code for LD20 SoC
[karo-tx-uboot.git] / arch / arm / mach-uniphier / clk / dpll-ld20.c
1 /*
2  * Copyright (C) 2016 Socionext Inc.
3  *   Author: Masahiro Yamada <yamada.masahiro@socionext.com>
4  *
5  * SPDX-License-Identifier:     GPL-2.0+
6  */
7
8 #include "../init.h"
9 #include "../sc64-regs.h"
10 #include "pll.h"
11
12 int uniphier_ld20_dpll_init(const struct uniphier_board_data *bd)
13 {
14         unsigned int dpll_ssc_rate = UNIPHIER_BD_DPLL_SSC_GET_RATE(bd->flags);
15         unsigned int dram_freq = bd->dram_freq;
16
17         uniphier_ld20_sscpll_init(SC_DPLL0CTRL, dram_freq, dpll_ssc_rate, 2);
18         uniphier_ld20_sscpll_init(SC_DPLL1CTRL, dram_freq, dpll_ssc_rate, 2);
19         uniphier_ld20_sscpll_init(SC_DPLL2CTRL, dram_freq, dpll_ssc_rate, 2);
20
21         return 0;
22 }