platform/kernel/u-boot.git
10 years agocmd_nvedit: Make 'env import -c' require size parameter
Tom Rini [Tue, 4 Mar 2014 20:52:35 +0000 (15:52 -0500)]
cmd_nvedit: Make 'env import -c' require size parameter

When importing a checksummed area we need to be told how big the area in
question is so that we know that will match the size of the area which
the checksum is generated against.

Reported-by: Pierre AUBERT <p.aubert@staubli.com>
Signed-off-by: Tom Rini <trini@ti.com>
10 years agoCosmetic: Typo fixes
Vasili Galka [Tue, 4 Mar 2014 15:24:09 +0000 (17:24 +0200)]
Cosmetic: Typo fixes

Signed-off-by: Vasili Galka <vasili@visionmap.com>
10 years agoppc4xx: Remove 4xx NAND booting support
Stefan Roese [Tue, 4 Mar 2014 14:34:35 +0000 (15:34 +0100)]
ppc4xx: Remove 4xx NAND booting support

As ppc4xx currently only supports the deprecated nand_spl infrastructure
and nobody seems to have time / resources to port this over to the newer
SPL infrastructure, lets remove NAND booting completely.

This should not affect the "normal", non NAND-booting ppc4xx platforms
that are currently supported.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Tirumala Marri <tmarri@apm.com>
Cc: Matthias Fuchs <matthias.fuchs@esd.eu>
Cc: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Tom Rini <trini@ti.com>
Tested-by: Matthias Fuchs <matthias.fuchs@esd.eu>
10 years agonet/phy: Correct AR8021 phy_mask
Haijun.Zhang [Tue, 4 Mar 2014 07:56:12 +0000 (15:56 +0800)]
net/phy: Correct AR8021 phy_mask

There was wrong phy_mask for AR8021 device,
so the AR8021 can't be probed correctly.
Changed it from 0x4fffff to 0x4ffff0.

Signed-off-by: Haijun Zhang <Haijun.Zhang@freescale.com>
10 years agoxilinx: delete meaningless .gitignore files
Masahiro Yamada [Tue, 4 Mar 2014 02:36:51 +0000 (11:36 +0900)]
xilinx: delete meaningless .gitignore files

config.tmp is never generated

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Michal Simek <michal.simek@xilinx.com>
Acked-by: Michal Simek <michal.simek@xilinx.com>
10 years agounit-test: make "test -e" test independent of $CWD
Stephen Warren [Sun, 2 Mar 2014 05:18:00 +0000 (22:18 -0700)]
unit-test: make "test -e" test independent of $CWD

The unit-test for hush's "test -e" currently relies upon being run in
the U-Boot build directory, because it tests for the existence of a file
that exists in that directory.

Fix this by explicitly creating the file we use for the existence test,
and deleting it afterwards so that multiple successive unit-test
invocations succeed. This required adding an os.c function to erase
files.

Reported-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
10 years agohush: fix some quoted variable expansion issues
Stephen Warren [Sun, 2 Mar 2014 05:16:10 +0000 (22:16 -0700)]
hush: fix some quoted variable expansion issues

The following shell command fails:

if test -z "$x"; then echo "zero"; else echo "non-zero"; fi

(assuming $x does not exist, it prints "non-zero" rather than "zero").

... since "$x" expands to nothing, and the argument is completely
dropped, causing too few to be passed to -z, causing cmd_test() to
error out early.

This is because when variable expansions are processed by make_string(),
the expanded results are concatenated back into a new string. However,
no quoting is applied when doing so, so any empty variables simply don't
generate any parameter when the combined string is parsed again.

Fix this by explicitly replacing quoting any argument that was originally
quoted when re-generating a string from the already-parsed argument list.

This also fixes loss of whitespace in commands such as:

setenv space " "
setenv var " 1${space}${space} 2 "
echo ">>${var}<<"

Reported-by: Russell King <linux@arm.linux.org.uk>
Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
10 years agounit-test: clean up evironment after Hush tests
Stephen Warren [Fri, 28 Feb 2014 05:01:28 +0000 (22:01 -0700)]
unit-test: clean up evironment after Hush tests

Delete the temporary variables that are used to save unit-test results
from the environment after running the test. This prevents polluting
the environment, or growing it too much.

Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
Acked-by: Simon Glass <sjg@chromium.org>
10 years agonet: asix: don't pad odd-length TX packets
Stephen Warren [Thu, 27 Feb 2014 20:27:02 +0000 (13:27 -0700)]
net: asix: don't pad odd-length TX packets

For Ethernet/USB RX packets, the ASIX HW pads odd-sized packets so that
they have an even size. Currently, asix_recv() does remove this padding,
and asic_send() adds equivalent padding in the TX path. However, the HW
does not appear to need this packing for TX packets in practical testing
with "ASIX Elec. Corp. AX88x72A 000001" Vendor: 0x0b95 Product 0x7720
Version 0.1. The Linux kernel does no such padding for the TX path.

Remove the padding from the TX path:

* For consistency with the Linux kernel.
* NVIDIA has a Tegra simulator which validates that the length of USB
  packets sent to an ASIX device matches the packet length value inside
  the packet data. Having U-Boot and the kernel do the same thing when
  creating the TX packets simplifies the simulator's validation.

Cc: Lucas Stach <dev@lynxeye.de>
Cc: Marek Vasut <marex@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
Acked-by: Marek Vasut <marex@denx.de>
Tested-by: Marek Vasut <marex@denx.de>
Tested-by: Gerhard Sittig <gsi@denx.de>
10 years agoMerge branch 'master' of git://git.denx.de/u-boot-nand-flash
Tom Rini [Wed, 5 Mar 2014 02:23:42 +0000 (21:23 -0500)]
Merge branch 'master' of git://git.denx.de/u-boot-nand-flash

10 years agomtd: nand: omap: move omap_elm.h from arch/arm/include/asm to drivers/mtd/nand
pekon gupta [Fri, 22 Nov 2013 11:23:30 +0000 (16:53 +0530)]
mtd: nand: omap: move omap_elm.h from arch/arm/include/asm to drivers/mtd/nand

omap_elm.h is a generic header used by OMAP ELM driver for all TI platfoms.
Hence this file should be present in generic folder instead of architecture
specific include folder.
Build tested using: ./MAKEALL -s am33xx -s omap3 -s omap4 -s omap5

Signed-off-by: Pekon Gupta <pekon@ti.com>
10 years agomtd: nand: omap: move omap_gpmc.h from arch/arm/include/asm to drivers/mtd/nand
pekon gupta [Fri, 22 Nov 2013 11:23:29 +0000 (16:53 +0530)]
mtd: nand: omap: move omap_gpmc.h from arch/arm/include/asm to drivers/mtd/nand

