9
0
Fork 0
Commit Graph

27 Commits

Author SHA1 Message Date
Alexander Shiyan 6a256321b8 Use new device_platform_driver() macro for drivers
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-13 09:23:28 +01:00
Sascha Hauer 22e2544809 Merge branch 'for-next/compile-log-level'
Conflicts:
	drivers/usb/host/ehci-hcd.c
2013-02-04 15:48:51 +01:00
Sascha Hauer 00c7c8ecab USB ehci: Use dev_* for messages
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-27 14:24:39 +01:00
Jean-Christophe PLAGNIOL-VILLARD e1bb118d0e ehci: if caps ressource is not provided discover it via cr_capbase
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-23 08:56:56 +01:00
Jean-Christophe PLAGNIOL-VILLARD 3cb0138d40 usb: fix for USB_ST_STALLED status reporting in ehci_submit_async()
Checking the status field of the qTD token in the current code
do not take into acount cases where endpoint stall (halted) bit
is set together with XactErr status bit. As a result clearing
stall on an endpoint won't be done if this status bit was also
set. Check for halted bit and report USB_ST_STALLED status
if the host controller also indicates endpoit stall condition.

From u-boot by Anatolij Gustschin <agust@denx.de>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-23 08:56:56 +01:00
Sascha Hauer 9239281a5e USB ehci: Add powerup fixup for EfikaSB
The EfikaSB has a bug requiring to write to an ULPI register after
powerup. It doesn't seem that this this bug is present on any other
hardware, so add a workaround directly into the driver.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-17 11:27:34 +01:00
Sascha Hauer 15fd89d0a4 USB ehci: Allow to register independently from device
The EHCI core often is part of a otg core. Allow it to be registered
separately from another driver.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-13 17:47:42 +01:00
Jean-Christophe PLAGNIOL-VILLARD 3c5327e660 switch all platform_bus device/driver registering to platform_driver/device_register
now register_driver and register_device are for bus only usage.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-10-04 15:19:12 +02:00
Sascha Hauer 77322aa896 Treewide: remove address of the Free Software Foundation
The FSF address has changed in the past. Instead of updating it
each time the address changes, just drop it completely treewide.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-17 10:57:41 +02:00
Sascha Hauer 40faf584cd USB ehci: rework cache handling
We do not need to invalidate the cache in the poll loop anymore
since the corresponding bit is now in a dma coherent area. Instead,
flush cache before hardware operation and invalidate afterwards. Put
the corresponding code inline since it's shorter.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 12:46:25 +02:00
Sascha Hauer 787fa164dd USB ehci: put fields of struct qTD directly into struct QH
This allows us to extend struct qTD with non hardware specific
fields.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 12:46:25 +02:00
Sascha Hauer 0128d99352 USB ehci: Use dma coherent buffers for qh/qtd
There's no point in syncing them manually. Instead, use
dma_alloc_coherent and skip the manual flushing/invalidating.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 12:46:25 +02:00
Sascha Hauer c907114bd4 usb ehci: Use zalloc to allocate ehci structure
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-23 22:37:07 +02:00
Sascha Hauer f70ebb28a2 USB ehci: speed up initialization
This is based on the following U-Boot commit:

commit 5f4b4f2fed3ab8590c8c06b78642f8c1467acacf
Author: Vincent Palatin <vpalatin@chromium.org>
Date:   Mon Dec 5 14:52:22 2011 -0800

    ehci: speed up initialization

    According to EHCI specification v1.0, the controller should stabilize
    the power on a port at most 20 ms after the port power bit transition.
    So, we put this setting in the virtual descriptor corresponding field,
    (bPwrOn2PwrGood = 10 => 10 x 2ms = 20ms), this saves about 500ms at each
    controller initialization/enumeration.

    Signed-off-by: Vincent Palatin <vpalatin@chromium.org>

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-12 21:38:19 +02:00
Sascha Hauer 1db7717f6b USB ehci: make cache handling simpler
for chache handling the ehci driver iterates over the hardware lists
of QHs/TDs. As we have a fixed number of maximum entries in this lists
we can allocate them as arrays and and clean/invalidate the arrays
instead which is much simpler. While at it, move the allocation to
ehci_probe so that we do not lose memory each time ehci_init is called.
Also, use memalign to allocate the QHs/TDs.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-12 21:38:15 +02:00
Antony Pavlov 1487daabf9 usb: ehci-hcd.c: fix 'value computed is not used' warning
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-10-26 13:53:13 +02:00
Sascha Hauer d25d8fe2a7 Merge branch 'usb-massstorage' into next 2011-09-28 09:14:01 +02:00
Rosen Kolev 98e43c5b30 Modified timeout in the ehci-hcd USB host driver.
Increased the asynchronous message timeout for bulk endpoints.
2011-09-23 08:53:21 +02:00
Sascha Hauer 3ee7877a48 introduce io.h
To allow for some generic io accessors introduce io.h and use
this instead of asm/io.h throughout the tree.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-09-22 19:03:05 +02:00
Sascha Hauer 06031b3342 usb: honour timeout fields
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-09-20 21:12:46 +02:00
Antony Pavlov ede7b37392 ehci-hcd.c: handle EHCI_HAS_TT in ehci_reset() during startup
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-09-19 11:23:28 +02:00
Jean-Christophe PLAGNIOL-VILLARD ee80cbcd61 resource: introduce add_usb_ehci_device to register echi device
pass the hccr and hcor register base via resource

instroduce add_generic_usb_echi_device with hccr = base + 0x100 and
hcor = base + 0x140

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2011-07-29 14:05:22 +08:00
Sascha Hauer fa9d86dfc9 usb ehci: fix wrong argument order for memset
Also, make locally used function ehci_submit_root static.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-05-18 11:27:41 +02:00
Sascha Hauer 203a5fd190 USB ehci: Set to host mode on tt capable controllers
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-01-20 09:54:33 +01:00
Michael Grzeschik b0e989f618 ehci: add remove function
and stop the ehci controller before the kernel is trying to restart it.

Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
2010-08-06 19:17:32 +02:00
Sascha Hauer 50c7d68dd8 ehci: Make has_tt configurable via platform data
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
2010-08-06 19:17:22 +02:00
Jean-Christophe PLAGNIOL-VILLARD 6f354bc067 drivers/usb: regorganisation
move to linux usb driver organisation

as following

drivers/usb/core
drivers/usb/gadget
drivers/usb/host
drivers/usb/otg

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-08-02 15:16:31 +02:00