platform/kernel/u-boot.git
7 years agobootcounter_ram: Fix misaligned cache warning
Stefan Roese [Fri, 18 Nov 2016 16:21:52 +0000 (17:21 +0100)]
bootcounter_ram: Fix misaligned cache warning

This patch fixes the warning about misaligned cache on Armada XP:

CACHE: Misaligned operation at range [7ffff0007fffffac]

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Valentin Longchamp <valentin.longchamp@keymile.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agolinux/compat.h: Properly implement ndelay fallback
mario.six@gdsys.cc [Fri, 18 Nov 2016 13:40:37 +0000 (14:40 +0100)]
linux/compat.h: Properly implement ndelay fallback

Commit c68c62 ("i2c: mvtwsi: Make delay times frequency-dependent")
extensively used the ndelay function with a calculated parameter
which is dependant on the configured frequency of the I2C bus. If
standard speed is employed, the parameter is usually 10000 (10000ns
period length for 100kHz frequency).

But, since the arm architecture does not implement a proper version of
ndelay, the fallback default from include/linux/compat.h is used,
which defines every ndelay as udelay(1). This causes problems for
slower speeds on arm, since the delay time is now 9us too short for
the desired frequency, which leads to random failures of the I2C
interface.

To remedy this, we implement a proper, parameter-aware ndelay fallback
for architectures that don't implement a real ndelay function.

Reported-By: Jason Brown <Jason.brown@apcon.com>
To: Tom Rini <trini@konsulko.com>
To: Heiko Schocher <hs@denx.de>
Signed-off-by: Mario Six <mario.six@gdsys.cc>
7 years agocolibri_vf: usb gadget: toradex pid is now set generically
Max Krummenacher [Wed, 16 Nov 2016 16:49:25 +0000 (17:49 +0100)]
colibri_vf: usb gadget: toradex pid is now set generically

remove now unused CONFIG_TRDX_PID_XXX

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Acked-by: Stefan Agner <stefan.agner@toradex.com>
Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
7 years agoapalis/colibri_t30: move environment location
Marcel Ziswiler [Wed, 16 Nov 2016 16:49:24 +0000 (17:49 +0100)]
apalis/colibri_t30: move environment location

Now with the config block handling in place move the U-Boot environment
location before the config block at the end of 1st "boot sector" as
deployed during production using our downstream BSP.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
7 years agoapalis/colibri_imx7/pxa270/t20/t30/vf: integrate config block handling
Marcel Ziswiler [Wed, 16 Nov 2016 16:49:23 +0000 (17:49 +0100)]
apalis/colibri_imx7/pxa270/t20/t30/vf: integrate config block handling

With our common code in place actually make use of it across all our
modules.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
7 years agotoradex: config block handling
Marcel Ziswiler [Wed, 16 Nov 2016 16:49:22 +0000 (17:49 +0100)]
toradex: config block handling

Add Toradex factory configuration block handling. The config block is a
data structure which gets stored to flash during production testing. The
structure holds such information as board resp. hardware revision,
product ID and serial number which is used as the NIC part of the
Ethernet MAC address as well. The config block will be read upon boot by
the show_board_info() function, displayed as part of the board
information and passed to Linux via device tree or ATAGs.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
7 years agoapalis/colibri_t20/t30: deactivate displaying board info
Marcel Ziswiler [Wed, 16 Nov 2016 16:49:21 +0000 (17:49 +0100)]
apalis/colibri_t20/t30: deactivate displaying board info

Deactivate CONFIG_DISPLAY_BOARDINFO in favour of
CONFIG_DISPLAY_BOARDINFO_LATE which also displays on the LCD.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
7 years agogeneric-board: make show_board_info a weak function
Marcel Ziswiler [Wed, 16 Nov 2016 16:49:20 +0000 (17:49 +0100)]
generic-board: make show_board_info a weak function

Make show_board_info() a weak function which allows for custom board
specific implementations thereof.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
7 years agoRevert "generic-board: allow showing custom board info"
Marcel Ziswiler [Wed, 16 Nov 2016 16:49:19 +0000 (17:49 +0100)]
Revert "generic-board: allow showing custom board info"

Drop CONFIG_CUSTOM_BOARDINFO as it is not Kconfig compliant and anyway
not really used anywhere plus the upcoming weak show_board_info()
approach seems much superior.

This reverts commit a9ad18c9d5fe2554753b0f9a52adfd5ebce61147.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
7 years agospl: remove redundant call to parse_image_header()
tomas.melin@vaisala.com [Wed, 16 Nov 2016 11:15:05 +0000 (13:15 +0200)]
spl: remove redundant call to parse_image_header()

Image header was checked twice.

Signed-off-by: Tomas Melin <tomas.melin@vaisala.com>
Acked-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agospl: add check for FIT-header when loading image
tomas.melin@vaisala.com [Wed, 16 Nov 2016 10:54:39 +0000 (12:54 +0200)]
spl: add check for FIT-header when loading image

Add check for FDT_MAGIC, otherwise also legacy images will be loaded as
a FIT. With this check in place, the loader works correct both
with legacy and FIT images.

Signed-off-by: Tomas Melin <tomas.melin@vaisala.com>
Acked-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agosun8i_emac: Fix mdio read sequence
Philipp Tomsich [Wed, 16 Nov 2016 01:40:27 +0000 (01:40 +0000)]
sun8i_emac: Fix mdio read sequence

To send a parametrized command to the PHY over MDIO, we should write
the data first, the trigger the execution by the command register
write. Fix the access pattern in our MDIO write routine.
Apparently this doesn't really matter with the Realtek PHY on the
Pine64, but other PHYs (which require more setup) will choke on
the wrong order.
[Andre: add commit message]

Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Acked-by: Jagan Teki <jagan@openedev.com>
7 years agosunxi: add support for Nintendo NES Classic Edition
FUKAUMI Naoki [Thu, 17 Nov 2016 23:31:29 +0000 (08:31 +0900)]
sunxi: add support for Nintendo NES Classic Edition