omap_gpmc.h is a generic header used by OMAP NAND driver for all TI platfoms.
Hence this file should be present in generic folder instead of architecture
specific include folder.
Build tested using: ./MAKEALL -s am33xx -s omap3 -s omap4 -s omap5

Signed-off-by: Pekon Gupta <pekon@ti.com>
10 years agomtd: nand: omap: merge duplicate GPMC data from different arch-xx headers into common...
pekon gupta [Fri, 22 Nov 2013 11:23:28 +0000 (16:53 +0530)]
mtd: nand: omap: merge duplicate GPMC data from different arch-xx headers into common omap_gpmc.h

Each SoC platform (AM33xx, OMAP3, OMAP4, OMAP5) has its own copy of GPMC related
defines and declarations scattered in SoC platform specific header files
like include/asm/arch-xx/cpu.h
However, GPMC hardware remains same across all platforms thus this patch merges
GPMC data scattered across different arch-xx specific header files into single
header file include/asm/arch/omap_gpmc.h

Build tested using: ./MAKEALL -s am33xx -s omap3 -s omap4 -s omap5

Signed-off-by: Pekon Gupta <pekon@ti.com>
10 years agomtd: nand: omap: remove unused #defines from common omap_gpmc.h
pekon gupta [Fri, 22 Nov 2013 11:23:27 +0000 (16:53 +0530)]
mtd: nand: omap: remove unused #defines from common omap_gpmc.h

OMAP NAND driver can detect Page-size and OOB-size of NAND device from ONFI
params or nand_id[] table. And based on that it defines ECC layout.
This patch
1) removes following board configs used for defining NAND ECC layout
- GPMC_NAND_ECC_LP_x16_LAYOUT (for large page x16 NAND)
- GPMC_NAND_ECC_LP_x8_LAYOUT  (for large page x8 NAND)
- GPMC_NAND_ECC_SP_x16_LAYOUT (for small page x16 NAND)
- GPMC_NAND_ECC_SP_x8_LAYOUT  (for small page x8 NAND)

2) removes unused #defines in common omap_gpmc.h depending on above configs

Build tested using: ./MAKEALL -s am33xx -s omap3 -s omap4 -s omap5

Signed-off-by: Pekon Gupta <pekon@ti.com>
10 years agomtd: nand: omap: remove redundant platform specific header: arch-xx/omap_gpmc.h
pekon gupta [Fri, 22 Nov 2013 11:23:26 +0000 (16:53 +0530)]
mtd: nand: omap: remove redundant platform specific header: arch-xx/omap_gpmc.h

Currently there are two sets of omap_gpmc.h header files
(a) arch/arm/include/asm/omap_gpmc.h
 common header file for all platforms, containing defines and declarations used
 by GPMC NAND driver.

(b) arch/arm/include/asm/arch-xx/omap_gpmc.h
 SoC platform specific header file containing defines like ECC layout.

This patch removes platform specific arch-xx/omap_gpmc.c because:
 - GPMC hardware engine is common for all SoC platforms hence only (a) is enough
 - ECC layout is now defined in omap_nand.c driver itself based on ecc-scheme
   selected. Hence all ECC layout declarations in (b) are redundant.

Build tested using: ./MAKEALL -s am33xx -s omap3 -s omap4 -s omap5

Signed-off-by: Pekon Gupta <pekon@ti.com>
10 years agoMerge branch 'master' of git://git.denx.de/u-boot-mips
Tom Rini [Tue, 4 Mar 2014 23:13:06 +0000 (18:13 -0500)]
Merge branch 'master' of git://git.denx.de/u-boot-mips

10 years agomalta: correct tcl script path in README.malta
James Hogan [Tue, 4 Mar 2014 14:48:42 +0000 (14:48 +0000)]
malta: correct tcl script path in README.malta

README.malta referred to board/malta, but malta has now been moved
within board/imgtec/, so correct the path.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>
Cc: Paul Burton <paul.burton@imgtec.com>
10 years agoMIPS: fix types u64 and __u64 to unsigned long long
Daniel Schwierzeck [Tue, 4 Mar 2014 22:01:11 +0000 (23:01 +0100)]
MIPS: fix types u64 and __u64 to unsigned long long

Linux MIPS uses asm-generic/int-ll64.h in asm/types.h.
Thus u64 and __u64 are defined as unsigned long long. Port this
over to U-Boot.

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
10 years agoarc: arcangel4: set board entry <none> to fix a build error
Masahiro Yamada [Mon, 3 Mar 2014 10:03:18 +0000 (19:03 +0900)]
arc: arcangel4: set board entry <none> to fix a build error

There are no source files in board/synopsys/arcangel4/
directory.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
10 years agokbuild: allow empty board directories
Masahiro Yamada [Mon, 3 Mar 2014 10:03:17 +0000 (19:03 +0900)]
kbuild: allow empty board directories

U-Boot has compelled all boards to have
board/${BOARD}/ or board/${VENDOR}/${BOARD}/ directory.

Sometimes it does not seem suitable for some boards,
for example Sandbox. (Is it a board?)

And arcangel4 board has nothing to compile
under the board directory.

This commit makes the build system more flexible:
If '<none>' is given to the 6th column (=Board name) of boards.cfg,
Kbuild will not descend into the board directory.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
10 years agokbuild: tools: fix a bug that always builds Denx logo
Masahiro Yamada [Mon, 3 Mar 2014 09:40:56 +0000 (18:40 +0900)]
kbuild: tools: fix a bug that always builds Denx logo

LOGO_BMP was never overwritten by board-specific or
vendor-specific logos.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Reported-by: Bo Shen <voice.shen@atmel.com>
Tested-by: Bo Shen <voice.shen@atmel.com>
10 years agokbuild: add "cross_tools" target to build tools for the target
Masahiro Yamada [Mon, 3 Mar 2014 02:06:19 +0000 (11:06 +0900)]
kbuild: add "cross_tools" target to build tools for the target

Programs in tools/ directory are usually built for the host.
But some of them (mkimage, dumpimge, gen_eth_addr, etc.) are
useful on the target OS too.

Actually, prior to Kbuild, U-Boot could build tools for
the target like follows:

  $ make <target_board>_config
  $ export CROSS_COMPILE=<cross_gcc_prefix>
  $ make HOSTCC=${CROSS_COMPILE}gcc HOSTSTRIP=${CROSS_COMPILE}strip tools

In Kbuild, we can no longer replace HOSTCC at the command line.

In order to get back that feature, this commit adds "cross-tools" target.

Usage:

  Build tools for the host
  $ make CROSS_COMPILE=<cross_gcc_prefix> tools

  Build tools for the target
  $ make CROSS_COMPILE=<cross_gcc_prefix> cross_tools

