platform/kernel/u-boot.git
11 years agoOMAP3: drop CONFIG_SPL_OS_BOOT_KEY and use local define
Stefano Babic [Sat, 23 Feb 2013 00:53:26 +0000 (00:53 +0000)]
OMAP3: drop CONFIG_SPL_OS_BOOT_KEY and use local define

CONFIG_SPL_OS_BOOT_KEY is used only in board files. It is
not required to have a general CONFIG_ option. Rename it and
define it in board directory.

Signed-off-by: Stefano Babic <sbabic@denx.de>
Reviewed-by: Tom Rini <trini@ti.com>
11 years agoAdd README for the "Falcon" mode
Stefano Babic [Sat, 23 Feb 2013 00:53:25 +0000 (00:53 +0000)]
Add README for the "Falcon" mode

Simple howto to add support to a board
for booting the kernel from SPL ("Falcon" mode).

Signed-off-by: Stefano Babic <sbabic@denx.de>
Reviewed-by: Tom Rini <trini@ti.com>
11 years agohash: Use lower case for hash algorithm names
Simon Glass [Sun, 24 Feb 2013 17:33:32 +0000 (17:33 +0000)]
hash: Use lower case for hash algorithm names

Rather than use strcasecmp() in the hash algorithm search, require the
caller to do this first. Most of U-Boot can use lower case anyway, and
the hash command can convert to lower case before calling hash_command().
This saves needing strcasecmp() for boards that use hashing but not
the hash command.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agosandbox: Allow hash functions to work correctly
Simon Glass [Sun, 24 Feb 2013 17:33:31 +0000 (17:33 +0000)]
sandbox: Allow hash functions to work correctly

Use map_sysmem() so that hashing is possible on sandbox.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agosandbox: Update mtest to fix crashes
Simon Glass [Thu, 28 Feb 2013 17:47:14 +0000 (17:47 +0000)]
sandbox: Update mtest to fix crashes

Use map_sysmem() in the memory tester so that it works as expected on
sandbox.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agoMove CONFIG_SYS_MEMTEST_SCRATCH #ifdef to top of file
Simon Glass [Sun, 24 Feb 2013 17:33:29 +0000 (17:33 +0000)]
Move CONFIG_SYS_MEMTEST_SCRATCH #ifdef to top of file

This config effectively has a default value of 0, so add this setting
at the top of the code to remove an #ifdef in the C function.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agosandbox: config: Enable hash functions and mtest
Simon Glass [Sun, 24 Feb 2013 20:29:23 +0000 (20:29 +0000)]
sandbox: config: Enable hash functions and mtest

Enable the hash command and sha1/256 hashing for sandbox. Also use a
better address for memory testing (since the existing one is set up
for linux host memory space).

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agoRoll crc32 into hash infrastructure
Simon Glass [Sun, 24 Feb 2013 20:30:22 +0000 (20:30 +0000)]
Roll crc32 into hash infrastructure

Add the CRC32 algorithm to the list of available hashes, and make
the crc32 command use hash_command(). Add a new crc32_wd_buf() to
make this possible, which puts its result in a buffer rather than
returning it as a 32-bit value.

Note: For some boards the hash command is not enabled, neither
are sha1, sha256 or the verify option. In this case the full
hash implementation adds about 500 bytes of overhead. So as a
special case, we use #ifdef to select very simple bahaviour in
that case. The justification for this is that it is currently
a very common case (virtually all boards enable crc32 but only
some enable more advanced features).

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agohash: Add a flag to support saving hashes in the environment
Simon Glass [Sun, 24 Feb 2013 17:33:26 +0000 (17:33 +0000)]
hash: Add a flag to support saving hashes in the environment

Some hashing commands permit saving the hash in an environment variable,
and verifying a hash from there. But the crc32 command does not support
this. In order to permit crc32 to use the generic hashing infrastructure,
add a flag to select which behaviour to use.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agoimage: Use crc header file instead of C prototypes
Simon Glass [Sun, 24 Feb 2013 17:33:25 +0000 (17:33 +0000)]
image: Use crc header file instead of C prototypes

We have an existing header which the crc32 definitions, so use it.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agonet: Use new numeric setenv functions
Simon Glass [Sun, 24 Feb 2013 17:33:24 +0000 (17:33 +0000)]
net: Use new numeric setenv functions

Use setenv_ulong(), setenv_hex() and setenv_addr() in net/

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agofs: Use new numeric setenv functions
Simon Glass [Sun, 24 Feb 2013 17:33:23 +0000 (17:33 +0000)]
fs: Use new numeric setenv functions

Use setenv_ulong(), setenv_hex() and setenv_addr() in fs/

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agocommon: Use new numeric setenv functions
Simon Glass [Sun, 24 Feb 2013 17:33:22 +0000 (17:33 +0000)]
common: Use new numeric setenv functions

Use setenv_ulong(), setenv_hex() and setenv_addr() in common/

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agoUpdate set_working_fdt_addr() to use setenv_addr()
Simon Glass [Sun, 24 Feb 2013 17:33:21 +0000 (17:33 +0000)]
Update set_working_fdt_addr() to use setenv_addr()

