platform/kernel/u-boot.git
12 years agotegra: fdt: Add function to return peripheral/clock ID
Simon Glass [Tue, 6 Mar 2012 17:10:27 +0000 (17:10 +0000)]
tegra: fdt: Add function to return peripheral/clock ID

A common requirement is to find the clock ID for a peripheral. This is the
second cell of the 'clocks' property (the first being the phandle itself).

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
12 years agousb: Add support for txfifo threshold
Simon Glass [Mon, 27 Feb 2012 10:52:47 +0000 (10:52 +0000)]
usb: Add support for txfifo threshold

CONFIG_USB_EHCI_TXFIFO_THRESH enables setting of the txfilltuning
field in the EHCI controller on reset.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Remy Bohmer <linux@bohmer.net>
Signed-off-by: Tom Warren <twarren@nvidia.com>
12 years agotegra: usb: fdt: Add USB definitions for Tegra2 Seaboard
Simon Glass [Mon, 27 Feb 2012 10:52:46 +0000 (10:52 +0000)]
tegra: usb: fdt: Add USB definitions for Tegra2 Seaboard

We set up two USB ports, one of which can be host or device.
For some reason the kernel version does enable both ports.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
12 years agotegra: usb: fdt: Add additional device tree definitions for USB ports
Simon Glass [Mon, 27 Feb 2012 10:52:45 +0000 (10:52 +0000)]
tegra: usb: fdt: Add additional device tree definitions for USB ports

This adds clock references to the USB part of the device tree for U-Boot,
and marks USB1 as supporting legacy mode (which we disable in the driver).

The USB timing information may vary between boards sometimes, but for
now we hard-code it in C. This is because all current T2x boards use
the same values, we will deal with T3x later and we first need to agree
on the format for this timing information in the fdt and may in fact
decide that it has no place there.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
12 years agotegra: fdt: Add clock bindings for Tegra2 Seaboard
Simon Glass [Tue, 28 Feb 2012 08:07:49 +0000 (08:07 +0000)]
tegra: fdt: Add clock bindings for Tegra2 Seaboard

Add the definition of the oscillator clock frequency and the 32KHz clock.
The latter is provided by a PMIC on I2C which we don't actually use at
present, but we expect this definition to be used in the kernel and want
to keep our .dts the same.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
12 years agotegra: fdt: Add clock bindings
Simon Glass [Mon, 27 Feb 2012 10:52:43 +0000 (10:52 +0000)]
tegra: fdt: Add clock bindings

This adds a basic binding for the oscillator and peripheral clocks. The
second cell is the clock number, defined as the bit number within the clock
enable register if the peripheral clock.

This uses the RFC clock bindings from Grant Likely so may change later:

https://lkml.org/lkml/2011/12/12/498

It is taken from Stephen Warren's patch here:

http://patchwork.ozlabs.org/patch/141359/

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
12 years agotegra: fdt: Add additional USB binding
Simon Glass [Tue, 28 Feb 2012 08:07:47 +0000 (08:07 +0000)]
tegra: fdt: Add additional USB binding

This adds a property to indicate a port which can switch between host and device
mode.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
12 years agofdt: Add tegra-usb bindings file from linux
Simon Glass [Mon, 27 Feb 2012 10:52:41 +0000 (10:52 +0000)]
fdt: Add tegra-usb bindings file from linux

This file is taken from the Linux mailing list.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
12 years agofdt: Add staging area for device tree binding documentation
Simon Glass [Mon, 27 Feb 2012 10:52:40 +0000 (10:52 +0000)]
fdt: Add staging area for device tree binding documentation

Add a directory to hold device tree binding files, to permit easy review
of this material in U-Boot patches.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
12 years agotegra: fdt: Add device tree file for Tegra2 Seaboard from kernel
Simon Glass [Mon, 27 Feb 2012 10:52:39 +0000 (10:52 +0000)]
tegra: fdt: Add device tree file for Tegra2 Seaboard from kernel

This was taken from commit b48c54e2 at:
git://git.kernel.org/pub/scm/linux/kernel/git/olof/tegra.git

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
12 years agotegra: fdt: Add Tegra2x device tree file from kernel
Simon Glass [Mon, 27 Feb 2012 10:52:38 +0000 (10:52 +0000)]
tegra: fdt: Add Tegra2x device tree file from kernel

This was taken from commit b48c54e2 at:
git://git.kernel.org/pub/scm/linux/kernel/git/olof/tegra.git

config.mk is updated to provide this file to boards through the
built-in mechanism:

/include/ ARCH_CPU_DTS

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
12 years agoarm: fdt: Add skeleton device tree file from kernel
Simon Glass [Mon, 27 Feb 2012 10:52:37 +0000 (10:52 +0000)]
arm: fdt: Add skeleton device tree file from kernel

This was taken from commit b48c54e2 at:
git://git.kernel.org/pub/scm/linux/kernel/git/olof/tegra.git

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
12 years agofdt: Add basic support for decoding GPIO definitions
Simon Glass [Mon, 27 Feb 2012 10:52:36 +0000 (10:52 +0000)]
fdt: Add basic support for decoding GPIO definitions

This adds some support into fdtdec for reading GPIO definitions from
the fdt. We permit up to FDT_GPIO_MAX GPIOs in the system. Each GPIO
is of the form:

gpio-function-name = <phandle gpio_num flags>;

where:

phandle is a pointer to the GPIO node
gpio_num is the number of the GPIO (0 to 223)
flags is a flag, as follows:

   bit    meaning
   0      0=polarity normal, 1=active low (inverted)

An example is:

enable-propounder-gpios = <&gpio 43 0>;

which means that GPIO 43 is used to enable the propounder (setting the
GPIO high), or that you can detect that the propounder is enabled by
checking if the GPIO is high (the fdt does not indicate input/output).

Two main functions are provided:

fdtdec_decode_gpio() reads a GPIO property from an fdt node and decodes it
into a structure.

fdtdec_setup_gpio() sets up the GPIO by calling gpio_request for you.

Both functions can cope with the property being missing, which is taken to
mean that that GPIO function is not available or is not needed.

