]> code.ossystems Code Review - bsp/u-boot.git/log
bsp/u-boot.git
9 years agoimx: mx6sabresd: add i.MX6DQP Sabresd support
Peng Fan [Thu, 15 Oct 2015 10:05:59 +0000 (18:05 +0800)]
imx: mx6sabresd: add i.MX6DQP Sabresd support

Add i.MX6DQP-Sabresd board support:
1. set fdt_file according to board_rev which is set at runtime.
2. Add mx6dqp_ddr_ioregs and calibration value for this board.

Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
9 years agoimx35, flea3: add FIT image support
Heiko Schocher [Fri, 9 Oct 2015 04:24:59 +0000 (06:24 +0200)]
imx35, flea3: add FIT image support

add FIT image support for the flea3 board.

Signed-off-by: Heiko Schocher <hs@denx.de>
9 years agots4800: add CONFIG_OF_LIBFDT
Damien Riegel [Tue, 6 Oct 2015 21:33:28 +0000 (17:33 -0400)]
ts4800: add CONFIG_OF_LIBFDT

Linux only boots IMX.51-based boards with device tree, so this board
would benefit from supporting it.

Signed-off-by: Damien Riegel <damien.riegel@savoirfairelinux.com>
Cc: Stefano Babic <sbabic@denx.de>
9 years agoarm, imx6, aristainetos2: set gpr register after reset
Heiko Schocher [Fri, 25 Sep 2015 10:31:49 +0000 (12:31 +0200)]
arm, imx6, aristainetos2: set gpr register after reset

setting the gpr 1,8 and 12 registers to a fix value.
This is needed because after a WDT reset, this registers
are not correct resettet, and prevent linux from booting
again.

Signed-off-by: Heiko Schocher <hs@denx.de>
9 years agoarm, imx: add some gpr register defines
Heiko Schocher [Fri, 25 Sep 2015 10:31:48 +0000 (12:31 +0200)]
arm, imx: add some gpr register defines

add some missing gpr register defines.

Signed-off-by: Heiko Schocher <hs@denx.de>
9 years agodriver: misc: add MXC_OCOTP Kconfig entry
Peng Fan [Thu, 27 Aug 2015 06:49:05 +0000 (14:49 +0800)]
driver: misc: add MXC_OCOTP Kconfig entry

Add MXC_OCOTP Kconfig entry.

Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
9 years agoimx-common: timer: clean up code
Peng Fan [Wed, 26 Aug 2015 07:40:58 +0000 (15:40 +0800)]
imx-common: timer: clean up code

We can reuse common functions in lib/time.c, but not reimplement
functions in imx-common/time.c.
Only keep timer_init ,get_tbclk and implement timer_read_counter in
imx-common/time.c.

Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
9 years agocgtqmx6eval: Fix SPL support
Otavio Salvador [Thu, 29 Oct 2015 21:53:57 +0000 (19:53 -0200)]
cgtqmx6eval: Fix SPL support

The patchset had some changes for approval on the U-Boot. Basically:

- Add missing CONFIG_BOARD_LATE_INIT
- Fix checkpatch error

This patch integrate those changes on this forked version.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
9 years agocgtqmx6eval: Add DFU support
Otavio Salvador [Tue, 20 Oct 2015 15:05:43 +0000 (13:05 -0200)]
cgtqmx6eval: Add DFU support

Add MMC and SPI DFU support.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
9 years agoiomux-v3: Take MX6D in consideration for imx_iomux_v3_setup_pad()
Otavio Salvador [Tue, 20 Oct 2015 15:05:23 +0000 (13:05 -0200)]
iomux-v3: Take MX6D in consideration for imx_iomux_v3_setup_pad()

We should also take MX6D option in consideration when defining
imx_iomux_v3_setup_pad().

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
9 years agocgtqmx6eval: Add SPL support
Otavio Salvador [Tue, 20 Oct 2015 15:01:44 +0000 (13:01 -0200)]
cgtqmx6eval: Add SPL support

Congatec has several MX6 boards based on quad, dual, dual-lite and solo.

Add SPL support so that all the variants can be supported.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
9 years agocgtqmx6eval: Add fastboot support
Otavio Salvador [Tue, 20 Oct 2015 14:58:47 +0000 (12:58 -0200)]
cgtqmx6eval: Add fastboot support

Tested basic fastboot commands, such as:

On the U-boot prompt:

=> fastboot 0

On the host PC:

$ fastboot getvar bootloader-version -i 0x0525
bootloader-version: U-Boot 2015.10-rc2-09654-g8f41d27
finished. total time: 0.000s

$ fastboot reboot -i 0x0525 --> board reboots fine.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
9 years agocgtqmx6eval: Use SPI NOR to store the environment
Otavio Salvador [Tue, 20 Oct 2015 14:58:31 +0000 (12:58 -0200)]
cgtqmx6eval: Use SPI NOR to store the environment

Congatec boards boot from SPI NOR, so it makes more sense to use
SPI NOR to store the environment variables.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
9 years agocgtqmx6eval: Add SPI NOR flash support
Otavio Salvador [Tue, 20 Oct 2015 14:58:05 +0000 (12:58 -0200)]
cgtqmx6eval: Add SPI NOR flash support

Add SPI NOR support:

=> sf probe
SF: Detected SST25VF032B with page size 256 Bytes, erase size 4 KiB, total 4 MiB

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
9 years agospi: Add SPI NOR protection mechanism
Fabio Estevam [Fri, 16 Oct 2015 20:19:47 +0000 (17:19 -0300)]
spi: Add SPI NOR protection mechanism

Many SPI flashes have protection bits (BP2, BP1 and BP0) in the
status register that can protect selected regions of the SPI NOR.

Take these bits into account when performing erase operations,
making sure that the protected areas are skipped.

Tested on a mx6qsabresd:

=> sf probe
SF: Detected M25P32 with page size 256 Bytes, erase size 64 KiB, total 4 MiB
=> sf protect lock  0x3f0000 0x10000
=> sf erase 0x3f0000 0x10000
offset 0x3f0000 is protected and cannot be erased
SF: 65536 bytes @ 0x3f0000 Erased: ERROR
=> sf protect unlock  0x3f0000 0x10000
=> sf erase 0x3f0000 0x10000
SF: 65536 bytes @ 0x3f0000 Erased: OK

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
9 years agospi: sf_ops: Add SPI protection mechanism from the kernel
Fabio Estevam [Fri, 16 Oct 2015 16:33:30 +0000 (13:33 -0300)]
spi: sf_ops: Add SPI protection mechanism from the kernel