Add board support for sun8i_r16 Nintendo NES Classic edition.

Signed-off-by: FUKAUMI Naoki <naobsd@gmail.com>
[jagan: Add commit message body]
Signed-off-by: Jagan Teki <jagan@openedev.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
7 years agomtd: nand: add support for the TC58NVG2S0H chip
Boris Brezillon [Tue, 8 Nov 2016 16:21:12 +0000 (17:21 +0100)]
mtd: nand: add support for the TC58NVG2S0H chip

Add the description of the Toshiba TC58NVG2S0H SLC nand to the nand_ids
table so we can use the NAND ECC infos and the ONFI timings.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
7 years agosunxi: Mele_M5_defconfig: Drop non existing STATUSLED setting
Hans de Goede [Sun, 13 Nov 2016 18:54:08 +0000 (19:54 +0100)]
sunxi: Mele_M5_defconfig: Drop non existing STATUSLED setting

And also remove it from scripts/config_whitelist.txt as the
Mele_M5_defconfig was the only one defining it.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
Reviewed-by: Jagan Teki <jagan@openedev.com>
7 years agosunxi: mmc: Set CONFIG_SYS_MMC_MAX_DEVICE
Emmanuel Vadot [Sat, 5 Nov 2016 19:51:11 +0000 (20:51 +0100)]
sunxi: mmc: Set CONFIG_SYS_MMC_MAX_DEVICE

Set CONFIG_SYS_MMC_MAX_DEVICE to 4 for sunxi SoC.
This define is needed in the API code.

Signed-off-by: Emmanuel Vadot <manu@bidouilliste.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
7 years agoarm: sunxi: do not force USB for arch-sunxi
Yann E. MORIN [Mon, 31 Oct 2016 21:33:40 +0000 (22:33 +0100)]
arm: sunxi: do not force USB for arch-sunxi

Currently, USB is forced-enabled for the sunxi familly, and there is no
way to disable it.

However, USB takes a long time to initiliase, delaying the boot by up to
5 seconds (without any USB device attached!). This is a very long delay,
especially in cases where USB booting is not wanted at all, and where
the device is expected to boot relatively often (even in production).

