blob: 92a07338a81ec54f5d6165a872d46d4f0236057a [file] [log] [blame]
Masahiro Yamada667dbcd2016-05-24 21:14:01 +09001/*
2 * Copyright (C) 2016 Socionext Inc.
3 *
4 * SPDX-License-Identifier: GPL-2.0+
5 */
6
7#include <common.h>
8#include <linux/bitops.h>
9#include <linux/io.h>
10
11#include "../init.h"
12#include "../sg-regs.h"
13
14void uniphier_ld11_clk_init(void)
15{
16 if (readl(SG_PINMON0) & BIT(27)) {
17 /* if booted without stand-by MPU */
18
19 writel(1, SG_ETPHYPSHUT);
20 writel(1, SG_ETPHYCNT);
21
22 udelay(1); /* wait for regulator level 1.1V -> 2.5V */
23
24 writel(3, SG_ETPHYCNT);
25 writel(3, SG_ETPHYPSHUT);
26 writel(7, SG_ETPHYCNT);
27 }
28}