9
0
Fork 0
Commit Graph

219 Commits

Author SHA1 Message Date
Sascha Hauer 0831642edc Merge branch 'for-next/usb' 2014-06-04 21:04:28 +02:00
Sascha Hauer d963d61c2c usb: chipidea i.MX: relax phy_type requirements
Some USB ports only have one possiblitly for the phy_type and
the type is not specified in the devicetree in this case.
Rely on the reset default instead of failing.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-05-22 09:11:36 +02:00
Holger Schurig ab23d0bb3f commands: group 'help' output
The old output of "help" was just producing a long list, that usually
scrolled of the screen (even on a X11 terminal). This list is more
compact, and also sorted by groups.

The old output format (plus grouping) is now available with 'help -v'.

Example:

   Information commands:
     ?, devinfo, help, iomem, meminfo, version
   Boot commands:
     boot, bootm, go, loadb, loads, loadx, loady, saves, uimage
   ...

Signed-off-by: Holger Schurig <holgerschurig@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-05-14 07:59:55 +02:00
Owen Kirby 7311cc9bd2 Fix AT91 UDC driver on boards without vbus.
From 4ea2bd2e1ca18136d7cfd61643bc8d8187b1495f Mon Sep 17 00:00:00 2001
From: Owen Kirby <osk@exegin.com>
Date: Wed, 16 Apr 2014 17:45:18 -0700
Subject: [PATCH] Fix AT91 UDC driver on boards without vbus.

While porting Barebox to one of our boards, we found that the AT91 UDC driver
will fail to connect to USB hosts, and will spam the console with errors if
the VBUS pin isn't connected.

Signed-off-by: Owen Kirby <osk@exegin.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-04-23 09:24:06 +02:00
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
Sascha Hauer 64d2daa19d usb: gadget: propagate error code from usb_composite_register
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-03-19 16:29:14 +01:00
Sascha Hauer d465cb7a72 usb: gadget: set composite to NULL when usb_gadget_register_driver fails
So that it can be tried later again.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-03-19 16:29:08 +01:00
Sascha Hauer a8a08f88cc Merge branch 'for-next/misc'
Conflicts:
	common/environment.c
