]> git.dujemihanovic.xyz Git - u-boot.git/log
u-boot.git
13 years agomkenvimage: Fix getopt() error handling
Horst Kronstorfer [Mon, 5 Dec 2011 00:55:24 +0000 (00:55 +0000)]
mkenvimage: Fix getopt() error handling

Since the original implementation indicates explicit error handling
we turn off getopt()'s internal error messaging to avoid duplicate
error messages.  Additionally we add ':' (missing option argument)
error handling.

Signed-off-by: Horst Kronstorfer <hkronsto@frequentis.com>
13 years agomkenvimage: Fix some typos
Horst Kronstorfer [Mon, 5 Dec 2011 00:55:23 +0000 (00:55 +0000)]
mkenvimage: Fix some typos

Signed-off-by: Horst Kronstorfer <hkronsto@frequentis.com>
13 years agophy: add Micrel KS8721BL phy definition
Vladimir Zapolskiy [Tue, 6 Dec 2011 02:47:57 +0000 (02:47 +0000)]
phy: add Micrel KS8721BL phy definition

This adds support for the Micrel KS8721BL/SL PHY.

The definition is taken from the correspondent datasheet.

Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
13 years agonet: introduce per device index
Michael Walle [Thu, 27 Oct 2011 11:31:35 +0000 (11:31 +0000)]
net: introduce per device index

Instead of counting the device index everytime a functions needs it, store
it in the eth_device struct. eth_register() keeps track of the indices and
updates the device's index number. This simplifies some functions in
net/eth.c.

Additionally, a network driver can now query its index, eg. to get the
correct environment ethaddr name.

Signed-off-by: Michael Walle <michael@walle.cc>
Cc: Prafulla Wadaskar <prafulla@marvell.com>
Cc: Mike Frysinger <vapier@gentoo.com>
Cc: Wolfgang Denk <wd@denx.de>
Acked-by: Mike Frysinger <vapier@gentoo.org>
13 years agomvgbe: remove setting of ethaddr within the driver
Michael Walle [Thu, 17 Nov 2011 12:52:29 +0000 (12:52 +0000)]
mvgbe: remove setting of ethaddr within the driver

A network driver should not touch the environment at all. This patch fixes
this behaviour by removing the code for setting a default/randomized MAC
address.

Signed-off-by: Michael Walle <michael@walle.cc>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Prafulla Wadaskar <prafulla@marvell.com>
Cc: Mike Frysinger <vapier@gentoo.org>
Cc: Prafulla Wadaskar <prafulla@marvell.com>
Cc: Valentin Longchamp <valentin.longchamp@keymile.com>
Cc: Eric Cooper <ecc@cmu.edu>
Cc: Jason Cooper <u-boot@lakedaemon.net>
Cc: Siddarth Gore <gores@marvell.com>
Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
Cc: Simon Guinot <simon.guinot@sequanux.org>
Acked-by: Prafulla Wadaskar <prafulla@marvell.com>
13 years agox86: Add support for specifying an initrd with the zboot command
Gabe Black [Mon, 5 Dec 2011 12:09:27 +0000 (12:09 +0000)]
x86: Add support for specifying an initrd with the zboot command

This change finishes plumbing the initrd support built into the zboot
mechanism out to the command interface.

It also fixes a bug in the command declaration where the kernel size could
be passed as an optional second parameter but not enough arguments were
allowed.

Signed-off-by: Gabe Black <gabeblack@chromium.org>
13 years agox86: Refactor the zboot innards so they can be reused with a vboot image
Gabe Black [Mon, 5 Dec 2011 12:09:26 +0000 (12:09 +0000)]
x86: Refactor the zboot innards so they can be reused with a vboot image

If vboot successfully verifies a kernel, it will leave it in place and
basically ready to boot. The zeropage table which is part of the x86 boot
protocol is at the end of the kernel, though, instead of the beginning, and
because the image is already in place there's no need to copy it around.
This change refactors the code which implements the zboot command so that
the configuration of the zeropage table and loading the pieces of the
kernel into memory are done separately. Also, because the command line goes
before the zeropage table in vboot which is somewhat incompatible with the
normal protocol, where to put the command line is a now a parameter instead
of being hard coded.

Signed-off-by: Gabe Black <gabeblack@chromium.org>
13 years agox86: Add infrastructure to extract an e820 table from the coreboot tables
Gabe Black [Mon, 5 Dec 2011 12:09:25 +0000 (12:09 +0000)]
x86: Add infrastructure to extract an e820 table from the coreboot tables

Also approximate the size of RAM using the largest RAM address available
in the tables. There may be areas which are marked as reserved which are
actually at the end of RAM.

Signed-off-by: Gabe Black <gabeblack@chromium.org>
13 years agox86: Add support for booting Linux using the 32 bit boot protocol
Gabe Black [Mon, 5 Dec 2011 12:09:24 +0000 (12:09 +0000)]
x86: Add support for booting Linux using the 32 bit boot protocol

This change conditionally modifies the zboot command so that it can use the
32 bit boot protocol. This is necessary because the 16 bit realmode entry
point assumes that it can call BIOS services which neither coreboot nor
u-boot provide.

Signed-off-by: Gabe Black <gabeblack@chromium.org>
13 years agox86: Clean up the x86 zimage code in preparation to extend it
Gabe Black [Mon, 5 Dec 2011 12:09:23 +0000 (12:09 +0000)]
x86: Clean up the x86 zimage code in preparation to extend it

This change cleans up some formatting issues in the zimage handling code, and
converts it from using offsets added to a base pointer to using the available
structure definitions which were already being included.

Signed-off-by: Gabe Black <gabeblack@chromium.org>
13 years agox86: Import code from coreboot's libpayload to parse the coreboot table
Gabe Black [Mon, 5 Dec 2011 12:09:22 +0000 (12:09 +0000)]
x86: Import code from coreboot's libpayload to parse the coreboot table

This change also forces the lib_sysinfo structure to be in the .data
section. Otherwise it ends up in the .bss section. U-boot assumes that it
doesn't need to copy it over during relocation, and instead fills that
whole section with zeroes. If we really were booting from ROM that would be
appropriate, but we need some information from the coreboot tables (memory
size) before then and have to fill that structure before relocation. We
skirt u-boot's assumption by putting this in .data where it assumes there
is still read only but non-zero data.