Change the way the dependencies are handled, by only forcibly selecting
USB when CONFIG_DISTRO_DEFAULTS ("defaults suitable for booting general
purpose Linux distributions") is set. This option defaults to y for the
sunxi familly, so the current default behaviour is kept unchanged. Users
interested in boot time and/or size will be able to disable this to
further disable USB.

With USB disabled, the time spent in U-Boot before handing control to
the Linux kernel is about 1s now, down from ~5s (Nanopi Neo, sunxi H3).

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Ian Campbell <ijc@hellion.org.uk>
Cc: Hans De Goede <hdegoede@redhat.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
7 years agosunxi: Use the available Kconfig option for AHCI
Jelle van der Waa [Mon, 31 Oct 2016 20:05:09 +0000 (21:05 +0100)]
sunxi: Use the available Kconfig option for AHCI

Use the already available Kconfig option for AHCI. Tested on the
BananaPi.

Signed-off-by: Jelle van der Waa <jelle@vdwaa.nl>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
7 years agotravis: Add efi_loader grub2 test
Alexander Graf [Fri, 18 Nov 2016 12:18:00 +0000 (13:18 +0100)]
travis: Add efi_loader grub2 test

We have all the building blocks now to run arbitrary efi applications
in travis. The most important one out there is grub2, so let's add
a simple test to verify that grub2 still comes up.

Signed-off-by: Alexander Graf <agraf@suse.de>
7 years agoTravis: Remove sleep test from integratorcp_cm926ejs-qemu test
Alexander Graf [Thu, 17 Nov 2016 17:31:07 +0000 (18:31 +0100)]
Travis: Remove sleep test from integratorcp_cm926ejs-qemu test

Most of the time when running the sleep test in Travis for
the integratorcp_cm926ejs target I get errors like this:

  E       assert 2.999901056289673 >= 3

The deviation is tiny, but fails the overall build result. Since
the sleep test is not terribly important as gate keeper for travis
tests, let's just exclude it for this board.

Signed-off-by: Alexander Graf <agraf@suse.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agoefi_loader: Allow to compile helloworld.efi w/o bundling it
Alexander Graf [Thu, 17 Nov 2016 21:40:10 +0000 (22:40 +0100)]
efi_loader: Allow to compile helloworld.efi w/o bundling it

Today we can compile a self-contained hello world efi test binary that
allows us to quickly verify whether the EFI loader framwork works.

We can use that binary outside of the self-contained test case though,
by providing it to a to-be-tested system via tftp.

This patch separates compilation of the helloworld.efi file from
including it in the u-boot binary for "bootefi hello". It also modifies
the efi_loader test case to enable travis to pick up the compiled file.
Because we're now no longer bloating the resulting u-boot binary, we
can enable compilation always, giving us good travis test coverage.

Signed-off-by: Alexander Graf <agraf@suse.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agotests: Add efi_loader hello world test
Alexander Graf [Thu, 17 Nov 2016 17:31:05 +0000 (18:31 +0100)]
tests: Add efi_loader hello world test

Now that we have working network tests and a hello world efi application
built inside our tree, we can automatically test that efi binary running
inside of U-Boot.

Signed-off-by: Alexander Graf <agraf@suse.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agotravis: Add python path for environments
Alexander Graf [Thu, 17 Nov 2016 17:31:04 +0000 (18:31 +0100)]
travis: Add python path for environments

When running in travis-ci, we want to pass environment configuration to
the tests. These reside in a path available through PYTHONPATH, so let's
define that one to point to the unit test repo.

Signed-off-by: Alexander Graf <agraf@suse.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agoTravis: Expose build dir as variable
Alexander Graf [Thu, 17 Nov 2016 17:31:03 +0000 (18:31 +0100)]
Travis: Expose build dir as variable

Some travis QEMU tests can transfer files between the build directory
and the guest U-Boot instance. For that to work, both need to have access
to the same directory.

This patch puts the current build path into an environment variable, so
that the environment generating python scripts can extract it from there
and read the respective files.

Signed-off-by: Alexander Graf <agraf@suse.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agotests: net: Offset downloads to 4MB
Alexander Graf [Thu, 17 Nov 2016 17:31:02 +0000 (18:31 +0100)]
tests: net: Offset downloads to 4MB

The network test currently downloads files at 0MB offset of RAM start.
This works for most ARM systems, but x86 has weird memory layout constraints
on the first MB of RAM.

To not get caught into any of these, let's add a 4MB pad from start
of RAM to the default memory offset.

Signed-off-by: Alexander Graf <agraf@suse.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agoMerge git://git.denx.de/u-boot-rockchip
Tom Rini [Sat, 26 Nov 2016 14:26:27 +0000 (09:26 -0500)]
Merge git://git.denx.de/u-boot-rockchip

7 years agorockchip: configs: correct partitions 'boot' size
Jacob Chen [Tue, 15 Nov 2016 08:55:27 +0000 (16:55 +0800)]
rockchip: configs: correct partitions 'boot' size

It should be 112M, to make rootfs start at 0x40000

Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
Acked-by: Simon Glass <sjg@chromium.org>
7 years agorockchip: Add support for veyron-minnie (ASUS Chromebook Flip)
Simon Glass [Sun, 13 Nov 2016 21:24:54 +0000 (14:24 -0700)]
rockchip: Add support for veyron-minnie (ASUS Chromebook Flip)

This adds support for the Asus Chromebook Flip, an RK3288-based clamshell
device which can flip into 'tablet' mode. The device tree file comes from
Linux v4.8. The SDRAM parameters are for 4GB Samsung LPDDR3.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agorockchip: Add support for veyron-mickey (Chromebit)
Simon Glass [Sun, 13 Nov 2016 21:22:16 +0000 (14:22 -0700)]
rockchip: Add support for veyron-mickey (Chromebit)

This adds support for the Asus Chromebit, and RK3288-based device designed
to plug directly into an HDMI monitor. The device tree file comes from
Linux v4.8.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agorockchip: video: Avoid using u8 in the HDMI driver
Simon Glass [Sun, 13 Nov 2016 21:22:15 +0000 (14:22 -0700)]
rockchip: video: Avoid using u8 in the HDMI driver

It makes not sense using u8 to hold a value on a 32-bit or 64-bit machine.
It can only bloat the code by forcing the compiler to mask the value.
Change it to uint.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agorockchip: veyron: Adjust ARM clock after relocation
Simon Glass [Sun, 13 Nov 2016 21:22:14 +0000 (14:22 -0700)]
rockchip: veyron: Adjust ARM clock after relocation

Update board_init() to increase the ARM clock to the maximum speed on
veyron boards. This makes quite a large difference in performance. With
this change, speed goes from about 750 DMIPS to 2720 DMIPs.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agorockchip: clk: Support setting ACLK
Simon Glass [Sun, 13 Nov 2016 21:22:13 +0000 (14:22 -0700)]
rockchip: clk: Support setting ACLK

Add basic support for setting the ARM clock, since this allows us to run
at maximum speed in U-Boot. Currently only a single speed is supported
(1.8GHz).

Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agorockchip: Move jerry SDRAM settings into its own .dts file
Simon Glass [Sun, 13 Nov 2016 21:22:12 +0000 (14:22 -0700)]
rockchip: Move jerry SDRAM settings into its own .dts file

The SDRAM settings are not common across all veyron models. Move the
current settings into Jerry's file.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agorockchip: veyron: Add a note about the SDRAM voltage
Simon Glass [Sun, 13 Nov 2016 21:22:11 +0000 (14:22 -0700)]
rockchip: veyron: Add a note about the SDRAM voltage

Add a comment to indicate that we are not supporting the PWM regulator
yet.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agorockchip: Rename jerry files to veyron
Simon Glass [Sun, 13 Nov 2016 21:22:10 +0000 (14:22 -0700)]
rockchip: Rename jerry files to veyron

At present we have a single rk3288-based Chromebook: chromebook_jerry. But
all such Chromebooks can use the same binary with only device-tree
differences. The family name is 'veyron', so rename the files accordingly.

Also update the device-tree filename since this currently differs from
Linux.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agorockchip: Move jerry to use of-platdata
Simon Glass [Sun, 13 Nov 2016 21:22:09 +0000 (14:22 -0700)]
rockchip: Move jerry to use of-platdata

Adjust jerry to use of-platdata like other rk3288 boards. This reduces the
SPL size enough that it boots again.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agorockchip: video: Check for device in use
Simon Glass [Sun, 13 Nov 2016 21:22:08 +0000 (14:22 -0700)]
rockchip: video: Check for device in use

Check whether a display device is in use before using it. Add a comment as
to why two displays cannot currently be used at the same time.

This allows us to remove the device-tree change that disables vopb on
jerry.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agovideo: Track whether a display is in use
Simon Glass [Sun, 13 Nov 2016 21:22:07 +0000 (14:22 -0700)]
video: Track whether a display is in use

Mark a display as in use when display_enable() is called. This can avoid
a display being used by multiple video-output devices.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agovideo: Use cache-alignment in video_sync()
Simon Glass [Sun, 13 Nov 2016 21:22:06 +0000 (14:22 -0700)]
video: Use cache-alignment in video_sync()

Sometimes the frame buffer is not a multiple of the cache line size.
Adjust the cache-flushing code to avoid cache warnings/errors in this
case.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agospi: Add a debug() on bind failure
Simon Glass [Sun, 13 Nov 2016 21:22:05 +0000 (14:22 -0700)]
spi: Add a debug() on bind failure

This is an uncommon error but we may as well have a debug() message when
it happens.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agorockchip: spi: Honour the deactivation delay
Simon Glass [Sun, 13 Nov 2016 21:22:03 +0000 (14:22 -0700)]
rockchip: spi: Honour the deactivation delay

This is not currently implemented. Add support for this so that the Chrome
OS EC can be used on jerry.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agorockchip: spi: Add support for of-platdata
Simon Glass [Sun, 13 Nov 2016 21:22:02 +0000 (14:22 -0700)]
rockchip: spi: Add support for of-platdata

Allow this driver to be used with of-platdata on rk3288.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agospi: Add of-platdata support to SPI and SPI flash
Simon Glass [Sun, 13 Nov 2016 21:22:01 +0000 (14:22 -0700)]
spi: Add of-platdata support to SPI and SPI flash

Some boards may want to use these subsystems with of-platdata in SPL. Add
support for this by avoiding any device tree access in this case.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agostdio: Correct numbering logic in stdio_probe_device()
Simon Glass [Sun, 13 Nov 2016 21:22:00 +0000 (14:22 -0700)]
stdio: Correct numbering logic in stdio_probe_device()

The current code assumes that the devices are ordered corresponding to
their alias value. But (for example) video1 can come before video0 in the
device tree.

Correct this, by always looking for device 0 first. After that we can fall
back to finding the first available device.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agostdio: Correct code style nits
Simon Glass [Sun, 13 Nov 2016 21:21:59 +0000 (14:21 -0700)]
stdio: Correct code style nits

Fix a few code style nits in stdio_get_by_name().

Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agorockchip: Allow jerry to use of-platdata
Simon Glass [Sun, 13 Nov 2016 21:21:57 +0000 (14:21 -0700)]
rockchip: Allow jerry to use of-platdata

This board always boots from SPI, so update the code to support that with
of-platdata. The boot source is not currently available with of-platdata.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agorockchip: video: Correct VOP clock selection
Simon Glass [Sun, 13 Nov 2016 21:21:56 +0000 (14:21 -0700)]
rockchip: video: Correct VOP clock selection

This code incorrectly uses the oscillator. It should use the clock
selected in the device tree.

Signed-off-by: Simon Glass <sjg@chromium.org>
Fixes: 135aa95 (clk: convert API to match reset/mailbox style)

7 years agorockchip: video: Correct HDMI data source selection
Simon Glass [Sun, 13 Nov 2016 21:21:55 +0000 (14:21 -0700)]
rockchip: video: Correct HDMI data source selection

This code currently always selects the second source. It only worked
because both sources are set up.

With the change to only init video devices that are present in the stdout
environment variable, this fails. Fix it.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agodts: arm: rk3036: add usb vbus node
Kever Yang [Tue, 8 Nov 2016 10:13:41 +0000 (18:13 +0800)]
dts: arm: rk3036: add usb vbus node

add fix regulator node for usb vbus power control.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Acked-by: Simon Glass <sjg@chromium.org>
7 years agoconfig: rk3036: enable fix regulator
Kever Yang [Tue, 8 Nov 2016 10:13:40 +0000 (18:13 +0800)]
config: rk3036: enable fix regulator

usb host vbus power is using gpio fix regulator, enable it.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Acked-by: Simon Glass <sjg@chromium.org>
7 years agoconfig: rk3036: enable configs for USB HOST
Kever Yang [Tue, 8 Nov 2016 10:13:39 +0000 (18:13 +0800)]
config: rk3036: enable configs for USB HOST

rk3036 using dwc2 usb controller, need enable relate configs for it.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Acked-by: Simon Glass <sjg@chromium.org>
7 years agoconfig: evb-rk3399: enable PWM_ROCKCHIP
Kever Yang [Mon, 7 Nov 2016 08:30:44 +0000 (16:30 +0800)]
config: evb-rk3399: enable PWM_ROCKCHIP

PWM_ROCKCHIP need to enable for PWM regulator, this config
is missing during rebase and new patch set in previous submission.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Acked-by: Simon Glass <sjg@chromium.org>
7 years agoevb-rk3399: deduced the dram node size when space reserved
Kever Yang [Mon, 7 Nov 2016 08:30:34 +0000 (16:30 +0800)]
evb-rk3399: deduced the dram node size when space reserved

The size dram node need to be deduced by the same amount of reserved space.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Acked-by: Simon Glass <sjg@chromium.org>
7 years agoarm: rockchip: Fix typo in ROCKCHIP_RK3288 help
Andreas Färber [Wed, 2 Nov 2016 17:03:01 +0000 (18:03 +0100)]
arm: rockchip: Fix typo in ROCKCHIP_RK3288 help

UART,s -> UARTs, to avoid this spreading via copy&paste.

Signed-off-by: Andreas Färber <afaerber@suse.de>
Acked-by: Simon Glass <sjg@chromium.org>
7 years agoarm: dts: Fix Rockchip sort order
Andreas Färber [Wed, 2 Nov 2016 17:02:17 +0000 (18:02 +0100)]
arm: dts: Fix Rockchip sort order

Sort rk3036 before rk3288.

Signed-off-by: Andreas Färber <afaerber@suse.de>
Acked-by: Simon Glass <sjg@chromium.org>
7 years agopower: regulator: Add limits checking while setting current
Keerthy [Wed, 26 Oct 2016 08:12:32 +0000 (13:42 +0530)]
power: regulator: Add limits checking while setting current

Currently the specific set ops functions are directly
called without any check for min/max current limits for a regulator.
Check for them and proceed.

Signed-off-by: Keerthy <j-keerthy@ti.com>
Fixed checking of current limits:
Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agopower: regulator: Add limits checking while setting voltage
Keerthy [Wed, 26 Oct 2016 08:12:31 +0000 (13:42 +0530)]
power: regulator: Add limits checking while setting voltage

Currently the specific set ops functions are directly
called without any check for voltage limits for a regulator.
Check for them and proceed.

Signed-off-by: Keerthy <j-keerthy@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Fixed checking of voltate limits:
Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agoMerge git://git.denx.de/u-boot-fdt
Tom Rini [Fri, 25 Nov 2016 22:40:02 +0000 (17:40 -0500)]
Merge git://git.denx.de/u-boot-fdt

7 years agoMerge git://git.denx.de/u-boot-fsl-qoriq
Tom Rini [Fri, 25 Nov 2016 22:39:54 +0000 (17:39 -0500)]
Merge git://git.denx.de/u-boot-fsl-qoriq

Signed-off-by: Tom Rini <trini@konsulko.com>
Conflicts:
arch/arm/Kconfig

7 years agopower: regulator: Introduce regulator_set_value_force function
Keerthy [Wed, 26 Oct 2016 08:12:30 +0000 (13:42 +0530)]
power: regulator: Introduce regulator_set_value_force function

In case we want to force a particular value on a regulator
irrespective of the min/max constraints for testing purposes
one can call regulator_set_value_force function.

Signed-off-by: Keerthy <j-keerthy@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agoMAINTAINERS: Fix syntax and update filename for FDT
Andreas Färber [Wed, 26 Oct 2016 16:14:00 +0000 (18:14 +0200)]
MAINTAINERS: Fix syntax and update filename for FDT

Let get_maintainers.pl pick up the new cmd/fdt.c.

Cc: Simon Glass <sjg@chromium.org>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agoimage-fit: Fix compiling error caused by autoconf.h
York Sun [Wed, 23 Nov 2016 17:25:09 +0000 (09:25 -0800)]
image-fit: Fix compiling error caused by autoconf.h

Commit ec6617c3 includes autoconf.h in image-fit.c, causing conflict
for board odroid-xu3 which overwrites CONFIG_SYS_BOARD in header
file. Move the include higher and use linux/kconfig.h instead of
generated/autoconf.h.

Signed-off-by: York Sun <york.sun@nxp.com>
CC: Alison Wang <alison.wang@nxp.com>
7 years agoarmv7: ls1021aiot: Fixing SPL compiling issues
York Sun [Wed, 23 Nov 2016 17:08:47 +0000 (09:08 -0800)]
armv7: ls1021aiot: Fixing SPL compiling issues

To align with SPL change 38fed8ab and 693d4c9f, add Kconfig option
CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR to defconfig, and remove
CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS.

Signed-off-by: York Sun <york.sun@nxp.com>
CC: Feng Li <feng.li_2@nxp.com>
7 years agocolibri_pxa270: transition to driver model for serial
Marcel Ziswiler [Mon, 14 Nov 2016 20:40:28 +0000 (21:40 +0100)]
colibri_pxa270: transition to driver model for serial

Add serial platform data to board file.
Enable driver model for PXA serial driver.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
7 years agocolibri_pxa270: drop edit, elf, fpga, hush, regex et al. for space reason
Marcel Ziswiler [Mon, 14 Nov 2016 20:40:27 +0000 (21:40 +0100)]
colibri_pxa270: drop edit, elf, fpga, hush, regex et al. for space reason

With em humble DM and Kconfig migraters U-Boot binary size keeps
increasing. Drop a bunch of less needed stuff to save another precious
20+ KB.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
7 years agoserial: pxa: integrate optional driver model handling
Marcel Ziswiler [Mon, 14 Nov 2016 20:40:26 +0000 (21:40 +0100)]
serial: pxa: integrate optional driver model handling

Optional driver model handling integration.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Marek Vasut <marex@denx.de>
7 years agoserial: pxa: use kconfig for serial configuration
Marcel Ziswiler [Mon, 14 Nov 2016 20:40:25 +0000 (21:40 +0100)]
serial: pxa: use kconfig for serial configuration

Migrate the PXA serial driver to be configured via Kconfig.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Marek Vasut <marex@denx.de>
7 years agoarmv8: fsl-layerscape: Support loading 32-bit OS with PSCI enabled
Alison Wang [Thu, 10 Nov 2016 02:49:05 +0000 (10:49 +0800)]
armv8: fsl-layerscape: Support loading 32-bit OS with PSCI enabled

As PSCI and secure monitor firmware framework are enabled, this patch is
to support loading 32-bit OS in such case. The default target exception
level returned to U-Boot is EL2, so the corresponding work to switch to
AArch32 EL2 and jump to 32-bit OS are done in U-Boot and secure firmware
together.

Signed-off-by: Alison Wang <alison.wang@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
7 years agoarmv8: fsl-layerscape: SMP support for loading 32-bit OS
Alison Wang [Thu, 10 Nov 2016 02:49:04 +0000 (10:49 +0800)]
armv8: fsl-layerscape: SMP support for loading 32-bit OS

Spin-table method is used for secondary cores to load 32-bit OS. The
architecture information will be got through checking FIT image and
saved in the os_arch element of spin-table, then the secondary cores
will check os_arch and jump to 32-bit OS or 64-bit OS automatically.

Signed-off-by: Alison Wang <alison.wang@nxp.com>
Signed-off-by: Chenhui Zhao <chenhui.zhao@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
7 years agoarmv8: Support loading 32-bit OS in AArch32 execution state
Alison Wang [Thu, 10 Nov 2016 02:49:03 +0000 (10:49 +0800)]
armv8: Support loading 32-bit OS in AArch32 execution state

To support loading a 32-bit OS, the execution state will change from
AArch64 to AArch32 when jumping to kernel.

The architecture information will be got through checking FIT image,
then U-Boot will load 32-bit OS or 64-bit OS automatically.

Signed-off-by: Ebony Zhu <ebony.zhu@nxp.com>
Signed-off-by: Alison Wang <alison.wang@nxp.com>
Signed-off-by: Chenhui Zhao <chenhui.zhao@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
7 years agoarm: exynos7420: remove custome low level init function
Thomas Abraham [Wed, 16 Nov 2016 13:19:16 +0000 (18:49 +0530)]
arm: exynos7420: remove custome low level init function

Remove the custom low-level initialization function and reuse the
default low-level initialization function. But this requires the
ARMV8_MULTIENTRY config option to be enabled for Exynos7420.

On Exynos7420, the boot CPU belongs to the second cluster and so
with ARMV8_MULTIENTRY config option enabled, the 'branch_if_master'
macro fails to detect the CPU as boot CPU. As a temporary workaround
the CPU_RELEASE_ADDR is set to point to '_main'.

Cc: Minkyu Kang <mk7.kang@samsung.com>
Cc: Alison Wang <alison.wang@nxp.com>
Signed-off-by: Thomas Abraham <thomas.ab@samsung.com>
Reviewed-by: Alison Wang <alison.wang@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
7 years agoarmv8/fsl-lsch3: Update code to release secondary cores
Priyanka Jain [Thu, 17 Nov 2016 06:59:56 +0000 (12:29 +0530)]
armv8/fsl-lsch3: Update code to release secondary cores

NXP ARMv8 SoC LS2080A release all secondary cores in one-go.
But other new SoCs like LS2088A, LS1088A release secondary
cores one by one.

Update code to release secondary cores based on SoC SVR
Add code to release cores one by one for non LS2080A SoCs

Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
Signed-off-by: Raghav Dogra <raghav.dogra@nxp.com>
Signed-off-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
[YS: remove "inline" from declaration of initiator_type]
Reviewed-by: York Sun <york.sun@nxp.com>
7 years agoarmv8: fsl-layerscape: Add NXP LS2088A SoC support
Priyanka Jain [Thu, 17 Nov 2016 06:59:55 +0000 (12:29 +0530)]
armv8: fsl-layerscape: Add NXP LS2088A SoC support

The QorIQ LS2088A SoC is built on layerscape architecture.

It is similar to LS2080A SoC with some differences like
1)Timer controller offset is different
2)It has A72 cores
3)It supports TZASC module

Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
7 years agoarmv8: fsl-layerscape : Check SVR for initializing TZASC
Priyanka Jain [Thu, 17 Nov 2016 06:59:54 +0000 (12:29 +0530)]
armv8: fsl-layerscape : Check SVR for initializing TZASC

