platform/kernel/u-boot.git
11 years agoOMAP5: add ABB setup for MPU voltage domain
Andrii Tseglytskyi [Mon, 20 May 2013 22:42:09 +0000 (22:42 +0000)]
OMAP5: add ABB setup for MPU voltage domain

Patch adds a call of abb_setup() function, and proper registers
definitions needed for ABB setup sequence. ABB is initialized
for MPU voltage domain.

Signed-off-by: Andrii Tseglytskyi <andrii.tseglytskyi@ti.com>
11 years agoOMAP3+: introduce generic ABB support
Andrii Tseglytskyi [Mon, 20 May 2013 22:42:08 +0000 (22:42 +0000)]
OMAP3+: introduce generic ABB support

Adaptive Body Biasing (ABB) modulates transistor bias voltages
dynamically in order to optimize switching speed versus leakage.
Adaptive Body-Bias ldos are present for some voltage domains
starting with OMAP3630. There are three modes of operation:

* Bypass - the default, it just follows the vdd voltage
* Foward Body-Bias - applies voltage bias to increase transistor
  performance at the cost of power.  Used to operate safely at high
  OPPs.
* Reverse Body-Bias - applies voltage bias to decrease leakage and
  save power.  Used to save power at lower OPPs.

Signed-off-by: Andrii Tseglytskyi <andrii.tseglytskyi@ti.com>
Acked-by: Nishanth Menon <nm@ti.com>
11 years agoam33xx: Board: Make CPSW section of ethernet initialization depend on CPSW driver
Joel A Fernandes [Tue, 7 May 2013 05:52:55 +0000 (05:52 +0000)]
am33xx: Board: Make CPSW section of ethernet initialization depend on CPSW driver

Not doing so breaks cases where CPSW is not required such as for USB RNDIS network boot.

Signed-off-by: Joel A Fernandes <joelagnel@ti.com>
11 years agoMIPS: asm/errno.h: switch to asm-generic/errno.h
Daniel Schwierzeck [Sat, 8 Jun 2013 17:23:12 +0000 (19:23 +0200)]
MIPS: asm/errno.h: switch to asm-generic/errno.h

This fixes several warnings like

In file included from ./u-boot/include/linux/mtd/mtd.h:13:0,
                 from env_onenand.c:37:
./u-boot/build/vct_platinumavc_onenand_small/include2/asm/errno.h:52:0: warning: "ENOMSG" redefined [enabled by default]

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
11 years agoMIPS: fix __raw_* IO accessors
Gabor Juhos [Wed, 20 Feb 2013 22:03:01 +0000 (22:03 +0000)]
MIPS: fix __raw_* IO accessors

The purpose of the __raw* IO accessors is to provide
IO access in native-endian order. However in the current
MIPS implementation, the 16 and 32 bit variants of the
__raw accessors are swapping the values on big-endian
systems if the CONFIG_SWAP_IO_SPACE option is enabled.

The patch changes the IO accessor macros to fix this
broken behaviour.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Cc: Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>
11 years agoMerge branch 'u-boot-imx/master' into 'u-boot-arm/master'
Albert ARIBAUD [Sat, 8 Jun 2013 12:35:10 +0000 (14:35 +0200)]
Merge branch 'u-boot-imx/master' into 'u-boot-arm/master'

Conflicts:
drivers/serial/Makefile

11 years agopci: introduce CONFIG_PCI_INDIRECT_BRIDGE option
Gabor Juhos [Thu, 30 May 2013 07:06:12 +0000 (07:06 +0000)]
pci: introduce CONFIG_PCI_INDIRECT_BRIDGE option

The pci_indirect.c file is always compiled when
CONFIG_PCI is defined although the indirect PCI
bridge support is not needed by every board.

Introduce a new CONFIG_PCI_INDIRECT_BRIDGE
config option and only compile indirect PCI
bridge support if this options is enabled.

Also add the new option into the configuration
files of the boards which needs that.

Compile tested for powerpc, x86, arm and nds32.
MAKEALL results:

powerpc:
  --------------------- SUMMARY ----------------------------
  Boards compiled: 641
  Boards with warnings but no errors: 2 ( ELPPC MPC8323ERDB )
  ----------------------------------------------------------
  Note: the warnings for ELPPC and MPC8323ERDB are present even
  without the actual patch.

x86:
  --------------------- SUMMARY ----------------------------
  Boards compiled: 1
  ----------------------------------------------------------

arm:
  --------------------- SUMMARY ----------------------------
  Boards compiled: 311
  ----------------------------------------------------------

nds32:
  --------------------- SUMMARY ----------------------------
  Boards compiled: 3
  ----------------------------------------------------------

Cc: Tom Rini <trini@ti.com>
Cc: Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
11 years agofdt: remove unaligned access in fdt_fixup_ethernet()
Stephen Warren [Mon, 27 May 2013 18:01:19 +0000 (18:01 +0000)]
fdt: remove unaligned access in fdt_fixup_ethernet()

Some ARM compilers may emit code that makes unaligned accesses when
faced with constructs such as:

char mac[16] = "ethaddr";

Replace this with a strcpy() call instead to avoid this. strcpy() is
used here, rather than replacing all usage of the mac variable with the
string itself, since the loop itself sprintf()s to the variable each
iteration, so strcpy() is doing basically the same thing.

Reported-by: Florian Meier
Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
11 years agogeneric_board: reduce the redundancy of gd_t struct members
Masahiro Yamada [Mon, 27 May 2013 00:37:30 +0000 (00:37 +0000)]
generic_board: reduce the redundancy of gd_t struct members

This commit refactors common/board_f.c and common/board_r.c
in order to delete the dest_addr and dest_addr_sp from
gd_t struct.

As mentioned as follows in include/asm-generic/global_data.h,

  /* TODO: is this the same as relocaddr, or something else? */
  unsigned long dest_addr;        /* Post-relocation address of U-Boot */

dest_addr is the same as relocaddr.
Likewise, dest_addr_sp is the same as start_addr_sp.

It seemed dest_addr/dest_addr_sp was used only as a scratch variable
to calculate relocaddr/start_addr_sp, respectively.

With a little refactoring, we can delete dest_addr and dest_addr_sp.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Simon Glass <sjg@chromium.org>
11 years agoam335x: enable falcon boot mode for mmc (raw and fat) and nand
Peter Korsgaard [Mon, 13 May 2013 08:36:30 +0000 (08:36 +0000)]
am335x: enable falcon boot mode for mmc (raw and fat) and nand