[For reference, from Stephen Warren <swarren@nvidia.com>. It may be that
we add this extra complexity later if needed:

The correct way to parse such a GPIO property in general is:

* Read the first cell.
* Find the node referenced by the phandle (the controller).
* Ensure property gpio-controller is present in the controller node.
* Read property #gpio-cells from the controller node.
* Extract #gpio-cells from the original property.
* Keep processing more cells from the original property; there may be
multiple GPIOs listed.

According to the binding documentation in the Linux kernel, Samsung
Exynos4 doesn't use this format, and while all other chips do have a
flags cell, about 50% of the controllers indicate the cell is unused.
]

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
12 years agofdt: Add functions to access phandles, arrays and bools
Simon Glass [Mon, 27 Feb 2012 10:52:35 +0000 (10:52 +0000)]
fdt: Add functions to access phandles, arrays and bools

Add a function to look up a property which is a phandle in a node, and
another to read a fixed-length integer array from an fdt property.
Also add a function to read boolean properties, although there is no
actual boolean type in U-Boot.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Gerald Van Baren <vanbaren@cideas.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
12 years agofdt: Tidy up a few fdtdec problems
Simon Glass [Mon, 27 Feb 2012 10:52:34 +0000 (10:52 +0000)]
fdt: Tidy up a few fdtdec problems

This fixes five trivial issues in fdtdec.c:
1. fdtdec_get_is_enabled() doesn't really need a default value
2. The fdt must be word-aligned, since otherwise it will fail on ARM
3. The compat_names[] array is missing its first element. This is needed
only because the first fdt_compat_id is defined to be invalid.
4. Added a header prototype for fdtdec_next_compatible()
5. Change fdtdec_next_alias() to only increment its 'upto' parameter
on success, to make the display error messages in the caller easier.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Gerald Van Baren <vanbaren@cideas.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
12 years agofdt: Add tests for fdtdec
Simon Glass [Tue, 17 Jan 2012 08:20:51 +0000 (08:20 +0000)]
fdt: Add tests for fdtdec

The fdtdec_find_aliases_for_id() function is complicated enough that
it really should have some tests. This does not necessarily need to be
committed to U-Boot, but it might be useful.

(note there are a few minor inconsistencies with this patch which will be
cleaned up when the USB series is applied)

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
12 years agofdt: Add fdtdec_find_aliases() to deal with alias nodes
Simon Glass [Tue, 17 Jan 2012 08:20:50 +0000 (08:20 +0000)]
fdt: Add fdtdec_find_aliases() to deal with alias nodes

Stephen Warren pointed out that we should use nodes whether or not they
have an alias in the /aliases section. The aliases section specifies the
order so far as it can, but is not essential. Operating without alisses
is useful when the enumerated order of nodes does not matter (admittedly
rare in U-Boot).

This is considerably more complex, and it is important to keep this
complexity out of driver code. This patch creates a function
fdtdec_find_aliases() which returns an ordered list of node offsets
for a particular compatible ID, taking account of alias nodes.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
12 years agoarm: Tegra2: Fix ELDK42 gcc failure with inline asm stack pointer load
Tom Warren [Fri, 17 Feb 2012 06:01:21 +0000 (06:01 +0000)]
arm: Tegra2: Fix ELDK42 gcc failure with inline asm stack pointer load

The 4.2.2 gcc in the ELDK42 release doesn't like the direct SP
load using a constant in tegra2_start. Change it to use a load
thru another reg using mov sp, %0 : : "r"(CONST).

Tested on my Seaboard T20-A03, U-Boot loads and runs OK. Also
compiled all tegra2 builds with both gcc 4.2.2 and 4.4.1 OK.

Signed-off-by: Tom Warren <twarren@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
12 years agonet: fec_mxc: allow use with cache enabled
Eric Nelson [Thu, 15 Mar 2012 18:33:25 +0000 (18:33 +0000)]
net: fec_mxc: allow use with cache enabled

Ensure that transmit and receive buffers are cache-line aligned.
Invalidate cache for each packet as received, update receive buffer
descriptors one cache line at a time, flush cache before transmitting.

Original patch by Marek:
 http://lists.denx.de/pipermail/u-boot/2012-February/117695.html

Signed-off-by: Eric Nelson <eric.nelson at boundarydevices.com>
Acked-by: Marek Vasut <marex@denx.de>
Tested-by: Marek Vasut <marex@denx.de>
12 years agonet: force PKTALIGN to ARCH_DMA_MINALIGN
Eric Nelson [Thu, 15 Mar 2012 18:33:24 +0000 (18:33 +0000)]
net: force PKTALIGN to ARCH_DMA_MINALIGN

This will prevent the need for architectures whose DMA alignment
is greater than 32 to have bounce buffers.

Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
12 years agoi.MX28: Enable caches by default
Marek Vasut [Thu, 15 Mar 2012 18:33:23 +0000 (18:33 +0000)]
i.MX28: Enable caches by default

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
12 years agoi.MX28: Make use of the bounce buffer
Marek Vasut [Thu, 15 Mar 2012 18:33:22 +0000 (18:33 +0000)]
i.MX28: Make use of the bounce buffer

This allows i.MX28 MMC host to fully utilize DMA transfers and caches, greatly
improving speed.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <festevam@gmail.com>
12 years agoi.MX28: Do data transfers via DMA in MMC driver
Marek Vasut [Thu, 15 Mar 2012 18:33:21 +0000 (18:33 +0000)]
i.MX28: Do data transfers via DMA in MMC driver

This utilizes the newly introduced bounce buffers in the MMC layer.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Andy Fleming <afleming@gmail.com>
Cc: Fabio Estevam <festevam@gmail.com>
12 years agoMMC: Implement generic bounce buffer
Marek Vasut [Thu, 15 Mar 2012 18:41:35 +0000 (18:41 +0000)]
MMC: Implement generic bounce buffer

This implements generic bounce buffer at the end of MMC command submission
chain. Therefore if unaligned data are passed, they are copied. This stuff
should be pushed down into the MMC subsystem to squash all places generating
these unaligned data.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Andy Fleming <afleming@gmail.com>
12 years agoi.MX28: Add cache support to MXS NAND driver
Marek Vasut [Thu, 15 Mar 2012 18:33:19 +0000 (18:33 +0000)]
i.MX28: Add cache support to MXS NAND driver

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
12 years agoi.MX28: Add cache support into the APBH DMA driver
Marek Vasut [Thu, 15 Mar 2012 18:33:18 +0000 (18:33 +0000)]
i.MX28: Add cache support into the APBH DMA driver

