Skip to content

Commit 29d63a5

Browse files
committed
ARM: uniphier: add clock/reset settings for xHCI of ProXstream2
Deassert resets and enable clock signals of xHCI blocks if the corresponding CONFIG is enabled. Signed-off-by: Masahiro Yamada <[email protected]>
1 parent be44a46 commit 29d63a5

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

arch/arm/mach-uniphier/clk/clk-pxs2.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
* SPDX-License-Identifier: GPL-2.0+
55
*/
66

7+
#include <linux/bitops.h>
78
#include <linux/io.h>
89

910
#include "../init.h"
@@ -32,12 +33,16 @@ void uniphier_pxs2_clk_init(void)
3233
tmp |= SC_RSTCTRL2_NRST_USB3B1;
3334
writel(tmp, SC_RSTCTRL2);
3435
readl(SC_RSTCTRL2); /* dummy read */
36+
37+
tmp = readl(SC_RSTCTRL6);
38+
tmp |= 0x37;
39+
writel(tmp, SC_RSTCTRL6);
3540
#endif
3641

3742
/* provide clocks */
3843
tmp = readl(SC_CLKCTRL);
3944
#ifdef CONFIG_USB_XHCI_UNIPHIER
40-
tmp |= SC_CLKCTRL_CEN_USB31 | SC_CLKCTRL_CEN_USB30 |
45+
tmp |= BIT(20) | BIT(19) | SC_CLKCTRL_CEN_USB31 | SC_CLKCTRL_CEN_USB30 |
4146
SC_CLKCTRL_CEN_GIO;
4247
#endif
4348
#ifdef CONFIG_UNIPHIER_ETH

arch/arm/mach-uniphier/sc-regs.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
/*
22
* UniPhier SC (System Control) block registers
33
*
4-
* Copyright (C) 2011-2015 Masahiro Yamada <[email protected]>
4+
* Copyright (C) 2011-2015 Panasonic Corporation
5+
* Copyright (C) 2015-2016 Socionext Inc.
6+
* Author: Masahiro Yamada <[email protected]>
57
*
68
* SPDX-License-Identifier: GPL-2.0+
79
*/
@@ -68,6 +70,10 @@
6870
#define SC_RSTCTRL4_NRST_UMC31 (0x1 << 5) /* UMC ch1 */
6971
#define SC_RSTCTRL4_NRST_UMC30 (0x1 << 4) /* UMC ch0 */
7072

73+
#define SC_RSTCTRL5 (SC_BASE_ADDR | 0x2010)
74+
75+
#define SC_RSTCTRL6 (SC_BASE_ADDR | 0x2014)
76+
7177
#define SC_CLKCTRL (SC_BASE_ADDR | 0x2104)
7278
#define SC_CLKCTRL_CEN_USB31 (0x1 << 17) /* USB3 #1 */
7379
#define SC_CLKCTRL_CEN_USB30 (0x1 << 16) /* USB3 #0 */

0 commit comments

Comments
 (0)