]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
rockchip: rk322x: update the sysreg number for boot mode
authorKever Yang <kever.yang@rock-chips.com>
Tue, 22 Aug 2017 07:34:58 +0000 (15:34 +0800)
committerPhilipp Tomsich <philipp.tomsich@theobroma-systems.com>
Sat, 30 Sep 2017 22:33:34 +0000 (00:33 +0200)
The boot mode for rk322x is stored in sysreg 0, update it.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
arch/arm/mach-rockchip/rk322x-board.c

index dcd8cf805fe51aa2a1d2fa25aefdb6a3e37a758b..d44311457a4194dc0f99c635cac730ae19ac0e33 100644 (file)
@@ -21,12 +21,12 @@ DECLARE_GLOBAL_DATA_PTR;
 static void setup_boot_mode(void)
 {
        struct rk322x_grf *const grf = (void *)GRF_BASE;
-       int boot_mode = readl(&grf->os_reg[4]);
+       int boot_mode = readl(&grf->os_reg[0]);
 
        debug("boot mode %x.\n", boot_mode);
 
        /* Clear boot mode */
-       writel(BOOT_NORMAL, &grf->os_reg[4]);
+       writel(BOOT_NORMAL, &grf->os_reg[0]);
 
        switch (boot_mode) {
        case BOOT_FASTBOOT: