]> git.dujemihanovic.xyz Git - u-boot.git/log
u-boot.git
9 years agoARM: sunxi: Enable PSCI for sun8i
Chen-Yu Tsai [Thu, 28 May 2015 13:25:34 +0000 (21:25 +0800)]
ARM: sunxi: Enable PSCI for sun8i

sun8i uses the same PSCI backend as sun6i, without power clamps.
Since there is no secure SRAM, the backend is placed at the end
of DRAM.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
9 years agoARM: sunxi: Share sun6i PSCI backend with sun8i
Chen-Yu Tsai [Thu, 28 May 2015 13:25:33 +0000 (21:25 +0800)]
ARM: sunxi: Share sun6i PSCI backend with sun8i

sun8i can share the PSCI backend with sun6i. Only difference
is sun8i does not have CPU power clamp controls.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
9 years agoARM: sunxi: Enable PSCI for sun6i
Chen-Yu Tsai [Thu, 28 May 2015 13:25:32 +0000 (21:25 +0800)]
ARM: sunxi: Enable PSCI for sun6i

Now that we have a PSCI backend for sun6i, enable it.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
9 years agoARM: sunxi: Add sun6i specific PSCI implementation
Chen-Yu Tsai [Thu, 28 May 2015 13:25:31 +0000 (21:25 +0800)]
ARM: sunxi: Add sun6i specific PSCI implementation

This adds PSCI support for sun6i. So far it only supports
the PWR_ON method.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
9 years agoARM: sunxi: Make PSCI code sun7i specific
Chen-Yu Tsai [Thu, 28 May 2015 13:25:30 +0000 (21:25 +0800)]
ARM: sunxi: Make PSCI code sun7i specific

The PSCI code only works for sun7i. Rename it with _sun7i suffix,
and build only if building for sun7i.

This paves the way for adding PSCI support for other platforms.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
9 years agoARM: sunxi: Document registers in PSCI code
Chen-Yu Tsai [Thu, 28 May 2015 13:25:29 +0000 (21:25 +0800)]
ARM: sunxi: Document registers in PSCI code

The PSCI CPU_ON code accesses quite a few registers. Document
their names to make it easier to cross reference.

Also explain "lock cpu" and "unlock cpu" as enabling/disabling
debug access.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
9 years agosunxi/nand: Add support to the SPL for loading u-boot from internal NAND memory
Daniel Kochmański [Tue, 26 May 2015 15:00:42 +0000 (17:00 +0200)]
sunxi/nand: Add support to the SPL for loading u-boot from internal NAND memory

This commit adds support to the sunxi SPL to load u-boot from the internal
NAND. Note this only adds support to access the boot partitions to load
u-boot, full NAND support to load the kernel, etc. from the nand data
partition will come later.

Signed-off-by: Roy Spliet <r.spliet@ultimaker.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
9 years agosunxi: Match sun4i, sun6i, sun9i CCI definitions for NAND and DMA
Roy Spliet [Tue, 26 May 2015 15:00:41 +0000 (17:00 +0200)]
sunxi: Match sun4i, sun6i, sun9i CCI definitions for NAND and DMA

Make sure definitions for NAND clock and DMA gate bits are the same
across boards.

Signed-off-by: Roy Spliet <r.spliet@ultimaker.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
9 years agosunxi: Add DMA definitions
Roy Spliet [Tue, 26 May 2015 15:00:40 +0000 (17:00 +0200)]
sunxi: Add DMA definitions

Signed-off-by: Roy Spliet <r.spliet@ultimaker.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
9 years agosunxi/nand: change BLOCK_SIZE in mksunxiboot to match NAND block size
Daniel Kochmański [Tue, 26 May 2015 15:00:39 +0000 (17:00 +0200)]
sunxi/nand: change BLOCK_SIZE in mksunxiboot to match NAND block size

This change is necessary to calculate correct checksum for NAND
boot. Works both for MMC and NAND. Without it BROM rejects boot image
as invalid (bad checksum). (Changes block size from 0x200 to 0x2000).

Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu>
Signed-off-by: Roy Spliet <r.spliet@ultimaker.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
9 years agosun9i: Add Merrii_A80_Optimus board / defconfig file
Hans de Goede [Tue, 13 Jan 2015 22:24:05 +0000 (23:24 +0100)]
sun9i: Add Merrii_A80_Optimus board / defconfig file

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agosun9i: Basic sun9i (A80) support
Hans de Goede [Tue, 13 Jan 2015 18:25:06 +0000 (19:25 +0100)]
sun9i: Basic sun9i (A80) support

Add initial sun9i (A80) support, only uart + mmc are supported for now.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agosunxi: Update sunxi-common.h to deal with different A1-SRAM base addr on sun9i
Hans de Goede [Wed, 20 May 2015 13:27:16 +0000 (15:27 +0200)]
sunxi: Update sunxi-common.h to deal with different A1-SRAM base addr on sun9i

The A1 SRAM Base differs between sun9i and the others, update sunxi-common.h
to deal with this, so that we do not set the initial stack pointer to point
to the BROM.

This avoids the need for the weird undocumented register write I previously
took from the allwiner u-boot sources and which needed #ifdef-ery in start.S
as it needed to be done really early on.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agosunxi: Update sunxi-common.h to deal with different DRAM base addr on sun9i
Hans de Goede [Tue, 19 May 2015 20:12:31 +0000 (22:12 +0200)]
sunxi: Update sunxi-common.h to deal with different DRAM base addr on sun9i

The DRAM Base differs between sun9i and the others, update sunxi-common.h to
deal with this.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agosunxi: Remove support for building "old-fashioned" fel binaries
Hans de Goede [Tue, 19 May 2015 19:44:44 +0000 (21:44 +0200)]
sunxi: Remove support for building "old-fashioned" fel binaries

The latest versions of the fel tool support loading normal u-boot builds
directly, and this is now the preferred way to use the fel boot method.

This commit removes support for the old deprecated standalone fel builds.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agosunxi: Use axp221 sid on a33
Hans de Goede [Tue, 19 May 2015 21:34:00 +0000 (23:34 +0200)]
sunxi: Use axp221 sid on a33

