Tom Rini | 83d290c | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
jk.kernel@gmail.com | dd63fbc | 2016-07-26 18:28:30 +0800 | [diff] [blame] | 2 | /* |
| 3 | * (C) Copyright 2016 Rockchip Electronics Co., Ltd |
jk.kernel@gmail.com | dd63fbc | 2016-07-26 18:28:30 +0800 | [diff] [blame] | 4 | */ |
| 5 | |
| 6 | #include <common.h> |
| 7 | #include <spl.h> |
Kever Yang | da20981 | 2016-11-24 15:29:50 +0800 | [diff] [blame] | 8 | #include <asm/gpio.h> |
jk.kernel@gmail.com | dd63fbc | 2016-07-26 18:28:30 +0800 | [diff] [blame] | 9 | |
| 10 | void board_boot_order(u32 *spl_boot_list) |
| 11 | { |
| 12 | /* eMMC prior to sdcard */ |
| 13 | spl_boot_list[0] = BOOT_DEVICE_MMC2; |
| 14 | spl_boot_list[1] = BOOT_DEVICE_MMC1; |
| 15 | } |
Kever Yang | da20981 | 2016-11-24 15:29:50 +0800 | [diff] [blame] | 16 | |
| 17 | #define GPIO7A3_HUB_RST 227 |
| 18 | |
| 19 | int rk_board_late_init(void) |
| 20 | { |
| 21 | int ret; |
| 22 | |
| 23 | ret = gpio_request(GPIO7A3_HUB_RST, "hub_rst"); |
| 24 | if (ret) |
| 25 | return ret; |
| 26 | ret = gpio_direction_output(GPIO7A3_HUB_RST, 1); |
| 27 | if (ret) |
| 28 | return ret; |
| 29 | |
| 30 | return 0; |
| 31 | } |