For the DM case, use the proper parameter for the regmap_init_mem call
(which is the ofnode, not the udevice).
Signed-off-by: Mario Six <mario.six@gdsys.cc>
Reviewed-by: Simon Glass <sjg@chromium.org>
#include <gdsys_fpga.h>
#else
#include <fdtdec.h>
+#include <dm.h>
#include <regmap.h>
#endif
struct regmap *map;
u8 *ptr;
- regmap_init_mem(fpga, &map);
+ regmap_init_mem(dev_ofnode(fpga), &map);
ptr = regmap_get_range(map, 0);
return in_le16((u16 *)(ptr + base + addr));
struct regmap *map;
u8 *ptr;
- regmap_init_mem(fpga, &map);
+ regmap_init_mem(dev_ofnode(fpga), &map);
ptr = regmap_get_range(map, 0);
out_le16((u16 *)(ptr + base + addr), val);