We might as well use this common function instead of repeating the same
code.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agoReduce casting in mtest
Simon Glass [Sun, 24 Feb 2013 17:33:20 +0000 (17:33 +0000)]
Reduce casting in mtest

Use a ulong for the command arguments, and only cast to an address when
needed. This fixes warnings in sandbox where pointers are typically 64 bits
long.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agoBring mtest putc() into common code
Simon Glass [Sun, 24 Feb 2013 17:33:19 +0000 (17:33 +0000)]
Bring mtest putc() into common code

If we get a Ctrl-C abort, we always print a newline. Move this repeated
code out of the functions and into a single place in the caller.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agoFix mtest indenting
Simon Glass [Sun, 24 Feb 2013 17:33:18 +0000 (17:33 +0000)]
Fix mtest indenting

Some of the inner loops are not indented correctly. Fix this.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agoUse common mtest iteration counting
Simon Glass [Sun, 24 Feb 2013 17:33:17 +0000 (17:33 +0000)]
Use common mtest iteration counting

The iteration code is the same for each version of the memory test, so
pull it out into the common function.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agoSplit out the memory tests into separate functions
Simon Glass [Sun, 24 Feb 2013 17:33:16 +0000 (17:33 +0000)]
Split out the memory tests into separate functions

Half of the code is currently hidden behind an #ifdef. Move the two
memory tests into their own functions and use the compiler to eliminate
the unused code.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agosandbox: Change memory commands to use map_physmem
Simon Glass [Sun, 24 Feb 2013 17:33:15 +0000 (17:33 +0000)]
sandbox: Change memory commands to use map_physmem

Sandbox wants to support commands which use memory. The map_sysmen()
call provides this feature, so use this in the memory commands.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agosandbox: Add un/map_sysmen() to deal with sandbox's ram_buf
Simon Glass [Sun, 24 Feb 2013 17:33:14 +0000 (17:33 +0000)]
sandbox: Add un/map_sysmen() to deal with sandbox's ram_buf

Sandbox doesn't actually provide U-Boot access to the machine's physical
memory. Instead it provides a RAM buffer of configurable size, and all
memory accesses are within that buffer. Sandbox memory starts at 0 and
is CONFIG_DRAM_SIZE bytes in size. Allowing access outside this buffer
might produce unpredictable results in the event of an error, and would
expose the host machine's memory architecture to the sandbox U-Boot.

Most U-Boot functions assume that they can just access memory at given
address. For sandbox this is not true.

Add a map_sysmem() call which converts a U-Boot address to a system
address. In most cases this is a NOP, but for sandbox it returns a
pointer to that memory inside the RAM buffer.

To get a U-Boot feature to work correctly within sandbox, you should call
map_sysmem() to get a pointer to the address, and then use that address for
any U-Boot memory accesses.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agosandbox: Improve sandbox serial port keyboard interface
Taylor Hutt [Sun, 24 Feb 2013 17:33:13 +0000 (17:33 +0000)]
sandbox: Improve sandbox serial port keyboard interface

Implements the tstc() interface for the serial driver.  Multiplexing
the console between the serial port and a keyboard uses a polling
method of checking if characters are available; this means that the
serial console must be non-blocking when attempting to read
characters.

Signed-off-by: Taylor Hutt <thutt@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agoUpdate print_buffer() to use const
Simon Glass [Sun, 24 Feb 2013 17:33:12 +0000 (17:33 +0000)]
Update print_buffer() to use const

The buffer cannot be changed by this function, so change the buffer
pointer to a const. This allows callers with const pointer to use the
function without a cast.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agoTidy up error checking and fix bug in hash command
Simon Glass [Sun, 24 Feb 2013 17:33:11 +0000 (17:33 +0000)]
Tidy up error checking and fix bug in hash command

There are two problems:

1. The argument count needs to be checked before argv is used
2. When verify is not enabled, we need to define a constant zero value

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agosandbox: fix compiler warning
Allen Martin [Tue, 22 Jan 2013 13:11:21 +0000 (13:11 +0000)]
sandbox: fix compiler warning

Add back return statement to fix compiler warning about control flow
reaching end of non void function that was introduced with:

e05e5de arm: move C runtime setup code in crt0.S

Signed-off-by: Allen Martin <amartin@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
11 years agoARM: ns9750dev: remove remainders of dead board
Wolfgang Denk [Thu, 29 Nov 2012 02:53:29 +0000 (02:53 +0000)]
ARM: ns9750dev: remove remainders of dead board

Commit 8b710b1 started removing code for the unmaintained "ns9750dev"
board; the board support is still broken, and not included anywhere in
the Makefile or boards.cfg.  Remove the remaining dead code.

Signed-off-by: Wolfgang Denk <wd@denx.de>
11 years agoREADME.scrapyard: add missing commit IDs
Wolfgang Denk [Thu, 29 Nov 2012 02:53:28 +0000 (02:53 +0000)]
README.scrapyard: add missing commit IDs

Now that the patches have made it into mainline, we can also add the
commit IDs.

Signed-off-by: Wolfgang Denk <wd@denx.de>
11 years agocommon/env_nand.c: calculate crc only when readenv was OK
Phil Sutter [Thu, 21 Feb 2013 17:21:56 +0000 (18:21 +0100)]
common/env_nand.c: calculate crc only when readenv was OK