The desc_append() now flushes descriptors into RAM.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
12 years agoARM926EJS: Implement cache operations
Marek Vasut [Thu, 15 Mar 2012 18:33:17 +0000 (18:33 +0000)]
ARM926EJS: Implement cache operations

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
Acked-by: Stefano Babic <sbabic@denx.de>
12 years agoboard/vpac270/onenand.c: Fix build errors
Anatolij Gustschin [Wed, 28 Mar 2012 05:38:42 +0000 (05:38 +0000)]
board/vpac270/onenand.c: Fix build errors

Building for vpac270_ond_256 configuration fails:

arch/arm/lib/libarm.o: In function `icache_disable':
/home/ag/git/u-boot/arch/arm/lib/cache-cp15.c:156: multiple
definition of `icache_disable'
board/vpac270/libvpac270.o:/home/ag/git/u-boot/board/vpac270/onenand.c:65:
first defined here
arch/arm/lib/libarm.o: In function `dcache_disable':
/home/ag/git/u-boot/arch/arm/lib/cache-cp15.c:188: multiple
definition of `dcache_disable'
board/vpac270/libvpac270.o:/home/ag/git/u-boot/board/vpac270/onenand.c:66:
first defined here
make[1]: *** [/home/ag/git/u-boot/spl/u-boot-spl] Error 1

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Cc: Marek Vasut <marek.vasut@gmail.com>
Acked-by: Marek Vasut <marex@denx.de>
12 years agonhk8815: fix build errors
Anatolij Gustschin [Wed, 28 Mar 2012 02:56:30 +0000 (02:56 +0000)]
nhk8815: fix build errors

Fix:
common/libcommon.o: In function `cread_line':
/home/ag/git/u-boot/common/main.c:695: undefined reference to `get_ticks'
/home/ag/git/u-boot/common/main.c:695: undefined reference to `get_tbclk'
/home/ag/git/u-boot/common/main.c:698: undefined reference to `get_ticks'

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Cc: Alessandro Rubini <rubini@unipv.it>
Acked-by: Marek Vasut <marex@denx.de>
Acked-by: Alessandro Rubini <rubini@unipv.it>
12 years agoatmel-boards: add missing atmel_mci.h
Andreas Bießmann [Tue, 13 Mar 2012 05:01:51 +0000 (05:01 +0000)]
atmel-boards: add missing atmel_mci.h

commit 72fa467988e7944407a634ddc4bc6a2df685c04c moved atmel_mci_init() into
include/atmel_mci.h. Some AT91 boards are also using this interface and need
to include atmel_mci.h now.

This patch fixes MAKEALL complaints like this:

---8<---
Configuring for ethernut5 - Board: ethernut5, Options: AT91SAM9XE
ethernut5.c: In function 'board_mmc_init':
ethernut5.c:235:2: warning: implicit declaration of function 'atmel_mci_init' [-Wimplicit-function-declaration]
--->8---

Signed-off-by: Andreas Bießmann <biessmann@corscience.de>
CC: Albert Aribaud <albert.u.boot@aribaud.net>
CC: Reinhard Meyer <u-boot@emk-elektronik.de>
CC: egnite GmbH <info@egnite.de>
12 years agoARM: highbank: setup env from boot source register
Rob Herring [Wed, 1 Feb 2012 16:57:57 +0000 (16:57 +0000)]
ARM: highbank: setup env from boot source register

Add support to read the boot src register and set bootcmd env from the
selected bootcmdX env setting.

Based on Linkstation boot choice selection.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
12 years agoARM: highbank: change env config to use nvram
Jason Hobbs [Wed, 1 Feb 2012 16:57:56 +0000 (16:57 +0000)]
ARM: highbank: change env config to use nvram

Update the highbank config to use env from NVRAM. Also remove extra env
settings as they are not used unless the default env is used.

Signed-off-by: Jason Hobbs <jason.hobbs@calxeda.com>
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
12 years agoARM: highbank: add reset support
Rob Herring [Wed, 1 Feb 2012 16:57:55 +0000 (16:57 +0000)]
ARM: highbank: add reset support

Implement reset for highbank platform. Reset is triggered via a wfi
instruction, so enabling armv7 for the compiler is necessary.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
12 years agoARM: highbank: Add boot counter support
Rob Herring [Wed, 1 Feb 2012 16:57:54 +0000 (16:57 +0000)]
ARM: highbank: Add boot counter support

Add boot counter support using an sysreg which is persistent across reset.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
12 years agoARM: highbank: change TEXT_BASE to 0x8000
Rob Herring [Wed, 1 Feb 2012 16:57:53 +0000 (16:57 +0000)]
ARM: highbank: change TEXT_BASE to 0x8000

Make some space at the beginning of RAM so the FDT can be loaded to a
known fixed address at 0x1000.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
12 years agoARM: highbank: fix us_to_tick calculation
Rob Herring [Wed, 1 Feb 2012 16:57:52 +0000 (16:57 +0000)]
ARM: highbank: fix us_to_tick calculation

udelay calls were off due to failing to convert us to ns. Fix this and drop
the unnecessary shifts since NS_PER_TICK is only 7ns.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
12 years agoARM: highbank: add missing get_tbclk
Rob Herring [Tue, 21 Feb 2012 12:52:27 +0000 (12:52 +0000)]
ARM: highbank: add missing get_tbclk

The get_tbclk function was missing and the recent commit "common: add
possibility for readline_into_buffer timeout" makes it required.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
12 years agoARM: highbank: fix warning for calxedaxgmac_initialize
Rob Herring [Tue, 21 Feb 2012 12:52:26 +0000 (12:52 +0000)]
ARM: highbank: fix warning for calxedaxgmac_initialize

Add include of netdev.h to pick-up declaration of calxedaxgmac_initialize.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
12 years agonet: calxedaxgmac: fix build due to missing __aligned definition
Rob Herring [Wed, 1 Feb 2012 12:58:49 +0000 (12:58 +0000)]
net: calxedaxgmac: fix build due to missing __aligned definition

Include linux/compiler.h to fix build error due to missing __aligned
definition.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
12 years agoEXYNOS: Add structure for Exynos4 DMC
Chander Kashyap [Fri, 2 Mar 2012 03:25:34 +0000 (03:25 +0000)]
EXYNOS: Add structure for Exynos4 DMC

Add exynos4_dmc structure in dmc.h for exynos4 dram controllor(DMC).

