| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
|
|
| |
When ci core driver enable runtime pm in probe, it's possible runtime suspend
will be started before otg fsm queue work get to run, in this case, host has not
been started yet so ci->hcd is NULL, but suspend routine will access it for save
ehci registers, which result in kernle panic, this patch adds pointer valid check.
Signed-off-by: Li Jun <b47624@freescale.com>
|
|
|
|
|
|
|
|
|
|
| |
There is 2s delay for controller resume from usb wakeup case already,
in OTG fsm mode, A-dev can start a new session via sys input file(means
not via usb wakeup), in this case, A-dev still need the 2s delay for
host root hub access registers, otherwise system will hang due to access
register at low power mode.
Signed-off-by: Li Jun <b47624@freescale.com>
|
|
|
|
|
|
|
|
|
| |
non-otg mode
This patch adds condition check for gadget disconnect when restore udc,
if in otg fsm mode, let otg fsm handle this by otg state machine.
Signed-off-by: Li Jun <b47624@freescale.com>
|
|
|
|
|
|
|
|
|
| |
Controller needs to be active during system suspend, otherwise the core
may run resume when the parent is still at suspend if other driver's
suspend fails, it occurs before parent's suspend has not started,
but the core suspend has finished.
Signed-off-by: Peter Chen <peter.chen@freescale.com>
|
|
|
|
|
|
| |
This patch adds support for system resume from power lost in otg fsm mode.
Signed-off-by: Li Jun <b47624@freescale.com>
|
|
|
|
|
|
|
|
| |
i.MX6SX mega off can shutdown domain power supply if none of peripheral
in this domain is registered as wakeup source, this patch adds chipidea
controller re-init after resume from such power lost during system sleep.
Signed-off-by: Li Jun <b47624@freescale.com>
|
|
|
|
|
|
|
| |
Export ci_handle_id_switch interface for handling id change
during system sleep with power off.
Signed-off-by: Li Jun <b47624@freescale.com>
|
|
|
|
|
|
|
|
|
|
| |
of udc
Set OP_ENDPTLISTADDR value to be non-zero for power lost check if its value is 0
when suspend. If the controller experienced a power lost in device mode, only
force a disconnection if vbus on, and enable vbus irq.
Signed-off-by: Li Jun <b47624@freescale.com>
|
|
|
|
|
|
|
|
|
| |
This patch adds interfaces in role driver to prepare and restore state
for power lost in system sleep. For host experienced power lost,
we can save required resgisters value before suspend; and restore them
after resume.
Signed-off-by: Li Jun <b47624@freescale.com>
|
|
|
|
|
|
|
| |
This patch adds interface to check if the host has usb device connected.
Acked-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Li Jun <b47624@freescale.com>
|
|
|
|
|
|
|
| |
Set ci->hcd to be NULL after the hcd is removed.
Acked-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Li Jun <b47624@freescale.com>
|
|
|
|
|
|
|
|
|
|
|
| |
sleep
i.MX6SX mega off can shutdown domain power supply if none of peripheral
in this domain is registered as wakeup source, this patch adds usb controller
imx specific re-init after resume from such power lost during system sleep.
Acked-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Li Jun <b47624@freescale.com>
|
|
|
|
|
|
|
|
| |
We add vbus glitch handling for both BSV rise and drop interruptes.
If it is a vbus glitch (higher than BSV but cannot reach AVV), ignore it.
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Li Jun <b47624@freescale.com>
|
|
|
|
|
|
|
|
| |
This patch adds condition of wakeup irq for handling wakeup by SRP
when in otg fsm mode.
Acked-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Li Jun <b47624@freescale.com>
|
|
|
|
|
|
|
| |
This patch sets host request flag with sys input when a A device
sets a_bus_req or a B device sets b_bus_req as peripheral role.
Signed-off-by: Li Jun <b47624@freescale.com>
|
|
|
|
|
|
|
| |
This patch adds HNP polling support for chipidea otg fsm driver, which
adds a SW timer to send HNP polling request.
Signed-off-by: Li Jun <b47624@freescale.com>
|
|
|
|
|
|
|
|
| |
Peripheral answers OTG status selector request from host according to
host request flag of gadget, length is 1. this flag may be set by application
via sysfs.
Signed-off-by: Li Jun <b47624@freescale.com>
|
|
|
|
|
|
|
|
|
| |
Use dev_name() for ci_hdrc name to distinguish USBs
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 5c1b9fcc6598ee492100ad2a19fdb74b35448023)
|
|
|
|
|
|
|
| |
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 35d0313a6d4ffb396b1dad2d62a90ddbb52215bd)
|
|
|
|
|
|
|
|
| |
Update device states according to ch9 in USB 2.0 specification
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 2d189909ecaafe5764609b664d7502b0e68f909b)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The field PLLDIVVALUE of register PHY_CTRL_1 selects the reference clock source
for the PHY:
00 = sysclock uses 19.2 MHz
01 = sysclock uses 24 MHz
10 = sysclock uses 26 MHz
11 = sysclock uses 27 MHz
The reset value for this field is 10 according to the reference manual, and
even though this reset value works for mx53, it does not work for mx51.
So instead of relying on the reset value for the PLLDIVVALUE field, explicitly
set it to 01 so that a 24MHz clock can be selected for the PHY and allowing both
mx51 and mx53 to have USB OTG port functional.
Succesfully tested 'g_ether' on a imx51-babbage and on a imx53-qsb boards.
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit c93dad6e3a2204627fa5e7a3f1782007f378b32e)
|
|
|
|
|
|
|
|
|
|
| |
The otg queue work include operations: one is disable interrupt,
another one is call kernel queue work API. Many codes do this
operation, using one inline function to instead of them.
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit c8b188d2900a7a9c833f67585cc11e47b47ad6b2)
|
|
|
|
|
|
|
|
| |
Delete useless code
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 27d47c96c84efa1dc5712c928a6938cf43b5de78)
|
|
|
|
|
|
|
|
| |
Update TODO list
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit f7eaea58cdbde6e0f4b9ad37c34a59d5c6071464)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We need to delete un-finished td from current request's td list
at ep_dequeue API, otherwise, this non-user td will be remained
at td list before this request is freed. So if we do ep_queue->
ep_dequeue->ep_queue sequence, when the complete interrupt for
the second ep_queue comes, we search td list for this request,
the first td (added by the first ep_queue) will be handled, and
its status is still active, so we will consider the this transfer
still not be completed, but in fact, it has completed. It causes
the peripheral side considers it never receives current data for
this transfer.
We met this problem when do "Error Recovery Test - Device Configured"
test item for USBCV2 MSC test, the host has never received ACK for
the IN token for CSW due to peripheral considers it does not get this
CBW, the USBCV test log like belows:
--------------------------------------------------------------------------
INFO
Issuing BOT MSC Reset, reset should always succeed
INFO
Retrieving status on CBW endpoint
INFO
CBW endpoint status = 0x0
INFO
Retrieving status on CSW endpoint
INFO
CSW endpoint status = 0x0
INFO
Issuing required command (Test Unit Ready) to verify device has recovered
INFO
Issuing CBW (attempt #1):
INFO
|----- CBW LUN = 0x0
INFO
|----- CBW Flags = 0x0
INFO
|----- CBW Data Transfer Length = 0x0
INFO
|----- CBW CDB Length = 0x6
INFO
|----- CBW CDB-00 = 0x0
INFO
|----- CBW CDB-01 = 0x0
INFO
|----- CBW CDB-02 = 0x0
INFO
|----- CBW CDB-03 = 0x0
INFO
|----- CBW CDB-04 = 0x0
INFO
|----- CBW CDB-05 = 0x0
INFO
Issuing CSW : try 1
INFO
CSW Bulk Request timed out!
ERROR
Failed CSW phase : should have been success or stall
FAIL
(5.3.4) The CSW status value must be 0x00, 0x01, or 0x02.
ERROR
BOTCommonMSCRequest failed: error=80004000
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
(cherry picked from commit b2a4b1a887548906c4d28a86ce3a1c7bcfb8406f)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch fix the failure when OTG port switch from host to device mode
after removes ID cable with usb device(e.g usb hub) connected.
How to reproduce:
- Enable console wakeup:
echo enabled > /sys/class/tty/ttymxc0/power/wakeup
- Connect a usb hub with ID cable to OTG port.
- Suspend the system:
ehco mem > /sys/power/state
- Wakeup the system by console.
- Remove ID cable together with usb hub.
- OTG port cannot switch to device role.
Root cause:
In this case, ID change interrupt generates before port change interrupt,
so with irq disabled, ci_handle_id_switch() will find there is usb device
still connected and wait it to disconnect by sleep, but disconnect will not
happen since usb irq still disabled so port change irq has no chance to be
handled.
How this patch is fixing this issue:
This patch enables irq before sleep and disables irq after, thus port change
irq can be handled and usb device disconnection can timely happen, then
ci_handle_id_switch() can stop host and switch to device role correctly.
meanwhile change the delay time to 10~15 ms to avoid too frequent connection
check and irq enable/disable.
Signed-off-by: Li Jun <b47624@freescale.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We have a 2s timer once the wakeup occurs, if we unload module within
2s before wakeup occurs, the timer is still active, so we need
to delete the timer before the destroy of struct ci_hdrc, otherwise,
the below oops will occur.
ci_hdrc ci_hdrc.1: remove, state 1
usb usb1: USB disconnect, device number 1
usb 1-1: USB disconnect, device number 2
ci_hdrc ci_hdrc.1: USB bus 1 deregistered
ci_hdrc ci_hdrc.1: ci_otg_thread quits
Unable to handle kernel NULL pointer dereference at virtual address 00000000
pgd = a9474000
[00000000] *pgd=a84b1831, *pte=00000000, *ppte=00000000
Internal error: Oops: 80000007 [#1] PREEMPT SMP ARM
Modules linked in: ci_hdrc_imx(-) usbmisc_imx ci_hdrc ehci_hcd udc_core phy_mxs_usb evbug [last unloaded: configfs]
CPU: 0 PID: 11542 Comm: modprobe Not tainted 3.10.17-01265-ga8a6771-dirty #561
task: a81243c0 ti: a94b4000 task.ti: a94b4000
PC is at 0x0
LR is at call_timer_fn.isra.29+0x24/0x84
pc : [<00000000>] lr : [<8003189c>] psr: 200b0113
sp : a94b5d68 ip : 00000000 fp : 00000000
r10: a94b5d88 r9 : 00000000 r8 : 00200200
r7 : 00000000 r6 : 80c320c0 r5 : 00000100 r4 : a94b4000
r3 : a94b5d68 r2 : a94b5d80 r1 : 00000000 r0 : 00000000
Flags: nzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user
Control: 10c53c7d Table: a947404a DAC: 00000015
Process modprobe (pid: 11542, stack limit = 0xa94b4238)
Stack: (0xa94b5d68 to 0xa94b6000)
5d60: 000797ae 00015220 80c2c620 80cc1ac0 00000000 80c320c0
5d80: 80cc22d4 80031ab4 a94b5d88 a94b5d88 00000000 00000101 80c32084 a94b4000
5da0: 00000100 80cc1880 00000000 80c32080 00000001 8002c4b4 000000c3 a8009240
5dc0: 00000004 0000000a 000797af 00404100 018c8300 600b0193 00000057 00000000
5de0: c0802100 8000e2c4 a94b4000 00000000 018c8300 8002c624 a94b4000 8002c898
5e00: 80c2cef0 8000ea04 c080210c 80c38904 a94b5e30 80008538 80115b7c 80115b8c
5e20: a00b0013 ffffffff a94b5e64 8000dd40 80c45808 00000000 00000001 00000000
5e40: a83f8900 00000000 a94b5e98 00000081 8000e2c4 a94b4000 00000000 018c8300
5e60: 00000001 a94b5e78 80115b7c 80115b8c a00b0013 ffffffff 00000000 00000000
5e80: a83f83c0 a83f83c0 a83f83c0 80b349b4 00000000 801140fc a83f83c0 a83f8900
5ea0: 80c56ae8 a83f83c0 a80c4610 80117454 00000000 80c56aa0 a88bc018 8030b9ac
5ec0: ffffffff a88bc010 a80c4610 8030437c a88bc000 a80c4600 a80c4610 80308510
5ee0: 7f7d21c0 a88bc000 a80c4600 803088b4 00000000 7f7c0500 a83c4c10 7f7d21e0
5f00: a80c4610 7f7d3250 a80c4644 8030827c 80308264 80306b70 7f7d3250 a80c4610
5f20: 7f7d3250 80307360 7f7d3290 7f7d3250 80c56710 803069a0 7f7d3290 00000000
5f40: a94b4000 800679d0 00000020 685f6963 5f637264 00786d69 a81243c0 800495b4
5f60: 80c2ceac 00000000 018c8300 80049578 018c8300 8003f614 8000e2c4 000f000f
5f80: a89b7840 004b4000 7f7d3290 00000800 a94b5f94 00000000 018c8300 018c8334
5fa0: 018c8334 8000e140 018c8300 018c8334 018c8334 00000800 7ee8aa50 0002e6b0
5fc0: 018c8300 018c8334 018c8334 00000081 00000001 7ee8be0c 7ee8be04 018c8300
5fe0: 76ebcf40 7ee8aa2c 00019268 76ebcf4c 60070010 018c8334 abf58811 abf58c11
[<8003189c>] (call_timer_fn.isra.29+0x24/0x84) from [<80031ab4>] (run_timer_softirq+0x1b8/0x1cc)
[<80031ab4>] (run_timer_softirq+0x1b8/0x1cc) from [<8002c4b4>] (__do_softirq+0xd8/0x1b8)
[<8002c4b4>] (__do_softirq+0xd8/0x1b8) from [<8002c624>] (do_softirq+0x4c/0x58)
[<8002c624>] (do_softirq+0x4c/0x58) from [<8002c898>] (irq_exit+0x90/0xc8)
[<8002c898>] (irq_exit+0x90/0xc8) from [<8000ea04>] (handle_IRQ+0x3c/0x90)
[<8000ea04>] (handle_IRQ+0x3c/0x90) from [<80008538>] (gic_handle_irq+0x28/0x5c)
[<80008538>] (gic_handle_irq+0x28/0x5c) from [<8000dd40>] (__irq_svc+0x40/0x70)
Exception stack(0xa94b5e30 to 0xa94b5e78)
5e20: 80c45808 00000000 00000001 00000000
5e40: a83f8900 00000000 a94b5e98 00000081 8000e2c4 a94b4000 00000000 018c8300
5e60: 00000001 a94b5e78 80115b7c 80115b8c a00b0013 ffffffff
[<8000dd40>] (__irq_svc+0x40/0x70) from [<80115b8c>] (sysfs_addrm_finish+0x24/0xd4)
[<80115b8c>] (sysfs_addrm_finish+0x24/0xd4) from [<801140fc>] (sysfs_hash_and_remove+0x4c/0x88)
[<801140fc>] (sysfs_hash_and_remove+0x4c/0x88) from [<80117454>] (sysfs_unmerge_group+0x40/0x7c)
[<80117454>] (sysfs_unmerge_group+0x40/0x7c) from [<8030b9ac>] (dpm_sysfs_remove+0x20/0x3c)
[<8030b9ac>] (dpm_sysfs_remove+0x20/0x3c) from [<8030437c>] (device_del+0x34/0x178)
[<8030437c>] (device_del+0x34/0x178) from [<80308510>] (platform_device_del+0x14/0xa8)
[<80308510>] (platform_device_del+0x14/0xa8) from [<803088b4>] (platform_device_unregister+0xc/0x18)
[<803088b4>] (platform_device_unregister+0xc/0x18) from [<7f7c0500>] (ci_hdrc_remove_device+0xc/0x20 [ci_hdrc])
[<7f7c0500>] (ci_hdrc_remove_device+0xc/0x20 [ci_hdrc]) from [<7f7d21e0>] (ci_hdrc_imx_remove+0x20/0xc8 [ci_hdrc_imx])
[<7f7d21e0>] (ci_hdrc_imx_remove+0x20/0xc8 [ci_hdrc_imx]) from [<8030827c>] (platform_drv_remove+0x18/0x1c)
[<8030827c>] (platform_drv_remove+0x18/0x1c) from [<80306b70>] (__device_release_driver+0x70/0xcc)
[<80306b70>] (__device_release_driver+0x70/0xcc) from [<80307360>] (driver_detach+0xac/0xb0)
[<80307360>] (driver_detach+0xac/0xb0) from [<803069a0>] (bus_remove_driver+0x7c/0xc0)
[<803069a0>] (bus_remove_driver+0x7c/0xc0) from [<800679d0>] (SyS_delete_module+0x144/0x1f8)
[<800679d0>] (SyS_delete_module+0x144/0x1f8) from [<8000e140>] (ret_fast_syscall+0x0/0x30)
Code: bad PC value
Signed-off-by: Peter Chen <peter.chen@freescale.com>
(cherry picked from commit 074c77681ed887825634d693d7bfed6e6919cc5c)
|
|
|
|
|
|
| |
This patch enables runtime pm support for otg fsm mode.
Signed-off-by: Li Jun <b47624@freescale.com>
|
|
|
|
|
|
|
| |
This patch adds usb charger notify condition when usb otg fsm
is enabled, do not do charger notify when doing role switch.
Signed-off-by: Li Jun <b47624@freescale.com>
|
|
|
|
|
|
| |
This patch adds a debug file for OTG vairables show.
Signed-off-by: Li Jun <b47624@freescale.com>
|
|
|
|
|
|
|
| |
This patch adds sys input to control and show OTG fsm inputs by application,
user can do host and preipheral role switch by change these inputs.
Signed-off-by: Li Jun <b47624@freescale.com>
|
|
|
|
|
|
|
| |
USB OTG interrupt handling and fsm transitions according to USB OTG
and EH 2.0.
Signed-off-by: Li Jun <b47624@freescale.com>
|
|
|
|
|
|
|
|
| |
This patch adds OTG fsm timers initialization, which use controller's 1ms
interrupt as timeout counter, also adds some local timers which are not
in otg_fsm_timer list.
Signed-off-by: Li Jun <b47624@freescale.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add OTG HNP and SRP operation functions implementation:
- charge vbus
- drive vbus
- connection signaling
- drive sof
- start data pulse
- add fsm timer
- delete fsm timer
- start host
- start gadget
Signed-off-by: Li Jun <b47624@freescale.com>
|
|
|
|
|
|
|
| |
Add b_hnp_enable request handling and enable gadget->is_otg
Acked-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Li Jun <b47624@freescale.com>
|
|
|
|
|
|
| |
Init otg_port number of otg capable host to be 1 at host start.
Signed-off-by: Li Jun <b47624@freescale.com>
|
|
|
|
|
|
| |
Leave vbus on/off hanlded by OTG fsm if in OTG mode.
Signed-off-by: Li Jun <b47624@freescale.com>
|
|
|
|
|
|
|
| |
This patch adds OTG fsm related initialization when do otg init,
add a seperate file for OTG fsm related utilities.
Signed-off-by: Li Jun <b47624@freescale.com>
|
|
|
|
|
|
|
|
| |
This patch adds device connection check before stop host for id change to be 0,
wait until there is no any devices connected, then do host stop to avoid
deadlock.
Signed-off-by: Li Jun <b47624@freescale.com>
|
|
|
|
|
|
|
|
|
|
| |
Revert "ENGR00286962-2 usb: chipidea: fix the system will be deadlock with ID
wakeup" since dedicated thread solution is some expensive, and for otg fsm
extension, work queue is requred.
This reverts commit 7d6fa1243c29562461752c2115a25cb54dc49217.
Signed-off-by: Li Jun <b47624@freescale.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
dump.
This patch adds below registers dump for debug:
- USBINTR
- USBSTS
- USBMODE
- USBCMD
- PORTSC
- OTGSC
Acked-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Li Jun <b47624@freescale.com>
|
|
|
|
|
|
|
|
|
|
|
| |
read functions.
This patch moves usb interrupt enable and status register read functions
from udc driver to core driver to use them in all ci drivers.
Acked-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Li Jun <b47624@freescale.com>
|
|
|
|
|
|
|
| |
Use a more general way to read and write otgsc register.
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Li Jun <b47624@freescale.com>
|
|
|
|
|
|
|
|
| |
LDO2p5 cannot be disabled in low power idle mode when the USB driver
enables VBUS wakeup. To identify when LDO2p5 can be disabled add a dummy
regulator that the USB driver will enable when VBUS wakeup is required.
Signed-off-by: Ranjani Vaidyanathan <Ranjani.Vaidyanathan@freescale.com>
|
|
|
|
|
|
|
|
|
| |
Some improvements and bug-fixes for imx6sx:
- Add one bit for sending resume signal using 32K OSC
- Add board level pad regulator
- HSIC also needs host quirk, add this fix for imx6sl too
Signed-off-by: Peter Chen <peter.chen@freescale.com>
|
|
|
|
|
|
|
|
|
| |
real meaning
This flag is not only used for mxs phy's bug, but also
for speical routine for other imx host operations.
Signed-off-by: Peter Chen <peter.chen@freescale.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
different phy type
For internal PHY (like UTMI), the phy clock may from internal pll,
it is on/off on the fly, the access PORTSC.PTS will hang without
phy clock. So, the usb_phy_init which will open phy clock needs to
be called before hw_phymode_configure.
See: http://marc.info/?l=linux-arm-kernel&m=139350618732108&w=2
For external PHY (like ulpi), it needs to configure portsc.pts before
visit viewport, or the viewport can't be visited. so phy_phymode_configure
needs to be called before usb_phy_init.
See: cd0b42c2a6d2a74244f0053f8960f5dad5842278
It may not the best solution, but it can work for all situations.
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Chris Ruehl <chris.ruehl@gtsys.com.hk>
Cc: shc_work@mail.ru
Cc: denis@eukrea.com
Cc: festevam@gmail.com
Signed-off-by: Peter Chen <peter.chen@freescale.com>
|
|
|
|
|
|
|
|
|
|
| |
No need to return a 'fake' return value on platform_get_irq() failure.
Just return the error code itself instead.
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
|
|
|
|
|
|
|
|
| |
This patch makes it possible to set the chipidea udc into full-speed only mode.
It is set by the oftree property "maximum-speed = full-speed".
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
|
|
|
|
|
|
|
|
| |
Use the wrapper function for retrieving the platform data instead
of accessing dev->platform_data directly. This is a cosmetic change
to make the code simpler and enhance the readability.
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|