History log of /drivers/usb/renesas_usbhs/common.h
Revision Date Author Comments
8ecef00fe1f33658ee36e902dba6850b51312073 10-Jul-2014 Ulrich Hecht <ulrich.hecht@gmail.com> usb: renesas_usbhs: add R-Car Gen. 2 init and power control

In preparation for DT conversion to reduce reliance on platform device
callbacks.

Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
4cd2f5998757a41038deb55a0cb8319bdf67575a 16-Oct-2012 kuninori.morimoto.gx@renesas.com <kuninori.morimoto.gx@renesas.com> usb: renesas_usbhs: gadget: add usb_gadget_ops :: pullup support

This patch adds usbhs_sys_function_pullup() to control
D+ line for USB function, and enabled pullup support on mod_gadget.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
cc502bb741e1797290381da14dddb695ec1adbaf 03-Jun-2012 Paul Bolle <pebolle@tiscali.nl> renesas_usbhs: cleanup quoted includes

A few quoted includes start with a superfluous "./". Clean up those
quoted includes.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
53069af3fa8ba2849cd4785160690873995d4f39 05-Jan-2012 Shimoda, Yoshihiro <yoshihiro.shimoda.uh@renesas.com> usb: renesas_usbhs: add IRQ resource decoding for IRQF_SHARED

In case of the SH7757, the irq number of USB module and SUDMAC
are the same. So, we have to set the IRQF_SHARED in such a case.

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
dfbb7f4fba47153de4be9ed6092804ebfd16bfbb 25-Nov-2011 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> usb: renesas_usbhs: add test-mode support

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
3dd492686c063f9fa9417c3888e7a8eeb504b5b9 31-Oct-2011 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> usb: gadget: renesas_usbhs: modify function name of usbhs_set_device_xx()

it was device configuration setting function, not only speed.
This patch modify function name usbhs_set_device_speed() -> usbhs_set_device_config()

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
b4fcea2a71cafc59a749fa3ef88e51af8c2e3b37 24-Oct-2011 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> usb: gadget: renesas_usbhs: unified callback function

renesas_usbhs needs callback for notify hotplug.
but it were 2 methods which are almost same.
This patch unified these into one.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
76190152fb62650ea6530c166d9adbaa08cdb5d0 24-Oct-2011 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> usb: gadget: renesas_usbhs: tidyup usbhs_sys_clock_ctrl() was local function

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
3244a7b43f13682c3323ee0d781f0cb212e8b3e7 24-Oct-2011 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> usb: gadget: renesas_usbhs: remove usbhs_sys_usb_ctrl()

usbhs_sys_usb_ctrl() can collect into usbhs_sys_host/function_ctrl().

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2288e109931577582f09d6295029bbf098c6f939 24-Oct-2011 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> usb: gadget: renesas_usbhs: remove usbhs_sys_hispeed_ctrl()

usbhs_sys_hispeed_ctrl() can collect into usbhs_sys_host/function_ctrl().

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
482982062f1bc25ffb5383ab724d73d1a7af07cf 13-Oct-2011 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> usb: gadget: renesas_usbhs: bugfix: don't modify platform data

renesas_usbhs has default callback functions and settings.
And it tried overwrite to platform private data
if platform doesn't have them.
So, if renesas_usbhs was compiled as module,
it will be hung-up on 2nd insmod.
This patch fixup it.
Special thanks to Bastian

Reported-by: Bastian Hecht <hechtb@googlemail.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
89c1d2e7b5993db33805b42e3675289920812f6f 11-Oct-2011 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> usb: gadget: renesas_usbhs: add INTSTS1 interrupt support

mod_host use INTSTS1 interrupt

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
eb05191f6a9aba8344a0d5f28642b5ecf44d49a4 11-Oct-2011 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> usb: gadget: renesas_usbhs: add usbhs_set_device_speed() support for host

mod_host needs device speed setup function

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
6e6db82ba9bf2d5912897f77ccf6902cb8543372 11-Oct-2011 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> usb: gadget: renesas_usbhs: modify pipe sequence settings

renesas_usbhs can manually set DATA0/DATA1.
This patch is prepare for mod_host support

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
ef8bedb9048c293dfa85ac36482a1970646a8272 11-Oct-2011 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> usb: gadget: renesas_usbhs: move usbhs_usbreq_get/set_val() to common.c

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 <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
75587f52c7b0d6c319515138a495a619b552a670 11-Oct-2011 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> usb: gadget: renesas_usbhs: add usbhs_bus_get_speed()

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 <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
258485d9904703c4cb3a2b3ee38fe2a0cbf01f48 11-Oct-2011 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> usb: gadget: renesas_usbhs: add bus control functions

this patch add DVSTCTR control function for HOST support

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
e73a9891b3a1c9fc0970e0c9dbe2cc47933ad752 06-Jun-2011 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> usb: renesas_usbhs: add DMAEngine support

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 <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
d3af90a5e4e8fb7a93d408799682e566c9270808 06-Jun-2011 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> usb: renesas_usbhs: add usbhsf_fifo

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 <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
97664a207bc2601a03a300f00e6922038cd5b99c 06-Jun-2011 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> usb: renesas_usbhs: shrink spin lock area

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 <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
4bd0481152d0d5e8326d7e24329b0069713ed718 06-Jun-2011 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> usb: renesas_usbhs: divide data transfer functions

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 <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
e8d548d549688d335236f7f6f8bcee141a207ff8 06-Jun-2011 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> usb: renesas_usbhs: fifo became independent from pipe.

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 <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
b002ff6e268b6024d6927a1ce330a14ca162b6ab 28-Apr-2011 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> usb: renesas_usbhs: add autonomy mode

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 <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
bc57381e634782009b1cb2e86b18013699ada576 28-Apr-2011 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> usb: renesas_usbhs: use delayed_work instead of work_struct

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 <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
206dcc2cfe15b6174f15293ae15a097ee03eb386 28-Apr-2011 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> usb: renesas_usbhs: move pdev_to_priv to global

usbhs_pdev_to_priv function will be used in other files.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
f1407d5c66240b33d11a7f1a41d55ccf6a9d7647 04-Apr-2011 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> usb: renesas_usbhs: Add Renesas USBHS common code

Renesas SuperH has USBHS IP which can switch Host / Function.
This driver is designed so that Host / Function may dynamically change.
This patch add usb/renesas_usbhs and common code for SuperH USBHS.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>