blob: 113231307a4945776f82c4fca8c41ffa69096932 [file] [log] [blame]
Masahiro Yamadad11b0b72016-09-17 03:33:11 +09001/*
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
12int 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}