Calculating the checksum of incompletely read data is useless.

Signed-off-by: Phil Sutter <phil.sutter@viprinet.com>
[scottwood@freescale.com: minor formatting fix]
Signed-off-by: Scott Wood <scottwood@freescale.com>
11 years agoenv_nand.c: clarify log messages when env reading fails
Phil Sutter [Thu, 21 Feb 2013 17:21:55 +0000 (18:21 +0100)]
env_nand.c: clarify log messages when env reading fails

The single message is misleading, since there is no equivalent success
note when reading the other copy succeeds. Instead, warn if one of the
redundant copies could not be loaded and emphasise on the error when
reading both fails.

Signed-off-by: Phil Sutter <phil.sutter@viprinet.com>
11 years agomtd: nand: Check if NAND is locked tight before lock cmds
Joe Hershberger [Fri, 8 Feb 2013 09:27:19 +0000 (09:27 +0000)]
mtd: nand: Check if NAND is locked tight before lock cmds

If the NAND is locked tight, commands such as lock and unlock will not
work, but the NAND chip may not report an error.  Check the lock tight
status before attempting such operations so that an error status can be
reported if we know the operation will not succeed.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
11 years agonand: fix nand read.option parsing
Harvey Chapman [Thu, 7 Feb 2013 11:34:44 +0000 (11:34 +0000)]
nand: fix nand read.option parsing

"nand read.part addr off size" would be treated as "nand read.raw addr off 1"
It now fails as intended stating "Unknown nand command suffix '.part'"

Signed-off-by: Harvey Chapman <hchapman@3gfp.com>
11 years agoimls: Add support to list images in NAND device
Vipin Kumar [Sun, 16 Dec 2012 22:32:48 +0000 (22:32 +0000)]
imls: Add support to list images in NAND device

This patch adds support to list images in NAND flash through imls

Signed-off-by: Vipin Kumar <vipin.kumar@st.com>
11 years agoMerge branch 'u-boot-ti/master' into 'u-boot-arm/master'
Albert ARIBAUD [Thu, 21 Feb 2013 20:30:47 +0000 (21:30 +0100)]
Merge branch 'u-boot-ti/master' into 'u-boot-arm/master'

11 years agoMerge 'u-boot-microblaze/mainline/arm' into 'u-boot-arm/master'
Albert ARIBAUD [Thu, 21 Feb 2013 15:43:19 +0000 (16:43 +0100)]
Merge 'u-boot-microblaze/mainline/arm' into 'u-boot-arm/master'

This pulls the three following ZYNQ commits into ARM master:

7dca54f8: xilinx: zynq: Enable DCC and create new zynq_dcc board
59c651f4: arm: zynq: Add SLCR support with system reset
00ed3458: arm: zynq: Add lowlevel initialization to C

11 years agoMAKEALL: add support for per architecture toolchains
Allen Martin [Tue, 29 Jan 2013 14:34:58 +0000 (14:34 +0000)]
MAKEALL: add support for per architecture toolchains

Add support for per architecture CROSS_COMPILE toolchain definitions
via CROSS_COMPILE_ARCH where "ARCH" is any of the supported u-boot
architectures.  This allows building every supported u-boot board in a
single pass of MAKEALL.

Signed-off-by: Allen Martin <amartin@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Stephen Warren <swarren@wwwdotorg.org>
11 years agogpt: fix partion size limit
Piotr Wilczek [Sun, 27 Jan 2013 22:59:25 +0000 (22:59 +0000)]
gpt: fix partion size limit

Currently, in gpt command, partion size is converted from string
to unsigned long type using 'ustrtol' function. That type limits
the partition size to 4GB.

This patch changes the conversion function to 'ustrtoll' to return
unsigned long long type.

Signed-off-by: Piotr Wilczek <p.wilczek@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
11 years agomac: Fix the condition check for setting the MAC from the EEPROM
Holger Hans Peter Freyther [Thu, 7 Feb 2013 23:41:03 +0000 (23:41 +0000)]
mac: Fix the condition check for setting the MAC from the EEPROM

The issue got introduced in a cleanup by Manjunath Hadli in commit
826e99136e2bce61f3f6572e32d7aa724c116e6d. The eth_getenv_enetaddr_by_index
method will validate the MAC addr and if none is set in the environment
0 will be returned. Set the MAC from the eeprom if no valid address
is found in environment.

Signed-off-by: Holger Hans Peter Freyther <holger@freyther.de>
11 years agoled: The gpio_led.c code expects that LED state is from the enum
Holger Hans Peter Freyther [Thu, 7 Feb 2013 23:41:02 +0000 (23:41 +0000)]
led: The gpio_led.c code expects that LED state is from the enum

u-boot is not consistent if state should be 0|1 or of the enum, the
GPIO driver expects this to be one of the enum values. Update the
caller.

Signed-off-by: Holger Hans Peter Freyther <holger@freyther.de>
11 years agogpio: Build the da8xx_gpio code for the davinci644x device
Holger Hans Peter Freyther [Thu, 7 Feb 2013 23:41:01 +0000 (23:41 +0000)]
gpio: Build the da8xx_gpio code for the davinci644x device

