[PATCH 3/5] usb: dwc3-generic: Add dependency on SIMPLE_BUS

Marek Vasut marex at denx.de
Wed Jan 25 14:03:57 CET 2023


On 1/25/23 09:40, Kunihiko Hayashi wrote:
> Hi Marek,

Hello Hayashi-san,

[...]

>> The idea is that the dwc3-generic.c (or dwc3-uniphier.c , placement does
>> not really matter) binds to "socionext,uniphier-pxs3-dwc3-glue"
>> compatible first.
>>
>> Then, the dwc3_glue_ops is extended with a new callback
>> glue_get_ctrl_dev, which returns the pointer to controller DT node (the
>> node compatible with "socionext,uniphier-dwc3"). This is used in
>> dwc3_glue_bind(), which either uses the current implementation with a
>> loop over all subnodes and tries to find the controller subnode, OR,
>> calls the glue_get_ctrl_dev callback, obtains controller device node
>> pointer that way, and runs the inner loop of dwc3_glue_bind() (now
>> dwc3_glue_bind_common()) only on that pointer.
> 
> I understand your patch adds trying to call "glue_get_ctrl_dev" to get
> controller device node before finding subnode,

Yes. Feel free to adjust the patch so it fits uniphier better of course.

>> In either case, the dwc3-generic driver is bound to the controller. You
>> might need to re-use this trick in dwc3_glue_probe() too.
>>
>> This should allow you to get rid of the custom DT node too.
>>
>> Does this work ?
> 
> I'll try this soon.

Thank you !


More information about the U-Boot mailing list