project/bcm63xx/u-boot.git
11 years agoimx: Add useful fuse definitions
Benoît Thébaudeau [Tue, 23 Apr 2013 10:17:39 +0000 (10:17 +0000)]
imx: Add useful fuse definitions

Define the UID (SoC unique ID) fuses, and the fuses available for the user.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
11 years agoimx: Homogenize and fix fuse register definitions
Benoît Thébaudeau [Tue, 23 Apr 2013 10:17:38 +0000 (10:17 +0000)]
imx: Homogenize and fix fuse register definitions

IIM:
 - Homogenize prg_p naming (the reference manuals are not always self-consistent
   for that).
 - Add missing SCSx and bank registers.
 - Fix the number of banks on i.MX53.

OCOTP:
 - Rename iim to ocotp in order to avoid confusion.
 - Rename fuse_data to read_fuse_data, and sticky to sw_sticky, according to the
   reference manual.
 - Merge the existing spinoff gp1 fuse definition on i.MX6.
 - Fix the number of banks on i.MX6.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Acked-by: Stefano Babic <sbabic@denx.de>
11 years agomx23: Put back RAM voltage level to its original value
Fabio Estevam [Fri, 26 Apr 2013 06:01:26 +0000 (06:01 +0000)]
mx23: Put back RAM voltage level to its original value

commit 5c2f444c9 (mxs: Reset the EMI block on mx23) changed the DDR voltage
level, which causes mx23evk to fail to load a kernel.

Put back the original values, so that mx23evk can boot a kernel again.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Tested-by: Robert Nelson <robertcnelson@gmail.com>
11 years agomx53ard: Rework default environment to support FDT, MMC and netboot
Otavio Salvador [Wed, 24 Apr 2013 11:23:28 +0000 (11:23 +0000)]
mx53ard: Rework default environment to support FDT, MMC and netboot

This reworks the environment settings to be aligned with the other
i.MX boards. The loadaddr has been changed to allow the Freescale
kernel and mainline kernel to work without environment changes.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Acked-by: Fabio Estevam <fabio.estevam@freescale.com>
11 years agomxs: mxsboot: Move sdcard BCB header to 4 sectors offset
Otavio Salvador [Wed, 24 Apr 2013 11:23:27 +0000 (11:23 +0000)]
mxs: mxsboot: Move sdcard BCB header to 4 sectors offset

The MX23 Boot ROM does blindly load from 2048 offset while the MX28
does parse the BCB header to known where to load the image from. We
move the BCB header to 4 sectors offset so same code can be used by
both SoCs avoiding code duplication.

This idea was given by Marek Vasut <marex@denx.de>

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Tested-by: Fabio Estevam <fabio.estevam@freescale.com>
Tested-by: Marek Vasut <marex@denx.de>
11 years agomx53ard: Move register masks into imx-regs.h
Fabio Estevam [Wed, 24 Apr 2013 14:44:27 +0000 (14:44 +0000)]
mx53ard: Move register masks into imx-regs.h

imx-regs.h is more appropriate location for containing register masks.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Marek Vasut <marex@denx.de>
11 years agomx5: Select CONFIG_REVISION_TAG
Fabio Estevam [Wed, 24 Apr 2013 14:44:26 +0000 (14:44 +0000)]
mx5: Select CONFIG_REVISION_TAG

FSL 2.6.35 kernel expects that revision tag is passed by the bootloader.

Select CONFIG_REVISION_TAG so that mx53 boards can work properly with 2.6.35.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Marek Vasut <marex@denx.de>
11 years agomx5: Define a common get_board_rev()
Fabio Estevam [Wed, 24 Apr 2013 14:44:25 +0000 (14:44 +0000)]
mx5: Define a common get_board_rev()

When booting a FSL kernel based on 2.6.35 it is necessary to pass the revision
tag to the kernel.

Place a common weak function into soc.c for such purpose.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Marek Vasut <marex@denx.de>
11 years agomx51evk: Do not force the rootfs type
Fabio Estevam [Fri, 19 Apr 2013 11:04:37 +0000 (11:04 +0000)]
mx51evk: Do not force the rootfs type

Currently mmcrootfstype is set to ext3 type.

It is better not to force it in the env vars, because users may prefer a
different file system type, so let's get rid of 'mmcrootfstype'.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Otavio Salvador <otavio@ossystems.com.br>
11 years agomx51evk: Update environment in order to allow booting a dt kernel
Fabio Estevam [Fri, 19 Apr 2013 11:04:36 +0000 (11:04 +0000)]
mx51evk: Update environment in order to allow booting a dt kernel

Update the environment as done in other imx boards to allow easy switching
between booting a non-dt kernel and a dt kernel.

Change CONFIG_LOADADDR to 0x92000000, so that we can have the:

- uImage at 0x92000000
- imx51-babbage.dtb at 0x91000000

,which are adequate locations in RAM to avoid overlapping.

Boot tested the following kernels:

- 2.6.35 from FSL (11.09 branch)
- 3.9-rc7 non-dt
- 3.9-rc7 dt

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Otavio Salvador <otavio@ossystems.com.br>
11 years agowandboard: Add boot selection support
Otavio Salvador [Fri, 19 Apr 2013 03:42:03 +0000 (03:42 +0000)]
wandboard: Add boot selection support

Adds support for 'bmode' command which let user to choose where to
boot from; this allows U-Boot to load system from another storage
without messing with jumpers.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
11 years agowandboard: Add support for Carrier Board MicroSD card
Otavio Salvador [Fri, 19 Apr 2013 03:42:02 +0000 (03:42 +0000)]
wandboard: Add support for Carrier Board MicroSD card

Allow use of the carrier board MicroSD card available in the
Wandboard; this allow for loading alternative system from the other
card for testing or upgrade proposes.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
11 years agowandboard: Add card detection for SOM MicroSD card
Otavio Salvador [Fri, 19 Apr 2013 03:42:01 +0000 (03:42 +0000)]
wandboard: Add card detection for SOM MicroSD card

