Merge tag 'u-boot-atmel-fixes-2020.07-a' of https://gitlab.denx.de/u-boot/custodians...
[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 <spl.h>
8 #include <linux/io.h>
9
10 #include "../init.h"
11 #include "../sc-regs.h"
12
13 void uniphier_ld4_early_clk_init(void)
14 {
15         u32 tmp;
16
17         /* provide clocks */
18         tmp = readl(sc_base + SC_CLKCTRL);
19         tmp |= SC_CLKCTRL_CEN_SBC | SC_CLKCTRL_CEN_PERI;
20         writel(tmp, sc_base + SC_CLKCTRL);
21         readl(sc_base + SC_CLKCTRL); /* dummy read */
22 }