On 05/17/2018 09:40 AM, Michal Simek wrote:
> On 16.5.2018 16:40, Marek Vasut wrote:
>> On 05/16/2018 04:26 PM, Michal Simek wrote:
>>> From: Mugunthan V N <mugunthan...@ti.com>
>>>
>>> The patch is preparing dwc3 core for enabling DM_USB with peripheral
>>> driver with using driver model support.
>>> The driver will be bound by the DWC3 wrapper driver based on the
>>> dr_mode device tree entry.
>>>
>>> Signed-off-by: Mugunthan V N <mugunthan...@ti.com>
>>> (Remove dwc3-omap changes)
>>> Signed-off-by: Michal Simek <michal.si...@xilinx.com>
>>> ---
>> [...]
>>> diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/core.h
>>> index cbe9850a0bda..ad16c9b7c46c 100644
>>> --- a/drivers/usb/dwc3/core.h
>>> +++ b/drivers/usb/dwc3/core.h
>>> @@ -712,7 +712,11 @@ struct dwc3 {
>>>     /* device lock */
>>>     spinlock_t              lock;
>>>  
>>> +#ifndef CONFIG_DM_USB
>>
>> Shouldnt this be ifdef __UBOOT__ ?
>>
>>>     struct device           *dev;
>>> +#else
>>> +   struct udevice          *dev;
>>> +#endif
> 
> What about this?
> 
> #if defined(__UBOOT__) && defined(CONFIG_DM_USB)
>       struct udevice          *dev;
> #else
>       struct device           *dev;
> #endif

Yes. I am kinda surprised we don't have some udevice<->device mapping
layer, but I guess that might have it's own problems.

-- 
Best regards,
Marek Vasut
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot

Reply via email to