LS2080 SoC and its personalities does not support TZASC
But other new SoCs like LS2088A, LS1088A supports TZASC

Hence, skip initializing TZASC for Ls2080A based on SVR

Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
7 years agoarmv8: fsl-layerscape: Update TZASC registers type
Priyanka Jain [Thu, 17 Nov 2016 06:59:53 +0000 (12:29 +0530)]
armv8: fsl-layerscape: Update TZASC registers type

TZASC registers like TZASC_GATE_KEEPER, TZASC_REGION_ATTRIBUTES
are 32-bit regsiters.
So while doing register load-store operations, 32-bit intermediate
register, w0 should be used.
Update x0 register to w0 register type.

Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
7 years agoarmv8: lsch3: Use SVR based timer base address detection
Priyanka Jain [Thu, 17 Nov 2016 06:59:52 +0000 (12:29 +0530)]
armv8: lsch3: Use SVR based timer base address detection

Timer controller base address has been changed from
LS2080A SoC (and its personalities) to new SoCs like
LS2088A, LS1088A.

Use SVR based timer base address detection to avoid compile time #ifdef.

Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
Signed-off-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
7 years agoarmv8: lsch3: Add generic get_svr() in assembly
Priyanka Jain [Thu, 17 Nov 2016 06:59:51 +0000 (12:29 +0530)]
armv8: lsch3: Add generic get_svr() in assembly

Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
7 years agoMAINTAINERS: SUNXI: Update maintainership
Jagan Teki [Tue, 22 Nov 2016 11:44:06 +0000 (17:14 +0530)]
MAINTAINERS: SUNXI: Update maintainership