Signed-off-by: Gabe Black <gabeblack@chromium.org>
13 years agox86: Initial commit for running as a coreboot payload
Gabe Black [Tue, 29 Nov 2011 18:05:07 +0000 (18:05 +0000)]
x86: Initial commit for running as a coreboot payload

Add a target for running u-boot as a coreboot payload in boards.cfg, a
board, CPU and a config. This is a skeleton implementation which always
reports the size of memory as 64 MB.

Signed-off-by: Gabe Black <gabeblack@chromium.org>
13 years agoCHECKPATCH: ./board/esd/hh405/logo_320_240_8bpp.c
Marek Vasut [Thu, 15 Dec 2011 03:45:55 +0000 (03:45 +0000)]
CHECKPATCH: ./board/esd/hh405/logo_320_240_8bpp.c

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Stefan Roese <sr@denx.de>
13 years agoCHECKPATCH: ./board/esd/hh405/logo_1024_768_8bpp.c
Marek Vasut [Thu, 15 Dec 2011 03:45:54 +0000 (03:45 +0000)]
CHECKPATCH: ./board/esd/hh405/logo_1024_768_8bpp.c

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Stefan Roese <sr@denx.de>
13 years agoCHECKPATCH: ./board/esd/hh405/logo_320_240_4bpp.c
Marek Vasut [Thu, 15 Dec 2011 03:45:53 +0000 (03:45 +0000)]
CHECKPATCH: ./board/esd/hh405/logo_320_240_4bpp.c

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Stefan Roese <sr@denx.de>
13 years agoCHECKPATCH: ./board/esd/hh405/logo_640_480_24bpp.c
Marek Vasut [Thu, 15 Dec 2011 03:45:52 +0000 (03:45 +0000)]
CHECKPATCH: ./board/esd/hh405/logo_640_480_24bpp.c

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Stefan Roese <sr@denx.de>
13 years agoCHECKPATCH: ./board/esd/apc405/logo_640_480_24bpp.c
Marek Vasut [Thu, 15 Dec 2011 03:45:51 +0000 (03:45 +0000)]
CHECKPATCH: ./board/esd/apc405/logo_640_480_24bpp.c

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Stefan Roese <sr@denx.de>
13 years agoCHECKPATCH: ./board/esd/voh405/logo_320_240_4bpp.c
Marek Vasut [Thu, 15 Dec 2011 03:45:50 +0000 (03:45 +0000)]
CHECKPATCH: ./board/esd/voh405/logo_320_240_4bpp.c

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Stefan Roese <sr@denx.de>
13 years agoCHECKPATCH: ./board/esd/voh405/logo_640_480_24bpp.c
Marek Vasut [Thu, 15 Dec 2011 03:45:49 +0000 (03:45 +0000)]
CHECKPATCH: ./board/esd/voh405/logo_640_480_24bpp.c

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Stefan Roese <sr@denx.de>
13 years agoCHECKPATCH: ./board/esd/hh405/fpgadata.c
Marek Vasut [Thu, 15 Dec 2011 03:26:59 +0000 (03:26 +0000)]
CHECKPATCH: ./board/esd/hh405/fpgadata.c

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Anatolij Gustschin <agust@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
Acked-by: Anatolij Gustschin <agust@denx.de>
13 years agoCHECKPATCH: ./board/esd/pci405/fpgadata.c
Marek Vasut [Thu, 15 Dec 2011 03:26:58 +0000 (03:26 +0000)]
CHECKPATCH: ./board/esd/pci405/fpgadata.c

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Anatolij Gustschin <agust@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
Acked-by: Anatolij Gustschin <agust@denx.de>
13 years agoCHECKPATCH: ./board/esd/tasreg/fpgadata.c
Marek Vasut [Thu, 15 Dec 2011 03:26:57 +0000 (03:26 +0000)]
CHECKPATCH: ./board/esd/tasreg/fpgadata.c

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Anatolij Gustschin <agust@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
Acked-by: Anatolij Gustschin <agust@denx.de>
13 years agoCHECKPATCH: ./board/esd/apc405/fpgadata.c
Marek Vasut [Thu, 15 Dec 2011 03:26:56 +0000 (03:26 +0000)]
CHECKPATCH: ./board/esd/apc405/fpgadata.c

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Anatolij Gustschin <agust@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
Acked-by: Anatolij Gustschin <agust@denx.de>
13 years agoCHECKPATCH: ./board/esd/voh405/fpgadata.c
Marek Vasut [Thu, 15 Dec 2011 03:26:55 +0000 (03:26 +0000)]
CHECKPATCH: ./board/esd/voh405/fpgadata.c

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Anatolij Gustschin <agust@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
Acked-by: Anatolij Gustschin <agust@denx.de>
13 years agoCHECKPATCH: ./board/esd/ash405/fpgadata.c
Marek Vasut [Thu, 15 Dec 2011 03:26:54 +0000 (03:26 +0000)]
CHECKPATCH: ./board/esd/ash405/fpgadata.c

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Anatolij Gustschin <agust@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
Acked-by: Anatolij Gustschin <agust@denx.de>
13 years agoCHECKPATCH: ./board/esd/dasa_sim/fpgadata.c
Marek Vasut [Thu, 15 Dec 2011 03:26:53 +0000 (03:26 +0000)]
CHECKPATCH: ./board/esd/dasa_sim/fpgadata.c

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Anatolij Gustschin <agust@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
Acked-by: Anatolij Gustschin <agust@denx.de>
13 years agoCHECKPATCH: ./board/esd/ar405/fpgadata_xl30.c
Marek Vasut [Thu, 15 Dec 2011 03:26:52 +0000 (03:26 +0000)]
CHECKPATCH: ./board/esd/ar405/fpgadata_xl30.c

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Anatolij Gustschin <agust@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
Acked-by: Anatolij Gustschin <agust@denx.de>
13 years agoCHECKPATCH: ./board/esd/ar405/fpgadata.c
Marek Vasut [Thu, 15 Dec 2011 03:26:51 +0000 (03:26 +0000)]
CHECKPATCH: ./board/esd/ar405/fpgadata.c

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Anatolij Gustschin <agust@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
Acked-by: Anatolij Gustschin <agust@denx.de>
13 years agoCHECKPATCH: ./board/esd/plu405/fpgadata.c
Marek Vasut [Thu, 15 Dec 2011 03:26:50 +0000 (03:26 +0000)]
CHECKPATCH: ./board/esd/plu405/fpgadata.c

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Anatolij Gustschin <agust@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
Acked-by: Anatolij Gustschin <agust@denx.de>
13 years agoCHECKPATCH: ./board/esd/wuh405/fpgadata.c
Marek Vasut [Thu, 15 Dec 2011 03:26:49 +0000 (03:26 +0000)]
CHECKPATCH: ./board/esd/wuh405/fpgadata.c

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Anatolij Gustschin <agust@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
Acked-by: Anatolij Gustschin <agust@denx.de>
13 years agoCHECKPATCH: ./board/esd/cpci405/fpgadata_cpci405.c
Marek Vasut [Thu, 15 Dec 2011 03:26:48 +0000 (03:26 +0000)]
CHECKPATCH: ./board/esd/cpci405/fpgadata_cpci405.c

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Anatolij Gustschin <agust@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
Acked-by: Anatolij Gustschin <agust@denx.de>
13 years agoCHECKPATCH: ./board/esd/cpci405/fpgadata_cpci405ab.c
Marek Vasut [Thu, 15 Dec 2011 03:26:47 +0000 (03:26 +0000)]
CHECKPATCH: ./board/esd/cpci405/fpgadata_cpci405ab.c

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Anatolij Gustschin <agust@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
Acked-by: Anatolij Gustschin <agust@denx.de>
13 years agoCHECKPATCH: ./board/esd/cpci405/fpgadata_cpci4052.c
Marek Vasut [Thu, 15 Dec 2011 03:26:46 +0000 (03:26 +0000)]
CHECKPATCH: ./board/esd/cpci405/fpgadata_cpci4052.c

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Anatolij Gustschin <agust@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
Acked-by: Anatolij Gustschin <agust@denx.de>
13 years agoCHECKPATCH: ./board/esd/canbt/fpgadata.c
Marek Vasut [Thu, 15 Dec 2011 03:26:45 +0000 (03:26 +0000)]
CHECKPATCH: ./board/esd/canbt/fpgadata.c

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Anatolij Gustschin <agust@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
Acked-by: Anatolij Gustschin <agust@denx.de>
13 years agoCHECKPATCH: ./board/esd/du405/fpgadata.c
Marek Vasut [Thu, 15 Dec 2011 03:26:44 +0000 (03:26 +0000)]
CHECKPATCH: ./board/esd/du405/fpgadata.c

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Anatolij Gustschin <agust@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
Acked-by: Anatolij Gustschin <agust@denx.de>
13 years agoCHECKPATCH: ./board/esd/cpciiser4/fpgadata.c
Marek Vasut [Thu, 15 Dec 2011 03:26:43 +0000 (03:26 +0000)]
CHECKPATCH: ./board/esd/cpciiser4/fpgadata.c

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Anatolij Gustschin <agust@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
Acked-by: Anatolij Gustschin <agust@denx.de>
13 years agoCHECKPATCH: ./board/dave/PPChameleonEVB/fpgadata.c
Marek Vasut [Thu, 15 Dec 2011 03:26:42 +0000 (03:26 +0000)]
CHECKPATCH: ./board/dave/PPChameleonEVB/fpgadata.c

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Anatolij Gustschin <agust@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
Acked-by: Anatolij Gustschin <agust@denx.de>
13 years agoavr32:mmu.c: fix printf() length modifier
Andreas Bießmann [Thu, 15 Dec 2011 08:56:55 +0000 (09:56 +0100)]
avr32:mmu.c: fix printf() length modifier

