On 10/15/20 11:45 AM, Peng Fan wrote: Hi, [...]
>>>>>> Subject: Re: [PATCH 13/13] usb: ehci-mx6: Improve the bind function >>>>>> >>>>>> On 9/16/20 2:57 PM, peng....@nxp.com wrote: >>>>>> [...] >>>>>>> +++ b/drivers/usb/host/ehci-mx6.c >>>>>>> @@ -735,13 +735,16 @@ static int ehci_usb_bind(struct udevice >> *dev) >>>>>>> * the driver is fully converted to DT probing. >>>>>>> */ >>>>>>> u32 controller_spacing; >>>>>>> - if (IS_ENABLED(CONFIG_MX6)) >>>>>>> - controller_spacing = 0x200; >>>>>>> - else >>>>>>> - controller_spacing = 0x10000; >>>>>>> - fdt_addr_t addr = devfdt_get_addr_index(dev, 0); >>>>>>> >>>>>>> - dev->req_seq = (addr - USB_BASE_ADDR) / controller_spacing; >>>>>>> + if (dev->req_seq == -1) { >>>>>>> + if (IS_ENABLED(CONFIG_MX6)) >>>>>>> + controller_spacing = 0x200; >>>>>>> + else >>>>>>> + controller_spacing = 0x10000; >>>>>>> + fdt_addr_t addr = devfdt_get_addr_index(dev, 0); >>>>>> >>>>>> Can we get rid of the whole req_seq stuff ? >>>>> >>>>> Could the restructure be done after the patchset? Or you need NXP to >>>>> restructure the driver, then upstream NXP production ready patches? >>>>> >>>>> If restructure first, there will be lots conflicts when I pick >>>>> downstream patches, and error prone. >>>> >>>> Can you prepare an RFC patchset for the restructuring on top of this >>>> one, so you can bisect breakage caused by the restructuring, and post >> those patches ? >>>> Then you will get your production-ready patches in without much >>>> changes and also there will be the long-overdue cleanup on the ML. >>>> >>>> I really want NXP to do the cleanup, because the driver is becoming >>>> real bad and it is piling up a lot of unrelated code in it. I don't >>>> care about the order in which the patches go in though. >>>> >>>> Does that work ? >>> >>> Ok, so you agree that we do a cleanup patch based on the pachset, but >>> you wanna to see NXP has start the real work before considering take >>> the patchset, if I understand correct. >>> >>> Then let me reserve time or ask other NXP guys doing this. >> >> I just want to see that cleanup happen, yes, it is already way overdue. > > I have posted the dts patch to Linux Community, > https://patchwork.kernel.org/project/linux-arm-kernel/patch/ > 1602638861-20278-1-git-send-email-peng....@nxp.com/ > > After that gets into Shawn's tree, I will sync with U-Boot. > > So before that, could you please drop this patch 13 and only > pick up the other patches? Or you need to wait the dts sync and > then remove the bind function in ehci-mx6.c? I am waiting for a cleanup of ehci-mx6.c patch series. Also, setting any aliases in DT does not fix the problem described in 501547cec1 ("usb: ehci-mx6: Fix bus enumeration for DM case") does it ?