diff --git a/arch/arm/mach-rockchip/rk3399-board-spl.c b/arch/arm/mach-rockchip/rk3399-board-spl.c
index 3eea73ef33..a439e09b61 100644
--- a/arch/arm/mach-rockchip/rk3399-board-spl.c
+++ b/arch/arm/mach-rockchip/rk3399-board-spl.c
@@ -198,11 +198,13 @@ void board_init_f(ulong dummy)
 		return;
 	}
 
+#if !defined(SUPPORT_TPL)
 	ret = uclass_get_device(UCLASS_RAM, 0, &dev);
 	if (ret) {
 		pr_err("DRAM init failed: %d\n", ret);
 		return;
 	}
+#endif
 }
 
 #if defined(SPL_GPIO_SUPPORT)
