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