Masahiro Yamada | bb2ff9d | 2014-10-03 19:21:06 +0900 | [diff] [blame] | 1 | /* |
Masahiro Yamada | 24ee11f | 2015-02-05 14:42:55 +0900 | [diff] [blame] | 2 | * Copyright (C) 2013-2015 Panasonic Corporation |
Masahiro Yamada | bb2ff9d | 2014-10-03 19:21:06 +0900 | [diff] [blame] | 3 | * Author: Masahiro Yamada <yamada.m@jp.panasonic.com> |
| 4 | * |
| 5 | * SPDX-License-Identifier: GPL-2.0+ |
| 6 | */ |
| 7 | |
| 8 | #include <common.h> |
| 9 | #include <spl.h> |
Masahiro Yamada | 24ee11f | 2015-02-05 14:42:55 +0900 | [diff] [blame] | 10 | #include <linux/compiler.h> |
Masahiro Yamada | 95387e2 | 2015-02-27 02:26:44 +0900 | [diff] [blame] | 11 | #include <mach/led.h> |
| 12 | #include <mach/board.h> |
Masahiro Yamada | 24ee11f | 2015-02-05 14:42:55 +0900 | [diff] [blame] | 13 | |
| 14 | void __weak bcu_init(void) |
| 15 | { |
| 16 | }; |
| 17 | void sbc_init(void); |
| 18 | void sg_init(void); |
| 19 | void pll_init(void); |
| 20 | void pin_init(void); |
Masahiro Yamada | e28001b | 2015-02-27 02:27:04 +0900 | [diff] [blame] | 21 | void memconf_init(void); |
Masahiro Yamada | c04368f | 2015-02-27 02:26:51 +0900 | [diff] [blame] | 22 | void early_clkrst_init(void); |
Masahiro Yamada | 24ee11f | 2015-02-05 14:42:55 +0900 | [diff] [blame] | 23 | int umc_init(void); |
| 24 | void enable_dpll_ssc(void); |
Masahiro Yamada | bb2ff9d | 2014-10-03 19:21:06 +0900 | [diff] [blame] | 25 | |
| 26 | void spl_board_init(void) |
| 27 | { |
Masahiro Yamada | 24ee11f | 2015-02-05 14:42:55 +0900 | [diff] [blame] | 28 | bcu_init(); |
| 29 | |
| 30 | sbc_init(); |
| 31 | |
| 32 | sg_init(); |
| 33 | |
| 34 | uniphier_board_reset(); |
| 35 | |
| 36 | pll_init(); |
| 37 | |
| 38 | uniphier_board_init(); |
| 39 | |
| 40 | led_write(L, 0, , ); |
| 41 | |
Masahiro Yamada | e28001b | 2015-02-27 02:27:04 +0900 | [diff] [blame] | 42 | memconf_init(); |
Masahiro Yamada | 24ee11f | 2015-02-05 14:42:55 +0900 | [diff] [blame] | 43 | |
| 44 | led_write(L, 1, , ); |
| 45 | |
Masahiro Yamada | e28001b | 2015-02-27 02:27:04 +0900 | [diff] [blame] | 46 | early_clkrst_init(); |
| 47 | |
| 48 | led_write(L, 2, , ); |
| 49 | |
Masahiro Yamada | 24ee11f | 2015-02-05 14:42:55 +0900 | [diff] [blame] | 50 | { |
| 51 | int res; |
| 52 | |
| 53 | res = umc_init(); |
| 54 | if (res < 0) { |
| 55 | while (1) |
| 56 | ; |
| 57 | } |
| 58 | } |
Masahiro Yamada | e28001b | 2015-02-27 02:27:04 +0900 | [diff] [blame] | 59 | led_write(L, 3, , ); |
Masahiro Yamada | 24ee11f | 2015-02-05 14:42:55 +0900 | [diff] [blame] | 60 | |
| 61 | enable_dpll_ssc(); |
| 62 | |
Masahiro Yamada | e28001b | 2015-02-27 02:27:04 +0900 | [diff] [blame] | 63 | led_write(L, 4, , ); |
Masahiro Yamada | bb2ff9d | 2014-10-03 19:21:06 +0900 | [diff] [blame] | 64 | } |