summaryrefslogtreecommitdiff
path: root/drivers/ram/rockchip/sdram_rk3188.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ram/rockchip/sdram_rk3188.c')
-rw-r--r--drivers/ram/rockchip/sdram_rk3188.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/ram/rockchip/sdram_rk3188.c b/drivers/ram/rockchip/sdram_rk3188.c
index 25ae69e9ac..d9ed8adfcf 100644
--- a/drivers/ram/rockchip/sdram_rk3188.c
+++ b/drivers/ram/rockchip/sdram_rk3188.c
@@ -816,10 +816,12 @@ static int setup_sdram(struct udevice *dev)
static int rk3188_dmc_of_to_plat(struct udevice *dev)
{
-#if !CONFIG_IS_ENABLED(OF_PLATDATA)
struct rk3188_sdram_params *params = dev_get_plat(dev);
int ret;
+ if (!CONFIG_IS_ENABLED(OF_REAL))
+ return 0;
+
/* rk3188 supports only one-channel */
params->num_channels = 1;
ret = dev_read_u32_array(dev, "rockchip,pctl-timing",
@@ -846,7 +848,6 @@ static int rk3188_dmc_of_to_plat(struct udevice *dev)
ret = regmap_init_mem(dev_ofnode(dev), &params->map);
if (ret)
return ret;
-#endif
return 0;
}