[U-Boot] [PATCH v3] usb: new board-specific USB init interface

Mateusz Zalega m.zalega at samsung.com
Fri Sep 6 13:36:08 CEST 2013


On 09/06/13 13:24, Marek Vasut wrote:
>>>>> Moreover, the 'int index' should likely be unsigned int and the special
>>>>> value to init all controllers at once should probably then be
>>>>> 0xffffffff
>>>>
>>>> Despite our greatest ambitions, I don't think we're likely to use more
>>>> than 2^31-1 USB controllers at a time. Besides, negative values look
>>>> better both in code and debugger session.
>>>
>>> Thinking of it further, instead of using negative value here, like I
>>> mentioned above, why not make the "board_usb_init_type" into a field of
>>> flags , then add flag to init all controllers at once ?
>>
>> That's unnecessary. It wouldn't lead to any practical advantage over
>> existing interface.
> 
> The advantage would be you won't be mixing two things (value AND value with 
> special meaning) into the "index" parameter.

Alright, provide a use-case. The only 'special' value we have now
doesn't interfere with controller index. Why write code or interfaces
that won't ever be used?

Best regards,

-- 
Mateusz Zalega
Samsung R&D Institute Poland


More information about the U-Boot mailing list