2014-03-07 09:25:09 +01:00
Sascha Hauer 4df69d0b6e Merge branch 'for-next/env' 2014-03-07 09:24:40 +01:00
Sascha Hauer 991a12da04 usb: dfu: Add create flag
With the create flag DFU can upload to regular, previously non existing
files.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-02-28 08:14:14 +01:00
Sascha Hauer 9b731118f9 usb: dfu: Fix spelling of flag name
DFU_FLAG_SAVE should really be named DFU_FLAG_SAFE.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-02-28 08:14:14 +01:00
Alexander Shiyan 07a6c818ef USB gadget: Remove redundant assignment
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-02-17 08:06:11 +01:00
Sascha Hauer 1e6db288d9 USB gadget: dfu: propagate error from usb_gadget_poll
So that the dfu command can bail out with an error when usb_gadget_poll
fails.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-02-13 10:40:28 +01:00
Sascha Hauer 771109df46 USB gadget: fsl: Bail out if no udc exists
When there is no udc registered bail out in usb_gadget_poll
instead of crashing the system.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-02-13 10:40:22 +01:00
Sascha Hauer 1a3315ad7d USB gadget: at91: return error when no udc is registered
When no udc is registered it is clearly an error when usb_gadget_poll
is called. Let the upper layers know that.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-02-13 10:38:56 +01:00
Lucas Stach 259b65b5ac usb: dfu: fix error path to avoid NULL ptr deref
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
Lucas Stach c26a451721 usb: ulpi: fix logic-op
Checking register bits is a bitwise operation.

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
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 303c3d1e24 gadget: at91: Fix uninitialized variable
Variable udc is used unitialized for DBG(xxx).

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-01-29 21:38:10 +01:00
Sascha Hauer 682d47d6ce usb: chipidea i.MX: add some delay after ulpi_setup
On the pcm038 the ULPI phy is found correctly, but after
a power cycle the attached devices are not found. Adding
some delay fixes this.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-01-07 11:13:59 +01:00
Sascha Hauer d35fa7f26d usb: chipidea i.MX: always print an error message when ULPI fails
The ULPI code does not print a message when the operation times
out. Add one to the caller so that he gets an idea that something
is going wrong.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-01-07 11:13:58 +01:00
Sascha Hauer db48428216 usb: chipidea i.MX: limit port init to HSIC mode
imx_chipidea_port_init() will be called during startup from
the ehci driver. Calling it before setting up the PORTSC register
is only necessary in HSIC mode.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-01-07 11:13:58 +01:00
Sascha Hauer 873b6b6892 usb: chipidea i.MX: remove unused pdata->init hook
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-01-07 11:13:58 +01:00
Alexander Aring 32a5775125 barebox: remove double semicolons
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-18 10:13:35 +01:00
Sascha Hauer b67b2671c2 treewide: Add missing includes
A lot of files rely on include/driver.h including include/of.h (and
this including include/errno.h. include the files explicitly so we can
eventually get rid of including of.h from driver.h

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-08 15:42:04 +01:00
Sascha Hauer 480782a265 Merge branch 'for-next/usb' 2013-11-07 08:31:47 +01:00
Alexander Shiyan 572f03cfb0 USB: i.MX5x: Remove usage of MXC_EHCI_INTERNAL_PHY for OTG port
i.MX5x OTG port is hardwired to the internal UTMI PHY, so having
this configurable makes no sense and helps using this port with DT.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-04 15:06:14 +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
Alexander Shiyan 139a88a337 USB: Check init/post_init errors
Host with inoperable ULPI able to bring the system into an
infinite loop. The patch adds error checking during initialization
to avoid this.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-10-22 08:53:23 +02:00
Alexander Shiyan bbef610b0f gadget: at91: Fix uninitialized variable
Variable udc is used unitialized for DBG(xxx).

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-10-22 08:51:44 +02:00
Sascha Hauer 33c56e21eb Merge branch 'for-next/misc'
Conflicts:
	commands/Makefile
2013-10-07 08:00:25 +02: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
Jean-Christophe PLAGNIOL-VILLARD e62d425517 console: drop f_caps and check the function pointer getc/putc instead
None of the driver make the difference between STDOUT and STDERR.
So we just need to check if putc or getc are filled in the console_device

save 32 bytes on versatilepb

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-09-21 09:59:16 +02:00
Sascha Hauer 8afe2cb4d4 Merge branch 'for-next-manual/oftree-linux-sync' 2013-07-02 07:08:46 +02:00
Sascha Hauer 12657cb99e Merge branch 'for-next/usb' 2013-07-01 10:14:40 +02:00
Sascha Hauer 33a6e99a38 Merge branch 'for-next/imx'
Conflicts:
	drivers/usb/imx/chipidea-imx.c
2013-07-01 09:37:04 +02:00
Sascha Hauer c6edbecd68 usb: gadget: fsl: Fix registering from chipidea driver
The fsl gadget driver wants to configure the portsc register
with information from platform_data. When registered from the
chipidea driver there is no platform_data. Fix the resulting
crash by not derefencing platform_data when NULL. In this
case the PORTSC register is not touched, it will have been
configured by the chipidea driver in this case.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-25 16:01:50 +02:00
Sascha Hauer ff3c9fa7fb ARM: i.MX51 efikasb: Switch to devicetree probing
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-25 11:52:05 +02:00
Sascha Hauer d9760dc26b usb: i.MX chipidea: probe ULPI phys later
Probe ULPI phys during USB initialization and not during driver
probe. This lowers the pressure to have the necessary board specific
setup in place early.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-25 11:52:05 +02:00
Sascha Hauer cd79b13b13 usb: ehci: Fixup efika hack for devicetree
We used to distinguish which USB port to fixup by pdev->id. This
is < 0 for devicetree probed devices all the time, so this won't
work anymore once we switch to devicetree. Do the fixup on every
port instead, it doesn't hurt.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-25 11:52:05 +02:00
Sascha Hauer 706a47fa9c usb: ehci: implement detect callback
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-21 07:41:43 +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
Sebastian Hesselbarth 511ba46157 OF: base: import parse phandle functions from Linux OF API
This imports of_parse_phandle_with_args and of_count_phandle_with_args
from Linux OF API. The slightly different of_parse_phandles_with_args
is removed and all users are converted to reflect the API change.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
2013-06-20 21:20:54 +02:00
Sebastian Hesselbarth 905f3ee7fb OF: base: sync of_find_property with linux OF API
To start synchronizing OF API of barebox with linux OF API, this adds
a length pointer to of_find_property. Also all current users of that
function are updated to reflect the API change.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
2013-06-20 17:18:01 +02:00
Lucas Stach 40c4e61554 Revert "usb: chipidea-imx: Fix usb initialization"
This breaks HSIC and has no good justification why this would
be needed for ULPI.

This reverts commit 2e7d66f526.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-17 10:16:51 +02:00
Sascha Hauer 310cb17470 usb: ulpi: Try more often to detect a phy
Some boards need some more tries to successfully detect a phy. This
happens for example on the pcm038. Try up to four times to detect a
phy.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-17 10:16:46 +02:00
Sascha Hauer 76e4198d89 usb: i.MX chipidea: Add overcurrent disable flag for i.MX6
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-05-31 15:55:58 +02:00