blob: 3430303f875ac125b4f0e0a5956db51dcfd58808 [file] [log] [blame]
Masahiro Yamadaddb19002017-01-15 14:59:03 +09001/*
2 * Copyright (C) 2011-2014 Panasonic Corporation
3 * Copyright (C) 2015-2017 Socionext Inc.
4 *
5 * SPDX-License-Identifier: GPL-2.0+
6 */
7
8#include <common.h>
9#include <spl.h>
10#include <linux/io.h>
11
12#include "../init.h"
13#include "../sc-regs.h"
14
15void uniphier_sld3_dram_clk_init(void)
16{
17 u32 tmp;
18
19 /* deassert reset */
20 tmp = readl(SC_RSTCTRL);
21 tmp |= SC_RSTCTRL_NRST_UMC1 | SC_RSTCTRL_NRST_UMC0;
22 writel(tmp, SC_RSTCTRL);
23 readl(SC_RSTCTRL); /* dummy read */
24
25 /* provide clocks */
26 tmp = readl(SC_CLKCTRL);
27 tmp |= SC_CLKCTRL_CEN_UMC;
28 writel(tmp, SC_CLKCTRL);
29 readl(SC_CLKCTRL); /* dummy read */
30}