]> git.kernelconcepts.de Git - karo-tx-uboot.git/log
karo-tx-uboot.git
10 years agokbuild: add CONFIG_ prefix to USE_PRIVATE_LIBGCC
Masahiro Yamada [Wed, 5 Mar 2014 07:59:38 +0000 (16:59 +0900)]
kbuild: add CONFIG_ prefix to USE_PRIVATE_LIBGCC

Before this commit, USE_PRIVATE_LIBGCC was defined in
arch-specific config.mk and referenced in
arch/$(ARCH)/lib/Makefile.

We are not happy about parsing config.mk again and again.
We have to keep the same behavior with a different way.

By adding "CONFIG_" prefix, this macro appears
in include/autoconf.mk, include/spl-autoconf.mk.
(And treating USE_PRIVATE_LIBGCC as CONFIG macro
is reasonable enough.)

Tegra SoC family defined USE_PRIVATE_LIBGCC as "yes"
in arch/arm/cpu/arm720t/tegra*/config.mk,
whereas did not define it in arch/arm/cpu/armv7/tegra*/config.mk.

It means Tegra enables PRIVATE_LIBGCC only for SPL.
We can describe the same behavior by adding

  #ifdef CONFIG_SPL_BUILD
  # define CONFIG_USE_PRIVATE_LIBGCC
  #endif

to include/configs/tegra-common.h.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Tom Warren <twarren@nvidia.com>
Cc: Simon Glass <sjg@chromium.org>
Acked-by: Stephen Warren <swarren@nvidia.com>
10 years agokbuild, blackfin: Add CONFIG_CC_OPTIMIZE_LIBS_FOR_SPEED
Masahiro Yamada [Wed, 5 Mar 2014 07:59:37 +0000 (16:59 +0900)]
kbuild, blackfin: Add CONFIG_CC_OPTIMIZE_LIBS_FOR_SPEED

Many (but not all) of Blackfin boards give -O2 option
to compile under lib/ directory.
That means lib/ should be speed-optimized,
whereas other parts should be size-optimized.

