0f9ce650976899a65a342e1ef46b62241af186f5
[oweals/u-boot.git] / arch / arm / mach-uniphier / clk / clk-early-ld4.c
1 // SPDX-License-Identifier: GPL-2.0+
2 /*
3  * Copyright (C) 2011-2014 Panasonic Corporation
4  * Copyright (C) 2015-2017 Socionext Inc.
5  */
6
7 #include <common.h>
8 #include <spl.h>
9 #include <linux/io.h>
10
11 #include "../init.h"
12 #include "../sc-regs.h"
13
14 void uniphier_ld4_early_clk_init(void)
15 {
16         u32 tmp;
17
18         /* provide clocks */
19         tmp = readl(sc_base + SC_CLKCTRL);
20         tmp |= SC_CLKCTRL_CEN_SBC | SC_CLKCTRL_CEN_PERI;
21         writel(tmp, sc_base + SC_CLKCTRL);
22         readl(sc_base + SC_CLKCTRL); /* dummy read */
23 }