- Jun 11, 2014
-
-
Stephen Warren authored
ci_ep_alloc_request() avoids allocating multiple request objects for ep0 by keeping a record of the first req allocated for ep0, and always returning that instead of allocating a new req. However, if this req is ever freed, the record of the previous allocation is not cleared, so ci_ep_alloc_request() will keep returning this stale pointer. Fix ci_ep_free_request() to clear the record of the previous allocation. Signed-off-by:
Stephen Warren <swarren@nvidia.com>
-
Stephen Warren authored
ci_pullup()'s !is_on path contains a cut/paste copy of udc_disconnect(). Remove the duplication by simply calling udc_disconnect() instead. Signed-off-by:
Stephen Warren <swarren@nvidia.com>
-
- Jun 01, 2014
-
-
Stephen Warren authored
handle_setup() currently assumes that the response to a Setup transaction will be an OUT transaction, and any subsequent packet (if any) will be an IN transaction. This appears to be valid in many cases; both USB enumeration and Mass Storage work OK with this restriction. However, DFU uses ep0 to transfer data in both directions. This renders the assumption invalid; when sending data from device to host, the Data Stage is an IN transaction, and the Status Stage is an OUT transaction. Enhance handle_setup() to deduce the correct direction for the USB transactions based on Setup transaction data. ep0's request object only needs to be automatically re-queued when the Data Stage completes, in order to implement the Status Stage. Once the Status Stage transaction is complete, there is no need to re-queue the USB request, so don't do that. Don't sent USB request completion callbacks for Status Stage transactions. These were queued by ci_udc itself, and only serve to confuse the USB function code. For example, f_dfu attempts to interpret the 0-length data buffers for Status Stage transactions as DFU packets. These buffers contain stale data from the previous transaction. This causes f_dfu to complain about a sequence number mismatch. Signed-off-by:
Stephen Warren <swarren@nvidia.com>
-
Stephen Warren authored
Allocate ep0's USB request object when the UDC driver is probed. This solves a couple of issues in the current code: a) A request object always exists for ep0. Prior to this patch, if setup transactions arrived in an unexpected order, handle_setup() would need to reply to a setup transaction before any ep0 usb_req was created. This issue was introduced in commit 2813006f "usb: ci_udc: allow multiple buffer allocs per ep." b) handle_ep_complete no longer /has/ to queue the ep0 request again after every single request completion. This is currently required, since handle_setup() assumes it can find some request object in ep0's request queue. This patch doesn't actually stop handle_ep_complete() from always requeueing the request, but the next patch will. Signed-off-by:
Stephen Warren <swarren@nvidia.com>
-
Stephen Warren authored
ci_udc currently points ep->desc at separate descriptors for IN and OUT. These descriptors only differ in the ep address IN/OUT field. Modify the code to use a single descriptor, and change that descriptor's ep address to indicate IN/OUT as required. This removes some data duplication. Signed-off-by:
Stephen Warren <swarren@nvidia.com>
-
Stephen Warren authored
The flipping of ep0 between IN and OUT relies on ci_ep_queue() consuming the current IN/OUT setting immediately. If this is deferred to a later point when the req is pulled out of ci_req->queue, then the IN/OUT setting may have been changed since the req was queued, and state will get out of sync. This condition doesn't occur today, but could if bugs were introduced later, and this error-check will save a lot of debugging time. Signed-off-by:
Stephen Warren <swarren@nvidia.com>
-
Stephen Warren authored
Now that we wait the correct specification-mandated time at the end of usb_hub_power_on(), I suspect that CONFIG_USB_HUB_MIN_POWER_ON_DELAY has no purpose. For cm_t35.h, we already wait longer than the original MIN_POWER_ON_DELAY, so this change is safe. For gw_ventana.h, we will wait as long as the original MIN_POWER_ON_DELAY iff pgood_delay was at least 200ms. I'm not sure if this is the case or not, hence I've CC'd relevant people to test this change. Cc: Igor Grinberg <grinberg@compulab.co.il> Cc: Tim Harvey <tharvey@gateworks.com> Signed-off-by:
Stephen Warren <swarren@nvidia.com>
-
Stephen Warren authored
usb_hub_power_on() currently waits for the maximum of (a) the hub port's power output to become good, (b) the max time the USB specification allows a device to take to connect. However, these two operations must occur in series rather than in parallel. First, the power supply ramps up to the level required to power the USB device, and then the device may take a certain amount of time to connect (assert D+/D- pullups). Related, the maximum time that a device has to assert pullups is 1s not 100ms. This is explained in "Connect Timing ECN.pdf", itself part of usb_20_042814.zip from www.usb.org. Signed-off-by:
Stephen Warren <swarren@nvidia.com>
-
Łukasz Majewski authored
Up till now the CRC32 of received data was calculated unconditionally. The standard crc32 implementation causes long delay when large images were uploaded. The "dfu_hash_algo" environment variable gives the opportunity to disable on demand the hash (crc32) calculation. It can be done without the need to recompile the u-boot binary. By default the crc32 is calculated, which means that legacy behavior has been preserved. Tests results: 400 MiB ums.img file With crc32 calculation: 65 sec [avg 6.29 MB/s] Without crc32 calculation: 25 sec [avg 16.17 MB/s] Signed-off-by:
Lukasz Majewski <l.majewski@samsung.com> Cc: Marek Vasut <marex@denx.de>
-
- May 30, 2014
-
-
git://git.denx.de/u-boot-armTom Rini authored
-
- May 29, 2014
-
-
Simon Glass authored
It doesn't seem necessary to use memory allocation in this code. The setenv() will make a copy anyway. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
bootdelay_process() never returns in some circumstances, whichs makes the control flow confusing. Change it so that the decision about how to execute the boot command is made in the main_loop() code, so it is easier to follow. Move CLI stuff to cli.c. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
Move these details from main (which doesn't care which parser is used) to cli.c where they belong. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
The main loop is easier to follow if the code is grouped into separate functions. Make this change, so that main_loop() is easier to read. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
This code seems unnecessarily complex. We really just need to check the global_data. Now that is it all in one place, and not arch-specific, this is pretty easy. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
Add a bootretry_ prefix to these two functions, and remove the need for the #ifdef around everything (it moves to the Makefile). Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
This code is only used by one board, so it seems a shame to clutter up the readline code with it. Move it into its own file. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
We now have a single entry point to the CLI, whether simple or hush. Put this in its own file. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
The autoboot code is complex and long. It deserves its own file with a simple interface from main.c. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
This makes it clear where the code resides. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
It doesn't make sense to have the simple parser and the readline code all in main. Split them out into separate files. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
Move the CLI prototypes from common.h to cli.h as part of an effort to reduce the size of common.h. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
Hush is a command-line interpreter, so rename it to make that clearer. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
Some files include hush.h but don't actually use it. Remove this where possible. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
- May 27, 2014
-
-
git://git.denx.de/u-boot-arcTom Rini authored
-
Alexey Brodkin authored
Development board for headless gateway platform from Abilis Systems. Initial commit with working UART and DW GMAC. For now with generic Ethernet PHY due to problems in Realtek PHY driver. Signed-off-by:
Alexey Brodkin <abrodkin@synopsys.com> Cc: Vineet Gupta <vgupta@synopsys.com> Cc: Christian Ruppert <christian.ruppert@abilis.com> Cc: Pierrick Hascoet <pierrick.hascoet@abilis.com>
-
Tom Rini authored
Signed-off-by:
Tom Rini <trini@ti.com>
-
Heiko Schocher authored
using UBI and DM together leads in compiler error, as both define a "struct device", so rename "struct device" in include/dm/device.h to "struct udevice", as we use linux code (MTD/UBI/UBIFS some USB code,...) and cannot change the linux "struct device" Signed-off-by:
Heiko Schocher <hs@denx.de> Cc: Simon Glass <sjg@chromium.org> Cc: Marek Vasut <marex@denx.de>
-
- May 26, 2014
-
-
Wu, Josh authored
In this configuration the environment will save in file: uboot.env of mmc card. Signed-off-by:
Josh Wu <josh.wu@atmel.com> Signed-off-by:
Andreas Bießmann <andreas.devel@googlemail.com>
-
Wu, Josh authored
Also we enable the mmc command in configuration file. As both CONFIG_CMD_MMC and CONFIG_CMD_USB use the CONFIG_DOS_PARTITION, so remove the redundant CONFIG_DOS_PARTITION definition. Signed-off-by:
Josh Wu <josh.wu@atmel.com> Signed-off-by:
Andreas Bießmann <andreas.devel@googlemail.com>
-
Wu, Josh authored
As at91 board config file will include the SoC header, so we can remove the ARM926EJS definition in board config files. Signed-off-by:
Josh Wu <josh.wu@atmel.com> Signed-off-by:
Andreas Bießmann <andreas.devel@googlemail.com>
-
Wu, Josh authored
Now the AT91FAMILY is already defined in the at91 SoC header. The at91 board config file will include the SoC header file. So we can remove the redundant AT91FAMILY definition in at91 board config files. Signed-off-by:
Josh Wu <josh.wu@atmel.com> [rebase patch] Signed-off-by:
Andreas Bießmann <andreas.devel@googlemail.com>
-
Wu, Josh authored
Signed-off-by:
Josh Wu <josh.wu@atmel.com> Signed-off-by:
Andreas Bießmann <andreas.devel@googlemail.com>
-
Wu, Josh authored
The at91x40.h is not exist. So we remove it. Signed-off-by:
Josh Wu <josh.wu@atmel.com> Signed-off-by:
Andreas Bießmann <andreas.devel@googlemail.com>
-
Andreas Bießmann authored
Signed-off-by:
Andreas Bießmann <andreas.devel@googlemail.com> Cc: Bo Shen <voice.shen@atmel.com> Tested-by:
Bo Shen <voice.shen@atmel.com>
-
Andreas Bießmann authored
For sama5d3xek we need to modify the SPL image for correct detection by ROM code. Signed-off-by:
Andreas Bießmann <andreas.devel@googlemail.com> Tested-by:
Bo Shen <voice.shen@atmel.com>
-
Andreas Bießmann authored
The new atmelimage converts a machine code BLOB to bootable ROM image. Atmel ROM has no sophisticated image format, it only checks the first 7 ARM vectors. The vectors can contain valid B or LDR opcodes, the 6'th vector contains the image size to load. Additionally the PMECC header can be written by the atmelimage target. The parameters must be given via the -n switch as a coma separated list. For example: mkimage -T atmelimage \ -n usePmecc=1,sectorPerPage=4,sectorSize=512,spareSize=64,eccBits=4,eccOffset=36 \ -d spl/u-boot-spl.bin boot.bin A provided image can be checked for correct header setup. It prints out the PMECC header parameters if it has one and the 6'th interrupt vector content. ---8<--- Image Type: ATMEL ROM-Boot Image with PMECC Header PMECC header ==================== eccOffset: 36 sectorSize: 512 eccBitReq: 4 spareSize: 64 nbSectorPerPage: 4 usePmecc: 1 ==================== 6'th vector has 17044 set --->8--- A SPL binary modified with the atmelimage mkimage target was succesfully booted on a sama5d34ek via MMC and NAND. Signed-off-by:
Andreas Bießmann <andreas.devel@googlemail.com> Cc: Bo Shen <voice.shen@atmel.com> Cc: Heiko Schocher <hs@denx.de> Tested-by:
Bo Shen <voice.shen@atmel.com>
-
Andreas Bießmann authored
Signed-off-by:
Andreas Bießmann <andreas.devel@googlemail.com> Cc: Heiko Schocher <hs@denx.de>
-
Wu, Josh authored
Signed-off-by:
Josh Wu <josh.wu@atmel.com> [fix checkpatch line length warning] Signed-off-by:
Andreas Bießmann <andreas.devel@googlemail.com>
-
Wu, Josh authored
We need check the NULL pointer as at91_pio_get_port() may return NULL. Also print a error message when at91_pio_get_port() failed otherwise we cannot notice the failure. Signed-off-by:
Josh Wu <josh.wu@atmel.com> Signed-off-by:
Andreas Bießmann <andreas.devel@googlemail.com>
-