avr32 uses unsigned long addresses, fix the printf() length modifier for that
fact.

Before this patch following warning occours:

---8<---
mmu.c: In function 'mmu_init_r':
mmu.c:25: warning: format '%08x' expects type 'unsigned int', but argument 2 has type 'uintptr_t'
--->8---

Signed-off-by: Andreas Bießmann <biessmann@corscience.de>
cc: Mike Frysinger <vapier@gentoo.org>
cc: Thomas Chou <thomas@wytron.com.tw>
cc: Reinhard Meyer <u-boot@emk-elektronik.de>
Acked-by: Mike Frysinger <vapier@gentoo.org>
13 years agofat.c: fix printf() length modifier
Andreas Bießmann [Thu, 15 Dec 2011 08:56:54 +0000 (09:56 +0100)]
fat.c: fix printf() length modifier

The DIRENTSPERBLOCK utilizes sizeof() which will return a size_t which has no
fixed size. Therefor use correct length modifer for printf() statement to
prevent compiler warnings.

This patch fixes following warning:

---8<---
fat.c: In function 'do_fat_read':
fat.c:879: warning: format '%d' expects type 'int', but argument 4 has type 'long unsigned int'
--->8---

Signed-off-by: Andreas Bießmann <biessmann@corscience.de>
cc: Mike Frysinger <vapier@gentoo.org>
cc: Thomas Chou <thomas@wytron.com.tw>
cc: rjones@nexus-tech.net
cc: kharris@nexus-tech.net
Acked-by: Mike Frysinger <vapier@gentoo.org>
13 years agocmd_sf.c: fix printf() length modifier
Andreas Bießmann [Thu, 15 Dec 2011 08:56:53 +0000 (09:56 +0100)]
cmd_sf.c: fix printf() length modifier

size_t is not always 'unsigned int', use corret length modifer.

This patch fixes following warning:

---8<---
cmd_sf.c: In function 'spi_flash_update_block':
cmd_sf.c:130: warning: format '%#x' expects type 'unsigend int', but argument 4 has type 'size_t'
cmd_sf.c:135: warning: format '%x' expects type 'unsigned int', but argument 3 has type 'size_t'
--->8---

Signed-off-by: Andreas Bießmann <biessmann@corscience.de>
cc: Mike Frysinger <vapier@gentoo.org>
cc: Thomas Chou <thomas@wytron.com.tw>
Acked-by: Mike Frysinger <vapier@gentoo.org>
13 years agoMake printf and vprintf safe from buffer overruns
Sonny Rao [Mon, 10 Oct 2011 09:22:31 +0000 (09:22 +0000)]
Make printf and vprintf safe from buffer overruns