This add support to identify if the card is connected or not; so it
does not try to communicate with the controller if no card is
available.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
11 years agowandboard: Add update_sd_firmware support
Otavio Salvador [Fri, 19 Apr 2013 03:42:00 +0000 (03:42 +0000)]
wandboard: Add update_sd_firmware support

This allow for easy update of firmware in the SD card from a running
U-Boot.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
11 years agowandboard: Use env storage info for mmcdev/mmcpart
Otavio Salvador [Fri, 19 Apr 2013 03:41:59 +0000 (03:41 +0000)]
wandboard: Use env storage info for mmcdev/mmcpart

This makes environment and mmcdev/mmcpart in sync with SYS_MMC_ENV_DEV
and SYS_MMC_ENV_PART settings.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
11 years agomx6qsabresd: Return status when initializing MMC
Otavio Salvador [Fri, 19 Apr 2013 03:41:58 +0000 (03:41 +0000)]
mx6qsabresd: Return status when initializing MMC

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
11 years agomx6qsabre{sd, auto}: Add update_sd_firmware support
Otavio Salvador [Fri, 19 Apr 2013 03:41:57 +0000 (03:41 +0000)]
mx6qsabre{sd, auto}: Add update_sd_firmware support

This allow for easy update of firmware in the SD card from a running
U-Boot.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
11 years agonitrogen6x: Setup CCM_CCOSR register
Fabio Estevam [Wed, 17 Apr 2013 13:09:56 +0000 (13:09 +0000)]
nitrogen6x: Setup CCM_CCOSR register

CKO1 drives sgtl5000 codec clock on nitrogen boards and wandboard.

Doing this setup in the bootloader will allow us to remove a lot of code in
arch/arm/mach-imx/mach-imx6q.c from the mainline kernel.

Also, according to Eric Nelson: "enabling the clock <in the bootloader> will
remove squeal after an ungraceful reboot (watchdog) if hooked up to speakers."

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
11 years agoimx: mx6q_4x_mt41j128.cfg: Setup CCM_CCOSR register
Fabio Estevam [Wed, 17 Apr 2013 08:33:26 +0000 (08:33 +0000)]
imx: mx6q_4x_mt41j128.cfg: Setup CCM_CCOSR register

Setup CCM_CCOSR register to provide a CKO1 clock frequency of 16.5 MHz.

CKO1 drives sgtl5000 codec clock on mx6qsabrelite and doing this setup in the
bootloader will allow us to remove a lot of code in arch/arm/mach-imx/mach-imx6q.c
from the mainline kernel.

mx6q_4x_mt41j128.cfg is also used by mx6qsabresd, and it is safe to use it for
this board as well.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
11 years agomx35 iomux: correct input select register index
Philip Paeps [Wed, 17 Apr 2013 04:39:27 +0000 (04:39 +0000)]
mx35 iomux: correct input select register index

Prior to this fix, calls to mxc_iomux_set_input() for registers
after MUX_IN_GPIO2_IN_19 would write to the wrong registers,
possibly resulting in unexpected behaviour.

Signed-off-by: Philip Paeps <philip@paeps.cx>
11 years agoarm: imx: Codingstyle enhancement of include/asm/arch-mx6/crm_regs.h
Stefan Roese [Wed, 10 Apr 2013 23:39:28 +0000 (23:39 +0000)]
arm: imx: Codingstyle enhancement of include/asm/arch-mx6/crm_regs.h

Add spaces before and after "<<".

Please note that I intentionally didn't wrap the > 80 lines for
the sake of better readability.

Signed-off-by: Stefan Roese <sr@denx.de>
11 years agoimx: Add titanium board support (i.MX6 based)
Stefan Roese [Wed, 17 Apr 2013 00:32:43 +0000 (00:32 +0000)]
imx: Add titanium board support (i.MX6 based)

Titanium is a i.MX6 based board from ProjectionDesign / Barco. This
patch adds support for this board with the newly introduced NAND
support for i.MX6.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
11 years agomtd: mxs_nand: Add support for i.MX6
Stefan Roese [Mon, 15 Apr 2013 21:14:12 +0000 (21:14 +0000)]
mtd: mxs_nand: Add support for i.MX6

Signed-off-by: Stefan Roese <sr@denx.de>
Acked-by: Scott Wood <scottwood@freescale.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
11 years agodma: Add i.MX6 support to drivers/dma/apbh_dma.c
Stefan Roese [Tue, 9 Apr 2013 21:06:09 +0000 (21:06 +0000)]
dma: Add i.MX6 support to drivers/dma/apbh_dma.c

This will be used by the i.MX6 NAND support.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
11 years agoimx: Move some i.MX common functions into the imx-common directory
Stefan Roese [Tue, 9 Apr 2013 21:06:08 +0000 (21:06 +0000)]
imx: Move some i.MX common functions into the imx-common directory

This patch moves the following functions into the imx-common
directory:

- mxs_wait_mask_set()
- mxs_wait_mask_clr()
- mxs_reset_block()

These are currently used by i.MX28. But the upcoming GPMI NAND port
for i.MX6 will also use these functions. So lets move them to a
common location to re-use them.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
11 years agoimx: Move some header files from arch-mxs to imx-common
Stefan Roese [Tue, 9 Apr 2013 21:06:07 +0000 (21:06 +0000)]
imx: Move some header files from arch-mxs to imx-common

The following headers are moved to a i.MX common location:

- regs-common.h
- regs-apbh.h
- regs-bch.h
- regs-gpmi.h
- dma.h

This way this header can be re-used also by other i.MX platforms.
For example the i.MX6 which will need it for the upcoming NAND
support.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
11 years agomx6sl: Add initial support for mx6slevk board
Fabio Estevam [Wed, 10 Apr 2013 09:32:58 +0000 (09:32 +0000)]
mx6sl: Add initial support for mx6slevk board

mx6slevk board is a development board from Freescale based on the mx6 solo-lite
processor.

