2015-02-27 02:26:51 +09:00
|
|
|
/*
|
2017-01-15 14:59:03 +09:00
|
|
|
* Copyright (C) 2011-2014 Panasonic Corporation
|
|
|
|
* Copyright (C) 2015-2017 Socionext Inc.
|
2015-02-27 02:26:51 +09:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: GPL-2.0+
|
|
|
|
*/
|
|
|
|
|
2015-02-27 02:26:52 +09:00
|
|
|
#include <common.h>
|
|
|
|
#include <spl.h>
|
2015-05-29 17:30:00 +09:00
|
|
|
#include <linux/io.h>
|
2016-01-09 01:51:13 +09:00
|
|
|
|
|
|
|
#include "../init.h"
|
|
|
|
#include "../sc-regs.h"
|
2015-02-27 02:26:51 +09:00
|
|
|
|
2017-01-15 14:59:03 +09:00
|
|
|
void uniphier_sld3_dram_clk_init(void)
|
2015-02-27 02:26:51 +09:00
|
|
|
{
|
|
|
|
u32 tmp;
|
|
|
|
|
|
|
|
/* deassert reset */
|
|
|
|
tmp = readl(SC_RSTCTRL);
|
|
|
|
tmp |= SC_RSTCTRL_NRST_UMC1 | SC_RSTCTRL_NRST_UMC0;
|
|
|
|
writel(tmp, SC_RSTCTRL);
|
|
|
|
readl(SC_RSTCTRL); /* dummy read */
|
|
|
|
|
2016-03-30 20:17:42 +09:00
|
|
|
/* provide clocks */
|
2015-02-27 02:26:51 +09:00
|
|
|
tmp = readl(SC_CLKCTRL);
|
2017-01-15 14:59:03 +09:00
|
|
|
tmp |= SC_CLKCTRL_CEN_UMC;
|
2015-02-27 02:26:51 +09:00
|
|
|
writel(tmp, SC_CLKCTRL);
|
|
|
|
readl(SC_CLKCTRL); /* dummy read */
|
|
|
|
}
|