From: Sonny Rao <sonnyrao@chromium.org>

utilize the added vscnprintf functions to avoid buffer overruns
The implementation is fairly dumb in that it doesn't detect
that the buffer is too small, but at least will not cause crashes.

Signed-off-by: Sonny Rao <sonnyrao@chromium.org>
13 years agovsprintf: Move function documentation into header file
Simon Glass [Wed, 2 Nov 2011 09:52:09 +0000 (09:52 +0000)]
vsprintf: Move function documentation into header file

Now that this is not in common.h, perhaps it is acceptable to move this
documentation into the header file.

Signed-off-by: Simon Glass <sjg@chromium.org>
13 years agoAdd safe vsnprintf and snprintf library functions
Sonny Rao [Wed, 2 Nov 2011 09:52:08 +0000 (09:52 +0000)]
Add safe vsnprintf and snprintf library functions

From: Sonny Rao <sonnyrao@chromium.org>

These functions are useful in U-Boot because they allow a graceful failure
rather than an unpredictable stack overflow when printf() buffers are
exceeded.

Mostly copied from the Linux kernel. I copied vscnprintf and
scnprintf so we can change printf and vprintf to use the safe
implementation but still return the correct values.

(Simon Glass <sjg@chromium.org> modified this commit a little)

Signed-off-by: Sonny Rao <sonnyrao@chromium.org>
13 years agoMove vsprintf functions into their own header
Simon Glass [Wed, 2 Nov 2011 09:52:07 +0000 (09:52 +0000)]
Move vsprintf functions into their own header

common.h is very large, so before changing the vsprintf functions, move the
prototypes into their own header file.

Signed-off-by: Simon Glass <sjg@chromium.org>
13 years agotools/setlocalversion: Update from the Linux Kernel
Kyle Moffett [Fri, 16 Dec 2011 11:14:40 +0000 (11:14 +0000)]
tools/setlocalversion: Update from the Linux Kernel

Several bugfixes have occurred upstream since this script was imported
into U-Boot.  In particular, the script currently in U-Boot does not
describe commit f8bbb4dad0e9d91b7a51d6cc54dcf66d142f50fe correctly,
resulting in a version of "2011.09" instead of "2011.09-01460-gf8bbb4d".

With that commit checked out, the command "git name-rev --tags HEAD"
gives this result:
  HEAD tags/v2011.12-rc1~30^2

Then the "changes" regex does not match because of the trailing '^2':
  grep -E '^HEAD[[:space:]]+(.*~[0-9]*|undefined)$'

The new version of tools/setlocalversion in the kernel correctly handles
those situations by using different plumbing commands.

The version from the kernel is not directly usable as it does not append
the full GIT version that U-Boot expects unless the right config options
are set (CONFIG_LOCALVERSION_AUTO=y).  Other than a few minor changes
for Kconfig, the imported version is very similar to Linux v3.2-rc4.

Signed-off-by: Kyle Moffett <Kyle.D.Moffett@boeing.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Mike Frysinger <vapier@gentoo.org>
Acked-by: Mike Frysinger <vapier@gentoo.org>
13 years agoMerge branch 'master' of git://git.denx.de/u-boot-usb
Wolfgang Denk [Sat, 17 Dec 2011 19:51:16 +0000 (20:51 +0100)]
Merge branch 'master' of git://git.denx.de/u-boot-usb

* 'master' of git://git.denx.de/u-boot-usb:
  USB: Use (get|put)_unaligned for accessing wMaxPacketSize
  usb:gadget:s5p Enable the USB Gadget framework at Exynos4210 (C210 Universal)
  README: add documentation for CONFIG_USB_ULPI*
  USB: ULPI: increase error case verbosity
  USB: ULPI: clean a mixup of return types
  USB: ULPI: switch argument type from u8 to unsigned

13 years agoUSB: Use (get|put)_unaligned for accessing wMaxPacketSize
Tom Rini [Thu, 15 Dec 2011 15:40:51 +0000 (08:40 -0700)]
USB: Use (get|put)_unaligned for accessing wMaxPacketSize

In 9792987721c7980453fe6447c3fa6593b44f8458 Stefan describes a usecase
where the previous behavior of leaving wMaxPacketSize be unaligned
caused fatal problems.  The initial fix for this problem was incomplete
however as it showed another cases of non-aligned access that previously
worked implicitly.  This switches to making sure that all access of
wMaxPacketSize are done via (get|put)_unaligned.

In order to maintain a level of readability to the code in some cases
we now use a variable for the value of wMaxPacketSize and in others, a
macro.

Cc: Minkyu Kang <mk7.kang@samsung.com>
Cc: Remy Bohmer <linux@bohmer.net>
OpenRISC:
Tested-by: Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>
Beagleboard xM, Pandaboard run-tested, s5p_goni build-tested.
Signed-off-by: Tom Rini <trini@ti.com>
13 years agousb:gadget:s5p Enable the USB Gadget framework at Exynos4210 (C210 Universal)
Lukasz Majewski [Thu, 15 Dec 2011 09:32:12 +0000 (10:32 +0100)]
usb:gadget:s5p Enable the USB Gadget framework at Exynos4210 (C210 Universal)

This commit enables support for USB Gadgets on the Exynos4210 (C210 Universal)
reference target.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Minkyu Kang <mk7.kang@samsung.com>
CC: Remy Bohmer <linux@bohmer.net>
13 years agoREADME: add documentation for CONFIG_USB_ULPI*
Igor Grinberg [Mon, 12 Dec 2011 10:08:35 +0000 (12:08 +0200)]
README: add documentation for CONFIG_USB_ULPI*

Add documentation for CONFIG_USB_ULPI and CONFIG_USB_ULPI_VIEWPORT
configuration options.

Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
13 years agoUSB: ULPI: increase error case verbosity
Igor Grinberg [Mon, 12 Dec 2011 10:08:34 +0000 (12:08 +0200)]
USB: ULPI: increase error case verbosity

Add the argument value to the error message.

Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
Acked-by: Simon Glass <sjg@chromium.org>
13 years agoUSB: ULPI: clean a mixup of return types
Igor Grinberg [Mon, 12 Dec 2011 10:08:33 +0000 (12:08 +0200)]
USB: ULPI: clean a mixup of return types

