Christian Gmeiner [Wed, 3 Jun 2015 09:33:23 +0000 (11:33 +0200)]
ot1200: setup i2c bus 1 in setup_iomux_i2c()
On this bus there is a EEPROM containing EDID and ddr3
calibration information.
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Christian Gmeiner [Wed, 3 Jun 2015 09:33:22 +0000 (11:33 +0200)]
ot1200: setup i2c bus in board_early_init_f(..)
Make it possible to use the i2c bus in SPL.
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Sanchayan Maity [Mon, 1 Jun 2015 13:07:25 +0000 (18:37 +0530)]
colibri_vf: Enable board specific USB initialisation for USB pen gpio
Add IOMUX for the pad used as USB pen. This needs to be driven low for
the Iris and Viola boards where it is pulled up high by default. This is
required for the USB host functionality to work on these boards. Use the
board specific weak initialisation function, to drive the pin low which
would be called on "usb start".
Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
Sanchayan Maity [Mon, 1 Jun 2015 13:07:24 +0000 (18:37 +0530)]
usb: ehci-vf: Add weak function for board specific initialisation
Add a weak function board_ehci_hcd_init which can be used by the board
file for board specific initialisation.
Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
Bhuvanchandra DV [Mon, 1 Jun 2015 13:07:23 +0000 (18:37 +0530)]
colibri_vf: Add separate defconfig for device tree support
Most of the drivers available for Vybrid are not yet converted
to OF model to use device tree model, only few drivers
like SPI and GPIO drivers use device trees.
Add separate defconfig for who needs to use device tree model.
Later this can be integrated to single defconfig.
Acked-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com>
Bhuvanchandra DV [Mon, 1 Jun 2015 13:07:22 +0000 (18:37 +0530)]
colibri-vf: Enable SPI support
Signed-off-by: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com>
Acked-by: Stefan Agner <stefan@agner.ch>
Bhuvanchandra DV [Mon, 1 Jun 2015 13:07:21 +0000 (18:37 +0530)]
vf610: dts: Add device tree support
Add device tree files for Freescale Vybrid platform and
Toradex Colibri VF50, VF61 modules.
Device tree files are taken from upstream Kernel.
Removed the stuff which are not used/supported yet in U-Boot.
Signed-off-by: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com>
Bhuvanchandra DV [Mon, 1 Jun 2015 13:07:20 +0000 (18:37 +0530)]
arm: vf610: Add iomux support for DSPI
Add iomux definitions for DSPI second instance.
Signed-off-by: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com>
Bhuvanchandra DV [Mon, 1 Jun 2015 13:07:19 +0000 (18:37 +0530)]
arm: vf610: Add clock support for DSPI
Signed-off-by: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com>
Bhuvanchandra DV [Mon, 1 Jun 2015 13:07:18 +0000 (18:37 +0530)]
colibri_vf: Enable GPIO support
Acked-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com>
Bhuvanchandra DV [Mon, 1 Jun 2015 13:07:17 +0000 (18:37 +0530)]
colibri_vf: Add pinmux entries for GPIOs
Inorder to use the pins as GPIO, apart from setting the alt-function,
pinmuxing need to be done, this patch adds pinmux entries of
few GPIOs.
Acked-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com>
Bhuvanchandra DV [Mon, 1 Jun 2015 13:07:16 +0000 (18:37 +0530)]
dm: gpio: vf610: Add GPIO driver support
Add GPIO driver support to Freescale VF610
Signed-off-by: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com>
Bhuvanchandra DV [Mon, 1 Jun 2015 13:07:15 +0000 (18:37 +0530)]
dm: gpio: uclass: Add flag to control sequence numbering
Like SPI and I2C few GPIO controllers also have
multiple chip instances. This patch adds the
flag 'DM_UC_FLAG_SEQ_ALIAS' in gpio_uclass driver
to control device sequence numbering. By defalut
the dev->r_seq for gpio_uclass will alwalys
returns -1, which leads the gpio driver probe
failure when using the driver with device trees.
Signed-off-by: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com>
Fabio Estevam [Thu, 28 May 2015 15:33:34 +0000 (12:33 -0300)]
mx6_common: Fix LOADADDR and SYS_TEXT_BASE for MX6SL and MX6SX
Commit
8183058188cd2d942 ("imx6: centralise common boot options in
mx6_common.h") broke boot on mx6sl and mx6sx by assuming that all mx6
SoCs use the same LOADADDR/SYS_TEXT_BASE range, which is not correct.
DDR on mx6sx/mx6sl starts at 0x80000000.
Adjust LOADADDR/SYS_TEXT_BASE to the proper values for mx6sx/mx6sl,
so that these SoCs can boot again.
Also, TQMA6 requires a custom CONFIG_SYS_TEXT_BASE value, so move
its setting prior to the inclusion of mx6_common.h.
Signed-off-by: Fabio Estevam <fabio.estevam at freescale.com>
Fabio Estevam [Thu, 21 May 2015 22:24:05 +0000 (19:24 -0300)]
wandboard: Add board revision detection support
There are two revisions of wandboard: version B1 and C1.
Add the revision detection support, so that the correct dtb file can
be automatically loaded.
Based on the patch from Richard Hu <hakahu@gmail.com>.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Reviewed-by: Stefano Babic <sbabic@denx.de>
Tested-By: Vagrant Cascadian <vagrant@aikidev.net>
Markus Niebel [Tue, 12 May 2015 08:55:40 +0000 (10:55 +0200)]
arm: mx6: tqma6: use default CONFIG_SYS_PBSIZE
this removes a config entry and uses the default value
defined in config_fallbacks.h. This implements the same
behaviour as a patch series for other i.MX6 boards from
Freescale
Signed-off-by: Markus Niebel <Markus.Niebel@tq-group.com>
Markus Niebel [Tue, 12 May 2015 08:55:39 +0000 (10:55 +0200)]
arm: mx6: tqma6: fix spelling error in condition
Signed-off-by: Markus Niebel <Markus.Niebel@tq-group.com>
Tim Harvey [Tue, 26 May 2015 18:04:58 +0000 (11:04 -0700)]
imx: ventana: skip mtdparts fixup if no flash
This avoids an error message on NAND-less boards.
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Tim Harvey [Tue, 26 May 2015 18:04:57 +0000 (11:04 -0700)]
imx: ventana: hang if board model could not be determined
If the EEPROM could not be read or is corrupt we always want to hang.
Note that an error message will have been displayed by read_eeprom in this
case.
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Tim Harvey [Tue, 26 May 2015 18:04:56 +0000 (11:04 -0700)]
imx: ventana: make fdt_file1 and fdt_file2 automatic and non-overridable
The fdt_file1 and fdt_file2 vars provide fallbacks for the fdt file loading
script. There is no need to allow the user to override these as if they
want to specify the fdt, they should do so in the first attempt which is
the fdt_file var.
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Tim Harvey [Tue, 26 May 2015 18:04:55 +0000 (11:04 -0700)]
imx: ventana: make model env var automatic and non-overridable
We want to model env var to always reflect what was in the EEPROM. There
is no point in allowing a user to override this.
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Tim Harvey [Tue, 26 May 2015 18:04:54 +0000 (11:04 -0700)]
imx: ventana: various board-specific GPIO config updates
- Added iomux for CAN_STBY and RS484_TEN (GW52xx/GW53xx/GW54xx/GW551x)
- Moved iomux of USBHUB_RST# out of board_ehci_hcd_init so that it is
done regardless of USB being initialized in bootloader
- Added usb_sel iomux/hwconfig for GW552x
- Fixed mezzanine DIO for GW54xx
- Fixed PANLEDR# for GW54xx
- Fixed dio iomux/hwconfig for GW552x
- Fixed dio iomux for GW551x
- removed redundant #define
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Stefan Wahren [Thu, 21 May 2015 11:20:17 +0000 (11:20 +0000)]
mxs: Do not disable bo detection when DC-DC is already enabled
In case the DC-DC is already enabled mxs_enable_4p2_dcdc_input() returns
without reenabling brown out detection. So fix this issue by
moving the return before brown out deactivation.
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Reviewed-by: Marek Vasut <marex@denx.de>
Fabio Estevam [Wed, 27 May 2015 04:11:48 +0000 (01:11 -0300)]
warp: Fix the 'saveenv' command
After the mx6 config consolidation, 'save' command is no longer
recognized.
Pass the full command name 'saveenv' instead.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Fabio Estevam [Wed, 27 May 2015 04:11:47 +0000 (01:11 -0300)]
warp: Add fuse command support
Select the fuse command support.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Fabio Estevam [Wed, 27 May 2015 04:11:46 +0000 (01:11 -0300)]
warp: Enable CONFIG_SUPPORT_EMMC_BOOT
CONFIG_SUPPORT_EMMC_BOOT is important to enable the boot partition via
'mmc partconf 0 1 1 0' command, for example.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Fabio Estevam [Wed, 27 May 2015 04:11:45 +0000 (01:11 -0300)]
warp: Fix CONFIG_SYS_FSL_ESDHC_ADDR
Warp uses eMMC connected to esdhc2 port, so fix
CONFIG_SYS_FSL_ESDHC_ADDR to reflect that.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Fabio Estevam [Wed, 27 May 2015 04:11:44 +0000 (01:11 -0300)]
warp: Adjust CONFIG_SYS_DFU_DATA_BUF_SIZE
Adjust CONFIG_SYS_DFU_DATA_BUF_SIZE in order to avoid the following error
when running the dfu command:
=> dfu 0 mmc 0
dfu_get_buf: Could not memalign 0x2000000 bytes
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Tim Harvey [Fri, 8 May 2015 22:17:10 +0000 (15:17 -0700)]
pci: imx: display message if no pcie link
If CONFIG_PCI_SCAN_SHOW enabled then lets print a message of no link was
detected.
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Stefano Babic [Thu, 28 May 2015 10:00:05 +0000 (12:00 +0200)]
Revert "imx: drop warning: unused variable 'max_freq'"
This reverts commit
a0117a5e416629932becf079589f5e1859eab90a.
Signed-off-by: Stefano Babic <sbabic@denx.de>
Stefano Babic [Tue, 26 May 2015 17:53:41 +0000 (19:53 +0200)]
imx: drop warning: unused variable 'max_freq'
max_freq in print_cpuinfo is used only with
imx6.
Signed-off-by: Stefano Babic <sbabic@denx.de>
Tom Rini [Tue, 26 May 2015 14:38:01 +0000 (10:38 -0400)]
Merge branch 'master' of git://denx.de/git/u-boot-imx
Tom Rini [Tue, 26 May 2015 14:37:29 +0000 (10:37 -0400)]
Merge branch 'zynq' of git://denx.de/git/u-boot-microblaze
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Tom Rini [Mon, 25 May 2015 01:01:30 +0000 (21:01 -0400)]
Merge git://git.denx.de/u-boot-nand-flash
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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
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>
Stephen Warren [Tue, 14 Apr 2015 14:59:00 +0000 (08:59 -0600)]
nand: fix buffer alignment in new verification feature
On systems with caches enabled, NAND I/O may need to flush/invalidate
the cache during read/write operations. For this to work correctly, all
buffers must be cache-aligned. Fix nand_verify*() to allocate aligned
buffers.
This prevents cache alignment warnings from being spewed when using
U-Boot to write an updated version of itself to flash on NVIDIA Tegra
Seaboard (after perturbation of stack/data layout in current
u-boot-dm/next branch).
I have validatd (executed) nand_verify(), but I don't think I've executed
nand_verify_page_oob(); testing of that would be useful.
Cc: Peter Tyser <ptyser@xes-inc.com>
Cc: Heiko Schocher <hs@denx.de>
Cc: Scott Wood <scottwood@freescale.com>
Fixes: 59b5a2ad83df ("nand: Add verification functions")
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Scott Wood <scottwood@freescale.com>
Tim Harvey [Sat, 9 May 2015 01:28:42 +0000 (18:28 -0700)]
imx: ventana: config: enable Falcon mode
Falcon mode entails the SPL booting the OS directly instead of U-Boot.
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Fabio Estevam [Mon, 11 May 2015 23:50:22 +0000 (20:50 -0300)]
wandboard: Switch to SPL support
Currently we need to build one U-boot image for each of the wandboard
variants: quad, dual-lite and solo.
By switching to SPL we can support all these variants with a single binary,
which is very convenient.
Based on the work from Richard Hu.
Tested kernel booting on the three boards.
Signed-off-by: Richard Hu <hakahu@gmail.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Tested-by: Vagrant Cascadian <vagrant@aikidev.net>
Reviewed-by: Stefano Babic <sbabic@denx.de>
Joe Hershberger [Wed, 20 May 2015 19:27:39 +0000 (14:27 -0500)]
sandbox: Enable env unit tests
Enable the new env unit tests on sandbox.
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Joe Hershberger [Wed, 20 May 2015 19:27:38 +0000 (14:27 -0500)]
test: env: Add a test of the new regex behavior for attrs
The behavior of the env attrs depends on CONFIG_REGEX. Add an additional
test if that variable is set.
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Joe Hershberger [Wed, 20 May 2015 19:27:37 +0000 (14:27 -0500)]
test: env: Add test for verifying env attrs
Add a test of the env_attr_lookup() function.
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Joe Hershberger [Wed, 20 May 2015 19:27:36 +0000 (14:27 -0500)]
test: env: Add test framework for env
Add a new "env" subcommand to the ut command.
This will run unit tests on the env code. This should be targetable to
any device that supports the env features needed for the tests.
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Joe Hershberger [Wed, 20 May 2015 19:27:35 +0000 (14:27 -0500)]
test: dm: Recover the driver model tree after tests
Put the driver model for the system back into a good state after
completing the DM testing.
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: Simon Glass <sjg@chromium.org>
Joe Hershberger [Wed, 20 May 2015 19:27:34 +0000 (14:27 -0500)]
test: Return values from the asserts compatible with cmds
The asserts are sometimes called from the context of the test command
itself so make sure that a return that happens as a result of a failure
is compatible with that command return. When called within a test, the
return value is ignored.
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Joe Hershberger [Wed, 20 May 2015 19:27:33 +0000 (14:27 -0500)]
test: dm: eth: Handle failed test env cleanup
Make sure that the env gets cleaned up after a test fails so that other
tests aren't affected.
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Joe Hershberger [Wed, 20 May 2015 19:27:32 +0000 (14:27 -0500)]
test: dm: Don't bail on all tests if one test fails
There's not much point in having a failure count if we always give up on
the first failure. Also stop clearing the entire state between tests.
Make sure that any failures are still passed out to the command line.
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Joe Hershberger [Wed, 20 May 2015 19:27:31 +0000 (14:27 -0500)]
test: Move the unit tests to their own menu
Make all unit tests selectable as a menu of test suites instead of just
sitting in the top-level menu individually.
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: Simon Glass <sjg@chromium.org>
Joe Hershberger [Wed, 20 May 2015 19:27:30 +0000 (14:27 -0500)]
test: dm: Move the time test over to the ut command
Unify the command for running unit tests further by moving the "ut_time"
command over to "ut time".
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Joe Hershberger [Wed, 20 May 2015 19:27:29 +0000 (14:27 -0500)]
test: dm: Move the dm tests over to the ut command
Unify the command for running unit tests further by moving the "dm test"
command over to "ut dm".
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: Simon Glass <sjg@chromium.org>
Joe Hershberger [Wed, 20 May 2015 19:27:28 +0000 (14:27 -0500)]
test: Add a common unit test command
Add a command that all other unit tests should be a sub-command of.
Also include a command that will run all tests.
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: Simon Glass <sjg@chromium.org>
Joe Hershberger [Wed, 20 May 2015 19:27:27 +0000 (14:27 -0500)]
test: Generalize the unit test framework
Separate the ability to define tests and assert status of test functions
from the dm tests so they can be used more consistently throughout all
tests.
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Joe Hershberger [Wed, 20 May 2015 19:27:26 +0000 (14:27 -0500)]
net: Handle ethaddr changes as an env callback
When the ethaddr is changed in the env, update the device pdata at the
same time (only if it is probed for the DM case; only if registered for
the non-DM case). Again this gets us closer to completely non-polled
env needed to simplify the net_loop.
This requires that the NET feature select the REGEX feature.
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Joe Hershberger [Wed, 20 May 2015 19:27:25 +0000 (14:27 -0500)]
net: Remove duplicate bootfile syncing functionality
The bootfile env var is already kept up to date by the callback in net.c
so there is no need to poll it too.
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Joe Hershberger [Wed, 20 May 2015 19:27:24 +0000 (14:27 -0500)]
net: Add default flags for common net env vars
Check that the common network stack's env vars conform to the proper
format for IP addresses.
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Joe Hershberger [Wed, 20 May 2015 19:27:23 +0000 (14:27 -0500)]
net: Use env callbacks for net variables
Instead of checking for changes to the env each time we enter the
net_loop, use the env callbacks to update the values of the variables.
Don't update the variables when the source was programmatic, since the
variables were the source of the new value.
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Joe Hershberger [Wed, 20 May 2015 19:27:22 +0000 (14:27 -0500)]
net: Apply default format rules to all ethaddr
Use a regular expression to apply the default formatting flags for all
ethaddr env vars.
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Joe Hershberger [Wed, 20 May 2015 19:27:21 +0000 (14:27 -0500)]
env: Distinguish finer between source of env change
We already could tell the difference in the callback between an import
and "other" which we called interactive. Now add further distinction
between interactive (i.e. running env set / env edit / env ask / etc.
from the U-Boot command line) and programmatic (i.e. when u-boot source
calls any variant of setenv() ).
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Joe Hershberger [Wed, 20 May 2015 19:27:20 +0000 (14:27 -0500)]
env: Add regex support to env_attrs
Allow the features that use env_attrs to specify regexs for the name
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Joe Hershberger [Wed, 20 May 2015 19:27:19 +0000 (14:27 -0500)]
env: Allow env_attr_walk to pass a priv * to callback
In some cases it can be helpful to have context in the callback about
the calling situation. This is needed for following patches.
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Joe Hershberger [Wed, 20 May 2015 19:27:18 +0000 (14:27 -0500)]
env: Simplify the reverse_strstr() interface
The logic to find the whole matching name was split needlessly between
the reverse_strstr function and its caller. Fully contain it to make the
interface for calling it more consistent.
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Joe Hershberger [Wed, 20 May 2015 19:27:17 +0000 (14:27 -0500)]
env: Fix return values in env_attr_lookup()
This function returned numbers for error codes. Change them to error
codes.
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Joe Hershberger [Wed, 20 May 2015 19:27:16 +0000 (14:27 -0500)]
sandbox: Enable some ENV commands
Enable some additional ENV commands in sandbox to aid in build testing
and run testing.
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Joe Hershberger [Wed, 20 May 2015 19:27:15 +0000 (14:27 -0500)]
sandbox: Use defconfig to enable features
Stop using the sandbox arch Kconfig to override defaults for config
options. This is a bit of abuse and may be causing build problems.
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Joe Hershberger [Wed, 20 May 2015 19:27:14 +0000 (14:27 -0500)]
sandbox: Cleanup order and extra defines in defconfig
The defconfigs should not be edited directly. They should be generated
by editing the .config (through menuconfig or whatever) and then run
make savedefconfig to have the Kconfig system generate a clean defconfig
I did this for sandbox here with no actual changes.
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Glass <sjg@chromium.org>