The differences include the number of GPIOs and that one is
not required to set the pinmux on request.

Signed-off-by: Holger Hans Peter Freyther <holger@freyther.de>
11 years agocmd_elf: Fix broken bootvx command
Reinhard Arlt [Mon, 4 Feb 2013 09:37:11 +0000 (09:37 +0000)]
cmd_elf: Fix broken bootvx command

Fix broken bootvx command.

Signed-off-by: Reinhard Arlt <reinhard.arlt@esd.eu>
11 years agocmd_load.c: Add #endif comments to reduce confusion
Robert P. J. Day [Sun, 3 Feb 2013 05:46:13 +0000 (05:46 +0000)]
cmd_load.c: Add #endif comments to reduce confusion

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
11 years agocmd_mem.c: Fix some typoes, no functional changes
Robert P. J. Day [Sun, 3 Feb 2013 02:29:54 +0000 (02:29 +0000)]
cmd_mem.c: Fix some typoes, no functional changes

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
11 years agofw_env.config: Correct "fw_saveenv" to "fw_setenv".
Robert P. J. Day [Thu, 31 Jan 2013 02:06:40 +0000 (02:06 +0000)]
fw_env.config: Correct "fw_saveenv" to "fw_setenv".

Fix a comment in the fw_env.config file, no functional change.

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
11 years agovsprintf: add ustrtoll function
Piotr Wilczek [Sun, 27 Jan 2013 22:59:24 +0000 (22:59 +0000)]
vsprintf: add ustrtoll function

Add 'ustrtoull' function to convert size from string (ex: 1GiB)
to unsigned long long type

Signed-off-by: Piotr Wilczek <p.wilczek@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
11 years agomalloc: make malloc_bin_reloc static
Gabor Juhos [Mon, 21 Jan 2013 21:10:38 +0000 (21:10 +0000)]
malloc: make malloc_bin_reloc static

On architectures where manual relocation
is needed, the 'malloc_bin_reloc' function
must be called after 'mem_malloc_init'.

Make the 'malloc_bin_reloc' function static
and call it directly from 'mem_malloc_init'
instead of calling that from board_init_{r,f}
functions of the affected architectures.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Andreas Bießmann <andreas.devel@gmail.com>
Cc: Jason Jin <Jason.jin@freescale.com>
Cc: Macpaul Lin <macpaul@andestech.com>
Cc: Daniel Hellstrom <daniel@gaisler.com>
Cc: Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>
11 years agoserial/ns16550: don't generate functions for undefined ports
Scott Wood [Fri, 18 Jan 2013 15:42:16 +0000 (15:42 +0000)]
serial/ns16550: don't generate functions for undefined ports

This saved 640 bytes on MPC8536DS (a board with two of the six
ports defined).

Signed-off-by: Scott Wood <scottwood@freescale.com>
11 years agoARM: atmel: add at91sam9g20ek_2mmc nand boot support
Bo Shen [Tue, 29 Jan 2013 15:43:26 +0000 (15:43 +0000)]
ARM: atmel: add at91sam9g20ek_2mmc nand boot support

Add at91sam9g20_2mmc nand boot support. on this board, there is no
dataflash, so disable it

change one commet for at91sam9g20ek board

Signed-off-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
11 years agoam335x evm: Add am335x_evm_spiboot target
Tom Rini [Fri, 8 Feb 2013 11:20:15 +0000 (11:20 +0000)]
am335x evm: Add am335x_evm_spiboot target

This target will move the environment into SPI flash and documents
the expected layout.  We correct the SPL define for where U-Boot is
and remove an unused define.

Signed-off-by: Tom Rini <trini@ti.com>
11 years agodoc/SPL/README.am335x-network: Document using ethernet (and USB) SPL
Ilya Yanok [Fri, 8 Feb 2013 11:20:14 +0000 (11:20 +0000)]
doc/SPL/README.am335x-network: Document using ethernet (and USB) SPL

Added README file with the description of required options and host
configuration to use network SPL with am335x targets.  Briefly discuss
how to use this configuration to program empty boards.

Signed-off-by: Ilya Yanok <ilya.yanok@cogentembedded.com>
Signed-off-by: Tom Rini <trini@ti.com>
11 years agoam335x_evm: Add NET environment variables
Chase Maupin [Fri, 8 Feb 2013 11:20:13 +0000 (11:20 +0000)]
am335x_evm: Add NET environment variables

* Add environment variables to support network booting

Signed-off-by: Chase Maupin <Chase.Maupin@ti.com>
Signed-off-by: Tom Rini <trini@ti.com>
11 years agoam335x_evm: Add SPI environment variables
Chase Maupin [Fri, 8 Feb 2013 11:20:12 +0000 (11:20 +0000)]
am335x_evm: Add SPI environment variables

* Added variables to support SPI booting
* Note that the first 512KiB are reserved for 4 copies of SPL.

Signed-off-by: Chase Maupin <Chase.Maupin@ti.com>
Signed-off-by: Tom Rini <trini@ti.com>
11 years agoam335x_evm: Add NAND environment variables
Chase Maupin [Fri, 8 Feb 2013 11:20:11 +0000 (11:20 +0000)]
am335x_evm: Add NAND environment variables