Unlike the A31 and the A23 the A33 actually has a SID inside the SoC again,
but sid[3] is 0 (at least on some SoCs), so it is better to use the axp221
sid.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agoam33xx, spl, siemens: enable debug uart output again
Heiko Schocher [Thu, 28 May 2015 05:27:36 +0000 (07:27 +0200)]
am33xx, spl, siemens: enable debug uart output again

a6b541b090: TI ARMv7: Don't use GD before crt0.S has set it

moves the init of the debug uart at the very end of SPL code.
Enable it for the siemens board earlier, as they print
ddr settings ... all debug output before board_init_r()
is here currently useless. Maybe we must rework this
globally?

Signed-off-by: Heiko Schocher <hs@denx.de>
9 years agonet: Fix a warning added by 76ec988
Joe Hershberger [Thu, 21 May 2015 19:16:13 +0000 (14:16 -0500)]
net: Fix a warning added by 76ec988

arm:  +   lsxhl
w+board/buffalo/lsxl/lsxl.c: In function 'rescue_mode':
w+board/buffalo/lsxl/lsxl.c:230:8: warning: unused variable 'enetaddr' [-Wunused-variable]
       arm:  +   lschlv2
w+board/buffalo/lsxl/lsxl.c: In function 'rescue_mode':
w+board/buffalo/lsxl/lsxl.c:230:8: warning: unused variable 'enetaddr' [-Wunused-variable]

Remove the unused variable.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
9 years agofsl/sata: Replace sprintf() with snprintf()
Tang Yuantian [Wed, 6 May 2015 03:21:33 +0000 (11:21 +0800)]
fsl/sata: Replace sprintf() with snprintf()

Function 'sprintf' does not check buffer boundaries but outputs
to the buffer of fixed size which could potentially cause buffer
overflow. Use a safer function to replace it.

Signed-off-by: Tang Yuantian <Yuantian.Tang@freescale.com>
9 years agogpio: stm32: add stm32f1 support
Matt Porter [Tue, 5 May 2015 19:00:25 +0000 (15:00 -0400)]
gpio: stm32: add stm32f1 support

Add support for the STM32F1 family to the STM32 gpio driver.

Signed-off-by: Matt Porter <mporter@konsulko.com>
9 years agoARMv7M: add STM32F1 support
Matt Porter [Tue, 5 May 2015 19:00:24 +0000 (15:00 -0400)]
ARMv7M: add STM32F1 support

Add ARMv7M STM32F1 support including clocks, timer, gpio, and flash.

Signed-off-by: Matt Porter <mporter@konsulko.com>
9 years agocommon/cmd_boot: keep ARM v7M in thumb mode during do_go_exec()
Matt Porter [Tue, 5 May 2015 19:00:23 +0000 (15:00 -0400)]
common/cmd_boot: keep ARM v7M in thumb mode during do_go_exec()

On ARM v7M, the processor will return to ARM mode when executing
a blx instruction with bit 0 of the address == 0. Always set it
to 1 to stay in thumb mode.

Signed-off-by: Matt Porter <mporter@konsulko.com>
9 years agoimage: fix build when CONFIG_NR_DRAM_BANKS is disabled on ARM
Matt Porter [Tue, 5 May 2015 19:00:22 +0000 (15:00 -0400)]
image: fix build when CONFIG_NR_DRAM_BANKS is disabled on ARM

common/image.c currently implicitly depends on CONFIG_NR_DRAM_BANKS
when CONFIG_ARM is enabled. Make this requirement explicit.

Signed-off-by: Matt Porter <mporter@konsulko.com>
9 years agoARM: bcm283x: Switch to generic timer
Marek Vasut [Mon, 4 May 2015 20:54:37 +0000 (22:54 +0200)]
ARM: bcm283x: Switch to generic timer

Switch to generic timer implementation from lib/time.c .
This also fixes a signed overflow which was in __udelay()
implementation.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Stephen Warren <swarren@wwwdotorg.org>
Cc: Tyler Baker <tyler.baker@linaro.org>
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
9 years agoARM: bcm283x: Reorder timer.h
Marek Vasut [Mon, 4 May 2015 20:54:35 +0000 (22:54 +0200)]
ARM: bcm283x: Reorder timer.h

Reorder the timer.h file so it can be included from board config file.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Stephen Warren <swarren@wwwdotorg.org>
Cc: Tyler Baker <tyler.baker@linaro.org>
9 years agoARM: bcm283x: Repair wdog.h
Marek Vasut [Mon, 4 May 2015 20:54:34 +0000 (22:54 +0200)]
ARM: bcm283x: Repair wdog.h

Trivially fix the include check in wdog.h.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Stephen Warren <swarren@wwwdotorg.org>
Cc: Tyler Baker <tyler.baker@linaro.org>
9 years agovexpress64: use uncompressed kernel by default
Linus Walleij [Wed, 27 May 2015 07:45:39 +0000 (09:45 +0200)]
vexpress64: use uncompressed kernel by default

The foundation model (FVP) emulator nominally boots using
a clean, uncompressed kernel and the "booti" command. Augment
the default U-Boot script to do this.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
9 years agokbuild: define DO_DEPS_ONLY for u-boot.cfg to fix build error
Masahiro Yamada [Tue, 26 May 2015 03:51:25 +0000 (12:51 +0900)]
kbuild: define DO_DEPS_ONLY for u-boot.cfg to fix build error

Since 741e58e0fc8e (Create a .cfg file containing the CONFIG options
used to build), all the Blackfin boards fail to build if the parallel
(-j) option is passed.

  $ make -s bf506f-ezkit_defconfig
  #
  # configuration written to .config
  #
  $ make -j8 CROSS_COMPILE=bfin-elf-
  scripts/kconfig/conf --silentoldconfig Kconfig
    CHK     include/config.h
    UPD     include/config.h
    GEN     include/autoconf.mk
    GEN     include/autoconf.mk.dep
    CHK     include/config/uboot.release
    CHK     include/generated/timestamp_autogenerated.h
    UPD     include/generated/timestamp_autogenerated.h
    CFG     u-boot.cfg
  include/asm-offsets.h:3:43: fatal error:
  generated/generic-asm-offsets.h: No such file or directory
  compilation terminated.
  make: *** [u-boot.cfg] Error 1