Clean a mixup between u32 and int as a return type
for functions returning error values.
Use int as it is native (and widely used) return type.

Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
Acked-by: Simon Glass <sjg@chromium.org>
13 years agoUSB: ULPI: switch argument type from u8 to unsigned
Igor Grinberg [Wed, 14 Dec 2011 06:16:03 +0000 (08:16 +0200)]
USB: ULPI: switch argument type from u8 to unsigned

There is no benefit in using u8, so switch to unsigned to reduce the
binary image size (by 20 bytes).

Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
Acked-by: Simon Glass <sjg@chromium.org>
13 years agopowerpc/mpc83xx: set TXEQA/TXEQE value for mpc837XE sata
Jerry Huang [Thu, 17 Nov 2011 02:15:38 +0000 (10:15 +0800)]
powerpc/mpc83xx: set TXEQA/TXEQE value for mpc837XE sata

In the current u-boot code, the value of these fields are the reserved
value (0b100), through the signal integrity measurement on freescale's
board with these reserved setting, the signal eye is out of the recommended
spec for non-transition amplitude at 500mV nominal.
According to the errata for MPC8379E, we should make a change to the
recommended setting from essentially nothing at this time to 0b001 for SATA.

Signed-off-by: Jerry Huang <Chang-Ming.Huang@freescale.com>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
13 years agoMerge branch 'agust@denx.de' of git://git.denx.de/u-boot-staging
Wolfgang Denk [Mon, 12 Dec 2011 13:51:16 +0000 (14:51 +0100)]
Merge branch 'agust@denx.de' of git://git.denx.de/u-boot-staging

* 'agust@denx.de' of git://git.denx.de/u-boot-staging:
  pm9g45: init serial console before relocation
  pm9261: init serial console before relocation
  pm9263: init serial console before relocation

13 years agoPrepare v2011.12-rc1
Wolfgang Denk [Mon, 12 Dec 2011 13:32:37 +0000 (14:32 +0100)]
Prepare v2011.12-rc1

Signed-off-by: Wolfgang Denk <wd@denx.de>
13 years agoMIPS: remove broken "tb0229" board
Wolfgang Denk [Sun, 11 Dec 2011 21:58:19 +0000 (21:58 +0000)]
MIPS: remove broken "tb0229" board

The "tb0229" board has long been unmaintained, and is broken.
Remove it.

Signed-off-by: Wolfgang Denk <wd@denx.de>
13 years agoboard/ti/omap2420h4/omap2420h4.c: Fix GC 4.6 build warning
Wolfgang Denk [Sun, 11 Dec 2011 21:16:20 +0000 (21:16 +0000)]
board/ti/omap2420h4/omap2420h4.c: Fix GC 4.6 build warning

Fix:
omap2420h4.c: In function 'dram_init':
omap2420h4.c:196:25: warning: variable 'cpu' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Richard Woodruff <r-woodruff2@ti.com>
Cc: Tom Rini <trini@ti.com>
13 years agofs/reiserfs/reiserfs.c: Fix compiler warning
Anatolij Gustschin [Mon, 12 Dec 2011 03:16:17 +0000 (03:16 +0000)]
fs/reiserfs/reiserfs.c: Fix compiler warning

Fix:
reiserfs.c: In function 'reiserfs_mount':
reiserfs.c:360:22: warning: dereferencing type-punned pointer
will break strict-aliasing rules [-Wstrict-aliasing]

Signed-off-by: Anatolij Gustschin <agust@denx.de>
13 years agoboard/mpl/common/isa.c: Fix GCC 4.6 build warnings
David Müller (ELSOFT AG) [Mon, 12 Dec 2011 01:36:53 +0000 (01:36 +0000)]
board/mpl/common/isa.c: Fix GCC 4.6 build warnings

Fix:
../common/isa.c: In function 'handle_isa_int':
../common/isa.c:385:21: warning: variable 'isr2' set but not used
[-Wunused-but-set-variable]
../common/isa.c:385:16: warning: variable 'isr1' set but not used
[-Wunused-but-set-variable]

Signed-off-by: David Mueller <d.mueller@elsoft.ch>
13 years agopm9g45: init serial console before relocation
Asen Dimov [Fri, 9 Dec 2011 11:00:07 +0000 (11:00 +0000)]
pm9g45: init serial console before relocation

The early messages can be seen on the debug console.

Signed-off-by: Asen Chavdarov Dimov <dimov@ronetix.at>
13 years agopm9261: init serial console before relocation
Asen Dimov [Fri, 9 Dec 2011 10:59:07 +0000 (10:59 +0000)]
pm9261: init serial console before relocation

The early messages can be seen on the debug console.

Signed-off-by: Asen Chavdarov Dimov <dimov@ronetix.at>
13 years agopm9263: init serial console before relocation
Asen Dimov [Fri, 9 Dec 2011 10:56:55 +0000 (10:56 +0000)]
pm9263: init serial console before relocation

The early messages can be seen on the debug console.

Signed-off-by: Asen Chavdarov Dimov <dimov@ronetix.at>
13 years agocommon/cmd_nvedit.c: Add missing 'env save' preproc guard
Horst Kronstorfer [Sat, 10 Dec 2011 02:25:19 +0000 (02:25 +0000)]
common/cmd_nvedit.c: Add missing 'env save' preproc guard

Signed-off-by: Horst Kronstorfer <hkronsto@frequentis.com>
13 years agoMIPS: tb0229: fix compile errors
Daniel Schwierzeck [Sun, 11 Dec 2011 06:39:37 +0000 (06:39 +0000)]
MIPS: tb0229: fix compile errors

This board breaks MAKEALL -a mips due to compile errors.
This patch fixes only the parts causing the errors to get MAKEALL
working.

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>
13 years agopowerpc/bootm: Flush ramdisk and device tree image when booting on MP
Kumar Gala [Wed, 7 Dec 2011 04:42:58 +0000 (04:42 +0000)]
powerpc/bootm: Flush ramdisk and device tree image when booting on MP