* Added support to the default environment variables for NAND
  boot.
* Add nandboot to the default bootcmd.

Signed-off-by: Chase Maupin <Chase.Maupin@ti.com>
Signed-off-by: Tom Rini <trini@ti.com>
11 years agoomap3: mvblx: pass FPGA version to the kernel
Michael Jones [Thu, 7 Feb 2013 23:53:37 +0000 (23:53 +0000)]
omap3: mvblx: pass FPGA version to the kernel

Extract FPGA version from the .rbf and pass this info to the kernel.

Signed-off-by: Michael Jones <michael.jones@matrix-vision.de>
11 years agoomap3: mvblx: select fpgafilename according to orientation
Michael Jones [Thu, 7 Feb 2013 23:53:36 +0000 (23:53 +0000)]
omap3: mvblx: select fpgafilename according to orientation

Rather than load the FPGA file from the FAT partition, look
at entry in system EEPROM to decide which file to retrieve directly
from the EXT3 partition.

Signed-off-by: Michael Jones <michael.jones@matrix-vision.de>
11 years agoomap3: mvblx: change console to ttyO0 and make silent by default.
Howard Gray [Thu, 7 Feb 2013 23:53:35 +0000 (23:53 +0000)]
omap3: mvblx: change console to ttyO0 and make silent by default.

Also, change bootdelay to 0 but allow pressing 'S' to stop at U-Boot prompt.

Signed-off-by: Michael Jones <michael.jones@matrix-vision.de>
Signed-off-by: Howard Gray <howard.gray@matrix-vision.de>
Signed-off-by: Michael Jones <michael.jones@matrix-vision.de>
11 years agoOMAP3: igep00x0: Add new IGEP COM PROTON.
Enric Balletbo i Serra [Thu, 7 Feb 2013 00:40:06 +0000 (00:40 +0000)]
OMAP3: igep00x0: Add new IGEP COM PROTON.

The IGEP COM PROTON is a new ultra compact module design with an
on-board ethernet controller.

Signed-off-by: Enric Balletbo i Serra <eballetbo@iseebcn.com>
11 years agoOMAP3: igep00x0: add missing include mach-types.h
Enric Balletbo i Serra [Thu, 7 Feb 2013 00:40:05 +0000 (00:40 +0000)]
OMAP3: igep00x0: add missing include mach-types.h

Current '#if' directives (used in igep00x0.h config file) comparing MACH_TYPE
values in igep00x0.h doesn't work as expected. The comparision between
CONFIG_MACH_TYPE and MACH_TYPE_IGEP0020 is always true independent of the IGEP
machine configured.

For example, following directive

 if (CONFIG_MACH_TYPE == MACH_TYPE_IGEP0020)
    define something
 endif

Is always evaluated true although we configure u-boot for MACH_TYPE_IGEP0030.

The build doesn't shows any error so looks that both defines had always the same
value. Including the mach-types.h file sets properly the value of
MACH_TYPE_IGEPxxxx.

Signed-off-by: Enric Balletbo i Serra <eballetbo@iseebcn.com>
11 years agoOMAP3: igep00x0: use official board names.
Enric Balletbo i Serra [Thu, 7 Feb 2013 00:40:04 +0000 (00:40 +0000)]
OMAP3: igep00x0: use official board names.

This trivial patch only changes current boards names for the official
names.

Signed-off-by: Enric Balletbo i Serra <eballetbo@iseebcn.com>
11 years agoam335x_evm: enable support for booting via USB
Ilya Yanok [Tue, 5 Feb 2013 11:36:26 +0000 (11:36 +0000)]
am335x_evm: enable support for booting via USB

This adds necessary config options and a new build target,
am335x_evm_usbspl, to enable usb booting and fixes board_eth_init()
function to take into account that we may have USB ether support in SPL
now.  This uses the same MAC for both cpsw and USB, in order to match
ROM behavior.

The usbspl build target does not contain UART SPL, CPSW SPL or extra
environment settings, so that we may fit within our binary size
constraint.

Signed-off-by: Ilya Yanok <ilya.yanok@cogentembedded.com>
Signed-off-by: Tom Rini <trini@ti.com>
11 years agoam33xx: support for booting via usbeth
Ilya Yanok [Tue, 5 Feb 2013 11:36:25 +0000 (11:36 +0000)]
am33xx: support for booting via usbeth

This patch adds BOOT_DEVICE define for USB booting and fixes
spl_board_init function to call arch_misc_init (this is the place there
musb is initialized).

Signed-off-by: Ilya Yanok <ilya.yanok@cogentembedded.com>
11 years agospl: support for booting via usbeth
Ilya Yanok [Tue, 5 Feb 2013 11:36:24 +0000 (11:36 +0000)]
spl: support for booting via usbeth

In case of usbeth booting just call net_load_image("usb_ether").
This patch also adds CONFIG_SPL_USBETH_SUPPORT and
CONFIG_SPL_MUSB_NEW_SUPPORT config options to enable linking of SPL
against USB gagdet support and new MUSB driver resp.

