oweals/u-boot.git
12 years agospl mxc nand: Merge duplicated code
Benoît Thébaudeau [Mon, 13 Aug 2012 20:48:56 +0000 (22:48 +0200)]
spl mxc nand: Merge duplicated code

Merge duplicated code into functions, which is better for SPL size too.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Cc: Scott Wood <scottwood@freescale.com>
Cc: Stefano Babic <sbabic@denx.de>
Signed-off-by: Scott Wood <scottwood@freescale.com>
12 years agomxc nand: cosmectic: Light cleanup
Benoît Thébaudeau [Mon, 13 Aug 2012 20:48:26 +0000 (22:48 +0200)]
mxc nand: cosmectic: Light cleanup

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Cc: Scott Wood <scottwood@freescale.com>
Cc: Stefano Babic <sbabic@denx.de>
Signed-off-by: Scott Wood <scottwood@freescale.com>
12 years agomxc nand: Merge mtd and spl register definitions
Benoît Thébaudeau [Mon, 13 Aug 2012 20:48:12 +0000 (22:48 +0200)]
mxc nand: Merge mtd and spl register definitions

This patches fixes the TODO to use same register definitions in mtd mxc_nand and
nand_spl fsl nfc drivers.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Cc: Scott Wood <scottwood@freescale.com>
Cc: Stefano Babic <sbabic@denx.de>
Signed-off-by: Scott Wood <scottwood@freescale.com>
12 years agomtd: nand: allow NAND_NO_SUBPAGE_WRITE to be set from driver
Marek Vasut [Thu, 30 Aug 2012 13:39:38 +0000 (13:39 +0000)]
mtd: nand: allow NAND_NO_SUBPAGE_WRITE to be set from driver

This is based on Linux kernel -next:

commit 14f44abf1dafc20ba42ce8616a8fc8fbd1b3712b
Author: Brian Norris <computersforpeace@gmail.com>
Date:   Fri Jul 13 09:28:24 2012 -0700

    mtd: nand: allow NAND_NO_SUBPAGE_WRITE to be set from driver

    The NAND_CHIPOPTIONS_MSK has limited utility and is causing real bugs. It
    silently masks off at least one flag that might be set by the driver
    (NAND_NO_SUBPAGE_WRITE). This breaks the GPMI NAND driver and possibly
    others.

    Really, as long as driver writers exercise a small amount of care with
    NAND_* options, this mask is not necessary at all; it was only here to
    prevent certain options from accidentally being set by the driver. But the
    original thought turns out to be a bad idea occasionally. Thus, kill it.

    Note, this patch fixes some major gpmi-nand breakage.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Brian Norris <computersforpeace@gmail.com>
Cc: Eric Nelson <eric.nelson@boundarydevices.com>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: Otavio Salvador <otavio@ossystems.com.br>
Cc: Scott Wood <scottwood@freescale.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>
12 years agonand: Make NAND lock status compatible with Micron
Joe Hershberger [Wed, 22 Aug 2012 21:49:45 +0000 (16:49 -0500)]
nand: Make NAND lock status compatible with Micron

Micron NAND flash (e.g. MT29F4G08ABADAH4) BLOCK LOCK READ STATUS is not
the same as others.  Instead of bit 1 being lock, it is #lock_tight.
To make the driver support either format, ignore bit 1 and use only
bit 0 and bit 2.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>
12 years agonand: consolidate duplicated constants
Joe Hershberger [Wed, 22 Aug 2012 21:49:44 +0000 (16:49 -0500)]
nand: consolidate duplicated constants

NAND_CMD_ constants for lock/unlock should be in the header

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>
12 years agonand: Change ulong to loff_t and size_t
Joe Hershberger [Wed, 22 Aug 2012 21:49:43 +0000 (16:49 -0500)]
nand: Change ulong to loff_t and size_t

Missed in previous cleanup.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>
12 years agonand: Add support for unlock.invert
Joe Hershberger [Wed, 22 Aug 2012 21:49:42 +0000 (16:49 -0500)]
nand: Add support for unlock.invert

NAND unlock command allows an invert bit to be set to unlock all but
the selected page range.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
[scottwood@freescale.com: updated docs and added comment about invert bit]
Signed-off-by: Scott Wood <scottwood@freescale.com>
12 years agomtd: support ONFI multi lun NAND
Matthieu CASTET [Mon, 19 Mar 2012 14:35:25 +0000 (15:35 +0100)]
mtd: support ONFI multi lun NAND

With onfi a flash is organized into one or more logical units (LUNs).
A logical unit (LUN) is the minimum unit that can independently execute
commands and report status.

Mtd does not exploit LUN, so make it see a big single flash where size is
lun_size * number_of_lun.

Without this patch MT29F8G08ADBDAH4 size is 512MiB instead of 1GiB.

Artem: split long line on 2 shorter ones.

This is commit 637957551c0ac80de8dfc7650d320c5a98c2c0c0 from Linux

Signed-off-by: Matthieu Castet <matthieu.castet@parrot.com>
Acked-by: Florian Fainelli <ffainelli@freebox.fr>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
[scottwood@freescale.com: picked from Linux into U-Boot]
Reported-by: Rafael Beims <rafael.beims@gmail.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>
12 years agoMerge branch 'master' of git://git.denx.de/u-boot-avr32
Wolfgang Denk [Tue, 4 Sep 2012 07:17:27 +0000 (09:17 +0200)]
Merge branch 'master' of git://git.denx.de/u-boot-avr32

* 'master' of git://git.denx.de/u-boot-avr32:
  net:macb: add line break
  avr32:portmux: fix setup for macb1
  avr32: Remove redundant LDSCRIPT definition

Signed-off-by: Wolfgang Denk <wd@denx.de>
12 years agonet:macb: add line break
Andreas Bießmann [Thu, 16 Aug 2012 01:50:04 +0000 (01:50 +0000)]
net:macb: add line break

Without this patch we see annoying output like this:

