Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
Masahiro Yamada | 6f11cde | 2017-01-15 14:59:05 +0900 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (C) 2016-2017 Socionext Inc. |
Masahiro Yamada | 6f11cde | 2017-01-15 14:59:05 +0900 | [diff] [blame] | 4 | */ |
| 5 | |
Masahiro Yamada | 6f11cde | 2017-01-15 14:59:05 +0900 | [diff] [blame] | 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 | { |
Masahiro Yamada | f4716dc | 2019-07-10 20:07:37 +0900 | [diff] [blame] | 14 | if (!uniphier_sbc_is_enabled()) |
| 15 | return; |
| 16 | |
Masahiro Yamada | 6f11cde | 2017-01-15 14:59:05 +0900 | [diff] [blame] | 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) |
Masahiro Yamada | 6c086d0 | 2017-11-25 00:25:35 +0900 | [diff] [blame] | 25 | uniphier_pin_init("system-bus"); |
Masahiro Yamada | 6f11cde | 2017-01-15 14:59:05 +0900 | [diff] [blame] | 26 | } |