We already flush the kernel image after we've loaded it to ensure
visiblity to the other cores.  We need to do the same thing for the
ramdisk and device tree images.  In AMP boot scenarios we might not be
HW cache coherent with the secondary core that we are loading and
setting the ramdisk and device tree up for.  Thus we need to ensure
we've flushed the regions of memory utilized by ramdisk and device tree
so the loadding and any modifications (from decompression or fdt updates)
are made visible to the secondary cores.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
13 years agompc5200: digsy_mtc: Fix extension board detection
Anatolij Gustschin [Wed, 7 Dec 2011 06:05:55 +0000 (06:05 +0000)]
mpc5200: digsy_mtc: Fix extension board detection

Switch to extension board detection using pci_find_device()
instead of detecting by i2c access to EEPROM device on
extension board.

This is a cleaner detection method since EEPROM addresses
can be different on different board revisions. This also
avoids "i2c_read: failed to address chip" error messages
in the boot log on boards without extension board which
may confuse users.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
13 years agoMerge branch 'master' of git://git.denx.de/u-boot-usb
Wolfgang Denk [Mon, 12 Dec 2011 06:58:58 +0000 (07:58 +0100)]
Merge branch 'master' of git://git.denx.de/u-boot-usb

* 'master' of git://git.denx.de/u-boot-usb:
  USB: efikamx: Enable USB on EfikaMX and EfikaSB
  USB: Add generic ULPI layer and a viewport
  USB: EHCI: Allow EHCI post-powerup configuration in board files
  USB: mx51evk: add end enable USB host support on port 1
  USB: mx53loco: add end enable USB host support on port 1
  USB: MX5: Add MX5 usb post-init callback
  USB: MX5: Abstract out mx51 USB pixmux configuration
  USB: MX5: add generic USB EHCI support for mx51 and mx53
  USB: MX5: add helper functions to enable USB clocks
  usb:gadget:s5p Enable the USB Gadget framework at GONI
  usb:gadget:s5p USB Device Controller (UDC) implementation
  ehci: speed up initialization
  usb: add help for missing start subcommand
  cosmetic: remove excess whitespace from usb command help
  usb: align usb_endpoint_descriptor to 16-bit boundary
  usbtty: init endpoints prior to startup events
  pxa: convert pxa27x_udc to use read and write functions
  pxa: activate the first usb host port on pxa27x by default
  pxa: fix usb host register mismatch
  ehci-fsl: correct size of ehci caplength
  USB: Add usb_event_poll() to get keyboards working with EHCI
  USB: gadaget: add Marvell controller support
  USB: Fix complaints about strict aliasing in OHCI-HCD
  USB: Drop dead code from usb_kbd.c
  USB: Rework usb_kbd.c
  USB: Add functionality to poll the USB keyboard via control EP

13 years agoMerge branch 'master' of git://git.denx.de/u-boot-arm
Wolfgang Denk [Mon, 12 Dec 2011 06:56:41 +0000 (07:56 +0100)]
Merge branch 'master' of git://git.denx.de/u-boot-arm

* 'master' of git://git.denx.de/u-boot-arm:
  arm: add __aeabi_unwind_cpp_pr1() function to avoid linker complaints
  post: fix compile issue for post tests on kirkwood

13 years agoUSB: efikamx: Enable USB on EfikaMX and EfikaSB
Marek Vasut [Fri, 24 Jun 2011 19:46:07 +0000 (21:46 +0200)]
USB: efikamx: Enable USB on EfikaMX and EfikaSB

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Remy Bohmer <linux@bohmer.net>
Cc: Wolfgang Grandegger <wg@denx.de>
Cc: Jason Liu <r64343@freescale.com>
13 years agoUSB: Add generic ULPI layer and a viewport
Jana Rapava [Mon, 5 Dec 2011 09:07:00 +0000 (11:07 +0200)]
USB: Add generic ULPI layer and a viewport

Add partial ULPI specification implementation that should be enough to
interface the ULPI PHYs in the boot loader context.
Add a viewport implementation for Chipidea/ARC based controllers.

Signed-off-by: Jana Rapava <fermata7@gmail.com>
Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
Cc: Remy Bohmer <linux@bohmer.net>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Wolfgang Grandegger <wg@denx.de>
Cc: Simon Glass <sjg@chromium.org>
13 years agoUSB: EHCI: Allow EHCI post-powerup configuration in board files
Marek Vasut [Mon, 11 Jul 2011 00:37:01 +0000 (02:37 +0200)]
USB: EHCI: Allow EHCI post-powerup configuration in board files

This patch allows USB to work on some hosts, which need additional frobing after
the host was powered up via regular USB powerup sequence.

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Remy Bohmer <linux@bohmer.net>
Cc: Wolfgang Grandegger <wg@denx.de>
Cc: Jason Liu <r64343@freescale.com>
13 years agoUSB: mx51evk: add end enable USB host support on port 1
Wolfgang Grandegger [Fri, 11 Nov 2011 13:03:38 +0000 (14:03 +0100)]
USB: mx51evk: add end enable USB host support on port 1

Signed-off-by: Wolfgang Grandegger <wg@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Remy Bohmer <linux@bohmer.net>
Cc: Wolfgang Grandegger <wg@denx.de>
Cc: Jason Liu <r64343@freescale.com>
13 years agoUSB: mx53loco: add end enable USB host support on port 1
Wolfgang Grandegger [Fri, 11 Nov 2011 13:03:37 +0000 (14:03 +0100)]
USB: mx53loco: add end enable USB host support on port 1

Signed-off-by: Wolfgang Grandegger <wg@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Remy Bohmer <linux@bohmer.net>
Cc: Wolfgang Grandegger <wg@denx.de>
Cc: Jason Liu <r64343@freescale.com>
13 years agoUSB: MX5: Add MX5 usb post-init callback
Marek Vasut [Thu, 24 Nov 2011 04:14:00 +0000 (05:14 +0100)]
USB: MX5: Add MX5 usb post-init callback

This is useful for USB Transceivers init etc.

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Remy Bohmer <linux@bohmer.net>
Cc: Wolfgang Grandegger <wg@denx.de>
Cc: Jason Liu <r64343@freescale.com>
13 years agoUSB: MX5: Abstract out mx51 USB pixmux configuration
Marek Vasut [Thu, 24 Nov 2011 03:22:17 +0000 (04:22 +0100)]
USB: MX5: Abstract out mx51 USB pixmux configuration

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Remy Bohmer <linux@bohmer.net>
Cc: Wolfgang Grandegger <wg@denx.de>
Cc: Jason Liu <r64343@freescale.com>
13 years agoUSB: MX5: add generic USB EHCI support for mx51 and mx53
Wolfgang Grandegger [Fri, 11 Nov 2011 13:03:36 +0000 (14:03 +0100)]
USB: MX5: add generic USB EHCI support for mx51 and mx53

