blob: c94d83c4ed537887b4286332113a52d93545249c [file] [log] [blame]
Masahiro Yamada667dbcd2016-05-24 21:14:01 +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 <linux/io.h>
9
10#include "../init.h"
11#include "../sc64-regs.h"
12
13int uniphier_ld11_early_clk_init(const struct uniphier_board_data *bd)
14{
15 u32 tmp;
16
17 /* deassert reset */
18 tmp = readl(SC_RSTCTRL7);
19 tmp |= SC_RSTCTRL7_UMC31 | SC_RSTCTRL7_UMC30;
20 writel(tmp, SC_RSTCTRL7);
21
22 /* provide clocks */
23 tmp = readl(SC_CLKCTRL4);
24 tmp |= SC_CLKCTRL4_PERI;
25 writel(tmp, SC_CLKCTRL4);
26
27 tmp = readl(SC_CLKCTRL7);
28 tmp |= SC_CLKCTRL7_UMC31 | SC_CLKCTRL7_UMC30;
29 writel(tmp, SC_CLKCTRL7);
30
31 return 0;
32}