For details about mx6slevk, please refer to:
http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=IMX6SLEVK&parentCode=i.MX6SL&fpsp=1

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
11 years agomx6: Add solo-lite variant support
Fabio Estevam [Wed, 10 Apr 2013 09:32:57 +0000 (09:32 +0000)]
mx6: Add solo-lite variant support

mx6 solo-lite is another member of the mx6 series.

For more information about mx6 solo-lite, please visit:
http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=i.MX6SL&nodeId=018rH3ZrDRB24A

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
11 years agoiomux-v3: Place pad control definitions into common file
Fabio Estevam [Wed, 10 Apr 2013 09:32:56 +0000 (09:32 +0000)]
iomux-v3: Place pad control definitions into common file

Instead of having the same PAD control definition in each MX6 variant pin file,
place it into a common location.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
11 years agoMerge branch 'next'
Stefano Babic [Sun, 21 Apr 2013 09:32:19 +0000 (11:32 +0200)]
Merge branch 'next'

11 years agoARM: mx6: define CONFIG_ARM_ERRATA_742230
Shawn Guo [Tue, 16 Apr 2013 04:58:47 +0000 (04:58 +0000)]
ARM: mx6: define CONFIG_ARM_ERRATA_742230

The ARM errata 742230 - "ARM errata: DMB operation may be faulty" is
claimed for Cortex-A9 (r1p0..r2p2).  Though i.MX6 uses a newer revision
than r2p2, we are seeing a reboot failure on i.MX6 SMP build that can be
fixed by applying the workaround for this errata.  So for safety, let's
define CONFIG_ARM_ERRATA_742230 to enable the workaround on i.MX6.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
11 years agoexynos: fdt: Add TMU node for snow
Simon Glass [Sat, 13 Apr 2013 04:26:42 +0000 (04:26 +0000)]
exynos: fdt: Add TMU node for snow

Snow is missing a TMU node, and with TMU support this is not allowed, so it
fails to boot. Add it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
11 years agoexynos: Correct use of 64-bit division
Simon Glass [Sat, 13 Apr 2013 04:26:41 +0000 (04:26 +0000)]
exynos: Correct use of 64-bit division

The current code is causing errors like this on my toolchains:

/usr/x86_64-pc-linux-gnu/armv7a-cros-linux-gnueabi/binutils-bin/2.22/
ld.bfd.real: failed to merge target specific data of file /usr/lib/gcc/
armv7a-cros-linux-gnueabi/4.7.x-google/libgcc.a(_divdi3.o)

Use do_div() to avoid this.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
11 years agoExynos5: Add support for USB download boot mode
Vivek Gautam [Mon, 28 Jan 2013 00:39:59 +0000 (00:39 +0000)]
Exynos5: Add support for USB download boot mode

Exynos5250 supports secondary USB device boot mode. If the iROM fails
to download u-boot from the primary boot device (such as SD or eMMC),
it will try to retrieve from the secondary boot device (such as USB).

Signed-off-by: Naveen Krishna Ch <ch.naveen@samsung.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com>
Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
11 years agoarm: imx: Change iomux functions to void type
Stefan Roese [Wed, 10 Apr 2013 23:06:46 +0000 (23:06 +0000)]
arm: imx: Change iomux functions to void type

They never return anything also than 0, so lets change the function
to void instead.

Signed-off-by: Stefan Roese <sr@denx.de>
Reviewed-by: Marek Vasut <marex@denx.de>
11 years agomx28evk: add trimffs to nand command
Eric Benard [Mon, 8 Apr 2013 08:59:28 +0000 (08:59 +0000)]
mx28evk: add trimffs to nand command

this is usefull when writing an UBI image which contains
and UBIFS volume (check README.nand and UBI FAQ for more details)

Signed-off-by: Eric Bénard <eric@eukrea.com>
Acked-by: Otavio Salvador <otavio@ossystems.com.br>
11 years agomx35 iomux: correct offsets of IOMUX registers
Philip Paeps [Tue, 9 Apr 2013 12:44:31 +0000 (12:44 +0000)]
mx35 iomux: correct offsets of IOMUX registers

This makes mxc_iomux_set_input() work correctly.  Previously, the
incorrect offset of IOMUXSW_INPUT_CTL caused mxc_iomux_set_input()
to write to the wrong register, possibly resulting in unexpected
behaviour.

Signed-off-by: Philip Paeps <philip@paeps.cx>
Acked-by: Stefano Babic <sbabic@denx.de>
11 years agoTegra: T30: Beaver board support.
Tom Warren [Fri, 12 Apr 2013 18:20:51 +0000 (11:20 -0700)]
Tegra: T30: Beaver board support.

Beaver is a Tegra30 board that is nearly 100% compatible w/Cardhu.
Add a Beaver build so it can begin to be differentiated, if need be.

Signed-off-by: Tom Warren <twarren@nvidia.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
11 years agoTegra: Split tegra_get_chip_type() into soc & sku funcs
Tom Warren [Wed, 10 Apr 2013 17:32:32 +0000 (10:32 -0700)]
Tegra: Split tegra_get_chip_type() into soc & sku funcs

As suggested by Stephen Warren, use tegra_get_chip() to return
the pure CHIPID for a Tegra SoC (i.e. 0x20 for Tegra20, 0x30 for
Tegra30, etc.) and rename tegra_get_chip_type() to reflect its true
function, i.e. tegra_get_chip_sku(), which returns an ID like
TEGRA_SOC_T25, TEGRA_SOC_T33, etc.

Signed-off-by: Tom Warren <twarren@nvidia.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
11 years agoTegra: Fix MSELECT clock divisors for T30/T114.
Tom Warren [Wed, 3 Apr 2013 21:39:30 +0000 (14:39 -0700)]
Tegra: Fix MSELECT clock divisors for T30/T114.

A comparison of registers between our internal NV U-Boot and
u-boot-tegra/next showed some discrepancies in the MSELECT
clock divisor programming. T20 doesn't have a MSELECT clk src reg.