Add Jagan and Maxime as Maintainers for SUNXI

Signed-off-by: Jagan Teki <jagan@openedev.com>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
7 years agoMerge branch 'master' of git://git.denx.de/u-boot-spi
Tom Rini [Tue, 22 Nov 2016 12:57:23 +0000 (07:57 -0500)]
Merge branch 'master' of git://git.denx.de/u-boot-spi

7 years agosf: Add support for MX66U51235F, MX66L1G45G, MT25QU02G, MT25QL02G
Radu Bacrau [Tue, 22 Nov 2016 00:27:19 +0000 (18:27 -0600)]
sf: Add support for MX66U51235F, MX66L1G45G, MT25QU02G, MT25QL02G

This commit adds support for the Macronix MX66U51235F,
MX66L1G45G and Micron MT25QU02G, MT25QL02G flash parts.

Signed-off-by: Radu Bacrau <dumitru.bacrau@intel.com>
Cc: Chin Liang See <clsee@altera.com>
Cc: Radu Bacrau <radu.bacrau@gmail.com>
[Update proper commit header and 80-line cut on body]
Reviewed-by: Jagan Teki <jagan@openedev.com>
7 years agoam57xx: Remove unused variable warnings
Tom Rini [Mon, 21 Nov 2016 19:07:58 +0000 (14:07 -0500)]
am57xx: Remove unused variable warnings