When parsing header files for defined CONFIG options, DO_DEPS_ONLY
must be defined to exclude generated headers that might not have
been available yet.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
9 years agomeminfo cmd: Enable printing >=4GiB SDRAM sizes
Andrew Bradford [Fri, 22 May 2015 12:30:14 +0000 (08:30 -0400)]
meminfo cmd: Enable printing >=4GiB SDRAM sizes

gd->ram_size is stored as phys_size_t type which can be bigger than an
unsigned long on some architectures.  When using unsigned long type,
SDRAM of 4GiB or larger will not print the correct size, but using
phys_size_t will.

Signed-off-by: Andrew Bradford <andrew.bradford@kodakalaris.com>
9 years agospl: spl_mmc: Error and count distinction
Paul Kocialkowski [Fri, 22 May 2015 10:45:35 +0000 (12:45 +0200)]
spl: spl_mmc: Error and count distinction

This introduces a distinction between return codes that are read bytes counts
and errors. Read bytes counts are erroneous when null (no data was read) while
errors are erroneous when non-null.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Tested-by: Tim Harvey <tharvey@gateworks.com>
9 years agoadd test for two 'loadables'
Karl Apsite [Thu, 21 May 2015 13:52:50 +0000 (09:52 -0400)]
add test for two 'loadables'

Nothing too fancy.  A simple test that attmpts to load two loadables and
verify that they are properly unpacked in the u-boot sandbox.
Signed-off-by: Karl Apsite <Karl.Apsite@dornerworks.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
9 years agoCombine bootm_find_<thing> functions together
Karl Apsite [Thu, 21 May 2015 13:52:49 +0000 (09:52 -0400)]
Combine bootm_find_<thing> functions together

bootm_find_ramdisk_fdt() renamed to bootm_find_images() for readability.

The function bootm_find_ramdisk_fdt() appears to be a simple wrapper for
bootm_find_ramdisk(), bootm_find_fdt(), and now bootm_find_loadables().
I didn't see any other callers entering a bootm_find<thing>, so removing
the wrapper, and condensing these together hopefully makes the code a
little simpler.

Signed-off-by: Karl Apsite <Karl.Apsite@dornerworks.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
9 years agoadd boot_get_loadables() to load listed images
Karl Apsite [Thu, 21 May 2015 13:52:48 +0000 (09:52 -0400)]
add boot_get_loadables() to load listed images

Added a trimmed down instance of boot_get_<thing>() to satisfy the
minimum requierments of the added feature.  The function follows the
normal patterns set by other boot_get<thing>'s, which should make it a
bit easier to combine them all together into one boot_get_image()
function in a later refactor.

Documentation for the new function can be found in source:
  include/image.h

Signed-off-by: Karl Apsite <Karl.Apsite@dornerworks.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
9 years agomkimage will now report information about loadable
Karl Apsite [Thu, 21 May 2015 13:52:47 +0000 (09:52 -0400)]
mkimage will now report information about loadable

Added FIT_LOADABLE_PROP, so the user can identify an optional entry
named "loadables" in their .its configuration. "loadables" is a comma
separated list in the .its

Documentation can be found in doc/uImage.FIT/source_file_format.txt and
                              doc/uImage.Fit/multi-with-loadables.its

Signed-off-by: Karl Apsite <Karl.Apsite@dornerworks.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
9 years agopowerpc: gitignore: ignore PowerPC DTBs
Masahiro Yamada [Wed, 20 May 2015 05:18:22 +0000 (14:18 +0900)]
powerpc: gitignore: ignore PowerPC DTBs

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
9 years agotools: use pkg-config when available to get SSL flags
Thomas Petazzoni [Sat, 16 May 2015 16:36:15 +0000 (18:36 +0200)]
tools: use pkg-config when available to get SSL flags

Instead of hardcoding -lssl -lcrypto as the flags needed to build
mkimage with FIT signature enabled, use pkg-config when
available. This allows to properly support cases where static linking
is used, which requires linking with -lz, since OpenSSL uses zlib
internally.

We gracefully fallback on the previous behavior of hardcoding -lssl
-lcrypto if pkg-config is not available or fails with an error.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
9 years agoinclude: introduce include/linux/io.h as a wrapper of asm/io.h
Masahiro Yamada [Fri, 15 May 2015 13:05:18 +0000 (22:05 +0900)]
include: introduce include/linux/io.h as a wrapper of asm/io.h

In the latest Linux coding style, <linux/io.h> should be included
rather than <asm/io.h>.  To follow this standard also in U-Boot,
add include/linux/io.h.  Currently, it just includes <asm/io.h>.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
9 years agovexpress64: let Juno wait for root device
Linus Walleij [Thu, 14 May 2015 15:38:33 +0000 (17:38 +0200)]
vexpress64: let Juno wait for root device

The Juno reference design typically plugs the root FS
on a USB stick. We need to wait a bit for the root to
appear so tell this on the default command line.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
9 years agobeagle-xm: gpio_63 fix wrong pin initialization
Evgeniy Dushistov [Tue, 12 May 2015 19:17:10 +0000 (22:17 +0300)]
beagle-xm: gpio_63 fix wrong pin initialization

DM3730 CPU used on beagleboard-xm doesn't have any gpio
multiplexed with wait0 pin,
but gpio_63 multiplexed with wait1, so it looks like typo.
At current form it has no sense,
because of wait0 have no function "4".

Signed-off-by: Evgneiy A. Dushistov <dushistov@mail.ru>
9 years agoppc: xilinx-ppc: Move to generic board support
Ricardo Ribalda [Tue, 12 May 2015 14:20:29 +0000 (16:20 +0200)]
ppc: xilinx-ppc: Move to generic board support

Generic board support seems to work just fine. Tested on ml507 with
bitstream generated on the latest ISE software.