Signed-off-by: Tom Warren <twarren@nvidia.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
11 years agoTegra114: Initialize System Counter (TSC) with osc frequency
Tom Warren [Mon, 1 Apr 2013 22:48:54 +0000 (15:48 -0700)]
Tegra114: Initialize System Counter (TSC) with osc frequency

T114 needs the SYSCTR0 counter initialized so the TSC can be
read by the kernel. Do it in the bootloader since it's a write-once
deal (secure/non-secure mode dependent).

Signed-off-by: Tom Warren <twarren@nvidia.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
11 years agoTegra: Configure L2 cache control reg properly.
Tom Warren [Mon, 25 Mar 2013 23:22:26 +0000 (16:22 -0700)]
Tegra: Configure L2 cache control reg properly.

Without this change, kernel fails at calling function cache_clean_flush
during kernel early boot.

Aprocryphally, intended for T114 only, so I check for a T114 SoC.
Works (i.e. dalmore 3.8 kernel now starts printing to console).

Signed-off-by: Tom Warren <twarren@nvidia.com>
11 years agoTegra: TEC: Enable boot script support
Thierry Reding [Wed, 3 Apr 2013 04:52:45 +0000 (04:52 +0000)]
Tegra: TEC: Enable boot script support

Boot script support brings TEC in line with other Tegra boards. To
enable booting a Linux kernel with initial ramdisk, also include support
for the new FIT image type.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Tom Warren <twarren@nvidia.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
11 years agoTegra: Plutux: Enable NAND and boot script support
Thierry Reding [Wed, 3 Apr 2013 04:52:44 +0000 (04:52 +0000)]
Tegra: Plutux: Enable NAND and boot script support

Boot script support brings Plutux in line with other Tegra boards. In
order to enable booting a Linux kernel with initial ramdisk, also add
support for the new FIT image type.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Tom Warren <twarren@nvidia.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
11 years agoTegra: Medcom-Wide: Enable NAND and boot script support
Thierry Reding [Wed, 3 Apr 2013 04:52:43 +0000 (04:52 +0000)]
Tegra: Medcom-Wide: Enable NAND and boot script support

Boot script support brings Medcom-Wide in line with other Tegra boards.
In order to enable booting a Linux kernel with initial ramdisk, also add
support for the new FIT image type.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Tom Warren <twarren@nvidia.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
11 years agoTegra: All Tamonten-derived boards use onboard NAND
Thierry Reding [Wed, 3 Apr 2013 04:52:42 +0000 (04:52 +0000)]
Tegra: All Tamonten-derived boards use onboard NAND

Move the nand-controller node to the tegra20-tamonten.dtsi so that it
can be shared between all derived boards.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Tom Warren <twarren@nvidia.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
11 years agoTegra: Restore cp15 VBAR _start vector write for ARMv7
Tom Warren [Thu, 28 Mar 2013 17:03:22 +0000 (10:03 -0700)]
Tegra: Restore cp15 VBAR _start vector write for ARMv7

A start vector fix was added by AneeshV for OMAP4 (commit 0d479b53),
and caused the old monilithic Tegra builds to hang due to an undefined
instruction trap. Previously, the code needed to run on both the
AVP (ARM7TDI) and A9, and the AVP doesn't have a CP15 register.
I corrected this in commit 6d6c0bae w/#ifndef CONFIG_TEGRA, but
now that we use SPL, and boot the AVP w/o any ARMv7 code, I can
revert my change, and make Aneesh's change apply to Tegra.

Signed-off-by: Tom Warren <twarren@nvidia.com>
11 years agoTegra: enable verify support for the crc32 command
Tom Warren [Tue, 26 Mar 2013 17:39:33 +0000 (10:39 -0700)]
Tegra: enable verify support for the crc32 command

Some 3rd-party flash tools use the -v (verify) option of crc32 command.

Signed-off-by: Tom Warren <twarren@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
11 years agoARM: tegra: support T33 SKU of Tegra30
Stephen Warren [Wed, 27 Mar 2013 09:37:02 +0000 (09:37 +0000)]
ARM: tegra: support T33 SKU of Tegra30

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

An alternative would be to simply remove the SKU checking from
tegra_get_chip_type(); most use of the value most likely simply wants
to know the current chip, not the specific SKU. Or, the function could
be split into separate tegra_get_chip() and tegra_get_sku() for the
cases where differentiation really is required.

I wonder whether tegra_get_chip_type() should printf() whenever any
unkown chip/SKU is found, although perhaps the function is called so
early that the printf() wouldn't actually make it to the UART anyway.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
11 years agoARMv7: start.S: stay in HYP mode if u-boot is entered in it
Andre Przywara [Tue, 2 Apr 2013 05:43:36 +0000 (05:43 +0000)]
ARMv7: start.S: stay in HYP mode if u-boot is entered in it

The KVM and Xen hypervisors for the Cortex-A15 virtualization
implementation need to be entered in HYP mode. Should the primary
board firmware already enter HYP mode (Calxeda firmware does that),
we should not deliberately drop back to SVC mode.
Since U-boot does not use the MMU, running in HYP mode is just fine.

Signed-off-by: Andre Przywara <andre.przywara@linaro.org>
11 years agocosmetic: fix CONFIG_SPL_BSS_MAX_SIZE typo in README
Albert ARIBAUD [Sun, 14 Apr 2013 04:48:38 +0000 (04:48 +0000)]
cosmetic: fix CONFIG_SPL_BSS_MAX_SIZE typo in README

Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
11 years agosmdk5250, snow: convert to CONFIG_SPL_MAX_FOOTPRINT
Albert ARIBAUD [Fri, 12 Apr 2013 05:14:33 +0000 (05:14 +0000)]
smdk5250, snow: convert to CONFIG_SPL_MAX_FOOTPRINT

