9
0
Fork 0
Commit Graph

54 Commits

Author SHA1 Message Date
Sascha Hauer 98360be0fe Documentation: remove doxygen documentation
The doxygen documentation is long outdated. Remove it. It will
be replaced with sphinx based documentation later.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-06-26 10:09:52 +02:00
Antony Pavlov 12e8ad39b1 usb: drop unused USB_UHCI_*_ID macros
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-05-22 08:11:24 +02:00
Antony Pavlov ff66a70c74 usb: remove unimplemented usb_get_dev_index() declaration
We do not have usb_get_dev_index() function, so remove this declaration.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-05-22 08:11:24 +02: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
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
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 b986f4f1ee remove remaining references of CONFIG_BOARDINFO
With this all code uses barebox_get_model() and no longer
a compile time generated string.

Also this renames barebox_boardinfo() to barebox_get_model()
since we are going to add the corresponding _set_ function
and 'model' corresponds to the devicetree notion.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-08-16 08:40:37 +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 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
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
Alexander Shiyan 7691202bdd Remove unimplemented usb_driver_unregister declaration
We do not have usb_driver_unregister function, so remove this declaration.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-18 08:00:07 +02:00
Sascha Hauer 678832e17a Merge branch 'for-next/usb' 2013-03-04 09:21:54 +01:00
Antony Pavlov 14743045fb usb: fix build for big-endian platform
The problem was introduced in

    commit 51885a7d73
    Author: Sascha Hauer <s.hauer@pengutronix.de>
    Date:   Thu Jun 28 09:56:23 2012 +0200

    Change byte order detection mechanism to kernel style

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-03-03 16:27:53 +01:00
Sascha Hauer 0a643b3d42 USB i.MX: Add chipidea gadget support
This adds USB gadget support to the i.MX chipidea driver. Basically
we have to add a register function to the fsl udc driver and call
this from the chipidea driver if device mode is selected.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-15 16:19:56 +01:00
Sascha Hauer 298f7fc3b6 USB i.MX chipidea: implement post init support
Some controllers need an init hook after the USB controller is
started, so implement the post init hook for i.MX.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-14 09:56:50 +01:00
Sascha Hauer 80a4c202dd USB ehci: Add platform specific init calls
Some USB cores need a platform specific init hook, add it to
the ehci driver.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-14 09:56:35 +01:00
Sascha Hauer cefcb0c281 USB chipidea i.MX: Fix PTS mask for HSIC
bit25 is part of the PTS bits, so mask it out before rewriting it.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-14 09:56:30 +01:00
Sascha Hauer 752e56babf USB ULPI: Add more register/bit defines
Make the register defines for ULPI more complete. Also, Add a proper
ULPI_* Namespace to the existing defines.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-17 08:42:13 +01:00
Sascha Hauer aa537feed4 USB ULPI: Add missing ulpi_write function
We currently only have functions to read/modify registers. Add a
function to write registers.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-17 08:42:08 +01:00
Sascha Hauer a4076ddf65 USB i.MX: Add chipidea driver support
For proper USB function the usbmisc registers have to be initialized.
This patch adds a driver which matches for the usbmisc registers. This
driver is called from a new driver which binds to the USB ports to
configure the misc registers. After that the driver registers the EHCI
driver and an ULPI transceiver if necessary. Currently only host mode
is supported, but device support can be added later.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-13 22:18:46 +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
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 2263e27814 net: introduce phylib
Adapt phylib from linux

switch all the driver to it
reimplement mii bus

This will allow to have
 - phy drivers
 - to only connect the phy at then opening of the device
 - if the phy is not ready or not up fail on open

Same behaviour as in linux and will allow to share code and simplify porting.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-09-25 08:18:58 +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 dd3c898d06 Merge branch 'for-next/dma-cache-align' 2012-07-02 10:59:22 +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
Sascha Hauer 51885a7d73 Change byte order detection mechanism to kernel style
The Linux Kernel defines only one of __LITTLE_ENDIAN and
__BIG_ENDIAN. Endianess can then be tested with #ifdef __xx_ENDIAN. Userspace
always defined both __LITTLE_ENDIAN and __BIG_ENDIAN and byteorder can then
be tested with #if __BYTE_ORDER == __xx_ENDIAN.

As we tend to use a lot of Kernel code in barebox we switch to use the kernel
way of determing the byte order.

As this always causes a lot of confusion add a check to include/common.h to
make sure only one of __LITTLE_ENDIAN and __BIG_ENDIAN is defined.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-28 13:49:16 +02:00
Antony Pavlov c837b8e19e usb: set MAXINTERFACES = 16
Tegra2 needs MAXINTERFACES > 8, so increase the macro's value.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-29 10:39:17 +02:00
Alexander Shiyan 9d9724e178 Completely migrate option ISP1504 to ULPI
Since we do not have ISP1504-related functions, we migrated to ULPI.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-02 09:32:54 +02:00
Alexander Shiyan a2623f1712 Rename function ulpi_init to ulpi_detect
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-02 09:32:53 +02:00
Alexander Shiyan bafda33463 Move set_vbus_power code to ULPI driver
This is ULPI-specific, not ISP1504.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-02 09:32:53 +02:00
Alexander Shiyan 2079f13611 Add ULPI detection function.
Added ULPI detection function.
Same function from isp1504 driver removed.
Used implementation from Linux kernel.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-02 09:32:53 +02:00
Alexander Shiyan 9c01d10dab Rename definitions for ULPI registers
These registers can be used for any standart ULPI chip,
not only for ISP1504.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-02 09:32:53 +02:00
Jean-Christophe PLAGNIOL-VILLARD c40f026947 driver: switch driver_d name to const char*
this will allow to save 200 bytes on a9g20 and 180 bytes on ti xlaoder

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-01-11 21:22:34 +08:00
Eric Bénard f7aaa22493 serial gadget: enable/disable on request
- add a usbserial command to enable/disable the serial gadget
- allow dfu and usbserial to cohexist in the same barebox
- add a timeout in u_serial so that we don't get locked if the user
enable usbserial from a UART console but doesn't consume the data
on the usbserial port created on the PC
- remove debug or verbose printf
- tested on i.MX25 & i.MX35 & usb-a926x

Signed-off-by: Eric Bénard <eric@eukrea.com>
Tested-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-01-04 14:18:46 +01: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
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
Sascha Hauer 0371229f3a usb: add missing byteorder include
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-01-07 10:38:36 +01:00
Krzysztof Halasa 29ca79d0d5 Fix usage of __LITTLE_ENDIAN macro.
Fix usage of __LITTLE_ENDIAN macro.
Both __LITTLE_ENDIAN and __BIG_ENDIAN are always defined by
include/linux/byteorder/generic.h, checking for their existence is
pointless.

Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-12-21 09:02:41 +01:00
Jean-Christophe PLAGNIOL-VILLARD 12f396a8b0 net: rework the mii support
this rework is done in order to add a phylib and allow to have phy driver support

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-08-27 14:36:03 +02:00
Michael Grzeschik f1329a1500 usb: add twl4030 phy support
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-08-06 19:17:36 +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
Sascha Hauer 40aad62d1c Merge remote branch 'origin/assorted-pu' into next 2010-06-28 10:35:58 +02:00
Sascha Hauer 57b56a989f ehci: Make has_tt configurable via platform data
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-06-24 11:41:15 +02:00
Sascha Hauer 322bace5fb usbnet: remove unused dev member in struct usbnet
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-06-24 11:36:42 +02:00
Juergen Beisert dac84c7b9d documentation updates
Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-12-15 11:32:02 +01:00