Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
Heiko Stübner | 0b3c26a | 2017-02-18 19:46:38 +0100 | [diff] [blame] | 2 | /* |
3 | * (C) Copyright 2015 Google, Inc | ||||
Heiko Stübner | 0b3c26a | 2017-02-18 19:46:38 +0100 | [diff] [blame] | 4 | */ |
5 | |||||
6 | #include <common.h> | ||||
7 | #include <clk.h> | ||||
8 | #include <dm.h> | ||||
9 | #include <ram.h> | ||||
Simon Glass | f473eba | 2019-01-21 14:53:31 -0700 | [diff] [blame] | 10 | #include <asm/gpio.h> |
Heiko Stübner | 0b3c26a | 2017-02-18 19:46:38 +0100 | [diff] [blame] | 11 | #include <asm/io.h> |
Kever Yang | 9fbe17c | 2019-03-28 11:01:23 +0800 | [diff] [blame] | 12 | #include <asm/arch-rockchip/periph.h> |
Kever Yang | 9fbe17c | 2019-03-28 11:01:23 +0800 | [diff] [blame] | 13 | #include <asm/arch-rockchip/boot_mode.h> |
Heiko Stübner | 0b3c26a | 2017-02-18 19:46:38 +0100 | [diff] [blame] | 14 | |
Alexander Kochetkov | a546c56 | 2018-02-26 15:37:42 +0300 | [diff] [blame] | 15 | __weak int rk_board_late_init(void) |
16 | { | ||||
17 | return 0; | ||||
18 | } | ||||
19 | |||||
Heiko Stübner | 015f69a | 2017-04-06 00:19:36 +0200 | [diff] [blame] | 20 | int board_late_init(void) |
21 | { | ||||
Andy Yan | 70378cb | 2017-10-11 15:00:16 +0800 | [diff] [blame] | 22 | setup_boot_mode(); |
Heiko Stübner | 015f69a | 2017-04-06 00:19:36 +0200 | [diff] [blame] | 23 | |
Alexander Kochetkov | a546c56 | 2018-02-26 15:37:42 +0300 | [diff] [blame] | 24 | return rk_board_late_init(); |
Heiko Stübner | 015f69a | 2017-04-06 00:19:36 +0200 | [diff] [blame] | 25 | } |
26 | |||||
Heiko Stübner | 0b3c26a | 2017-02-18 19:46:38 +0100 | [diff] [blame] | 27 | int board_init(void) |
28 | { | ||||
Heiko Stübner | 0b3c26a | 2017-02-18 19:46:38 +0100 | [diff] [blame] | 29 | return 0; |
Heiko Stübner | 0b3c26a | 2017-02-18 19:46:38 +0100 | [diff] [blame] | 30 | } |
31 | |||||
Trevor Woerner | 43ec7e0 | 2019-05-03 09:41:00 -0400 | [diff] [blame] | 32 | #if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF) |
Heiko Stübner | 0b3c26a | 2017-02-18 19:46:38 +0100 | [diff] [blame] | 33 | void enable_caches(void) |
34 | { | ||||
35 | /* Enable D-cache. I-cache is already enabled in start.S */ | ||||
36 | dcache_enable(); | ||||
37 | } | ||||
38 | #endif |