This target wants to check full SPL size, BSS included.
Remove CONFIG_SPL_MAX_SIZE definition and instead define
CONFIG_SPL_MAX_FOOTPRINT.

Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
11 years agoda850evm, da850_am18xxevm: convert to CONFIG_SPL_MAX_FOOTPRINT
Albert ARIBAUD [Fri, 12 Apr 2013 05:14:32 +0000 (05:14 +0000)]
da850evm, da850_am18xxevm: convert to CONFIG_SPL_MAX_FOOTPRINT

This target wants to check full SPL size, BSS included.
Remove CONFIG_SPL_MAX_SIZE definition and instead define
CONFIG_SPL_MAX_FOOTPRINT.

Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
11 years agocam_enc_4xx: convert to CONFIG_SPL_MAX_FOOTPRINT
Albert ARIBAUD [Fri, 12 Apr 2013 05:14:31 +0000 (05:14 +0000)]
cam_enc_4xx: convert to CONFIG_SPL_MAX_FOOTPRINT

This target wants to check full SPL size, BSS included.
Remove CONFIG_SPL_MAX_SIZE definition and instead define
CONFIG_SPL_MAX_FOOTPRINT.

Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
11 years agoARM: fix CONFIG_SPL_MAX_SIZE semantics
Albert ARIBAUD [Fri, 12 Apr 2013 05:14:30 +0000 (05:14 +0000)]
ARM: fix CONFIG_SPL_MAX_SIZE semantics

Remove SPL-related ASSERT() in arch/arm/cpu/u-boot.lds
as this file is never used for SPL builds.

Rewrite the ASSERT() in arch/arm/cpu/u-boot-spl.lds
to separately test image (text,data,rodata...) size,
BSS size, and full footprint each against its own max,
and make Tegra boards check full footprint.

Also, output section mmutable is not used in SPL builds.
Remove it.

Finally, update README regarding the (now homogeneous)
semantics of CONFIG_SPL_[BSS_]MAX_SIZE and add the new
CONFIG_SPL_MAX_FOOTPRINT macro.

Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
Reported-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
11 years agoMerge branch 'u-boot-imx/master' into 'u-boot-arm/master'
Albert ARIBAUD [Sun, 14 Apr 2013 09:45:06 +0000 (11:45 +0200)]
Merge branch 'u-boot-imx/master' into 'u-boot-arm/master'

11 years agofsl_esdhc: Fix DMA transfer completion waiting loop
Andrew Gabbasov [Sun, 7 Apr 2013 23:06:08 +0000 (23:06 +0000)]
fsl_esdhc: Fix DMA transfer completion waiting loop

Rework the waiting for transfer completion loop condition
to continue waiting until both Transfer Complete and DMA End
interrupts occur. Checking of DLA bit in Present State register
looks not needed in addition to interrupts status checking,
so it can be removed from the condition. Also, DMA Error
condition is added to the list of data errors, checked in the loop.

Signed-off-by: Andrew Gabbasov <andrew_gabbasov@mentor.com>
11 years agofsl_esdhc: flush cache after IO completion
Eric Nelson [Wed, 3 Apr 2013 12:31:56 +0000 (12:31 +0000)]
fsl_esdhc: flush cache after IO completion

The cache should invalidate the read buffer for
the SD card interface after the transfer complete,
not command-complete.

Tested-by: Andrew Gabbasov <Andrew_Gabbasov@mentor.com>
Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
11 years agoMerge branch 'u-boot-imx/master' into 'u-boot-arm/master'
Albert ARIBAUD [Sun, 14 Apr 2013 08:38:37 +0000 (10:38 +0200)]
Merge branch 'u-boot-imx/master' into 'u-boot-arm/master'

11 years agoARM: Fix __bss_start and __bss_end in linker scripts
Albert ARIBAUD [Thu, 11 Apr 2013 05:43:21 +0000 (05:43 +0000)]
ARM: Fix __bss_start and __bss_end in linker scripts

Commit 3ebd1cbc introduced compiler-generated __bss_start
and __bss_end__ and commit c23561e7 rewrote all __bss_end__
as __bss_end. Their merge caused silent and harmless but
potentially bug-inducing clashes between compiler- and linker-
generated __bss_end symbols.

Make __bss_end and __bss_start compiler-only, and create
__bss_base and __bss_limit for linker-only use.

Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
Reported-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
11 years agospi: mxc_spi: Set master mode for all channels
Fabio Estevam [Tue, 9 Apr 2013 13:06:25 +0000 (13:06 +0000)]
spi: mxc_spi: Set master mode for all channels

The glitch in the SPI clock line, which commit 3cea335c34 (spi: mxc_spi: Fix spi
clock glitch durant reset) solved, is back now and itwas re-introduced by
commit d36b39bf0d (spi: mxc_spi: Fix ECSPI reset handling).

Actually the glitch is happening due to always toggling between slave mode
and master mode by configuring the CHANNEL_MODE bits in this reset function.

Since the spi driver only supports master mode, set the mode for all channels
always to master mode in order to have a stable, "glitch-free" SPI clock line.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
11 years agomx6qsabre{sd, auto}: Fix environment as 'mmc rescan' takes no arguments
Otavio Salvador [Wed, 10 Apr 2013 16:55:50 +0000 (16:55 +0000)]
mx6qsabre{sd, auto}: Fix environment as 'mmc rescan' takes no arguments

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Acked-by: Fabio Estevam <fabio.estevam@freescale.com>
11 years agoBUGFIX: arm: data abort in get_bad_stack_swi
Tetsuyuki Kobayashi [Fri, 5 Apr 2013 00:12:51 +0000 (00:12 +0000)]
BUGFIX: arm: data abort in get_bad_stack_swi

When swi instruction is executed, it is expected to get message
"software interrupt" in console and dump registers and reboot, as
do_software_interrupt() in arch/arm/lib/interrupts.c.
But, actually it causes data abort accessing wrong address in get_bad_stack_swi
macro in arch/arm/cpu/v7/start.S.
This patch fixes this problem.

The same mistake in arch/arm/cpu/{arm1136,arm1176,pxa}/start.S.

