[U-Boot] [PATCH v1 06/19] phy: marvell: a3700: Use reg_set_indirect istead of 2 reg_sets
Stefan Roese
sr at denx.de
Wed Mar 21 08:51:33 UTC 2018
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.behun at 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 <sr at denx.de>
Thanks,
Stefan
More information about the U-Boot
mailing list