Add the SPI NOR protection mechanism from the kernel.

This code is based on the work from Brian Norris <computersforpeace@gmail.com>

https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/commit/drivers/mtd/spi-nor/spi-nor.c?id=62593cf40b23b523b9fc9334ca61ba6c595ebb09

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
9 years agopowerpc: Remove __ilog2_u64 and ffs4 from bitops
Fabio Estevam [Sat, 24 Oct 2015 15:09:00 +0000 (13:09 -0200)]
powerpc: Remove __ilog2_u64 and ffs4 from bitops

Remove __ilog2_u64 and ffs4 from powerpc bitops to align with the
kernel implementation.

Use the generic __ffs64 instead of a custom powerpc implementation.

Cc: York Sun <yorksun@freescale.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
9 years agocompat: Remove is_power_of_2() definition
Fabio Estevam [Sat, 24 Oct 2015 15:26:45 +0000 (13:26 -0200)]
compat: Remove is_power_of_2() definition

Use the is_power_of_2() definition from log2.h to align with the
kernel implementation.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
9 years agonios2: Use the generic bitops headers
Fabio Estevam [Mon, 26 Oct 2015 15:11:13 +0000 (13:11 -0200)]
nios2: Use the generic bitops headers

The generic bitops headers are required when calling logarithimic
functions, such as ilog2().

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
9 years agonds32: Use the generic bitops headers
Fabio Estevam [Mon, 26 Oct 2015 15:10:15 +0000 (13:10 -0200)]
nds32: Use the generic bitops headers

The generic bitops headers are required when calling logarithimic
functions, such as ilog2().

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
9 years agoopenrisc: Use the generic bitops headers
Fabio Estevam [Mon, 26 Oct 2015 15:08:17 +0000 (13:08 -0200)]
openrisc: Use the generic bitops headers

The generic bitops headers are required when calling logarithimic
functions, such as ilog2().

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
9 years agosparc: Use the generic bitops headers
Fabio Estevam [Mon, 26 Oct 2015 15:03:42 +0000 (13:03 -0200)]
sparc: Use the generic bitops headers

The generic bitops headers are required when calling logarithimic
functions, such as ilog2().

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
9 years agosandbox: Use the generic bitops headers
Fabio Estevam [Sat, 24 Oct 2015 11:37:59 +0000 (09:37 -0200)]
sandbox: Use the generic bitops headers

The generic bitops headers are required when calling logarithimic
functions, such as ilog2().

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
9 years agosh: bitops: Use the generic bitops headers
Fabio Estevam [Sat, 24 Oct 2015 11:36:58 +0000 (09:36 -0200)]
sh: bitops: Use the generic bitops headers

The generic bitops headers are required when calling logarithimic
functions, such as ilog2().

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
9 years agoblackfin: bitops: Use the generic bitops headers
Fabio Estevam [Sat, 24 Oct 2015 11:33:43 +0000 (09:33 -0200)]
blackfin: bitops: Use the generic bitops headers

The generic bitops headers are required when calling logarithimic
functions, such as ilog2().

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
9 years agom68k: bitops: Use the generic bitops headers
Fabio Estevam [Fri, 23 Oct 2015 22:31:53 +0000 (20:31 -0200)]
m68k: bitops: Use the generic bitops headers

The generic bitops headers are required when calling logarithimic
functions, such as ilog2().

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
9 years agox86: bitops: Use the generic bitops headers
Fabio Estevam [Fri, 23 Oct 2015 22:29:12 +0000 (20:29 -0200)]
x86: bitops: Use the generic bitops headers

Use the generic bitops and also add custom __ffs() implementation
as per the kernel.

Also align the ffs() implementation with the kernel.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
9 years agoARM: bitops: Use the generic bitops headers
Fabio Estevam [Sat, 24 Oct 2015 11:48:32 +0000 (09:48 -0200)]
ARM: bitops: Use the generic bitops headers

The generic bitops headers are required when calling logarithimic
functions, such as ilog2().

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
9 years agoinclude: Add generic bitops headers
Fabio Estevam [Sun, 25 Oct 2015 16:56:19 +0000 (14:56 -0200)]
include: Add generic bitops headers

Use the generic bitops header files from the kernel.

Imported from kernel 4.2.3.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
9 years agoinclude: Add log2 header from the kernel
Fabio Estevam [Fri, 23 Oct 2015 14:59:48 +0000 (12:59 -0200)]
include: Add log2 header from the kernel

Use the log2 header files from the kernel.

Imported from kernel 4.2.3.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
9 years agoconfig_distro_bootcmd.h: Use a private variable for bootpart
Sjoerd Simons [Fri, 28 Aug 2015 13:01:54 +0000 (15:01 +0200)]
config_distro_bootcmd.h: Use a private variable for bootpart

Hush has an oddity where using ${var} causes var to resolved in the the global
address space (iotw the environment) first and only afterwards will the local
variable space be searched.

This causes odd side-effects when iterating over the boot partitions
using ${bootpart} if the environment also has a bootpart variable (e.g. for
the various TI boards). Fix this by using the hopefully more unique
${distro_bootpart} instead of ${bootpart}.

Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
9 years agolinux/bitops.h: GENMASK copy from linux
Jagan Teki [Wed, 21 Oct 2015 11:16:51 +0000 (16:46 +0530)]
linux/bitops.h: GENMASK copy from linux

GENMASK is used to create a contiguous bitmask([hi:lo]).

This patch is a copy from Linux, with below commit details
"bitops: Fix shift overflow in GENMASK macros"
(sha1: 00b4d9a14125f1e51874def2b9de6092e007412d)

Cc: Tom Rini <trini@konsulko.com>
Cc: Masahiro Yamada <yamada.m@jp.panasonic.com>
Signed-off-by: Jagan Teki <jteki@openedev.com>
9 years agolinux/bitops: Move BIT definitions at top
Jagan Teki [Wed, 21 Oct 2015 12:00:34 +0000 (17:30 +0530)]
linux/bitops: Move BIT definitions at top

Since it's a copy from Linux, this patch moved all
BIT definitions to top so-that it looks same as Linux file.