Jump into full u-boot mode if a 'c' character is received on the uart.

We need to adjust the spl bss/malloc area to not overlap with the
loadaddr of the kernel (sdram + 32k), so move it past u-boot instead.

For raw mmc, we store the kernel parameter area in the free space after
the MBR (if used). For nand, we use the last sector of the partition
reserved for u-boot.

This also enables the spl command in the full u-boot so the kernel
parameter area snapshot can be created.

Signed-off-by: Peter Korsgaard <peter.korsgaard@barco.com>
11 years agospl_mmc: add Falcon mode support for raw variant
Peter Korsgaard [Mon, 13 May 2013 08:36:29 +0000 (08:36 +0000)]
spl_mmc: add Falcon mode support for raw variant

If Falcon mode support is enabled (and the system isn't directed into
booting u-boot), it will instead try to load kernel from sector
CONFIG_SYS_MMCSD_RAW_MODE_KERNEL_SECTOR and
CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTORS of kernel argument parameters
starting from sector CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTOR.

Signed-off-by: Peter Korsgaard <peter.korsgaard@barco.com>
11 years agospl_mmc: mmc_load_image_raw(): Add sector argument
Peter Korsgaard [Mon, 13 May 2013 08:36:28 +0000 (08:36 +0000)]
spl_mmc: mmc_load_image_raw(): Add sector argument

So we can use it for falcon mode as well.

Signed-off-by: Peter Korsgaard <peter.korsgaard@barco.com>
11 years agospl_mmc: add Falcon mode support for FAT variant
Peter Korsgaard [Mon, 13 May 2013 08:36:27 +0000 (08:36 +0000)]
spl_mmc: add Falcon mode support for FAT variant

If Falcon mode support is enabled (and the system isn't directed into
booting u-boot), it will instead try to load kernel from
CONFIG_SPL_FAT_LOAD_KERNEL_NAME file and kernel argument parameters from
CONFIG_SPL_FAT_LOAD_ARGS_NAME, both from the same partition as u-boot.

Signed-off-by: Peter Korsgaard <peter.korsgaard@barco.com>
11 years agodevkit8000: Add SPL_OS for MMC support
Tom Rini [Fri, 7 Jun 2013 18:16:43 +0000 (14:16 -0400)]
devkit8000: Add SPL_OS for MMC support

Signed-off-by: Tom Rini <trini@ti.com>
11 years agospl_mmc: mmc_load_image_fat(): Add filename argument and move fat init out
Peter Korsgaard [Mon, 13 May 2013 08:36:26 +0000 (08:36 +0000)]
spl_mmc: mmc_load_image_fat(): Add filename argument and move fat init out

So we can use it for falcon mode as well.

Signed-off-by: Peter Korsgaard <peter.korsgaard@barco.com>
11 years agospl_mmc: return error from mmc_load_image_{raw, fat} rather than hanging
Peter Korsgaard [Mon, 13 May 2013 08:36:25 +0000 (08:36 +0000)]
spl_mmc: return error from mmc_load_image_{raw, fat} rather than hanging

So we can instead fallback to doing something else on errors.