Signed-off-by: Chander Kashyap <chander.kashyap@linaro.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
12 years agoEXYNOS: SMDK5250: Support all 4 UARTs
Doug Anderson [Mon, 13 Feb 2012 07:38:05 +0000 (07:38 +0000)]
EXYNOS: SMDK5250: Support all 4 UARTs

This properly configures the mux to enable all UARTs.

This also fixes things so that we don't configure balls XUCTSN_1 and
XURTSN_1 as UART1 configuration (RTS/CTS), since they aren't
connected.

Signed-off-by: Doug Anderson <dianders@chromium.org>
Acked-by: Chander kashyap <chander.kashyap@linaro.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
12 years agoARM: fix s3c2410 timer code
David Müller (ELSOFT AG) [Thu, 22 Dec 2011 01:16:37 +0000 (01:16 +0000)]
ARM: fix s3c2410 timer code

This patch fixes the s3c24x0 timer code to work with the ARM
relocation feature.

Signed-off-by: David Mueller <d.mueller@elsoft.ch>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
12 years agoARM: davinci: fixes for cam_enc_4xx board
Heiko Schocher [Wed, 7 Mar 2012 04:10:00 +0000 (04:10 +0000)]
ARM: davinci: fixes for cam_enc_4xx board

- change CONFIG_ENV_RANGE to contain 2 nand erase blocks,
  one for bad block reserve.
- remove from the envvariable "img_writeramdisk" the
  ubifsmount command, as it is not needed.
- erase the hole mtd partition containing u-boot
- save environment variable "dvn_app_vers" and "dvn_boot_vers"
  only after installing the new image.
changes requested from Marek Vasut:
- arm, davinci: fix eldk-4.2 warnings for cam_enc_4xx board
  - get rid of run_command2 usage
    needed since patch:
    commit 009dde1955583e306cf904c864068f3acb0db499
    Author: Simon Glass <sjg@chromium.org>
    Date:   Tue Feb 14 19:59:20 2012 +0000

    Rename run_command2() to run_command()
    is now in mainline.
  - add CONFIG_SPL_LIBGENERIC_SUPPORT support
  - remove CONFIG_CMD_PXE support
  - fix warning:
    cam_enc_4xx.c: In function 'menu_handle':
    cam_enc_4xx.c:609: warning: dereferencing type-punned pointer
    will break strict-aliasing rules
  - fix error:
    arm-linux-ld: u-boot-spl: Not enough room for program headers,
    try linking with -N

Signed-off-by: Heiko Schocher <hs@denx.de>
Cc: Marek Vasut <marex@denx.de>
Cc: Tom Rini <tom.rini@gmail.com>
Cc: Fletzer Martin <Martin.Fletzer@ait.ac.at>
Cc: Wolfgang Denk <wd@denx.de>
12 years agoomap3_spi: receive transmit mode
jacopo mondi [Wed, 2 Mar 2011 05:13:22 +0000 (05:13 +0000)]
omap3_spi: receive transmit mode

Implementation of receive-transmit mode for
omap3 MCSPI.

Introduces full duplex communication, needed by
some spi devices (such as enc28j60).

Signed-off-by: jacopo mondi <mondi@cs.unibo.it> <j.mondi@voltaelectronics.com>
12 years agocalimain, enbw_cmc: Fix typo in comments
Christian Riesch [Sun, 25 Mar 2012 22:01:49 +0000 (22:01 +0000)]
calimain, enbw_cmc: Fix typo in comments

Signed-off-by: Christian Riesch <christian.riesch@omicron.at>
Cc: Heiko Schocher <hs@denx.de>
Cc: Tom Rini <trini@ti.com>
12 years agoDavinci: ea20: use gpio framework to access gpios
Stefano Babic [Wed, 5 Oct 2011 03:08:24 +0000 (03:08 +0000)]
Davinci: ea20: use gpio framework to access gpios

Drop direct access to SOC's registers and use
the function of the GPIO driver for da8xx.

[Tom: Remove gpio[68]_base as it's now unused]

Signed-off-by: Stefano Babic <sbabic@denx.de>
CC: Bastian Ruppert <Bastian.Ruppert@Sewerin.de>
CC: dzu@denx.de
CC: Sandeep Paulraj <s-paulraj@ti.com>
Signed-off-by: Tom Rini <trini@ti.com>
12 years agoOMAP3: mt_ventoux: sets its own mtdparts
Stefano Babic [Wed, 21 Mar 2012 00:14:25 +0000 (00:14 +0000)]
OMAP3: mt_ventoux: sets its own mtdparts

Signed-off-by: Stefano Babic <sbabic@denx.de>
Cc: Tom Rini <trini@ti.com>
12 years agoOMAP3: mt_ventoux: updated timing for FPGA
Stefano Babic [Wed, 21 Mar 2012 00:14:24 +0000 (00:14 +0000)]
OMAP3: mt_ventoux: updated timing for FPGA

Fix chipselect timing for FPGA

Signed-off-by: Stefano Babic <sbabic@denx.de>
Cc: Tom Rini <trini@ti.com>
12 years agotwl4030: fix potential power supply handling issues
Grazvydas Ignotas [Mon, 19 Mar 2012 03:37:40 +0000 (03:37 +0000)]
twl4030: fix potential power supply handling issues

twl4030_pmrecv_vsel_cfg currently first sets up device group (effectively
enabling the supply), and only then sets vsel (selects voltage). This could
lead to wrong voltage for a short time, or even long time if second i2c
write fails.

Fix this by writing vsel first and device group after that. Also
introduce error checking to not enable the supply if we failed to set
the voltage, and start logging errors as power supply problems are
usually important.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
12 years agoNAND: TI: fix warnings in omap_gpmc.c
Stefano Babic [Wed, 21 Mar 2012 23:56:17 +0000 (23:56 +0000)]
NAND: TI: fix warnings in omap_gpmc.c

The following warnings are reported for boards using SOFT ECC.

omap_gpmc.c:33:30: warning: 'hw_nand_oob' defined but not used
omap_gpmc.c:78:13: warning: 'omap_hwecc_init' defined but not used
omap_gpmc.c:116:12: warning: 'omap_correct_data' defined but not used
omap_gpmc.c:182:12: warning: 'omap_calculate_ecc' defined but not used
omap_gpmc.c:208:13: warning: 'omap_enable_hwecc' defined but not used

Signed-off-by: Stefano Babic <sbabic@denx.de>
Cc: Tom Rini <trini@ti.com>
Cc: Scott Wood <scottwood@freescale.com>
12 years agocam_enc_4xx: Rename 'images' to 'imgs'
Tom Rini [Thu, 15 Mar 2012 04:01:46 +0000 (04:01 +0000)]
cam_enc_4xx: Rename 'images' to 'imgs'

To avoid a conflict with common/cmd_bootm.c's 'images' (which is
exposed as part of the Linux SPL series), rename the board-specific
'images' to 'imgs'.