Signed-off-by: Tetsuyuki Kobayashi <koba@kmckk.co.jp>
11 years agoMerge branch 'u-boot-ti/master' into 'u-boot-arm/master'
Albert ARIBAUD [Sat, 13 Apr 2013 07:39:29 +0000 (09:39 +0200)]
Merge branch 'u-boot-ti/master' into 'u-boot-arm/master'

11 years agointegrator: enable device tree
Linus Walleij [Wed, 3 Apr 2013 19:19:20 +0000 (19:19 +0000)]
integrator: enable device tree

This enables the device tree library on the Integrator platforms
so we can pass a device tree when booting.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
11 years agoVCMA9: Enable CONFIG_CMD_NAND_YAFFS
Tom Rini [Tue, 5 Mar 2013 05:54:05 +0000 (05:54 +0000)]
VCMA9: Enable CONFIG_CMD_NAND_YAFFS

As this board has NAND and supports YAFFS2, add CONFIG_MD_NAND_YAFFS

Cc: David Müller <d.mueller@elsoft.ch>
Signed-off-by: Tom Rini <trini@ti.com>
Acked-by: David Müller <d.mueller@elsoft.ch>
11 years agoMerge branch 'u-boot/master' into 'u-boot-arm/master'
Albert ARIBAUD [Fri, 12 Apr 2013 20:07:57 +0000 (22:07 +0200)]
Merge branch 'u-boot/master' into 'u-boot-arm/master'

Conflicts:
drivers/video/exynos_fb.c

11 years agoomap5_common.h: Switch to ext4
Tom Rini [Thu, 11 Apr 2013 08:01:42 +0000 (08:01 +0000)]
omap5_common.h: Switch to ext4

ext3 should not be used on SD cards, so use ext4 instead.

Cc: Sricharan R <r.sricharan@ti.com>
Signed-off-by: Tom Rini <trini@ti.com>
11 years agoomap3: Display MHz instead of mHz on the console
man.huber@arcor.de [Wed, 10 Apr 2013 12:12:17 +0000 (12:12 +0000)]
omap3: Display MHz instead of mHz on the console

The processor is hopefully running with M(ega)Hz and not with m(illi)Hz.

Signed-off-by: Manfred Huber <man.huber@arcor.de>
11 years agoam335x: Really correct DDR timings on new BeagleBone part
Tom Rini [Fri, 12 Apr 2013 16:38:16 +0000 (12:38 -0400)]
am335x: Really correct DDR timings on new BeagleBone part

The previous timings were done on the internal-only A1 board which has
different DDR part than all later revs.  The timings need a slight
adjustment to be correct in all cases with later revs.

Signed-off-by: Tom Rini <trini@ti.com>
11 years agoarm/km: add support for kmsuv31 board
Holger Brunck [Tue, 15 Jan 2013 22:51:22 +0000 (22:51 +0000)]
arm/km: add support for kmsuv31 board

This board is from a u-boot point of view a mixture between kmnusa and
a standard km_kirkwood board. We have our u-boot environment in the spi
NOR flash, but we have a direct connection between the kirkwood and the
piggy. A FPGA is connected via the PCIe interface. So we only have to
select the specific features in the board setup.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
cc: Valentin Longchamp <valentin.longchamp@keymile.com>
cc: Prafulla Wadaskar <prafulla@marvell.com>
Acked-By: Prafulla Wadaskar <prafulla@marvell.com>
11 years agoarm/km: use CONFIG_NAND_ECC_BCH
Holger Brunck [Tue, 15 Jan 2013 22:51:21 +0000 (22:51 +0000)]
arm/km: use CONFIG_NAND_ECC_BCH

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

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
cc: Valentin Longchamp <valentin.longchamp@keymile.com>
cc: Prafulla Wadaskar <prafulla@marvell.com>
Acked-By: Prafulla Wadaskar <prafulla@marvell.com>
11 years agoarm/km: rename BOARD_LATE_INIT to CONFIG_BOARD_LATE_INIT
Holger Brunck [Tue, 15 Jan 2013 22:51:20 +0000 (22:51 +0000)]
arm/km: rename BOARD_LATE_INIT to CONFIG_BOARD_LATE_INIT

commit 9660e442 cosmetic: s/BOARD_LATE_INIT/CONFIG_BOARD_LATE_INIT
removes BOARD_LATE_INIT and uses CONFIG_BOARD_LATE_INIT instead.
Therefore we have to use this define.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
cc: Valentin Longchamp <valentin.longchamp@keymile.com>
cc: Prafulla Wadaskar <prafulla@marvell.com>
Acked-by: Prafulla Wadaskar <prafulla@marvell.com>
11 years agokirkwood_nand: allow usage of NAND_ECC_SOFT_BCH
Gerlando Falauto [Tue, 15 Jan 2013 22:34:28 +0000 (22:34 +0000)]
kirkwood_nand: allow usage of NAND_ECC_SOFT_BCH

If CONFIG_NAND_ECC_BCH is set use 4-bit error correction code instead of
the 1-bit error correction code on the NAND device.

Signed-off-by: Gerlando Falauto <gerlando.falauto@keymile.com>
Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
cc: Valentin Longchamp <valentin.longchamp@keymile.com>
cc: Prafulla Wadaskar <prafulla@marvell.com>
Acked-by: Prafulla Wadaskar <prafulla@marvell.com>
Acked-by: Scott Wood <scottwood@freescale.com>
11 years agoMerge branch 'u-boot-ti/master' into 'u-boot-arm/master'
Albert ARIBAUD [Fri, 12 Apr 2013 06:51:41 +0000 (08:51 +0200)]
Merge branch 'u-boot-ti/master' into 'u-boot-arm/master'

11 years agomx31pdk: Remove watchdog support
Fabio Estevam [Tue, 9 Apr 2013 09:03:52 +0000 (09:03 +0000)]
mx31pdk: Remove watchdog support

The conversion of mx31pdk to SPL NAND fixed the boot issue, but we start seeing
resets in loop, which prevents us from reaching the U-boot prompt.