Tested-by: Georg Schardt <schardt@team-ctech.de>
Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
9 years agodoc/README.generic-board: Trivial spell check
Ricardo Ribalda [Tue, 12 May 2015 14:20:28 +0000 (16:20 +0200)]
doc/README.generic-board: Trivial spell check

Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
9 years agovexpress64: fix various memory issues
Linus Walleij [Mon, 11 May 2015 08:03:57 +0000 (10:03 +0200)]
vexpress64: fix various memory issues

The ARM Trusted Firmware or other security solutions are
eating memory from the top of the physical SDRAM1 space,
moving backward from 0xffffffff, currently occupying e.g.
0xfe000000-0xffffffff with Trusted Firmware.

This solution to reserving memory for secure world is not
optimal, so we need to think of how the secure world and
earlier boot stages should communicate to U-Boot what
memory they are eating up. For now let's just put 16MB
aside.

Also enable the memory test command and define start and
end of the test range so we can check that we actually have
all that memory available and working.

Suggested-by: Axel Haslam <ahaslam@baylibre.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
9 years agoMakefile: Add U_BOOT_TZ and include in version
Chris Packham [Sun, 10 May 2015 09:02:09 +0000 (21:02 +1200)]
Makefile: Add U_BOOT_TZ and include in version

Define U_BOOT_TZ alongside U_BOOT_TIME and U_BOOT_DATE and use it to
include the timezone in the version output.

Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Chris Packham <judge.packham@gmail.com>
9 years agopci: display header for bus scan
Tim Harvey [Fri, 8 May 2015 22:16:07 +0000 (15:16 -0700)]
pci: display header for bus scan

If we are displaying detected PCI devices (CONFIG_PCI_SCAN_SHOW) display
a 'PCI:' header prior to scan.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
9 years agoenv_mmc: add error message to pass to set_default_env
Tim Harvey [Fri, 8 May 2015 21:52:09 +0000 (14:52 -0700)]
env_mmc: add error message to pass to set_default_env

Add an error message that gets passed to set_default_env() like
env_nand implements. This message is displayed to the user as the
reason for falling back to the default environment.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
9 years agovexpress64: specify CONFIG_SYS_FLASH_CFI_WIDTH
Ryan Harkin [Fri, 8 May 2015 17:07:52 +0000 (18:07 +0100)]
vexpress64: specify CONFIG_SYS_FLASH_CFI_WIDTH

Testing on the ARM Versatile Express Juno board showed intermittent CFI
flash detection problems.

Debug output in exception cases showed that the NOR flash was returning
incorrect values to a query command:

fwc addr 0000000008000000 cmd f0 f0f0f0f0 32bit x 8 bit
fwc addr 0000000008000000 cmd ff ffffffff 32bit x 8 bit
fwc addr 0000000008000154 cmd 98 98989898 32bit x 8 bit
is= cmd 51(Q) addr 0000000008000040 is= 00800051 51515151
fwc addr 0000000008001554 cmd 98 98989898 32bit x 8 bit
is= cmd 51(Q) addr 0000000008000040 is= 00800051 51515151
fwc addr 0000000008000000 cmd f0 00f000f0 32bit x 16 bit
fwc addr 0000000008000000 cmd ff 00ff00ff 32bit x 16 bit
fwc addr 0000000008000154 cmd 98 00980098 32bit x 16 bit
is= cmd 51(Q) addr 0000000008000040 is= 00800051 00510051
fwc addr 0000000008001554 cmd 98 00980098 32bit x 16 bit
is= cmd 51(Q) addr 0000000008000040 is= 00800051 00510051

Debugging showed that the problem could be solved by preventing u-boot
from scanning different flash widths by specifying
CONFIG_SYS_FLASH_CFI_WIDTH so that only using the 'correct' width was
used.

Signed-off-by: Ryan Harkin <ryan.harkin@linaro.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
9 years agoARM: BeagleBoard-x15: Rev A2x5: Change UART3 mux
Lokesh Vutla [Fri, 8 May 2015 11:06:28 +0000 (16:36 +0530)]
ARM: BeagleBoard-x15: Rev A2x5: Change UART3 mux

UART3 RX and TX pins are now moved to support uart download capability
on the platform. Old pins are now GPIOs routed to expansion ports.
All original boards should either have been returned for modifications
or already modified for the required change and maintaining
compatibility for older boards are no longer needed.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
9 years agomenu: Return an error code if Ctrl-C is pressed
Tuomas Tynkkynen [Thu, 7 May 2015 18:29:19 +0000 (21:29 +0300)]
menu: Return an error code if Ctrl-C is pressed

Previously, if the menu activated by the 'sysboot' command gets
interrupted by a Ctrl-C, the behaviour is as if the menu timeout was
reached - i.e. boot the default menu entry. This patch fixes that
so a Ctrl-C now terminates the command as the user would expect.

Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
Reviewed-by: Simon Glass <sjg@chromium.org>
9 years agopxe: Fix crash if 'sysboot' is run without args
Tuomas Tynkkynen [Thu, 7 May 2015 18:29:18 +0000 (21:29 +0300)]
pxe: Fix crash if 'sysboot' is run without args

Previously, a NULL pointer dereference would occur if the 'sysboot'
command is executed without any arguments.

Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
Reviewed-by: Simon Glass <sjg@chromium.org>
9 years agoRevert "Revert "stm32f4: fix serial output""
Tom Rini [Wed, 27 May 2015 17:24:10 +0000 (13:24 -0400)]
Revert "Revert "stm32f4: fix serial output""

Due to a misunderstanding, in 698a12b we reverted changes that we in
fact wanted to keep.  So lets fix that mistake and bring the code back
to how it should have been.

This reverts commit 698a12bef9e782dcd99c555a739c16eec8669f14.

Signed-off-by: Tom Rini <trini@konsulko.com>
9 years agomoveconfig: Print status about the processed defconfigs
Joe Hershberger [Tue, 19 May 2015 18:21:25 +0000 (13:21 -0500)]
moveconfig: Print status about the processed defconfigs

