]> code.ossystems Code Review - bsp/u-boot.git/log
bsp/u-boot.git
12 years agosandbox: fs: Add support for saving files to host filesystem
Simon Glass [Sat, 20 Apr 2013 08:42:51 +0000 (08:42 +0000)]
sandbox: fs: Add support for saving files to host filesystem

This allows write of files from the host filesystem in sandbox. There is
currently no concept of overwriting the file and removing its existing
contents - all writing is done on top of what is there. This means that
writing 10 bytes to the start of a 1KB file will only update those 10
bytes, not truncate the file to 10 byte slong.

If the file does not exist it is created.

Signed-off-by: Simon Glass <sjg@chromium.org>
12 years agofs: Add support for saving data to filesystems
Simon Glass [Sat, 20 Apr 2013 08:42:50 +0000 (08:42 +0000)]
fs: Add support for saving data to filesystems

Add a new method for saving that filesystems can implement. This mirrors the
existing load method.

Signed-off-by: Simon Glass <sjg@chromium.org>
12 years agosandbox: Support 'source' command
Simon Glass [Sat, 20 Apr 2013 08:42:49 +0000 (08:42 +0000)]
sandbox: Support 'source' command

Enhance the source command to work with sandbox, by using map_sysmem() to
convert a ulong address into a pointer.

Signed-off-by: Simon Glass <sjg@chromium.org>
12 years agosandbox: Allow -c argument to provide a command list
Simon Glass [Sat, 20 Apr 2013 08:42:48 +0000 (08:42 +0000)]
sandbox: Allow -c argument to provide a command list

This allows passing of entire scripts to sandbox with the -c argument,
which is useful for testing. Commands can be delimited with a newline
or semicolon.

Signed-off-by: Simon Glass <sjg@chromium.org>
12 years agoRevert "fdt- Tell the FDT library where the device tree is"
Simon Glass [Sat, 20 Apr 2013 08:42:47 +0000 (08:42 +0000)]
Revert "fdt- Tell the FDT library where the device tree is"

This reverts commit 3b73459ea3421e9f8c6c8c62e1d3fe458ca5bc56.

In practice it doesn't seem like a good idea to make the the working
FDT point to the control FDT. Now that we can access the control FDT
using the 'fdt' command, there is no need for this feature. Remove it.

Signed-off-by: Simon Glass <sjg@chromium.org>
12 years agofdt: Skip checking FDT if the pointer is NULL
Simon Glass [Sat, 20 Apr 2013 08:42:46 +0000 (08:42 +0000)]
fdt: Skip checking FDT if the pointer is NULL

If we have no FDT, don't attempt to read from it. This allows sandbox to
run without an FDT if required.

Signed-off-by: Simon Glass <sjg@chromium.org>
12 years agosandbox: fdt: Support fdt command for sandbox
Simon Glass [Sat, 20 Apr 2013 08:42:45 +0000 (08:42 +0000)]
sandbox: fdt: Support fdt command for sandbox

By using map_sysmem() we can get the fdt command to work correctly with
sandbox.

Signed-off-by: Simon Glass <sjg@chromium.org>
12 years agofdt: Allow fdt command to check and update control FDT
Simon Glass [Sat, 20 Apr 2013 08:42:44 +0000 (08:42 +0000)]
fdt: Allow fdt command to check and update control FDT

There is an existing fdt command to deal with the working FDT. Enhance this
to support the control FDT also (CONFIG_OF_CONTROL).

Signed-off-by: Simon Glass <sjg@chromium.org>
12 years agoAdd getenv_hex() to return an environment variable as hex
Simon Glass [Sat, 20 Apr 2013 08:42:43 +0000 (08:42 +0000)]
Add getenv_hex() to return an environment variable as hex

This conversion is required in a number of places in U-Boot. Add a
standard function to provide this feature, so we avoid all the different
variations in the way it is coded.

Signed-off-by: Simon Glass <sjg@chromium.org>
12 years agofdt: Add a parameter to fdt_valid()
Simon Glass [Sat, 20 Apr 2013 08:42:42 +0000 (08:42 +0000)]
fdt: Add a parameter to fdt_valid()