Besides, "make cross_tools" strip tools programs because we
generally expect smaller storages on embedded systems.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Reported-by: Heiko Schocher <hs@denx.de>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Tom Rini <trini@ti.com>
Tested-by: Heiko Schocher <hs@denx.de>
Acked-by: Heiko Schocher <hs@denx.de>
10 years agokbuild: fix "tools-all" target
Masahiro Yamada [Mon, 3 Mar 2014 02:06:18 +0000 (11:06 +0900)]
kbuild: fix "tools-all" target

The top Makefile must export HOST_TOOLS_ALL to use it
in tools/Makefile.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Tested-by: Heiko Schocher <hs@denx.de>
Acked-by: Heiko Schocher <hs@denx.de>
10 years agoboard: config.mk: delete unused sinclude directive
Masahiro Yamada [Fri, 28 Feb 2014 11:12:34 +0000 (20:12 +0900)]
board: config.mk: delete unused sinclude directive

config.tmp is not there.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
10 years agoboard: .gitignore: ignore board-specific generated files
Masahiro Yamada [Fri, 28 Feb 2014 10:59:16 +0000 (19:59 +0900)]
board: .gitignore: ignore board-specific generated files

Ignore
  - board/cray/L1/bootscript.{c|image}
  - board/matrix_vision/mvblm7/bootscript.img
  - board/maxtir_vision/mvsmr/bootscript.img

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Andre Schwarz <andre.schwarz@matrix-vision.de>
10 years agoboard: gaisler: delete unnecessary include path
Masahiro Yamada [Fri, 28 Feb 2014 10:42:26 +0000 (19:42 +0900)]
board: gaisler: delete unnecessary include path

The same outputs are generated with or without -I$(TOPDIR)/board.
I cannot understand why it is necessary. Remove.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Daniel Hellstrom <daniel@gaisler.com>
10 years agokbuild: fix CROSS_COMPILE settings in config.mk
Masahiro Yamada [Fri, 28 Feb 2014 05:33:30 +0000 (14:33 +0900)]
kbuild: fix CROSS_COMPILE settings in config.mk

The syntax
  CROSS_COMIPLE ?= <cross_compiler_prefix>
does not work because config.mk is parsed after
exporting CROSS_COMPILE.

Like Linux Kernel's arch/$(ARCH)/Makefile,
we must write as follows:

  ifeq ($(CROSS_COMPILE),)
  CROSS_COMPILE := <cross_compiler_prefix>
  endif

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
10 years agokbuild: consolidate PLATFORM_LIBS
Masahiro Yamada [Thu, 27 Feb 2014 13:40:34 +0000 (22:40 +0900)]
kbuild: consolidate PLATFORM_LIBS

We had switched to Kbuild so now we can specify
PLATFORM_LIBS/PLATFORM_LIBGCC with relative path.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Tom Rini <trini@ti.com>
Acked-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
10 years agoscripts: update checkpatch.pl to latest upstream version
Tom Rini [Thu, 27 Feb 2014 13:27:28 +0000 (08:27 -0500)]
scripts: update checkpatch.pl to latest upstream version

Update to v3.14-rc4's version of checkpatch.pl.  In doing so we drop the
changes to top_of_kernel_tree() as we pass in --no-tree and drop our
changes about MAINTAINERS as that's for reporting checkpatch.pl problems
itself (and upstream has said they'll reword this section to be
clearer).

Signed-off-by: Tom Rini <trini@ti.com>
10 years agoAdd 64-bit data support for memory commands
York Sun [Thu, 27 Feb 2014 01:03:19 +0000 (17:03 -0800)]
Add 64-bit data support for memory commands

Add 64-bit data for memory commands, such as md, mw, mm, cmp. The new
size ".q " is introduced.

For 64-bit architecture, 64-bit data is enabled by default, by detecting
compiler __LP64__. It is optional for other architectures.

Signed-off-by: York Sun <yorksun@freescale.com>
10 years agodm: Remove old driver model documentation
Simon Glass [Wed, 26 Feb 2014 22:59:27 +0000 (15:59 -0700)]
dm: Remove old driver model documentation

This documentation pertains to the planned implementation of driver model
in U-Boot for each subsystem, but it has not been superseded. It is
probably better to have this documentation in the source code for each
subsystem where possible, so that docbook will pick it up. Where this does
not make sense, new documentation can be placed in some suitable file in
doc/driver-model.

Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agodm: Enable gpio command to support driver model
Simon Glass [Wed, 26 Feb 2014 22:59:26 +0000 (15:59 -0700)]
dm: Enable gpio command to support driver model

Now that named GPIO banks are supported, along with a way of obtaining
the status of a GPIO (input or output), we can provide an enhanced
GPIO command for driver model. Where the driver provides its own operation
for obtaining the GPIO state, this is used, otherwise a generic version
is sufficient.

Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agosandbox: Convert GPIOs to use driver model
Simon Glass [Wed, 26 Feb 2014 22:59:25 +0000 (15:59 -0700)]
sandbox: Convert GPIOs to use driver model

Convert sandbox over to use driver model GPIOs.

Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agodm: Add GPIO support and tests
Simon Glass [Wed, 26 Feb 2014 22:59:24 +0000 (15:59 -0700)]
dm: Add GPIO support and tests

Add driver model support for GPIOs. Since existing GPIO drivers do not use
driver model, this feature must be enabled by CONFIG_DM_GPIO. After all
GPO drivers are converted over we can perhaps remove this config.

Tests are provided for the sandbox implementation, and are a sufficient
sanity check for basic operation.

The GPIO uclass understands the concept of named banks of GPIOs, with each
GPIO device providing a single bank. Within each bank the GPIOs are numbered
using an offset from 0 to n-1. For example a bank named 'b' with 20
offsets will provide GPIOs named b0 to b19.

Anonymous GPIO banks are also supported, and are just numbered without any
prefix.

Each time a GPIO driver is added to the uclass, the GPIOs are renumbered
accordinging, so there is always a global GPIO numbering order.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Marek Vasut <marex@denx.de>
Signed-off-by: Pavel Herrmann <morpheus.ibis@gmail.com>
Signed-off-by: Viktor Křivák <viktor.krivak@gmail.com>
Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
10 years agodm: Add a demonstration/example driver
Simon Glass [Wed, 26 Feb 2014 22:59:23 +0000 (15:59 -0700)]
dm: Add a demonstration/example driver

As an example of how to write a uclass and a driver, provide a demo version
of each, accessible through the 'demo' command.

To use these with driver model, define CONFIG_CMD_DEMO and CONFIG_DM_DEMO.

