summaryrefslogtreecommitdiff
path: root/arch/arm/mach-uniphier/clk/clk-ld11.c
blob: 92a07338a81ec54f5d6165a872d46d4f0236057a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/*
 * Copyright (C) 2016 Socionext Inc.
 *
 * SPDX-License-Identifier:	GPL-2.0+
 */

#include <common.h>
#include <linux/bitops.h>
#include <linux/io.h>

#include "../init.h"
#include "../sg-regs.h"

void uniphier_ld11_clk_init(void)
{
	if (readl(SG_PINMON0) & BIT(27)) {
		/* if booted without stand-by MPU */

		writel(1, SG_ETPHYPSHUT);
		writel(1, SG_ETPHYCNT);

		udelay(1); /* wait for regulator level 1.1V -> 2.5V */

		writel(3, SG_ETPHYCNT);
		writel(3, SG_ETPHYPSHUT);
		writel(7, SG_ETPHYCNT);
	}
}