Commit Graph

352 Commits

Author SHA1 Message Date
Felipe Balbi 9bf9e81358 usb: gadget: f_dfu: set serial number if serial# is valid
With this patch, USB Command Verifier is happy with our DFU
implementation on Chapter 9 tests.

Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
2017-02-26 13:24:30 +01:00
Felipe Balbi 949bf79e73 usb: gadget: g_dnl: fix g_dnl_set_serialnumber()
instead of only copying if strlen(s) is less than 32 characters, let's
just copy at most 31 characters regardless of the size of
serial#. This will guarantee that we always have a serial number if
serial# environment variable is set to anything.

Note that without a proper serial number, USB Command Verifier fails
our test of Device Descriptor since we will claim to have a serial
number without really providing one when requested.

Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
2017-02-26 13:24:30 +01:00
Felipe Balbi 00e9d69629 usb: gadget: f_dfu: write req->actual bytes
If last packet is short, we shouldn't write req->length bytes to
non-volatile media, we should write only what's available to us, which
is held in req->actual.

Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2017-02-26 13:24:30 +01:00
Patrick Delaunay d428776657 usb: gadget: dfu: add result for handle_getstatus()
harmonize result with other handle_XXX() functions: return int for size
remove the define RET_STAT_LEN : no more necessary

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay73@gmail.com>
2017-02-26 13:24:30 +01:00
Patrick Delaunay f11bb25245 usb: gadget: dfu: correct size for USB_REQ_DFU_GETSTATE result
return the correct size for DFU_GETSTATE result (1 byte in DFU 1.1 spec)
to avoid issue in USB protocol and the variable "value" is propagated
to req->lenght as all the in the other request with answer
- DFU_GETSTATUS
- DFU_DNLOAD
- DFU_UPLOAD
Then the buffer is correctly treated in USB driver