Starting with the changes to fix USB host on am57xx/am43xx we stopped
using usb_otg_ss1/related stuff and but we hadn't been enabling the
relevant options to cause the warnings until just recently.

Fixes: 55efadde7ede (ARM: AM57xx: AM43xx: Fix USB host)
Fixes: a48d687c575f (configs: am57xx: Enable download gadget)
Signed-off-by: Tom Rini <trini@konsulko.com>
7 years agofastboot: simplify the Kconfig logic
Yann E. MORIN [Sun, 13 Nov 2016 21:26:13 +0000 (22:26 +0100)]
fastboot: simplify the Kconfig logic

Currently, the fastboot item in menuconfig is a comment followed by a
boolean option withan empty prompt, followed by a menu:

        *** FASTBOOT ***
    [*]
          Fastboot support  --->

This is not "nice-looking" at all...

Change the logic to make the boolean option a "menuconfig" rather than a
mere "config", so that all dependent options gets groupped under a menu.
The layout is now:

        *** FASTBOOT ***
    [*] Fastboot support  --->

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Simon Glass <sjg@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
7 years agoARM: OMAP3_LOGIC: Update MTD Partition Table
Adam Ford [Sun, 13 Nov 2016 04:02:37 +0000 (22:02 -0600)]
ARM: OMAP3_LOGIC: Update MTD Partition Table

