- 11 3月, 2015 6 次提交
-
-
由 Felipe Balbi 提交于
recover is a much better name than reset, considering we don't really reset the IP, just run platform-specific babble recovery algorithm. while at that, also fix a typo in comment and add kdoc for recover memeber of platform_ops. Tested-by: NBin Liu <b-liu@ti.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Felipe Balbi 提交于
All we have to do is, really, drop session bit and let the session restart. Big thanks goes to Bin Liu <b-liu@ti.com> for inspiring this work. Tested-by: NBin Liu <b-liu@ti.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Felipe Balbi 提交于
this makes it easier to filter function traces. No functional changes. Tested-by: NBin Liu <b-liu@ti.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Felipe Balbi 提交于
We want to check if that particular bit is set. It could very well be that bootloader (or romcode) has fiddled with MUSB before us which could leave other bits set in this register. Tested-by: NBin Liu <b-liu@ti.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Felipe Balbi 提交于
musb->int_usb already contains the correct information for musb-core to handle babble. In fact, this very check was just causing a nonsensical babble interrupt storm. With this I can get test.sh to run and, even though all tests fail with timeout, that's still better than locking up the system due to IRQ storm. Also, if I remove g_zero and load g_mass_storage, then everything works fine again. Tested-by: NBin Liu <b-liu@ti.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Felipe Balbi 提交于
if reset fails, we should return a *negative* error code, not a positive value. Tested-by: NBin Liu <b-liu@ti.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
- 23 2月, 2015 2 次提交
-
-
由 Tony Lindgren 提交于
We still have a combination of legacy phys and generic phys in use so we need to support both types of phy for musb_dsps.c. Cc: Brian Hutchinson <b.hutchman@gmail.com> Signed-off-by: NTony Lindgren <tony@atomide.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Tony Lindgren 提交于
The value for the multipoint dts property is ignored when parsing with of_property_read_bool, so we currently have multipoint always set as 1 even if value 0 is specified in the dts file. Let's fix this to read the value too instead of just the property like the binding documentation says as otherwise MUSB will fail to work on devices with Mentor configuration that does not support multipoint. Cc: Brian Hutchinson <b.hutchman@gmail.com> Signed-off-by: NTony Lindgren <tony@atomide.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
- 25 11月, 2014 1 次提交
-
-
由 Tony Lindgren 提交于
This allows the endpoints to work when multiple MUSB glue layers are built in. Cc: Fabio Baltieri <fabio.baltieri@linaro.org> Cc: Lee Jones <lee.jones@linaro.org> Cc: Lars-Peter Clausen <lars@metafoo.de> Acked-by: NLinus Walleij <linus.walleij@linaro.org> Acked-by: NApelete Seketeli <apelete@seketeli.net> Signed-off-by: NTony Lindgren <tony@atomide.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
- 08 11月, 2014 1 次提交
-
-
由 Varka Bhadram 提交于
Sanity check on resource happening with devm_ioremap_resource(). Signed-off-by: NVarka Bhadram <varkab@cdac.in> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 04 11月, 2014 3 次提交
-
-
由 Antoine Tenart 提交于
Before using the PHY framework instead of the USB PHY one, we need to move the OTG state into another place, since it won't be available when USB PHY isn't used. This patch moves the OTG state into the OTG structure, and makes all the needed modifications in the drivers using the OTG state. [ balbi@ti.com : fix build regressions with phy-tahvo.c, musb_dsps.c, phy-isp1301-omap, and chipidea's debug.c ] Acked-by: NKishon Vijay Abraham I <kishon@ti.com> Acked-by: NPeter Chen <peter.chen@freescale.com> Signed-off-by: NAntoine Tenart <antoine.tenart@free-electrons.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Varka Bhadram 提交于
Sanity check on resource happening with devm_ioremap_resource(). Signed-off-by: NVarka Bhadram <varkab@cdac.in> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Peter Chen 提交于
The memory subsystem has already had similar message for it. Signed-off-by: NPeter Chen <peter.chen@freescale.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
- 23 10月, 2014 2 次提交
-
-
So testing managed to configure musb in DMA mode but not load the matching cppi41 driver for DMA. This results in |musb-hdrc musb-hdrc.0.auto: Failed to request rx1. |musb-hdrc musb-hdrc.0.auto: musb_init_controller failed with status -517 |platform musb-hdrc.0.auto: Driver musb-hdrc requests probe deferral which is "okay". Once the driver is loaded we re-try probing and everyone is happy. Until then if you try suspend say echo mem > /sys/power/state then you go boom |Unable to handle kernel NULL pointer dereference at virtual address 000003a4 |pgd = cf50c000 |[000003a4] *pgd=8f6a3831, *pte=00000000, *ppte=00000000 |Internal error: Oops: 17 [#1] ARM |PC is at dsps_suspend+0x18/0x9c [musb_dsps] |LR is at dsps_suspend+0x18/0x9c [musb_dsps] |pc : [<bf08e268>] lr : [<bf08e268>] psr: a0000013 |sp : cbd97e00 ip : c0af4394 fp : 00000000 |r10: c0831d90 r9 : 00000002 r8 : cf6da410 |r7 : c03ba4dc r6 : bf08f224 r5 : 00000000 r4 : cbc5fcd0 |r3 : bf08e250 r2 : bf08f264 r1 : cf6da410 r0 : 00000000 |[<bf08e268>] (dsps_suspend [musb_dsps]) from [<c03ba508>] (platform_pm_suspend+0x2c/0x54) |Code: e1a04000 e9900041 e2800010 eb4caa8e (e59053a4) because platform_get_drvdata(glue->musb) returns a NULL pointer as long as the device is not fully probed. Tested-by: NGeorge Cherian <george.cherian@ti.com> Signed-off-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
Commit 468bcc2a ("usb: musb: dsps: kill OTG timer on suspend") stopped the timer in suspend path but forgot the re-enable it in the resume path. This patch fixes the behaviour. Cc: <stable@vger.kernel.org> # v3.14+ Fixes 468bcc2a "usb: musb: dsps: kill OTG timer on suspend" Signed-off-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
- 16 9月, 2014 1 次提交
-
-
由 Felipe Balbi 提交于
if we don't make sure to kill the timer, it could expire after we have already gated our clocks. That will trigger a Data Abort exception because we would try to access register while clock is gated. Fix that bug. Cc: <stable@vger.kernel.org> # v3.14+ Fixes 869c5978 (usb: musb: dsps: add support for suspend and resume) Tested-by: NDave Gerlach <d-gerlach@ti.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
- 16 7月, 2014 2 次提交
-
-
由 George Cherian 提交于
Add sw_babble_control() logic to differentiate between transient babble and real babble condition. Also add the SW babble control register definitions. Babble control register logic is implemented in the latest revision of AM335x. Find whether we are running on newer silicon. The babble control register reads 0x4 by default in newer silicon as opposed to 0 in old versions of AM335x. Based on this enable the sw babble control logic. Signed-off-by: NGeorge Cherian <george.cherian@ti.com> Tested-by: NBin Liu <b-liu@ti.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 George Cherian 提交于
Currently musb_platform_reset() is only used by dsps. In case of BABBLE interrupt for other platforms the musb_platform_reset() is a NOP. In such situations no need to re-initialize the endpoints. Also in the latest silicon revision of AM335x, we do have a babble recovery mechanism without resetting the IP block. In preperation to add that support its better to have a rest_done return for musb_platform_reset(). Signed-off-by: NGeorge Cherian <george.cherian@ti.com> Tested-by: NBin Liu <b-liu@ti.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
- 01 7月, 2014 3 次提交
-
-
由 Lothar Waßmann 提交于
commit 943c1397 "usb: musb: dsps: implement ->set_mode()" should have made it possible to use the driver with boards that have the USBID pin unconnected. This doesn't actually work, since the driver uses the wrong base address to access the mode register. Furthermore it uses different base addresses in different places to access the same register (phy_utmi). Signed-off-by: NLothar Waßmann <LW@KARO-electronics.de> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 George Cherian 提交于
For DSPS platform usb_phy_vbus(_off/_on) are NOPs. So during musb_platform_reset() call usb_phy(_shutdown/_init) Signed-off-by: NGeorge Cherian <george.cherian@ti.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Lothar Waßmann 提交于
There is no reason for the register accessor functions not to adhere to the CodingStyle rules. Signed-off-by: NLothar Waßmann <LW@KARO-electronics.de> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
- 22 4月, 2014 3 次提交
-
-
由 Wolfram Sang 提交于
Depending on PM is not enough, because only PM_RUNTIME could be selected. Fixes: drivers/usb/musb/musb_dsps.c:703:12: warning: 'dsps_suspend' defined but not used [-Wunused-function] drivers/usb/musb/musb_dsps.c:721:12: warning: 'dsps_resume' defined but not used [-Wunused-function] Signed-off-by: NWolfram Sang <wsa@sang-engineering.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Daniel Mack 提交于
When the dsps isr sees a babble error, pass it down to the core for fixup. Also, provide a .reset hook so the core can call us back. A babble interrupt error occured when a USB mass storage device ("CHIPSBNK v3.3.9.1", 1e3d:2093) was disconnected from a AM33xx host. Signed-off-by: NDaniel Mack <zonque@gmail.com> Reported-by: NThomas Mellenthin <mellenthin@teufel.de> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Felipe Balbi 提交于
now that all functions match the driver name, the only missing piece is to rename the header file itself. Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
- 16 4月, 2014 1 次提交
-
-
由 Daniel Mack 提交于
When the platform initialization fails due to missing resources, it will return -EPROBE_DEFER after dsps_musb_init() has been called. dsps_musb_init() calls dsps_musb_dbg_init() to allocate the debugfs nodes. At a later point in time, the probe will be retried, and dsps_musb_dbg_init() will be called again. debugfs_create_dir() will fail this time, as the node already exists, and so the entire device probe will fail with -ENOMEM. Fix this by moving debugfs_remove_recursive() from dsps_remove() to the plaform's exit function, so it will be cleanly torn down when the probe fails. It also feels more natural this way, as .exit is the counterpart to .init. Signed-off-by: NDaniel Mack <zonque@gmail.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
- 20 2月, 2014 1 次提交
-
-
由 Markus Pargmann 提交于
debugfs files to show the contents of important dsps registers. Signed-off-by: NMarkus Pargmann <mpa@pengutronix.de> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
- 19 2月, 2014 1 次提交
-
-
由 Markus Pargmann 提交于
Replace kzalloc by devm_kzalloc and remove the kfree() calls. Signed-off-by: NMarkus Pargmann <mpa@pengutronix.de> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
- 09 1月, 2014 1 次提交
-
-
由 Paul Gortmaker 提交于
None of these files are actually using any __init type directives and hence don't need to include <linux/init.h>. Most are just a left over from __devinit and __cpuinit removal, or simply due to code getting copied from one driver to the next. Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 27 11月, 2013 4 次提交
-
-
由 Bin Liu 提交于
Only start the otg_timer in dual role mode; otherwise in peripheral mode when musb is disconnected from the host port, otg_timer starts and continuously toggles the session, which causes VBUS pulse. Signed-off-by: NBin Liu <b-liu@ti.com> Acked-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Daniel Mack 提交于
The dsps platform needs to save save some registers at suspend time and restore them after resume. This patch adds a struct for these registers, and also lets the musb core know that the core registers need to be saved as well. We also have to explicitly de-assert the port reset upon resume on this platform, but musb_port_reset() should not be called from glue layers. Hence, introduce a flag in struct musb_hdrc_config for this. Signed-off-by: NDaniel Mack <zonque@gmail.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Daniel Mack 提交于
rx_mode and tx_mode need to be read at suspend time and restored on resume for dsps platforms. So add it to the wrapper struct first, and initialize the values. Signed-off-by: NDaniel Mack <zonque@gmail.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Felipe Balbi 提交于
this will let us support broken designs such as AM335x EVM SK where ID pin isn't routed anywhere on a host port. With this we can toggle internal IDDIG signal and make sure MUSB goes into host mode as necessary. Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
- 17 10月, 2013 4 次提交
-
-
I introduced this check here because it looked wrong in HOST only configurions. The timer would remove that session bit and will never come back and so there would not be another session. Now that I played with OTG for a while I belive this workaround is only required for the OTG mode because we have to end the session and then we have to try to start manually. Therefore, this patch limits this timer to the OTG only port mode so we don't need to poll around in device only mode. Signed-off-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
According to the comments, we rely on the OTG timer because the core does not expose some important OTG details. So far this is all I know. After playing with OTG I stumbled over a problem: musb is recognized as a B-device without a problem. Whenever a cable is plugged, the VBUS rises, musb recognizes this as a starting session, sets the MUSB_DEVCTL_SESSION bit by itself and a RESET interrupt occurs, the session starts. Good. After a disconnect, the timer is started and re-starts itself because it remains in B_IDLE with the BDEVICE set. I didn't figure the the reason or the need for it. Nothing changes here except for OTG state from B to A device if the BDEVICE bit disappears. This doesn't make much sense to me because nothing happens after this. _IF_ we receive an interrupt before the state change then we may act on wrong condition. Plugging a B-device (and letting MUSB act as host) doesn't work here. The reason seems to be that the MUSB tries to start a session, it fails and then it removes the bit. So we never start as a host. This patch sets the MUSB_DEVCTL_SESSION bit in the IDLE state so musb can try to establish a session as host. After the bit is set, musb tries to start a session and if it fails it clears the bit. Therefore it will try over and over again until a session either as host or as device is established. The readout of the MUSB_DEVCTL register after the removal the MUSB_DEVCTL_SESSION (in A_WAIT_BCON) has been removed because it did not contain the BDEVICE bit set (in the second read) leading to A_IDLE. After plugging a host musb assumed that it is also a host and complained about a missing reset. However a third read of the register has has the BDEVICE bit set so it seems that it is not stable. This mostly what da8xx.c is doing except that we set the timer also after A_WAIT_BCON so the session bit can be triggered. Whit this change I was able to keep am335x-evm in OTG mode and plug in either a HOST or a DEVICE and in a random order and the device was recognized. Cc: stable@vger.kernel.org # v3.11 Signed-off-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
This patch moves dsps_musb_try_idle() before dsps_musb_enable() so the declaration (of dsps_musb_try_idle() can be removed. Signed-off-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
The timer is initialized right after musb is probed. There is actually no need to have this timer running because _nothing_ will happen until we have the gadget loaded. Also we need this timer only if we run in OTG mode _and_ we need it also after the gadget has been replaced with another one. I've been looking at am35x.c, da8xx.c, omap2430.c, tusb6010.c. da8xx seem to have the same problem as dsps and doing mostly the same thing. tusb6010 seem to do something different and do some actual "idle / power saving" work so I am not too comfortable to remove musb_platform_try_idle() from musb_gadget_setup(). Therefore this patch does not start the timer if there is no gadget active (which is at musb_gadget_setup() at time). In order to have the timer active after the gadget is loaded it will be triggered from dsps_musb_enable(). Cc: stable@vger.kernel.org # v3.11 Signed-off-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
- 12 10月, 2013 1 次提交
-
-
由 Joe Perches 提交于
These aren't necessary after switch and if blocks. Signed-off-by: NJoe Perches <joe@perches.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 01 10月, 2013 2 次提交
-
-
由 Sachin Kamat 提交于
The data structure of_match_ptr() protects is always compiled in. Hence of_match_ptr() is not needed. Signed-off-by: NSachin Kamat <sachin.kamat@linaro.org> Cc: Ravi B <ravibabu@ti.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
This went unnoticed in durin the merge window: The dsps driver creates a child device for the musb core driver _and_ attaches the of_node to it so devm_usb_get_phy_by_phandle() grabs the correct phy and attaches the devm resources to the proper device. We could also use the parent device but then devm would attach the resource to the wrong device and it would be destroyed once the parent device is gone - not the device that is used by the musb core driver. If the phy is now not available then dsps_musb_init() / devm_usb_get_phy_by_phandle() returns with EPROBE_DEFER. Since the of_node is attached it tries OF drivers as well and matches the driver against DSPS. That one creates a new child device for the musb core driver which gets probed immediately. The whole thing repeats itself until the stack overflows. I belive the same problem exists in ux500 glue code (since 313bdb11 ("usb: musb: ux500: add device tree probing support") but the drivers are now probed in the right order so they don't see it. The problem is that the dsps driver gets bound to the musb-child device due to the same of_node / matching binding. I don't really agree with having yet another child node in DT to fix this. Ideally we would have musb core driver with DT bindings and according to the binding we would select the few extra hacks / gleue layer. Therefore I suggest the driver to reject the musb-core device. Cc: Lee Jones <lee.jones@linaro.org> Tested-by: NTom Rini <trini@ti.com> Signed-off-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
- 28 8月, 2013 1 次提交
-
-
This is what I observe: On the first connect, the musb starts with DEVCTL.Session set. On disconnect, musb_core calls try_idle. That functions removes the Session bit signalizing that the session is over (something that only in OTG is required). A new device, that is plugged, is no longer recognized. I've setup a timer and checked the DEVCTL register and I haven't seen a change in VBus and I saw the B-Device bit set. After setting the IDDIG into A mode and forcing the device to behave like a A device, I didn't see a change. Neither VBUS goes to 0b11 nor does a session start request comes. In the TI-v3.2 kernel they skip to call musb_platform_try_idle() in the OTG_STATE_A_WAIT_BCON state while not in OTG mode. Since the second port hast a standard A plug the patch changes the port to run in host mode only and skips the timer which would remove DEVCTL.Session so we can reconnect to another device later. Signed-off-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-