It's derived from ehci-mxc and uses the header files of the
ehci-fsl interface. The callback board_ehci_hcd_init() has
been introduced to allow for board-specific setup when USB
is started.

Signed-off-by: Wolfgang Grandegger <wg@denx.de>
CC: Stefano Babic <sbabic@denx.de>
CC: Remy Bohmer <linux@bohmer.net>
13 years agoUSB: MX5: add helper functions to enable USB clocks
Wolfgang Grandegger [Fri, 11 Nov 2011 13:03:34 +0000 (14:03 +0100)]
USB: MX5: add helper functions to enable USB clocks

Signed-off-by: Wolfgang Grandegger <wg@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Remy Bohmer <linux@bohmer.net>
Cc: Wolfgang Grandegger <wg@denx.de>
Cc: Jason Liu <r64343@freescale.com>
V2: Fix spacing in crm_regs.h

13 years agousb:gadget:s5p Enable the USB Gadget framework at GONI
Lukasz Majewski [Thu, 27 Oct 2011 08:36:47 +0000 (10:36 +0200)]
usb:gadget:s5p Enable the USB Gadget framework at GONI

This commit enables support for USB Gadgets on the GONI
reference target.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Minkyu Kang <mk7.kang@samsung.com>
Cc: Remy Bohmer <linux@bohmer.net>
13 years agousb:gadget:s5p USB Device Controller (UDC) implementation
Lukasz Majewski [Thu, 27 Oct 2011 08:36:46 +0000 (10:36 +0200)]
usb:gadget:s5p USB Device Controller (UDC) implementation

This commit provides UDC driver support for Samsung's SoC
family of processors.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Minkyu Kang <mk7.kang@samsung.com>
Cc: Remy Bohmer <linux@bohmer.net>
13 years agoehci: speed up initialization
Vincent Palatin [Mon, 5 Dec 2011 22:52:22 +0000 (14:52 -0800)]
ehci: speed up initialization

According to EHCI specification v1.0, the controller should stabilize
the power on a port at most 20 ms after the port power bit transition.
So, we put this setting in the virtual descriptor corresponding field,
(bPwrOn2PwrGood = 10 => 10 x 2ms = 20ms), this saves about 500ms at each
controller initialization/enumeration.

Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
13 years agousb: add help for missing start subcommand
Veli-Pekka Peltola [Wed, 2 Nov 2011 14:59:56 +0000 (16:59 +0200)]
usb: add help for missing start subcommand

Signed-off-by: Veli-Pekka Peltola <veli-pekka.peltola@bluegiga.com>
Cc: Remy Bohmer <linux@bohmer.net>
13 years agocosmetic: remove excess whitespace from usb command help
Veli-Pekka Peltola [Wed, 2 Nov 2011 14:59:55 +0000 (16:59 +0200)]
cosmetic: remove excess whitespace from usb command help

Signed-off-by: Veli-Pekka Peltola <veli-pekka.peltola@bluegiga.com>
Cc: Remy Bohmer <linux@bohmer.net>
13 years agousb: align usb_endpoint_descriptor to 16-bit boundary
Stefan Kristiansson [Thu, 20 Oct 2011 19:25:37 +0000 (22:25 +0300)]
usb: align usb_endpoint_descriptor to 16-bit boundary

The usb_endpoint_descriptor struct is 7 bytes large and is
defined as an array (ep_desc[USB_MAXENDPOINTS])
in the usb_interface struct in include/usb.h

This fact will result in that every odd index in that
array will start at an uneven address, this in
turn makes accesses to u16 wMaxPacketSize unaligned.
Such accesses are illegal on the OpenRISC architecture
(as well as other architectures) and will render a bus error.

Setting the aligned(2) attribute on usb_endpoint_descriptor
will force wMaxPacketSize to a 16-bit boundary.

Signed-off-by: Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>
13 years agousbtty: init endpoints prior to startup events
Stefan Herbrechtsmeier [Mon, 17 Oct 2011 15:22:49 +0000 (17:22 +0200)]
usbtty: init endpoints prior to startup events

On some usb device controllers (pxa) the endpoint configuration must be programmed prior to enable it.

Signed-off-by: Stefan Herbrechtsmeier <sherbrec@cit-ec.uni-bielefeld.de>
CC: Marek Vasut <marek.vasut@gmail.com>
CC: Remy Bohmer <linux@bohmer.net>
13 years agopxa: convert pxa27x_udc to use read and write functions
Stefan Herbrechtsmeier [Mon, 17 Oct 2011 15:22:48 +0000 (17:22 +0200)]
pxa: convert pxa27x_udc to use read and write functions

Signed-off-by: Stefan Herbrechtsmeier <sherbrec@cit-ec.uni-bielefeld.de>
CC: Marek Vasut <marek.vasut@gmail.com>
CC: Remy Bohmer <linux@bohmer.net>
13 years agopxa: activate the first usb host port on pxa27x by default
Stefan Herbrechtsmeier [Mon, 17 Oct 2011 15:22:47 +0000 (17:22 +0200)]
pxa: activate the first usb host port on pxa27x by default

The pxa27x has 3 usb host ports. Activate all by default.

Signed-off-by: Stefan Herbrechtsmeier <sherbrec@cit-ec.uni-bielefeld.de>
CC: Marek Vasut <marek.vasut@gmail.com>
CC: Remy Bohmer <linux@bohmer.net>
13 years agopxa: fix usb host register mismatch
Stefan Herbrechtsmeier [Mon, 17 Oct 2011 15:22:46 +0000 (17:22 +0200)]
pxa: fix usb host register mismatch

Signed-off-by: Stefan Herbrechtsmeier <sherbrec@cit-ec.uni-bielefeld.de>
CC: Marek Vasut <marek.vasut@gmail.com>
CC: Remy Bohmer <linux@bohmer.net>
13 years agoehci-fsl: correct size of ehci caplength
Wolfgang Grandegger [Mon, 17 Oct 2011 18:16:09 +0000 (20:16 +0200)]
ehci-fsl: correct size of ehci caplength