At present this only checks working_fdt, but we want to check other FDTs
also. So add the FDT to check as a parameter to fdt_valid().

Signed-off-by: Simon Glass <sjg@chromium.org>
12 years agosandbox: Add CONFIG_OF_HOSTFILE to read FDT from host file
Simon Glass [Sat, 20 Apr 2013 08:42:41 +0000 (08:42 +0000)]
sandbox: Add CONFIG_OF_HOSTFILE to read FDT from host file

With sandbox it is tricky to add an FDT to the image at build time (or
later) since we build an ELF file, not a plain binary, and the address
space of the whole U-Boot is not accessible in the emulated memory map
of sandbox.

Sandbox can read files directly from the host, though, so add an option
to read an FDT from a host file on start-up.

Signed-off-by: Simon Glass <sjg@chromium.org>
12 years agosandbox: Switch over to generic board
Simon Glass [Fri, 26 Apr 2013 02:53:43 +0000 (02:53 +0000)]
sandbox: Switch over to generic board

Add generic board support for sandbox. and remove the old board init code.

Select CONFIG_SYS_GENERIC_BOARD for sandbox now that this is supported.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@ti.com>
12 years agosandbox: Provide a way to map from host RAM to U-Boot RAM
Simon Glass [Sat, 20 Apr 2013 08:42:37 +0000 (08:42 +0000)]
sandbox: Provide a way to map from host RAM to U-Boot RAM

In many cases, pointers to memory are passed around, and these pointers
refer to U-Boot memory, not host memory. This in itself is not a
problem.

However, in a few places, we cast that pointer back to a ulong (being
a U-Boot memory address). It is possible to convert many of these cases
to avoid this. However there are data structures (e.g. struct
bootm_headers) which use pointers. We could with a lot of effort adjust
the structs and all code that uses them to use ulong instead of pointers.

This seems like an unacceptable cost, since our objective with sandbox
is to minimise the impact on U-Boot code while maximising the features
available to sandbox.

Therefore, create a map_to_sysmem() function which converts from a
pointer to a U-Boot address. This can be used sparingly when needed.

Signed-off-by: Simon Glass <sjg@chromium.org>
12 years agoTrigger generic board error only when building
Simon Glass [Sat, 20 Apr 2013 08:42:36 +0000 (08:42 +0000)]
Trigger generic board error only when building

At present the generic board error can occur when configuring U-Boot, or
during distclean, but this is incorrect. The existing autoconf.mk may come
from an earlier U-Boot configuration which is about to be overwritten.

Make the error conditional so that it will only be triggered when we are
actually building U-Boot.

This avoids a problem where the system is being reconfigured to remove
CONFIG_SYS_GENERIC_BOARD on an architecture that does not support it.
Currently this will print an error and require the manual removal of
include/autoconf.mk.

