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>
Tom Rini [Wed, 20 May 2015 19:57:55 +0000 (15:57 -0400)]
Merge git://git.denx.de/u-boot-net
Masahiro Yamada [Fri, 15 May 2015 02:51:32 +0000 (11:51 +0900)]
README.scrapyard: add entries for dead board, T4240EMU and sc3
Follow-up commit
7fc63cca611b (mpc85xx/T4240EMU: Remove T4240EMU
board), and commit
27e721564591 (ppc4xx: Remove sc3 board),
filling the blank fields.
Reviewed-by: Stefan Roese <sr@denx.de>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
York Sun [Wed, 29 Apr 2015 17:35:35 +0000 (10:35 -0700)]
arm/ls1021a: Remove ccsr_ddr from immap_ls102xa.h
ccsr_ddr structure is already defined in fsl_immap.h. Remove
this duplicated define. Move fixed timing into ls1021atwr.h.
Signed-off-by: York Sun <yorksun@freescale.com>
CC: Alison Wang <alison.wang@freescale.com>
Acked-by: Alison Wang <alison.wang@freescale.com>
York Sun [Tue, 28 Apr 2015 21:23:14 +0000 (14:23 -0700)]
driver/ddr/fsl: Remove deskew_cntrl register
This register is reserved and shouldn't have been exposed.
Accessing it may have unexpected result on different SoCs.
Signed-off-by: York Sun <yorksun@freescale.com>
Alison Wang [Tue, 21 Apr 2015 08:04:38 +0000 (16:04 +0800)]
arm: ls102xa: Adjust the load address of U-Boot for NOR boot
The original load address of U-Boot is 0x67f80000. The address
space of NOR flash is 0x60000000 to 0x67ffffff. It will cause
the size of u-boot couldn't be larger than 512K. As more features
are supported in u-boot, the size of u-boot is larger than 512K.
To fix this issue, the load address of U-Boot for NOR boot is
adjusted to 0x60100000.
In RCW, the PBI command needs to change as follows:
.pbi
-write 0xee0200, 0x67f80000
+write 0xee0200, 0x60100000
.end
Signed-off-by: Alison Wang <alison.wang@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
Joe Hershberger [Mon, 4 May 2015 19:55:15 +0000 (14:55 -0500)]
net: Remove all calls to net_random_ethaddr()
Remove the calls to net_random_ethaddr() that some boards and some
drivers are calling. This is now implemented inside of net/eth.c
Enable the feature for all boards that previously enabled it.
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Acked-By: Michael Walle <michael@walle.cc> (for the lsxl board part)
Series-changes: 2
-Fixed bfin build errors
Joe Hershberger [Mon, 4 May 2015 19:55:14 +0000 (14:55 -0500)]
net: Remove all references to CONFIG_ETHADDR and friends
We really don't want boards defining fixed MAC addresses in their config
so we just remove the option to set it in a fixed way. If you must have
a MAC address that was not provisioned, then use the random MAC address
functionality.
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Joe Hershberger [Mon, 4 May 2015 19:55:13 +0000 (14:55 -0500)]
net: Implement random ethaddr fallback in eth.c
Implement the random ethaddr fallback in eth.c so it is in a common
place and not reimplemented in each board or driver that wants this
behavior.
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Michal Simek [Wed, 13 May 2015 11:40:40 +0000 (13:40 +0200)]
net: phy: Add support for all targets which requires MANUAL_RELOC
Targets with CONFIG_NEEDS_MANUAL_RELOC do not use REL/RELA
relocation (mostly only GOT) where functions aray are not
updated. This patch is fixing function pointers passed to phy_register
function.
This patch was tested on Microblaze architecture.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Shengzhou Liu [Fri, 24 Apr 2015 08:57:17 +0000 (16:57 +0800)]
net/phy: refactor RTL8211F initialization
RTL8211F needs to enalbe TXDLY for RGMII during
phy initialization, so move it to rtl8211f_config
for early initialization.
Signed-off-by: Shengzhou Liu <Shengzhou.Liu@freescale.com>
cc: Joe Hershberger <joe.hershberger@gmail.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Joe Hershberger [Tue, 24 Mar 2015 07:41:49 +0000 (02:41 -0500)]
net: Update hardware MAC address if it changes in env
When the ethaddr changes in the env, the hardware should also be updated
so that MAC filtering will work properly without resetting U-Boot.
Also remove the manual calls to set the hwaddr that was included in a
few drivers as a result of the framework not doing it.
Reported-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Tested-by: Michal Simek <michal.simek@xilinx.com>
Shengzhou Liu [Thu, 12 Mar 2015 10:54:59 +0000 (18:54 +0800)]
net/phy: Add support for realtek RTL8211F
RTL8211F has different registers from RTL8211E.
This patch adds support for RTL8211F PHY which
can be found on Freescale's T1023 RDB board.
Signed-off-by: Shengzhou Liu <Shengzhou.Liu@freescale.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Paul Kocialkowski [Sat, 16 May 2015 17:52:11 +0000 (19:52 +0200)]
sunxi: Cache line size definition
Sunxi platforms use ARM Cortex A8, A7 and A15 (unsupported yet) CPU cores,
which all have 64 bytes cache line size.
This is required to e.g. enable USB gadget.
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Paul Kocialkowski [Sat, 16 May 2015 17:52:10 +0000 (19:52 +0200)]
sunxi: VBUS detection function fixup in g_dnl_board_usb_cable_connected
sunxi_usbc_vbus_detect was renamed to sunxi_usb_phy_vbus_detect but
g_dnl_board_usb_cable_connected was still using the old name, breaking the build
when USB gadget is enabled.
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Hans de Goede [Thu, 14 May 2015 17:01:40 +0000 (19:01 +0200)]
sunxi: Add ga10h v1.1 defconfig
The ga10h is an 10" tablet with an A33 or A23 soc, 1G RAM, 8G or 16G nand,
sdio wifi, 2 micro usb ports, 1 otg and 1 host and 1 micro sd slot.
This commit adds a defconfig for the v1.1 pcb with an a33 soc.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
Hans de Goede [Thu, 14 May 2015 16:52:54 +0000 (18:52 +0200)]
sunxi: video: Fix lvds panel support for sun6i+
We've never tested the lvds panel support on sun6i+ SoCs until now, and
unsurprisingly the lvds code needed some fixes to work on my ga10h A33
tablet with lvds panel. This makes the panel on that tablet actually work.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
Hans de Goede [Wed, 13 May 2015 13:00:46 +0000 (15:00 +0200)]
sunxi: Make DRAM_ODT_EN Kconfig setting a bool
Make DRAM_ODT_EN Kconfig setting a bool, add a separate DRAM_ODT_CORRECTION
setting for A23 SoCs and use DRAM_ODT_EN Kconfig everywhere instead of
only in dram_sun4i.c and hardcoding odt_en elsewhere.
Note this commit makes no functional changes for existing boards,
its purpose is to allow changing the odt_en value on future A33 boards.
For sun4i/sun5i/sun7i boards which set DRAM_ODT_EN=y (which no defconfigs
currently do) this patch turns on odt for both the DQ and the DQS lines,
whereas previously it was possibly (but not desirable) to turn odt on only
for one of them by setting the in DRAM_ODT_EN option to 1 or 2 instead of 3.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Siarhei Siamashka <siarhei.siamashka@gmail.com>
Hans de Goede [Wed, 13 May 2015 12:54:16 +0000 (14:54 +0200)]
sunxi: Fix dram initialization not working on some a33 devices
When porting the allwinner dram init code to u-boot we missed some code
setting an extra bit when doing auto dram config.
This commits add this bit, fixing dram init not working on the ga10h
10" a33 tablet which I'm bringing up atm.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
Laurent Itti [Wed, 6 May 2015 00:02:00 +0000 (17:02 -0700)]
sunxi: add support for UART2 on A23/A33
Add support for UART2 (2-pin version but note that RTS/CTS pins are available
pn that port for possible future use), can be selected in config
by using CONFIG_CONS_INDEX=3
Signed-off-by: Laurent Itti <laurentitti@gmail.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Hans de Goede [Tue, 5 May 2015 11:13:36 +0000 (13:13 +0200)]
console: Fix pre-console flushing via cfb_console being very slow
On my A10 OlinuxIno Lime I noticed a huge (5+ seconds) delay coming from
console_init_r. This turns out to be caused by the preconsole buffer flushing
to the cfb_console. The Lime only has a 16 bit memory bus and that is already
heavy used to scan out the 1920x1080 framebuffer.
The problem is that print_pre_console_buffer() was printing the buffer once
character at a time and the cfb_console code then ends up doing a cache-flush
for touched display lines for each character.
This commit fixes this by first building a 0 terminated buffer and then
printing it in one puts() call, avoiding unnecessary cache flushes.
This changes the time for the flush from 5+ seconds to not noticable.
The downside of this approach is that the pre-console buffer needs to fit
on the stack, this is not that much to ask since we are talking about plain
text here. This commit also adjusts the sunxi CONFIG_PRE_CON_BUF_SZ to
actually fit on the stack. Sunxi currently is the only user of the pre-console
code so no other boards need to be adjusted.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Tom Rini <trini@konsulko.com>