Cc: Heiko Schocher <hs@denx.de>
Signed-off-by: Tom Rini <trini@ti.com>
Acked-by: Heiko Schocher <hs@denx.de>
Tested-by: Heiko Schocher <hs@denx.de>
12 years agoarm: Add Prep subcommand support to bootm
Simon Schwarz [Thu, 15 Mar 2012 04:01:45 +0000 (04:01 +0000)]
arm: Add Prep subcommand support to bootm

Adds prep subcommand to bootm implementation of ARM. When bootm is called
with the subcommand prep the function stops right after ATAGS creation and
before announce_and_cleanup.

This is used in command "cmd_spl export"

Signed-off-by: Simon Schwarz <simonschwarzcor@gmail.com>
Acked-by: Stefano Babic <sbabic@denx.de>
Tested-by: Stefano Babic <sbabic@denx.de>
Signed-off-by: Tom Rini <trini@ti.com>
12 years agoOMAP3: twister: add support to boot Linux from SPL
Stefano Babic [Thu, 15 Mar 2012 04:01:44 +0000 (04:01 +0000)]
OMAP3: twister: add support to boot Linux from SPL

Signed-off-by: Stefano Babic <sbabic@denx.de>
CC: Tom Rini <tom.rini@gmail.com>
CC: Wolfgang Denk <wd@denx.de>
CC: Simon Schwarz <simonschwarzcor@gmail.com>
12 years agoSPL: call cleanup_before_linux() before booting Linux
Stefano Babic [Thu, 15 Mar 2012 04:01:43 +0000 (04:01 +0000)]
SPL: call cleanup_before_linux() before booting Linux

Signed-off-by: Stefano Babic <sbabic@denx.de>
CC: Tom Rini <tom.rini@gmail.com>
CC: Wolfgang Denk <wd@denx.de>
CC: Simon Schwarz <simonschwarzcor@gmail.com>
12 years agoOMAP3: SPL: do not call I2C init if no I2C is set.
Stefano Babic [Thu, 15 Mar 2012 04:01:42 +0000 (04:01 +0000)]
OMAP3: SPL: do not call I2C init if no I2C is set.

Call i2c initialization in spl_board_init only if I2C
is configured for the board.

Signed-off-by: Stefano Babic <sbabic@denx.de>
CC: Tom Rini <tom.rini@gmail.com>
CC: Wolfgang Denk <wd@denx.de>
CC: Simon Schwarz <simonschwarzcor@gmail.com>
12 years agoAdd cache functions to SPL for armv7
Stefano Babic [Thu, 15 Mar 2012 04:01:41 +0000 (04:01 +0000)]
Add cache functions to SPL for armv7

Signed-off-by: Stefano Babic <sbabic@denx.de>
CC: Tom Rini <tom.rini@gmail.com>
CC: Wolfgang Denk <wd@denx.de>
CC: Simon Schwarz <simonschwarzcor@gmail.com>
12 years agodevkit8000: Implement and activate direct OS boot
Simon Schwarz [Thu, 15 Mar 2012 04:01:40 +0000 (04:01 +0000)]
devkit8000: Implement and activate direct OS boot

- Implements spl_start_uboot() for devkit8000
- Add configs to activate direct OS boot from SPL

Signed-off-by: Simon Schwarz <simonschwarzcor@gmail.com>
CC: Tom Rini <tom.rini@gmail.com>
CC: Stefano Babic <sbabic@denx.de>
CC: Wolfgang Denk <wd@denx.de>
12 years agoomap/spl: change output of spl_parse_image_header
Simon Schwarz [Thu, 15 Mar 2012 04:01:39 +0000 (04:01 +0000)]
omap/spl: change output of spl_parse_image_header

This only outputs "Assuming u-boot.bin..." if debug is active.

Signed-off-by: Simon Schwarz <simonschwarzcor@gmail.com>
CC: Tom Rini <tom.rini@gmail.com>
CC: Stefano Babic <sbabic@denx.de>
CC: Wolfgang Denk <wd@denx.de>
12 years agoomap-common/spl: Add linux boot to SPL
Simon Schwarz [Thu, 15 Mar 2012 04:01:38 +0000 (04:01 +0000)]
omap-common/spl: Add linux boot to SPL

This adds Linux booting to the SPL

