]> git.sur5r.net Git - u-boot/blobdiff - arch/arm/mach-aspeed/ast2500/sdram_ast2500.c
regmap: change regmap_init_mem() to take ofnode instead udevice
[u-boot] / arch / arm / mach-aspeed / ast2500 / sdram_ast2500.c
index efcf452b1788758f0b95283dab7970432dbf2c9c..9498cbc92d7d5b75d18bd52000864f61b83f84b9 100644 (file)
@@ -1,9 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright (C) 2012-2020  ASPEED Technology Inc.
  *
  * Copyright 2016 Google, Inc
- *
- * SPDX-License-Identifier:            GPL-2.0
  */
 
 #include <common.h>
@@ -183,9 +182,8 @@ static int ast2500_sdrammc_ddr4_calibrate_vref(struct dram_info *info)
 static size_t ast2500_sdrammc_get_vga_mem_size(struct dram_info *info)
 {
        size_t vga_mem_size_base = 8 * 1024 * 1024;
-       u32 vga_hwconf = (readl(&info->scu->hwstrap)
-                         >> SCU_HWSTRAP_VGAMEM_SHIFT)
-                       & SCU_HWSTRAP_VGAMEM_MASK;
+       u32 vga_hwconf = (readl(&info->scu->hwstrap) & SCU_HWSTRAP_VGAMEM_MASK)
+           >> SCU_HWSTRAP_VGAMEM_SHIFT;
 
        return vga_mem_size_base << vga_hwconf;
 }
@@ -393,7 +391,7 @@ static int ast2500_sdrammc_ofdata_to_platdata(struct udevice *dev)
        struct regmap *map;
        int ret;
 
-       ret = regmap_init_mem(dev, &map);
+       ret = regmap_init_mem(dev_ofnode(dev), &map);
        if (ret)
                return ret;