[U-Boot] [PATCH] ihs_mdio: Use new regmap interface

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 --- board/gdsys/common/ihs_mdio.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/board/gdsys/common/ihs_mdio.c b/board/gdsys/common/ihs_mdio.c index b17e8db91bf..f160a57cc2d 100644 --- a/board/gdsys/common/ihs_mdio.c +++ b/board/gdsys/common/ihs_mdio.c @@ -11,6 +11,7 @@ #include <gdsys_fpga.h> #else #include <fdtdec.h> +#include <dm.h> #include <regmap.h> #endif
@@ -28,7 +29,7 @@ static inline u16 read_reg(struct udevice *fpga, uint base, uint addr) 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)); @@ -40,7 +41,7 @@ static inline void write_reg(struct udevice *fpga, uint base, uint 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);

On Mon, 28 Jan 2019 at 01:49, Mario Six mario.six@gdsys.cc wrote:
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
board/gdsys/common/ihs_mdio.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
Reviewed-by: Simon Glass sjg@chromium.org

On Thu, Jan 31, 2019 at 11:04 AM Simon Glass sjg@chromium.org wrote:
On Mon, 28 Jan 2019 at 01:49, Mario Six mario.six@gdsys.cc wrote:
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
board/gdsys/common/ihs_mdio.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
Reviewed-by: Simon Glass sjg@chromium.org
Applied to u-boot-mpc83xx/next.
participants (2)
-
Mario Six
-
Simon Glass