Until the proper fix can be identified, disable watchdog, so that mx31pdk
can be functional again.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Stefano Babic <sbabic@denx.de>
11 years agoarm: Make all linker scripts compatible with per-symbol sections
Benoît Thébaudeau [Thu, 11 Apr 2013 09:36:03 +0000 (09:36 +0000)]
arm: Make all linker scripts compatible with per-symbol sections

Let all ARM linker scripts handle properly -ffunction-sections
and -fdata-sections. This will be useful for future changes in order to create
symbol-specific sections in common .S files.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
11 years agoarm1176: Remove unused MMU setup from start.S
Benoît Thébaudeau [Thu, 11 Apr 2013 09:36:02 +0000 (09:36 +0000)]
arm1176: Remove unused MMU setup from start.S

Following the removal of the smdk6400 board, the MMU setup code in
arm1176/start.S becomes unused, so remove it. It will still be possible to
restore it later from the Git history if necessary, in which case it should be
moved out of the relocate_code() function.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
11 years agoarm: Remove deprecated and now unused NAND SPL
Benoît Thébaudeau [Thu, 11 Apr 2013 09:36:01 +0000 (09:36 +0000)]
arm: Remove deprecated and now unused NAND SPL

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
11 years agoarm: Remove support for unused s3c64xx
Benoît Thébaudeau [Thu, 11 Apr 2013 09:36:00 +0000 (09:36 +0000)]
arm: Remove support for unused s3c64xx

Following the removal of the smdk6400 board, the s3c64xx SoC becomes unused, so
remove associated code. It will still be possible to restore it later from the
Git history if necessary.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
11 years agoRevert "mkconfig: start deprecating Makefile config targets"
Benoît Thébaudeau [Thu, 11 Apr 2013 09:35:59 +0000 (09:35 +0000)]
Revert "mkconfig: start deprecating Makefile config targets"

This reverts commit 1285a2808a254f3d1a809c1a541f0c0f746e03d7 since the migration
of boards from Makefile to boards.cfg is now complete.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
11 years agoarm: Remove support for smdk6400
Benoît Thébaudeau [Thu, 11 Apr 2013 09:35:58 +0000 (09:35 +0000)]
arm: Remove support for smdk6400

The migration of boards from Makefile to boards.cfg was due for v2012.03, but
smdk6400 did not follow, and it does not build, so move it to scrapyard. It will
still be possible to restore it from the Git history before fixing it.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
11 years agoimx: Add u-boot-with-nand-spl.imx make target
Benoît Thébaudeau [Thu, 11 Apr 2013 09:35:57 +0000 (09:35 +0000)]
imx: Add u-boot-with-nand-spl.imx make target

This image combines the SPL with the i.MX header, the FCB and U-Boot.

For i.MX25/35/51, the FCB is ignored by the boot ROM, so this image is just
useful because it can be programmed on a NAND Flash page boundary.

For i.MX53, the FCB is required by the boot ROM.

This does not support i.MX6 so far because its FCB is more complicated.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
11 years agoimx: Add u-boot-with-spl.imx make target
Benoît Thébaudeau [Thu, 11 Apr 2013 09:35:56 +0000 (09:35 +0000)]
imx: Add u-boot-with-spl.imx make target

This image combines the SPL with the i.MX header and U-Boot. This is a
convenient way of having a single image to program on some boot devices.

The i.MX header has to be added to the SPL before appending U-Boot, so that the
boot ROM loads only the SPL.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
11 years ago.gitignore: Add /SPL
Benoît Thébaudeau [Thu, 11 Apr 2013 09:35:55 +0000 (09:35 +0000)]
.gitignore: Add /SPL

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
11 years agoMakefile: Move SHELL setup to config.mk
Benoît Thébaudeau [Thu, 11 Apr 2013 09:35:54 +0000 (09:35 +0000)]
Makefile: Move SHELL setup to config.mk

make never uses the SHELL variable from the environment. Instead, it
uses /bin/sh, or the value assigned to the SHELL variable by the Makefile. This
makes the export of the SHELL variable useless for sub-makes (but still useful
for the environment of recipes). However, we want all makes to use the same
shell.

This patch fixes this issue by moving the SHELL variable setup and export to the
top config.mk, so that all Makefile-s including it use the same shell.

Since BASH is used by default, this makes it possible to use things
like 'echo -e ...' in sub-makes, which would otherwise fail e.g. with /bin/sh
symlinked to /bin/dash on Ubuntu.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Reviewed-by: Tom Rini <trini@ti.com>
11 years agoarm: Remove unused relocate_code() parameters
Benoît Thébaudeau [Thu, 11 Apr 2013 09:35:53 +0000 (09:35 +0000)]
arm: Remove unused relocate_code() parameters

Commit e05e5de7fae5bec79617e113916dac6631251156 made the 2 1st parameters of
ARM's relocate_code() useless since it moved the code handling them to crt0.S.
So, drop these parameters.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
11 years agoarm926ejs: Remove deprecated and now unused NAND SPL
Benoît Thébaudeau [Thu, 11 Apr 2013 09:35:52 +0000 (09:35 +0000)]
arm926ejs: Remove deprecated and now unused NAND SPL

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
11 years agonand: mxc: Switch NAND SPL to generic SPL
Benoît Thébaudeau [Thu, 11 Apr 2013 09:35:51 +0000 (09:35 +0000)]
nand: mxc: Switch NAND SPL to generic SPL

This also fixes support for mx31pdk and tx25, which had been broken by commit
e05e5de7fae5bec79617e113916dac6631251156.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Acked-by: Scott Wood <scottwood@freescale.com>
Tested-by: Fabio Estevam <fabio.estevam@freescale.com>
11 years agoimx: Fix automatic make targets for imx images
Benoît Thébaudeau [Thu, 11 Apr 2013 09:35:50 +0000 (09:35 +0000)]
imx: Fix automatic make targets for imx images