The previous partition table did not support a separate device tree
and the kernel size was limited to 4MB.  This update shows the
location of the device tree (labeled as spl-os) for those who
want to use Falcon Mode or use U-Boot to store the Flattened
Device Tree (FDT) to NAND without appending it to the kernel.

This also grows the kernel to 6MB since 4MB was becomming tight

Signed-off-by: Adam Ford <aford173@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agoARM: OMAP3_LOGIC: Remove FIT Support
Adam Ford [Sun, 13 Nov 2016 03:53:31 +0000 (21:53 -0600)]
ARM: OMAP3_LOGIC: Remove FIT Support

Commit ("2cd1ff84037a: OMAP3_LOGIC: Setup defconfig to enable
SPL and NAND booting") accidentally enabled FIT support.

This patch removes the FIT support.

Signed-off-by: Adam Ford <aford173@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agoARM: OMAP3_LOGIC: Fix SPL Memory Map for Falcon Mode
Adam Ford [Sun, 13 Nov 2016 03:43:37 +0000 (21:43 -0600)]
ARM: OMAP3_LOGIC: Fix SPL Memory Map for Falcon Mode

The memory map defined in commit ("49c7303f0e52: OMAP3: Enable SPL
on omap3_logic) was used by a copy-paste of another board without
fully understanding how the map works in Falcon mode.  This patch
undoes the customization and uses the default SPL Memory Map
for OMAP3.

When building the uImage, set LOADADDR=0x82000000 and Falcon
mode should properly load.

Signed-off-by: Adam Ford <aford173@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agorpi: passthrough of the firmware provided FDT blob
Cédric Schieli [Fri, 11 Nov 2016 10:59:07 +0000 (11:59 +0100)]
rpi: passthrough of the firmware provided FDT blob

Raspberry firmware used to pass a FDT blob at a fixed address (0x100),
but this is not true anymore. The address now depends on both the
memory size and the blob size [1].

If one wants to passthrough this FDT blob to the kernel, the most
reliable way is to save its address from the r2/x0 register in the
U-Boot entry point and expose it in a environment variable for
further processing.

This patch just does this:
- save the provided address in the global variable fw_dtb_pointer
- expose it in ${fdt_addr} if it points to a a valid FDT blob

There are many different ways to use it. One can, for example, use
the following script which will extract from the tree the command
line built by the firmware, then hand over the blob to a previously
loaded kernel:

fdt addr ${fdt_addr}
fdt get value bootargs /chosen bootargs
bootz ${kernel_addr_r} - ${fdt_addr}

Alternatively, users relying on sysboot/pxe can simply omit any FDT
statement in their extlinux.conf file, U-Boot will automagically pick
${fdt_addr} and pass it to the kernel.

[1] https://www.raspberrypi.org/forums//viewtopic.php?f=107&t=134018

Signed-off-by: Cédric Schieli <cschieli@gmail.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
7 years agoarm: add save_boot_params for ARM1176
Cédric Schieli [Fri, 11 Nov 2016 10:59:06 +0000 (11:59 +0100)]
arm: add save_boot_params for ARM1176

Implement a hook to allow boards to save boot-time CPU state for later
use. When U-Boot is chain-loaded by another bootloader, CPU registers may
contain useful information such as system configuration information. This
feature mirrors the equivalent ARMv7 feature.

Signed-off-by: Cédric Schieli <cschieli@gmail.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
7 years agoimage: Combine image_sig_algo with image_sign_info
Andrew Duda [Tue, 8 Nov 2016 18:53:41 +0000 (18:53 +0000)]
image: Combine image_sig_algo with image_sign_info

Remove the need to explicitly add SHA/RSA pairings. Invalid SHA/RSA
pairings will still fail on verify operations when the hash length is
longer than the key length.

Follow the same naming scheme "checksum,crytpo" without explicitly
defining the string.

Indirectly adds support for "sha1,rsa4096" signing/verification.

Signed-off-by: Andrew Duda <aduda@meraki.com>
Signed-off-by: aduda <aduda@meraki.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agoimage: Add crypto_algo struct for RSA info
Andrew Duda [Tue, 8 Nov 2016 18:53:41 +0000 (18:53 +0000)]
image: Add crypto_algo struct for RSA info

Cut down on the repetition of algorithm information by defining separate
checksum and crypto structs. image_sig_algos are now simply pairs of
unique checksum and crypto algos.

Signed-off-by: Andrew Duda <aduda@meraki.com>
Signed-off-by: aduda <aduda@meraki.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agorsa: Verify RSA padding programatically
Andrew Duda [Tue, 8 Nov 2016 18:53:40 +0000 (18:53 +0000)]
rsa: Verify RSA padding programatically

Padding verification was done against static SHA/RSA pair arrays which
take up a lot of static memory, are mostly 0xff, and cannot be reused
for additional SHA/RSA pairings. The padding can be easily computed
according to PKCS#1v2.1 as:

  EM = 0x00 || 0x01 || PS || 0x00 || T

where PS is (emLen - tLen - 3) octets of 0xff and T is DER encoding
of the hash.

Store DER prefix in checksum_algo and create rsa_verify_padding
function to handle verification of a message for any SHA/RSA pairing.

Signed-off-by: Andrew Duda <aduda@meraki.com>
Signed-off-by: aduda <aduda@meraki.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agorsa: cosmetic: rename pad_len to key_len
Andrew Duda [Tue, 8 Nov 2016 18:53:39 +0000 (18:53 +0000)]
rsa: cosmetic: rename pad_len to key_len

checksum_algo's pad_len field isn't actually used to store the length of
the padding but the total length of the RSA key (msg_len + pad_len)

Signed-off-by: Andrew Duda <aduda@meraki.com>
Signed-off-by: aduda <aduda@meraki.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agoTI: Remove CONFIG_OMAP_COMMON in favor of CONFIG_ARCH_OMAP2
Tom Rini [Tue, 8 Nov 2016 02:34:55 +0000 (21:34 -0500)]
TI: Remove CONFIG_OMAP_COMMON in favor of CONFIG_ARCH_OMAP2

With the move to arch/arm/mach-omap2 there are now very few uses of
CONFIG_OMAP_COMMON and further they can all be replaced with
CONFIG_ARCH_OMAP2, so do so.

Signed-off-by: Tom Rini <trini@konsulko.com>
7 years agoarm: Introduce arch/arm/mach-omap2 for OMAP2 derivative platforms
Tom Rini [Tue, 8 Nov 2016 02:34:54 +0000 (21:34 -0500)]
arm: Introduce arch/arm/mach-omap2 for OMAP2 derivative platforms

This moves what was in arch/arm/cpu/armv7/omap-common in to
arch/arm/mach-omap2 and moves
arch/arm/cpu/armv7/{am33xx,omap3,omap4,omap5} in to arch/arm/mach-omap2
as subdirectories.  All refernces to the former locations are updated to
the current locations.  For the logic to decide what our outputs are,
consolidate the tests into a single config.mk rather than including 4.

Signed-off-by: Tom Rini <trini@konsulko.com>
7 years agoarm: Introduce ARCH_OMAP2
Tom Rini [Tue, 8 Nov 2016 02:34:53 +0000 (21:34 -0500)]
arm: Introduce ARCH_OMAP2

To start consolidating various TI-related code, introduce the ARCH_OMAP2
symbol.  While we have removed omap2-specific boards some time ago,
matching up with the kernel naming here will help overall.

Signed-off-by: Tom Rini <trini@konsulko.com>
7 years agofs-test.sh: Update expected results
Stefan Brüns [Sun, 6 Nov 2016 00:32:15 +0000 (01:32 +0100)]
fs-test.sh: Update expected results

After the latest changes, ext4 no longer has any fails.

Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
7 years agoext4: Allow reading files with non-zero offset, clamp read len
Stefan Brüns [Sun, 6 Nov 2016 17:33:57 +0000 (18:33 +0100)]
ext4: Allow reading files with non-zero offset, clamp read len

Support was already implemented, but not hooked up. This fixes several
fails in the test cases.

Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
7 years agoext4: Fix handling of sparse files
Stefan Brüns [Sat, 5 Nov 2016 21:17:14 +0000 (22:17 +0100)]
ext4: Fix handling of sparse files

A sparse file may have regions not mapped by any extents, at the start
or at the end of the file, or anywhere between, thus not finding a
matching extent region is never an error.

Found by python filesystem tests.

Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
7 years agotest/py: expose config and log as session scoped fixture
Stefan Brüns [Sat, 5 Nov 2016 16:45:32 +0000 (17:45 +0100)]
test/py: expose config and log as session scoped fixture

If a test uses a fixture which is expensive to setup, the fixture can
possibly created with session or module scope. As u_boot_console has
function scope, it can not be used in this case.

Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
7 years agogpio: dwapb: Add support for port B
Phil Edworthy [Thu, 3 Nov 2016 11:05:12 +0000 (11:05 +0000)]
gpio: dwapb: Add support for port B

The IP supports two ports, A and B, each providing up to 32 gpios.
The driver already creates a 2nd gpio bank by reading the 2nd node
from DT, so this is quite a simple change to support the 2nd bank.

Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
Acked-by: Marek Vasut <marex@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agoarm: dra7xx: Unify Android partition table
Semen Protsenko [Mon, 31 Oct 2016 17:53:46 +0000 (19:53 +0200)]
arm: dra7xx: Unify Android partition table

Make Android partition table the same as for AM57x EVM.

  1. Make "bootloader" partition start from 0x300 sectors offset, so
     DRA7 is bootable in Android mode (see
     CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR option).
  2. Increase "bootloader" partition size, because size of u-boot.img is
     about 632 KiB (when building DT defconfig, with FIT image enabled).
  3. Specify "reserved" partition explicitly, rather than specifying
     "efs" partition start. Reserved area will be used to store U-Boot
     environment on eMMC. It's convenient to have it exposed explicitly
     so we can read/write U-Boot environment.
  4. Keep all Android partitions locations intact, by reducing
     "reserved" partition size. CONFIG_ENV_SIZE is considered.

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>