The two demo drivers are enabled with CONFIG_DM_DEMO_SIMPLE and
CONFIG_DM_DEMO_SHAPE.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Marek Vasut <marex@denx.de>
Signed-off-by: Pavel Herrmann <morpheus.ibis@gmail.com>
Signed-off-by: Viktor Křivák <viktor.krivak@gmail.com>
Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
10 years agodm: Add a 'dm' command for testing
Simon Glass [Wed, 26 Feb 2014 22:59:22 +0000 (15:59 -0700)]
dm: Add a 'dm' command for testing

This command is not required for driver model operation, but can be useful
for testing. It provides simple dumps of internal data structures.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Marek Vasut <marex@denx.de>
Signed-off-by: Pavel Herrmann <morpheus.ibis@gmail.com>
Signed-off-by: Viktor Křivák <viktor.krivak@gmail.com>
Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
10 years agodm: Add basic tests
Simon Glass [Wed, 26 Feb 2014 22:59:21 +0000 (15:59 -0700)]
dm: Add basic tests

Add some tests of driver model functionality. Coverage includes:

- basic init
- binding of drivers to devices using platform_data
- automatic probing of devices when referenced
- availability of platform data to devices
- lifecycle from bind to probe to remove to unbind
- renumbering within a uclass when devices are probed/removed
- calling driver-defined operations
- deactivation of drivers when removed
- memory leak across creation and destruction of drivers/uclasses
- uclass init/destroy methods
- automatic probe/remove of children/parents when needed

This function is enabled for sandbox, using CONFIG_DM_TEST.

Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agodm: Set up driver model after relocation
Simon Glass [Wed, 26 Feb 2014 22:59:20 +0000 (15:59 -0700)]
dm: Set up driver model after relocation

Make driver model available after relocation, by setting up data structures
and scanning for devices using compiled-in platform_data and (when available)
the device tree.

Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agosandbox: config: Enable driver model
Simon Glass [Wed, 26 Feb 2014 22:59:19 +0000 (15:59 -0700)]
sandbox: config: Enable driver model

Use driver model in sandbox to permit running of driver model unit test.

Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agodm: Add base driver model support
Simon Glass [Wed, 26 Feb 2014 22:59:18 +0000 (15:59 -0700)]
dm: Add base driver model support

Add driver model functionality for generic board.

This includes data structures and base code for registering devices and
uclasses (groups of devices with the same purpose, e.g. all I2C ports will
be in the same uclass).

The feature is enabled with CONFIG_DM.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Marek Vasut <marex@denx.de>
Signed-off-by: Pavel Herrmann <morpheus.ibis@gmail.com>
Signed-off-by: Viktor Křivák <viktor.krivak@gmail.com>
Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
10 years agodm: Add README for driver model
Simon Glass [Wed, 26 Feb 2014 22:59:17 +0000 (15:59 -0700)]
dm: Add README for driver model

This adds a README to help with understanding of this series.

Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agoyaffs: Remove private list implementation
Simon Glass [Wed, 26 Feb 2014 22:59:16 +0000 (15:59 -0700)]
yaffs: Remove private list implementation

U-Boot already has a list implementation, and files which include both
that and the yaffs implementation will get errors:

In file included from ydirectenv.h:80:0,
                 from yportenv.h:81,
                 from yaffs_guts.h:19,
                 from yaffs_allocator.h:19,
                 from yaffs_allocator.c:14:
