Michal Simek [Thu, 27 Mar 2014 09:06:43 +0000 (10:06 +0100)]
ARM: zynq: slcr: Fix incorrect commentary
Fix c&p error in zynq_slcr_devcfg_enable() commentary
and extending it with description according
to Zynq TRM also in zynq_slcr_devcfg_disable().
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Fri, 25 Apr 2014 10:15:40 +0000 (12:15 +0200)]
ARM: zynq: Call zynq board_init() in SPL
Call board_init() if SPL is configured with CONFIG_SPL_BOARD_INIT.
Signed-off-by: Michal Simek <monstr@monstr.eu>
Michal Simek [Wed, 4 Sep 2013 14:51:33 +0000 (16:51 +0200)]
ARM: zynq: Do not use half memory size for ECC case
Memory size should be specified without ECC place.
If you need to have half memory size, please change
u-boot configuration.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Siva Durga Prasad Paladugu [Fri, 29 Nov 2013 13:31:25 +0000 (19:01 +0530)]
ARM: zynq: Added efuse status register base address
Added efuse status register base address. This register
is used for determining whether efuse was blown or not.
Also, added the zynq_get_silicon_version() to get the
silicon version of the zynq board.
Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Fri, 25 Apr 2014 11:51:17 +0000 (13:51 +0200)]
ARM: zynq: Remove sparse warnings
Warnings:
board/xilinx/zynq/board.c:17:13: warning: symbol 'fpga' was not declared. Should it be static?
board/xilinx/zynq/board.c:20:13: warning: symbol 'fpga010' was not declared. Should it be static?
board/xilinx/zynq/board.c:21:13: warning: symbol 'fpga015' was not declared. Should it be static?
board/xilinx/zynq/board.c:22:13: warning: symbol 'fpga020' was not declared. Should it be static?
board/xilinx/zynq/board.c:23:13: warning: symbol 'fpga030' was not declared. Should it be static?
board/xilinx/zynq/board.c:24:13: warning: symbol 'fpga045' was not declared. Should it be static?
board/xilinx/zynq/board.c:25:13: warning: symbol 'fpga100' was not declared. Should it be static?
board/xilinx/zynq/board.c:120:5: warning: symbol 'board_mmc_init' was not declared. Should it be static?
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Fri, 25 Apr 2014 12:19:00 +0000 (14:19 +0200)]
ARM: zynq: Fix sparse warning in ddrc.c
Warning:
arch/arm/cpu/armv7/zynq/ddrc.c:43:24: warning: Using plain integer as NULL pointer
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Fri, 25 Apr 2014 11:48:08 +0000 (13:48 +0200)]
ARM: zynq: Fix sparse warnings in slcr.c
Warnings:
arch/arm/cpu/armv7/zynq/slcr.c:21:6: warning: symbol 'zynq_slcr_lock' was not declared. Should it be static?
arch/arm/cpu/armv7/zynq/slcr.c:27:6: warning: symbol 'zynq_slcr_unlock' was not declared. Should it be static?
arch/arm/cpu/armv7/zynq/slcr.c:34:6: warning: symbol 'zynq_slcr_cpu_reset' was not declared. Should it be static?
arch/arm/cpu/armv7/zynq/slcr.c:54:6: warning: symbol 'zynq_slcr_gem_clk_setup' was not declared. Should it be static?
arch/arm/cpu/armv7/zynq/slcr.c:81:6: warning: symbol 'zynq_slcr_devcfg_disable' was not declared. Should it be static?
arch/arm/cpu/armv7/zynq/slcr.c:94:6: warning: symbol 'zynq_slcr_devcfg_enable' was not declared. Should it be static?
arch/arm/cpu/armv7/zynq/slcr.c:107:5: warning: symbol 'zynq_slcr_get_boot_mode' was not declared. Should it be static?
arch/arm/cpu/armv7/zynq/slcr.c:113:5: warning: symbol 'zynq_slcr_get_idcode' was not declared. Should it be static?
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Tom Rini [Tue, 13 May 2014 11:34:08 +0000 (07:34 -0400)]
Merge branch 'fpga' of git://denx.de/git/u-boot-microblaze
Tom Rini [Tue, 13 May 2014 11:31:00 +0000 (07:31 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-video
Siva Durga Prasad Paladugu [Thu, 13 Mar 2014 06:27:34 +0000 (11:57 +0530)]
fpga: zynq: Use helper function zynq_validate_bitstream
Use helper function zynq_validate_bitstream so that the
code can be reused easily for different cases of dma transfer.
Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Siva Durga Prasad Paladugu [Wed, 12 Mar 2014 11:39:26 +0000 (17:09 +0530)]
fpga: zynq: Use helper functions for zynq dma
Use zynq_dma_xfer_init, zynq_align_dma_buffer,
zynq_dma_transfer helper function performing dma
transfers so that the code can be reused easily for
different cases of dma transfer.
Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Fri, 25 Apr 2014 11:51:58 +0000 (13:51 +0200)]
fpga: zynq: Remove sparse warnings
Warnings:
drivers/fpga/zynqpl.c:150:32: warning: Using plain integer as NULL pointer
drivers/fpga/zynqpl.c:152:16: warning: Using plain integer as NULL pointer
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Thu, 13 Mar 2014 12:07:57 +0000 (13:07 +0100)]
fpga: xilinx: Simplify load/dump/info function handling
Connect FPGA version with appropriate operations
to remove huge switch-cases for every FPGA family.
Tested on Zynq. Spartan2/Spartan3/Virtex2 just compile test.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Thu, 13 Mar 2014 11:58:20 +0000 (12:58 +0100)]
fpga: xilinx: Fix the rest of CamelCases
No functional changes.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Thu, 13 Mar 2014 11:49:21 +0000 (12:49 +0100)]
fpga: xilinx: Avoid CamelCase for in Xilinx_desc
No functional changes.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Thu, 13 Mar 2014 10:33:36 +0000 (11:33 +0100)]
fpga: virtex2: Avoid CamelCase
No functional changes.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Thu, 13 Mar 2014 10:28:42 +0000 (11:28 +0100)]
fpga: spartan3: Avoid CamelCase
No functional changes.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Thu, 13 Mar 2014 10:23:43 +0000 (11:23 +0100)]
fpga: spartan2: Avoid CamelCase
No functional changes.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Thu, 24 Apr 2014 13:24:28 +0000 (15:24 +0200)]
kbuild: Fix trailing whitespaces
Trivial fix.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Ian Campbell [Mon, 28 Apr 2014 19:14:05 +0000 (20:14 +0100)]
net/designware: call phy_connect_dev() to properly setup phylib device
This sets up the linkage from the phydev back to the ethernet device. This
symptom of not doing this which I noticed was:
<NULL> Waiting for PHY auto negotiation to complete....
rather than:
dwmac.
1c50000 Waiting for PHY auto negotiation to complete....
Signed-off-by: Ian Campbell <ijc@hellion.org.uk>
Cc: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
Fabio Estevam [Mon, 12 May 2014 16:01:51 +0000 (13:01 -0300)]
boards.cfg: Keep entries sorted
Run "tools/reformat.py -i -d '-' -s 8 <boards.cfg >boards0.cfg && mv boards0
in order to keep the entries sorted.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Wu, Josh [Thu, 8 May 2014 08:14:07 +0000 (16:14 +0800)]
fs/fat: correct FAT16/12 file finding in root dir
When write a file into FAT file system, it will search a match file in
root dir. So the find_directory_entry() will get the first cluster of
root dir content and search the directory item one by one. If the file
is not found, we will call get_fatent_value() to get next cluster of root
dir via lookup the FAT table and continue the search.
The issue is in FAT16/12 system, we cannot get root dir's next clust
from FAT table. The FAT table only be use to find the clust of data
aera in FAT16/12.
In FAT16/12 if the clust is in root dir, the clust number is a negative
number or 0, 1. Since root dir is located in front of the data area.
Data area start clust #2. So the root dir clust number should < 2.
This patch will check above situation before call get_fatenv_value().
If curclust is < 2, include minus number, we just increase one on the
curclust since root dir is in continous cluster.
The patch also add a sanity check for entry in get_fatenv_value().
Signed-off-by: Josh Wu <josh.wu@atmel.com>
Wu, Josh [Thu, 8 May 2014 08:14:06 +0000 (16:14 +0800)]
fs: fat_write: fix the incorrect last cluster checking
In fat_write.c, the last clust condition check is incorrect:
if ((curclust >= 0xffffff8) || (curclust >= 0xfff8)) {
... ...
}
For example, in FAT32 if curclust is 0x11000. It is a valid clust.
But on above condition check, it will be think as a last clust.
So the correct last clust check should be:
in fat32, curclust >= 0xffffff8
in fat16, curclust >= 0xfff8
in fat12, curclust >= 0xff8
This patch correct the last clust check.
Signed-off-by: Josh Wu <josh.wu@atmel.com>
Wu, Josh [Thu, 8 May 2014 08:14:05 +0000 (16:14 +0800)]
fs/fat: add fat12 cluster check
Signed-off-by: Josh Wu <josh.wu@atmel.com>
Łukasz Majewski [Tue, 6 May 2014 07:36:05 +0000 (09:36 +0200)]
fs:ext4:write:fix: Reinitialize global variables after updating a file
This bug shows up when file stored on the ext4 file system is updated.
The ext4fs_delete_file() is responsible for deleting file's (e.g. uImage)
data.
However some global data (especially ext4fs_indir2_block), which is used
during file deletion are left unchanged.
The ext4fs_indir2_block pointer stores reference to old ext4 double
indirect allocated blocks. When it is unchanged, after file deletion,
ext4fs_write_file() uses the same pointer (since it is already initialized
- i.e. not NULL) to return number of blocks to write. This trunks larger
file when previous one was smaller.
Lets consider following scenario:
1. Flash target with ext4 formatted boot.img (which has uImage [*] on itself)
2. Developer wants to upload their custom uImage [**]
- When new uImage [**] is smaller than the [*] - everything works
correctly - we are able to store the whole smaller file with corrupted
ext4fs_indir2_block pointer
- When new uImage [**] is larger than the [*] - theCRC is corrupted,
since truncation on data stored at eMMC was done.
3. When uImage CRC error appears, then reboot and LTHOR/DFU reflashing causes
proper setting of ext4fs_indir2_block() and after that uImage[**]
is successfully stored (correct uImage [*] metadata is stored at an
eMMC on the first flashing).
Due to above the bug was very difficult to reproduce.
This patch sets default values for all ext4fs_indir* pointers/variables.
Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Łukasz Majewski [Tue, 6 May 2014 07:36:04 +0000 (09:36 +0200)]
fs:ext4:cleanup: Remove superfluous code
Code responsible for handling situation when ext4 has block size of 1024B
can be ordered to take less space.
This patch does that for ext4 common and write files.
Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Steve Rae [Mon, 5 May 2014 20:00:08 +0000 (13:00 -0700)]
disk: part_efi: add support for the Backup GPT
Check the Backup GPT table if the Primary GPT table is invalid.
Renamed "Secondary GPT" to "Backup GPT" as per:
UEFI Specification (Version 2.3.1, Errata A)
Signed-off-by: Steve Rae <srae@broadcom.com>
York Sun [Sat, 3 May 2014 00:28:05 +0000 (17:28 -0700)]
common/board_f: Fix size variable
DRAM size should use 64-bit variable when the size could be more than 4GB.
Caught and verified on P4080DS with 4GB DDR.
Signed-off-by: York Sun <yorksun@freescale.com>
Acked-by: Simon Glass <sjg@chromium.org>
York Sun [Sat, 3 May 2014 00:28:04 +0000 (17:28 -0700)]
common/board_f: Initialized global data for generic board
Some platforms (tested on mpc85xx, mpc86xx) use global data before calling
function baord_inti_f(). The data should not be cleared later. Any arch
which uses global data in generic board board_init_f() should define
CONFIG_SYS_GENERIC_GLOBAL_DATA.
Signed-off-by: York Sun <yorksun@freescale.com>
CC: Scott Wood <scottwood@freescale.com>
CC: Simon Glass <sjg@chromium.org>
CC: Albert ARIBAUD <albert.u.boot@aribaud.net>
Acked-by: Simon Glass <sjg@chromium.org>
Ralph Siemsen [Thu, 1 May 2014 18:18:41 +0000 (14:18 -0400)]
Trivial fix to .gitignore for spl/Makefile
Trivial fix to .gitignore for spl/Makefile
According to the gitignore man page:
"An optional prefix "!" which negates the pattern; any matching file
excluded by a previous pattern will become included again."
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
So the directory exclude "/spl/*" must come before the exception
for spl/Makefile otherwise it has no effect.
Signed-off-by: Ralph Siemsen <ralphs@netwinder.org>
Tested-by: Masahiro Yamada <yamada.m@jp.panasonic.com> [on git v1.7.9.5 / v1.8.3.2]
Tom Rini [Thu, 1 May 2014 14:01:08 +0000 (10:01 -0400)]
cmd_bootm.c: Only say XIP image when load is image_start
We say we have an XIP (in this case, image loaded at desired execution
address) when the image header has been offset in the load. It's
possible that in some cases executing the header is non-fatal but that's
not true in many other cases.
Signed-off-by: Tom Rini <trini@ti.com>
Marek Vasut [Mon, 28 Apr 2014 09:56:30 +0000 (11:56 +0200)]
tools: env: Add aes.c placeholder
Add missing aes.c placeholder which includes lib/aes.c . Without this
one, tools/env/ will fail to build.
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
Cc: Masahiro Yamada <yamada.m@jp.panasonic.com>
Tested-by: Alexey Brodkin <abrodkin@synopsys.com>
Tested-by: Heiko Schocher <hs@denx.de>
Masahiro Yamada [Mon, 28 Apr 2014 08:45:05 +0000 (17:45 +0900)]
nand_spl: remove unused linker scripts u-boot-nand.lds
Commit
345b77ba removed some nand_spl boards but
it missed to delete linker scripts.
These linker scripts are not used now.
And one more fix:
amcc/acadia does not support nand_spl anymore, so remove
#if !defined(CONFIG_NAND_U_BOOT) ... #endif
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Stefan Roese <sr@denx.de>
Acked-by: Stefan Roese <sr@denx.de>
Masahiro Yamada [Mon, 28 Apr 2014 01:18:34 +0000 (10:18 +0900)]
config: remove platform CONFIG_SYS_HZ definition part 4
Some new boards define CONFIG_SYS_HZ again! Remove.
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Bo Shen <voice.shen@atmel.com>
Masahiro Yamada [Mon, 28 Apr 2014 01:17:10 +0000 (10:17 +0900)]
cosmetic: delete misleading comment /* CONFIG_BOARDDIR */
CONFIG_BOARDDIR is not referenced in these linker scripts.
The comment /* CONFIG_BOARDDIR */ is misleading.
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Kristian Otnes [Fri, 25 Apr 2014 13:35:43 +0000 (15:35 +0200)]
hush shell: Avoid string write overflow when entering max cmd length
console_buffer array is defined to be CONFIG_SYS_CBSIZE + 1 long,
whereas the_command array only CONFIG_SYS_CBSIZE long. Subsequent
use of strcpy(the_command, console_buffer) will write final \0
terminating byte outside the_command array when entering a command
of max length.
Signed-off-by: Kristian Otnes <kotnes <at> cisco <dot> com>
Masahiro Yamada [Fri, 25 Apr 2014 12:54:31 +0000 (21:54 +0900)]
kbuild: allow null board for spl build
Commit
33a02da0 supported "<none>" for the board field of boards.cfg.
But it missed to modify spl/Makefile.
This commit provides the flexibility so we can use "<none>" board
in SPL too.
Manish Badarkhe [Thu, 24 Apr 2014 03:25:07 +0000 (08:55 +0530)]
tps6586x: staticize funtions
Make funtions static which are locally used in file.
Signed-off-by: Manish Badarkhe <badarkhe.manish@gmail.com>
Fabio Estevam [Tue, 22 Apr 2014 18:45:42 +0000 (15:45 -0300)]
doc: README.generic-board: Fix typo
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Simon Glass <sjg@chromium.org>
Andreas Bießmann [Sun, 20 Apr 2014 08:34:15 +0000 (10:34 +0200)]
lib/sha256: fix compile on some hosts
Commit
2842c1c24269a05142802d25520e7cb9035e456c introduced lib/sha256 into
mkimage. Since then it will be compiled with HOSTCC which may produce errors
on some systems. Most BSD systems (like OS X for me) do not ship a
linux/string.h which will lead to take the U-Boot provided
include/linux/string.h in the end. This header howver is completely wrong
here. Just take the string.h if compiling with HOSTCC and linux/string.h when
not.
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
Cc: Heiko Schocher <hs@denx.de>
Acked-by: Heiko Schocher<hs@denx.de>
Masahiro Yamada [Fri, 18 Apr 2014 10:09:51 +0000 (19:09 +0900)]
kbuild: build with -Werror=date-time if the compiler supports it
Using __DATE__, __TIME__ would make the build non-deterministic.
If the code needs to refer to build date/time, use U_BOOT_DATE and
U_BOOT_TIME in include/generated/timestamp_autogenerated.h instead.
This commit has been imported from Linux Kernel,
which should be applied to U-Boot too:
commit
fe7c36c7bde12190341722af69358e42171162f3
Author: Josh Triplett <josh@joshtriplett.org>
Date: Mon Dec 23 13:56:06 2013 -0800
Makefile: Build with -Werror=date-time if the compiler supports it
GCC 4.9 and newer have a new warning -Wdate-time, which warns on any use
of __DATE__, __TIME__, or __TIMESTAMP__, which would make the build
non-deterministic. Now that the kernel does not use any of those
macros, turn on -Werror=date-time if available, to keep it that way.
The kernel already (optionally) records this information at build time
in a single place; other kernel code should not duplicate that.
Signed-off-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Masahiro Yamada [Fri, 18 Apr 2014 10:09:50 +0000 (19:09 +0900)]
fs: ubifs: drop __DATE__ and __TIME__
__DATE__ and __TIME__ makes the build non-deterministic.
Drop the debug message using them.
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Masahiro Yamada [Fri, 18 Apr 2014 10:09:49 +0000 (19:09 +0900)]
blackfin: replace bfin_gen_rand_mac() with eth_random_addr()
bfin_gen_rand_mac() uses __DATE__ as the seed for random ethernet
address. This makes the build non-deterministic.
In the first place, it should not be implemented as a Bfin-specific
function. Use eth_random_addr() instead.
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Sonic Zhang <sonic.zhang@analog.com>
Masahiro Yamada [Fri, 18 Apr 2014 10:09:48 +0000 (19:09 +0900)]
net: rename and refactor eth_rand_ethaddr() function
Some functions in include/net.h are ported from
include/linux/etherdevice.h of Linux Kernel.
For ex.
is_zero_ether_addr()
is_multicast_ether_addr()
is_broadcast_ether_addr()
is_valid_ether_addr();
So, we should use the same function name as that of Linux Kernel,
eth_rand_addr(), for consistency.
Besides, eth_rand_addr() has been implemented as an inline function.
So it should not be surrounded by #ifdef CONFIG_RANDOM_MACADDR.
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Masahiro Yamada [Fri, 18 Apr 2014 10:09:47 +0000 (19:09 +0900)]
rand: do not surround function declarations by #ifdef
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Masahiro Yamada [Fri, 18 Apr 2014 08:46:13 +0000 (17:46 +0900)]
cmd_time: do not show ticks
The command "time" shows the execution time of the command given
to the argument, like this:
time: 45.293 seconds, 45293 ticks
Since we adopted CONFIG_SYS_HZ = 1000 for all boards,
we always have a simple formula: "1 tick = 0.0001 second".
Showing ticks looks almost redundant.
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Shengzhou Liu [Fri, 11 Apr 2014 08:14:17 +0000 (16:14 +0800)]
net/phy: enable get_phy_id redefinable
As some PHYs have non-standard PHY ID registers, PHY Id can't
be read correctly by current get_phy_id function, so we enable
get_phy_id redefinable to permit specific PHY driver having own
specific get_phy_id function.
Signed-off-by: Shengzhou Liu <Shengzhou.Liu@freescale.com>
Xiaobo Xie [Fri, 11 Apr 2014 08:03:11 +0000 (16:03 +0800)]
AR8035/phy: Enable autonegotiation function for ar8035
Function "genphy_parse_link()" used "if (mii_reg & BMSR_ANEGCAPABLE)" before,
but used "if (phydev->supported & SUPPORTED_Autoneg)" now.
So assign "phydev->supported" to "phydev->drv->features" for ar8035
to enable autonegotiation. Then removed the genphy_config_aneg() function.
Signed-off-by: Xie Xiaobo <X.Xie@freescale.com>
Karicheri, Muralidharan [Wed, 9 Apr 2014 19:38:46 +0000 (15:38 -0400)]
serial: nsl16550: add hw flow control support
keystone serial hw support hw flow control. This patch
enables hw flow control for keystone EVMs as an optional
feature based on CONFIG_SERIAL_HW_FLOW_CONTROL.
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Nobuhiro Iwamatsu [Tue, 8 Apr 2014 02:12:46 +0000 (11:12 +0900)]
fs: fat: Fix cache align error message in fatwrite
Use of malloc of do_fat_write() causes cache error on ARM v7 platforms.
Perhaps, the same problem will occur at any other CPUs.
This replaces malloc with memalign to fix cache buffer alignment.
Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Yoshiyuki Ito <yoshiyuki.ito.ub@renesas.com>
Tested-by: Hector Palacios <hector.palacios@digi.com>
Masahiro Yamada [Fri, 4 Apr 2014 11:09:58 +0000 (20:09 +0900)]
bd_info: remove bi_barudrate member from struct bd_info
gd->bd->bi_baudrate is a copy of gd->baudrate.
Since baudrate is a common feature for all architectures,
keep gd->baudrate only.
It is true that bi_baudrate was passed to the kernel in that structure
but it was a long time ago.
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Tom Rini <trini@ti.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Heiko Schocher <hs@denx.de>
Acked-by: Michal Simek <monstr@monstr.eu> (For microblaze)
Tom Rini [Mon, 12 May 2014 12:54:13 +0000 (08:54 -0400)]
Prepare v2014.07-rc1
Signed-off-by: Tom Rini <trini@ti.com>
Tom Rini [Fri, 9 May 2014 22:48:26 +0000 (18:48 -0400)]
Merge branch 'tom' of git://git.denx.de/u-boot-x86
Masahiro Yamada [Mon, 21 Apr 2014 09:50:41 +0000 (18:50 +0900)]
sandbox: ignore sandbox.dtb
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Simon Glass <sjg@chromium.org>
Acked-by: Simon Glass <sjg@chromium.org>
Masahiro Yamada [Mon, 21 Apr 2014 09:39:35 +0000 (18:39 +0900)]
sandbox: move source files from board/ to arch/sandbox/
Prior to commit
33a02da0, all boards must have board/${BOARD}/
or board/${VENDOR}/${BOARD}/ directory.
Now this rule is obsolete.
It looks weird that sandbox defines "vendor" and "board" just for
meeting the old U-Boot directory structure.
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Simon Glass <sjg@chromium.org>
Simon Glass [Sun, 20 Apr 2014 16:50:14 +0000 (10:50 -0600)]
patman: Avoid duplicate sign-offs
Keep track of all Signed-off-by tags in a commit and silently suppress any
duplicates.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sun, 20 Apr 2014 16:50:13 +0000 (10:50 -0600)]
patman: Deal with 'git apply' failures correctly
This sort of failure is rare, but the code to deal with it is wrong.
Fix it.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sat, 22 Mar 2014 23:12:59 +0000 (17:12 -0600)]
sandbox: Update and expand the README
Now that sandbox has a good base of features, the README is quite out of
date. Update it, and document the new features.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sat, 22 Mar 2014 23:12:58 +0000 (17:12 -0600)]
sandbox: Provide a build option to avoid using SDL
Some machines do not have SDL libraries installed, and it is still useful
to build sandbox without LCD/keyboard support.
Add an option for this, used as follows:
make sandbox_config all NO_SDL=1
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sat, 26 Oct 2013 05:01:32 +0000 (23:01 -0600)]
Make 'run' use run_command_list() instead of run_command()
In the case where an environment variable spans multiple lines, we should
use run_command_list() so that all lines are executed. This shold be
backwards compatible with existing behaviour for existing scripts.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sat, 26 Oct 2013 05:01:31 +0000 (23:01 -0600)]
sandbox: Support 'env import' and 'env export'
Adjust the code for these commands so that they work on sandbox.
Signed-off-by: Simon Glass <sjg@chromium.org>
(Adjusted to fix minor merge comflict, when applied)
Change-Id: I987dee6194cd5c83f82604caf894fc85e4eb71a8
Tom Rini [Fri, 9 May 2014 15:18:45 +0000 (11:18 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-arm
Tom Rini [Fri, 9 May 2014 15:09:59 +0000 (11:09 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-sparc
Albert ARIBAUD [Fri, 9 May 2014 08:47:05 +0000 (10:47 +0200)]
Merge branch 'u-boot/master'
Conflicts:
drivers/net/Makefile
(trivial merge)
Daniel Hellstrom [Thu, 8 May 2014 16:52:37 +0000 (18:52 +0200)]
leon: implement missing get_tbclk()
Without this patch SPARC/LEON does not build.
Reported-by: Tom Rini <trini@ti.com>
Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
Daniel Hellstrom [Thu, 8 May 2014 17:16:14 +0000 (19:16 +0200)]
leon: use CONFIG_SYS_HZ to config timer prescaler
Before it was hardcoded to 1000 ticks per second.
Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
Michal Simek [Fri, 25 Apr 2014 11:46:28 +0000 (13:46 +0200)]
serial: zynq: Fix typo in suffix function name
's/zynq_serial_initalize/zynq_serial_initialize/g'
serial_initialize is used by all serial drivers.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Fri, 25 Apr 2014 11:45:08 +0000 (13:45 +0200)]
serial: zynq: Remove sparse warnings
Warnings:
drivers/serial/serial_zynq.c:181:1: warning: symbol 'uart_zynq0_init' was not declared. Should it be static?
drivers/serial/serial_zynq.c:181:1: warning: symbol 'uart_zynq0_setbrg' was not declared. Should it be static?
drivers/serial/serial_zynq.c:181:1: warning: symbol 'uart_zynq0_getc' was not declared. Should it be static?
drivers/serial/serial_zynq.c:181:1: warning: symbol 'uart_zynq0_tstc' was not declared. Should it be static?
drivers/serial/serial_zynq.c:181:1: warning: symbol 'uart_zynq0_putc' was not declared. Should it be static?
drivers/serial/serial_zynq.c:181:1: warning: symbol 'uart_zynq0_puts' was not declared. Should it be static?
drivers/serial/serial_zynq.c:182:22: warning: symbol 'uart_zynq_serial0_device' was not declared. Should it be static?
drivers/serial/serial_zynq.c:184:1: warning: symbol 'uart_zynq1_init' was not declared. Should it be static?
drivers/serial/serial_zynq.c:184:1: warning: symbol 'uart_zynq1_setbrg' was not declared. Should it be static?
drivers/serial/serial_zynq.c:184:1: warning: symbol 'uart_zynq1_getc' was not declared. Should it be static?
drivers/serial/serial_zynq.c:184:1: warning: symbol 'uart_zynq1_tstc' was not declared. Should it be static?
drivers/serial/serial_zynq.c:184:1: warning: symbol 'uart_zynq1_putc' was not declared. Should it be static?
drivers/serial/serial_zynq.c:184:1: warning: symbol 'uart_zynq1_puts' was not declared. Should it be static?
drivers/serial/serial_zynq.c:185:22: warning: symbol 'uart_zynq_serial1_device' was not declared. Should it be static?
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Jesper B. Christensen [Fri, 25 Apr 2014 13:46:17 +0000 (15:46 +0200)]
i2c: zynq: Fixed compilation errors when using DEBUG
Signed-off-by: Jesper B. Christensen <jesper.christensen@cobham.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Tom Rini [Tue, 6 May 2014 18:55:45 +0000 (14:55 -0400)]
Merge branch 'serial' of git://denx.de/git/u-boot-microblaze
Tom Rini [Tue, 6 May 2014 18:55:27 +0000 (14:55 -0400)]
Merge branch 'master' of git://denx.de/git/u-boot-microblaze
Tom Rini [Tue, 6 May 2014 18:50:22 +0000 (14:50 -0400)]
Merge branch 'net' of git://denx.de/git/u-boot-microblaze
Tom Rini [Tue, 6 May 2014 18:45:51 +0000 (14:45 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-usb
Michal Simek [Fri, 25 Apr 2014 11:46:28 +0000 (13:46 +0200)]
serial: zynq: Fix typo in suffix function name
's/zynq_serial_initalize/zynq_serial_initialize/g'
serial_initialize is used by all serial drivers.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Fri, 25 Apr 2014 11:45:08 +0000 (13:45 +0200)]
serial: zynq: Remove sparse warnings
Warnings:
drivers/serial/serial_zynq.c:181:1: warning: symbol 'uart_zynq0_init' was not declared. Should it be static?
drivers/serial/serial_zynq.c:181:1: warning: symbol 'uart_zynq0_setbrg' was not declared. Should it be static?
drivers/serial/serial_zynq.c:181:1: warning: symbol 'uart_zynq0_getc' was not declared. Should it be static?
drivers/serial/serial_zynq.c:181:1: warning: symbol 'uart_zynq0_tstc' was not declared. Should it be static?
drivers/serial/serial_zynq.c:181:1: warning: symbol 'uart_zynq0_putc' was not declared. Should it be static?
drivers/serial/serial_zynq.c:181:1: warning: symbol 'uart_zynq0_puts' was not declared. Should it be static?
drivers/serial/serial_zynq.c:182:22: warning: symbol 'uart_zynq_serial0_device' was not declared. Should it be static?
drivers/serial/serial_zynq.c:184:1: warning: symbol 'uart_zynq1_init' was not declared. Should it be static?
drivers/serial/serial_zynq.c:184:1: warning: symbol 'uart_zynq1_setbrg' was not declared. Should it be static?
drivers/serial/serial_zynq.c:184:1: warning: symbol 'uart_zynq1_getc' was not declared. Should it be static?
drivers/serial/serial_zynq.c:184:1: warning: symbol 'uart_zynq1_tstc' was not declared. Should it be static?
drivers/serial/serial_zynq.c:184:1: warning: symbol 'uart_zynq1_putc' was not declared. Should it be static?
drivers/serial/serial_zynq.c:184:1: warning: symbol 'uart_zynq1_puts' was not declared. Should it be static?
drivers/serial/serial_zynq.c:185:22: warning: symbol 'uart_zynq_serial1_device' was not declared. Should it be static?
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Fri, 25 Apr 2014 12:17:38 +0000 (14:17 +0200)]
net: zynq: Fix sparse warnings in gem
Add missing header.
Warnings:
drivers/net/zynq_gem.c:491:5: warning: symbol 'zynq_gem_initialize' was not declared. Should it be static?
drivers/net/zynq_gem.c:542:5: warning: symbol 'zynq_gem_of_init' was not declared. Should it be static?
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Tue, 25 Feb 2014 09:25:38 +0000 (10:25 +0100)]
net: zynq: Use predefined macros instead of hardcoded value
MII is used by this driver.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Stephan Linz [Wed, 4 Jul 2012 20:25:31 +0000 (22:25 +0200)]
microblaze: Wire up OF support for emaclite
- expand the condition with CONFIG_OF_CONTROL
Signed-off-by: Stephan Linz <linz@li-pro.net>
Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Wu, Josh [Mon, 10 Mar 2014 08:40:41 +0000 (16:40 +0800)]
at91: video: atmel_hlcdfb.c: fix bad timing configuration
The right correspondance between LCD margins and LCD timings is:
* upper margin -> vertical back porch
* lower margin -> vertical front porch
* left margin -> horizontal back porch
* right margin -> horizontal front porch
Signed-off-by: Josh Wu <josh.wu@atmel.com>
Stephen Warren [Fri, 18 Apr 2014 17:15:55 +0000 (11:15 -0600)]
config: enable CMD_BMP when API+LCD is enabled
When both CONFIG_API and CONFIG_LCD are enabled, the API code calls
lcd_display_bitmap(). That isn't compiled unless either CONFIG_CMD_BMP
or CONFIG_SPLASH_SCREEN is enabled. In order to prevent build problems,
have config_fallbacks.h enable CONFIG_CMD_BMP when both API and LCD are
enabled.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Thomas Diener [Wed, 23 Apr 2014 05:52:45 +0000 (07:52 +0200)]
logos: Update of the syteco company logo
Signed-off-by: Thomas Diener <dietho@gmx.de>
Signed-off-by: Anatolij Gustschin <agust@denx.de>
Mateusz Zalega [Tue, 29 Apr 2014 18:14:22 +0000 (20:14 +0200)]
common: fixed linker-list example
Last argument shouldn't be there.
Signed-off-by: Mateusz Zalega <m.zalega@samsung.com>
Acked-by: Marek Vasut <marex@denx.de>
Cc: Tom Rini <trini@ti.com>
Stephen Warren [Thu, 1 May 2014 21:45:16 +0000 (15:45 -0600)]
USB: gadget: save driver name before registering it
g_dnl_register() currently first attempts to register a composite
driver by name, and then saves the driver name once it's registered.
Internally to the registration code, g_dnl_do_config() is called and
attempts to compare the composite device's name with the list of known
device names. This fails since the composite device's name has not yet
been stored. This means that the first time "ums 0 0" is run, it fails,
but subsequent attempts succeed.
Re-order the name-saving and registration code to solve this.
Fixes: e5b834e07f51 ("USB: gadget: added a saner gadget downloader registration API")
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Mateusz Zalega [Mon, 28 Apr 2014 19:13:28 +0000 (21:13 +0200)]
USB: gadget: added a saner gadget downloader registration API
Preprocessor definitions and hardcoded implementation selection in
g_dnl core were replaced by a linker list made of (usb_function_name,
bind_callback) pairs.
Signed-off-by: Mateusz Zalega <m.zalega@samsung.com>
Acked-by: Lukasz Majewski <l.majewski@samsung.com>
Acked-by: Marek Vasut <marex@denx.de>
Mateusz Zalega [Mon, 28 Apr 2014 19:13:27 +0000 (21:13 +0200)]
am335x: dfu: disable DFU in am335x_evm SPL build
Future patches will make DFU too large to fit in this board's SPL build.
Signed-off-by: Mateusz Zalega <m.zalega@samsung.com>
Acked-by: Tom Rini <trini@ti.com>
Reviewed-by: Lukasz Majewski <l.majewski@samsung.com>
Mateusz Zalega [Mon, 28 Apr 2014 19:13:26 +0000 (21:13 +0200)]
ums: always initialize mmc before ums_disk_init()
In cases when MMC hadn't been initialized before, ie. by the user or other
subsystem, it was still uninitialized while UMS media capacity check,
leading to broken ums command.
UMS has to initialize resources it uses.
Tested on Samsung Goni.
Signed-off-by: Mateusz Zalega <m.zalega@samsung.com>
Tested-by: Mateusz Zalega <m.zalega@samsung.com>
Acked-by: Lukasz Majewski <l.majewski@samsung.com>
Cc: Minkyu Kang <mk7.kang@samsung.com>
Mateusz Zalega [Mon, 28 Apr 2014 19:13:25 +0000 (21:13 +0200)]
dfu: mmc: change offset base handling
Previously offsets handled by dfu_fill_entity_mmc(), defined in boards'
CONFIG_DFU_ALT were treated as hexadecimal regardless of their prefix,
which sometimes led to confusion. This patch forces usage of explicit
numerical base prefixes.
Signed-off-by: Mateusz Zalega <m.zalega@samsung.com>
Acked-by: Lukasz Majewski <l.majewski@samsung.com>
Cc: Tom Rini <trini@ti.com>
Cc: Minkyu Kang <mk7.kang@samsung.com>
Mateusz Zalega [Mon, 28 Apr 2014 19:13:24 +0000 (21:13 +0200)]
dfu: mmc: raw data write fix
When user attempted to perform a raw write using DFU (vide
dfu_fill_entity_mmc) with MMC interface not initialized before,
get_mmc_blk_size() reported invalid (zero) block size - it wasn't
possible to write ie. a new u-boot image.
This commit fixes that by initializing MMC device before use in
dfu_fill_entity_mmc().
While fixing initialization sequence, I had to change about half of
dfu_fill_entity_mmc's body, so I refactored it on the way to make it,
IMHO, considerably more comprehensible.
Being left as dead code, get_mmc_blk_size() was removed.
Tested on Samsung Goni.
Signed-off-by: Mateusz Zalega <m.zalega@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Lukasz Majewski <l.majewski@samsung.com>
Acked-by: Tom Rini <trini@ti.com>
Cc: Minkyu Kang <mk7.kang@samsung.com>
Mateusz Zalega [Wed, 30 Apr 2014 11:07:48 +0000 (13:07 +0200)]
usb: dfu: fix boards wo USB cable detection
Former usb_cable_connected() patch broke compilation of boards which do
not support this feature.
I've renamed usb_cable_connected() to g_dnl_usb_cable_connected() and added
its default implementation to gadget downloader driver code. There's
only one driver of this kind and it's unlikely there'll be another, so
there's no point in keeping it in /common.
Previously this function was declared in usb.h. I've moved it, since
it's more appropriate to keep it in g_dnl.h - usb.h seems to be intended
for USB host implementation.
Existing code, confronted with default -EOPNOTSUPP return value,
continues as if the cable was connected.
CONFIG_USB_CABLE_CHECK was removed.
Change-Id: Ib9198621adee2811b391c64512f14646cefd0369
Signed-off-by: Mateusz Zalega <m.zalega@samsung.com>
Acked-by: Marek Vasut <marex@denx.de>
Acked-by: Lukasz Majewski <l.majewski@samsung.com>
Mateusz Zalega [Mon, 28 Apr 2014 19:13:22 +0000 (21:13 +0200)]
part: header fix
Implementation made use of types defined in common.h, even though it
wasn't #included. It worked in circumstances when .c files included
every needed header (all).
Signed-off-by: Mateusz Zalega <m.zalega@samsung.com>
Cc: Tom Rini <trini@ti.com>
Cc: Minkyu Kang <mk7.kang@samsung.com>
Mateusz Zalega [Wed, 30 Apr 2014 11:04:15 +0000 (13:04 +0200)]
mmc: mmc header fix
Structure definition used type block_dev_desc_t, defined in part.h, which
wasn't included in mmc.h. It worked only in circumstances when common.h,
or another header using part.h was incuded in implementation files.
Change-Id: I5b203928b689887e3e78beb00a378955e0553eb7
Signed-off-by: Mateusz Zalega <m.zalega@samsung.com>
Acked-by: Pantelis Antoniou <panto@antoniou-consulting.com>
Cc: Minkyu Kang <mk7.kang@samsung.com>
Tom Rini [Fri, 2 May 2014 15:48:07 +0000 (11:48 -0400)]
Merge branch 'next' of git://git.denx.de/u-boot-sh
Rob Herring [Thu, 10 Apr 2014 21:17:31 +0000 (16:17 -0500)]
ARM: highbank: use default prompt
Since highbank is actually shared between Highbank and Midway platforms,
remove the Highbank name from the prompt and use the default.
Signed-off-by: Rob Herring <robh@kernel.org>
Rob Herring [Thu, 10 Apr 2014 21:17:30 +0000 (16:17 -0500)]
ARM: highbank: use config_distro_defaults.h
Adapt highbank to use config_distro_defaults.h and remove the redundant
defines.
Signed-off-by: Rob Herring <robh@kernel.org>
Stephen Warren [Mon, 28 Apr 2014 21:42:00 +0000 (15:42 -0600)]
usb: gadget: allow ci_udc to build with new gadget framework
Allow ci_udc.o to be built when using the new(?) USB gadget framework,
as enabled by CONFIG_USB_GADGET.
Note that this duplicates the Makefile entry for ci_udc.o, since it's
also included inside #ifdef CONFIG_USB_ETHER. I'm not sure what that
define means; perhaps an old style of Ethernet-specific USB gadget
implementation?
I wonder if the line that this patch adds shouldn't be outside all of
the ifdefs, so it stands on its own, similar to how e.g. epautoconf.o
is shared between the two?
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Eric Nelson [Tue, 29 Apr 2014 21:37:56 +0000 (14:37 -0700)]
video: mxc_ipuv3_fb: stash frame buffer pointer in global data.
This patch updates the i.MX video driver to store the
frame-buffer address in the fb_base field of the global
data structure *gd.
By doing this, you can find the frame buffer address
using the 'bdinfo' command:
U-Boot > bdinfo
arch_number = 0x00000EB9
...
FB base = 0x4F35F1C0
This is very useful when debugging display connections.
Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
Acked-by: Otavio Salvador <otavio@ossystems.com.br>
Acked-by: Marek Vasut <marex@denx.de>
Stephen Warren [Thu, 24 Apr 2014 23:52:40 +0000 (17:52 -0600)]
usb: ums: use only 1 buffer for CI_UDC
ci_udc.c allocates only a single buffer for each endpoint, which
ci_ep_alloc_request() returns as a hard-coded value rather than
dynamically allocating. Consequently, storage_common.c must limit
itself to using a single buffer at a time. Add a special case
to the definition of FSG_NUM_BUFFERS for this.
Another option would be to fix ci_ep_alloc_request() to dynamically
allocate the buffers like some/all(?) other device mode drivers do.
However, I don't think that ci_ep_queue() supports queueing up
multiple buffers either yet, and I'm not familiar enough with the
controller yet to implement that. As such, any attempt to use multiple
buffers simply results in data corruption and other errors.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Stephen Warren [Thu, 24 Apr 2014 23:52:39 +0000 (17:52 -0600)]
usb: ci_udc: support variants with hostpc register
Tegra's USB controller appears to be a variant of the ChipIdea
controller; perhaps derived from it, or simply a different version of
the IP core to what U-Boot supports today.
In this variant, at least the following difference are present:
- Some registers are moved about.
- Setup transaction completion is reported in a separate 'epsetupstat'
register, rather than in 'epstat' (which still exists, perhaps for
other transaction types).
- USB connection speed is reported in a separate 'hostpc1_devlc'
register, rather than 'portsc'.
- The registers used by ci_udc.c begin at offset 0x130 from the USB
register base, rather than offset 0x140. However, this is handled
by the associated EHCI controller driver, since the register address
is stored in controller.ctrl->hcor.
Introduce define CONFIG_CI_UDC_HAS_HOSTPC to indicate which variant of
the controller should be supported. The "HAS_HOSTPC" part of this name
mirrors the similar "has_hostpc" field used by the Linux EHCI controller
core to represent the presence/absence of the hostpc1_devlc register.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Stephen Warren [Thu, 24 Apr 2014 23:52:38 +0000 (17:52 -0600)]
usb: ci_udc: make PHY initialization conditional
usb_gadget_register_driver() currently unconditionally programs PORTSC
to select a ULPI PHY. This is incorrect on at least the Tegra boards I
am testing with, which use a UTMI PHY for the OTG ports. Make the PHY
selection code conditional upon the specific EHCI controller that is in
use.
Ideally, I believe that the PHY initialization code should be part of
ehci_hcd_init() in the relevant EHCI controller driver, or some board-
specific function that ehci_hcd_init() calls.
For MX6, I'm not sure this PHY initialization code is correct even before
this patch, since ehci-mx6's ehci_hcd_init() already configures PORTSC to
a board-specific value, and it seems likely that the code in ci_udc.c is
incorrectly undoing this. Perhaps this is not an issue if the PHY
selection register bits aren't implemented on this instance of the MX6
USB controller?
ehci-mxs.c doens't appear to touch PORTSC, so this code is likely still
required there.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Stephen Warren [Thu, 24 Apr 2014 23:52:37 +0000 (17:52 -0600)]
usb: ci_udc: set ep->req.actual after transfer
At least drivers/usb/gadget/storage_common.c expects that ep->req.actual
contain the number of bytes actually transferred. (At least in practice,
I observed it failing to work correctly unless this was the case).
However, ci_udc.c modifies ep->req.length instead. I assume that .length
is supposed to represent the allocated buffer size, whereas .actual is
supposed to represent the actual number of bytes transferred. In the OUT
transaction case, this may happen simply because the host sends a smaller
packet than the max possible size, which is quite legal. In the IN case,
transferring fewer bytes than requested could presumably happen as an
error.
Modify handle_ep_complete() to write to .actual rather than modifying
.length.
Signed-off-by: Stephen Warren <swarren@nvidia.com>