Cc: Tom Rini <trini@konsulko.com>
Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
Signed-off-by: Jagan Teki <jteki@openedev.com>
9 years agofastboot: Implement OEM format only when we have MMC support
Maxime Ripard [Thu, 15 Oct 2015 20:04:04 +0000 (22:04 +0200)]
fastboot: Implement OEM format only when we have MMC support

The current fastboot support assumes that CONFIG_FASTBOOT_FLASH implies
that we have an MMC in our system, which might not be the case if we have
some other storage device.

Change the configuration option protecting that call to
FASTBOOT_FLASH_MMC_DEV, that makes much more sense.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
9 years agoMerge tag 'v2015.10' into 2015.10+fslc
Otavio Salvador [Wed, 21 Oct 2015 01:18:30 +0000 (23:18 -0200)]
Merge tag 'v2015.10' into 2015.10+fslc

Prepare v2015.10

* tag 'v2015.10': (38 commits)
  Prepare v2015.10
  powerpc: Drop old non-generic-board code
  sbc8641d: enable and test CONFIG_SYS_GENERIC_BOARD
  sbc8641d: increase monitor size from 256k to 384k
  sbc8641d: add basic flash setup instructions to README file
  sbc8641d: set proper environment sector size.
  sbc8641d: increase malloc pool size to a sane default
  sbc8641d: enable command line editing
  image-fit: Fix signature checking
  igep00x0: Use BCH8 ECC
  vexpress64: Juno: Add initialisation code for Juno R1 PCIe host bridge.
  vexpress64: Juno: Declare all 8GB of RAM and make them visible to the kernel.
  dfu: dfu_sf: Take the start address into account
  dfu: dfu_sf: Use the erase sector size for erase operations
  doc/README.scrapyard: Add more entries
  Revert "arm: Remove inetspace_v2_cmc board"
  Revert "arm: Remove d2net_v2 defconfig file"
  doc/README.scrapyard: Populate recent removals
  ARM: rpi: add another revision of Raspberry Pi A+
  ARM: dockstar: move start of environment area
  ...

9 years agoPrepare v2015.10 v2015.10
Tom Rini [Mon, 19 Oct 2015 22:46:28 +0000 (18:46 -0400)]
Prepare v2015.10

Signed-off-by: Tom Rini <trini@konsulko.com>
9 years agopowerpc: Drop old non-generic-board code
Simon Glass [Sat, 17 Oct 2015 18:58:50 +0000 (12:58 -0600)]
powerpc: Drop old non-generic-board code

This code is no-longer used. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agosbc8641d: enable and test CONFIG_SYS_GENERIC_BOARD
Paul Gortmaker [Sat, 17 Oct 2015 20:40:30 +0000 (16:40 -0400)]
sbc8641d: enable and test CONFIG_SYS_GENERIC_BOARD

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
9 years agosbc8641d: increase monitor size from 256k to 384k
Paul Gortmaker [Sat, 17 Oct 2015 20:40:31 +0000 (16:40 -0400)]
sbc8641d: increase monitor size from 256k to 384k