This gives a basic idea about progress.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: Masahiro Yamada <yamada.masahiro@socionext.com>
9 years agomoveconfig: Add a switch to enable printing errors
Joe Hershberger [Tue, 19 May 2015 18:21:24 +0000 (13:21 -0500)]
moveconfig: Add a switch to enable printing errors

In some cases the build for the autoconf breaks. This outputs the errors
following the status so that action can be taken without building again
manually.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: Masahiro Yamada <yamada.masahiro@socionext.com>
9 years agomoveconfig: Print a message for missing compiler
Joe Hershberger [Tue, 19 May 2015 18:21:23 +0000 (13:21 -0500)]
moveconfig: Print a message for missing compiler

A common case for failed builds is a missing compiler. Print a message
for that case to tell the user concisely which compiler was expected
that was not found.

This patch also has the effect of not printing build errors any longer.
The next patch will add a switch to optionally bring that back.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: Masahiro Yamada <yamada.masahiro@socionext.com>
9 years agomoveconfig: Output a list of failed boards
Joe Hershberger [Tue, 19 May 2015 18:21:22 +0000 (13:21 -0500)]
moveconfig: Output a list of failed boards

If boards fail, output that list to a file so that it can easily be
passed back into moveconfig.py using the -d option.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: Masahiro Yamada <yamada.masahiro@socionext.com>
9 years agomoveconfig: Cleanup headers in arch and board
Joe Hershberger [Tue, 19 May 2015 18:21:21 +0000 (13:21 -0500)]
moveconfig: Cleanup headers in arch and board

Some config.h files live in arch and board directories. They will need
to be cleaned up as well, so run the same filters there.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: Masahiro Yamada <yamada.masahiro@socionext.com>
9 years agomoveconfig: Add a switch to only cleanup headers
Joe Hershberger [Tue, 19 May 2015 18:21:20 +0000 (13:21 -0500)]
moveconfig: Add a switch to only cleanup headers

In some case you may want to only cleanup the headers. Make it possible
without waiting for all boards to compile.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: Masahiro Yamada <yamada.masahiro@socionext.com>
9 years agomoveconfig: Add a parameter to accept a list to build
Joe Hershberger [Tue, 19 May 2015 18:21:19 +0000 (13:21 -0500)]
moveconfig: Add a parameter to accept a list to build

This is helpful to re-attempt to move failed boards from a previous run
without starting over.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: Masahiro Yamada <yamada.masahiro@socionext.com>
9 years agomoveconfig: Ignore duplicate configs when moving
Joe Hershberger [Tue, 19 May 2015 18:21:18 +0000 (13:21 -0500)]
moveconfig: Ignore duplicate configs when moving

When moving configs, it is important to know what was defined in the
config header even if it duplicates the configs coming from Kconfig.

This is specifically needed for the case where a config is set to
default 'y' in the Kconfig. This would previously cause the actual value
from the include config to be filtered out, and moveconfig.py would
think that it was 'n'... This means that the value that should be 'y'
is now (in every defconfig) set to 'not set'.

tools/moveconfig.py now defines KCONFIG_IGNORE_DUPLICATES to prevent the
filtering from happening and selecting wrong values for the defconfig.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: Masahiro Yamada <yamada.masahiro@socionext.com>
9 years agomoveconfig: Always run savedefconfig on the moved config
Joe Hershberger [Tue, 19 May 2015 18:21:17 +0000 (13:21 -0500)]
moveconfig: Always run savedefconfig on the moved config

This will ensure that the order of the defconfig entries will always
match that of the Kconfig files. After one slightly painful (but
still early in the process) pass over all boards, this should keep
the defconfigs clean from here on.

Users must edit the Kconfig first to add the menu entries and then run
moveconfig.py to update the defconfig files and the include configs.

As such, moveconfig.py cannot compare against the '.config' contents.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: Masahiro Yamada <yamada.masahiro@socionext.com>
9 years agotools: moveconfig: a tool to move CONFIGs from headers to defconfigs
Masahiro Yamada [Wed, 20 May 2015 02:36:07 +0000 (11:36 +0900)]
tools: moveconfig: a tool to move CONFIGs from headers to defconfigs

This tool was originally written for my local use to ease the task
of tons of CONFIG moves, but there have been some requests for
mainlining it.
So, I have tidied up the code with nicer comments, and here it is.

See the comment block of the script for usage.

The first draft was
http://patchwork.ozlabs.org/patch/430422/

Main updates are:
  - Adapted to the single .config configuration
  - Support colored log
  - Support moving multiple options at once
    (and take configs via input file only)
  - Continue even if some boards fail
    (Idea provided by Joe Hershberger)
  - Add more options
  - More comments and code cleanups

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
9 years agoMerge branch 'master' of git://www.denx.de/git/u-boot-imx
Tom Rini [Tue, 26 May 2015 14:38:01 +0000 (10:38 -0400)]
Merge branch 'master' of git://www.denx.de/git/u-boot-imx

9 years agoMerge branch 'zynq' of git://www.denx.de/git/u-boot-microblaze
Tom Rini [Tue, 26 May 2015 14:37:29 +0000 (10:37 -0400)]
Merge branch 'zynq' of git://www.denx.de/git/u-boot-microblaze

9 years agomx6: standardise CONFIG_CMD_CACHE
Peter Robinson [Fri, 22 May 2015 16:30:53 +0000 (17:30 +0100)]
mx6: standardise CONFIG_CMD_CACHE

Move CONFIG_CMD_CACHE to mx6_common and standardise the way it's defined.

Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
Reviewed-by: Tom Rini <trini at konsulko.com>
9 years agoimx6: generic MMC config options to mx6_common
Peter Robinson [Fri, 22 May 2015 16:30:52 +0000 (17:30 +0100)]
imx6: generic MMC config options to mx6_common

Move all standard mx6 MMC configs to mx6_common.

Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
Reviewed-by: Tom Rini <trini at konsulko.com>
9 years agoimx6: standardise filesystem and boot options
Peter Robinson [Fri, 22 May 2015 16:30:51 +0000 (17:30 +0100)]
imx6: standardise filesystem and boot options