Signed-off-by: Ilya Yanok <ilya.yanok@cogentembedded.com>
11 years agoam33xx: pcm051: Remove wp pin mux for sd-card
Lars Poeschel [Mon, 4 Feb 2013 23:13:58 +0000 (23:13 +0000)]
am33xx: pcm051: Remove wp pin mux for sd-card

The pcm051 does not have the wp pin connected to the sd-card socket.
Therefore remove the pinmux for the pin. The was a carry-over from
the am335x evm code.

Signed-off-by: Lars Poeschel <poeschel@lemonage.de>
11 years agobeagle: expansion boards: add LSR COM6L adapter
robertcnelson@gmail.com [Mon, 4 Feb 2013 06:03:30 +0000 (06:03 +0000)]
beagle: expansion boards: add LSR COM6L adapter

http://www.lsr.com/wireless-products/com6l

The eeprom on this expansion board requires 16bit addressing.

Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
11 years agobeagle: expansion boards: retry i2c_read with 16bit addressing
robertcnelson@gmail.com [Mon, 4 Feb 2013 06:03:10 +0000 (06:03 +0000)]
beagle: expansion boards: retry i2c_read with 16bit addressing

Some expansion boards now ship with at24 eeproms that need to communicate
via 16bit addressing.

Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
11 years agoda8xx: Add the missing pinmux for da830 to the gpio driver
Tomas Novotny [Fri, 1 Feb 2013 06:46:00 +0000 (06:46 +0000)]
da8xx: Add the missing pinmux for da830 to the gpio driver

The pinmux was generated from linux/arch/arm/mach-davinci/da830.c as of
kernel version 3.7.5. If the driver is used for the da850, then SoC
variant must be specified by CONFIG_SOC_DA850.

Signed-off-by: Tomas Novotny <tomas@novotny.cz>
Cc: Tom Rini <trini@ti.com>
11 years agoda8xx: ea20: Add the configuration define for the exact SoC variant
Tomas Novotny [Fri, 1 Feb 2013 06:44:06 +0000 (06:44 +0000)]
da8xx: ea20: Add the configuration define for the exact SoC variant

Signed-off-by: Tomas Novotny <tomas@novotny.cz>
Cc: Tom Rini <trini@ti.com>
Cc: Stefano Babic <sbabic@denx.de>
Acked-by: Stefano Babic <sbabic@denx.de>
11 years agoMerge branch 'master' of git://git.denx.de/u-boot-mpc83xx
Tom Rini [Mon, 18 Feb 2013 14:57:06 +0000 (09:57 -0500)]
Merge branch 'master' of git://git.denx.de/u-boot-mpc83xx

11 years agonds32: Add a basic errno.h
Simon Glass [Sat, 5 Jan 2013 10:48:23 +0000 (10:48 +0000)]
nds32: Add a basic errno.h

This is available on other architectures, and nds32 will start to break
without it as code starts to use error numbers more.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agopowerpc/83xx/km: drop uneeded dtt_bus environment var
Holger Brunck [Mon, 21 Jan 2013 03:55:28 +0000 (03:55 +0000)]
powerpc/83xx/km: drop uneeded dtt_bus environment var

There is no need for a environment variable to configure the dtt bus.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
11 years agopowerpc/83xx/km: remove uneeded CONFIG_MISC_INIT_R
Holger Brunck [Mon, 21 Jan 2013 03:55:27 +0000 (03:55 +0000)]
powerpc/83xx/km: remove uneeded CONFIG_MISC_INIT_R

Remove it from the processor specific headers. This is
already defined in the common header km83xx.h.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
11 years agopowerpc/83xx/km: add support for kmopti2 board
Holger Brunck [Mon, 21 Jan 2013 03:55:26 +0000 (03:55 +0000)]
powerpc/83xx/km: add support for kmopti2 board

This board is similar to TUXX1 but it has a different sized second
FPGA. Therefore the configuration for the third chipselect is different.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
11 years agopowerpc/83xx/km: cleanup tuxx1 support
Holger Brunck [Mon, 21 Jan 2013 03:55:25 +0000 (03:55 +0000)]
powerpc/83xx/km: cleanup tuxx1 support

This is a preparation for the upcoming kmopti2 board. This board has
also a second fpga on board which is different to the tuxx1 target. But we
want to use the same header file. So remove the config option
KM_DISABLE_APP2 and simply use the board names to distinguish the features.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
11 years agokm/common: add eccmode to kernel commandline
Holger Brunck [Mon, 21 Jan 2013 03:55:24 +0000 (03:55 +0000)]
km/common: add eccmode to kernel commandline

If CONFIG_NAND_ECC_BCH is chosen from in the board configuration we add
an ecc mode to the kernel commandline.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
11 years agopowerpc/83xx: use NAND_ECC_BCH for kmcoge5ne
Holger Brunck [Mon, 21 Jan 2013 03:55:23 +0000 (03:55 +0000)]
powerpc/83xx: use NAND_ECC_BCH for kmcoge5ne

Switch from 1-bit ecc to 4-bit ecc.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
11 years agokmeter1_nand: allow uasge of NAND_ECC_SOFT_BCH
Holger Brunck [Mon, 21 Jan 2013 03:55:22 +0000 (03:55 +0000)]
kmeter1_nand: allow uasge of NAND_ECC_SOFT_BCH

