
Hi Govindraj,
I was about to ask Tom to reorder the patches while applying, but there are still several things to fix. I'm also fine with fixing these by a follow up patch (after merging this).
There are several comments, you missed to fix from previous version [1]. Please, fix those.
[1] http://permalink.gmane.org/gmane.comp.boot-loaders.u-boot/123832
On 02/03/12 15:38, Govindraj.R wrote:
From: "Govindraj.R" govindraj.raja@ti.com
Extend the existing ulpi viewport framework to pass the port number information for any ulpi ops. Fix the usage of ulpi api's accordingly.
Tested-by: Stefano Babic sbabic@denx.de Signed-off-by: Govindraj.R govindraj.raja@ti.com
After fixing the pointed issues:
Acked-by: Igor Grinberg grinberg@compulab.co.il
board/efikamx/efikamx-usb.c | 24 ++++++++++------ drivers/usb/ulpi/ulpi-viewport.c | 30 ++++++++++---------- drivers/usb/ulpi/ulpi.c | 54 +++++++++++++++++++------------------ include/usb/ulpi.h | 36 +++++++++++++++++-------- 4 files changed, 82 insertions(+), 62 deletions(-)
[...]
diff --git a/drivers/usb/ulpi/ulpi-viewport.c b/drivers/usb/ulpi/ulpi-viewport.c index 490fb0e..6f03f08 100644 --- a/drivers/usb/ulpi/ulpi-viewport.c +++ b/drivers/usb/ulpi/ulpi-viewport.c
[...]
-int ulpi_write(u32 ulpi_viewport, u8 *reg, u32 value) +int ulpi_write(struct ulpi_viewport *ulpi_vp, u8 *reg, u32 value) { u32 val = ULPI_RWRUN | ULPI_RWCTRL | ((u32)reg << 16) | (value & 0xff);
You should utilize the port_num variable here, right? something like: val |= (ulpi_vp->port_num & 0x7) << 24;
- return ulpi_request(ulpi_viewport, val);
- return ulpi_request(ulpi_vp, val);
}
-u32 ulpi_read(u32 ulpi_viewport, u8 *reg) +u32 ulpi_read(struct ulpi_viewport *ulpi_vp, u8 *reg) { int err; u32 val = ULPI_RWRUN | ((u32)reg << 16);
same here
- err = ulpi_request(ulpi_viewport, val);
- err = ulpi_request(ulpi_vp, val); if (err) return err;
- return (readl(ulpi_viewport) >> 8) & 0xff;
- return (readl(ulpi_vp->viewport_addr) >> 8) & 0xff;
}
[...]
diff --git a/include/usb/ulpi.h b/include/usb/ulpi.h index 802f077..a036bab 100644 --- a/include/usb/ulpi.h +++ b/include/usb/ulpi.h @@ -28,12 +28,23 @@ #endif
/*
- ulpi view port address and
- Port_number that can be passed.
- Any additional data to be passed can
- be extended from this structure
- */
+struct ulpi_viewport {
- u32 viewport_addr;
- u8 port_num;
+};
haven't we aggreed, that this will be: u32 port_num; ?
+/*
- Initialize the ULPI transciever and check the interface integrity.
- @ulpi_viewport - the address of the ULPI viewport register.
- @ulpi_viewport - structure containing ULPI viewport data
This is ulpi_vp now.
[...]