Move all standard filesystem, partition and fdt options to mx6_common.

Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
9 years agoimx6: move generic miscellaneous and overwrite options
Peter Robinson [Fri, 22 May 2015 16:30:50 +0000 (17:30 +0100)]
imx6: move generic miscellaneous and overwrite options

Move generic miscellaneous options that are standard across most, if not all,
 mx6 boards to central mx6_common define to ensure consistent features.

Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
9 years agoimx6: centralise common boot options in mx6_common.h
Peter Robinson [Fri, 22 May 2015 16:30:49 +0000 (17:30 +0100)]
imx6: centralise common boot options in mx6_common.h

Define common LOADADDR and BOOTDELAY to ensure a consistent experience
across mx6 boards

Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
9 years agoimx6: move MXC_GPIO define to mx6_common.h
Peter Robinson [Fri, 22 May 2015 16:30:48 +0000 (17:30 +0100)]
imx6: move MXC_GPIO define to mx6_common.h

Define CONFIG_MXC_GPIO and CONFIG_CMD_GPIO by default in mx6_common

Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
9 years agoimx6: move standard ATAG configs to mx6_common.h
Peter Robinson [Fri, 22 May 2015 16:30:47 +0000 (17:30 +0100)]
imx6: move standard ATAG configs to mx6_common.h

Define the standard ATAG consfigs in mx6_common.

Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
Reviewed-by: Tom Rini <trini at konsulko.com>
9 years agoimx6: move generic imx6 options to mx6_common.h
Peter Robinson [Fri, 22 May 2015 16:30:46 +0000 (17:30 +0100)]
imx6: move generic imx6 options to mx6_common.h

All boards define CONFIG_MX6, CONFIG_DISPLAY_BOARDINFO, CONFIG_DISPLAY_CPUINFO
and CONFIG_SYS_GENERIC_BOARD so define them in mx6_common

Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
Reviewed-by: Tom Rini <trini at konsulko.com>
9 years agoimx6: move all standard includes to mx6_common.h
Peter Robinson [Fri, 22 May 2015 16:30:45 +0000 (17:30 +0100)]
imx6: move all standard includes to mx6_common.h

The linux/sizes.h, asm/arch/imx-regs.h, asm/imx-common/gpio.h,
config_cmd_default.h includes are used fairly universally across imx6 boards
so include them in mx6_common.h by default.

We define CONFIG_SYS_NO_FLASH before config_cmd_default.h  so that we
don't have to undef CONFIG_CMD_FLASH / CONFIG_CMD_IMLS everywhere.

Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
9 years agonovena: standardise mx6_common.h include
Peter Robinson [Fri, 22 May 2015 16:30:44 +0000 (17:30 +0100)]
novena: standardise mx6_common.h include

Standardise mx6_common.h to the same as other mx6 boards

Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
Reviewed-by: Tom Rini <trini at konsulko.com>
9 years agospl: spl_mmc: fix mmc Falcon mode regression
Tim Harvey [Thu, 21 May 2015 22:57:16 +0000 (15:57 -0700)]
spl: spl_mmc: fix mmc Falcon mode regression

91199f4a5a21a7cf9dd9e7c05e295a042f8c2b7e broke mmc based Falcon mode.

The block_read function returns the number of blocks read thus the error
check needs to look for a return of 0 blocks read.

Cc: Paul Kocialkowski <contact@paulk.fr>
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Acked-by: Paul Kocialkowski <contact@paulk.fr>
9 years agoimx: ventana: update README with Falcon mode documentation
Tim Harvey [Thu, 21 May 2015 22:59:48 +0000 (15:59 -0700)]
imx: ventana: update README with Falcon mode documentation

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
9 years agoimx: ventana: update README for micro-SD boot medium
Tim Harvey [Thu, 21 May 2015 15:42:04 +0000 (08:42 -0700)]
imx: ventana: update README for micro-SD boot medium

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
9 years agoimx: ventana: update MMC env configuration
Tim Harvey [Thu, 21 May 2015 15:41:25 +0000 (08:41 -0700)]
imx: ventana: update MMC env configuration

We will use the same env size and redundancy used for NAND env for MMC.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
9 years agothermal: imx_thermal: increase critical temperature threshold
Tim Harvey [Thu, 21 May 2015 15:40:06 +0000 (08:40 -0700)]
thermal: imx_thermal: increase critical temperature threshold

The CPU temperature grade from OTP is now used to define the critical
threshold at which point we busyloop until we are below, however this
threshold is still too low.

Instead of 20C below the max CPU temperature, change it to 5C defined now
by TEMPERATURE_HOT_DETLA for clarity. Rename 'passive' to 'critical'
as that better defines our use case here. Additionally change the output
of the busyloop message to show the max CPU temperature as well as current.

Before:
CPU Temperature is 101 C, too hot to boot, waiting...
CPU Temperature is 101 C, too hot to boot, waiting...

After:
CPU Temperature (101C) too close to max (105C) waiting...
CPU Temperature (101C) too close to max (105C) waiting...

Cc: Stefan Roese <sr@denx.de>
Cc: Eric Nelson <eric.nelson@boundarydevices.com>
Cc: Heiko Schocher <hs@denx.de>
Cc: Nikita Kiryanov <nikita@compulab.co.il>
Cc: Jon Nettleton <jon.nettleton@gmail.com>
Cc: Jason Liu <r64343@freescale.com>
Cc: Ye Li <b37916@freescale.com>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Christian Gmeiner <christian.gmeiner@gmail.com>
Cc: Markus Niebel <Markus.Niebel@tq-group.com>
Cc: Peng Fan <b51431@freescale.com>
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
9 years agoarm, imx6: add support for aristainetos2 board
Heiko Schocher [Mon, 18 May 2015 11:32:31 +0000 (13:32 +0200)]
arm, imx6: add support for aristainetos2 board

add support for imx6dl based aristainetos2 board

U-Boot 2015.04-rc5-00066-g60f6ed4 (Apr 10 2015 - 08:46:27)