We want to keep the same behavior,
but do not want to parse board/*/config.mk again and again.
We've got no choice but to invent a new method.

CONFIG_CC_OPTIMIZE_LIBS_FOR_SPEED, if it is enabled,
gives -O2 flag only for building under lib/ directory.

Dirty codes which I had marked as "FIX ME"
in board/${BOARD}/config.mk have been deleted.
Instead, CONFIG_CC_OPTIMIZE_LIBS_FOR_SPEED has been
defined in include/configs/${BOARD}.h.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Sonic Zhang <sonic.zhang@analog.com>
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 'u-boot-tegra/master' into 'u-boot-arm/master'
Albert ARIBAUD [Fri, 7 Mar 2014 13:32:42 +0000 (14:32 +0100)]
Merge branch 'u-boot-tegra/master' into 'u-boot-arm/master'

10 years agoOMAP3: igep00x0: Enable required clocks for GPIO that are used.
Enric Balletbo i Serra [Sat, 25 Jan 2014 21:52:22 +0000 (22:52 +0100)]
OMAP3: igep00x0: Enable required clocks for GPIO that are used.

Enable required clocks for GPIO to fix a boot issue introduced by commit
f33b9bd3984fb11e1d8566a866adc5957b1e1c9d (arm: omap3: Enable clocks for
peripherals only if they are used).

Without this patch the u-boot freezes after the following messages

  OMAP36XX/37XX-GP ES1.2, CPU-OPP2, L3-200MHz, Max CPU Clock 1 Ghz
  IGEPv2 + LPDDR/NAND
  I2C:   ready
  DRAM:  512 MiB
  NAND:  512 MiB
  MMC:   OMAP SD/MMC: 0

Diving into the issue, the sequence that produces the u-boot freezes is

  setup_net_chip
   |--> gpio_direction_out
         |--> _set_gpio_dataout
               |--> __raw_writel

To avoid this we just need enable the clocks for GPIOs that are used, but it
would be interesting implement a mechanism to protect these situations and
make sure that the clock is enabled when we request a GPIO.

Signed-off-by: Enric Balletbo i Serra <eballetbo@gmail.com>
10 years agoboard/BuR/common: fix phy addresses
Hannes Petermaier [Thu, 6 Mar 2014 06:03:24 +0000 (07:03 +0100)]
board/BuR/common: fix phy addresses

B&R boards are using Phy Addresses 'one' and 'two', prior this was
defined through #define PHYADDR 1 within a header file.
Now this is addresses are given with device-driver structure.

Signed-off-by: Hannes Petermaier <oe5hpm@oevsv.at>
10 years agoARM: tegra: implement bootcmd_pxe
Stephen Warren [Wed, 5 Feb 2014 16:24:59 +0000 (09:24 -0700)]
ARM: tegra: implement bootcmd_pxe

This retrieves a PXE config file over the network, and executes it. This
allows an extlinux config file  to be retrieved over the network and
executed, whereas the existing bootcmd_dhcp retrieves a U-Boot script.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
10 years agoARM: tegra: rework boot scripts
Stephen Warren [Wed, 5 Feb 2014 16:24:58 +0000 (09:24 -0700)]
ARM: tegra: rework boot scripts

Update the common Tegra boot scripts in the default environment to

a) Make use of the new "test -e" shell command to avoid some error
   messages.

b) Allow booting using the sysboot command and extlinux.conf. This
   allows easy creation of boot menus, and provides a simple interface
   for distros to parameterize/configure the boot process.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
10 years agoARM: tegra: convert tegra to use distro defaults
Stephen Warren [Wed, 5 Feb 2014 16:24:57 +0000 (09:24 -0700)]
ARM: tegra: convert tegra to use distro defaults

Modify all Tegra boards to include the "distro defaults" header, so that
all the config options distros expect are enabled. Remove any #defines
that enable the same options from the Tegra files.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
10 years agoARM: tegra: set CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS
Stephen Warren [Mon, 10 Feb 2014 20:11:53 +0000 (13:11 -0700)]
ARM: tegra: set CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS

Tegra's EHCI controllers only have a single PORTSC register. Configure
U-Boot to know this. This prevents e.g. ehci_shutdown() from touching
non-existent registers.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
10 years agoARM: tegra: simplify halt_avp()
Stephen Warren [Mon, 3 Feb 2014 21:03:27 +0000 (14:03 -0700)]
ARM: tegra: simplify halt_avp()

In order to completely halt the AVP processor, we should simply write
FLOW_MODE_STOP without any extra options that allow wakeup. Amend the
code to do this.

I believe that enabling FIQ_1 and IRQ_1 allow the CPU to be awoken by
interrupts. We don't want this; if later SW wishes to use the AVP, it
should be reset and booted from scratch.

Related, the bits that were previously IRQ_1 and FIQ_1 have a slightly
different definition starting with Tegra114, so the values we're
writing don't entirely make sense there anyway.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
10 years agoARM: tegra: fix NV_PA_CSITE_BASE for Tegra124
Stephen Warren [Mon, 3 Feb 2014 21:03:26 +0000 (14:03 -0700)]
ARM: tegra: fix NV_PA_CSITE_BASE for Tegra124

Tegra124 moved the CSITE block's base address. Fix U-Boot to use
the correct address.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
10 years agoARM: tegra: fix pmc_pwrgate_timer_mult register definition
Stephen Warren [Mon, 3 Feb 2014 21:03:25 +0000 (14:03 -0700)]
ARM: tegra: fix pmc_pwrgate_timer_mult register definition

Register pmc_pwrgate_timer_mult has a different layout on Tegra114 and
Tegra124. Reflect this in pmc.h.

Also, simply write the whole of the register in start_cpu() rather than
doing a read-modify-write; the register is simple enough that the code
can easily construct the entire desired value.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
10 years agoARM: tegra: move CONFIG_TEGRAnn
Stephen Warren [Mon, 3 Feb 2014 21:03:24 +0000 (14:03 -0700)]
ARM: tegra: move CONFIG_TEGRAnn

<asm/arch-tegra/tegra.h> needs to use CONFIG_TEGRA* to conditionalize
some definitions, since some modules moved between generations. Move
the definition of CONFIG_TEGRAnn to a header that's included earlier,
so that it's set by the time tegra.h needs to use it.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
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 agoarm: am335x: DXR2: Reset SMSC LAN9303 switch via GPIO upon bootup
Stefan Roese [Tue, 25 Feb 2014 10:07:22 +0000 (11:07 +0100)]
arm: am335x: DXR2: Reset SMSC LAN9303 switch via GPIO upon bootup

Since the switch may be re-configured for VLAN usage in Linux (or any
other OS), lets reset the switch to its default register values upon
power-up. Otherwise network might not be available in U-Boot.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Heiko Schocher <hs@denx.de>
Cc: Roger Meier <r.meier@siemens.com>
Cc: Lukas Stockmann <lukas.stockmann@siemens.com>
Cc: Tom Rini <trini@ti.com>
10 years agoARM: AM43xx: Change DDR3 Reset Value
Dave Gerlach [Tue, 18 Feb 2014 12:32:01 +0000 (07:32 -0500)]
ARM: AM43xx: Change DDR3 Reset Value

The bit DDR3_RST_DEF_VAL inside CTRL_DDR_IO represents the default value
of the ddr reset value for DDR3 before the EMIF takes over. We must have
this bit set high so that on exit from DeepSleep0 within the kernel the
reset line has the proper value.

Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
10 years agoARM: AM43xx: Write sdram_config to secure_emif_sdram_config
Dave Gerlach [Tue, 18 Feb 2014 12:32:00 +0000 (07:32 -0500)]
ARM: AM43xx: Write sdram_config to secure_emif_sdram_config

The register secure_emif_sdram_config in control module is copied to
the EMIF sdram_config register when it is coming out of DeepSleep0 in
order to ensure that the EMIF comes up for the correct type of DDR.
Without this, resume can hang from within the kernel.

Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
10 years agoARM: AM43xx: EMIF: configure self-refresh entry delay
Dave Gerlach [Tue, 18 Feb 2014 12:31:59 +0000 (07:31 -0500)]
ARM: AM43xx: EMIF: configure self-refresh entry delay

Per a suggestion from the hardware team, program the emif_pwr_mgmt_ctrl
and emif_pwr_mgmt_ctrl_shdw registers within the EMIF to hold the
desired delay in cycles that the EMIF waits without an access to enter
self-refresh, in this case 8192 cycles. With this, code desiring to
enter self refresh only has to toggle one bit to enable it.

Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
10 years agoARM: AM43xx: Add Ethernet boot support to SPL
Mugunthan V N [Tue, 18 Feb 2014 12:31:58 +0000 (07:31 -0500)]
ARM: AM43xx: Add Ethernet boot support to SPL

Add Ethernet Boot support to SPL

Acked-by: Tom Rini <trini@ti.com>
Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
10 years agoARM: AM4372: Update EMIF registers for DDR3
Lokesh Vutla [Tue, 18 Feb 2014 12:31:57 +0000 (07:31 -0500)]
ARM: AM4372: Update EMIF registers for DDR3

Updating EMIF_PHY_CTRL and adding EMIF_READ_WRITE_EXECUTION_THRESHOLD
registers.
In EMIF_PHY_CTRL:
Updating [4:0]READ_LATENCY to 8, because at higher frequencies like
400MHz the read latency expected will be CL+3 as per tests from HW
folks.
Clearing [19]PHY_DIS_CALIB_RST bit as this is used onl for debug
purpose. With out this resume is not working(Still waiting for PHY team
to come back for better explanation).

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
10 years agoARM: DRA7xx: add support for reading cpsw 2nd mac from efuse
Mugunthan V N [Tue, 18 Feb 2014 12:31:56 +0000 (07:31 -0500)]
ARM: DRA7xx: add support for reading cpsw 2nd mac from efuse

Adding support for reading cpsw 2nd mac address from efuse and pass it
to kernel via dtb which will be used in dual emac mode of cpsw.
Also correct the bit masking of mac id read from the efuse.

Acked-by: Tom Rini <trini@ti.com>
Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
10 years agoARM: AM335x: add support for reading cpsw 2nd mac address from efuse
Mugunthan V N [Tue, 18 Feb 2014 12:31:55 +0000 (07:31 -0500)]
ARM: AM335x: add support for reading cpsw 2nd mac address from efuse

Adding support for reading cpsw 2nd mac address from efuse and pass it
to kernel via dtb which will be used in dual emac mode of cpsw.
Also adding mii command support to am335x common config.

Acked-by: Tom Rini <trini@ti.com>
Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
10 years agoARM: AM43xx: Add CPSW support to AM43xx EPOS and GP EVM
Mugunthan V N [Tue, 18 Feb 2014 12:31:54 +0000 (07:31 -0500)]
ARM: AM43xx: Add CPSW support to AM43xx EPOS and GP EVM

Adding support for CPSW to AM43xx EPOS nad GP EVM which is connected
to RMII and RGMII phy respectively and enable cpsw in config.

Reviewed-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
10 years agoARM: AM43xx: clocks: Enable CPGMAC clock control
Mugunthan V N [Tue, 18 Feb 2014 12:31:53 +0000 (07:31 -0500)]
ARM: AM43xx: clocks: Enable CPGMAC clock control

Enable CPGMAC clock control for AM43xx to use ethernet in U-Boot

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
10 years agodrivers: net: cpsw: add support to have phy address from cpsw platform data
Mugunthan V N [Tue, 18 Feb 2014 12:31:52 +0000 (07:31 -0500)]
drivers: net: cpsw: add support to have phy address from cpsw platform data

Some platforms like AM437x have different EVMs with different phy addresses,
so this patch adds support for passing phy address via cpsw plaform data.
Also renamed phy_id to phy_addr so better understanding of the code.

Reviewed-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
[trini: Update BuR am335x_igep0033 pcm051_rev3 pcm051_rev1 cm_t335
pengwyn boards]
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>