Merge tag 'u-boot-atmel-fixes-2020.07-a' of https://gitlab.denx.de/u-boot/custodians...
[oweals/u-boot.git] / arch / arm / mach-uniphier / sbc / sbc-ld11.c
1 // SPDX-License-Identifier: GPL-2.0+
2 /*
3  * Copyright (C) 2016-2017 Socionext Inc.
4  */
5
6 #include <spl.h>
7 #include <linux/io.h>
8
9 #include "../init.h"
10 #include "sbc-regs.h"
11
12 void uniphier_ld11_sbc_init(void)
13 {
14         if (!uniphier_sbc_is_enabled())
15                 return;
16
17         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)
25                 uniphier_pin_init("system-bus");
26 }