Hello. On 13-10-2011 21:56, Felipe Balbi wrote:
From: Kuninori Morimoto<kuninori.morimoto.gx@xxxxxxxxxxx>
Current renesas_usbhs pipe accessed DCPMAXP/PIPEMAXP register to get own maxpacket size every time. But maxpacket size isn't changed after pipe start, and register access is too slow.
This patch adds new maxp variable to keep own maxpacket. And un-used function are removed.
Signed-off-by: Kuninori Morimoto<kuninori.morimoto.gx@xxxxxxxxxxx> Signed-off-by: Felipe Balbi<balbi@xxxxxx> --- drivers/usb/renesas_usbhs/pipe.c | 29 ++++++++--------------------- drivers/usb/renesas_usbhs/pipe.h | 2 ++ 2 files changed, 10 insertions(+), 21 deletions(-)
diff --git a/drivers/usb/renesas_usbhs/pipe.c b/drivers/usb/renesas_usbhs/pipe.c index 1af1905..1f86bed 100644 --- a/drivers/usb/renesas_usbhs/pipe.c +++ b/drivers/usb/renesas_usbhs/pipe.c
[...]
@@ -477,11 +463,12 @@ void usbhs_pipe_config_update(struct usbhs_pipe *pipe, u16 epnum, u16 maxp) */ int usbhs_pipe_get_maxpacket(struct usbhs_pipe *pipe)
I'd have marked this function *inline* (if not eliminated it altogether).
{ - u16 mask = usbhs_pipe_is_dcp(pipe) ? DCP_MAXP_MASK : PIPE_MAXP_MASK; - - usbhsp_pipe_select(pipe); - - return (int)(usbhsp_pipe_maxp_get(pipe)& mask); + /* + * see + * usbhs_pipe_config_update() + * usbhs_dcp_malloc() + */ + return pipe->maxp; }
WBR, Sergei -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html