Masahiro Yamada | ddb1900 | 2017-01-15 14:59:03 +0900 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2016-2017 Socionext Inc. |
| 3 | * |
| 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 | |
| 12 | void uniphier_ld11_dram_clk_init(void) |
| 13 | { |
| 14 | u32 tmp; |
| 15 | |
| 16 | /* deassert reset */ |
| 17 | tmp = readl(SC_RSTCTRL7); |
| 18 | tmp |= SC_RSTCTRL7_UMC31 | SC_RSTCTRL7_UMC30; |
| 19 | writel(tmp, SC_RSTCTRL7); |
| 20 | |
| 21 | /* provide clocks */ |
| 22 | tmp = readl(SC_CLKCTRL7); |
| 23 | tmp |= SC_CLKCTRL7_UMC31 | SC_CLKCTRL7_UMC30; |
| 24 | writel(tmp, SC_CLKCTRL7); |
| 25 | } |