Skip to contentSkip to conversation

ihs_mdio: Use new regmap interface

PATCH New Mario Six 2 participants 3 messages Jan 28, 2019 – Mar 29, 2019

lore
Share & tools
lore

Mario Six

author
#0 lore raw

PATCH 1/1 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).

---
 board/gdsys/common/ihs_mdio.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
board/gdsys/common/ihs_mdio.c +3 -2
index b17e8db91bf..f160a57cc2d 100644
@@ -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);
Signature · 1 line
2.20.1
author
#2 lore raw

PATCH 1/1 ihs_mdio: Use new regmap interface

Quoted 6 lines · Simon Glass
Quoted 4 lines · Mario Six

For the DM case, use the proper parameter for the regmap_init_mem call (which is the ofnode, not the udevice).

Quoted 6 lines
Quoted 4 lines
---
 board/gdsys/common/ihs_mdio.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Applied to u-boot-mpc83xx/next.