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