This depends on CONFIG_MACH_TYPE patch by Igor Grinberg
(http://article.gmane.org/gmane.comp.boot-loaders.u-boot/105809)

Related CONFIGs:
CONFIG_SPL_OS_BOOT
Activates/Deactivates the OS booting feature
CONFIG_SPL_OS_BOOT_KEY
defines the IO-pin number u-boot switch - if pressed u-boot is
booted
CONFIG_SYS_NAND_SPL_KERNEL_OFFS
Offset in NAND of direct boot kernel image to use in SPL
CONFIG_SYS_SPL_ARGS_ADDR
Address where the kernel boot arguments are expected - this is
normaly RAM-begin + 0x100

Signed-off-by: Simon Schwarz <simonschwarzcor@gmail.com>
CC: Tom Rini <tom.rini@gmail.com>
CC: Stefano Babic <sbabic@denx.de>
CC: Wolfgang Denk <wd@denx.de>
12 years agodevkit8000/spl: init GPMC for dm9000 in SPL
Simon Schwarz [Thu, 15 Mar 2012 04:01:37 +0000 (04:01 +0000)]
devkit8000/spl: init GPMC for dm9000 in SPL

Linux crashes if the GPMC isn't configured for the dm9000.

Signed-off-by: Simon Schwarz <simonschwarzcor@gmail.com>
CC: Tom Rini <tom.rini@gmail.com>
CC: Stefano Babic <sbabic@denx.de>
CC: Wolfgang Denk <wd@denx.de>
12 years agoomap-common: Add NAND SPL linux booting
Simon Schwarz [Thu, 15 Mar 2012 04:01:36 +0000 (04:01 +0000)]
omap-common: Add NAND SPL linux booting

This implements booting of Linux from NAND in SPL

Related config parameters:
CONFIG_SYS_NAND_SPL_KERNEL_OFFS
Offset in NAND of direct boot kernel image to use in SPL
CONFIG_SYS_SPL_ARGS_ADDR
Address where the kernel boot arguments are expected - this is
normally RAM-start + 0x100 (on ARM)

Signed-off-by: Simon Schwarz <simonschwarzcor@gmail.com>
CC: Tom Rini <tom.rini@gmail.com>
CC: Stefano Babic <sbabic@denx.de>
CC: Wolfgang Denk <wd@denx.de>
12 years agodevkit8000: add config for spl command
Simon Schwarz [Thu, 15 Mar 2012 04:01:35 +0000 (04:01 +0000)]
devkit8000: add config for spl command

This adds some configs for devkit8000 to use the new spl command

Signed-off-by: Simon Schwarz <simonschwarzcor@gmail.com>
CC: Tom Rini <tom.rini@gmail.com>
CC: Stefano Babic <sbabic@denx.de>
CC: Wolfgang Denk <wd@denx.de>
12 years agoAdd cmd_spl command
Simon Schwarz [Thu, 15 Mar 2012 04:01:34 +0000 (04:01 +0000)]
Add cmd_spl command

This adds a spl command to the u-boot.

Related config:
CONFIG_CMD_SPL
activate/deactivate the command
CONFIG_CMD_SPL_NAND_OFS
Offset in NAND to use

Signed-off-by: Simon Schwarz <simonschwarzcor@gmail.com>
Signed-off-by: Stefano Babic <sbabic@denx.de>
CC: Tom Rini <tom.rini@gmail.com>
CC: Wolfgang Denk <wd@denx.de>
12 years agomx53ard: Initialize return code with error
Fabio Estevam [Mon, 19 Mar 2012 13:41:25 +0000 (13:41 +0000)]
mx53ard: Initialize return code with error

The variable "rc" is the return of board_eth_init() function. Initialize
it with an error code, so that this function can return an error when
CONFIG_SMC911X is not set.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Stefano Babic <sbabic@denx.de>
12 years agomx53: Make PLL2 to be the parent of UART clock
Fabio Estevam [Wed, 21 Mar 2012 05:42:45 +0000 (05:42 +0000)]
mx53: Make PLL2 to be the parent of UART clock

Change the parent UART clock to be PLL2, so that U-boot can also boot
a Freescale 2.6.35 kernel for mx53.

FSL kernel and U-boot changed the UART parent from PLL3 to PLL2 to avoid
conflicts with IPU clocks, so that the video resolution can be changed
without affecting the UART clock.

On a 2.6.35 kernel the serial console is messed up after IPU driver is loaded
and this patch fixes this problem.

Tested on a mx53loco board booting a FSL kernel and also a mainline kernel.

Reported-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Otavio Salvador <otavio@ossystems.com.br>
12 years agoconfigs: imx: Use CONFIG_SF_DEFAULT_CS
Fabio Estevam [Thu, 22 Mar 2012 14:29:04 +0000 (14:29 +0000)]
configs: imx: Use CONFIG_SF_DEFAULT_CS

CONFIG_SPI_FLASH_CS is not used anywhere.

Use CONFIG_SF_DEFAULT_CS instead.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Marek Vasut <marex@denx.de>
Acked-by: Stefano Babic <sbabic@denx.de>
12 years agomx28evk: Provide default values for SPI bus and chip select
Fabio Estevam [Thu, 22 Mar 2012 14:29:03 +0000 (14:29 +0000)]
mx28evk: Provide default values for SPI bus and chip select

Provide default values for SPI bus and chip select.

This allows the command "sf probe" to work without passing SPI bus and chip
select numbers as arguments.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Marek Vasut <marex@denx.de>
12 years agoUSB: ehci-mx6: Add proper IO accessors
Fabio Estevam [Mon, 19 Mar 2012 12:36:10 +0000 (12:36 +0000)]
USB: ehci-mx6: Add proper IO accessors

Add proper IO accessors for mx6 usb registers.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Stefano Babic <sbabic@denx.de>
Acked-by: Marek Vasut <marex@denx.de>
Acked-by: Jason Liu <r64343@freescale.com>
12 years agomx6: Read silicon revision from register
Fabio Estevam [Tue, 20 Mar 2012 04:21:45 +0000 (04:21 +0000)]
mx6: Read silicon revision from register

Instead of hardcoding the mx6 silicon revision, read it in run-time.

Also, besides the silicon version print the mx6 variant type: quad,dual/solo
or solo-lite.

Tested on a mx6qsabrelite, where it shows:

CPU:   Freescale i.MX6Q rev1.0 at 792 MHz

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Stefano Babic <sbabic@denx.de>
Acked-by: Jason Liu <r64343@freescale.com>
12 years agoi.MX28: Drop __naked function from spl_mem_init
Marek Vasut [Fri, 16 Mar 2012 11:32:43 +0000 (11:32 +0000)]
i.MX28: Drop __naked function from spl_mem_init

Instead of compiling the function and using the result as a constant, simply use
the constant.

NOTE: This patch works around bug:

  http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52546

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Tom Rini <trini@ti.com>
12 years agomxs_spi: Return proper timeout error
Fabio Estevam [Sun, 18 Mar 2012 17:23:35 +0000 (17:23 +0000)]
mxs_spi: Return proper timeout error

Instead of returning -1, it is preferred to return -ETIMEDOUT in case of timeouts.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Marek Vasut <marex@denx.de>
12 years agoi.MX28: Make the stabilization delays shorter
Marek Vasut [Mon, 30 Jan 2012 14:05:39 +0000 (14:05 +0000)]
i.MX28: Make the stabilization delays shorter

Cut down the VDDIO/VDDA regulator stabilization delays to 500 uS. That should be
enough according to the datasheet and bootlets.

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Detlev Zundel <dzu@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Robert Deliën <robert@delien.nl>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: Matthias Fuchs <matthias.fuchs@esd.eu>
12 years agopmic_i2c: Return error in case of invalid pmic_i2c_tx_num
Fabio Estevam [Fri, 16 Mar 2012 11:32:09 +0000 (11:32 +0000)]
pmic_i2c: Return error in case of invalid pmic_i2c_tx_num

Return error in case of invalid pmic_i2c_tx_num.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Marek Vasut <marex@denx.de>
Acked-by: Lukasz Majewski <l.majewski@samsung.com>
Acked-by: Stefano Babic <sbabic@denx.de>
12 years agomx6: Remove duplicate definition of ANATOP_BASE_ADDR
Fabio Estevam [Tue, 13 Mar 2012 07:26:49 +0000 (07:26 +0000)]
mx6: Remove duplicate definition of ANATOP_BASE_ADDR

Remove duplicate definition of ANATOP_BASE_ADDR.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
12 years agomx6: Fix reset cause for Power On Reset case
Fabio Estevam [Tue, 13 Mar 2012 07:26:48 +0000 (07:26 +0000)]
mx6: Fix reset cause for Power On Reset case

After booting mx6qsabrelite from POR the following is reported:

CPU:   Freescale i.MX61 family rev1.0 at 792 MHz
Reset cause: unknown reset

This is because both the POR and WDOG bits are set after reset.

Fix this by also checking both bits in the POR case.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
12 years agoi.MX6: mx6qsabrelite: add MACH_TYPE_MX6Q_SABRELITE
Eric Nelson [Sun, 4 Mar 2012 10:51:36 +0000 (10:51 +0000)]
i.MX6: mx6qsabrelite: add MACH_TYPE_MX6Q_SABRELITE

Allow non-dt kernels to boot

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
12 years agoi.MX6: mx6q_sabrelite: add CONFIG_REVISION_TAG
Eric Nelson [Mon, 12 Mar 2012 15:04:12 +0000 (15:04 +0000)]
i.MX6: mx6q_sabrelite: add CONFIG_REVISION_TAG

This is needed to support Freescale-supplied userspaces.

At the moment, both the IPU and VPU libraries provided by Freescale
in the "imx-lib" package contain routines which scrape the system
revision from /proc/cpuinfo. In the VPU library, this information is
used to load the proper firmware, allowing a single binary to be used
across various i.MX processors.

Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
Acked-by: Marek Vasut <marex@denx.de>
Acked-by: Stefano Babic <sbabic@denx.de>
12 years agoi.MX28: Enable additional DRAM address bits
Marek Vasut [Sun, 26 Feb 2012 12:15:04 +0000 (12:15 +0000)]
i.MX28: Enable additional DRAM address bits

Enables all fourteen address lines for DRAM

Signed-off-by: Marek Vasut <marex@denx.de>
Acked-by: Marek Vasut <marek.vasut@gmail.com>
Tested-by: Marek Vasut <marek.vasut@gmail.com>
12 years agomx6q: mx6qsabrelite: setup_spi() should be called in board_init to allow use for...
Eric Nelson [Sun, 26 Feb 2012 12:03:15 +0000 (12:03 +0000)]
mx6q: mx6qsabrelite: setup_spi() should be called in board_init to allow use for environment

Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
12 years agomx31: add "ARM11P power gating" to get_reset_cause
Helmut Raiger [Wed, 15 Feb 2012 22:44:34 +0000 (22:44 +0000)]
mx31: add "ARM11P power gating" to get_reset_cause

Add missing reset reason 7 to get_reset_cause().

Signed-off-by: Helmut Raiger <helmut.raiger@hale.at>
12 years agomx31pdk: Fix CONFIG_SYS_MEMTEST_END
Fabio Estevam [Thu, 9 Feb 2012 14:25:07 +0000 (14:25 +0000)]
mx31pdk: Fix CONFIG_SYS_MEMTEST_END

CONFIG_SYS_MEMTEST_END should be higher than CONFIG_SYS_MEMTEST_START.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
12 years agoefikamx: Fix CONFIG_SYS_MEMTEST_END
Fabio Estevam [Thu, 9 Feb 2012 14:25:11 +0000 (14:25 +0000)]
efikamx: Fix CONFIG_SYS_MEMTEST_END

CONFIG_SYS_MEMTEST_END should be higher than CONFIG_SYS_MEMTEST_START.

Cc: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Marek Vasut <marek.vasut@gmail.com>
Tested-by: Marek Vasut <marek.vasut@gmail.com>
12 years agomx53smd: Fix CONFIG_SYS_MEMTEST_END
Fabio Estevam [Thu, 9 Feb 2012 14:25:10 +0000 (14:25 +0000)]
mx53smd: Fix CONFIG_SYS_MEMTEST_END

CONFIG_SYS_MEMTEST_END should be higher than CONFIG_SYS_MEMTEST_START.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
12 years agomx53evk: Fix CONFIG_SYS_MEMTEST_END
Fabio Estevam [Thu, 9 Feb 2012 14:25:09 +0000 (14:25 +0000)]
mx53evk: Fix CONFIG_SYS_MEMTEST_END

CONFIG_SYS_MEMTEST_END should be higher than CONFIG_SYS_MEMTEST_START.

Cc: Jason Liu <r64343@freescale.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
12 years agomx51evk: Fix CONFIG_SYS_MEMTEST_END
Fabio Estevam [Thu, 9 Feb 2012 14:25:08 +0000 (14:25 +0000)]
mx51evk: Fix CONFIG_SYS_MEMTEST_END

CONFIG_SYS_MEMTEST_END should be higher than CONFIG_SYS_MEMTEST_START.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
12 years agoi.MX6: mx6qsabrelite: add ext2 support
Eric Nelson [Fri, 2 Mar 2012 12:55:09 +0000 (12:55 +0000)]
i.MX6: mx6qsabrelite: add ext2 support

Current Ubuntu releases from Freescale contain a boot script in ext3 filesystem.

Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
12 years agoimximage: Remove overwriting of flash_offset
Dirk Behme [Wed, 22 Feb 2012 22:50:19 +0000 (22:50 +0000)]
imximage: Remove overwriting of flash_offset

The flash header supports different flash offsets for different
boot devices. E.g. parallel NOR or OneNAND use a different offset
than FLASH_OFFSET_STANDARD (== 0x400).

The flash offset is correctly read from the configuration in
parse_cfg_cmd(). But is then overwritten wrongly in set_imx_hdr_v1/2().

Fix this by removing this overwriting. Use the flash offset
correctly read from the configuration, instead.

If there is no flash_offset read from the configuration file, i.e.
the BOOT_FROM tag is missing, exit with an error message.

Signed-off-by: Dirk Behme <dirk.behme@de.bosch.com>
CC: Jason Liu <liu.h.jason@gmail.com>
CC: Stefano Babic <sbabic@denx.de>
Tested-by: Stefano Babic <sbabic@denx.de>
12 years agoIXP: Fix GPIO_INT_ACT_LOW_SET()
Marek Vasut [Tue, 6 Mar 2012 10:57:43 +0000 (11:57 +0100)]
IXP: Fix GPIO_INT_ACT_LOW_SET()

The GPIO_INT_ACT_LOW_SET was incorrectly handling interrupt lines higher than 7.
This is due to the fact that there are two registers for total of 16 lines.

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Bryan Hundven <bryanhundven@gmail.com>
Cc: Michael Schwingen <rincewind@discworld.dascon.de>
12 years agoIXP: Fix NAND build warning on PDNB3 and SCPU
Marek Vasut [Tue, 6 Mar 2012 00:10:00 +0000 (01:10 +0100)]
IXP: Fix NAND build warning on PDNB3 and SCPU

nand.c: In function ‘pdnb3_nand_read_buf’:
nand.c:107:4: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
nand.c: In function ‘pdnb3_nand_dev_ready’:
nand.c:124:18: warning: variable ‘val’ set but not used [-Wunused-but-set-variable]

Remove the 4-byte-at-time read mode altogether, the most is bogus and will
likely cause unaligned accesses.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Bryan Hundven <bryanhundven@gmail.com>
Cc: Michael Schwingen <rincewind@discworld.dascon.de>
12 years agoIXP: Move PDNB3 and SCPU from Makefile to boards.cfg
Marek Vasut [Tue, 6 Mar 2012 00:02:14 +0000 (01:02 +0100)]
IXP: Move PDNB3 and SCPU from Makefile to boards.cfg

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Bryan Hundven <bryanhundven@gmail.com>
Cc: Michael Schwingen <rincewind@discworld.dascon.de>
12 years agoIXP: Squash warnings in IXP NPE
Marek Vasut [Tue, 6 Mar 2012 00:00:52 +0000 (01:00 +0100)]
IXP: Squash warnings in IXP NPE

IxEthAcc.c: In function ‘ixEthAccInit’:
IxEthAcc.c:105:21: warning: comparison between ‘IxEthDBStatus’ and ‘enum <anonymous>’ [-Wenum-compare]
IxEthDBAPISupport.c: In function ‘ixEthDBPortAddressSet’:
IxEthDBAPISupport.c:633:18: warning: variable ‘ackPortAddressLock’ set but not used [-Wunused-but-set-variable]
IxQMgrDispatcher.c: In function ‘ixQMgrLLPShow’:
IxQMgrDispatcher.c:1194:18: warning: variable ‘q’ set but not used [-Wunused-but-set-variable]

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Bryan Hundven <bryanhundven@gmail.com>
Cc: Michael Schwingen <rincewind@discworld.dascon.de>
12 years agoIXP: Fix missing MACH_TYPE_{ACTUX?,PNB3,DVLHOST}
Marek Vasut [Mon, 5 Mar 2012 23:45:35 +0000 (00:45 +0100)]
IXP: Fix missing MACH_TYPE_{ACTUX?,PNB3,DVLHOST}

These symbols are no longer defined in Linux-ARM's mach-types files. Replace
these with CONFIG_MACH_TYPE instead.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Bryan Hundven <bryanhundven@gmail.com>
Cc: Michael Schwingen <rincewind@discworld.dascon.de>
12 years agoIXP: Make IXP buildable with arm-linux- toolchains
Marek Vasut [Mon, 5 Mar 2012 23:00:12 +0000 (00:00 +0100)]
IXP: Make IXP buildable with arm-linux- toolchains

Add -EB flag to LD to switch endianness of the linker. This should make armeb
targets buildable again. Also, make use of U-Boot's internal libgcc instead of
toolchain's one, this works around the use of libraries from GCC, which might be
little endian.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Bryan Hundven <bryanhundven@gmail.com>
Cc: Michael Schwingen <rincewind@discworld.dascon.de>
12 years agoExamples: Properly append LDFLAGS to LD command
Marek Vasut [Mon, 5 Mar 2012 23:44:22 +0000 (00:44 +0100)]
Examples: Properly append LDFLAGS to LD command

The LD command in examples/standalone/Makefile ignored platform specific
LDFLAGS setup. Pass these LDFLAGS to the command.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Bryan Hundven <bryanhundven@gmail.com>
Cc: Michael Schwingen <rincewind@discworld.dascon.de>
12 years agoSPL: Enable YMODEM support on BeagleBone and AM335x EVM
Matt Porter [Tue, 31 Jan 2012 12:03:58 +0000 (12:03 +0000)]
SPL: Enable YMODEM support on BeagleBone and AM335x EVM

Cc: Chandan Nath <chandan.nath@ti.com>
Tested-by: Tom Rini <trini@ti.com>
Signed-off-by: Matt Porter <mporter@ti.com>
12 years agoSPL: Add YMODEM over UART load support
Matt Porter [Tue, 31 Jan 2012 12:03:57 +0000 (12:03 +0000)]
SPL: Add YMODEM over UART load support

Adds support for loading U-Boot from UART using YMODEM protocol.
If YMODEM support is enabled in SPL and the romcode indicates
that SPL loaded via UART then SPL will wait for start of a
YMODEM transfer via the console port.

Signed-off-by: Matt Porter <mporter@ti.com>
Signed-off-by: Tom Rini <trini@ti.com>
12 years agoSPL: Add README.omap3
Tom Rini [Mon, 20 Feb 2012 13:27:43 +0000 (13:27 +0000)]
SPL: Add README.omap3

This document describes the SPL process for OMAP3 (and related) boards
as well as a partial memory map and how to verify certain aspects
outside of running on the target.

Signed-off-by: Tom Rini <trini@ti.com>
12 years agoREADME: document more SPL config options
Tom Rini [Tue, 14 Feb 2012 07:29:40 +0000 (07:29 +0000)]
README: document more SPL config options

Signed-off-by: Tom Rini <trini@ti.com>
12 years agospl.c: Use __noreturn decorator
Tom Rini [Tue, 14 Feb 2012 07:29:39 +0000 (07:29 +0000)]
spl.c: Use __noreturn decorator

Acked-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Tom Rini <trini@ti.com>
12 years agoconfig.mk: Check for -fstack-usage support
Tom Rini [Mon, 20 Feb 2012 13:50:10 +0000 (13:50 +0000)]
config.mk: Check for -fstack-usage support

Acked-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Tom Rini <trini@ti.com>