2 * Copyright (C) 2011-2015 Panasonic Corporation
3 * Author: Masahiro Yamada <yamada.m@jp.panasonic.com>
5 * SPDX-License-Identifier: GPL-2.0+
11 #include <mach/sc-regs.h>
13 void early_clkrst_init(void)
18 tmp = readl(SC_RSTCTRL);
20 tmp |= SC_RSTCTRL_NRST_UMC1 | SC_RSTCTRL_NRST_UMC0;
21 if (spl_boot_device() != BOOT_DEVICE_NAND)
22 tmp &= ~SC_RSTCTRL_NRST_NAND;
23 writel(tmp, SC_RSTCTRL);
24 readl(SC_RSTCTRL); /* dummy read */
27 tmp = readl(SC_CLKCTRL);
28 tmp |= SC_CLKCTRL_CEN_UMC | SC_CLKCTRL_CEN_SBC | SC_CLKCTRL_CEN_PERI;
29 writel(tmp, SC_CLKCTRL);
30 readl(SC_CLKCTRL); /* dummy read */