If CONFIG_NAND_ECC_BCH is set we use 4-bit error corretion code
instead of the 1-bit error correction code on the NAND device
within this driver.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Acked-by: Scott Wood <scottwood@freescale.com>
11 years agokm/scripts: replace hardcoded uImage
Andreas Huber [Mon, 21 Jan 2013 03:55:21 +0000 (03:55 +0000)]
km/scripts: replace hardcoded uImage

Replace uImage with ${uimage}.
If uimage is not set, default it to uImage.

Signed-off-by: Andreas Huber <andreas.huber@keymile.com>
Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
11 years agokm/common: introduce $uimage variable
Andreas Huber [Mon, 21 Jan 2013 03:55:20 +0000 (03:55 +0000)]
km/common: introduce $uimage variable

Replace the hardcoded string with a variable. If CONFIG_NAND_ECC_BCH is
set we use a specific name for the uImage (ecc_bch_uImage).

Signed-off-by: Andreas Huber <andreas.huber@keymile.com>
Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
11 years agopowerpc/83xx: use ppc_6xx as arch variable for kmvect1
Holger Brunck [Mon, 21 Jan 2013 03:55:19 +0000 (03:55 +0000)]
powerpc/83xx: use ppc_6xx as arch variable for kmvect1

On this board we are using hard floating point, so select the correct
toolchain.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
11 years agopowerpc/83xx/km: add MV88E6122 switch support for kmvect1
Karlheinz Jerg [Mon, 21 Jan 2013 03:55:18 +0000 (03:55 +0000)]
powerpc/83xx/km: add MV88E6122 switch support for kmvect1

kmvect1 has a UEC2 connection to the piggy board and a UEC0 connection
to the switch MV88E6122. This switch has a connection to a frontport
ethernet interface. The ethernet port used for network booting is
automatically selected by u-boot. If a Piggy is plugged, the Piggy
port is selected (UEC2, eth1). If the Piggy isn't present, the
Frontport is selected (UEC0, eth0).

The switch reset is connected to a GPIO on the PRIO3 board FPGA (GPIO28)
and released at startup.

Signed-off-by: Karlheinz Jerg <karlheinz.jerg@keymile.com>
Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
11 years agokm/common/ivm: rework piggy mac adress offset generation
Holger Brunck [Mon, 21 Jan 2013 03:55:17 +0000 (03:55 +0000)]
km/common/ivm: rework piggy mac adress offset generation

For the the kmvect1 board we will also need a functionality to add an
offset to the IVMs MAC address, because these board will have two valid
ethernet ports for debugging purpose. So move the code to an own
function.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
11 years agokm82xx, km83xx: move ethernet_present() from common to cpu specific
Karlheinz Jerg [Mon, 21 Jan 2013 03:55:16 +0000 (03:55 +0000)]
km82xx, km83xx: move ethernet_present() from common to cpu specific

For kmvect1 we need a special solution and for km_arm boards we already
have. So move the common code to the architectur specific file.

Signed-off-by: Karlheinz Jerg <karlheinz.jerg@keymile.com>
Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
11 years agokm/common/ivm: remove CONFIG_SYS_I2C_IVM_BUS related code
Holger Brunck [Mon, 21 Jan 2013 03:55:15 +0000 (03:55 +0000)]
km/common/ivm: remove CONFIG_SYS_I2C_IVM_BUS related code

This define isn't set within our setup files. So we can safely remove
the affected code.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
11 years agokm/common/ivm: remove obsolete code
Holger Brunck [Mon, 21 Jan 2013 03:55:14 +0000 (03:55 +0000)]
km/common/ivm: remove obsolete code

EEprom_ivm_addr isn't set in our environment, so remove the usage of
this.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
11 years agokm/common: remove unneeded ifdefs for I2C
Holger Brunck [Mon, 21 Jan 2013 03:55:13 +0000 (03:55 +0000)]
km/common: remove unneeded ifdefs for I2C

All boards from this serie use i2c. There is no need to #ifdef the
header.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
11 years agoMerge branch 'master' of git://git.denx.de/u-boot
Kim Phillips [Fri, 15 Feb 2013 23:46:50 +0000 (17:46 -0600)]
Merge branch 'master' of git://git.denx.de/u-boot

11 years agoMerge branch 'fixes' of git://git.denx.de/u-boot-mips
Tom Rini [Fri, 15 Feb 2013 17:23:42 +0000 (12:23 -0500)]
Merge branch 'fixes' of git://git.denx.de/u-boot-mips

11 years agoMIPS: board.c: remove manual relocation of env_name_spec
Daniel Schwierzeck [Fri, 15 Feb 2013 16:53:34 +0000 (17:53 +0100)]
MIPS: board.c: remove manual relocation of env_name_spec

Remove the manual relocation of env_name_spec. This has been missed
in the previous patch series for introducing dynamic relocation
on MIPS.

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
11 years agox86: Remove unused real mode code
Simon Glass [Thu, 14 Feb 2013 17:38:30 +0000 (17:38 +0000)]
x86: Remove unused real mode code

