9
0
Fork 0
Commit Graph

30 Commits

Author SHA1 Message Date
Lucas Stach 9c63e92baa treewide: fix signedness mixups in printf format specifiers
This most likely doesn't fix any real bugs, but it's the
right thing to do and reduces the noise level with static
checkers.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-04-23 09:05:51 +02:00
Lucas Stach aa6694b542 remove redundant NULL check on free
free() already checks the pointer to be non
NULL. No need to do it again.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-02-10 08:49:55 +01:00
Alexander Shiyan 77b93d7dfe USB: i.MX: Make DT dr_mode & phy_type parameters kernel compatible
Since the mainline kernel now has its own dr_mode and phy_type DT-options
for setting modes of USB ports, do these kernel parameters compatible by
removing "barebox" prefix.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-10-30 09:52:42 +01:00
Sascha Hauer 61d6a8485d usb: Turn some printf into pr_*
So that these messages can be suppressed if necessary.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-09-27 11:14:37 +02:00
Sascha Hauer eacd5e7cc3 usb: make usb devices children of the corresponding host
To be able to find usb devices in the hardware tree.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-09-24 18:38:22 +02:00
Sascha Hauer 8f5889eb0a usb: implement a usb_host_detect to scan individual USB hosts
Currently we can only (re)scan all USB hosts. Add a function to
scan individual hosts. This is useful for implementing the detect
callback in the next patch.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-21 07:41:38 +02:00
Sascha Hauer 31879ed96f usb: move scanned status into core
A command should not be interested in the internal USB core state, so
move the state handling into the core.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-21 07:41:32 +02:00
Sascha Hauer 1e60cbaf63 usb: rename USB devices to reflect bus structure
This renames the USB devices to reflect the bus structure.
The base name for a USB device is usb<devno>. For each child
device we add a -<parent-port-no>. This makes it more easy
to identify devices.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-21 07:41:26 +02:00
Sascha Hauer bec599e5a0 usb: Add devicetree helpers
Add helpers to get the dr_mode and the phy_mode.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-05-30 12:48:01 +02:00
Sascha Hauer 7c6c61fe8e treewide: Use dev_add_param_int_ro where possible
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-11 11:48:35 +02:00
Jean-Christophe PLAGNIOL-VILLARD 1846900948 usb: add parameters info on usb device
iManufacturer = 0
        iProduct = 1
   iSerialNumber = 0
    Manufacturer =
         Product = OHCI Root Hub
    SerialNumber =
        idVendor = 0000
       idProduct = 0000

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 d1e65d2a7b Merge branch 'for-next/remove-fsf-address'
Conflicts:
	drivers/net/miidev.c
	include/miidev.h
2012-10-03 21:12:48 +02:00
Jean-Christophe PLAGNIOL-VILLARD 72b0a6503f driver: register bus
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-23 21:15:13 +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 f77269a819 Merge branch 'for-next/usb' 2012-09-05 12:59:59 +02:00
Steffen Trumtrar 7212fa7d42 usb: use ep-specific pwrgood delay
In usb_hub_configure the hub is asked for its descriptor and among other things
its bPwrOn2PwrGood time. In the actual hub_power_on function this information
was not used and a hardcoded value was used instead. For some hubs this delay
is to short. So, use the delay the hub wants.

Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-08-31 09:28:44 +02:00
Steffen Trumtrar af23372773 trivial: fix spelling in usb code
Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-08-31 09:26:39 +02:00
Sascha Hauer 0c35d2210e USB core: Allocate tmpbuf using dma_alloc
This needs to be dma save.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 12:46:25 +02:00
Sascha Hauer 95aea88175 USB core: device descriptor using dma_alloc
The device descriptor needs to be dma save.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 12:46:25 +02:00
Sascha Hauer fc52e7e480 USB core: allocate setup_packet using dma_alloc
The setup packet needs to be dma save.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 12:46:25 +02:00
Jean-Christophe PLAGNIOL-VILLARD 800f181e7a usb: fix driver name
use the usb_driver name

otherwise we will have a NULL driver entry in devinfo

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-04-23 19:51:05 +08: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 597da1b76e Merge branch 'next' 2011-10-09 03:58:49 +02:00
Rosen Kolev 108b029b68 Extended USB device matching.
Extended the USB device matching, adding checks for interface class,
interface subclass, and interface protocol.
2011-09-23 08:53:22 +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
Jean-Christophe PLAGNIOL-VILLARD 8026b62dc4 usb/core: make print dev like linux lsusb
and busnum start at 1

as this
Bus 001 Device 002: ID 0b95:7720 AX88772

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-09-20 21:12:46 +02:00
Antony Pavlov a8af2ad4f1 usb.c: warning on USB_MAXINTERFACES overflow
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-09-13 09:29:34 +02:00
Sascha Hauer 7f72417c0c usb: make locally used functions static
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-05-18 11:29:07 +02:00
Sascha Hauer 7c15f466df commands: seperate usb command from usb core
This patch makes the USB command optional and makes usb_rescan a
global function. This way we can use USB in noninteractive
environments.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-04-11 12:36:26 +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