On Sun Feb 1, 2026 at 7:18 PM CET, Marek Vasut wrote: > On 1/30/26 5:28 PM, Markus Schneider-Pargmann (TI.com) wrote: >> For the upstream DT the ctrl_mod node is using a relative register >> address which is not translated by the current code. >> >> Make address parsing understand relative addresses. >> >> Reviewed-by: Mattijs Korpershoek <[email protected]> >> Signed-off-by: Markus Schneider-Pargmann (TI.com) <[email protected]> >> --- >> drivers/usb/musb-new/ti-musb.c | 10 +++++----- >> 1 file changed, 5 insertions(+), 5 deletions(-) >> >> diff --git a/drivers/usb/musb-new/ti-musb.c b/drivers/usb/musb-new/ti-musb.c >> index >> bcd31adba522fc55190fc43fd2dbd2dec93a2731..75dc2dc18748e33785c7312a24145544b659579d >> 100644 >> --- a/drivers/usb/musb-new/ti-musb.c >> +++ b/drivers/usb/musb-new/ti-musb.c >> @@ -83,17 +83,17 @@ static int ti_musb_of_to_plat(struct udevice *dev) >> struct ti_musb_plat *plat = dev_get_plat(dev); >> const void *fdt = gd->fdt_blob; >> int node = dev_of_offset(dev); >> - int phys; >> - int ctrl_mod; >> + ofnode phys_node; >> + ofnode ctrl_mod_node; >> int usb_index; >> int ret; >> struct musb_hdrc_config *musb_config; >> >> plat->base = devfdt_get_addr_index_ptr(dev, 1); >> >> - phys = fdtdec_lookup_phandle(fdt, node, "phys"); >> - ctrl_mod = fdtdec_lookup_phandle(fdt, phys, "ti,ctrl_mod"); >> - plat->ctrl_mod_base = (void *)fdtdec_get_addr(fdt, ctrl_mod, "reg"); >> + phys_node = ofnode_get_by_phandle(dev_read_u32_default(dev, "phys", 0)); >> + ctrl_mod_node = >> ofnode_get_by_phandle(ofnode_read_u32_default(phys_node, "ti,ctrl_mod", 0)); >> + plat->ctrl_mod_base = (void *)ofnode_get_addr(ctrl_mod_node); > Is the cast to void * necessary , and if yes, can it be removed ?
Yes it is necessary, ctrl_mod_base is a void pointer. It is used in clrsetbits_le32(). If I resolved that macro correctly that expects a pointer as well. Other drivers seem to use the void pointer as well. Best Markus
signature.asc
Description: PGP signature

