Message ID | 20241120094939.129-1-paul.barker.ct@bp.renesas.com |
---|---|
State | New |
Delegated to: | Marek Vasut |
Headers | show |
Series | [v2] net: ravb: Simplify max-speed handling in ravb_of_to_plat | expand |
On 11/20/24 10:49 AM, Paul Barker wrote: > We can call dev_read_u32_default() instead of calling fdt_getprop() then > fdt32_to_cpu(). > > Signed-off-by: Paul Barker <paul.barker.ct@bp.renesas.com> > Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Applied to sh/master, thanks.
On 12/1/24 7:48 PM, Marek Vasut wrote: > On 11/20/24 10:49 AM, Paul Barker wrote: >> We can call dev_read_u32_default() instead of calling fdt_getprop() then >> fdt32_to_cpu(). >> >> Signed-off-by: Paul Barker <paul.barker.ct@bp.renesas.com> >> Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org> > Applied to sh/master, thanks. I think this one triggers some build failure -- https://source.denx.de/u-boot/custodians/u-boot-sh/-/pipelines/23670 -- https://source.denx.de/u-boot/custodians/u-boot-sh/-/jobs/965285 on these boards: rzg2_beacon hihope_rzg2 r8a77995_draak r8a77970_eagle r8a77990_ebisu r8a779a0_falcon r8a779h0_grayhawk rcar3_salvator-x rcar3_ulcb r8a77970_v3msk r8a779g0_whitehawk silinux_ek874 You need to drop the *cell variable. I've fixed that up and retriggered a build, I hope that's OK?
Hi Marek, On 01/12/2024 21:08, Marek Vasut wrote: > On 12/1/24 7:48 PM, Marek Vasut wrote: >> On 11/20/24 10:49 AM, Paul Barker wrote: >>> We can call dev_read_u32_default() instead of calling fdt_getprop() then >>> fdt32_to_cpu(). >>> >>> Signed-off-by: Paul Barker <paul.barker.ct@bp.renesas.com> >>> Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org> >> Applied to sh/master, thanks. > > I think this one triggers some build failure -- > https://source.denx.de/u-boot/custodians/u-boot-sh/-/pipelines/23670 -- > https://source.denx.de/u-boot/custodians/u-boot-sh/-/jobs/965285 on > these boards: > > rzg2_beacon hihope_rzg2 r8a77995_draak r8a77970_eagle r8a77990_ebisu > r8a779a0_falcon r8a779h0_grayhawk rcar3_salvator-x rcar3_ulcb > r8a77970_v3msk r8a779g0_whitehawk silinux_ek874 > > You need to drop the *cell variable. I've fixed that up and retriggered > a build, I hope that's OK? Apologies, I missed that cell was still defined but now unused. Thanks for fixing it up.
diff --git a/drivers/net/ravb.c b/drivers/net/ravb.c index f1401d2f6ed2..6393c3a7c3fe 100644 --- a/drivers/net/ravb.c +++ b/drivers/net/ravb.c @@ -657,10 +657,7 @@ int ravb_of_to_plat(struct udevice *dev) if (pdata->phy_interface == PHY_INTERFACE_MODE_NA) return -EINVAL; - pdata->max_speed = 1000; - cell = fdt_getprop(gd->fdt_blob, dev_of_offset(dev), "max-speed", NULL); - if (cell) - pdata->max_speed = fdt32_to_cpu(*cell); + pdata->max_speed = dev_read_u32_default(dev, "max-speed", 1000); sprintf(bb_miiphy_buses[0].name, dev->name);