[U-Boot] [PATCH v2 1/4] ehci-omap: Clean up added ehci-omap.c
Igor Grinberg
grinberg at compulab.co.il
Wed Jan 25 14:40:46 CET 2012
Hi Govindraj,
On 01/25/12 11:04, Govindraj wrote:
> Hi Igor,
>
> On Sun, Jan 22, 2012 at 5:50 PM, Igor Grinberg <grinberg at compulab.co.il> wrote:
>> On 01/19/12 10:15, Govindraj wrote:
>>> On Wed, Jan 18, 2012 at 11:21 PM, Igor Grinberg <grinberg at compulab.co.il> wrote:
>>>> Hi Govindraj,
>>>>
>>>> On 01/17/12 08:10, Govindraj wrote:
>>>>>
[...]
>>>> and add an ability to pass some kind of private data to the viewport, which
>>>> in case of OMAP will be the port number.
>
>
> I started on adding omap-ulpi-viewport.c which will work with ulpi.c
> if omap_ehci.c is used.
Good! Thanks for working on that.
>
> for port id can we just set a global data field that will inform the
> omap_view port
> on the port id, or we have to modify most api's syntax in
> "drivers/usb/ulpi/ulpi.c"
IMO, we should modify the API, because it does not make sense
to use the generic layer, but workaround some missing feature...
My suggestion for the change is:
1) introduce some kind of
struct ulpi_viewport {
u32 viewport_addr;
uint portnum;
}
2) use the above struct _instead_ of the "u32 ulpi_viewport" parameter
Another way, would be instead of uint portnum, use void *private_data,
but I think it will just complicate things too much and there will be no
real benefit (and also will add, otherwise needless, castings).
If the above structure will not be enough for some platform,
it can be extended easily and without changing the API anymore.
--
Regards,
Igor.
More information about the U-Boot
mailing list