Signed-off-by: Simon Glass <sjg@chromium.org>
12 years agoMerge branch 'master' of git://git.denx.de/u-boot-i2c
Tom Rini [Tue, 30 Apr 2013 13:58:28 +0000 (09:58 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-i2c

12 years agoMerge branch 'microblaze' of git://www.denx.de/git/u-boot-microblaze
Tom Rini [Tue, 30 Apr 2013 13:58:03 +0000 (09:58 -0400)]
Merge branch 'microblaze' of git://www.denx.de/git/u-boot-microblaze

12 years agopost: fix I2C POST failure for devices in CONFIG_SYS_POST_I2C_IGNORES
Anatolij Gustschin [Mon, 15 Apr 2013 04:01:07 +0000 (04:01 +0000)]
post: fix I2C POST failure for devices in CONFIG_SYS_POST_I2C_IGNORES

Devices in CONFIG_SYS_POST_I2C_IGNORES list may be absent
and the rule is not to report I2C POST failure for devices
in this list. Currently this doesn't work since probing for
these devices isn't done and thus they are not marked as
successfully probed. Ignore optional devices when checking
for devices that didn't respond.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
12 years agoi2c: zynq: Add support for Xilinx Zynq
Michal Simek [Mon, 22 Apr 2013 13:21:33 +0000 (15:21 +0200)]
i2c: zynq: Add support for Xilinx Zynq

Support Xilinx Zynq i2c controller.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Tom Rini <trini@ti.com>
12 years agommc: Add support for Xilinx Zynq sdhci controller
Michal Simek [Mon, 22 Apr 2013 12:56:49 +0000 (14:56 +0200)]
mmc: Add support for Xilinx Zynq sdhci controller

Add support for SD, MMC and eMMC card on Xilinx Zynq.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Tom Rini <trini@ti.com>
12 years agonet: gem: Add support for phy autodetection
Michal Simek [Mon, 22 Apr 2013 12:41:09 +0000 (14:41 +0200)]
net: gem: Add support for phy autodetection

Autodetect phy if phyaddress is setup to -1.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Tom Rini <trini@ti.com>
12 years agonet: gem: Preserve clk on emio interface
David Andrey [Fri, 5 Apr 2013 15:24:24 +0000 (17:24 +0200)]
net: gem: Preserve clk on emio interface

Avoid overwriting GEMx_RCLK_CTRL and GEMx_CLK_CTRL
if the Ethernet interface is connect on EMIO

Do not enable emio for this standard board configuration for now.

Signed-off-by: David Andrey <david.andrey@netmodule.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Tom Rini <trini@ti.com>
12 years agonet: gem: Pass phy address to init
David Andrey [Thu, 4 Apr 2013 17:13:07 +0000 (19:13 +0200)]
net: gem: Pass phy address to init

Pass the PHY address to the driver init to
allow parallel use of both interfaces

Signed-off-by: David Andrey <david.andrey@netmodule.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Tom Rini <trini@ti.com>
12 years agozynq: Move macros to hardware.h
Michal Simek [Fri, 12 Apr 2013 14:33:08 +0000 (16:33 +0200)]
zynq: Move macros to hardware.h

Add all fixed addresses to hardware.h and change petalinux
configuration to support this.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Tom Rini <trini@ti.com>
12 years agonet: gem: Fix gem driver on 1Gbps LAN
Michal Simek [Mon, 15 Oct 2012 12:01:23 +0000 (14:01 +0200)]
net: gem: Fix gem driver on 1Gbps LAN

The whole driver used 100Mbps because of zc702 rev B.
Fix problem with not setup proper clock for gem1.
This is generic approach for clk setup.

Signed-off-by: Michal Simek <monstr@monstr.eu>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Tom Rini <trini@ti.com>
12 years agonet: gem: Do not initialize BDs again
Michal Simek [Thu, 24 Jan 2013 12:04:12 +0000 (13:04 +0100)]
net: gem: Do not initialize BDs again

BDs can be correctly setup just once and init function
performs only phy autodetection and enabling RX/TX.
RX/TX are disabled in halt function.

This patch solves the problem with repeatable tftp transfers.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Tom Rini <trini@ti.com>
12 years agonet: gem: Simplify return path in zynq_gem_recv
Michal Simek [Fri, 25 Jan 2013 07:24:18 +0000 (08:24 +0100)]
net: gem: Simplify return path in zynq_gem_recv

Remove one return from the code.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Tom Rini <trini@ti.com>
12 years agonet: gem: Remove WRAP bit from TX buffer description
Michal Simek [Wed, 17 Oct 2012 09:03:40 +0000 (11:03 +0200)]
net: gem: Remove WRAP bit from TX buffer description

Removing this bit causes that frame is sent only once.
(With wrap big one packet has been sent several times
which dramatically decrease throughput)

TRM: (Table 16-3: Tx Buffer Descriptor Entry)

Signed-off-by: Michal Simek <monstr@monstr.eu>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Tom Rini <trini@ti.com>
12 years agonet: phy: Define Marvell 88e1518 phy
Michal Simek [Mon, 15 Oct 2012 12:03:00 +0000 (14:03 +0200)]
net: phy: Define Marvell 88e1518 phy

This phy is used on zedboard (xilinx zynq platform).

Signed-off-by: Michal Simek <monstr@monstr.eu>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Tom Rini <trini@ti.com>
12 years agozynq: Move scutimer baseaddr to hardware.h
Michal Simek [Fri, 12 Apr 2013 14:21:26 +0000 (16:21 +0200)]
zynq: Move scutimer baseaddr to hardware.h

Move baseaddr to hardware.h to be shared between
configurations.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Tom Rini <trini@ti.com>
12 years agoarm: zynq: Rename XPSS_ prefix to ZYNQ_ for hardcoded SoC addresses
Michal Simek [Tue, 23 Apr 2013 09:35:18 +0000 (11:35 +0200)]
arm: zynq: Rename XPSS_ prefix to ZYNQ_ for hardcoded SoC addresses

XPSS prefix was used in past and it is obsolete for quite
some time. Let's use correct SoC name which is Zynq.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Tom Rini <trini@ti.com>
12 years agoarm: zynq: U-Boot udelay < 1000 FIX
David Andrey [Fri, 7 Dec 2012 15:51:32 +0000 (16:51 +0100)]
arm: zynq: U-Boot udelay < 1000 FIX

Rework the __udelay function of U-Boot Zynq Arch to handle
delay < 1000 usec

Signed-off-by: David Andrey <david.andrey@netmodule.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Tom Rini <trini@ti.com>
12 years agowatchdog: Add support for Xilinx Microblaze watchdog
Michal Simek [Mon, 22 Apr 2013 09:23:16 +0000 (11:23 +0200)]
watchdog: Add support for Xilinx Microblaze watchdog

Watchdog can be used on Microblaze, PPC and Zynq hw designs.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Tom Rini <trini@ti.com>
12 years agomicroblaze: Disable all cpu features before reset
Michal Simek [Wed, 7 Nov 2012 14:27:39 +0000 (15:27 +0100)]
microblaze: Disable all cpu features before reset

Fix microblaze soft reset function and disable
all cpu features. Especially disable caches because
IRQs were off by disable_interrupts().

Reported-by: John Williams <john.williams@xilinx.com>
Signed-off-by: Michal Simek <monstr@monstr.eu>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
12 years agomicroblaze: Enable netconsole
Michal Simek [Thu, 10 Jun 2010 13:46:04 +0000 (15:46 +0200)]
microblaze: Enable netconsole

Setup environment and enable netconsole.

Signed-off-by: Michal Simek <monstr@monstr.eu>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Tom Rini <trini@ti.com>
12 years agomicroblaze: Fix reset function
Michal Simek [Fri, 2 Nov 2012 08:33:05 +0000 (09:33 +0100)]
microblaze: Fix reset function

Remove CONFIG_SYS_RESET_ADDRESS macro.
It was there from historical point of view
when soft reset was just jump to u-boot text start
(not used right now).

Signed-off-by: Michal Simek <monstr@monstr.eu>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
12 years agogit-mailrc: Add trini shortcut
Michal Simek [Wed, 24 Apr 2013 07:31:40 +0000 (09:31 +0200)]
git-mailrc: Add trini shortcut

This is a MIME GnuPG-signed message.  If you see this text, it means that
your E-mail or Usenet software does not support MIME signed messages.
The Internet standard for MIME PGP messages, RFC 2015, was published in 1996.
To open this message correctly you will need to install E-mail or Usenet
software that supports modern Internet standards.

Easier for using with patman.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
12 years agotools: arm: imx: Implement BOOT_OFFSET command for imximage
Marek Vasut [Thu, 25 Apr 2013 10:16:02 +0000 (10:16 +0000)]
tools: arm: imx: Implement BOOT_OFFSET command for imximage

Implement BOOT_OFFSET command for imximage. This command is parallel
to current BOOT_FROM command, but allows more flexibility in configuring
arbitrary image header offset. Also add an imximage.cfg with default
offset values into arm/arch/imx-common/ so the board-specific imximage.cfg
can include this file to avoid magic constants.

The syntax of BOOT_OFFSET command is "BOOT_OFFSET <u32 offset>".

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
Cc: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Scott Wood <scottwood@freescale.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Tom Rini <trini@ti.com>
Acked-by: Stefano Babic <sbabic@denx.de>
Acked-by: Stefan Roese <sr@denx.de>
12 years agoimx: iomux-v3: Include PKE and PUE to pad control pull definitions
Benoît Thébaudeau [Fri, 26 Apr 2013 01:34:47 +0000 (01:34 +0000)]
imx: iomux-v3: Include PKE and PUE to pad control pull definitions

PUE requires PKE to mean something, as do pull values with PUE, so do not
compell users to explicitly use PKE and PUE everywhere. This is also what is
done on Linux and what has already been done for i.MX51.

By the way, remove some unused pad control definitions.

There is no change of behavior.

Note that SPI_PAD_CTRL was defined by several boards with a pull value, but
without PKE or PUE, which means that no pull was actually enabled in the pad.
This might be a bug in those boards, but this patch does not change the
behavior, so it just removes the meaningless pull value from those definitions.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
12 years agoimx: iomux-v3: Restore Linux's NEW_PAD_CTRL() macro
Benoît Thébaudeau [Fri, 26 Apr 2013 01:34:46 +0000 (01:34 +0000)]
imx: iomux-v3: Restore Linux's NEW_PAD_CTRL() macro

This macro will be useful for future changes.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
12 years agoimx: iomux-v3: cosmetic: Reorganize definitions
Benoît Thébaudeau [Fri, 26 Apr 2013 01:34:45 +0000 (01:34 +0000)]
imx: iomux-v3: cosmetic: Reorganize definitions

Keep pad control definitions together, and organize definitions in a more
legible way.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
12 years agoimx: iomux-v3: Fix common pad control definitions
Benoît Thébaudeau [Fri, 26 Apr 2013 01:34:44 +0000 (01:34 +0000)]
imx: iomux-v3: Fix common pad control definitions

Commit dc88403 "iomux-v3: Place pad control definitions into common file" broke
mx51_efikamx because it made i.MX6's pad control definitions conflict with
i.MX51's.

i.MX51's pad control definitions are actually common to some other i.MX
(25/35/53), so move them to the common iomux-v3.h (just like what is done in
Linux's), and select the correct definitions depending on whether CONFIG_MX6 is
defined or not.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
12 years agoimx: Document fuse assignments for MAC addresses
Benoît Thébaudeau [Tue, 23 Apr 2013 10:17:47 +0000 (10:17 +0000)]
imx: Document fuse assignments for MAC addresses

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
12 years agonitrogen6x: Enable support for ocotp
Benoît Thébaudeau [Tue, 23 Apr 2013 10:17:46 +0000 (10:17 +0000)]
nitrogen6x: Enable support for ocotp

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
12 years agomx6qsabrelite: Enable support for ocotp
Benoît Thébaudeau [Tue, 23 Apr 2013 10:17:45 +0000 (10:17 +0000)]
mx6qsabrelite: Enable support for ocotp

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
12 years agoAdd mxc_ocotp driver
Benoît Thébaudeau [Tue, 23 Apr 2013 10:17:44 +0000 (10:17 +0000)]
Add mxc_ocotp driver

Add an mxc_ocotp driver for i.MX6.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
12 years agomx51evk: Enable support for iim
Benoît Thébaudeau [Tue, 23 Apr 2013 10:17:43 +0000 (10:17 +0000)]
mx51evk: Enable support for iim

This allows to test the iim driver in the mainline tree.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
12 years agompc: iim: Switch to common fsl_iim
Benoît Thébaudeau [Tue, 23 Apr 2013 10:17:42 +0000 (10:17 +0000)]
mpc: iim: Switch to common fsl_iim

Make all mpc512x code point to the new common fsl_iim driver, and remove the
former mpc512x-specific iim driver.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
12 years agoAdd fsl_iim driver
Benoît Thébaudeau [Tue, 23 Apr 2013 10:17:41 +0000 (10:17 +0000)]
Add fsl_iim driver

Add a fsl_iim driver common to i.MX and MPC.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
12 years agoAdd fuse API and commands
Benoît Thébaudeau [Tue, 23 Apr 2013 10:17:40 +0000 (10:17 +0000)]
Add fuse API and commands

This can be useful for fuse-like hardware, OTP SoC options, etc.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 years agoMerge branch 'master' of git://www.denx.de/git/u-boot-cfi-flash
Tom Rini [Mon, 22 Apr 2013 13:12:16 +0000 (09:12 -0400)]
Merge branch 'master' of git://www.denx.de/git/u-boot-cfi-flash

12 years agoMerge branch 'master' of git://www.denx.de/git/u-boot-ppc4xx
Tom Rini [Mon, 22 Apr 2013 13:11:25 +0000 (09:11 -0400)]
Merge branch 'master' of git://www.denx.de/git/u-boot-ppc4xx

12 years agoflash: Add optional verify-after-write feature
Stefan Roese [Thu, 4 Apr 2013 13:53:14 +0000 (15:53 +0200)]
flash: Add optional verify-after-write feature

Sometimes it might make sense to verify the written data to NOR flash.
This patch adds this feature. To enable this verify-after-write, you
need to define CONFIG_FLASH_VERIFY in your board config header.

Please note that this option is useless in nearly all cases,
since such flash programming errors usually are detected earlier
while unprotecting/erasing/programming. Please only enable
this option if you really know what you are doing.

Signed-off-by: Stefan Roese <sr@denx.de>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 years agoppc4xx: Add lcd4_lwmon5 support
Stefan Roese [Fri, 8 Mar 2013 15:50:41 +0000 (16:50 +0100)]
ppc4xx: Add lcd4_lwmon5 support

This patch adds the fast booting LWMON5 derivat "lcd4_lwmon5".
Its a stripped down version of the full blown lwmon5 support,
without ECC, USB, POST and some other stuff. It used the newly
introduced SPL infrastrucure for SPL from NOR flash booting
on the PPC4xx.

By setting the environment variable "boot_os" to "yes", Linux
will be started from the SPL version. If not, the "normal"
U-Boot will be started.

Signed-off-by: Stefan Roese <sr@denx.de>
12 years agoMakefile: Add target for combined u-boot.img & spl/u-boot.bin
Stefan Roese [Fri, 22 Feb 2013 10:36:50 +0000 (11:36 +0100)]
Makefile: Add target for combined u-boot.img & spl/u-boot.bin

This new make target "u-boot-img-spl-at-end.bin" consists of the
the real, full-blown U-Boot image and the U-Boot SPL binary
directly attached to it. The full-blown U-Boot image has the
mkimage header included, with its load-address and entry-point.

This will be used by the upcoming lwmon5 PPC440EPx derivate board
port.

Signed-off-by: Stefan Roese <sr@denx.de>
12 years agoppc4xx: Add SPL support
Stefan Roese [Tue, 2 Apr 2013 08:37:04 +0000 (10:37 +0200)]
ppc4xx: Add SPL support

This patch adds SPL booting support (NOR flash) for the
PPC4xx platforms.

This SPL booting (Falcon mode) will be used by the upcoming
lcd4_lwmon5 board port (lwmon5 variant).

Signed-off-by: Stefan Roese <sr@denx.de>
12 years agoMerge branch 'next'
Stefano Babic [Sun, 21 Apr 2013 09:32:19 +0000 (11:32 +0200)]
Merge branch 'next'

12 years agofeature-removal-schedule.txt: Add CONFIG_SYS_MTEST_START/END
Tom Rini [Fri, 19 Apr 2013 19:09:02 +0000 (15:09 -0400)]
feature-removal-schedule.txt: Add CONFIG_SYS_MTEST_START/END

With 'mtest' no longer a default command, we will have unused defines
which should be removed for the v2013.10 release.

Signed-off-by: Tom Rini <trini@ti.com>
12 years agoconfig_cmd_default.h: Remove CONFIG_CMD_MEMTEST
Tom Rini [Fri, 19 Apr 2013 19:03:27 +0000 (15:03 -0400)]
config_cmd_default.h: Remove CONFIG_CMD_MEMTEST

As per doc/feature-removal-schedule.txt, remove CONFIG_CMD_MEMTEST from
default list of commands.

Signed-off-by: Tom Rini <trini@ti.com>
12 years agoPrepare v2013.04 v2013.04
Tom Rini [Fri, 19 Apr 2013 14:25:43 +0000 (10:25 -0400)]
Prepare v2013.04

Signed-off-by: Tom Rini <trini@ti.com>
12 years agocrc32: Correct endianness of crc32 result
Simon Glass [Thu, 18 Apr 2013 10:25:51 +0000 (10:25 +0000)]
crc32: Correct endianness of crc32 result

When crc32 is handled by the hash library, it requires the data to be in
big-endian format, since it reads it byte-wise. Thus at present the 'crc32'
command reports incorrect data. For example, previously we might see:

Peach # crc32 40000000 100
CRC32 for 40000000 ... 400000ff ==> 0d968558

but instead with the hash library we see:

Peach # crc32 40000000 100
CRC32 for 40000000 ... 400000ff ==> 5885960d

Correct this.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Vadim Bendebury <vbendeb@google.com>
12 years agopatman: fix gitutil for decorations
Andreas Bießmann [Mon, 15 Apr 2013 23:52:18 +0000 (23:52 +0000)]
patman: fix gitutil for decorations

The git config parameter log.decorate is quite useful when working with git.
Patman, however can not handle the decorated output when parsing the commit.
To prevent this use the '--no-decorate' switch for git-log.

Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
Acked-by: Simon Glass <sjg@chromium.org>
12 years agoMerge branch 'master' of git://git.denx.de/u-boot-arm into HEAD
Tom Rini [Thu, 18 Apr 2013 20:16:01 +0000 (16:16 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-arm into HEAD

Quick manual fixup to merge the USB boot related defines and TPM related
defines.

Conflicts:
include/configs/exynos5250-dt.h

Signed-off-by: Tom Rini <trini@ti.com>
12 years agofdt: Ensure that libfdt_env.h comes from U-Boot
Simon Glass [Mon, 11 Mar 2013 06:30:27 +0000 (06:30 +0000)]
fdt: Ensure that libfdt_env.h comes from U-Boot

When building host utilities, we include libfdt.h from the host, not from
U-Boot. This in turn brings in libfdt_env.h from the host, which can mess
up the types and cause a build failure, depending on the host environment.
To fix this, force inclusion of U-Boot's libfdt_env.h so that the types
are correct.

Another way to fix this is to use -nostdinc and -idirafter to ensure that
system includes are included after U-Boot ones. Unfortunately this means
that U-Boot's errno.h gets included instead of the system one. This in
turn requires a hack to errno.h to redirect things, so all in all the
solution in this patch is probably cleaner.

Signed-off-by: Simon Glass <sjg@chromium.org>
12 years agommc: check the revision for sd3.0
Jaehoon Chung [Tue, 29 Jan 2013 22:58:16 +0000 (22:58 +0000)]
mmc: check the revision for sd3.0

Support to check whether the SD3.0 or not.

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Tested-by: Rommel Custodio <sessyargc@gmail.com>
12 years agommc: support the correct card version for eMMC
Jaehoon Chung [Tue, 29 Jan 2013 19:31:16 +0000 (19:31 +0000)]
mmc: support the correct card version for eMMC

eMMC vesrion is supported up to v4.5.
But bootloader isn't saw the exact eMMC version.
After applied this patch,
if use the mmcinfo command, then can see the exactly mmc version.

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Rommel Custodio <sessyargc@gmail.com>
12 years agoprintenv: Correct out-of-memory condition check.
Maxime Larocque [Fri, 28 Sep 2012 05:00:13 +0000 (05:00 +0000)]
printenv: Correct out-of-memory condition check.

In common/cmd_nvedit.c, en env_print(), the wrong type is used for len.
hexport_r() returns -1 on error (like OOM), which is converted to
0xffffffff when put in an unsigned. Said value is obviously bigger then
0, and as a result an uninitialized string is then displayed. Other
usages of hexport_r() in the code correctly uses ssize_t to keep its
return value.

Signed-off-by: Maxime Larocque <maxmtl2002@yahoo.ca>
12 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>
12 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>
12 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>
12 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>
12 years agoMerge branch 'master' of git://git.denx.de/u-boot-x86
Tom Rini [Tue, 16 Apr 2013 20:12:33 +0000 (16:12 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-x86