blob: 21972ac9494bc462780a34955935b8919e7f06c8 [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
6#include <common.h>
7#include <spl.h>
8#include <linux/io.h>
9
10#include "../init.h"
11#include "sbc-regs.h"
12
13void uniphier_ld11_sbc_init(void)
14{
Masahiro Yamadaf4716dc2019-07-10 20:07:37 +090015 if (!uniphier_sbc_is_enabled())
16 return;
17
Masahiro Yamada6f11cde2017-01-15 14:59:05 +090018 uniphier_sbc_init_savepin();
19
20 /* necessary for ROM boot ?? */
21 /* system bus output enable */
22 writel(0x17, PC0CTRL);
23
24 /* pins for NAND and System Bus are multiplexed */
25 if (spl_boot_device() != BOOT_DEVICE_NAND)
Masahiro Yamada6c086d02017-11-25 00:25:35 +090026 uniphier_pin_init("system-bus");
Masahiro Yamada6f11cde2017-01-15 14:59:05 +090027}