diff options
author | Jacob Chen <jacob2.chen@rock-chips.com> | 2016-09-19 18:46:28 +0800 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2016-10-01 18:36:55 -0600 |
commit | 67171e13a3e0665b18c657a6704a22ca7900f4c3 (patch) | |
tree | 0924777d9ee7054c55114050d32e06a033814291 /board/rockchip | |
parent | f48f2b729bf891aa6c1f752d5f8e06e44dd8b0b4 (diff) | |
download | u-boot-imx-67171e13a3e0665b18c657a6704a22ca7900f4c3.zip u-boot-imx-67171e13a3e0665b18c657a6704a22ca7900f4c3.tar.gz u-boot-imx-67171e13a3e0665b18c657a6704a22ca7900f4c3.tar.bz2 |
rockchip: add boot-mode support for rk3288, rk3036
rockchip platform have a protocol to pass the the kernel reboot mode to bootloader
by some special registers when system reboot. In bootloader we should read it and take action.
We can only setup boot_mode in board_late_init becasue "setenv" need env setuped.
So add CONFIG_BOARD_LATE_INIT to common header and use a entry "rk_board_late_init"
to replace "board_late_init" in board file.
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
Acked-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'board/rockchip')
-rw-r--r-- | board/rockchip/kylin_rk3036/kylin_rk3036.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/board/rockchip/kylin_rk3036/kylin_rk3036.c b/board/rockchip/kylin_rk3036/kylin_rk3036.c index 848f23d..7e2edf4 100644 --- a/board/rockchip/kylin_rk3036/kylin_rk3036.c +++ b/board/rockchip/kylin_rk3036/kylin_rk3036.c @@ -8,14 +8,11 @@ #include <dm.h> #include <asm/io.h> #include <asm/arch/uart.h> -#include <asm/arch-rockchip/grf_rk3036.h> #include <asm/arch/sdram_rk3036.h> #include <asm/gpio.h> DECLARE_GLOBAL_DATA_PTR; -#define GRF_BASE 0x20008000 - void get_ddr_config(struct rk3036_ddr_config *config) { /* K4B4G1646Q config */ @@ -43,16 +40,9 @@ int fastboot_key_pressed(void) #define ROCKCHIP_BOOT_MODE_FASTBOOT 0x5242C309 -int board_late_init(void) +int rk_board_late_init(void) { - struct rk3036_grf * const grf = (void *)GRF_BASE; - int boot_mode = readl(&grf->os_reg[4]); - - /* Clear boot mode */ - writel(0, &grf->os_reg[4]); - - if (boot_mode == ROCKCHIP_BOOT_MODE_FASTBOOT || - fastboot_key_pressed()) { + if (fastboot_key_pressed()) { printf("enter fastboot!\n"); setenv("preboot", "setenv preboot; fastboot usb0"); } |