---8<---
U-Boot> dhcp
macb1: PHY not foundmacb0: PHY present at 1
macb0: Starting autonegotiation...
--->8---

Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
cc: Joe Hershberger <joe.hershberger@gmail.com>

12 years agoavr32:portmux: fix setup for macb1
Andreas Bießmann [Thu, 16 Aug 2012 02:19:19 +0000 (02:19 +0000)]
avr32:portmux: fix setup for macb1

Use portd_mask instead of portc_mask to setup the pins for port D.

Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
12 years agoMerge branch 'master' of git://git.denx.de/u-boot-ubi
Wolfgang Denk [Mon, 3 Sep 2012 19:24:49 +0000 (21:24 +0200)]
Merge branch 'master' of git://git.denx.de/u-boot-ubi

* 'master' of git://git.denx.de/u-boot-ubi:
  ubifs: Fix memory leak in ubifs_finddir

Signed-off-by: Wolfgang Denk <wd@denx.de>
12 years agoMerge branch 'master' of git://git.denx.de/u-boot-cfi-flash
Wolfgang Denk [Mon, 3 Sep 2012 19:22:12 +0000 (21:22 +0200)]
Merge branch 'master' of git://git.denx.de/u-boot-cfi-flash

* 'master' of git://git.denx.de/u-boot-cfi-flash:
  cfi: Make the flash erase and write operations abortable
  cfi: Check for blank before erase

Signed-off-by: Wolfgang Denk <wd@denx.de>
12 years agoMerge branch 'master' of git://git.denx.de/u-boot-ppc4xx
Wolfgang Denk [Mon, 3 Sep 2012 19:22:02 +0000 (21:22 +0200)]
Merge branch 'master' of git://git.denx.de/u-boot-ppc4xx

* 'master' of git://git.denx.de/u-boot-ppc4xx:
  ppc4xx: Canyonlands/Glacier: Squeeze NAND image a bit to fit again

Signed-off-by: Wolfgang Denk <wd@denx.de>
12 years agoubifs: Fix memory leak in ubifs_finddir
Stefan Roese [Tue, 28 Aug 2012 12:00:24 +0000 (14:00 +0200)]
ubifs: Fix memory leak in ubifs_finddir

This patch fixes a memory leak in ubifs_finddir().

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: dev.ma.dma@gmail.com
12 years agoppc4xx: Canyonlands/Glacier: Squeeze NAND image a bit to fit again
Stefan Roese [Mon, 27 Aug 2012 13:39:45 +0000 (15:39 +0200)]
ppc4xx: Canyonlands/Glacier: Squeeze NAND image a bit to fit again

This patch removes some superfluous SDRAM init calls to fit the
NAND_SPL image into 4k again.

Signed-off-by: Stefan Roese <sr@denx.de>
12 years agocfi: Make the flash erase and write operations abortable
Joe Hershberger [Fri, 17 Aug 2012 20:36:41 +0000 (15:36 -0500)]
cfi: Make the flash erase and write operations abortable

Check for ctrlc() in operations that take time and loop over the flash
addresses.

In netconsole, tstc() is expensive.  Only check once in a while to not
slow down the operation significantly.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Stefan Roese <sr@denx.de>
12 years agocfi: Check for blank before erase
Joe Hershberger [Fri, 17 Aug 2012 20:36:40 +0000 (15:36 -0500)]
cfi: Check for blank before erase

Added an optional check in the CFI driver to evaluate if the sector is
already blank before issuing an erase command.  Improves erase time by
over a factor of 10 if already blank.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Stefan Roese <sr@denx.de>
12 years agopowerpc: re-add bi_ip_addr to bd_t struct
Anatolij Gustschin [Sun, 2 Sep 2012 09:09:00 +0000 (09:09 +0000)]
powerpc: re-add bi_ip_addr to bd_t struct

Since commit 50a47d0523e8efebe912bef539a77ffd42116451
(net: punt bd->bi_ip_addr) booting old 2.4.x ppc kernels
is broken due to changed offsets of the fields in struct bd_t.
Offsets of the fields after removed bi_ip_addr are wrong,
causing wrong bus clocks and console baudrate configurations
and various other issues. Re-add the bi_ip_addr field to preserve
backward compatibility with older ppc kernels. Setting bi_ip_addr
in board.c is not really needed, grepping in the 2.4 linux tree
shows that bi_ip_addr is not accessed there. Adding bi_ip_addr
to struct bd_t for other arches isn't needed it seems. bd_t is
not used by other arches in the 2.4 linux tree.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Acked-by: Wolfgang Denk <wd@denx.de>
12 years agohush: Don't parse the contents of a dereferenced var
Joe Hershberger [Fri, 17 Aug 2012 10:26:30 +0000 (10:26 +0000)]
hush: Don't parse the contents of a dereferenced var