According to the EHCI specification the Capability Register Length
has a size of 8 bits.

Signed-off-by: Wolfgang Grandegger <wg@denx.de>
Acked-by: Kumar Gala <galak@kernel.crashing.org>
13 years agoUSB: Add usb_event_poll() to get keyboards working with EHCI
Marek Vasut [Sun, 25 Sep 2011 19:07:56 +0000 (21:07 +0200)]
USB: Add usb_event_poll() to get keyboards working with EHCI

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Remy Bohmer <linux@bohmer.net>
13 years agoUSB: gadaget: add Marvell controller support
Lei Wen [Wed, 5 Oct 2011 15:11:40 +0000 (08:11 -0700)]
USB: gadaget: add Marvell controller support

Signed-off-by: Lei Wen <leiwen@marvell.com>
13 years agoUSB: Fix complaints about strict aliasing in OHCI-HCD
Marek Vasut [Fri, 7 Oct 2011 00:00:13 +0000 (02:00 +0200)]
USB: Fix complaints about strict aliasing in OHCI-HCD

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
13 years agoUSB: Drop dead code from usb_kbd.c
Marek Vasut [Mon, 10 Oct 2011 15:34:27 +0000 (17:34 +0200)]
USB: Drop dead code from usb_kbd.c

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Cc: Remy Bohmer <linux@bohmer.net>
Cc: Wolfgang Denk <wd@denx.de>
13 years agoUSB: Rework usb_kbd.c
Marek Vasut [Mon, 10 Oct 2011 15:34:26 +0000 (16:34 +0100)]
USB: Rework usb_kbd.c

* Support dynamic allocation of devices
* Passing data via usb device privptr
* Reorder functions to avoid forward declarations
* Introduce generic polling mechanism to fix musb and ehci-hcd breakage
  due to using "extern new;" to access keyboard driver data!

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Cc: Remy Bohmer <linux@bohmer.net>
Cc: Wolfgang Denk <wd@denx.de>
13 years agoUSB: Add functionality to poll the USB keyboard via control EP
Marek Vasut [Sun, 25 Sep 2011 19:00:37 +0000 (20:00 +0100)]
USB: Add functionality to poll the USB keyboard via control EP

This allows the keyboard to avoid requests via Interrupt Endpoint altogether and
run all requests via Control Endpoint. This uses the Get_Report request.

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Remy Bohmer <linux@bohmer.net>
Rebased on current code.

Signed-off-by: Remy Bohmer <linux@bohmer.net>
13 years agoarm: add __aeabi_unwind_cpp_pr1() function to avoid linker complaints
Wolfgang Grandegger [Thu, 10 Nov 2011 01:51:29 +0000 (01:51 +0000)]
arm: add __aeabi_unwind_cpp_pr1() function to avoid linker complaints

With the ELDK 5.1 (beta) "armv7a" toolchain I'm get the following
build failure:

  $ ./MAKEALL mx51evk
  ...
  /opt/eldk-5.1/armv7a/sysroots/arm-linux-gnueabi/usr/lib/arm-linux-
  gnueabi/4.6.1/libgcc.a(bpabi.o):(.ARM.exidx+0x0): undefined
  reference to `__aeabi_unwind_cpp_pr1'
  make: *** [u-boot] Error 1

This patch fixes the issue similar to commit
d442b6e7ad6a86e2fd0e6297291fe8872ff26fc6 but I don't know if it's
general enough or if it does harm when using other toolchains.

Signed-off-by: Wolfgang Grandegger <wg@denx.de>
13 years agopost: fix compile issue for post tests on kirkwood
Holger Brunck [Thu, 24 Nov 2011 03:09:10 +0000 (03:09 +0000)]
post: fix compile issue for post tests on kirkwood

commit f31a911fe (arm, post: add missing post_time_ms for arm)
enables get_ticks and get_tbclk for all arm based boards,
but kirkwood has currently no implementation for this. So
undefine this for kirkwood boards.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
cc: Heiko Schocher <hs@denx.de>
cc: Prafulla Wadaskar <prafulla@marvell.com>
cc: Valentin Longchamp <valentin.longchamp@keymile.com>

13 years agosandbox: fix compiling of cpu/os.c
Andreas Bießmann [Fri, 2 Dec 2011 10:53:13 +0000 (11:53 +0100)]
sandbox: fix compiling of cpu/os.c

U-boot itself generally builds with -nostdinc.  This is because the
bootloader needs to be completely standalone.  In the sandbox arch
though, we need a little bit of code to glue the u-boot world to the
host operating system, and we need to be able to access the host
libc's headers in order to do so.

Currently, we're using -I/usr/include to workaround the global
-nostdinc, but that doesn't work for everyone and for all headers.
Instead, let's filter out -nostdinc when building the os.c code.

Without this patch, some distros hit errors such as:
---8<---
In file included from /usr/include/fcntl.h:27:0,
                 from os.c:22:
/usr/include/features.h:323:26: fatal error:
     bits/predefs.h: No such file or directory
--->8---

Signed-off-by: Andreas Bießmann <biessmann@corscience.de>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agosandbox: Add timer simulation
Matthias Weisser [Tue, 29 Nov 2011 11:16:40 +0000 (12:16 +0100)]
sandbox: Add timer simulation

Making sleep command work

Signed-off-by: Matthias Weisser <weisserm@arcor.de>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agosandbox: Add improved RAM simulation
Matthias Weisser [Sat, 5 Nov 2011 10:40:34 +0000 (11:40 +0100)]
sandbox: Add improved RAM simulation

Using mmap to allocate memory from the OS for RAM simulation we can use
u-boot own malloc implementation.

Tested-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Matthias Weisser <weisserm@arcor.de>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agopost/post.c: Use lldiv for 64-bit divisions
Christian Riesch [Fri, 9 Dec 2011 15:54:02 +0000 (16:54 +0100)]
post/post.c: Use lldiv for 64-bit divisions

Signed-off-by: Christian Riesch <christian.riesch@omicron.at>
Cc: Tom Rini <trini@ti.com>
Cc: Heiko Schocher <hs@denx.de>
Cc: Wolfgang Denk <wd@denx.de>