CPU:   Freescale i.MX6DL rev1.1 at 792 MHz
Reset cause: WDOG
Board: aristaitenos2
       Watchdog enabled
I2C:   ready
DRAM:  1 GiB
NAND:  1024 MiB
MMC:   FSL_SDHC: 0
SF: Detected N25Q128A with page size 256 Bytes, erase size 64 KiB, total 16 MiB
Display: lg4573 (480x800)
In:    serial
Out:   serial
Err:   serial
Net:   FEC [PRIME]
Hit any key to stop autoboot:  0
=>

Signed-off-by: Heiko Schocher <hs@denx.de>
9 years agoi2c, mxc: rework i2c base address names for different SoCs
Heiko Schocher [Mon, 18 May 2015 08:58:12 +0000 (10:58 +0200)]
i2c, mxc: rework i2c base address names for different SoCs

rework and unify i2c address names for different SoCs, which
use the mxc_i2c driver.

Signed-off-by: Heiko Schocher <hs@denx.de>
9 years agoarm, imx6, i2c: add I2C4 for MX6DL
Heiko Schocher [Mon, 18 May 2015 08:56:24 +0000 (10:56 +0200)]
arm, imx6, i2c: add I2C4 for MX6DL

add I2C4 modul for MX6DL based boards.

Signed-off-by: Heiko Schocher <hs@denx.de>
9 years agoimx: dma: correct MXS_DMA_ALIGNMENT
Peng Fan [Wed, 20 May 2015 02:28:48 +0000 (10:28 +0800)]
imx: dma: correct MXS_DMA_ALIGNMENT

We should not hardcode MXS_DMA_ALIGNMENT to 32, since we can not guarantee
that socs' cache line size is 32 bytes.
If on chips whose cache line size is 64 bytes, error occurs:
"
NAND:  ERROR: v7_dcache_inval_range - start address is not aligned - 0xbdf1d1a0
ERROR: v7_dcache_inval_range - stop address is not aligned - 0xbdf1f4a0
ERROR: v7_dcache_inval_range - start address is not aligned - 0xbdf1d1a0
"
Align MXS_DMA_ALIGNMENT with ARCH_DMA_MINALIGN whose value is same to
CONFIG_SYS_CACHELINE_SIZE if CONFIG_SYS_CACHELINE_SIZE defined.

Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
Acked-by: Marek Vasut <marex@denx.de>
9 years agopwm: imx: Remove unreachable code
Axel Lin [Sat, 23 May 2015 07:17:30 +0000 (15:17 +0800)]
pwm: imx: Remove unreachable code

The break after return is unreachable code, remove it.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Stefano Babic <sbabic@denx.de>
Acked-by: Heiko Schocher <hs@denx.de>
9 years agopwm: imx: Prevent NULL pointer dereference
Axel Lin [Sat, 23 May 2015 07:16:48 +0000 (15:16 +0800)]
pwm: imx: Prevent NULL pointer dereference

pwm_id_to_reg() can return NULL, so add NULL testing to prevent NULL pointer
dereference.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Stefano Babic <sbabic@denx.de>
Acked-by: Heiko Schocher <hs@denx.de>
9 years agoARM: zynq: add default ps7_init_gpl.c/h for Zed, MicroZed, ZC70x
Masahiro Yamada [Mon, 18 May 2015 06:31:52 +0000 (15:31 +0900)]
ARM: zynq: add default ps7_init_gpl.c/h for Zed, MicroZed, ZC70x

Due to licensing issues, the files ps7_init.c/h are not able to be
distributed with U-Boot source code.  Recent Xilinx tools also
provide the GPL variants (ps7_init_gpl.c/h), compatible with U-Boot
license.

Prior to this commit, we had to copy ps7_init files into
board/xilinx/zynq/ before the compile.

To be more user-friendly, let's include ps7_init_gpl.c/h for
Zedboard, MicroZed, ZC702, ZC706.

These init code have been taken from the hwplatform_templates
directory of Xilinx SDK 2014.4.

You can still use customized ps7_init_gpl.c/h by enabling
CONFIG_ZYNQ_CUSTOM_INIT.  The recommended directory for storing them
is now board/xilinx/zynq/custom_hw_platform, but board/xilinx/zynq
is still supported for backward compatibility.  The latter emits
a warning message to prompt users to gradually switch to the new
directory.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Sören Brinkmann <soren.brinkmann@xilinx.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoARM: zynq: add separate configuration for ZC702 and ZC706
Masahiro Yamada [Mon, 18 May 2015 06:31:51 +0000 (15:31 +0900)]
ARM: zynq: add separate configuration for ZC702 and ZC706

Prior to this commit, ZC702 and ZC706 shared the same configuration
and were built as follows:

ZC702: make zynq_zc70x_defconfig && make
ZC706: make zynq_zc70x_defconfig && make DEVICE_TREE=zynq-zc706

This commit introduces separate configuration for them, which makes
the next commit much easier.

Going forward, the recommended build commands are:

ZC702: make zynq_zc702_defconfig && make
ZC706: make zynq_zc706_defconfig && make

Although the old work flow is still supported, CONFIG_TARGET_ZC70X
has been marked as deprecated.  If used, the warning message is
shown to prompt users to switch to the new scheme.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agozynq: Use system timer implementation instead of our
Michal Simek [Mon, 20 Apr 2015 10:56:24 +0000 (12:56 +0200)]
zynq: Use system timer implementation instead of our

Don't use error-prone arch timer code and instead use system
timer implementation to simplify our code.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoMerge git://git.denx.de/u-boot-nand-flash
Tom Rini [Mon, 25 May 2015 01:01:30 +0000 (21:01 -0400)]
Merge git://git.denx.de/u-boot-nand-flash

9 years agomtd: vf610_nfc: enable ONFI detection
Stefan Agner [Fri, 8 May 2015 17:07:13 +0000 (19:07 +0200)]
mtd: vf610_nfc: enable ONFI detection

This changes enable ONFI detection. The Read ID command now allows
one address byte which is needed for ONFI detection. To read the
ONFI parameter page, the NAND_CMD_PARAM need to be supported. The
CMD code enables one command and one address byte along with reading
data from flash using R/B#, as specified by ONFI.

