Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
Masahiro Yamada | 8e0a450 | 2017-05-15 14:26:33 +0900 | [diff] [blame] | 2 | /* |
3 | * Copyright (C) 2017 Socionext Inc. | ||||
Masahiro Yamada | 8e0a450 | 2017-05-15 14:26:33 +0900 | [diff] [blame] | 4 | */ |
5 | |||||
Masahiro Yamada | 6ffe71a | 2017-09-15 21:43:22 +0900 | [diff] [blame] | 6 | #include <linux/bitops.h> |
Masahiro Yamada | 8e0a450 | 2017-05-15 14:26:33 +0900 | [diff] [blame] | 7 | #include <linux/io.h> |
8 | |||||
9 | #include "../init.h" | ||||
Masahiro Yamada | 6ffe71a | 2017-09-15 21:43:22 +0900 | [diff] [blame] | 10 | #include "../sc64-regs.h" |
Masahiro Yamada | 8e0a450 | 2017-05-15 14:26:33 +0900 | [diff] [blame] | 11 | |
12 | #define SDCTRL_EMMC_HW_RESET 0x59810280 | ||||
13 | |||||
14 | void uniphier_pxs3_clk_init(void) | ||||
15 | { | ||||
Masahiro Yamada | 6ffe71a | 2017-09-15 21:43:22 +0900 | [diff] [blame] | 16 | u32 tmp; |
17 | |||||
Masahiro Yamada | c84024c | 2019-07-10 20:07:41 +0900 | [diff] [blame] | 18 | tmp = readl(sc_base + SC_RSTCTRL6); |
Masahiro Yamada | 6ffe71a | 2017-09-15 21:43:22 +0900 | [diff] [blame] | 19 | tmp |= BIT(8); /* Mali */ |
Masahiro Yamada | c84024c | 2019-07-10 20:07:41 +0900 | [diff] [blame] | 20 | writel(tmp, sc_base + SC_RSTCTRL6); |
Masahiro Yamada | 6ffe71a | 2017-09-15 21:43:22 +0900 | [diff] [blame] | 21 | |
Masahiro Yamada | c84024c | 2019-07-10 20:07:41 +0900 | [diff] [blame] | 22 | tmp = readl(sc_base + SC_CLKCTRL6); |
Masahiro Yamada | 6ffe71a | 2017-09-15 21:43:22 +0900 | [diff] [blame] | 23 | tmp |= BIT(8); /* Mali */ |
Masahiro Yamada | c84024c | 2019-07-10 20:07:41 +0900 | [diff] [blame] | 24 | writel(tmp, sc_base + SC_CLKCTRL6); |
Masahiro Yamada | 6ffe71a | 2017-09-15 21:43:22 +0900 | [diff] [blame] | 25 | |
Masahiro Yamada | 8e0a450 | 2017-05-15 14:26:33 +0900 | [diff] [blame] | 26 | /* TODO: use "mmc-pwrseq-emmc" */ |
27 | writel(1, SDCTRL_EMMC_HW_RESET); | ||||
28 | } |