Signed-off-by: Peter Korsgaard <peter.korsgaard@barco.com>
11 years agoMerge branch 'master' of git://git.denx.de/u-boot-video
Tom Rini [Fri, 7 Jun 2013 12:35:36 +0000 (08:35 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-video

11 years agoMerge branch 'master' of git://git.denx.de/u-boot-nand-flash
Tom Rini [Fri, 7 Jun 2013 12:34:34 +0000 (08:34 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-nand-flash

11 years agoARM: tegra: only enable SCU on Tegra20
Tom Warren [Thu, 23 May 2013 12:26:18 +0000 (12:26 +0000)]
ARM: tegra: only enable SCU on Tegra20

The non-SPL build of U-Boot on Tegra only runs on a single CPU, and
hence there is no need to enable the SCU when running U-Boot. If an
SMP OS is booted, and it needs the SCU enabled, it will enable the SCU
itself. U-Boot doing so is redundant.

The one exception is Tegra20, where an enabled SCU is required for some
aspects of PCIe to work correctly.

Some Tegra SoCs contain CPUs without a software-controlled SCU. In this
case, attempting to turn it on actively causes problems. This is the case
for Tegra114. For example, when running Linux, the first (or at least
some very early) user-space process will trigger the following kernel
message:

Unhandled fault: imprecise external abort (0x406) at 0x00000000

This is typically accompanied by that process receving a fatal signal,
and exiting. Since this process is usually pid 1, this causes total
system boot failure.

Signed-off-by: Tom Warren <twarren@nvidia.com>
[swarren, fleshed out description, ported to upstream chipid APIs]
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
11 years agovf610twr: Drop unneeded 'status' variable
Fabio Estevam [Wed, 5 Jun 2013 11:34:48 +0000 (11:34 +0000)]
vf610twr: Drop unneeded 'status' variable

No need to use the 'status' variable, so just remove it.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Reviewed-by: Otavio Salvador <otavio@ossystems.com.br>
11 years agoinput: Finish simplifing key_matrix_decode_fdt()
Stephen Warren [Thu, 6 Jun 2013 14:48:30 +0000 (10:48 -0400)]
input: Finish simplifing key_matrix_decode_fdt()

[trini: Applied v1 of the series rather than v2, this commit is the
delta from v1 to v2]

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Rini <trini@ti.com>
11 years agoARM: imx: Fix incorrect usage of CONFIG_SYS_MMC_ENV_PART
Fabio Estevam [Tue, 4 Jun 2013 15:05:39 +0000 (15:05 +0000)]
ARM: imx: Fix incorrect usage of CONFIG_SYS_MMC_ENV_PART

When running the "save" command several times on a mx6qsabresd we see:

U-Boot > save
Saving Environment to MMC...
Writing to MMC(1)... done
U-Boot > save
Saving Environment to MMC...
MMC partition switch failed
U-Boot > save
Saving Environment to MMC...
Writing to MMC(1)... done
U-Boot > save
Saving Environment to MMC...
MMC partition switch failed
U-Boot > save
Saving Environment to MMC...
Writing to MMC(1)... done
U-Boot > save
Saving Environment to MMC...
MMC partition switch failed

This issue is caused by the incorrect usage of CONFIG_SYS_MMC_ENV_PART.

CONFIG_SYS_MMC_ENV_PART should be used to specify the mmc partition that stores
the environment variables.

On some imx boards it is been incorrectly used to pass the partition of kernel
and dtb files for the 'mmcpart' script variable.

Remove the CONFIG_SYS_MMC_ENV_PART usage and configure the 'mmcpart' variable
directly.

Reported-by: Jason Liu <r64343@freescale.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Jason Liu <r64343@freescale.com>
11 years agocheckpatch.pl: Add 'printf' to logFunctions
Tom Rini [Thu, 6 Jun 2013 13:28:19 +0000 (09:28 -0400)]
checkpatch.pl: Add 'printf' to logFunctions

Signed-off-by: Tom Rini <trini@ti.com>
11 years agoam33xx/omap4+: Move SRAM_SCRATCH_SPACE_ADDR to <asm/arch/omap.h>
Tom Rini [Thu, 6 Jun 2013 12:57:45 +0000 (08:57 -0400)]
am33xx/omap4+: Move SRAM_SCRATCH_SPACE_ADDR to <asm/arch/omap.h>

The location of valid scratch space is dependent on SoC, so move that
there.  On OMAP4+ we continue to use SRAM_SCRATCH_SPACE_ADDR.  On
am33xx/ti814x we want to use what the ROM defines as "public stack"
which is the area after our defined download image space.  Correct the
comment about and location of CONFIG_SPL_TEXT_BASE.

Signed-off-by: Tom Rini <trini@ti.com>
11 years agoARM: bcm2835: add simplefb DT node during bootz/m
Stephen Warren [Mon, 27 May 2013 18:31:18 +0000 (18:31 +0000)]
ARM: bcm2835: add simplefb DT node during bootz/m

Add a DT simple-framebuffer node to DT when booting the Linux kernel.
This will allow the kernel to inherit the framebuffer configuration from
U-Boot, and display a graphical boot console, and even run a full SW-
rendered X server.

Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
Acked-by: Simon Glass <sjg@chromium.org>
11 years agolcd: add functions to set up simplefb device tree
Stephen Warren [Mon, 27 May 2013 18:31:17 +0000 (18:31 +0000)]
lcd: add functions to set up simplefb device tree

simple-framebuffer is a new device tree binding that describes a pre-
configured frame-buffer memory region and its format. The Linux kernel
contains a driver that supports this binding. Implement functions to
create a DT node (or fill in an existing node) with parameters that
describe the framebuffer format that U-Boot is using.

This will be immediately used by the Raspberry Pi board in U-Boot, and
likely will be used by the Samsung ARM ChromeBook support soon too. It
could well be used by many other boards (e.g. Tegra boards with built-in
LCD panels, which aren't yet supported by the Linux kernel).

Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
Acked-by: Simon Glass <sjg@chromium.org>
11 years agoMerge branch 'master' of git://git.denx.de/u-boot-arm
Tom Rini [Wed, 5 Jun 2013 16:45:34 +0000 (12:45 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-arm

11 years agoMerge branch 'tpm' of git://git.denx.de/u-boot-x86
Tom Rini [Wed, 5 Jun 2013 12:55:35 +0000 (08:55 -0400)]
Merge branch 'tpm' of git://git.denx.de/u-boot-x86

11 years agoam33xx/omap: Move save_omap_boot_params to omap-common/boot-common.c
Tom Rini [Fri, 31 May 2013 16:31:59 +0000 (12:31 -0400)]
am33xx/omap: Move save_omap_boot_params to omap-common/boot-common.c

We need to call the save_omap_boot_params function on am33xx/ti81xx and
other newer TI SoCs, so move the function to boot-common.  Only OMAP4+
has the omap_hw_init_context function so add ifdefs to not call it on
am33xx/ti81xx.  Call save_omap_boot_params from s_init on am33xx/ti81xx
boards.

Reviewed-by: R Sricharan <r.sricharan@ti.com>
Signed-off-by: Tom Rini <trini@ti.com>
11 years agoam33xx: Correct NON_SECURE_SRAM_START/END
Tom Rini [Fri, 31 May 2013 14:48:03 +0000 (10:48 -0400)]
am33xx: Correct NON_SECURE_SRAM_START/END

Prior to Sricharan's cleanup of the boot parameter saving code, we
did not make use of NON_SECURE_SRAM_START on am33xx, so it wasn't a
problem that the address was pointing to the middle of our running SPL.
Correct to point to the base location of the download image area.
Increase CONFIG_SPL_TEXT_BASE to account for this scratch area being
used.  As part of correcting these tests, make use of the fact that
we've always been placing our stack outside of the download image area
(which is fine, once the downloaded image is run, ROM is gone) so
correct the max size test to be the ROM defined top of the download area
to where we link/load at.

Signed-off-by: Tom Rini <trini@ti.com>
---
Changes in v2:
- Fix typo noted by Peter Korsgaard

11 years agoomap-common/hwinit-common.c: Mark omap_rev_string as static
Tom Rini [Fri, 31 May 2013 14:44:23 +0000 (10:44 -0400)]
omap-common/hwinit-common.c: Mark omap_rev_string as static

Only called in this file, mark as static.

Signed-off-by: Tom Rini <trini@ti.com>
11 years agofdt: allow bootdelay to be specified via device tree
Stephen Warren [Tue, 14 May 2013 08:02:56 +0000 (08:02 +0000)]
fdt: allow bootdelay to be specified via device tree

This can be useful to force bootcmd to execute as soon as U-Boot has
started.

My use-case is: An SoC-specific tool pushes U-Boot into RAM, along with
an image to be written to device boot flash, with the DT config property
"bootcmd" set to contain a command to write that image to flash. In this
scenario, we don't want to allow any stale bootdelay value taken from
the current flash content to affect how long it takes before the
flashing process starts.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
Acked-by: Gerald Van Baren <vanbaren@cideas.com>
11 years agoinput: simplify key_matrix_decode_fdt()
Stephen Warren [Thu, 23 May 2013 12:09:57 +0000 (12:09 +0000)]
input: simplify key_matrix_decode_fdt()

We know the exact property names that the code wants to process. Look
these up directly with fdt_get_property(), rather than iterating over
all properties within the node, and checking each property's name, in
a convoluted fashion, against the expected name.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
11 years agoinput: fix unaligned access in key_matrix_decode_fdt()
Stephen Warren [Wed, 22 May 2013 08:48:18 +0000 (08:48 +0000)]
input: fix unaligned access in key_matrix_decode_fdt()

Initialized character arrays on the stack can cause gcc to emit code that
performs unaligned accessess. Make the data static to avoid this.

Note that the unaligned accesses are made when copying data to prefix[] on
the stack from .rodata. By making the data static, the copy is completely
avoided. All explicitly written code treats the data as u8[], so will never
cause any unaligned accesses.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
11 years agocommon: board_f: Do not call board_postclk_init twice
Masahiro Yamada [Tue, 21 May 2013 21:08:09 +0000 (21:08 +0000)]
common: board_f: Do not call board_postclk_init twice

The generic-board board_init_f function called board_postclk_init twice.

The first one came from arch/arm/lib/board.c, while the second one
from arch/powerpc/lib/board.c.

This commit deletes the first occurrence.
In addition, the second get_clocks call is moved after
board_postclk_init in order to keep the function call order
both for ARM and PowerPC.
ARM board calles get_clocks function after board_postclk_init.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
11 years agodisk: Fix possible out-of-bounds access in part_efi.c
Marek Vasut [Sun, 19 May 2013 12:53:34 +0000 (12:53 +0000)]
disk: Fix possible out-of-bounds access in part_efi.c

Make sure to never access beyond bounds of either EFI partition name
or DOS partition name. This situation is happening:

part.h:     disk_partition_t->name is 32-byte long
part_efi.h: gpt_entry->partition_name is 36-bytes long

The loop in part_efi.c copies over 36 bytes and thus accesses beyond
the disk_partition_t->name .

Fix this by picking the shortest of source and destination arrays and
make sure the destination array is cleared so the trailing bytes are
zeroed-out and don't cause issues with string manipulation.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Tom Rini <trini@ti.com>
Cc: Simon Glass <sjg@chromium.org>
11 years agosandbox: image: Create a test for loading FIT images
Simon Glass [Thu, 16 May 2013 13:53:28 +0000 (13:53 +0000)]
sandbox: image: Create a test for loading FIT images

The image code is fairly complex with various different options. It would
be useful to have comprehensive tests for this.

As a start, create a script which tries out loading a kernel/ramdisk/fdt
from a FIT and checks that the images appear in the right place in memory.

This uses sandbox which now supports bootm and related features.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agobootstage: Remove unused entries related to kernel/ramdisk/fdt load
Simon Glass [Thu, 16 May 2013 13:53:27 +0000 (13:53 +0000)]
bootstage: Remove unused entries related to kernel/ramdisk/fdt load

Now that the code for loading these three images from a FIT is common, we
don't need individual boostage IDs for each of them.

Note: there are some minor changes in the bootstage numbering, particuarly
for kernel loading. I don't believe this matters.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agosandbox: image: Adjust FIT image printing to work with sandbox
Simon Glass [Thu, 16 May 2013 13:53:26 +0000 (13:53 +0000)]
sandbox: image: Adjust FIT image printing to work with sandbox

Use map_sysmem() to convert from address to pointer, so that sandbox can
print FIT information without crashing.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agoimage: Use fit_image_load() to load kernel
Simon Glass [Thu, 16 May 2013 13:53:25 +0000 (13:53 +0000)]
image: Use fit_image_load() to load kernel

Use the new common code to load a kernel. The functionality should not
change.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agosandbox: Adjust bootm command to work with sandbox
Simon Glass [Thu, 16 May 2013 13:53:24 +0000 (13:53 +0000)]
sandbox: Adjust bootm command to work with sandbox

Use map_sysmem() when converting from addresses to pointers, so that
bootm can be used with sandbox.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agoimage: Use fit_image_load() to load FDT
Simon Glass [Thu, 16 May 2013 13:53:23 +0000 (13:53 +0000)]
image: Use fit_image_load() to load FDT

Use the new common code to load a flat device tree. Also fix up a few casts
so that this code works with sandbox. Other than that the functionality
should not change.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agoimage: Use fit_image_load() to load ramdisk
Simon Glass [Thu, 16 May 2013 13:53:22 +0000 (13:53 +0000)]
image: Use fit_image_load() to load ramdisk

Use the new common code to load a ramdisk. The functionality should not
change.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agoimage: Introduce fit_image_load() to load images from FITs
Simon Glass [Thu, 16 May 2013 13:53:21 +0000 (13:53 +0000)]
image: Introduce fit_image_load() to load images from FITs

At present code to load an image from a FIT is duplicated in the three
places where it is needed (kernel, fdt, ramdisk).

The differences between these different code copies is fairly minor.
Create a new function in the fit code which can handle any of the
requirements of those cases.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agomkimage: Add map_sysmem() and IH_ARCH_DEFAULT to simplfy building
Simon Glass [Thu, 16 May 2013 13:53:20 +0000 (13:53 +0000)]
mkimage: Add map_sysmem() and IH_ARCH_DEFAULT to simplfy building

These are not actually used in mkimage itself, but the image code (which
is common with mkimage) does use them. To avoid #ifdefs in the image code
just for mkimage, define dummy version of these here. The compiler will
eliminate the dead code anyway.

A better way to handle this might be to split out more things from common.h
so that mkimage can include them. At present any file that mkimage uses
has to be very careful what headers it includes.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agobootstage: Introduce sub-IDs for use with image loading
Simon Glass [Thu, 16 May 2013 13:53:19 +0000 (13:53 +0000)]
bootstage: Introduce sub-IDs for use with image loading

Loading a ramdisk, kernel or FDT goes through similar stages. Create
a block of IDs for each task, and define a consistent numbering within
the block. This will allow use of common code for image loading.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agomain: Add debug_bootkeys to avoid #ifdefs
Simon Glass [Wed, 15 May 2013 06:24:01 +0000 (06:24 +0000)]
main: Add debug_bootkeys to avoid #ifdefs

Define a simple debug condition at the top of the file, to avoid using
lots of #ifdefs later on.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
11 years agomain: Add debug_parser() to avoid #ifdefs
Simon Glass [Wed, 15 May 2013 06:24:00 +0000 (06:24 +0000)]
main: Add debug_parser() to avoid #ifdefs

Define a simple debug condition at the top of the file, to avoid using
lots of #ifdefs later on.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
11 years agomain: Correct header order
Simon Glass [Wed, 15 May 2013 06:23:59 +0000 (06:23 +0000)]
main: Correct header order

The headers are a bit out of order, so fix them.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agomain: Fix typos and checkpatch warnings in command line reading
Simon Glass [Wed, 15 May 2013 06:23:58 +0000 (06:23 +0000)]
main: Fix typos and checkpatch warnings in command line reading

There are a few over-long lines and other checkpatch problems in this area
of the code. Prepare the ground for the next patch by tidying these up.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
11 years agomain: Use get/setenv_ulong()
Simon Glass [Wed, 15 May 2013 06:23:57 +0000 (06:23 +0000)]
main: Use get/setenv_ulong()

These functions are now available, so use them to avoid extra code here.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
11 years agomain: Move boot_delay code into its own function
Simon Glass [Wed, 15 May 2013 06:23:56 +0000 (06:23 +0000)]
main: Move boot_delay code into its own function

Move this code into its own function, since it clutters up main_loop().

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agomain: Separate out the two abortboot() functions
Simon Glass [Wed, 15 May 2013 06:23:55 +0000 (06:23 +0000)]
main: Separate out the two abortboot() functions

There are two implementations of abortboot(). Turn these into two separate
functions, and create a single abortboot() which calls either one or the
other.

Also it seems that nothing uses abortboot() outside main, so make it static.

At this point there is no further use of CONFIG_MENU in main.c.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
11 years agonet: Add prototype for update_tftp
Simon Glass [Wed, 15 May 2013 06:23:54 +0000 (06:23 +0000)]
net: Add prototype for update_tftp

This function should be declared in net.h.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
11 years agoat91: Correct CONFIG_AUTOBOOT_PROMPT definition for pm9263
Simon Glass [Wed, 15 May 2013 06:23:53 +0000 (06:23 +0000)]
at91: Correct CONFIG_AUTOBOOT_PROMPT definition for pm9263

This is not currently used, since autoboot is not enabled for this
board, but the string is missing a parameter. Add it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Andreas Bießmann <andreas.devel@googlemail.com>
11 years agobug, nand, am33xx: nand->ecc.strength not set in board_nand_init()
Sergey Lapin [Tue, 4 Jun 2013 16:42:43 +0000 (11:42 -0500)]
bug, nand, am33xx: nand->ecc.strength not set in board_nand_init()

commit dfe64e2c89731a3f9950d7acd8681b68df2bae03
Author: Sergey Lapin <slapin@ossfans.org>
Date:   Mon Jan 14 03:46:50 2013 +0000

    mtd: resync with Linux-3.7.1

Introduced runtime bug:

U-Boot 2013.04-00499-g46567df-dirty (Jun 04 2013 - 08:17:08)

I2C:   ready
DRAM:  512 MiB
WARNING: Caches not enabled
NAND:  BUG: failure at nand_base.c:3214/nand_scan_tail()!
BUG!
resetting ...

on boards using drivers/mtd/nand/omap_gpmc.c as in board_nand_init()
nand->ecc.strength is not set. Fix this!

Signed-off-by: Heiko Schocher <hs@denx.de>
Cc: Sergey Lapin <slapin@ossfans.org>
Cc: Scott Wood <scottwood@freescale.com>
Cc: Tom Rini <trini@ti.com>
11 years agoAdd support for Congatec Conga-QEVAl board
SARTRE Leo [Mon, 3 Jun 2013 23:30:36 +0000 (23:30 +0000)]
Add support for Congatec Conga-QEVAl board

Add minimal support (only boot from mmc device) for the Congatec
Conga-QEVAl Evaluation Carrier Board with conga-Qmx6q (i.MX6 Quad
processor) module.

Signed-off-by: Leo Sartre <lsartre@adeneo-embedded.com>
Acked-by: Stefano Babic <sbabic@denx.de>
Acked-by: Otavio Salvador <otavio@ossystems.com.br>
11 years agowandboard: Add Boot Splash image with Wandboard logo
Otavio Salvador [Mon, 27 May 2013 12:18:44 +0000 (12:18 +0000)]
wandboard: Add Boot Splash image with Wandboard logo

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
11 years agowandboard: Enable HDMI splashscreen
Fabio Estevam [Thu, 23 May 2013 07:50:23 +0000 (07:50 +0000)]
wandboard: Enable HDMI splashscreen

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
11 years agobuild: Use generic boot logo matching
Otavio Salvador [Mon, 27 May 2013 12:18:43 +0000 (12:18 +0000)]
build: Use generic boot logo matching

The boot logo matching is now done in following way:

 - use LOGO_BMP if it is set, or
 - use $(BOARD).bmp if it exists in tools/logos, or
 - use $(VENDOR).bmp if it exists in tools/logos, or
 - use denx.bmp otherwise.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Acked-by: Wolfgang Denk <wd@denx.de>
11 years agomx6: mx6qsabrelite/nitrogen6x: Remove incorrect setting of gpio CS signal
Andrew Gabbasov [Thu, 30 May 2013 04:47:38 +0000 (04:47 +0000)]
mx6: mx6qsabrelite/nitrogen6x: Remove incorrect setting of gpio CS signal

The number of gpio signal is packed inside CONFIG_SF_DEFAULT_CS macro
(shifted and or'ed with chip select), so it's incorrect to pass
that macro directly as an argument to gpio_direction_output() call.

Also, SPI driver sets the direction and initial value of a gpio,
used as a chip select signal, before any actual activity happens
on the bus.

So, it is safe to just remove the gpio_direction_output call,
that works incorrectly, thus making no effect, anyway.

Signed-off-by: Andrew Gabbasov <andrew_gabbasov@mentor.com>
Tested-by: Robert Winkler <robert.winkler@boundarydevices.com>
Acked-by: Dirk Behme <dirk.behme@de.bosch.com>
11 years agomx6qsabreauto: Add Port Expander reset
Renato Frias [Mon, 13 May 2013 18:01:13 +0000 (18:01 +0000)]
mx6qsabreauto: Add Port Expander reset

There are 3 IO expanders on the mx6qsabreauto all reset by the
same GPIO, just set it to high to use the IO.

Signed-off-by: Renato Frias <b13784@freescale.com>
Acked-by: Stefano Babic <sbabic@denx.de>
11 years agomx6qsabreauto: Add i2c to mx6qsabreauto board
Renato Frias [Mon, 13 May 2013 18:01:12 +0000 (18:01 +0000)]
mx6qsabreauto: Add i2c to mx6qsabreauto board

Add i2c2 and 3 to mx6qsabreauto board, i2c3 is multiplexed
use gpio to set steering.

Signed-off-by: Renato Frias <b13784@freescale.com>
Reviewed-by: Otavio Salvador <otavio@ossystems.com.br>
Reviewed-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Stefano Babic <sbabic@denx.de>
11 years agomx6slevk: Allow booting a device tree kernel
Fabio Estevam [Thu, 23 May 2013 13:57:18 +0000 (13:57 +0000)]
mx6slevk: Allow booting a device tree kernel

When the mx6slevk board support was added in U-boot there was no device tree
support for mx6sl, so only a FSL 3.0.35 was tested at that time.

Now that mx6slevk support is available we can boot a device tree kernel, by
adjusting CONFIG_LOADADDR into a proper location, so that a non-dt and a dt
kernels can be booted.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
11 years agoarm: mxs: Fix vectoring table crafting
Marek Vasut [Thu, 25 Apr 2013 16:37:12 +0000 (16:37 +0000)]
arm: mxs: Fix vectoring table crafting

The vectoring table has to be placed at 0x0, but U-Boot on MX23/MX28
starts from RAM, so the vectoring table at 0x0 is not present. Craft
code that will be placed at 0x0 and will redirect interrupt vectoring
to proper location of the U-Boot in RAM.

Signed-off-by: Marek Vasut <marex@denx.de>
CC: Stefano Babic <sbabic@denx.de>
CC: Fabio Estevam <fabio.estevam@freescale.com>
Tested-by: Fabio Estevam <fabio.estevam@freescale.com>
11 years agoarm: vf610: Add basic support for Vybrid VF610TWR board
Alison Wang [Mon, 27 May 2013 22:55:47 +0000 (22:55 +0000)]
arm: vf610: Add basic support for Vybrid VF610TWR board

VF610TWR is a board based on Vybrid VF610 SoC.

This patch adds basic support for Vybrid VF610TWR board.

Signed-off-by: Alison Wang <b18965@freescale.com>
Signed-off-by: Jason Jin <Jason.jin@freescale.com>
Signed-off-by: TsiChung Liew <tsicliew@gmail.com>
Reviewed-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
11 years agoarm: vf610: Add Vybrid VF610 to mxc_ocotp document
Alison Wang [Mon, 27 May 2013 22:55:46 +0000 (22:55 +0000)]
arm: vf610: Add Vybrid VF610 to mxc_ocotp document

This patch adds Vybrid VF610 to mxc_ocotp document.

Signed-off-by: Alison Wang <b18965@freescale.com>
Reviewed-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
11 years agoarm: vf610: Add uart support for Vybrid VF610
Alison Wang [Mon, 27 May 2013 22:55:45 +0000 (22:55 +0000)]
arm: vf610: Add uart support for Vybrid VF610

This patch adds lpuart support for Vybrid VF610 platform.

Signed-off-by: TsiChung Liew <tsicliew@gmail.com>
Signed-off-by: Alison Wang <b18965@freescale.com>
11 years agoarm: vf610: Add watchdog support for Vybrid VF610
Alison Wang [Mon, 27 May 2013 22:55:44 +0000 (22:55 +0000)]
arm: vf610: Add watchdog support for Vybrid VF610

This patch adds watchdog support for Vybrid VF610 platform.

Signed-off-by: Alison Wang <b18965@freescale.com>
11 years agonet: fec_mxc: Add support for Vybrid VF610
Alison Wang [Mon, 27 May 2013 22:55:43 +0000 (22:55 +0000)]
net: fec_mxc: Add support for Vybrid VF610

This patch adds FEC support for Vybrid VF610 platform.

In function fec_open(), RCR register is only set as RGMII mode. But RCR
register should be set as RMII mode for VF610 platform.
This configuration is already done in fec_reg_setup(), so this piece of
code could just leave untouched the FEC_RCNTRL_RGMII / FEC_RCNTRL_RMII /
FEC_RCNTRL_MII_MODE bits.

Signed-off-by: Alison Wang <b18965@freescale.com>
Reviewed-by: Benoit Thebaudeau <benoit.thebaudeau@advansee.com>
Reviewed-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
11 years agoarm: vf610: Add Vybrid VF610 CPU support
Alison Wang [Mon, 27 May 2013 22:55:42 +0000 (22:55 +0000)]
arm: vf610: Add Vybrid VF610 CPU support

This patch adds generic codes to support Freescale's Vybrid VF610 CPU.

It aligns Vybrid VF610 platform with i.MX platform. As there are
some differences between VF610 and i.MX platforms, the specific
codes are in the arch/arm/cpu/armv7/vf610 directory.

Signed-off-by: Alison Wang <b18965@freescale.com>
Reviewed-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
11 years agoarm: vf610: Add IOMUX support for Vybrid VF610
Alison Wang [Mon, 27 May 2013 22:55:41 +0000 (22:55 +0000)]
arm: vf610: Add IOMUX support for Vybrid VF610

This patch adds the IOMUX support for Vybrid VF610 platform.

There is a little difference for IOMUXC module between VF610 and i.MX
platform, the muxmode and pad configuration share one 32bit register on
VF610, but they are two independent registers on I.MX platform. A
CONFIG_IOMUX_SHARE_CONFIG_REG was introduced to fit this difference.

Signed-off-by: Alison Wang <b18965@freescale.com>
Acked-by: Stefano Babic <sbabic@denx.de>
Reviewed-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
11 years agotpm: Reorganize the I2C TPM driver
Tom Wai-Hong Tam [Fri, 12 Apr 2013 11:04:37 +0000 (11:04 +0000)]
tpm: Reorganize the I2C TPM driver

This patch does a similar code reogranzation from
  http://patchwork.ozlabs.org/patch/132179/
which is based on an old version of code (fdt support and bus selection
still not in). It merges this tidy-up on top of the recent code. It does
not make any logical change.

tpm.c implements the interface defined in tpm.h based on underlying
LPC or I2C TPM driver. tpm.c and the underlying driver communicate
throught tpm_private.h.

Note: Merging the LPC driver with tpm.c is left to future patches.

Change-Id: Ie1384f5f9e3935d3bc9a44adf8de80c5a70a5f2b
Signed-off-by: Tom Wai-Hong Tam <waihong@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
11 years agotpm: Add support for new Infineon I2C TPM (SLB 9645 TT 1.2 I2C)
Vincent Palatin [Fri, 12 Apr 2013 11:04:36 +0000 (11:04 +0000)]
tpm: Add support for new Infineon I2C TPM (SLB 9645 TT 1.2 I2C)

Add support for Infineon's new SLB 9645 TT 1.2 I2C TPMs,
which supports clockstretching, combined reads and a bus speed of
up to 400khz. The device also has a new device id.

This is based on the kernel patch provided by Infineon :
https://gerrit.chromium.org/gerrit/42332

Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Luigi Semenzato <semenzato@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Tested-by: Tom Wai-Hong Tam <waihong@chromium.org>
Tested-by: Vincent Palatin <vpalatin@chromium.org>
11 years agox86: config: Reflect the name changes of LPC TPM configs
Tom Wai-Hong Tam [Fri, 12 Apr 2013 11:04:35 +0000 (11:04 +0000)]
x86: config: Reflect the name changes of LPC TPM configs

The new name is more aligned with Linux kernel's naming of TPM driver.

Signed-off-by: Tom Wai-Hong Tam <waihong@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
11 years agotpm: Rename generic_lpc_tpm to tpm_tis_lpc
Che-liang Chiou [Fri, 12 Apr 2013 11:04:34 +0000 (11:04 +0000)]
tpm: Rename generic_lpc_tpm to tpm_tis_lpc

The new name is more aligned with Linux kernel's naming of TPM driver.

Signed-off-by: Peter Huewe <peter.huewe@infineon.com>
Signed-off-by: Che-Liang Chiou <clchiou@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Tom Wai-Hong Tam <waihong@chromium.org>
11 years agocmd_sf: Add print mesgs on sf read/write commands
Jagannadha Sutradharudu Teki [Sun, 26 May 2013 09:22:52 +0000 (14:52 +0530)]
cmd_sf: Add print mesgs on sf read/write commands

This patch adds a print messages while using 'sf read' and
'sf write' commands to make sure that how many bytes read/written
from/into flash device.

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
Acked-by: Tom Rini <trini@ti.com>
11 years agocmd_sf: Add print mesg for 'sf erase' command
Jagannadha Sutradharudu Teki [Sat, 25 May 2013 20:05:21 +0000 (01:35 +0530)]
cmd_sf: Add print mesg for 'sf erase' command

This patch adds a print messages while using 'sf erase' command
to make sure that how many bytes erased in flash device.

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
Acked-by: Tom Rini <trini@ti.com>
11 years agosf: Fix sf read for memory-mapped SPI flashes
Jagannadha Sutradharudu Teki [Mon, 27 May 2013 10:14:14 +0000 (10:14 +0000)]
sf: Fix sf read for memory-mapped SPI flashes

Missing return after memcpy is done for memory-mapped SPI flashes,
hence added retun 0 after memcpy done.

The return is missing in below patch
"sf: Enable FDT-based configuration and memory mapping"
(sha1: bb8215f437a7c948eec82a6abe754c226978bd6d)

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
Acked-by: Simon Glass <sjg@chromium.org>
11 years agospi: exynos: Support SPI_PREAMBLE mode
Rajeshwari Shinde [Tue, 28 May 2013 20:10:38 +0000 (20:10 +0000)]
spi: exynos: Support SPI_PREAMBLE mode

Support interfaces with a preamble before each received message.

We handle this when the client has requested a SPI_XFER_END, meaning
that we must close of the transaction. In this case we read until we
see the preamble (or a timeout occurs), skipping all data before and
including the preamble. The client will receive only data bytes after
the preamble.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Rajeshwari Shinde <rajeshwari.s@samsung.com>
Reviewed-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
11 years agospi: Add support for preamble bytes
Rajeshwari Shinde [Tue, 28 May 2013 20:10:37 +0000 (20:10 +0000)]
spi: Add support for preamble bytes

A SPI slave may take time to react to a request. For SPI flash devices
this time is defined as one bit time, or a whole byte for 'fast read'
mode.

If the SPI slave is another CPU, then the time it takes to react may
vary. It is convenient to allow the slave device to tag the start of
the actual reply so that the host can determine when this 'preamble'
finishes and the actual message starts.

Add a preamble flag to the available SPI flags. If supported by the
driver then it will ignore any received bytes before the preamble
on each transaction. This ensures that reliable communication with
the slave is possible.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Rajeshwari Shinde <rajeshwari.s@samsung.com>
Reviewed-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
11 years agoMerge branch 'master' of git://git.denx.de/u-boot-nand-flash
Tom Rini [Fri, 31 May 2013 22:28:47 +0000 (18:28 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-nand-flash

11 years agomtd: resync with Linux-3.7.1
Sergey Lapin [Mon, 14 Jan 2013 03:46:50 +0000 (03:46 +0000)]
mtd: resync with Linux-3.7.1

This patch is essentially an update of u-boot MTD subsystem to
the state of Linux-3.7.1 with exclusion of some bits:

- the update is concentrated on NAND, no onenand or CFI/NOR/SPI
flashes interfaces are updated EXCEPT for API changes.

- new large NAND chips support is there, though some updates
have got in Linux-3.8.-rc1, (which will follow on top of this patch).

To produce this update I used tag v3.7.1 of linux-stable repository.

The update was made using application of relevant patches,
with changes relevant to U-Boot-only stuff sticked together
to keep bisectability. Then all changes were grouped together
to this patch.

Signed-off-by: Sergey Lapin <slapin@ossfans.org>
[scottwood@freescale.com: some eccstrength and build fixes]
Signed-off-by: Scott Wood <scottwood@freescale.com>
11 years agoarm: factorize relocate_code routine
Albert ARIBAUD [Sun, 19 May 2013 01:48:15 +0000 (01:48 +0000)]
arm: factorize relocate_code routine

Replace all relocate_code routines from ARM start.S files
with a single instance in file arch/arm/lib/relocate.S.
For PXA, this requires moving the dcache unlocking code
from within relocate_code into c_runtime_cpu_setup.

Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
Reviewed-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Tested-by: Simon Glass <sjg@chromium.org>
11 years agoarm: do not compile relocate_code() for SPL builds
Albert ARIBAUD [Sun, 19 May 2013 01:48:14 +0000 (01:48 +0000)]
arm: do not compile relocate_code() for SPL builds

Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
Reviewed-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Tested-by: Simon Glass <sjg@chromium.org>
11 years agotx25: copy SPL directly, not using relocate_code.
Albert ARIBAUD [Sun, 19 May 2013 01:48:13 +0000 (01:48 +0000)]
tx25: copy SPL directly, not using relocate_code.

Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
Reviewed-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Tested-by: Simon Glass <sjg@chromium.org>
11 years agomx31pdk: copy SPL directly, not using relocate_code.
Albert ARIBAUD [Sun, 19 May 2013 01:48:12 +0000 (01:48 +0000)]
mx31pdk: copy SPL directly, not using relocate_code.

Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
Reviewed-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Tested-by: Simon Glass <sjg@chromium.org>
11 years agoMerge branch 'u-boot/master' into 'u-boot-arm/master'
Albert ARIBAUD [Thu, 30 May 2013 12:45:06 +0000 (14:45 +0200)]
Merge branch 'u-boot/master' into 'u-boot-arm/master'

Conflicts:
common/cmd_fpga.c
drivers/usb/host/ohci-at91.c

11 years agotegra: Define CONFIG_SKIP_LOWLEVEL_INIT for SPL build
Axel Lin [Tue, 21 May 2013 13:45:18 +0000 (13:45 +0000)]
tegra: Define CONFIG_SKIP_LOWLEVEL_INIT for SPL build

Then we can get rid of the #ifdef CONFIG_TEGRA guard in cpu_init_crit.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Tested-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
11 years agoARM: arm720t: Add missing CONFIG_SKIP_LOWLEVEL_INIT guard for cpu_init_crit
Axel Lin [Tue, 21 May 2013 13:44:10 +0000 (13:44 +0000)]
ARM: arm720t: Add missing CONFIG_SKIP_LOWLEVEL_INIT guard for cpu_init_crit

cpu_init_crit() can be skipped, but the code is still enabled requiring a
platform to supply lowlevel_init().

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Tested-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
11 years agoARM: tegra: support SKU 7 of Tegra20
Stephen Warren [Fri, 17 May 2013 14:10:15 +0000 (14:10 +0000)]
ARM: tegra: support SKU 7 of Tegra20

Make U-Boot aware of the Tegra20 SKU 7, and treat it identically
to any other Tegra20.

My Whistler board has a SoC with this SKU.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
11 years agoARM: tegra: support SKU 1 of Tegra114
Stephen Warren [Fri, 17 May 2013 14:10:14 +0000 (14:10 +0000)]
ARM: tegra: support SKU 1 of Tegra114

Make U-Boot aware of the Tegra114 SKU 1, and treat it identically
to any other Tegra114.

This value is used on (at least some) Dalmore boards with a production
rather than engineering chip. Such boards are in the hands of some
partners who want to use upstream U-Boot.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
11 years agotegra: always build u-boot-nodtb-tegra.bin
Stephen Warren [Tue, 14 May 2013 08:00:53 +0000 (08:00 +0000)]
tegra: always build u-boot-nodtb-tegra.bin

Even when eventually building u-boot-dtb-tegra.bin, separately building
u-boot-nodtb-tegra.bin can be useful, since building it encapsulates the
SPL padding step. If you want to tweak u-boot.dtb and regenerate
u-boot-dtb-tegra.bin, it is then a simple cat operation.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
11 years agoTegra: clk: always use find_best_divider() for periph clocks
Allen Martin [Fri, 10 May 2013 16:56:55 +0000 (16:56 +0000)]
Tegra: clk: always use find_best_divider() for periph clocks

When adjusting peripheral clocks always use find_best_divider()
instead of clk_get_divider() even when a secondary divider is not
available.  In the case where is requested clock is too slow to be
derived from the parent clock this allows a best effort to get close
to the requested clock.

This comes up for commands like "sf" where the user can pass a clock
speed on the command line or "sspi" where the clock is hardcoded to
1MHz, but the Tegra114 SPI controller can't go that low.

Signed-off-by: Allen Martin <amartin@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
11 years agoTegra: Remove unused/non-existent spl linker script reference
Tom Warren [Wed, 17 Apr 2013 15:24:57 +0000 (08:24 -0700)]
Tegra: Remove unused/non-existent spl linker script reference

Tegra builds use the common u-boot-spl.lds now.

Signed-off-by: Tom Warren <twarren@nvidia.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
11 years agoTegra: T30: Beaver: Fix board/board_name env vars, s/b beaver, not cardhu
Tom Warren [Tue, 16 Apr 2013 22:57:51 +0000 (15:57 -0700)]
Tegra: T30: Beaver: Fix board/board_name env vars, s/b beaver, not cardhu

Did a 'strings u-boot-dtb-tegra.bin | less' and saw that both
board and board_name == beaver. Didn't test as I have no T30
Beaver board here.

Signed-off-by: Tom Warren <twarren@nvidia.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Tested-by: Stephen Warren <swarren@nvidia.com>
11 years agosf: winbond: Add support for W25PXX SPI flash
Kuo-Jung Su [Thu, 23 May 2013 15:09:49 +0000 (15:09 +0000)]
sf: winbond: Add support for W25PXX SPI flash

Add support for Winbond's W25PXX SPI flash.
These devices is used on Faraday A369 evaluation board.

Signed-off-by: Kuo-Jung Su <dantesu@faraday-tech.com>
CC: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
CC: Tom Rini <trini@ti.com>
Reviewed-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
11 years agosf: winbond: Add support for W25Q256
Jagannadha Sutradharudu Teki [Sat, 23 Feb 2013 01:39:01 +0000 (01:39 +0000)]
sf: winbond: Add support for W25Q256

Add support for Winbond W25Q256 SPI flash.

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
Reviewed-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
11 years agosf: spansion: Add Spansion S25FL064P IDs
Marek Vasut [Tue, 28 Aug 2012 15:13:37 +0000 (15:13 +0000)]
sf: spansion: Add Spansion S25FL064P IDs

This is a S25FL064A successor. It supports up to 104MHz bus
speed.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Heiko Schocher <hs@denx.de>
Cc: Mike Frysinger <vapier@gentoo.org>
Cc: Scott Wood <scottwood@freescale.com>
Cc: Wolfgang Denk <wd@denx.de>
Reviewed-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
11 years agopowerpc/mpc85xx: Clear L1 D-cache lock
York Sun [Fri, 5 Apr 2013 13:07:13 +0000 (13:07 +0000)]
powerpc/mpc85xx: Clear L1 D-cache lock

dcbi instruction has been used to clear D-cache lock. However, the cache
lock is persistent for e6500 core. Use dcblc to clear the lock explicitly.

Signed-off-by: York Sun <yorksun@freescale.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>