This code is pretty old and we want to support only 32-bit systems now.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Graeme Russ <graeme.russ@gmail.com>
11 years agox86: Rename CONFIG_NO_X86_RESET_VECTOR to CONFIG_X86_RESET_VECTOR
Simon Glass [Thu, 14 Feb 2013 04:18:54 +0000 (04:18 +0000)]
x86: Rename CONFIG_NO_X86_RESET_VECTOR to CONFIG_X86_RESET_VECTOR

Invert the polarity of this option to simplify the Makefile logic.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Gabe Black <gabeblack@chromium.org>
11 years agox86: Remove unneeded cruft from main Makefile
Simon Glass [Thu, 14 Feb 2013 04:18:53 +0000 (04:18 +0000)]
x86: Remove unneeded cruft from main Makefile

These lines are dealt with in the x86 Makefile and link script, so punt
them.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Gabe Black <gabeblack@chromium.org>
11 years agox86: Remove sc520 cpu
Simon Glass [Thu, 14 Feb 2013 04:18:52 +0000 (04:18 +0000)]
x86: Remove sc520 cpu

This x86 CPU variant is no longer required as the boards that use it have
been removed.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Graeme Russ <graeme.russ@gmail.com>
11 years agox86: Remove eNET boards
Simon Glass [Thu, 14 Feb 2013 04:18:51 +0000 (04:18 +0000)]
x86: Remove eNET boards

These are no longer used and should be removed.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Graeme Russ <graeme.russ@gmail.com>
11 years agoMerge branch 'next' of git://git.denx.de/u-boot-mips
Tom Rini [Wed, 13 Feb 2013 00:03:59 +0000 (19:03 -0500)]
Merge branch 'next' of git://git.denx.de/u-boot-mips

11 years agoMIPS: add dynamic relocation support
Gabor Juhos [Tue, 12 Feb 2013 21:22:13 +0000 (22:22 +0100)]
MIPS: add dynamic relocation support

The code handles relocation entries with the
following relocation types only:
  mips32: R_MIPS_REL32
  mips64: R_MIPS_REL+R_MIPS_64
  xburst: R_MIPS_REL32

Other relocation entries are skipped without
processing. The code must be extended if other
relocation types must be supported.

Add -pie to LDFLAGS_FINAL to generate the .rel.dyn
fixup table, which will be applied to the relocated
image before transferring control to it.

The CONFIG_NEEDS_MANUAL_RELOC is not needed
after the patch, so remove that as well.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
11 years agoMIPS: u-boot.lds: add relocation specific sections
Gabor Juhos [Tue, 12 Feb 2013 21:22:13 +0000 (22:22 +0100)]
MIPS: u-boot.lds: add relocation specific sections

This section contain the table needed for dynamic
relocation. Also provide symbols for the relocation
code to access the table.

Discard all sections which are not needed in the final
ELF binary and U-Boot image. Section .dynsym cannot be
discarded or GNU ld crashes otherwise. This section
will be stripped by GNU objcpy in a later patch.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
11 years agoMIPS: start.S: use symbol __image_copy_end for U-Boot image relocation
Daniel Schwierzeck [Tue, 12 Feb 2013 21:22:13 +0000 (22:22 +0100)]
MIPS: start.S: use symbol __image_copy_end for U-Boot image relocation

Use the newly introduced symbol __image_copy_end as end address for
relocation of U-Boot image. This is needed for dynamic relocation added
in later patches. This patch obsoletes the symbols uboot_end and
uboot_end_data which are removed.

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
11 years agoMIPS: start.S: optimize BSS initialization
Daniel Schwierzeck [Tue, 12 Feb 2013 21:22:13 +0000 (22:22 +0100)]
MIPS: start.S: optimize BSS initialization

Get the start and end address for clearing BSS from the newly
introduced symbols __bss_start and __bss_end. After GOT is
relocated, those symbols are already pointing to the correct
addresses.

Also optimize the loop by moving the address incrementation
to the delay slot to avoid the initial sub instruction.

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
11 years agoMIPS: board.c: switch to new symbols __bss_end and __image_copy_end
Daniel Schwierzeck [Tue, 12 Feb 2013 21:22:12 +0000 (22:22 +0100)]
MIPS: board.c: switch to new symbols __bss_end and __image_copy_end

Use the newly introduced symbols __image_copy_end and __bss_end
for setting up the memory area for the relocated U-Boot.

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
11 years agoMIPS: u-boot.lds: introduce symbol __image_copy_end
Daniel Schwierzeck [Tue, 12 Feb 2013 21:22:12 +0000 (22:22 +0100)]
MIPS: u-boot.lds: introduce symbol __image_copy_end

This symbol is used in later patches as end address
for relocation of the U-Boot image into RAM.

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
11 years agoMIPS: u-boot.lds: merge all BSS sections and introduce symbols __bss_[start|end]
Daniel Schwierzeck [Tue, 12 Feb 2013 21:22:12 +0000 (22:22 +0100)]
MIPS: u-boot.lds: merge all BSS sections and introduce symbols __bss_[start|end]

These symbols are used in later patches for as addresses for
clearing the BSS area in the relocated U-Boot image.

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>