blob: 62e5acd64d2419abcd3a281520a9f18a3716c4dd [file] [log] [blame]
Masahiro Yamada9d0c2ce2016-04-21 14:43:18 +09001/*
Masahiro Yamada78c627c2017-01-15 14:59:03 +09002 * Copyright (C) 2016-2017 Socionext Inc.
Masahiro Yamada9d0c2ce2016-04-21 14:43:18 +09003 *
4 * SPDX-License-Identifier: GPL-2.0+
5 */
6
7#include <linux/io.h>
8
9#include "../init.h"
10#include "../sc64-regs.h"
11
Masahiro Yamada78c627c2017-01-15 14:59:03 +090012void uniphier_ld20_dram_clk_init(void)
Masahiro Yamada9d0c2ce2016-04-21 14:43:18 +090013{
14 u32 tmp;
15
16 /* deassert reset */
17 tmp = readl(SC_RSTCTRL7);
18 tmp |= SC_RSTCTRL7_UMCSB | SC_RSTCTRL7_UMCA2 | SC_RSTCTRL7_UMCA1 |
19 SC_RSTCTRL7_UMCA0 | SC_RSTCTRL7_UMC32 | SC_RSTCTRL7_UMC31 |
20 SC_RSTCTRL7_UMC30;
21 writel(tmp, SC_RSTCTRL7);
22
23 /* provide clocks */
Masahiro Yamada9d0c2ce2016-04-21 14:43:18 +090024 tmp = readl(SC_CLKCTRL7);
25 tmp |= SC_CLKCTRL7_UMCSB | SC_CLKCTRL7_UMC32 | SC_CLKCTRL7_UMC31 |
26 SC_CLKCTRL7_UMC30;
27 writel(tmp, SC_CLKCTRL7);
Masahiro Yamada9d0c2ce2016-04-21 14:43:18 +090028}