yaffs_list.h:32:8: error: redefinition of ‘struct list_head’
 struct list_head {
        ^

Remove the yaffs implementation.

Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agoAdd cmd_process_error() to report and process errors
Simon Glass [Wed, 26 Feb 2014 22:59:15 +0000 (15:59 -0700)]
Add cmd_process_error() to report and process errors

U-Boot now uses errors defined in include/errno.h which are negative
integers. Commands which fail need to report the error and return 1
to indicate failure. Add this functionality in cmd_process_error().

For now this merely reports the error number. It would be possible
also to produce a helpful error message by storing the error strings
in U-Boot.

Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agosandbox: Build a device tree file for sandbox
Simon Glass [Wed, 26 Feb 2014 22:59:14 +0000 (15:59 -0700)]
sandbox: Build a device tree file for sandbox

Add support for building a device tree for sandbox's CONFIG_OF_HOSTFILE
option to make it easier to use device tree with sandbox.

This adjusts the Makefile to build a u-boot.dtb file which can be passed
to sandbox U-Boot with:

   ./u-boot -d u-boot.dtb

Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agosizes.h - consolidate for all architectures
Alexey Brodkin [Wed, 26 Feb 2014 13:47:58 +0000 (17:47 +0400)]
sizes.h - consolidate for all architectures

Copied from Linux sources "include/linux/sizes.h" commit
413541dd66d51f791a0b169d9b9014e4f56be13c

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Vineet Gupta <vgupta@synopsys.com>
Cc: Tom Rini <trini@ti.com>
Cc: Stefan Roese <sr@denx.de>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Acked-by: Tom Rini <trini@ti.com>
Acked-by: Stefan Roese <sr@denx.de>
[trini: Add bcm Kona platforms to the patch]
Signed-off-by: Tom Rini <trini@ti.com>
10 years agonand_spl: display warning message to inform the end of nand_spl
Masahiro Yamada [Wed, 26 Feb 2014 08:51:11 +0000 (17:51 +0900)]
nand_spl: display warning message to inform the end of nand_spl

Now we have two different frameworks for doing the same thing.
I'd like to propose to drop nand_spl framework.
How about deleting it before v2014.07 release?

In the interim, this commit will display a warning message
when compiling nand_spl board.

Now we have 19 nand_spl boards:

  MPC8315ERDB_NAND
  SIMPC8313_LP
  SIMPC8313_SP
  MPC8536DS_NAND
  MPC8569MDS_NAND
  MPC8572DS_NAND
  P1023RDS_NAND
  P1011RDB_NAND
  P1020RDB_NAND
  P2010RDB_NAND
  P2020RDB_NAND
  acadia_nand
  bamboo_nand
  canyonlands_nand
  glacier_nand
  haleakala_nand
  kilauea_nand
  rainier_nand
  sequoia_nand

They must be ported to SPL before the deadline,
otherwise they will be removed.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Dave Liu <daveliu@freescale.com>
Cc: Ron Madrid <info@sheldoninst.com>
Cc: Roy Zang <tie-fei.zang@freescale.com>
Cc: Stefan Roese <sr@denx.de>
Acked-by: Stefan Roese <sr@denx.de>
10 years agom68k: merge compile flags -ffixed-d7 -sep-data
Masahiro Yamada [Wed, 26 Feb 2014 05:51:04 +0000 (14:51 +0900)]
m68k: merge compile flags -ffixed-d7 -sep-data

All arch/m68k/cpu/*/config.mk define the same flags
  PLAGFORM_REFLFLAGS += -ffixed-d7 -msep-data
Move it to arch/m68k/config.mk

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Jason Jin <Jason.jin@freescale.com>
10 years agosh: merge compiler flag -ffixed-r13
Masahiro Yamada [Wed, 26 Feb 2014 05:51:03 +0000 (14:51 +0900)]
sh: merge compiler flag -ffixed-r13

-ffixed-r13 is defined commonly for sh2, sh3, sh4.
Move it to arch/sh/config.mk

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
10 years agosh: Do not define -ffreestanding twice
Masahiro Yamada [Wed, 26 Feb 2014 05:51:02 +0000 (14:51 +0900)]
sh: Do not define -ffreestanding twice

-ffreestanding is defined at the top Makefile for all architectures.
Do not define it twice for SH2A.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
10 years agox86: Delete redundant compiler flags
Masahiro Yamada [Wed, 26 Feb 2014 05:51:01 +0000 (14:51 +0900)]
x86: Delete redundant compiler flags

-Wstrict-prototypes, -ffreestanding, -fno-stack-protector
are defined at the top Makefile for all architectures.

Do not define them twice for x86.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Simon Glass <sjg@chromium.org>
Acked-by: Simon Glass <sjg@chromium.org>
10 years agonand_spl: simpc8313: move config.mk used only for nand_spl
Masahiro Yamada [Wed, 26 Feb 2014 05:51:00 +0000 (14:51 +0900)]
nand_spl: simpc8313: move config.mk used only for nand_spl

board/sheldon/simpc8313/config.mk is used only for nand_spl.
So it should go into nand_spl/board/sheldon/simpc8313/.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
10 years agoMakefile: delete unused variable LDSCRIPT_MAKEFILE_DIR
Masahiro Yamada [Wed, 26 Feb 2014 05:50:59 +0000 (14:50 +0900)]
Makefile: delete unused variable LDSCRIPT_MAKEFILE_DIR

LDSCRIPT_MAKEFILE_DIR is not referenced from anywhere. Remove.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
10 years agoconfig.mk: Delete unused variable BCURDIR
Masahiro Yamada [Wed, 26 Feb 2014 05:50:58 +0000 (14:50 +0900)]
config.mk: Delete unused variable BCURDIR

This variable was abolished by Kbuild series.
I forgot to delete it.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
10 years agokbuild: post: fix dependency tracking correctly
Masahiro Yamada [Wed, 26 Feb 2014 02:26:08 +0000 (11:26 +0900)]
kbuild: post: fix dependency tracking correctly

$(call if_changed,...) must take FORCE as a prerequite.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
10 years agoserial: zynq: Add OF initialization support
Michal Simek [Mon, 24 Feb 2014 10:16:33 +0000 (11:16 +0100)]
serial: zynq: Add OF initialization support

Add console selection from DTB which is enough to have
OF driven solution.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agozynq: Add OF ram initialization support
Michal Simek [Mon, 24 Feb 2014 10:16:32 +0000 (11:16 +0100)]
zynq: Add OF ram initialization support

Read ram size directly from DTB.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agommc: zynq: Add OF initialization support
Michal Simek [Mon, 24 Feb 2014 10:16:31 +0000 (11:16 +0100)]
mmc: zynq: Add OF initialization support

Enable initialize sdhci from DTB.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agonet: gem: Add OF initialization support
Michal Simek [Mon, 24 Feb 2014 10:16:30 +0000 (11:16 +0100)]
net: gem: Add OF initialization support

Gem can be directly initialized from DTB.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agozynq: Do not use SPL OF initialization
Michal Simek [Mon, 24 Feb 2014 10:16:29 +0000 (11:16 +0100)]
zynq: Do not use SPL OF initialization

Disable CONFIG_OF_CONTROL for SPL compilation.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agonet: emaclite: Fix OF initialization
Michal Simek [Mon, 24 Feb 2014 10:16:28 +0000 (11:16 +0100)]
net: emaclite: Fix OF initialization

- Add xilinx_emaclite_of_init to netdev.h
- Remove global data pointer from the driver
- Add better handling for error state.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agoboard/ti/am335x/README: update for NAND boot
pekon gupta [Tue, 19 Nov 2013 05:32:18 +0000 (11:02 +0530)]
board/ti/am335x/README: update for NAND boot

NAND boot mode on AM335x EVM has been verified, and steps
to use it has been documented and update in this README

Signed-off-by: Pekon Gupta <pekon@ti.com>
Acked-by: Peter Korsgaard <jacmet@sunsite.dk>
Acked-by: Tom Rini <trini@ti.com>
10 years agomtd: nand: omap: optimized chip->ecc.correct() for H/W ECC schemes
pekon gupta [Tue, 19 Nov 2013 05:32:17 +0000 (11:02 +0530)]
mtd: nand: omap: optimized chip->ecc.correct() for H/W ECC schemes

chip->ecc.correct() is used for detecting and correcting bit-flips during read
operations. In omap-nand driver it implemented as:
(a) omap_correct_data(): for h/w based ECC_HAM1 scheme
(b) omap_correct_data_bch() + CONFIG_NAND_OMAP_ECC_BCH8_CODE_HW_DETECTION_SW
for ECC_BCH8 scheme using GPMC and software lib/bch.c
(c) omap_correct_data_bch() + CONFIG_NAND_OMAP_ECC_BCH8_CODE_HW
for ECC_BCH8 scheme using GPMC and ELM

This patch updates (c)
- checks for calc_ecc[]==0x00 so that error_correction is not required for
  known good pages.
- adds scalability for other ECC_BCHx scheme by merging following
  omap_rotate_ecc_bch() + omap_fix_errors_bch() => omap_correct_data_bch()
- fixing logic for bit-flip correction based on error_loc[count]

Signed-off-by: Pekon Gupta <pekon@ti.com>
10 years agomtd: nand: omap: optimize chip->ecc.calculate() for H/W ECC schemes
pekon gupta [Tue, 19 Nov 2013 05:32:16 +0000 (11:02 +0530)]
mtd: nand: omap: optimize chip->ecc.calculate() for H/W ECC schemes

chip->ecc.calculate() is used for calculating and fetching of ECC syndrome by
processing the data passed during Read/Write accesses.

All H/W based ECC schemes use GPMC controller to calculate ECC syndrome.
But each BCHx_ECC scheme has its own implemetation of post-processing and
fetching ECC syndrome from GPMC controller.

This patch updates OMAP_ECC_BCH8_CODE_HW ECC scheme in following way:
- merges multiple chip->calculate API for different ECC schemes
  omap_calculate_ecc() + omap_calculate_ecc_bch() + omap_calculate_ecc_bch_sw()
==> omap_calculate_ecc()
- removes omap_ecc_disable() and instead uses it as inline.

Signed-off-by: Pekon Gupta <pekon@ti.com>
10 years agomtd: nand: omap: optimize chip->ecc.hwctl() for H/W ECC schemes
pekon gupta [Tue, 19 Nov 2013 05:32:15 +0000 (11:02 +0530)]
mtd: nand: omap: optimize chip->ecc.hwctl() for H/W ECC schemes

chip->ecc.hwctl() is used for preparing the H/W controller before read/write
NAND accesses (like assigning data-buf, enabling ECC scheme configs, etc.)

Though all ECC schemes in OMAP NAND driver use GPMC controller for generating
ECC syndrome (for both Read/Write accesses). But but in current code
HAM1_ECC and BCHx_ECC schemes implement individual function to achieve this.
This patch
(1) removes omap_hwecc_init() and omap_hwecc_init_bch()
as chip->ecc.hwctl will re-initializeGPMC before every read/write call.
omap_hwecc_init_bch() -> omap_enable_ecc_bch()

(2) merges the GPMC configuration code for all ECC schemes into
single omap_enable_hwecc(), thus adding scalability for future ECC schemes.
omap_enable_hwecc() + omap_enable_ecc_bch() -> omap_enable_hwecc()

Signed-off-by: Pekon Gupta <pekon@ti.com>
10 years agoMerge branch 'master' of git://git.denx.de/u-boot-arm
Tom Rini [Wed, 26 Feb 2014 21:49:58 +0000 (16:49 -0500)]
Merge branch 'master' of git://git.denx.de/u-boot-arm

Conflicts:
arch/arm/cpu/armv7/config.mk
board/ti/am43xx/mux.c
include/configs/am43xx_evm.h

Signed-off-by: Tom Rini <trini@ti.com>
10 years agoarm: Switch to -mno-unaligned-access when supported by the compiler
Tom Rini [Tue, 25 Feb 2014 15:27:01 +0000 (10:27 -0500)]
arm: Switch to -mno-unaligned-access when supported by the compiler

When we tell the compiler to optimize for ARMv7 (and ARMv6 for that
matter) it assumes a default of SCTRL.A being cleared and unaligned
accesses being allowed and fast at the hardware level.  We set this bit
and must pass along -mno-unaligned-access so that the compiler will
still breakdown accesses and not trigger a data abort.

To better help understand the requirements of the project with respect
to unaligned memory access, the
Documentation/unaligned-memory-access.txt file has been added as
doc/README.unaligned-memory-access.txt and is taken from the v3.14-rc1
tag of the kernel.

Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
Cc: Mans Rullgard <mans@mansr.com>
Signed-off-by: Tom Rini <trini@ti.com>
10 years agocheckpatch.pl: Add warning for new __packed additions
Tom Rini [Tue, 25 Feb 2014 15:27:00 +0000 (10:27 -0500)]
checkpatch.pl: Add warning for new __packed additions

While there are valid reasons to use __packed, often the answer is that
you should be doing something else here instead.

Signed-off-by: Tom Rini <trini@ti.com>
10 years agoarm: remove unneeded symbol offsets and _TEXT_BASE
Albert ARIBAUD [Sat, 22 Feb 2014 16:53:43 +0000 (17:53 +0100)]
arm: remove unneeded symbol offsets and _TEXT_BASE

Remove the last uses of symbol offsets in ARM U-Boot.
Remove some needless uses of _TEXT_BASE.
Remove all _TEXT_BASE definitions.

Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
10 years agoarm: make _end compiler-generated
Albert ARIBAUD [Sat, 22 Feb 2014 16:53:42 +0000 (17:53 +0100)]
arm: make _end compiler-generated

This prevents references to _end from generating absolute
relocation records.

This change is binary invariant for ARM targets.

Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
10 years agocm_t335: fix linker file to produce full ELF
Albert ARIBAUD [Sat, 22 Feb 2014 16:53:41 +0000 (17:53 +0100)]
cm_t335: fix linker file to produce full ELF

Newly added cm_t335 was missed in commit 47ed5dd0 which
made ARM targets produce full ELF files. Fix its linker
script.

This change is binary-invariant when only .dynsym, .dynstr,
.dynamic, .plt, .interp and .gun sections are declared.

Sections .hash, .got.plt, .dynbss and .ARM.exidx are also
declared so that their (unused) content is moved out of the
u-boot binary.

Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
10 years agoRevert "ext4fs: Add ext4 extent cache for read operations"
Tom Rini [Wed, 26 Feb 2014 13:18:58 +0000 (08:18 -0500)]
Revert "ext4fs: Add ext4 extent cache for read operations"

This reverts commit fc0fc50f38a4d7d0554558076a79dfe8b0d78cd5.

The author has asked on the mailing list that we revert this for now as
it breaks write support.

Reported-by: Łukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Tom Rini <trini@ti.com>
10 years agoMerge branch 'master' of git://git.denx.de/u-boot-mpc85xx
Tom Rini [Tue, 25 Feb 2014 17:44:13 +0000 (12:44 -0500)]
Merge branch 'master' of git://git.denx.de/u-boot-mpc85xx

With this, fixup a trivial build error of get_effective_memsize needing
to be updated in the new board/freescale/p1010rdb/spl.c

Signed-off-by: Tom Rini <trini@ti.com>
10 years agoarm: omap: delete unincluded omap-common/config.mk
Masahiro Yamada [Tue, 25 Feb 2014 01:01:50 +0000 (10:01 +0900)]
arm: omap: delete unincluded omap-common/config.mk

arch/arm/cpu/armv7/omap-common/config.mk is never included
because "omap-common" is not SoC name.

If we want to add OMAP-specific compiler flags,
they must be added to omap3/config.mk, omap4/config.mk, omap5/config.mk.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Tom Rini <trini@ti.com>
10 years agokbuild: Move linker sciript check to prepare1
Masahiro Yamada [Tue, 25 Feb 2014 10:26:48 +0000 (19:26 +0900)]
kbuild: Move linker sciript check to prepare1

Same as the previous commit.
Move sanity check to prepare1 target to avoid nasty troubles.

Before this commit, LDSCRIPT existence was not checked
when it was specified by CONFIG_SYS_LDSCRIPT.
Now LDSCRIPT existence is checked for all boards.

$(wildcard $(LDSCRIPT)) must point to the linker scripts
with absolute path.
Otherwise, make will terminate with a false error
on out-of-tree build.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
10 years agokbuild: Fix a false error of generic board support
Masahiro Yamada [Tue, 25 Feb 2014 10:26:47 +0000 (19:26 +0900)]
kbuild: Fix a false error of generic board support

Before this commit, make terminated with an error
where is shouldn't under some condition.

This bug happened when we built a board unsupporting
generic board right after building with generic board.

For example, the following sequence failed.
(harmony uses generic board but microblaze-generic does not
support it)

  $ make harmony_config
  Configuring for harmony board...
  $ make CROSS_COMPILE=arm-linux-gnueabi-
    [ Build succeed ]
  $ make microblaze-generic_config
  Configuring for microblaze-generic board...
  $ make CROSS_COMPILE=microblaze-linux-
  Makefile:488: *** Your architecture does not support generic board.
  Please undefined CONFIG_SYS_GENERIC_BOARD in your board config file.  Stop.

We had to do "make clean" before building the microblaze board.

This commit fixes this unconvenience.

Move generic board sanity check to "prepare1" target,
which is run after generation of include/autoconf.mk.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
10 years agokbuild: get back DTB at the top directory
Masahiro Yamada [Fri, 21 Feb 2014 06:34:30 +0000 (15:34 +0900)]
kbuild: get back DTB at the top directory

Commit 6ab6b2af deleted ./u-boot.dtb because it was a copy
of dts/dt.dtb.

But Simon suggested to keep u-boot.dtb at the top directory
because it is a build output.

After discussions, we agreed on revival of ./u-boot.dtb.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Tom Rini <trini@ti.com>
Acked-by: Simon Glass <sjg@chromium.org>
10 years agokbuild: add misc targets, help, ubootrelease, ubootversion
Masahiro Yamada [Mon, 24 Feb 2014 02:12:23 +0000 (11:12 +0900)]
kbuild: add misc targets, help, ubootrelease, ubootversion

"help" target has been copied from Linux 3.13 and adjusted
for U-Boot.
Unlike Linux, cleaning is done on 4 levels:
clean, clobber, mrproper, distclean.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
10 years agokbuild: support building signle targets
Masahiro Yamada [Mon, 24 Feb 2014 02:12:22 +0000 (11:12 +0900)]
kbuild: support building signle targets

Import build rules of single targets from Linux 3.13.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
10 years agokbuild: refactor more IMX image rules
Masahiro Yamada [Mon, 24 Feb 2014 02:12:21 +0000 (11:12 +0900)]
kbuild: refactor more IMX image rules

This commit avoids generating ./SPL twice.
  - Fist time descending to spl/
  - Second time as a prerequisite of u-boot-with-spl.imx,
    u-boot-with-nand-spl.imx.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
10 years agokbuild: use shorten logs for IMX images
Masahiro Yamada [Mon, 24 Feb 2014 02:12:20 +0000 (11:12 +0900)]
kbuild: use shorten logs for IMX images

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
10 years agokbuild: use shorten logs for misc targets
Masahiro Yamada [Mon, 24 Feb 2014 02:12:19 +0000 (11:12 +0900)]
kbuild: use shorten logs for misc targets

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
10 years agokbuild: use shorten log for linking u-boot
Masahiro Yamada [Mon, 24 Feb 2014 02:12:18 +0000 (11:12 +0900)]
kbuild: use shorten log for linking u-boot

Move sandbox-specific link rule to arch/sandbox/config.mk.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
10 years agokbuild: use shorten logs for combined rules of mkimage, padding and cat
Masahiro Yamada [Mon, 24 Feb 2014 02:12:17 +0000 (11:12 +0900)]
kbuild: use shorten logs for combined rules of mkimage, padding and cat

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
10 years agokbuild: use shorten logs for cat rules
Masahiro Yamada [Mon, 24 Feb 2014 02:12:16 +0000 (11:12 +0900)]
kbuild: use shorten logs for cat rules

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
10 years agokbuild: use shorten logs for mkimage rules
Masahiro Yamada [Mon, 24 Feb 2014 02:12:15 +0000 (11:12 +0900)]
kbuild: use shorten logs for mkimage rules

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
10 years agokbuild: use shorten logs objcopy rules
Masahiro Yamada [Mon, 24 Feb 2014 02:12:14 +0000 (11:12 +0900)]
kbuild: use shorten logs objcopy rules

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
10 years agokbuild: Add $(Q) when descending into subdirectories
Masahiro Yamada [Mon, 24 Feb 2014 02:12:13 +0000 (11:12 +0900)]
kbuild: Add $(Q) when descending into subdirectories

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
10 years agokbuild: rename OBJCFLAGS to OBJCOPYFLAGS
Masahiro Yamada [Mon, 24 Feb 2014 02:12:12 +0000 (11:12 +0900)]
kbuild: rename OBJCFLAGS to OBJCOPYFLAGS

Rename OBJCFLAGS to OBJCOPYFLAGS beforehand to use
"cmd_objcopy" in scripts/Makefile.lib in an upcoming commit.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
10 years agokbuild: move asm-offsets.h rules to ./Kbuild
Masahiro Yamada [Mon, 24 Feb 2014 02:12:11 +0000 (11:12 +0900)]
kbuild: move asm-offsets.h rules to ./Kbuild

Generate include/generated/generic-asm-offsets.h and
include/generated/asm-offsets.h in ./Kbuild.

This commit also changes the include guard.

Before this commit, __ASM_OFFSETS_H__ was used for both of them.
So we could not include generic-asm-offsets.h and asm-offsets.h
at the same time.

This commit renames the include guard of the former to
__GENERIC_ASM_OFFSETS_H__.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
10 years agokbuild: abolish "depend" target
Masahiro Yamada [Mon, 24 Feb 2014 02:12:10 +0000 (11:12 +0900)]
kbuild: abolish "depend" target

This commit moves include/generated/{generic-asm-offsets.h, asm-offsets.h}
from "depend" targets to "prepare" targets and deletes "depend" targets.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
10 years agokbuild: consolidate version and timestamp headers generation
Masahiro Yamada [Mon, 24 Feb 2014 02:12:09 +0000 (11:12 +0900)]
kbuild: consolidate version and timestamp headers generation

- Generate include/generated/{timestamp.h, version.h}
   more simply by using filechk rule.

 - Add $(UBOOTRELEASE) variable and re-write u-boot.imx rule
   more simply.

 - Rename U_BOOT_VERSION in Makefile to UBOOTVERSION

   Before this commit, the same variable name, "U_BOOT_VERSION"
   was used for two different strings.

   One of them was defined in Makefile.
   It takes the form like "2014.01-rc1" and used in
   makefiles and script files.

   The other is defined in include/generated/version.h
   It takes the form like "U-Boot 2014.01-rc1-00010-gbe6d426-dirty"
   and used in C and Aseembler.

   It is confusing when grepping the source tree. So, this commit
   renames the former to UBOOTVERSION.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
10 years agoMakefile: add a new script to check -fstack-usage support
Masahiro Yamada [Wed, 11 Dec 2013 11:11:34 +0000 (20:11 +0900)]
Makefile: add a new script to check -fstack-usage support

If -fstack-usage option is given to crosstools
that do not support it, gcc displays a warning message
but still exits with status 0.

This means we can not rely on $(call cc-option,...)
to detect if -fstack-usage option is supported or not.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
10 years agofsl/usb: Limit phy_type comparison to first four characters
Nikhil Badola [Mon, 17 Feb 2014 11:28:36 +0000 (16:58 +0530)]
fsl/usb: Limit phy_type comparison to first four characters

Use first four characters for phy_type comparison. Strcmp() should not
be used to check the phy_type string which maybe parsed by hwconfig_subarg().
Hwconfig_subarg() returns part of hwconfig string starting from
phy_type value till the end of the string. Since phy_type could be
either "utmi" or "ulpi", strncmp() should be used so that a comparison
of "utmi;fsl_ddr:bank_intlv=auto" with "utmi" will succeed.

Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com>
Signed-off-by: Nikhil Badola <nikhil.badola@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
10 years agopowerpc/mpc8536DS:Increase binary size for mpc8536DS board
Haijun.Zhang [Thu, 13 Feb 2014 01:03:02 +0000 (09:03 +0800)]
powerpc/mpc8536DS:Increase binary size for mpc8536DS board

u-boot binary size for Freescale mpc8536DS platforms is 512KB.
This has been reached to upper limit of the platforms and causig
linker error. So increase the u-boot binary size to 768KB.

Signed-off-by: Haijun Zhang <Haijun.Zhang@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
10 years agoar8031/8033/phy:enable autonegotiation for ar8031/8033
Zhao Qiang [Mon, 23 Dec 2013 07:51:33 +0000 (15:51 +0800)]
ar8031/8033/phy:enable autonegotiation for ar8031/8033

Function "genphy_parse_link()" used "if (mii_reg & BMSR_ANEGCAPABLE)" before
while "if (phydev->supported & SUPPORTED_Autoneg)" now.
So assign "phydev->supported" to "phydev->drv->features" for ar8031/8033
to enable autonegotiation.

Signed-off-by: Zhao Qiang <B45475@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
10 years agopowerpc: p1010rdb: Enable p1010rdb to start from NAND/SD/SPI flash with SPL
Ying Zhang [Fri, 24 Jan 2014 07:50:09 +0000 (15:50 +0800)]
powerpc: p1010rdb: Enable p1010rdb to start from NAND/SD/SPI flash with SPL

In the previous patches, we introduced the SPL/TPL fraamework.
For SD/SPI flash booting way, we introduce the SPL to enable a loader stub. The
SPL was loaded by the code from the internal on-chip ROM. The SPL initializes
the DDR according to the SPD and loads the final uboot image into DDR, then
jump to the DDR to begin execution.

For NAND booting way, the nand SPL has size limitation on some board(e.g.
P1010RDB), it can not be more than 8KB, we can call it "minimal SPL", So the
dynamic DDR driver doesn't fit into this minimum SPL. We added the TPL that is
loaded by the the minimal SPL. The TPL initializes the DDR according to the SPD
and loads the final uboot image into DDR,then jump to the DDR to begin execution.

This patch enabled SPL/TPL for P1010RDB to support starting from NAND/SD/SPI
flash with SPL framework and initializing the DDR according to SPD in the SPL/TPL.
Because the minimal SPL load the TPL to L2 SRAM and the jump to the L2 SRAM to
execute, so the section .resetvec is no longer needed.

Signed-off-by: Ying Zhang <b40530@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
10 years agoSPL: P1022DS: fix the problem booting from spi flash
Ying Zhang [Fri, 24 Jan 2014 07:50:08 +0000 (15:50 +0800)]
SPL: P1022DS: fix the problem booting from spi flash

There was no enough memory for malloc in SPL booting from spi flash, so
relayout the memory in SPL: reduce the memory for global data from 16K
Bytes to 4K Bytes, save the space for malloc.

Signed-off-by: Ying Zhang <b40530@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
10 years agoSPL: P2020RDB: fix the problem booting from spi flash
Ying Zhang [Fri, 24 Jan 2014 07:50:07 +0000 (15:50 +0800)]
SPL: P2020RDB: fix the problem booting from spi flash

There was no enough stack in SPL, so the buffer needed in SPL is to malloc
from memory pool and to repalce the temporary variable.

Signed-off-by: Ying Zhang <b40530@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
10 years agoSPL: powerpc: expand SPL's length to 128K
Ying Zhang [Fri, 24 Jan 2014 07:50:06 +0000 (15:50 +0800)]
SPL: powerpc: expand SPL's length to 128K

1. The SPL's length of SDCARD boot has not enough,expand the SPL's
length to 128K.
2. deleted unused symbol: CONFIG_SYS_RUN_INDDR

Signed-off-by: Ying Zhang <b40530@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
10 years agopowerpc/t2081qds: Add T2081 QDS board support
Shengzhou Liu [Fri, 21 Feb 2014 05:16:19 +0000 (13:16 +0800)]
powerpc/t2081qds: Add T2081 QDS board support

T2081 QDS is a high-performance computing evaluation, development and
test platform supporting the T2081 QorIQ Power Architecture processor.

T2081QDS board Overview
-----------------------
- T2081 SoC integrating four 64-bit dual-threads e6500 cores up to 1.8GHz
- 2MB shared L2 and 512KB L3 CoreNet platform cache (CPC)
- CoreNet fabric supporting coherent and noncoherent transactions with
  prioritization and bandwidth allocation
- 32-/64-bit DDR3/DDR3LP SDRAM memory controller with ECC and interleaving
- Ethernet interfaces:
  - Two on-board 10M/100M/1G bps RGMII ports
  - Two 10Gbps XFI with on-board SFP+ cage
  - 1Gbps/2.5Gbps SGMII Riser card
  - 10Gbps XAUI Riser card
- Accelerator:
  - DPAA components consist of FMan, BMan, QMan, PME, DCE and SEC
- SerDes:
  - 8 lanes up to 10.3125GHz
  - Supports SGMII, HiGig, XFI, XAUI and Aurora debug,
- IFC:
  - 512MB NOR Flash, 2GB NAND Flash, PromJet debug port and Qixis FPGA
- eSPI:
  - Three SPI flash (16MB N25Q128A + 16MB EN25S64 + 512KB SST25WF040)
- USB:
  - Two USB2.0 ports with internal PHY (one Type-A + one micro Type mini-AB)
- PCIe:
  - Four PCI Express controllers (two PCIe 2.0 and two PCIe 3.0 with SR-IOV)
- eSDHC:
  - Supports various SD/SDHC/SDXC/eMMC devices with adapter cards and
    voltage translators
- I2C:
  - Four I2C controllers.
- UART:
  - Dual 4-pins UART serial ports

Signed-off-by: Shengzhou Liu <Shengzhou.Liu@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>