Signed-off-by: Stefan Agner <stefan@agner.ch>
9 years agomtd: vf610_nfc: add 32-error correction option for HW ECC
Stefan Agner [Fri, 8 May 2015 17:07:12 +0000 (19:07 +0200)]
mtd: vf610_nfc: add 32-error correction option for HW ECC

Add option to choose between current 24-error correction and 32-error
correction through Kconfig. 32-error correction allow to use NAND
chips which require up to 8-bit error correction per 512 byte (when
using 2K pages).

Signed-off-by: Stefan Agner <stefan@agner.ch>
9 years agomtd: vf610_nfc: add Freescale NFC controller configs to Kconfig
Stefan Agner [Fri, 8 May 2015 17:07:11 +0000 (19:07 +0200)]
mtd: vf610_nfc: add Freescale NFC controller configs to Kconfig

This commit allows users to enable/disable the Freescale NFC
controller found in systems like Vybrid (VF610), MPC5125, MCF54418
or Kinetis K70 via Kconfig with more detailed help docs.

Signed-off-by: Stefan Agner <stefan@agner.ch>
Acked-by: Stefano Babic <sbabic@denx.de>
[scottwood: updated vf610twr_nand_defconfig]
Signed-off-by: Scott Wood <scottwood@freescale.com>
9 years agomtd: vf610_nfc: use in-band bad block table
Stefan Agner [Fri, 8 May 2015 17:07:10 +0000 (19:07 +0200)]
mtd: vf610_nfc: use in-band bad block table

Use in-band bad block table (NAND_BBT_NO_OOB) which allows to
use the full OOB for hardare ECC purposes. Since there is no
ECC correction on the OOB it is also safer to use in-band area
to store the bad block table marker.

Signed-off-by: Stefan Agner <stefan@agner.ch>
9 years agomtd: vf610_nfc: implement OOB only read
Stefan Agner [Fri, 8 May 2015 17:07:09 +0000 (19:07 +0200)]
mtd: vf610_nfc: implement OOB only read

Implement read of OOB area only. When using column and sector size
properties, only parts of the page can be read. However, this works
only when hardware ECC is disabled, otherwise the ECC engine would
ruin the data in the buffer. To allow OOB only reads, three points
had to be addressed:
- Set ECC mode per command.
- Handle NAND_CMD_READOOB seperate. Make sure column and sector
  size is correctly set up, while disabling ECC.
- Now, the OOB data end up at the beginning of the buffer. Remove
  the special handling of OOB (spareonly).

Especially bad block scans benefit from this change. On a 512MiB
SLC NAND device, the bad block scan took 1.5s less than before.

Signed-off-by: Stefan Agner <stefan@agner.ch>
9 years agomtd: vf610_nfc: allow bitflips in an empty page
Stefan Agner [Fri, 8 May 2015 17:07:08 +0000 (19:07 +0200)]
mtd: vf610_nfc: allow bitflips in an empty page

Allow bit flips in a empty page up to half of the recoverable
bits (strength / 2).

Signed-off-by: Stefan Agner <stefan@agner.ch>
9 years agomtd: vf610_nfc: remove read on SEQIN
Stefan Agner [Fri, 8 May 2015 17:07:07 +0000 (19:07 +0200)]
mtd: vf610_nfc: remove read on SEQIN

Since we do not support sub-page writes anyway, reading the page
back to the controller on SEQIN command is not required. Remove
the page read on SEQIN.

However, the column/page values relevant to the SEQIN command, hence
set the column/row address on SEQIN command.

Signed-off-by: Stefan Agner <stefan@agner.ch>
9 years agomtd: vf610_nfc: remove caching of page in buffer
Stefan Agner [Fri, 8 May 2015 17:07:06 +0000 (19:07 +0200)]
mtd: vf610_nfc: remove caching of page in buffer

To improve performance we remember the current page in the buffer
and avoid reading it twice. This implicit page cache increases
complexity while does not increase performance in real world cases.
This patch removes that feature.

Acked-by: Bill Pringlemeir <bpringlemeir@nbsps.com>
Signed-off-by: Stefan Agner <stefan@agner.ch>
9 years agotools: mxsboot: Calculate ECC strength dynamically
Jörg Krause [Wed, 15 Apr 2015 07:27:23 +0000 (09:27 +0200)]
tools: mxsboot: Calculate ECC strength dynamically

Calculating the ECC strength dynamically to be aligned with the mxs NAND
driver and the Linux Kernel.

Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>
Reviewed-by: Marek Vasut <marex@denx.de>
9 years agomtd: nand: mxs: Replace magic number for bits per ECC level with macro
Jörg Krause [Wed, 15 Apr 2015 07:27:22 +0000 (09:27 +0200)]
mtd: nand: mxs: Replace magic number for bits per ECC level with macro

Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>
Reviewed-by: Marek Vasut <marex@denx.de>
9 years agomtd:mxs:nand calculate ecc strength dynamically
Peng Fan [Wed, 15 Apr 2015 07:27:21 +0000 (09:27 +0200)]
mtd:mxs:nand calculate ecc strength dynamically

Calculate ecc strength according oobsize, but not hardcoded
which is not aligned with kernel driver

Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
Signed-off-by: Ye.Li <b37916@freescale.com>
Reviewed-by: Marek Vasut <marex@denx.de>
Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>
9 years agoMerge branch 'master' of git://git.denx.de/u-boot-fsl-qoriq
Tom Rini [Fri, 22 May 2015 21:23:15 +0000 (17:23 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-fsl-qoriq

9 years agonand/elbc: Memory leak fix
Raghav Dogra [Wed, 20 May 2015 09:24:58 +0000 (14:54 +0530)]
nand/elbc: Memory leak fix

Freeing allocated memory to priv before returning
from the function

Signed-off-by: Raghav Dogra <raghav@freescale.com>
[scottwood: removed unnecessary cast]
Signed-off-by: Scott Wood <scottwood@freescale.com>