On 07.03.2018 22:52, Marek Behún wrote:
Create a special function for indirect register setting,
reg_set_indirect, and use it instead of the two calls to reg_set.

Signed-off-by: Marek Behun <marek.be...@nic.cz>
---
  drivers/phy/marvell/comphy_a3700.c | 32 ++++++++++++++++++++------------
  1 file changed, 20 insertions(+), 12 deletions(-)

diff --git a/drivers/phy/marvell/comphy_a3700.c 
b/drivers/phy/marvell/comphy_a3700.c
index 734d4e55b1..81d24a5b61 100644
--- a/drivers/phy/marvell/comphy_a3700.c
+++ b/drivers/phy/marvell/comphy_a3700.c
@@ -224,6 +224,17 @@ static int comphy_pcie_power_up(u32 speed, u32 invert)
        return ret;
  }
+/*
+ * reg_set_indirect
+ *
+ * return: void
+ */
+static inline void reg_set_indirect(u32 reg, u16 data, u16 mask)
+{
+       reg_set(rh_vsreg_addr, reg, 0xFFFFFFFF);
+       reg_set(rh_vsreg_data, data, mask);
+}
+

Please remove "inline" here and let the compiler handle the
optimization instead.

Otherwise:

Reviewed-by: Stefan Roese <s...@denx.de>

Thanks,
Stefan
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot

Reply via email to