Between v2015.07-rc1 and v2015.07-rc2 this board started
silent boot failure.  A bisect led to commit 6eed3786c68c8a49d
("net: Move the CMD_NET config to defconfigs").  This commit
looks harmless in itself, but it did implicitly add a feature
to the image which led to this:

 u-boot$git describe 6eed3786c68c8a49d
 v2015.07-rc1-412-g6eed3786c68c
              ^^^

 u-boot$ls -l ../41*/u-boot.bin
 -rwxrwxr-x 1 paul paul 261476 Oct 16 16:47 ../411/u-boot.bin
 -rwxrwxr-x 1 paul paul 266392 Oct 16 16:43 ../412/u-boot.bin
 u-boot$bc
 bc 1.06.95
 Copyright 1991-1994, 1997, 1998, 2000, 2004, 2006 Free Software Foundation, Inc.
 This is free software with ABSOLUTELY NO WARRANTY.
 For details type `warranty'.
 256*1024
 262144

i.e. we finally broke through the 256k monitor size.  Jump it
up to 384k and fix the hard coded value used in the env offset
at the same time.

We were probably flirting with the 256k size issue without
knowing it when testing on different baselines in earlier
commits, but since this is all board specific, a rebase or
reorder to put this commit 1st is of little value.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
9 years agosbc8641d: add basic flash setup instructions to README file
Paul Gortmaker [Sat, 17 Oct 2015 20:40:29 +0000 (16:40 -0400)]
sbc8641d: add basic flash setup instructions to README file

...so that I don't have to go work them out from scratch again
by peering at the manual.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
9 years agosbc8641d: set proper environment sector size.
Paul Gortmaker [Sat, 17 Oct 2015 20:40:28 +0000 (16:40 -0400)]
sbc8641d: set proper environment sector size.

When debugging an env fail due to too small a malloc pool, it
was noted that the env write was 256k.  But the device sector
size is 1/2 that, as can be seen from "fli" output:

Bank # 1: CFI conformant flash (16 x 16)  Size: 16 MB in 131 Sectors
  Intel Extended command set, Manufacturer ID: 0x89, Device ID: 0x1888
  Erase timeout: 4096 ms, write timeout: 1 ms
  Buffer write timeout: 2 ms, buffer size: 64 bytes

  Sector Start Addresses:
  FF000000 E RO   FF020000 E RO   FF040000 E RO   FF060000 E RO   FF080000 E RO
  FF0A0000 E RO   FF0C0000 E RO   FF0E0000 E RO   FF100000 E RO   FF120000 E RO
  [...]
  FFF00000   RO   FFF20000   RO   FFF40000   RO   FFF60000   RO   FFF80000   RO
  FFFA0000   RO   FFFC0000   RO   FFFE0000 E RO   FFFE8000   RO   FFFF0000 E RO
  FFFF8000   RO
=>

The desired env sector is FFF40000->FFF60000, or 0x20000 in length,
just after the 256k u-boot image which starts @ FFF00000.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
9 years agosbc8641d: increase malloc pool size to a sane default
Paul Gortmaker [Sat, 17 Oct 2015 20:40:27 +0000 (16:40 -0400)]
sbc8641d: increase malloc pool size to a sane default

Currently the board fails to save its env, since the env size
is much smaller than the sector size, and the malloc fails for
the pad buffer, giving the user visible symptom of:

Unable to save the rest of sector (253952)

Allow for 1M malloc pool, the same as used on the sbc8548 board.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
9 years agosbc8641d: enable command line editing
Paul Gortmaker [Sat, 17 Oct 2015 20:40:26 +0000 (16:40 -0400)]
sbc8641d: enable command line editing

It is just too painful to use interactively without it.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
9 years agoimage-fit: Fix signature checking
Andrej Rosano [Wed, 14 Oct 2015 15:45:40 +0000 (17:45 +0200)]
image-fit: Fix signature checking

On signature verification failures fit_image_verify() should
exit with error.

Signed-off-by: Andrej Rosano <andrej@inversepath.com>
9 years agoigep00x0: Use BCH8 ECC
Ladislav Michl [Mon, 12 Oct 2015 16:09:14 +0000 (18:09 +0200)]
igep00x0: Use BCH8 ECC

Used NAND chips requires at least 4-bit error correction, so use BCH8
as it is what kernel uses.

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
Acked-by: Javier Martinez Canillas <javier@osg.samsung.com>
9 years agovexpress64: Juno: Add initialisation code for Juno R1 PCIe host bridge.
Liviu Dudau [Mon, 19 Oct 2015 10:08:32 +0000 (11:08 +0100)]
vexpress64: Juno: Add initialisation code for Juno R1 PCIe host bridge.

Juno R1 has an XpressRICH3 PCIe host bridge that needs to be initialised
in order for the Linux kernel to be able to enumerate the bus. Add
support code here that enables the host bridge, trains the links and
sets up the Address Translation Tables.

Signed-off-by: Liviu Dudau <Liviu.Dudau@foss.arm.com>
Tested-by: Ryan Harkin <ryan.harkin@linaro.org>
[trini: Always declare vexpress64_pcie_init and continue handling logic
inside the function]
Signed-off-by: Tom Rini <trini@konsulko.com>
9 years agovexpress64: Juno: Declare all 8GB of RAM and make them visible to the kernel.
Liviu Dudau [Mon, 19 Oct 2015 10:08:31 +0000 (11:08 +0100)]
vexpress64: Juno: Declare all 8GB of RAM and make them visible to the kernel.

Juno comes with 8GB RAM, but U-Boot only passes 2GB to the kernel.
Declare a secondary memory bank and set the sizes correctly.

Signed-off-by: Liviu Dudau <Liviu.Dudau@foss.arm.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Ryan Harkin <ryan.harkin@linaro.org>
Tested-by: Ryan Harkin <ryan.harkin@linaro.org>
9 years agodfu: dfu_sf: Take the start address into account
Fabio Estevam [Wed, 23 Sep 2015 03:50:39 +0000 (00:50 -0300)]
dfu: dfu_sf: Take the start address into account

The dfu_alt_info_spl variable allows passing a starting point
for the binary to be flashed in the SPI NOR.

For example, if we have 'dfu_alt_info_spl=spl raw 0x400', this means
that we want to flash the binary starting at address 0x400.

In order to do so we need to erase the entire sector and write to
the the subsequent SPI NOR sectors taking such start address
into account for the address calculations.

Tested by succesfully writing SPL binary into 0x400 offset and
the u-boot.img at offset 64 kiB of a SPL NOR.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Lukasz Majewski <l.majewski@samsung.com>
[trini: Use lldiv for the math]
Signed-off-by: Tom Rini <trini@konsulko.com>
9 years agodfu: dfu_sf: Use the erase sector size for erase operations
Fabio Estevam [Tue, 22 Sep 2015 03:55:00 +0000 (00:55 -0300)]
dfu: dfu_sf: Use the erase sector size for erase operations

SPI NOR flashes need to erase the entire sector size and we cannot pass
any arbitrary length for the erase operation.

To illustrate the problem:

Copying data from PC to DFU device
Download    [=========================] 100%       478208 bytes
Download done.
state(7) = dfuMANIFEST, status(0) = No error condition is present
state(10) = dfuERROR, status(14) = Something went wrong, but the
device does not know what it was
Done!

In this case, the binary has 478208 bytes and the M25P32 SPI NOR
has an erase sector of 64kB.

478208  = 7 entire sectors of 64kiB + 19456 bytes.

Erasing the first seven 64 kB sectors works fine, but when trying
to erase the remainding 19456 causes problem and the board hangs.

Fix the issue by always erasing with the erase sector size.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Lukasz Majewski <l.majewski@samsung.com>
9 years agodoc/README.scrapyard: Add more entries
Tom Rini [Mon, 19 Oct 2015 17:32:09 +0000 (13:32 -0400)]
doc/README.scrapyard: Add more entries

- Add deletions from August 30 2015.
- A few from Sept 12, one from Oct 2nd.

Signed-off-by: Tom Rini <trini@konsulko.com>
9 years agoRevert "arm: Remove inetspace_v2_cmc board"
Tom Rini [Mon, 19 Oct 2015 16:24:52 +0000 (12:24 -0400)]
Revert "arm: Remove inetspace_v2_cmc board"

Upon further review when populating README.scrapyard, inetspace_v2_cmc
is a variant on netspace_v2 and not just an orphan config.

This reverts commit 653600a715db49859c06ba5dfb858c15c4108d54.

Signed-off-by: Tom Rini <trini@konsulko.com>
9 years agoMerge branch 'master' of git://git.denx.de/u-boot-arm
Tom Rini [Mon, 19 Oct 2015 15:30:38 +0000 (11:30 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-arm

9 years agoRevert "arm: Remove d2net_v2 defconfig file"
Tom Rini [Mon, 19 Oct 2015 15:20:54 +0000 (11:20 -0400)]
Revert "arm: Remove d2net_v2 defconfig file"

Upon further review when populating README.scrapyard, d2net_v2 is a
variant on net2big_v2 and not just an orphan config.  To help in the
future also add this to board/LaCie/net2big_v2/MAINTAINERS which needed
a little consolidation anyhow.

This reverts commit 1363740e7948a8e4bee8d5adcdf0f63f7782879d.

Cc: Simon Guinot <simon.guinot@sequanux.org>
Cc: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
9 years agodoc/README.scrapyard: Populate recent removals
Tom Rini [Mon, 19 Oct 2015 15:05:47 +0000 (11:05 -0400)]
doc/README.scrapyard: Populate recent removals

Add in the commit IDs / dates for boards removed on Sept 2nd.

Signed-off-by: Tom Rini <trini@konsulko.com>
9 years agoARM: rpi: add another revision of Raspberry Pi A+
Lubomir Rintel [Wed, 14 Oct 2015 15:17:54 +0000 (17:17 +0200)]
ARM: rpi: add another revision of Raspberry Pi A+

Seen this one in the wild. Is labelled "Raspberry Pi Model A+ V1.1,
(C) Raspberry Pi 2014". A standard A+ board, much like the one with
version 0x12, didn't notice any differencies.

Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
9 years agoARM: dockstar: move start of environment area
Eric Cooper [Mon, 12 Oct 2015 23:18:52 +0000 (19:18 -0400)]
ARM: dockstar: move start of environment area

The default dockstar configuration for U-Boot currently causes it to
overrun the environment area, so that a "saveenv" command bricks the
device.  This patch moves the environment to a higher address to avoid
that.

Signed-off-by: Eric Cooper <ecc@cmu.edu>
9 years agoARM: k2e/l: Apply WA for selecting PA clock source
Lokesh Vutla [Thu, 8 Oct 2015 06:01:47 +0000 (11:31 +0530)]
ARM: k2e/l: Apply WA for selecting PA clock source

On keystone2 Lamarr and Edison platforms, the PA clocksource
mux in PLL REG1, can be changed only after enabling its clock
domain.
So selecting the output of PASS PLL as input to PA only after
enabling the clockdomain.
This is as per the debug done by "Vitaly Andrianov <vitalya@ti.com>"
and based on the previous work done by "Hao Zhang <hzhang@ti.com>"

Fixes: d634a0775bcf ("ARM: keystone2: Cleanup PLL init code")
Reported-by: Vitaly Andrianov <vitalya@ti.com>
Tested-by: Vitaly Andrianov <vitalya@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
9 years agoarch/powerpc/config.mk: Pass -fno-ira-hoist-pressure when possible
Tom Rini [Sat, 17 Oct 2015 12:04:11 +0000 (08:04 -0400)]
arch/powerpc/config.mk: Pass -fno-ira-hoist-pressure when possible

There are various toolchain issues that cause us to produce invalid
binaries with certain gcc 4.8.x and 4.9.x versions when we don't pass
this flag in.

Tested-by: Joakim Tjernlund <joakim.tjernlund@transmode.se>
Signed-off-by: Tom Rini <trini@konsulko.com>
9 years agoMerge git://git.denx.de/u-boot-socfpga
Tom Rini [Sat, 17 Oct 2015 00:21:04 +0000 (20:21 -0400)]
Merge git://git.denx.de/u-boot-socfpga

9 years agoarm: dts: socfpga: add "u-boot,dm-pre-reloc" to socfpga_cyclone5_socdk dts
Dinh Nguyen [Mon, 12 Oct 2015 16:59:04 +0000 (11:59 -0500)]
arm: dts: socfpga: add "u-boot,dm-pre-reloc" to socfpga_cyclone5_socdk dts

We need "u-boot,dm-pre-reloc" in the socfpga_cyclone5_socdk.dts file in
order for the SPL to use SD/MMC.

Signed-off-by: Dinh Nguyen <dinguyen@opensource.altera.com>
9 years agoarm: socfpga: enable data/inst prefetch and shared override in the L2
Dinh Nguyen [Thu, 15 Oct 2015 15:13:36 +0000 (10:13 -0500)]
arm: socfpga: enable data/inst prefetch and shared override in the L2

Update the L2 AUX CTRL settings for the SoCFPGA.

Enabling D and I prefetch bits helps improve SDRAM performance on the
platform.

Also, we need to enable bit 22 of the L2. By not having bit 22 set in the
PL310 Auxiliary Control register (shared attribute override enable) has the
side effect of transforming Normal Shared Non-cacheable reads into Cacheable
no-allocate reads.

Coherent DMA buffers in Linux always have a Cacheable alias via the
kernel linear mapping and the processor can speculatively load cache
lines into the PL310 controller. With bit 22 cleared, Non-cacheable
reads would unexpectedly hit such cache lines leading to buffer
corruption.

Signed-off-by: Dinh Nguyen <dinguyen@opensource.altera.com>
9 years agovf610twr: Fix typo in DRAM init
Anthony Felice [Fri, 9 Oct 2015 20:38:39 +0000 (16:38 -0400)]
vf610twr: Fix typo in DRAM init

This commit fixes a typo in vf610twr DRAM init that was causing a hang in
U-Boot for the Vybrid Tower. This typo was introduced in commit 3f353cecc
(vf610: refactor DDRMC code).

Signed-off-by: Anthony Felice <tony.felice@timesys.com>
Reviewed-by: Fabio Estevam <fabio.estevam@freescale.com>
9 years agoMerge branch 'master' of git://git.denx.de/u-boot-samsung
Tom Rini [Fri, 16 Oct 2015 11:19:47 +0000 (07:19 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-samsung

9 years agoarm: mmu: Add missing volatile for reading SCTLR register
Alison Wang [Wed, 9 Sep 2015 02:22:02 +0000 (10:22 +0800)]
arm: mmu: Add missing volatile for reading SCTLR register

Add 'volatile' qualifier to the asm statement in get_cr()
so that the statement is not optimized out by the compiler.

(http://comments.gmane.org/gmane.linux.linaro.toolchain/5163)

Without the 'volatile', get_cr() returns a wrong value which
prevents enabling the MMU  and later causes a PCIE VA access
failure.

Signed-off-by: Alison Wang <alison.wang@freescale.com>
9 years agoMerge branch 'master' of git://git.denx.de/u-boot-arm
Tom Rini [Thu, 15 Oct 2015 21:45:39 +0000 (17:45 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-arm

9 years agoMerge remote-tracking branch 'origin/master' into 2015.10+fslc
Otavio Salvador [Thu, 15 Oct 2015 18:17:04 +0000 (15:17 -0300)]
Merge remote-tracking branch 'origin/master' into 2015.10+fslc

* origin/master:
  ARM: uniphier: fix address mapping in README.uniphier
  arm: vf610twr: improve memory layout
  colibri_vf: Fix bstlen field
  mtd: nand: vf610_nfc: resync with upstream Linux version

9 years agopci: pcie_imx: Fix hang on mx6qp
Fabio Estevam [Tue, 13 Oct 2015 14:01:27 +0000 (11:01 -0300)]
pci: pcie_imx: Fix hang on mx6qp

PCI driver currently hangs on mx6qp.

Toggle the reset bit with the appropriate timings to fix the issue.

Based on the FSL kernel driver implementation.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Stefano Babic <sbabic@denx.de>
9 years agoarmv8/gic: Fix GIC v2 initialization
Thierry Reding [Thu, 20 Aug 2015 09:52:15 +0000 (11:52 +0200)]
armv8/gic: Fix GIC v2 initialization

Initialize all GICD_IGROUPRn registers and set up GICC_CTLR to enable
interrupts to the primary CPU. This fixes issues seen after booting a
Linux kernel from U-Boot.

Suggested-by: Marc Zyngier <marc.zyngier@arm.com>
Suggested-by: Mark Rutland <mark.rutland@arm.com>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
9 years agoarmv8/mmu: Set bits marked RES1 in TCR
Thierry Reding [Thu, 20 Aug 2015 09:52:14 +0000 (11:52 +0200)]
armv8/mmu: Set bits marked RES1 in TCR

For EL3 and EL2, the documentation says that bits 31 and 23 are reserved
but should be written as 1.

For EL1, only bit 23 is not reserved, so only write bit 31 as 1.

Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
9 years agoMerge branch 'master' of git://www.denx.de/git/u-boot-imx
Tom Rini [Thu, 15 Oct 2015 12:43:38 +0000 (08:43 -0400)]
Merge branch 'master' of git://www.denx.de/git/u-boot-imx

9 years agoARM: uniphier: fix address mapping in README.uniphier
Masahiro Yamada [Wed, 30 Sep 2015 12:15:58 +0000 (21:15 +0900)]
ARM: uniphier: fix address mapping in README.uniphier

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
9 years agoarmv8/mmu: Clean up TCR programming
Thierry Reding [Thu, 20 Aug 2015 09:52:13 +0000 (11:52 +0200)]
armv8/mmu: Clean up TCR programming

Use the inner shareable attribute for memory, which makes more sense
considering that this code is called when caches are being enabled.

Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
9 years agoarm: vf610twr: improve memory layout
Stefan Agner [Wed, 14 Oct 2015 17:58:43 +0000 (10:58 -0700)]
arm: vf610twr: improve memory layout

Currently, the device tree relocation is disabled, likely to
keep some DDR3 RAM at the end for Cortex-M4 firmwares. This
can be archived using bootm_size, which limits the image
processing range of the boot commands.

Move the device tree standard load address to a higher address
which aligns better with what we are doing on other boards.

Signed-off-by: Stefan Agner <stefan@agner.ch>
Acked-by: Otavio Salvador <otavio@ossystems.com.br>
9 years agocolibri_vf: Fix bstlen field
Fabio Estevam [Wed, 14 Oct 2015 02:54:32 +0000 (23:54 -0300)]
colibri_vf: Fix bstlen field

Commit 3f353cecc ("vf610: refactor DDRMC code") changed the original
bstlen field from 3 to 0.

Restore the original value for proper behaviour.

Based on the patch from Anthony Felice <tony.felice@timesys.com>
for the vf610twr board.

Reported-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
9 years agomtd: nand: vf610_nfc: resync with upstream Linux version
Stefan Agner [Wed, 14 Oct 2015 05:11:42 +0000 (22:11 -0700)]
mtd: nand: vf610_nfc: resync with upstream Linux version

This resyncs the driver changes with the Linux version of the
driver. The driver received some feedback in the LKML and got
recently acceppted, the latest version can be found here:
https://lkml.org/lkml/2015/9/2/678

Notable changes are:
- On ECC error, reread OOB and count bit flips in OOB too.
  If flipped bits are below threshold, also return an empty
  OOB buffer.
- Return the amount of bit flips in vf610_nfc_read_page.
- Use endianness aware vf610_nfc_read to read ECC status.
- Do not enable IDLE IRQ (since we do not operate with an
  interrupt service routine).
- Use type safe struct for buffer variants (vf610_nfc_alt_buf).
- Renamed variables in struct vf610_nfc (column and page_sz)
  to reflect better what they really representing.

The U-Boot version currently does not support RAW NAND write
when using the HW ECC engine.

Signed-off-by: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com>
Signed-off-by: Stefan Agner <stefan@agner.ch>
Tested-by: Albert ARIBAUD (3ADEV) <albert.aribaud@3adev.fr>
Tested-by: Stefan Agner <stefan@agner.ch>
Acked-by: Scott Wood <scottwood@freescale.com>
9 years agoMerge remote-tracking branch 'u-boot/master'
Albert ARIBAUD [Wed, 14 Oct 2015 08:46:36 +0000 (10:46 +0200)]
Merge remote-tracking branch 'u-boot/master'

9 years agoMerge remote-tracking branch 'origin/master' into 2015.10+fslc
Otavio Salvador [Tue, 13 Oct 2015 18:12:26 +0000 (15:12 -0300)]
Merge remote-tracking branch 'origin/master' into 2015.10+fslc

* origin/master:
  ls102xa: Fix reset hang
  imx_watchdog: Add a header file for watchdog registers

9 years agoMerge tag 'v2015.10-rc5' into 2015.10+fslc
Otavio Salvador [Tue, 13 Oct 2015 18:12:18 +0000 (15:12 -0300)]
Merge tag 'v2015.10-rc5' into 2015.10+fslc

Prepare v2015.10-rc5

* tag 'v2015.10-rc5': (84 commits)
  Prepare v2015.10-rc5
  env_eeprom.c: Correct using saved environment
  pcm052: fix MTD partitioning
  test/fs/fs-test.sh: Update expected results and TC10 logic
  lpc32xx: fix calculation of HCLK PLL output clock
  lpc32xx: remove surplus clock cycle in PL175 WAIT_OEN config
  nand: omap_gpmc: Change correctable bit-flips messages to debug()
  Fix variation in timestamps caused by timezone differences.
  common/image.c: Make boot_get_ramdisk() perform a check for Android images
  tools/mkimage.c: Clarify help text for -D slightly
  arndale: Apply Cortex-A15 errata #773022 and #774769
  image: fix support for Android boot images with no ramdisk
  Add support for LZ4 decompression algorithm
  ppc4xx: Remove lcd4_lwmon5 support
  ppc4xx: Convert lwmon5 board to generic board
  Revert "powerpc: ppc4xx: remove lwmon5 support"
  fs/fat/fat_write: Fix management of empty files
  fs/fat/fat_write: Factor out duplicate code
  fs/fat/fat_write: Fix curclust/newclust mix-up
  fs/fat/fat_write: Merge calls to set_cluster()
  ...

9 years agoMerge remote-tracking branch 'imx/master' into 2015.10+fslc
Otavio Salvador [Tue, 13 Oct 2015 18:11:33 +0000 (15:11 -0300)]
Merge remote-tracking branch 'imx/master' into 2015.10+fslc

* imx/master:
  imximage: fix commands other than write_data
  imximage: header.length of 4 is valid

9 years agoMerge branch 'master' of git://www.denx.de/git/u-boot-imx
Tom Rini [Tue, 13 Oct 2015 12:37:38 +0000 (08:37 -0400)]
Merge branch 'master' of git://www.denx.de/git/u-boot-imx

9 years agoexynos: more debug and cleanup in do_sdhci_init()
Tobias Jakobi [Mon, 5 Oct 2015 11:47:53 +0000 (13:47 +0200)]
exynos: more debug and cleanup in do_sdhci_init()

Add more debug printfs in do_sdhci_init() for calls
that can potentially fail.

Acked-by: Przemyslaw Marczak <p.marczak@samsung.com>
Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
9 years agoexynos: be more verbose in process_nodes()
Tobias Jakobi [Mon, 5 Oct 2015 11:47:52 +0000 (13:47 +0200)]
exynos: be more verbose in process_nodes()

In case sdhci_get_config() or do_sdhci_init() fail, show
the error code that was returned.

Acked-by: Przemyslaw Marczak <p.marczak@samsung.com>
Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
9 years agoexynos: Fix passing of errors in exynos_mmc_init()
Tobias Jakobi [Mon, 5 Oct 2015 11:47:51 +0000 (13:47 +0200)]
exynos: Fix passing of errors in exynos_mmc_init()

exynos_mmc_init() always returns zero, so for the caller
it looks like it never fails.

Correct this by returning the error code of process_nodes().
For process_nodes() do something similar and return early
when do_sdhci_init() fails.

v2: Only fail in process_nodes() if we fail on all
    available nodes.

Acked-by: Przemyslaw Marczak <p.marczak@samsung.com>
Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
9 years agoexynos: Properly zero initialize host in s5p_sdhci_init()
Tobias Jakobi [Mon, 5 Oct 2015 11:47:50 +0000 (13:47 +0200)]
exynos: Properly zero initialize host in s5p_sdhci_init()

This makes sure that setting the host_caps in s5p_sdhci_core_init()
doesn't operate on potentially uninitialized memory.

Acked-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
9 years agoodroid: Add boot script (boot.scr) support
Guillaume GARDET [Fri, 9 Oct 2015 12:26:23 +0000 (14:26 +0200)]
odroid: Add boot script (boot.scr) support

Add boot script (boot.scr) support. If no boot script are
found, it boots as usual.

Signed-off-by: Guillaume GARDET <guillaume.gardet@free.fr>
Tested-by: Przemyslaw Marczak <p.marczak@samsung.com>
Acked-by: Przemyslaw Marczak <p.marczak@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
9 years agoodroid: replace 'fatload' with 'load' to be able to use EXT* partitions
Guillaume GARDET [Fri, 9 Oct 2015 12:26:22 +0000 (14:26 +0200)]
odroid: replace 'fatload' with 'load' to be able to use EXT* partitions

Replace 'fatload' command by 'load', to be able to use EXT*
partitions while keeping FAT partition compatibility.

Signed-off-by: Guillaume GARDET <guillaume.gardet@free.fr>
Tested-by: Przemyslaw Marczak <p.marczak@samsung.com>
Acked-by: Przemyslaw Marczak <p.marczak@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
9 years agols102xa: Fix reset hang
Fabio Estevam [Sat, 3 Oct 2015 17:21:00 +0000 (14:21 -0300)]
ls102xa: Fix reset hang

Since commit 623d96e89aca6("imx: wdog: correct wcr register settings")
issuing a 'reset' command causes the system to hang.

Unlike i.MX and Vybrid, the watchdog controller on LS102x is big-endian.

This means that the watchdog on LS1021 has been working by accident as
it does not use the big-endian accessors in drivers/watchdog/imx_watchdog.c.
Commit 623d96e89aca6("imx: wdog: correct wcr register settings") only
revelead the endianness problem on LS102x.

In order to fix the reset hang, introduce a reset_cpu() implementation that
is specific for ls102x, which accesses the watchdog WCR register in big-endian
format. All that is required to reset LS102x is to clear the SRS bit.

This approach is a temporary workaround to avoid a regression for LS102x
in the 2015.10 release. The proper fix is to make the watchdog driver
endian-aware, so that it can work for i.MX, Vybrid and LS102x.

Reported-by: Sinan Akman <sinan@writeme.com>
Tested-by: Sinan Akman <sinan@writeme.com>
Reviewed-by: Wolfgang Denk <wd@denx.de>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
9 years agoimx_watchdog: Add a header file for watchdog registers
Fabio Estevam [Sat, 3 Oct 2015 17:20:59 +0000 (14:20 -0300)]
imx_watchdog: Add a header file for watchdog registers

Create fsl_wdog.h to store the watchdog registers and bit fields.

This can be useful when accesses to the watchdog block are made from other
parts, such as arch/arm/ cpu code.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
9 years agoPrepare v2015.10-rc5
Tom Rini [Mon, 12 Oct 2015 15:14:27 +0000 (11:14 -0400)]
Prepare v2015.10-rc5

Signed-off-by: Tom Rini <trini@konsulko.com>
9 years agoenv_eeprom.c: Correct using saved environment
Ludger Dreier [Mon, 12 Oct 2015 11:34:24 +0000 (13:34 +0200)]
env_eeprom.c: Correct using saved environment

The changes in ed6a5d4 unintentionally broke support for reading the
environment saved to eeprom back.  To correct this the crc-check and
decision on which environment to use is now moved to env_relocate_spec.
This is done for both the "redundant env" and the "single env" case.

Signed-off-by: Ludger Dreier <ludger.dreier@keymile.com>
9 years agopcm052: fix MTD partitioning
Albert ARIBAUD (3ADEV) [Sun, 11 Oct 2015 18:06:39 +0000 (20:06 +0200)]
pcm052: fix MTD partitioning

MTD partitioning in current pcm052 configuration is inconsistent.
Fix it across MTDPARTS_DEFAULT, CONFIG_EXTRA_ENV_SETTINGS, and
CONFIG_ENV_OFFSET[_REDUND].

Signed-off-by: Albert ARIBAUD (3ADEV) <albert.aribaud@3adev.fr>
9 years agotest/fs/fs-test.sh: Update expected results and TC10 logic
Tom Rini [Sun, 11 Oct 2015 20:48:36 +0000 (16:48 -0400)]
test/fs/fs-test.sh: Update expected results and TC10 logic

With the changes in 7a3e70c we now get read(2) behavior so trying to
read 2MB with 1MB left in the file results in 1MB read and a warning.
We update the test logic here to make sure we read back 1MB as expected.
This change however changes the overall summary as while EXT4 continues
to not have offset support the test now fails when expected to pass
rather than fails when expected to fail (and we report that as pass).

Signed-off-by: Tom Rini <trini@konsulko.com>
9 years agolpc32xx: fix calculation of HCLK PLL output clock
Vladimir Zapolskiy [Sun, 4 Oct 2015 22:18:45 +0000 (23:18 +0100)]
lpc32xx: fix calculation of HCLK PLL output clock

Execution branches on feedback mode are swapped, this has no effect
if default direct mode is on (then p_div is equal to 1 and Fout equals
to Fcco), that's why the problem remained unnoticed for a long time.

Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
9 years agolpc32xx: remove surplus clock cycle in PL175 WAIT_OEN config
Vladimir Zapolskiy [Sun, 4 Oct 2015 22:18:24 +0000 (23:18 +0100)]
lpc32xx: remove surplus clock cycle in PL175 WAIT_OEN config

According to ARM PrimeCell PL175 documentation WAIT_OEN config value
is defined without any additional clocks added to the value set by a
client, the change fixes the wrong interface to WAIT_OEN config.

The change also touches a single user of LPC32xx EMC and corrects
configured "output enable delay" value on its side according to the
changed interface.

No functional change intended.

Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
9 years agonand: omap_gpmc: Change correctable bit-flips messages to debug()
Ezequiel García [Sun, 4 Oct 2015 21:34:42 +0000 (18:34 -0300)]
nand: omap_gpmc: Change correctable bit-flips messages to debug()

Messages on corrected bit-flips are not really useful,
as bit-flips are perfectly normal. Let's avoid cluttering
the console and make them debug.

Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
9 years agoFix variation in timestamps caused by timezone differences.
Vagrant Cascadian [Fri, 2 Oct 2015 16:11:51 +0000 (09:11 -0700)]
Fix variation in timestamps caused by timezone differences.

When building with SOURCE_DATE_EPOCH set, avoid use of mktime in
default_image.c, which converts the timestamp into localtime. This
causes variation based on timezone when building u-boot.img and
u-boot-sunxi-with-spl.bin targets.

Signed-off-by: Vagrant Cascadian <vagrant@debian.org>
Tested-by: Paul Kocialkowski <contact@paulk.fr>
Acked-by: Paul Kocialkowski <contact@paulk.fr>
9 years agocommon/image.c: Make boot_get_ramdisk() perform a check for Android images
Tom Rini [Thu, 27 Aug 2015 19:42:41 +0000 (15:42 -0400)]
common/image.c: Make boot_get_ramdisk() perform a check for Android images

In 2dd4632 the check for where a ramdisk is found on an Android image
was got moved into the "normal" loop here, causing people to have to
pass the kernel address in the ramdisk address location in order to have
Android boot still.  This changed previous behavior so perform a check
early in the function to see if we have an Android image and if so use
that as where to look for the ramdisk (which is what the rest of the
code here expects).  We allow for this to still be overridden with an
explicit ramdisk address to be passed as normal.

Cc: Rob Herring <robh@kernel.org>
Reported-by: Paul Kocialkowski <contact@paulk.fr>
Signed-off-by: Tom Rini <trini@konsulko.com>
9 years agotools/mkimage.c: Clarify help text for -D slightly
Tom Rini [Wed, 26 Aug 2015 19:21:23 +0000 (15:21 -0400)]
tools/mkimage.c: Clarify help text for -D slightly

Try and make it clear that -D will replace all arguments passed to dtc
and is not appending them.

Signed-off-by: Tom Rini <trini@konsulko.com>
9 years agoarndale: Apply Cortex-A15 errata #773022 and #774769
Ian Campbell [Tue, 29 Sep 2015 09:27:09 +0000 (10:27 +0100)]
arndale: Apply Cortex-A15 errata #773022 and #774769

We run 4 Arndale boards in our automated test framework, they have
been running quite happily for quite some time using a Debian Wheezy
userspace.

However when upgrading to a Debian Jessie we started seeing frequent
segmentation faults from gcc when building the kernel, to the extent
that it is unable to successfully build the kernel twice in a row, and
often fails on the first attempt.

Searching around I found https://bugs.launchpad.net/arndale/+bug/1081417
which pointed towards http://www.spinics.net/lists/kvm-arm/msg03723.html
and CPU Errata 773022 and 774769.

This errata needs to be applied to all processors in an SMP system,
meaning that the usual strategy of applying them in
arch/arm/cpu/armv7/start.S is not appropriate (since that applies to
the boot processor only). Instead we apply these errata in the secure
monitor which is code that is traversed by all processors as they are
brought up.

The net affect on Arndale is that ACTLR changes from 0x40 to
0x2000042. I ran 17 kernel compile iterations overnight with no
segfaults.

Runtime testing was done on our v2014.10 based branch and forward
ported (with only minimal and trivial contextual conflicts) to current
master, where it has been build tested only.

I suppose in theory these errata apply to any Exynos5250 based boards,
but Arndale is the only one I have access to and I have therefore
chosen to be conservative and only apply it there.

Also, reorder CONFIG_ARM_ERRATA_794072 in README to make the list
numerically sorted.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
9 years agoimage: fix support for Android boot images with no ramdisk
Rob Herring [Mon, 5 Oct 2015 19:37:07 +0000 (14:37 -0500)]
image: fix support for Android boot images with no ramdisk

If an Android boot image does not contain a ramdisk, make sure rd_len
and rd_data are returned to indicate no ramdisk rather than just relying
on returning an error.

Signed-off-by: Rob Herring <robh@kernel.org>