Age | Commit message (Collapse) | Author | Files | Lines |
|
it was possible to get usbhs_mod from usbhs_priv.
this patch remove unneeded parameter.
Signed-off-by: Kuninori Morimoto <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
|
|
usbhs_usbreq_get/set_val() functions were in pipe.c file,
but it is irrelevant to pipe.
this patch move it to common.c
Signed-off-by: Kuninori Morimoto <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
|
|
Pipe type check macro will be used in other files.
This patch move local macro to global macro.
Signed-off-by: Kuninori Morimoto <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
|
|
current mod_gadget had got usb speed on
usbhsg_irq_dev_state() which is status change interrupt callback function.
And the usb speed data was included in its parameter.
But this style works for mod_gadget,
but doesn't work for mod_host which
isn't interrupted when device status was changed.
This patch add usbhs_bus_get_speed() to solve this issue.
Signed-off-by: Kuninori Morimoto <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
|
|
this patch add DVSTCTR control function for HOST support
Signed-off-by: Kuninori Morimoto <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
|
|
renesas_usbhs will have register DVSTCTR control function for HOST support.
This patch changes usbhsc_bus_ctrl() to usbsc_set_buswait(),
to remove DVSTCTR access from it,
Signed-off-by: Kuninori Morimoto <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
|
|
This patch tidyup Interrupt Enable Register 0 (INTENB0)
which has relationship with picky BEMPENB/BRDYENB.
- add explain comment
- ignore nonsense 0 write case
Signed-off-by: Kuninori Morimoto <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
|
|
packet handler had moved to struct usbhs_pipe from struct usbhsg_uep.
it is preparation of mod_host support
Signed-off-by: Kuninori Morimoto <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
|
|
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 <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
|
|
Current usbhs_pipe_malloc() used usb_endpoint_descriptor to
get necessary information.
It was very good for mod_gadget which allocate pipe in runtime,
but is not good for mod_host which allocate pipe in initial timing.
This patch remove usb_endpoint_descriptor from usbhs_pipe_malloc()
Signed-off-by: Kuninori Morimoto <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
|
|
There is no longer necessity that USBHSF_PKT_xxx are in fifo.h.
it are used in only fifo.c now.
This patch move it.
Signed-off-by: Kuninori Morimoto <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
|
|
Signed-off-by: Kuninori Morimoto <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
|
|
using udc_start()/udc_stop() as we should.
Signed-off-by: Felipe Balbi <[email protected]>
|
|
This flag is a NOOP and can be removed now.
Signed-off-by: Yong Zhang <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Signed-off-by: Kuninori Morimoto <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
1st pos of __usbhsg_for_each_uep() was wrong.
Expected uep were ep1, ep2, ep3...
but each uep were ep0, ep2, ep3 ...
This patch modify it.
Signed-off-by: Kuninori Morimoto <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Include dma-mapping.h to fix build of the renesas_usbhs driver
CC drivers/usb/renesas_usbhs/mod_gadget.o
drivers/usb/renesas_usbhs/mod_gadget.c: In function 'usbhsg_dma_map':
drivers/usb/renesas_usbhs/mod_gadget.c:190: error: implicit declaration of function 'dma_map_single'
drivers/usb/renesas_usbhs/mod_gadget.c:192: error: implicit declaration of function 'dma_sync_single_for_device'
drivers/usb/renesas_usbhs/mod_gadget.c:196: error: implicit declaration of function 'dma_mapping_error'
drivers/usb/renesas_usbhs/mod_gadget.c: In function 'usbhsg_dma_unmap':
drivers/usb/renesas_usbhs/mod_gadget.c:217: error: implicit declaration of function 'dma_unmap_single'
drivers/usb/renesas_usbhs/mod_gadget.c:219: error: implicit declaration of function 'dma_sync_single_for_cpu'
make[5]: *** [drivers/usb/renesas_usbhs/mod_gadget.o] Error 1
make[4]: *** [drivers/usb/renesas_usbhs] Error 2
Reported-by: Magnus Damm <[email protected]>
Signed-off-by: Kuninori Morimoto <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Fix build issue caused by undefined struct scatterlist in
drivers/usb/renesas_usbhs/fifo.c.
Signed-off-by: Rafael J. Wysocki <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
|
|
Some SuperH/board has multi USBHS on it.
This patch supports multi register for renesas_usbhs
Signed-off-by: Kuninori Morimoto <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Signed-off-by: Kuninori Morimoto <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Signed-off-by: Kuninori Morimoto <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
This patch rescues renesas_usbhs compile from
commit 193ab2a (usb: gadget: allow multiple gadgets to be built)
CONFIG_USB_RENESAS_USBHS compile renesas_usbhs main code which
is shared between Host/Gadget.
CONFIG_USB_RENESAS_USBHS_UDC add mod_gadget to it.
It had lost USB_GADGET_DUALSPEED
Signed-off-by: Kuninori Morimoto <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
This patch add/modify comment-out of renesas_usbhs.
On this process, usbhs_pkt_init was moved because it was placed under
usbhsf_null_handler which has no relationship it
Signed-off-by: Kuninori Morimoto <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Signed-off-by: Kuninori Morimoto <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Signed-off-by: Kuninori Morimoto <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
now that we have the udc class, we can allow
multiple gadget controller drivers to be
compiled as modules. This will allow for
distro-like kernels for embedded devices.
With this patch, I managed to build an x86
kernel with support for many of the controllers
enabled:
CONFIG_USB_FUSB300=m
CONFIG_USB_R8A66597=m
CONFIG_USB_M66592=m
CONFIG_USB_AMD5536UDC=m
CONFIG_USB_CI13XXX_PCI=m
CONFIG_USB_NET2272=m
CONFIG_USB_NET2280=m
CONFIG_USB_GOKU=m
CONFIG_USB_LANGWELL=m
CONFIG_USB_EG20T=m
Also an ARM kernel with support for many controllers:
CONFIG_USB_FUSB300=m
CONFIG_USB_OMAP=m
CONFIG_USB_R8A66597=m
CONFIG_USB_GADGET_MUSB_HDRC=m
CONFIG_USB_M66592=m
CONFIG_USB_NET2272=m
CONFIG_USB_DUMMY_HCD=m
The next step would be to get rid of the
direct access to arch/ and mach/ directories
on some gadget controllers so that we can
build all of them without depending on their
respective ARCH_* symbols.
Signed-off-by: Felipe Balbi <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
peripheral drivers are using usb_add_gadget()/usb_del_gadget() to
register/unregister to the udc-core.
The udc-core will take the first available gadget driver and attach
function driver which is calling usb_gadget_register_driver(). This is
the same behaviour we have right now.
Only dummy_hcd was tested, the others were compiled tested.
Cc: Alan Stern <[email protected]>
Cc: Anton Tikhomirov <[email protected]>
Cc: Ben Dooks <[email protected]>
Cc: Dan Carpenter <[email protected]>
Cc: Darius Augulis <[email protected]>
Cc: Eric Miao <[email protected]>
Cc: Jingoo Han <[email protected]>
Cc: Kukjin Kim <[email protected]>
Cc: Kuninori Morimoto <[email protected]>
Cc: Li Yang <[email protected]>
Cc: Michael Hennerich <[email protected]>
Acked-by: Mike Frysinger <[email protected]>
Cc: Nicolas Ferre <[email protected]>
Cc: Pavankumar Kondeti <[email protected]>
Cc: Roy Huang <[email protected]>
Cc: Russell King <[email protected]>
Cc: Toshiharu Okada <[email protected]>
Cc: Xiaochen Shen <[email protected]>
Cc: Yoshihiro Shimoda <[email protected]>
Cc: Yuan-Hsin Chen <[email protected]>
Cc: cxie4 <[email protected]>
Cc: [email protected]
Signed-off-by: Sebastian Andrzej Siewior <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Sometimes the connection fail happen on renesas_usbhs.
This patch fix it up.
Signed-off-by: Kuninori Morimoto <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
USB DMA was installed on "normal DMAC" when SH7724 or older SuperH,
but the "USB-DMAC" was prepared on recent SuperH.
These 2 DMAC have a little bit different behavior.
This patch add DMAEngine code for "normal DMAC",
but it is still using PIO fifo.
The DMA fifo will be formally supported in the future.
You can enable DMA fifo by local fixup
usbhs_fifo_pio_push_handler -> usbhs_fifo_dma_push_handler
usbhs_fifo_pio_pop_handler -> usbhs_fifo_dma_pop_handler
on usbhsg_ep_enable.
This DMAEngine was tested by g_file_storage on SH7724 Ecovec board
Signed-off-by: Kuninori Morimoto <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
This patch tidyup PIO packet handler name.
This is a preparation for DMAEngine support
Signed-off-by: Kuninori Morimoto <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
packet transfer timing are controlled in mod_gadget on current renesas_usbhs,
and this style will be imitated on mod_host.
But it need not be managed with host/gadget if it is general transfer.
By this patch, the packet transfer timing is managed in fifo.c
Signed-off-by: Kuninori Morimoto <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
renesas_usbhs has CFIFO which is for PIO transfer,
and D0FIFO/D1FIFO which are for DMA transfer.
The pipe selects one of these fifo when it send/recv data.
But fifo must not be selected to different pipe in same time.
This patch add pipe/fifo link for each other,
and fifo is not selected by another pipe until it is unselected.
Signed-off-by: Kuninori Morimoto <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
renesas_usbhs has CFIFO/D0FIFO/D1FIFO.
But current renesas_usbhs is using CFIFO (for PIO) only for now.
The fifo selection method is needed for DMAEngine support.
This is a preparation for DMAEngine support
Signed-off-by: Kuninori Morimoto <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
spin lock was very effective while doing 1 packet send/recv on
current renesas_usbhs driver.
But this lock is enough only
- modify packet/pipe link
- modify interrpt mask
- modify fifo access
This patch shrink spin lock area
Signed-off-by: Kuninori Morimoto <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
usbhsg_queue_get is no longer needed.
Signed-off-by: Kuninori Morimoto <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
On current driver, overall data transfer method was implemented in fifo.c,
but its interrupt which is member of packet queue control
was still in mod_gadget.c.
This patch move it into fifo.c.
By this patch, the packet/fifo control is independent from mod_gadget.
Signed-off-by: Kuninori Morimoto <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
On current driver, main data transfer function was implemented in fifo.c,
but the overall controlling was implementing in mod_gadget.c.
This style is not useful to support host and DMAEngine in the future.
But the interrupt for data transfer cannot separate easily for now,
because it is deeply related to mod_gadget.
This patch move the overall data transfer method
into fifo.c except interrupt.
Signed-off-by: Kuninori Morimoto <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Current renesas_usbhs driver is controlling packet queue on mod_gadget.c.
But it has relationship with pipe/fifo, not host/gadget.
So, controlling USB packet queue in pipe.c/fifo.c is
more convenient than in mod_gadget.c.
This patch modify it.
Signed-off-by: Kuninori Morimoto <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
DMAEngine will be supported to this driver in the future.
Then, both PIO and DMA data transfer method should be supported.
But, the transfer function can returns the result immediately
in PIO version, but it can't in DMA version.
This patch divides data transfer functions into top/bottom half
in preparation for DMAEngine support.
Signed-off-by: Kuninori Morimoto <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Current renesas_usbhs has PIO data transfer mode which controls CFIFO.
And it was implemented in pipe.c.
But, fifo control method needs more flexible implementation
to support DMAEngine.
This patch create fifo.c, and it became independent from pipe.c.
Signed-off-by: Kuninori Morimoto <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Current driver had pipe direction flag
which came from usb_endpoint_dir_in().
It means "input direction" for HOST,
and "out direction" for Gadget.
But driver needs "input direction for pipe".
This patch adds IS_DIR_HOST flags and care
both "input direction for HOST" and "input direction for pipe"
Signed-off-by: Kuninori Morimoto <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Can't find evidence that this is actually done.
Cc: Kuninori Morimoto <[email protected]>
Signed-off-by: Sebastian Andrzej Siewior <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
The error processing order was wrong.
This patch modify it.
Signed-off-by: Kuninori Morimoto <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
It was necessary to check pipe condition after disable fifo.
Current driver checked it in a wrong place.
Signed-off-by: Kuninori Morimoto <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Current renesas_usbhs was designed to save power when USB is not connected.
And it assumed platform uses callback to notify connection/disconnection
by external interrupt.
But some SuperH / platform board doesn't have such feature.
This patch adds autonomy mode which detect USB connection/disconnection
by internal interrupt.
But power will be always ON when autonomy mode is selected.
Signed-off-by: Kuninori Morimoto <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
This delay is used to overjump debounce.
And, this patch also move usbhsc_drvcllbck_notify_hotplug to global,
because it will be called from other files.
Signed-off-by: Kuninori Morimoto <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
usbhs_status_get_each_irq/usbhs_irq_callback_update might be called
with mod == NULL
Signed-off-by: Kuninori Morimoto <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Signed-off-by: Kuninori Morimoto <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
usbhs_pdev_to_priv function will be used in other files.
Signed-off-by: Kuninori Morimoto <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|