Automatically build the 'u-boot.imx' (i.e. imx header + u-boot.bin) and 'SPL'
(i.e. imx header + u-boot-spl.bin) make targets for all imx processors
supporting this header, so for arm926ejs, arm1136 and armv7. Some combinations
were missing.

At the same time, fix the build of SPL targets not supporting the imx header on
arm1136. For arm1136, the 'SPL' make target was forced to build in all cases if
CONFIG_SPL_BUILD was defined, even for non-imx platforms or imx setups without
an imx header.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
11 years agoMakefile: Change CONFIG_SPL_PAD_TO to image offset
Benoît Thébaudeau [Thu, 11 Apr 2013 09:35:49 +0000 (09:35 +0000)]
Makefile: Change CONFIG_SPL_PAD_TO to image offset

Change CONFIG_SPL_PAD_TO from a link address to an image offset since this is
more handy and closer to the purpose of this config.

Automatically define CONFIG_SPL_PAD_TO to CONFIG_SPL_MAX_SIZE (or 0 without
CONFIG_SPL_MAX_SIZE).

Test that CONFIG_SPL_PAD_TO >= CONFIG_SPL_MAX_SIZE if CONFIG_SPL_PAD_TO is
non-zero.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
11 years agoautoconfig.mk: Make it possible to define configs from other configs
Benoît Thébaudeau [Thu, 11 Apr 2013 09:35:48 +0000 (09:35 +0000)]
autoconfig.mk: Make it possible to define configs from other configs

Give more flexibility to define configs that can be interpreted by make, e.g. to
define fallback values of configs like in the example below.

Before this change, the config lines:
 #define CONFIG_SPL_MAX_SIZE 2048
 #define CONFIG_SPL_PAD_TO CONFIG_SPL_MAX_SIZE
would have been changed in autoconfig.mk into:
 CONFIG_SPL_MAX_SIZE=2048
 CONFIG_SPL_PAD_TO="CONFIG_SPL_MAX_SIZE"

Hence, a make recipe using as an argument to $(OBJCOPY):
 --pad-to=$(CONFIG_SPL_PAD_TO)
would have issued:
 --pad-to="CONFIG_SPL_MAX_SIZE"
which means nothing for $(OBJCOPY) and makes it fail.

Thanks to this change, the config lines above are changed in autoconfig.mk into:
 CONFIG_SPL_MAX_SIZE=2048
 CONFIG_SPL_PAD_TO=$(CONFIG_SPL_MAX_SIZE)

Hence, the make recipe above now issues:
 --pad-to=2048
as expected from the defined config.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Reviewed-by: Tom Rini <trini@ti.com>
11 years agoarm: crt0.S: Remove bogus .globl
Benoît Thébaudeau [Thu, 11 Apr 2013 09:35:47 +0000 (09:35 +0000)]
arm: crt0.S: Remove bogus .globl

The purpose of .globl is to export symbols for ld, not to declare external
symbols.

By the way, use the ENTRY() and ENDPROC() macros to define functions rather than
using .global directly.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
11 years agoarm: relocate_code(): Use __image_copy_end for end of relocation
Benoît Thébaudeau [Thu, 11 Apr 2013 09:35:46 +0000 (09:35 +0000)]
arm: relocate_code(): Use __image_copy_end for end of relocation

Use __image_copy_end instead of __bss_start for the end of the image to
relocate. This is the same as commit 033ca72, but applied to all ARM start.S.

This is a more appropriate symbol naming for an image copy & relocate feature,
and this also saves a useless copy of data put between __image_copy_end and
__bss_start in linker scripts (e.g. relocation information, or MMU
initialization tables used only before jumping to the relocated image).

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
11 years agoarm: relocate_code(): Remove useless relocation offset computation
Benoît Thébaudeau [Thu, 11 Apr 2013 09:35:45 +0000 (09:35 +0000)]
arm: relocate_code(): Remove useless relocation offset computation

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
11 years agoarm1136: Remove redundant relocate_code() return
Benoît Thébaudeau [Thu, 11 Apr 2013 09:35:44 +0000 (09:35 +0000)]
arm1136: Remove redundant relocate_code() return

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
11 years agoarm: relocate_code() is no longer noreturn
Benoît Thébaudeau [Thu, 11 Apr 2013 09:35:43 +0000 (09:35 +0000)]
arm: relocate_code() is no longer noreturn

Commit e05e5de7fae5bec79617e113916dac6631251156 made ARM's relocate_code()
return to its caller, but it did not update its declaration accordingly.

Fixing this function declaration fixes dropped C code following calls to
relocate_code().

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
11 years agoarm: start.S: Fix _TEXT_BASE for SPL
Benoît Thébaudeau [Thu, 11 Apr 2013 09:35:42 +0000 (09:35 +0000)]
arm: start.S: Fix _TEXT_BASE for SPL

_TEXT_BASE must be set to CONFIG_SPL_TEXT_BASE for generic SPL, and to
CONFIG_SYS_TEXT_BASE for non-SPL builds.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Reviewed-by: Tom Rini <trini@ti.com>
11 years agonand: mxc: Use appropriate page number in syndrome functions
Benoît Thébaudeau [Thu, 11 Apr 2013 09:35:41 +0000 (09:35 +0000)]
nand: mxc: Use appropriate page number in syndrome functions

The syndrome functions should use the page number passed as argument instead of
the page number saved upon NAND_CMD_READ0.

This does not make any difference if the NAND_NO_AUTOINCR option is set, but
otherwise this fixes accesses to the wrong pages.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Acked-by: Scott Wood <scottwood@freescale.com>
11 years agonand: mxc: Fix debug trace in mxc_nand_read_oob_syndrome()
Benoît Thébaudeau [Thu, 11 Apr 2013 09:35:40 +0000 (09:35 +0000)]
nand: mxc: Fix debug trace in mxc_nand_read_oob_syndrome()

The page number indicated in the debug trace of mxc_nand_read_oob_syndrome() did
not match the page being worked on.

By the way, replace the GCC-specific __FUNCTION__ with __func__.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Acked-by: Scott Wood <scottwood@freescale.com>