Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
Masahiro Yamada | ddb1900 | 2017-01-15 14:59:03 +0900 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (C) 2011-2014 Panasonic Corporation |
| 4 | * Copyright (C) 2015-2017 Socionext Inc. |
Masahiro Yamada | ddb1900 | 2017-01-15 14:59:03 +0900 | [diff] [blame] | 5 | */ |
| 6 | |
Masahiro Yamada | ddb1900 | 2017-01-15 14:59:03 +0900 | [diff] [blame] | 7 | #include <spl.h> |
| 8 | #include <linux/io.h> |
| 9 | |
| 10 | #include "../init.h" |
| 11 | #include "../sc-regs.h" |
| 12 | |
Masahiro Yamada | d3c1461 | 2017-08-13 09:01:13 +0900 | [diff] [blame] | 13 | void uniphier_ld4_early_clk_init(void) |
Masahiro Yamada | ddb1900 | 2017-01-15 14:59:03 +0900 | [diff] [blame] | 14 | { |
| 15 | u32 tmp; |
| 16 | |
Masahiro Yamada | ddb1900 | 2017-01-15 14:59:03 +0900 | [diff] [blame] | 17 | /* provide clocks */ |
Masahiro Yamada | c84024c | 2019-07-10 20:07:41 +0900 | [diff] [blame] | 18 | tmp = readl(sc_base + SC_CLKCTRL); |
Masahiro Yamada | ddb1900 | 2017-01-15 14:59:03 +0900 | [diff] [blame] | 19 | tmp |= SC_CLKCTRL_CEN_SBC | SC_CLKCTRL_CEN_PERI; |
Masahiro Yamada | c84024c | 2019-07-10 20:07:41 +0900 | [diff] [blame] | 20 | writel(tmp, sc_base + SC_CLKCTRL); |
| 21 | readl(sc_base + SC_CLKCTRL); /* dummy read */ |
Masahiro Yamada | ddb1900 | 2017-01-15 14:59:03 +0900 | [diff] [blame] | 22 | } |