blob: a0162e1cc852fc08738be94e1afe275ff1c1ea11 [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001// SPDX-License-Identifier: GPL-2.0+
Masahiro Yamada6f11cde2017-01-15 14:59:05 +09002/*
3 * Copyright (C) 2016-2017 Socionext Inc.
Masahiro Yamada6f11cde2017-01-15 14:59:05 +09004 */
5
Masahiro Yamada6f11cde2017-01-15 14:59:05 +09006#include <spl.h>
7#include <linux/io.h>
8
9#include "../init.h"
10#include "sbc-regs.h"
11
12void uniphier_ld11_sbc_init(void)
13{
Masahiro Yamadaf4716dc2019-07-10 20:07:37 +090014 if (!uniphier_sbc_is_enabled())
15 return;
16
Masahiro Yamada6f11cde2017-01-15 14:59:05 +090017 uniphier_sbc_init_savepin();
18
19 /* necessary for ROM boot ?? */
20 /* system bus output enable */
21 writel(0x17, PC0CTRL);
22
23 /* pins for NAND and System Bus are multiplexed */
24 if (spl_boot_device() != BOOT_DEVICE_NAND)
Masahiro Yamada6c086d02017-11-25 00:25:35 +090025 uniphier_pin_init("system-bus");
Masahiro Yamada6f11cde2017-01-15 14:59:05 +090026}