When a variable which contains a user-supplied value is dereferenced
(e.g. to be echo'ed), make sure that the value is not further parsed
by hush.

Set the hush local variable "HUSH_NO_EVAL=1" to enable this behavior.

Without this patch, a sequence like this occurs:

Panda # env set my_user_string Bob\'s favorite device
Panda # print my_user_string
my_user_string=Bob's favorite device
Panda # echo $my_user_string
syntax error hush.c:3007

With this patch, it looks like this:

Panda # HUSH_NO_EVAL=1
Panda # env set my_user_string Bob\'s favorite device
Panda # print my_user_string
my_user_string=Bob's favorite device
Panda # echo $my_user_string
Bob's favorite device

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
12 years agohush: Add default value substitution support
Joe Hershberger [Fri, 17 Aug 2012 10:26:29 +0000 (10:26 +0000)]
hush: Add default value substitution support

Use standard sh syntax:
${VAR:-default}
Use default value: if VAR is set and non-null, expands to $VAR.
Otherwise, expands to default.
${VAR:=default}
Set default value: if VAR is set and non-null, expands to $VAR.
Otherwise, sets hush VAR to default and expands to default.
${VAR:+default}
If VAR is set and non-null, expands to the empty string.
Otherwise, expands to default.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
12 years agoREADME: Cleanup description of supported partitions.
Karl O. Pinc [Thu, 16 Aug 2012 06:20:15 +0000 (06:20 +0000)]
README: Cleanup description of supported partitions.

README: Cleanup description of supported partitions.

Signed-off-by: Karl O. Pinc <kop@meme.com>
12 years agoREADME.SPL: Move the 'Estimating stack usage' from omap3 to here
Tom Rini [Wed, 15 Aug 2012 07:23:21 +0000 (07:23 +0000)]
README.SPL: Move the 'Estimating stack usage' from omap3 to here

The instructions are generic, so move to the generic doc.

Signed-off-by: Tom Rini <trini@ti.com>
12 years agoREADME.SPL: Add a small Debugging section
Tom Rini [Wed, 15 Aug 2012 07:23:20 +0000 (07:23 +0000)]
README.SPL: Add a small Debugging section

Signed-off-by: Tom Rini <trini@ti.com>
12 years agoREADME: Update ver env var description
Benoît Thébaudeau [Mon, 13 Aug 2012 13:01:14 +0000 (15:01 +0200)]
README: Update ver env var description

Commit 155cb01 replaced the read-only property of the ver env var
with an auto-restoring behavior. Update the README file accordingly.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Cc: Wolfgang Denk <wd@denx.de>
12 years agodm: Add twserial device document
Tomáš Hlaváček [Wed, 8 Aug 2012 11:42:30 +0000 (13:42 +0200)]
dm: Add twserial device document

Signed-off-by: Tomas Hlavacek<tmshlvck@gmail.com>
12 years agodm: RTC subsystem analysis added.
Tomas Hlavacek [Wed, 8 Aug 2012 01:42:29 +0000 (01:42 +0000)]
dm: RTC subsystem analysis added.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
12 years agodm: Add pcmcia design document
Viktor Krivak [Wed, 8 Aug 2012 01:42:28 +0000 (01:42 +0000)]
dm: Add pcmcia design document

Signed-off-by: Viktor Krivak <viktor.krivak@gmail.com>
12 years agodm: add PCI design document
Pavel Herrmann [Wed, 8 Aug 2012 01:42:27 +0000 (01:42 +0000)]
dm: add PCI design document

Signed-off-by: Pavel Herrmann <morpheus.ibis@gmail.com>
12 years agodm: Driver model analysis document for Watchdog subsystem has been added.
Tomas Hlavacek [Wed, 8 Aug 2012 01:42:26 +0000 (01:42 +0000)]
dm: Driver model analysis document for Watchdog subsystem has been added.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
12 years agodm: Hwmon UDM subsystem analysis added.
Tomas Hlavacek [Wed, 8 Aug 2012 01:42:25 +0000 (01:42 +0000)]
dm: Hwmon UDM subsystem analysis added.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
12 years agodm: Add POWER API transition document
Viktor Krivak [Wed, 8 Aug 2012 01:42:24 +0000 (01:42 +0000)]
dm: Add POWER API transition document

Signed-off-by: Viktor Krivak <viktor.krivak@gmail.com>
12 years agodm: Add block device document
Pavel Herrmann [Wed, 8 Aug 2012 01:42:23 +0000 (01:42 +0000)]
dm: Add block device document

Signed-off-by: Pavel Herrmann <morpheus.ibis@gmail.com>
12 years agodm: Add SPI API transition document
Viktor Krivak [Wed, 8 Aug 2012 01:42:22 +0000 (01:42 +0000)]
dm: Add SPI API transition document

Signed-off-by: Viktor Krivak <viktor.krivak@gmail.com>
12 years agodm: Add networking subsystem analysis
Marek Vasut [Wed, 8 Aug 2012 01:42:21 +0000 (01:42 +0000)]
dm: Add networking subsystem analysis

Signed-off-by: Marek Vasut <marex@denx.de>
12 years agodm: Add MMC subsystem analysis
Marek Vasut [Wed, 8 Aug 2012 01:42:20 +0000 (01:42 +0000)]
dm: Add MMC subsystem analysis

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
12 years agodm: Add GPIO API transition document
Viktor Křivák [Wed, 8 Aug 2012 11:42:19 +0000 (13:42 +0200)]
dm: Add GPIO API transition document

Signed-off-by: Viktor Křivák <viktor.krivak@gmail.com>
12 years agodm: Add Driver cores design document
Pavel Herrmann [Wed, 8 Aug 2012 01:42:18 +0000 (01:42 +0000)]
dm: Add Driver cores design document

Signed-off-by: Pavel Herrmann <morpheus.ibis@gmail.com>
12 years agodm: Initial import of design documents
Marek Vasut [Wed, 8 Aug 2012 01:42:17 +0000 (01:42 +0000)]
dm: Initial import of design documents

This patch contains UDM-design.txt, which is document containing
general description of the driver model. The remaining files contains
descriptions of conversion process of particular subsystems.

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
12 years agoinput: key_matrix: fix header inclusion
Stephan Linz [Thu, 2 Aug 2012 10:49:24 +0000 (10:49 +0000)]
input: key_matrix: fix header inclusion

On Microblaze with device tree support enabled we run into
the error below.

I'm not sure, but I think that all source code should include
at least the common.h and just this fix the problem on
Microblaz architecture.

The error is:

In file included from key_matrix.c:29:
include/malloc.h:364: error: conflicting types for 'memset'
include/linux/string.h:71: error: previous declaration of 'memset' was here
include/malloc.h:365: error: conflicting types for 'memcpy'
include/linux/string.h:74: error: previous declaration of 'memcpy' was here

Signed-off-by: Stephan Linz <linz@li-pro.net>
CC: Bernie Thompson <bhthompson@chromium.org>
CC: Simon Glass <sjg@chromium.org>
CC: Tom Warren <twarren@nvidia.com>
CC: Michal Simek <monstr@monstr.eu>
Acked-by: Simon Glass <sjg@chromium.org>
Acked-by: Michal Simek <monstr@monstr.eu>
12 years agofix out of tree building with kallsyms
Mike Frysinger [Mon, 30 Jul 2012 22:44:53 +0000 (22:44 +0000)]
fix out of tree building with kallsyms

The call to SYSTEM_MAP assumes that the u-boot output is in $PWD when
it really should be in $(obj).  This fixes building out of tree.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
12 years agoenv_nand: align NAND buffers
Stephen Warren [Mon, 30 Jul 2012 07:38:38 +0000 (07:38 +0000)]
env_nand: align NAND buffers

This allows cache flush/invalidate operations to succeed on the buffers.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
Acked-by: Scott Wood <scottwood@freescale.com>
12 years agoimage/FIT: Add ramdisk load, entry address and OS tag inclusion
Jagannadha Sutradharudu Teki [Fri, 27 Jul 2012 22:02:22 +0000 (22:02 +0000)]
image/FIT: Add ramdisk load, entry address and OS tag inclusion

This patch adds support to include Load, Entry address and OS tag
of ramdisk on to FIT image through mkimage tool.

Signed-off-by: Jagannadha Sutradharudu Teki <402jagan@gmail.com>
12 years agortc: pcf8563: Make century compatible with Linux
Benoît Thébaudeau [Fri, 20 Jul 2012 14:05:36 +0000 (16:05 +0200)]
rtc: pcf8563: Make century compatible with Linux

This driver uses the century bit of this RTC in the opposite way Linux does.
From Linux's rtc-pcf8563.c:
/*
 * The meaning of MO_C bit varies by the chip type.
 * From PCF8563 datasheet: this bit is toggled when the years
 * register overflows from 99 to 00
 *   0 indicates the century is 20xx
 *   1 indicates the century is 19xx
 * From RTC8564 datasheet: this bit indicates change of
 * century. When the year digit data overflows from 99 to 00,
 * this bit is set. By presetting it to 0 while still in the
 * 20th century, it will be set in year 2000, ...
 * There seems no reliable way to know how the system use this
 * bit.  So let's do it heuristically, assuming we are live in
 * 1970...2069.
 */

As U-Boot's PCF8563 driver does not say it is supposed to support the RTC8564,
make this driver compatible with Linux's by giving the opposite meaning to the
century bit.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Cc: Wolfgang Denk <wd@denx.de>
12 years agoFAT: Simplify get_contents
Benoît Thébaudeau [Fri, 20 Jul 2012 13:21:37 +0000 (15:21 +0200)]
FAT: Simplify get_contents

One call to get_cluster can be factorized with another, so avoid
duplicating code.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Cc: Wolfgang Denk <wd@denx.de>
12 years agoFAT: get_cluster: Add buffer bouncing
Benoît Thébaudeau [Fri, 20 Jul 2012 13:21:08 +0000 (15:21 +0200)]
FAT: get_cluster: Add buffer bouncing

Add a buffer bouncing mechanism to get_cluster.  This can be useful
for misaligned applicative buffers passed through get_contents.
This is required for the following patches in the case of data
aligned differently relatively to buffers and clusters.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Cc: Wolfgang Denk <wd@denx.de>
12 years agoFAT: Fix redundant sector read
Benoît Thébaudeau [Fri, 20 Jul 2012 13:20:12 +0000 (15:20 +0200)]
FAT: Fix redundant sector read

With the previous code, the remaining prefetched sectors were read
again after each sector.  With this patch, each sector is read only
once, thus making the prefetch useful.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Cc: Wolfgang Denk <wd@denx.de>
12 years agoFAT: cosmetic: Remove useless assignment
Benoît Thébaudeau [Fri, 20 Jul 2012 13:19:51 +0000 (15:19 +0200)]
FAT: cosmetic: Remove useless assignment

fatlength is not used after this assignment, so it is useless and can
be removed.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Cc: Wolfgang Denk <wd@denx.de>
12 years agoFAT: get_fatent: Fix FAT boundary check
Benoît Thébaudeau [Fri, 20 Jul 2012 13:19:29 +0000 (15:19 +0200)]
FAT: get_fatent: Fix FAT boundary check

startblock must be taken into account in order not to read past the
end of the FAT.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Cc: Wolfgang Denk <wd@denx.de>
12 years agoFAT: cosmetic: Remove extra spaces
Benoît Thébaudeau [Fri, 20 Jul 2012 13:18:44 +0000 (15:18 +0200)]
FAT: cosmetic: Remove extra spaces

Remove spaces before opening parentheses in function calls.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Cc: Wolfgang Denk <wd@denx.de>
12 years agoppc: Create a stack frame for wait_ticks()
Joakim Tjernlund [Mon, 16 Jul 2012 21:25:40 +0000 (21:25 +0000)]
ppc: Create a stack frame for wait_ticks()

wait_ticks() calls get_ticks() without building a back chain which
makes gdb unhappy when doing back trace. This can also cause
improper memory accesses.

Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
12 years agopart_mac: dcache: allocate cacheline-aligned buffers
Benoît Thébaudeau [Fri, 13 Jul 2012 19:31:03 +0000 (21:31 +0200)]
part_mac: dcache: allocate cacheline-aligned buffers

This patch forces the correct alignment for DMA operations of buffers used by
part_mac.c.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Cc: Wolfgang Denk <wd@denx.de>
12 years agommc: Remove unused item flags in struct mmc_cmd
Kaspter Ju [Thu, 31 May 2012 04:27:50 +0000 (04:27 +0000)]
mmc: Remove unused item flags in struct mmc_cmd

Signed-off-by: Kaspter Ju <nigh0st3018@gmail.com>
12 years agou-boot yaffs2: Fix compilation warnings
Charles Manning [Tue, 14 Aug 2012 18:26:10 +0000 (18:26 +0000)]
u-boot yaffs2: Fix compilation warnings

Also remove yaffs_hweight and use the hweight in u-boot.

Signed-off-by: Charles Manning <cdhmanning@gmail.com>
12 years agoMerge branch 'master' of git://git.denx.de/u-boot-usb
Wolfgang Denk [Sun, 2 Sep 2012 14:38:48 +0000 (16:38 +0200)]
Merge branch 'master' of git://git.denx.de/u-boot-usb

* 'master' of git://git.denx.de/u-boot-usb:
  MUSB driver: Timeout is never detected as the while loop does not end
  usb: fix ulpi_set_vbus prototype
  pxa25x: Add UDC registers definitions
  USB: Fix strict aliasing in ohci-hcd
  usb: Optimize USB storage read/write
  ehci: Optimize qTD allocations
  usb_stor_BBB_transport: Do not delay when not required
  usb_storage: Remove EHCI constraints
  usb_storage: Restore non-EHCI support
  ehci-hcd: Boost transfer speed
  ehci: cosmetic: Define used constants
  ehci: Fail for multi-transaction interrupt transfers
  arm:trats: Enable g_dnl composite USB gadget with embedded DFU function on TRATS
  arm:trats: Support for USB UDC driver at TRATS board.
  dfu:cmd: Support for DFU u-boot command
  dfu: MMC specific routines for DFU operation
  dfu: DFU backend implementation
  dfu:usb: DFU USB function (f_dfu) support for g_dnl composite gadget
  dfu:usb: Support for g_dnl composite download gadget.
  ehci: cosmetic: Define the number of qt_buffers

Signed-off-by: Wolfgang Denk <wd@denx.de>
12 years agopatman: Do not Cc addresses included in To list
Otavio Salvador [Sat, 18 Aug 2012 07:19:51 +0000 (07:19 +0000)]
patman: Do not Cc addresses included in To list

In case an address is listed in the To list, those will be skipped on
Cc list or user might end with a duplicated message.

This fixes the case when a tag points to same address used as series
destination thus avoiding duplicated sending.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
12 years agopatman: Allow for changelog use in first version of a series
Otavio Salvador [Mon, 13 Aug 2012 10:08:22 +0000 (10:08 +0000)]
patman: Allow for changelog use in first version of a series

When a patchset had a RFC series, a v1 might have a changelog of
changes done since the RFC. The patch changes the range checked for
changelog and allow it to start for version 1.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Acked-by: Simon Glass <sjg@chromium.org>
12 years agopatman: don't mess with signoffs
Ilya Yanok [Mon, 6 Aug 2012 23:46:08 +0000 (23:46 +0000)]
patman: don't mess with signoffs

Currently patman assumes that there should be only one Signoff line
and this is obviously incorrect: we often have to work with patches
containing other people signoffs. Moreover, it's really desirable
to preserve the comments between signoffs.

So until some sophisticated signoff processing will be developed I
suggest just don't mess with signoffs at all and treat them like
plain text lines. The only drawback I've found so far is the case
where you have a patch with someones else signoff but not yours and
also have to patman tags under signoff line. In this case you will
get extra empty line between signoffs.

Signed-off-by: Ilya Yanok <ilya.yanok@cogentembedded.com>
12 years agopatman: don't mess with changelog
Ilya Yanok [Mon, 6 Aug 2012 23:46:07 +0000 (23:46 +0000)]
patman: don't mess with changelog

Don't try to sort and uniq changelog entries as this breaks
multiline entries. It will be better to add some real multi-line
support but for now just preserve the entries as is.

Signed-off-by: Ilya Yanok <ilya.yanok@cogentembedded.com>
12 years agopatman: don't pick changes while processing patches
Ilya Yanok [Mon, 6 Aug 2012 23:46:06 +0000 (23:46 +0000)]
patman: don't pick changes while processing patches

We already got all changes from git log output and the comment
to the ProcessLine function clearly states that 'patch' mode
is not for scanning tags.

Signed-off-by: Ilya Yanok <ilya.yanok@cogentembedded.com>
12 years agopatman: fix end of changes detection
Ilya Yanok [Mon, 6 Aug 2012 23:46:05 +0000 (23:46 +0000)]
patman: fix end of changes detection

Changes may end in '---' line or Signoff line (generated by
git format-patch) in case of Series-changes: lines being
the last ones in commit message. So detect it properly.

Signed-off-by: Ilya Yanok <ilya.yanok@cogentembedded.com>
12 years agopci: add CONFIG_PCI_ENUM_ONLY for platforms that don't need PCI setup done
Andrew Sharp [Wed, 29 Aug 2012 14:16:32 +0000 (14:16 +0000)]
pci: add CONFIG_PCI_ENUM_ONLY for platforms that don't need PCI setup done

Introduce CONFIG_PCI_ENUM_ONLY variable for platforms that just want a
quick enumberation of the PCI devices, but don't need any setup work done.
This is very beneficial on platforms that have u-boot loaded by another
boot loader which does a more sophisticated job of setup of PCI devices
than u-boot.  That way, u-boot can just read what's there and get on
with life.  This is what SeaBIOS does.

Signed-off-by: Andrew Sharp <andywyse6@gmail.com>
12 years agopci: update pci_ids.h with a few new entries
Andrew Sharp [Wed, 29 Aug 2012 14:16:31 +0000 (14:16 +0000)]
pci: update pci_ids.h with a few new entries

Add some recent entries to pci_ids.h for Intel and AMD/ATI devices that
are somewhat relevant to u-boot.

Signed-off-by: Andrew Sharp <andywyse6@gmail.com>
12 years agopci: minor cleanup of CONFIG_PCI_PNP usage
Andrew Sharp [Wed, 29 Aug 2012 14:16:30 +0000 (14:16 +0000)]
pci: minor cleanup of CONFIG_PCI_PNP usage

Refactor the common PCI code just a tiny bit surrounding the PCI_PNP
(pciauto) stuff.  Makes the code a tiny bit easier to read, and also
makes it more obvious that almost no platform needs to setup or use the
pci_config_table stuff.

Signed-off-by: Andrew Sharp <andywyse6@gmail.com>
12 years agopci: clean up some whitespace and formatting
Andrew Sharp [Wed, 29 Aug 2012 14:16:29 +0000 (14:16 +0000)]
pci: clean up some whitespace and formatting

I tried to clean up the white space and formatting offenses and
inconsistencies in the generic PCI code that obviously has been around for
some time.  Emphasis on large increases in readability and maintainability
and consistency.  I omitted the platform/processor specific files in
the drivers/pci directory because I wanted to leave those file to those
that care more about them.

Signed-off-by: Andrew Sharp <andywyse6@gmail.com>
12 years agopci: fix errant data types and corresponding access functions
Andrew Sharp [Wed, 1 Aug 2012 12:27:16 +0000 (12:27 +0000)]
pci: fix errant data types and corresponding access functions

In a couple of places, unsigned int and pci_config_*_dword were being
used when u16 and _word should be used.  Unsigned int was also being
used in a couple of places that should be pci_addr_t.

Signed-off-by: Andrew Sharp <andywyse6@gmail.com>
12 years agoMerge branch 'agust@denx.de' of git://git.denx.de/u-boot-staging
Wolfgang Denk [Sat, 1 Sep 2012 22:44:09 +0000 (00:44 +0200)]
Merge branch 'agust@denx.de' of git://git.denx.de/u-boot-staging

* 'agust@denx.de' of git://git.denx.de/u-boot-staging:
  tx25: Use generic gpio_* calls
  config: Always use GNU ld
  tools: add kwboot binary to .gitignore file
  fdt: Include arch specific gpio.h instead of asm-generic/gpio.h
  serial: CONSOLE macro is not used

Conflicts:
board/karo/tx25/tx25.c

Signed-off-by: Wolfgang Denk <wd@denx.de>
12 years agoavr32: Remove redundant LDSCRIPT definition
Benoît Thébaudeau [Fri, 10 Aug 2012 09:55:43 +0000 (09:55 +0000)]
avr32: Remove redundant LDSCRIPT definition

AVR32's LD script uses a standard location that is now automatically detected by
the main Makefile, so its definition in AVR32's config.mk is now obsolete and
redundant.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Cc: Andreas Bießmann <andreas.devel@googlemail.com>
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
12 years agoat91: 9x5: Enable PMECC for 5series ek board.
Wu, Josh [Thu, 23 Aug 2012 00:05:38 +0000 (00:05 +0000)]
at91: 9x5: Enable PMECC for 5series ek board.

Signed-off-by: Josh Wu <josh.wu@atmel.com>
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
12 years agoat91: 9x5: change SMC config timing that both works for PMECC & non-PMECC.
Wu, Josh [Thu, 23 Aug 2012 00:05:37 +0000 (00:05 +0000)]
at91: 9x5: change SMC config timing that both works for PMECC & non-PMECC.

Signed-off-by: Josh Wu <josh.wu@atmel.com>
Tested-by: voice.shen@atmel.com
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
12 years agoat91: atmel_nand: Update driver to support Programmable Multibit ECC controller
Wu, Josh [Thu, 23 Aug 2012 00:05:36 +0000 (00:05 +0000)]
at91: atmel_nand: Update driver to support Programmable Multibit ECC controller

The Programmable Multibit ECC (PMECC) controller is a programmable binary
BCH(Bose, Chaudhuri and Hocquenghem) encoder and decoder. This controller
can be used to support both SLC and MLC NAND Flash devices. It supports to
generate ECC to correct 2, 4, 8, 12 or 24 bits of error per sector of data.

To use PMECC in this driver, the user needs to set the PMECC correction
capability, the sector size and ROM lookup table offsets in board config file.

This driver is ported from Linux kernel atmel_nand PMECC patch. The main difference
is in this version it uses registers structure access hardware instead of using macros.
It is tested in 9x5 serial boards.

Signed-off-by: Josh Wu <josh.wu@atmel.com>
[rebase]
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
12 years agoat91: atmel_nand: remove unused variables.
Wu, Josh [Thu, 23 Aug 2012 00:05:35 +0000 (00:05 +0000)]
at91: atmel_nand: remove unused variables.

Signed-off-by: Josh Wu <josh.wu@atmel.com>
Acked-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
12 years agoat91: atmel_nand: extract HWECC initialization code into one function: atmel_hw_nand_...
Wu, Josh [Thu, 23 Aug 2012 00:05:34 +0000 (00:05 +0000)]
at91: atmel_nand: extract HWECC initialization code into one function: atmel_hw_nand_init_param().

This patch
1. extract the hwecc initialization code into one function. It is a preparation for adding atmel PMECC support.
2. enable CONFIG_SYS_NAND_SELF_INIT. Which make us can configurate the ecc parameters between nand_scan_ident() and nand_scan_tail().

Signed-off-by: Josh Wu <josh.wu@atmel.com>
[fix empty newline at EOF error and move return value check into ifdef]
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
12 years agoatmel: at91sam9x5: add spi flash boot support
Bo Shen [Sun, 19 Aug 2012 20:32:24 +0000 (20:32 +0000)]
atmel: at91sam9x5: add spi flash boot support

Add at91sam9x5 series spi flash boot support

Using at91sam9x5ek_spiflash to configure, then it can boot from at25df321
serial flash

SPI mater work in 30Mhz speed, while not 1Mhz speed. This will base on
atmel_spi patch, or else, it will occur receive overrun

Signed-off-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
12 years agoarm: sam9g10/sam9m10g45: remove CONFIG_ARCH_CPU_INIT
Bo Shen [Mon, 27 Aug 2012 00:04:34 +0000 (00:04 +0000)]
arm: sam9g10/sam9m10g45: remove CONFIG_ARCH_CPU_INIT

Remove CONFIG_ARCH_CPU_INIT for at91sam9g10ek and at91sam9m10g45ek

Signed-off-by: Bo Shen <voice.shen@atmel.com>
[rebase on TOT]
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
12 years agoarm:at91-boards: remove console_init_f where unnecessary
Andreas Bießmann [Thu, 16 Aug 2012 06:01:51 +0000 (06:01 +0000)]
arm:at91-boards: remove console_init_f where unnecessary

A lot of at91 boards have the console_init_f in board_init. This is useless
cause it was called before by generic code in lib/board.c.

Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
cc: Jens Scharsig <esw@bus-elektronik.de>
cc: Stelian Pop <stelian@popies.net>
cc: Sedji Gaouaou<sedji.gaouaou@atmel.com>
cc: Albin Tonnerre <albin.tonnerre@free-electrons.com>
cc: Eric Benard <eric@eukrea.com>
Tested-by: voice.shen@atmel.com
Tested-by: voice.shen@atmel.com
Acked-by: Jens Scharsig (BuS Elektronik) <esw@bus-elektronik.de>
Tested-by: Jens Scharsig (BuS Elektronik) <esw@bus-elektronik.de>
12 years agoat91sam9263ek: remove unnecessary console_init_f
Andreas Bießmann [Wed, 15 Aug 2012 22:18:56 +0000 (22:18 +0000)]
at91sam9263ek: remove unnecessary console_init_f

Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
cc: Stelian Pop <stelian@popies.net>

12 years agospi: atmel: add WDRBT bit to avoid receive overrun
Bo Shen [Sun, 19 Aug 2012 20:32:22 +0000 (20:32 +0000)]
spi: atmel: add WDRBT bit to avoid receive overrun

The atmel at91sam9x5 series spi has feature to avoid receive overren

Using the patch to enable it

Signed-off-by: Bo Shen <voice.shen@atmel.com>
Acked-by: Andreas Bießmann <andreas.devel@googlemail.com>
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
12 years agoatmel: at91sam9x5: fix name error for spi
Bo Shen [Sun, 19 Aug 2012 20:32:23 +0000 (20:32 +0000)]
atmel: at91sam9x5: fix name error for spi

Fix the name error

Signed-off-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
12 years agoTake over the maintainer for sam9g10 and sam9m10g45
Bo Shen [Sun, 19 Aug 2012 23:01:50 +0000 (23:01 +0000)]
Take over the maintainer for sam9g10 and sam9m10g45

As the maintainer for at91sam9g10ek and at91sam9m10g45ek can not reach
any more.

So I wish to take over the maintainer for sam9g10 and sam9m10g45

Signed-off-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
12 years agoarm : at91sam9x5 : fix a small bug for NAND
Bo Shen [Wed, 15 Aug 2012 18:44:27 +0000 (18:44 +0000)]
arm : at91sam9x5 : fix a small bug for NAND

fix a bug:
  when not boot from NAND, the NAND flash can not be detected.
  Using this to fix it

Signed-off-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
12 years agoAT91: Small fix on AT91 USART initialization code
Xu, Hong [Tue, 2 Aug 2011 01:05:04 +0000 (01:05 +0000)]
AT91: Small fix on AT91 USART initialization code

Before reset dbgu transmitter, we just wait TXEMPTY to drain the
transmitter register(Just in case). If not doing this, we may sometimes
see several weird characters from DBGU.

A short delay is also added to make sure the new serial settings are
settled.

Signed-off-by: Hong Xu <hong.xu@atmel.com>
[cherry-picked from u-boot-atmel/old-next]
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
12 years agoat91sam9263ek: fix 'update' script
Andreas Bießmann [Thu, 28 Jun 2012 02:32:32 +0000 (02:32 +0000)]
at91sam9263ek: fix 'update' script

The old update script uses 'load_addr' which is never set. Use 'fileaddr'
instead which is automagically set by e.g. dhcp.

Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
cc: Stelian Pop <stelian@popies.net>

12 years agoARM : at91sam9x5 : Remove CONFIG_ARCH_CPU_INIT
Bo Shen [Tue, 14 Aug 2012 16:48:05 +0000 (16:48 +0000)]
ARM : at91sam9x5 : Remove CONFIG_ARCH_CPU_INIT

Remove CONFIG_ARCH_CPU_INIT, no need it anymore

Signed-off-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
12 years agoMUSB driver: Timeout is never detected as the while loop does not end
Matej Frančeškin [Thu, 30 Aug 2012 07:24:39 +0000 (09:24 +0200)]
MUSB driver: Timeout is never detected as the while loop does not end

Timeout variable is decremented once more when while condition is not met.
Following "if" does not detect correctly that timeout has occurred.
Because of this bug the "usb start" command on AM335X-EVM board did not detect correctly that USB device was not attached.

timeout = musb_cfg.timeout;
while (timeout--)
if (readb(&musbr->devctl) & MUSB_DEVCTL_HM)
  break;
/* if musb core is not in host mode, then return */
if (!timeout)
return -1;

Signed-off-by: Matej Franceskin <Matej.Franceskin@comtrade.com>
CC: Marek Vasut <matex@denx.de>?
12 years agousb: fix ulpi_set_vbus prototype
Lucas Stach [Sun, 19 Aug 2012 16:22:07 +0000 (18:22 +0200)]
usb: fix ulpi_set_vbus prototype

Match the name of the header prototype with the actual
implementation.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
12 years agopxa25x: Add UDC registers definitions
Łukasz Dałek [Sat, 18 Aug 2012 22:21:02 +0000 (00:21 +0200)]
pxa25x: Add UDC registers definitions

Signed-off-by: Łukasz Dałek <luk0104@gmail.com>
12 years agoUSB: Fix strict aliasing in ohci-hcd
Troy Kisky [Sat, 11 Aug 2012 21:49:09 +0000 (14:49 -0700)]
USB: Fix strict aliasing in ohci-hcd

commit 5f6aa03fda2a0a79940765865c1e4266be8a75f8
    USB: Fix complaints about strict aliasing in OHCI-HCD

tried to fix this, but gcc4.4 still complains. So, this
patch basically reverts the above and does a simpler fix.

also, the above commit incorrectly changed
/* corresponds to data_buf[4-7] */
datab [1] = 0;
to

/* corresponds to databuf.u8[4-7] */
databuf.u8[1] = 0;

This patch also fixes that.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
12 years agousb: Optimize USB storage read/write
Jim Shimer [Tue, 31 Jul 2012 02:11:28 +0000 (22:11 -0400)]
usb: Optimize USB storage read/write

Trim down the IO times by removing uneeded
test unit reeady calls.

Signed-off-by: Jim Shimer <mgi2475@motorola.com>
12 years agoehci: Optimize qTD allocations
Benoît Thébaudeau [Fri, 10 Aug 2012 16:27:23 +0000 (18:27 +0200)]
ehci: Optimize qTD allocations

Relax the qTD transfer alignment constraints in order to need less qTDs for
buffers that are aligned to 512 bytes but not to pages.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Ilya Yanok <ilya.yanok@cogentembedded.com>
Cc: Stefan Herbrechtsmeier <stefan@herbrechtsmeier.net>
12 years agousb_stor_BBB_transport: Do not delay when not required
Benoît Thébaudeau [Fri, 10 Aug 2012 16:27:11 +0000 (18:27 +0200)]
usb_stor_BBB_transport: Do not delay when not required

There is a 5-ms delay in usb_stor_BBB_transport, which occurs every 10 kiB of
data for fragmented fatload usb, i.e. roughly 500 ms of delay per MiB. This adds
up to quite a bit of delay if you're loading a large ramdisk.

The purpose of this delay should be to debounce the 5-V/100-mA USB power up.
This patch skips the delay if the device has already been queried as ready.

Signed-off-by: Jim Shimer <mgi2475@motorola.com>
Rework following the review:
 - Rebase against the latest u-boot-usb master.
 - Replace typedef with #define.
 - Use the existing flags struct field instead of adding a new field.
 - Remove the setter function.
 - Remove the typecasts.
Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Ilya Yanok <ilya.yanok@cogentembedded.com>
Cc: Stefan Herbrechtsmeier <stefan@herbrechtsmeier.net>
Cc: Jim Shimer <mgi2475@motorola.com>
12 years agousb_storage: Remove EHCI constraints
Benoît Thébaudeau [Fri, 10 Aug 2012 16:23:25 +0000 (18:23 +0200)]
usb_storage: Remove EHCI constraints

Now that the EHCI driver allocates its qTDs from the heap, the MSC driver is
only limited by the SCSI commands it uses.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Ilya Yanok <ilya.yanok@cogentembedded.com>
Cc: Stefan Herbrechtsmeier <stefan@herbrechtsmeier.net>
12 years agousb_storage: Restore non-EHCI support
Benoît Thébaudeau [Fri, 10 Aug 2012 16:26:50 +0000 (18:26 +0200)]
usb_storage: Restore non-EHCI support

The commit 5dd95cf made the MSC driver EHCI-specific. This patch restores a
basic support of non-EHCI HCDs, like before that commit.

The fallback transfer size is certainly not optimal, but at least it should work
like before.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Ilya Yanok <ilya.yanok@cogentembedded.com>
Cc: Stefan Herbrechtsmeier <stefan@herbrechtsmeier.net>
12 years agoehci-hcd: Boost transfer speed
Benoît Thébaudeau [Fri, 10 Aug 2012 16:22:32 +0000 (18:22 +0200)]
ehci-hcd: Boost transfer speed

This patch takes advantage of the hardware EHCI qTD queuing mechanism to avoid
software and transfer splitting overhead so as to make transfers as fast as
possible.

The only drawback is a call to memalign. However, this is fast compared to the
transfer timings, and the heap size to allocate is small, e.g. 128 kiB in the
worst case for a transfer length of 65535 packets of 512 bytes.

Tested on i.MX25, i.MX35 and i.MX51. In my test conditions, the speed gain was
very significant (several times faster), which is really appreciable when
accessing large files.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Ilya Yanok <ilya.yanok@cogentembedded.com>
Cc: Stefan Herbrechtsmeier <stefan@herbrechtsmeier.net>
12 years agoehci: cosmetic: Define used constants
Benoît Thébaudeau [Fri, 10 Aug 2012 16:22:11 +0000 (18:22 +0200)]
ehci: cosmetic: Define used constants

Make some light cosmetic code cleanup by the way.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Ilya Yanok <ilya.yanok@cogentembedded.com>
Cc: Stefan Herbrechtsmeier <stefan@herbrechtsmeier.net>
12 years agoehci: Fail for multi-transaction interrupt transfers
Benoît Thébaudeau [Thu, 9 Aug 2012 21:50:44 +0000 (23:50 +0200)]
ehci: Fail for multi-transaction interrupt transfers

Interrupt transfers requiring several transactions are not supported by
submit_int_msg() because bInterval is ignored. This patch returns a failure code
and prints an error message in this case.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Ilya Yanok <ilya.yanok@cogentembedded.com>
Cc: Stefan Herbrechtsmeier <stefan@herbrechtsmeier.net>
12 years agoarm:trats: Enable g_dnl composite USB gadget with embedded DFU function on TRATS
Lukasz Majewski [Mon, 6 Aug 2012 12:41:11 +0000 (14:41 +0200)]
arm:trats: Enable g_dnl composite USB gadget with embedded DFU function on TRATS

Enable the g_dnl composite USB gadget driver with embedded DFU function on it.
It now uses the composite gadget framework to support download specific
USB functions (like enabled DFU or USB Mass Storage).

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Minkyu Kang <mk7.kang@samsung.com>
12 years agoarm:trats: Support for USB UDC driver at TRATS board.
Lukasz Majewski [Mon, 6 Aug 2012 12:41:10 +0000 (14:41 +0200)]
arm:trats: Support for USB UDC driver at TRATS board.

Support for USB UDC driver at trats board.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Minkyu Kang <mk7.kang@samsung.com>
12 years agodfu:cmd: Support for DFU u-boot command
Lukasz Majewski [Mon, 6 Aug 2012 12:41:09 +0000 (14:41 +0200)]
dfu:cmd: Support for DFU u-boot command

Support for u-boot's command line command "dfu <interface> <dev> [list]".

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Marek Vasut <marex@denx.de>