]> git.sur5r.net Git - u-boot/blobdiff - drivers/ram/rockchip/sdram_rk3188.c
regmap: change regmap_init_mem() to take ofnode instead udevice
[u-boot] / drivers / ram / rockchip / sdram_rk3188.c
index 365d00ef542440796f65b38bde0ab7360d37170e..3774abfa98a1cb0a006b6f119fd9b7091929876e 100644 (file)
@@ -1,9 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * (C) Copyright 2015 Google, Inc
  * Copyright 2014 Rockchip Inc.
  *
- * SPDX-License-Identifier:     GPL-2.0
- *
  * Adapted from the very similar rk3288 ddr init.
  */
 
@@ -25,8 +24,6 @@
 #include <asm/arch/sdram_common.h>
 #include <linux/err.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 struct chan_info {
        struct rk3288_ddr_pctl *pctl;
        struct rk3288_ddr_publ *publ;
@@ -842,7 +839,7 @@ static int rk3188_dmc_ofdata_to_platdata(struct udevice *dev)
                printf("%s: Cannot read rockchip,sdram-params\n", __func__);
                return -EINVAL;
        }
-       ret = regmap_init_mem(dev, &params->map);
+       ret = regmap_init_mem(dev_ofnode(dev), &params->map);
        if (ret)
                return ret;
 #endif