NB: it was the only request witch directly change "req->actual"

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay73@gmail.com>
2017-02-26 13:24:30 +01:00
Patrick Delaunay 8987012fe5 usb: gadget: dfu: add functional descriptor in descriptor set
The "DFU descriptor set" must contain the "DFU functional descriptor"
but it is missing today in U-Boot code
(cf: DFU spec 1.1, chapter 4.2 DFU Mode Descriptor Set)
This patch only allocate buffer and copy DFU functional descriptor
after interfaces.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay73@gmail.com>
2017-02-26 13:24:30 +01:00
Lokesh Vutla 65c389d279 drivers: usb: gadget: ether: Fix compiler warning
Latest gcc 6.2 compiler is throwing the below warning for am335x_baltos_defconfig
drivers/usb/gadget/ether.c:501:17: warning: 'mdlm_detail_desc' defined but not used [-Wunused-const-variable=]
 static const u8 mdlm_detail_desc[] = {

Guard mdlm_detail_desc with CONFIG_USB_ETH_SUBSET to avoid the warning

Reported-by: Dan Murphy <dmurphy@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
2017-01-17 10:26:46 +01:00
Masahiro Yamada 59ef20303a usb: dwc2-otg: remove unused variable
GCC 6.1 complains about this.

drivers/usb/gadget/dwc2_udc_otg.c:72:19: warning: 'driver_desc'
defined but not used [-Wunused-const-variable=]
 static const char driver_desc[] = DRIVER_DESC;
                   ^~~~~~~~~~~

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2017-01-17 10:26:21 +01:00
Mugunthan V N d4a3755368 drivers: usb: gadget: ether/rndis: convert driver to adopt device driver model
Adopt usb ether gadget and rndis driver to adopt driver model

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
2017-01-09 11:14:54 -07:00
Andre Przywara a7747affae usb: gadget: remove unused shortname variable
The shortname variable isn't referenced anywhere in the code, so just
remove it.

Pointed out by a GCC 6.2 default warning option.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Marek Vasut <marex@denx.de>
Acked-by: Lukasz Majewski <l.majewski@samsung.com>
2016-12-04 13:55:03 -05:00
Mugunthan V N 8269ee4f96 drivers: usb: gadget: ether: prepare driver for driver model migration
prepare driver for driver model migration

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2016-12-02 20:53:20 -07:00
Mugunthan V N ae70100c1f drivers: usb: gadget: ether: use net device priv to pass usb ether priv
Use net device priv to pass usb ether priv and use it in
net device ops callback.

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2016-12-02 20:53:20 -07:00
Mugunthan V N 5cb3b9d7c7 drivers: usb: gadget: ether: consolidate global devices to single struct
Consolidate the net device, usb eth device and gadget device
struct to single struct and a single global variable so that the
same can be passed as priv of ethernet driver.

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2016-12-02 20:53:19 -07:00
Mugunthan V N d4345aee53 drivers: usb: gadget: ether: adopt to usb driver model
Convert usb ether gadget to adopt usb driver model

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2016-12-02 20:53:19 -07:00
Mugunthan V N 17b4f308cd drivers: usb: gadget: ether: access network_started using local variable
network_started of struct eth_dev can be accessed using local
variable dev and no reason to access it with the global struct.

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2016-12-02 20:53:19 -07:00
Stefan Agner e94793c844 spl: add USB Gadget config option
Introduce USB Gadget config option. This allows to combine Makefile
entries for SPL_USBETH_SUPPORT and SPL_DFU_SUPPORT.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Acked-by: Lukasz Majewski <l.majewski@samsung.com>
Tested-by: Ravi Babu <ravibabu@ti.com>
2016-11-28 19:49:49 -05:00
Stefan Agner 5991703e88 spl: dfu: move DFU Kconfig to SPL Kconfig
The DFU Kconfig menu entries should be part of the SPL
Kconfig file. Also avoid using the top level Makefile by
moving the config dependent build artifacts to the driver/
and driver/usb/gadget/ Makfiles.

With that, DFU can be built again in SPL if
CONFIG_SPL_DFU_SUPPORT is enabled.

Fixes: 6ad6102246 ("usb:gadget: Disallow DFU in SPL for now")

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Lukasz Majewski <l.majewski@samsung.com>
2016-11-28 19:49:49 -05:00
Tom Rini 6ad6102246 usb:gadget: Disallow DFU in SPL for now
Previously, DFU was not built in for SPL and often disabled via the board
config.h file, in the SPL build.  By moving DFU to Kconfig we now need to
move this logic to the Makefile to continue to allow boards to fit within
their SPL size limit (until gcc 6 is more widespread and unused strings will
be discarded).

Signed-off-by: Tom Rini <trini@konsulko.com>
2016-09-27 10:46:20 -04:00
Masahiro Yamada 4982f46420 Move ENOTSUPP defines to include/linux/errno.h
Collect a couple of duplicated defines into a single place.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2016-09-23 22:25:43 -04:00
Masahiro Yamada 1221ce459d treewide: replace #include <asm/errno.h> with <linux/errno.h>
Now, arch/${ARCH}/include/asm/errno.h and include/linux/errno.h have
the same content.  (both just wrap <asm-generic/errno.h>)

Replace all include directives for <asm/errno.h> with <linux/errno.h>.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
[trini: Fixup include/clk.]
Signed-off-by: Tom Rini <trini@konsulko.com>
2016-09-23 17:55:42 -04:00
Steve Rae e016f0b2c2 fastboot: implement Kconfig
implement Kconfig for the 'fastboot' feature set

Signed-off-by: Steve Rae <steve.rae@raedomain.com>
2016-08-20 14:03:23 -04:00
Xu Ziyuan 9424f14183 usb: dwc2 : invalidate dcache before starting DMA
Invalidate dcache before starting the DMA to ensure coherency. In case
there are any dirty lines from the DMA buffer in the cache, subsequent
cache-line replacements may corrupt the buffer in memory while the DMA
is still going on. Cache-line replacement can happen if the CPU tries to
bring some other memory locations into the cache while the DMA is going
on.

Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Acked-by: Simon Glass <sjg@chromium.org>
2016-07-25 20:44:19 -06:00
Xu Ziyuan 4711788267 usb: dwc2-otg: adjust fifo size via platform data
The total FIFO size of some SoCs may be different from the existen, this
patch supports fifo size setting from platform data.

Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Acked-by: Simon Glass <sjg@chromium.org>
2016-07-25 20:44:19 -06:00
Steve Rae 9bc34799c8 fastboot: sparse: resync common/image-sparse.c (part 2)
- update fastboot_okay() and fastboot_fail()

This file originally came from upstream code.

While retaining the storage abstraction feature, this is the second
set of the changes required to resync with the
  cmd_flash_mmc_sparse_img()
in the file
  aboot.c
from
  https://us.codeaurora.org/cgit/quic/la/kernel/lk/plain/app/aboot/aboot.c?h=LE.BR.1.2.1

Signed-off-by: Steve Rae <srae@broadcom.com>
2016-06-27 16:37:38 -04:00
Steve Rae 64ece84854 fastboot: sparse: remove session-id logic
This "session-id" alogrithm is not required, and currently corrupts
the stored image whenever more the one "session" is required.

Signed-off-by: Steve Rae <srae@broadcom.com>
2016-06-27 16:36:33 -04:00
Steve Rae f221db0ed5 usb: dwc2_udc_otg: support 8-bit interface
Define CONFIG_USB_GADGET_DWC2_OTG_PHY_BUS_WIDTH_8 to allow the
physical interface to be 8-bit (rather than 16-bit).

Signed-off-by: Steve Rae <srae@broadcom.com>
2016-06-13 15:16:34 +02:00
Peng Fan 12ff19dbfd usb: gadget: dfu: discard dead code
Reported by Coverity:
Logically dead code (DEADCODE)
dead_error_line: Execution cannot reach this statement:
(f_dfu->strings + --i).s = ....

If calloc failed, i is still 0 and no need to call free,
so discard the dead code.

Signed-off-by: Peng Fan <van.freenix@gmail.com>
Cc: "Łukasz Majewski" <l.majewski@samsung.com>
Cc: Marek Vasut <marex@denx.de>
2016-05-06 20:06:56 +02:00
Vagrant Cascadian eae4b2b67b Fix spelling of "occurred".
Signed-off-by: Vagrant Cascadian <vagrant@debian.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
2016-05-02 18:37:09 -04:00
Roger Quadros 4d5b637843 usb: s3c-otg: Fix remaining bytes in debug messages
Remaining bytes means bytes that are not yet transferred
and not the bytes that were transferred in the last transfer.

Reported-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Roger Quadros <rogerq@ti.com>
Tested-by: Steve Rae <srae@broadcom.com>
[Test HW: bcm28155_ap board]
2016-04-25 17:56:30 +02:00
Roger Quadros 842769ea51 usb: s3c-otg: Fix short packet for request size > ep.maxpacket
Request size can be greater than ep.packet and still end in a
short packet. We need to tackle this case as end of transfer
(if short_not_ok is not set) as indicated in USB 2.0 Specification [1],
else we get stuck up on certain protocols like fastboot.

[1] - USB2.0 Specification, Section 5.3.2 Pipes

Reported-by: Steve Rae <steve.rae@broadcom.com>
Signed-off-by: Roger Quadros <rogerq@ti.com>
Tested-by: Steve Rae <steve.rae@broadcom.com>
Tested-by: Lukasz Majewski <l.majewski@samsung.com>
2016-04-25 17:56:30 +02:00
Roger Quadros ac484c5a6a fastboot: Clean up bulk-out logic
Just use ep->maxpacket to get the maxpacket size
and simplify the bulk-out maxpacket alignment.

Signed-off-by: Roger Quadros <rogerq@ti.com>
Tested-by: Steve Rae <srae@broadcom.com>
2016-04-25 17:56:30 +02:00
Roger Quadros 8b704a0e3d fastboot: Enable the respective speed endpoints at runtime
In a dual speed configuration we need to check at runtime if
we want to enable the Full-Speed or High-Speed endpoint.

Signed-off-by: Roger Quadros <rogerq@ti.com>
Acked-by: Lukasz Majewski <l.majewski@samsung.com>
Tested-by: Steve Rae <srae@broadcom.com>
[Test HW: bcm235xx board]
2016-04-25 17:56:30 +02:00
Roger Quadros 718156ad0a fastboot: Fix wMaxPacketSize for High-Speed IN endpoint
wMaxPacketSize for IN endpoing in High-Speed must be 512 and not 64.
While fixing that we do some clean ups like

- use cpu_to_le16(decimal_length) instead of hexadecimal length.
- No need to initialize bInterval to 0. Static variables are 0 initialized.
- Move descriptor setting from fastboot_add to to fastboot_bind.
- check for dual speed configuration before setting the high speed descriptors.

Signed-off-by: Roger Quadros <rogerq@ti.com>
Tested-by: Steve Rae <srae@broadcom.com>
Tested-by: Steve Rae <srae@broadcom.com> [Test HW: bcm235xx board]
2016-04-25 17:56:30 +02:00
Sam Protsenko e6c0bc0643 usb: gadget Move: CONFIG_G_DNL_* to Kconfig
And also reformat defconfigs using "make savedefconfig" rule.

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
2016-04-20 11:43:28 +02:00
Sam Protsenko aaa4a9e313 usb: gadget: Move CONFIG_USB_GADGET_DOWNLOAD to Kconfig
While at it, remove obsolete CONFIG_USBDOWNLOAD_GADGET option from some
config headers. This is also probably fixes am335x_baltos board.

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
2016-04-20 11:43:27 +02:00
Sam Protsenko 3457bbaf22 usb: gadget: Move CONFIG_USB_GADGET_DUALSPEED to Kconfig
Move CONFIG_USB_GADGET_DUALSPEED option to Kconfig and
make all UDC controllers select USB_GADGET_DUALSPEED:
  - add next options to Kconfig selecting USB_GADGET_DUALSPEED:
    - USB_GADGET_ATMEL_USBA
    - USB_GADGET_DWC2_OTG
    - USB_DWC3
    - CI_UDC
  - make USB_MUSB_GADGET select USB_GADGET_DUALSPEED

While at it, make some related fixes:
  - remove DUALSPEED from configs that don't enable gadget support:
    - kwb.h
    - tseries.h
  - add missing USB_GADGET option to next configs:
    - novena_defconfig
    - pcm051_rev*_defconfig
    - xfi3_defconfig

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
2016-04-20 11:43:27 +02:00
Sam Protsenko a59a77f863 usb: gadget: Move CONFIG_USB_GADGET_VBUS_DRAW to Kconfig
The description was borrowed from kernel. Definitions were added to
defconfig files in a way that "make savedefconfig" generates exactly
the same file as used defconfig.

Boards using 0 mA as CONFIG_USB_GADGET_VBUS_DRAW value were moved to use
2 mA (as minimal allowed by Kconfig).

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
2016-04-20 11:43:27 +02:00
John Tobias 5b718407ed USB: g_dnl: Change device class
The USB Mass Storage (ums) works in Windows, Linux and OS X (EL Capitan).
But, not in OS X (Yosemite). By applying the said patch, it extends
the ums support.

Signed-off-by: John Tobias <john.tobias.ph@gmail.com>
Tested-by: Lukasz Majewski <l.majewski@samsung.com>

Test HW: Odroid XU3 (./test/py UMS + DFU tests)

Tested-by: John Tobias <john.tobias.ph@gmail.com>

Linux:
    - Run ums to expose all my eMMC partition - shows all correctly
    - Run ums to expose only 1 partition of my eMMC - show correctly

Windows:
    - Run ums to expose all my eMMC partition - it detects but it prompts,
    if I want to format it (due to a non windows partition)
    - Run ums to expose only the FAT32 partition - it show the partition
      correctly.
2016-04-20 11:43:27 +02:00
Steve Rae cf12547385 usb: bcm_udc_otg: enable clocks
Turn on the USB OTG clocks.

Signed-off-by: Steve Rae <srae@broadcom.com>
2016-04-10 17:18:43 +02:00
Rob Herring 74322201dd fastboot: allow retrieving fastboot variables from env
Some boards need to expose device specific variable through fastboot
(to adpat the flashing script depending on hardware revision for
example).

Provide a way to expose custom fastboot variables. Note that all
variables meant to be exposed through fastboot should be be prefixed
with 'fastboot.', the variable should not exceed 32 bytes (including
the prefix and the trailing '\0') and the variable content should
fit in the response buffer (60 bytes excluding the 'OKAY' prefix and
the trailing '\0').

Signed-off-by: Rob Herring <rob.herring@linaro.org>
[Boris Brezillon: add a commit message]
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Acked-by: Steve Rae <srae@broadcom.com>
2016-04-01 17:17:40 -04:00
Sam Protsenko f9d0fd8a56 usb: gadget: Move CONFIG_USB_GADGET to Kconfig
The description was borrowed from kernel. "tristate" type was changed
to "bool" (I believe we don't support modules for u-boot yet, right?).
CONFIG_USB_GADGET requires CONFIG_USB to be defined too, so add it along
as well.

Definitions were added to defconfig files in a way that
"make savedefconfig" generates exactly the same file as used defconfig.

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
[trini: Add zynq_zc702 conversion]
Signed-off-by: Tom Rini <trini@konsulko.com>
2016-03-25 15:29:48 -04:00
Sam Protsenko 8038f6d288 usb: gadget: composite: Correct recovery path for register
In case when usb_composite_register() failed once (for whatever reason),
it will fail further even if all conditions are correct. Example:

    => fastboot 2
    Invalid Controller Index
    couldn't find an available UDC
    g_dnl_register: failed!, error: -19
    exit not allowed from main input shell.

    => fastboot 0
    g_dnl_register: failed!, error: -22
    exit not allowed from main input shell.

Despite that 0 is correct index for USB controller, "fastboot 0" command
will fail, because "composite" structure wasn't cleared properly on
previous fail (on "fastboot 2" command).

This patch fixes that erroneous behavior, allowing us to use composite
even after previous failure.

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
2016-03-01 14:47:26 +01:00
Steve Rae a18c2706f1 fastboot: update error and warning messages
Fix the formatting in error messages, and demote one error message
to a warning, as it is only informational.

Signed-off-by: Steve Rae <srae@broadcom.com>
2016-02-24 19:12:33 +01:00
Lukasz Majewski fc18f8d170 dfu: usb: f_dfu: Set deferred call for dfu_flush() function
This patch fixes situation when one would like to write large file into
medium with the file system (fat, ext4, etc).
This change sets file size limitation to the DFU internal buffer size.

Since u-boot is not supporting interrupts and seek on file systems, it
becomes challenging to store large file appropriately.

To reproduce this error - create large file (around 26 MiB) and sent it
to the target board.

Lets examine the flow of USB transactions:

0. DFU uses EP0 with 64B MPS [Max Packet Size]

1. Send file - OUT (PC->target) - dat_26MiB.img is sent with 4096 B transactions

2. Get status - OUT (PC->target) - wait for DFU_STATE_dfuDNLOAD_IDLE (0x05) sent
				   from target board - IN transaction
				   (target->PC)

3. The whole file content is sent to target - OUT (PC->target) with ZLP [Zero
					      Length Packet]

Now the interesting part starts:

4. OUT (PC->target) Setup transaction (request to share DFU state)

5. IN (target->PC) - reply the current DFU state
	- In the UDC driver the req->completion (with dfu_flush) is called
	  after successful IN transfer.
	- The dfu_flush() (called from req->completion callback) saves the
	  whole file at once (u-boot doesn't support seek on fs).
	  Such operation takes considerable time. When the file
	  is large - e.g. 26MiB - this time may be more than 5 seconds.

6. OUT (PC->target) - ZLP, is send in the same time when dfu_flush()
 writes data to eMMC memory.
 The dfu-util application has hard coded timeout on USB transaction
 completion set to 5 seconds (it uses libusb calls).

When the file to store is large (e.g. 26 MiB) the time needed to write it
may excess the dfu-util timeout and following error message will be displayed:
"unable to read DFU status" on the HOST PC console.

This change is supposed to leverage DFU's part responsible for storing files
on file systems. Other DFU operations - i.e. raw/partition write to NAND and
eMMC should work as before.

The only functional change is the error reporting. When dfu_flush() fails
the u-boot prompt will exit with error information and dfu-util application
exits afterwards as well.

Test HW:
- Odroid XU3 (Exynos5433) - test with large file
- Trats (Exynos4210) - test for regression - eMMC, raw,

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Reported-by: Alex Gdalevich <agdalevich@axion-biosystems.com>
Tested-by: Stephen Warren <swarren@nvidia.com>
Tested-by: Heiko Schocher <hs@denx.de>
2016-02-24 19:12:32 +01:00
Bin Meng a187559e3d Use correct spelling of "U-Boot"
Correct spelling of "U-Boot" shall be used in all written text
(documentation, comments in source files etc.).

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Minkyu Kang <mk7.kang@samsung.com>
2016-02-06 12:00:59 +01:00
Frank Wang 8c9b4d5598 usb: gadget: dwc2_udc_otg: modified the check condition for max packet size of ep_in in high speed
In current high speed fastboot, fs_ep_in.wMaxPacketSize is configured 64 bytes
as default, as a result, it failed to match the size at initialization stage in
usb controller.
Actually, hardware can support less than or equal to 512 bytes in high speed mode,
so I changed the condition from  '!=' to '>' to fix this issue.

Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
Tested-by: Steve Rae <srae@broadcom.com>
2016-02-04 12:38:26 +01:00
Tom Rini 5b8031ccb4 Add more SPDX-License-Identifier tags
In a number of places we had wordings of the GPL (or LGPL in a few
cases) license text that were split in such a way that it wasn't caught
previously.  Convert all of these to the correct SPDX-License-Identifier
tag.

Signed-off-by: Tom Rini <trini@konsulko.com>
2016-01-19 08:31:21 -05:00
Ye.Li 8991fdef6d usb:ci_udc: Remove ULPI setting for i.MX OTG controller
All the i.MX6, i.MX23 and i.MX28 OTG controllers only support UTMI
interface. Set to ULPI is not correct, even the controller will
reject this setting in PORTSC register.

Signed-off-by: Ye.Li <B37916@freescale.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2016-01-16 07:06:55 +01:00
Ben Whitten 192bc6948b Fix GCC format-security errors and convert sprintfs.
With format-security errors turned on, GCC picks up the use of sprintf with
a format parameter not being a string literal.

Simple uses of sprintf are also converted to use strcpy.

Signed-off-by: Ben Whitten <ben.whitten@gmail.com>
Acked-by: Wolfgang Denk <wd@denx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
2016-01-14 22:11:34 -05:00
Stephen Warren 02585eb3b5 ums: support multiple LUNs at once
Extend the ums command to accept a list of block devices. Each of these
will be exported as a separate LUN. An example use-case would be:

ums 0 mmc 0,0.1,0.2

... which would export LUNs for eMMC 0's user data, boot0, and boot1 HW
partitions. This is useful since it allows the host access to everything
on the eMMC without having to somehow stop the ums command from executing
and restart it with different parameters.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2016-01-13 21:05:19 -05:00