]> git.dujemihanovic.xyz Git - u-boot.git/log
u-boot.git
6 years agoarmv8: make SPL exception vectors optional
Andre Przywara [Tue, 24 Jul 2018 23:57:01 +0000 (00:57 +0100)]
armv8: make SPL exception vectors optional

Even though the exception vector table is a fundamental part of the ARM
architecture, U-Boot mostly does not make real use of it, except when
crash dumping. But having it in takes up quite some space, partly due to
the architectural alignment requirement of 2KB. Since we don't take special
care of that, the compiler adds a more or less random amount of padding
space, which increases the image size quite a bit, especially for the SPL.

On a typical Allwinner build this is around 1.5KB of padding, plus 1KB
for the vector table (mostly padding space again), then some extra code
to do the actual handling. This amounts to almost 10% of the maximum image
size, which is quite a lot for a pure debugging feature.

Add a Kconfig symbol to allow the exception vector table to be left out
of the build for the SPL.
For now this is "default y" for everyone, but specific defconfigs,
platforms or .config files can opt out here at will, to mitigate the code
size pressure we see for some SPLs.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
6 years agoarmv8: Reduce exception handling code
Andre Przywara [Tue, 24 Jul 2018 23:57:00 +0000 (00:57 +0100)]
armv8: Reduce exception handling code

The arm64 exception handling code is quite big, mostly due to
architectural alignment requirements. Each exception entry spans 32
instructions, which sounds generous, but is too small to fit all of the
save/branch/restore code in there. So at the moment we use only four
instructions, branching into shared save and restore routines.
To not leave the space for those remaining 28 instructions wasted, let's
split the save and restore routines and stuff them into the gaps.
This saves about 250 bytes of code, which is helpful for those tight
SPLs.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
6 years agoti_omap3_common: Add CONFIG_SYS_NS16550_COMx entries
Adam Ford [Tue, 24 Jul 2018 23:06:04 +0000 (18:06 -0500)]
ti_omap3_common: Add CONFIG_SYS_NS16550_COMx entries

Several boards do not use the default UART3, so they do a check
for ifdef CONFIG_SPL_BUILD and enable the pointer for
CONFIG_SYS_NS16550_COMx to point to OMAP34XX_UARTx.

Let's consoldate this all into one place, and remove them from the
individual boards.

Signed-off-by: Adam Ford <aford173@gmail.com>
6 years agoconfigs: stm32mp15: enable ADC
Fabrice Gasnier [Tue, 24 Jul 2018 14:31:32 +0000 (16:31 +0200)]
configs: stm32mp15: enable ADC

Enable ADC on stm32mp15.
- CONFIG_CMD_ADC
- CONFIG_STM32_ADC

Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agoadc: Add driver for STM32 ADC
Fabrice Gasnier [Tue, 24 Jul 2018 14:31:31 +0000 (16:31 +0200)]
adc: Add driver for STM32 ADC

This patch adds support for STMicroelectronics STM32 ADC (analog to
digital converter). It's originally based on Linux kernel v4.18-rcs
drivers/iio/adc/stm32-adc*. It's composed of:
- core driver (UCLASS_SIMPLE_BUS) manages common resources (clk, regu).
- child drivers (UCLASS_ADC) declare each ADC, channels and handle
  conversions.
This driver currently supports STM32H7 and STM32MP1 ADC.

Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agodt-bindings: Document STM32 ADC DT bindings
Fabrice Gasnier [Tue, 24 Jul 2018 14:31:30 +0000 (16:31 +0200)]
dt-bindings: Document STM32 ADC DT bindings

This patch adds documentation of device tree bindings for the STM32 ADC.
It's based on linux-v4.18-rc* dt-bindings, at the time of writing:
- Documentation/devicetree/bindings/iio/adc/st,stm32-adc.txt

Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agodm: adc: uclass: get reference regulator once
Fabrice Gasnier [Tue, 24 Jul 2018 14:31:29 +0000 (16:31 +0200)]
dm: adc: uclass: get reference regulator once

device_get_supply_regulator() only needs to be called once.
But each time there's call to adc_vxx_value() for instance, it calls
adc_vxx_platdata_update() -> device_get_supply_regulator().

So, move device_get_supply_regulator() to pre_probe() routine.

This also allows vdd_supply/vss_supply to be provided directly from
uc_pdata, e.g dt-binding variant like stm32-adc provide its own
'vref-supply'.

Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agoclk: add clk_valid()
Fabrice Gasnier [Tue, 24 Jul 2018 14:31:28 +0000 (16:31 +0200)]
clk: add clk_valid()

Add clk_valid() to check for optional clocks are valid.
Call clk_valid() in test/dm/clk.c and add relevant test routine to
sandbox clk tests.

Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agokconfig: Replace spaces with tabs
Michal Simek [Tue, 24 Jul 2018 12:47:43 +0000 (14:47 +0200)]
kconfig: Replace spaces with tabs

Trivial Kconfig cleanup. Use tabs instead of spaces.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
6 years agoAdd Beaglebone Enhanced support
Koen Kooi [Wed, 18 Jul 2018 08:13:59 +0000 (10:13 +0200)]
Add Beaglebone Enhanced support

The "Beaglebone Enhanced" by Sancloud is based on the Beaglebone Black,
but with the following differences:

 * Gigabit capable PHY
 * Extra USB hub, optional i2c control
 * lps3331ap barometer connected over i2c
 * MPU6050 6 axis MEMS accelerometer/gyro connected over i2c
 * 1GiB DDR3 RAM
 * RTL8723 Wifi/Bluetooth connected over USB

Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Reviewed-by: Tom Rini <trini@konsulko.com>
6 years agoMerge git://git.denx.de/u-boot-dm
Tom Rini [Fri, 3 Aug 2018 14:08:13 +0000 (10:08 -0400)]
Merge git://git.denx.de/u-boot-dm

6 years agoARM: tegra: align carveout size
Stephen Warren [Tue, 31 Jul 2018 18:38:27 +0000 (12:38 -0600)]
ARM: tegra: align carveout size

Align the size of the carveout region to 2M. This ensures that the size
can be accurately represented by an LPAE page table that uses sections.

This solves a bug (hang at boot time soon after printing the DRAM size)
that only shows up when the following two commits are merged together:
d32e86bde8a3 ARM: HYP/non-sec: enable ARMV7_LPAE if HYP mode is supported
6e584e633d10 ARM: tegra: avoid using secure carveout RAM

Cc: Mark Kettenis <kettenis@openbsd.org>
Cc: Alexander Graf <agraf@suse.de>
Acked-by: Tom Warren <twarren@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
6 years agobinman: Adjust _GetPropTree() parameters
Simon Glass [Tue, 17 Jul 2018 19:25:52 +0000 (13:25 -0600)]
binman: Adjust _GetPropTree() parameters

At present this function takes a filename, but it is better to use an Fdt
object so that the caller can control this, perhaps obtainint the device
tree from a bytearray. Update the method accordingly and also fix a
confusing parameter name.

Signed-off-by: Simon Glass <sjg@chromium.org>
6 years agobinman: Add a test to catch use of the old 'pos' property
Simon Glass [Tue, 17 Jul 2018 19:25:51 +0000 (13:25 -0600)]
binman: Add a test to catch use of the old 'pos' property

This property has been changed to 'offset'. To help downstream users who
might still be using 'pos', add a check that this is not used by mistake.

Signed-off-by: Simon Glass <sjg@chromium.org>
6 years agobinman: Rename ReadContents() to ReadBlobContents()
Simon Glass [Tue, 17 Jul 2018 19:25:50 +0000 (13:25 -0600)]
binman: Rename ReadContents() to ReadBlobContents()

This function name is too generic for its purpose and is therefore
confusing. It actually only applies to blobs, so rename it to indicate
this.

Signed-off-by: Simon Glass <sjg@chromium.org>
6 years agobinman: Show the image position in the map
Simon Glass [Tue, 17 Jul 2018 19:25:49 +0000 (13:25 -0600)]
binman: Show the image position in the map

At present the map only shows the offset and size for each region. The
image position provides the actual position of each entry in the image,
regardless of the section hierarchy.

Add the image position to the map.

Signed-off-by: Simon Glass <sjg@chromium.org>
6 years agobinman: Add support for adding TPL binaries
Simon Glass [Tue, 17 Jul 2018 19:25:48 +0000 (13:25 -0600)]
binman: Add support for adding TPL binaries

Add support for U-Boot's TPL and TPL device tree. Also fix a few comments
in the other device-tree entries.

Signed-off-by: Simon Glass <sjg@chromium.org>
6 years agobinman: Add an entry for a Chromium vblock
Simon Glass [Tue, 17 Jul 2018 19:25:47 +0000 (13:25 -0600)]
binman: Add an entry for a Chromium vblock

This adds support for a Chromium verified boot block, used to sign a
read-write section of the image.

Signed-off-by: Simon Glass <sjg@chromium.org>
6 years agodtoc: Add a function to obtain a list of phandles
Simon Glass [Tue, 17 Jul 2018 19:25:46 +0000 (13:25 -0600)]
dtoc: Add a function to obtain a list of phandles

Add a function which can decode a property containing a list of phandles.
This is useful for finding nodes linked to a property. Also provide a way
to look up a single phandle and get the Fdt object from a Node.

Signed-off-by: Simon Glass <sjg@chromium.org>
6 years agopatman: Show the current directory in GetInputFilename()
Simon Glass [Tue, 17 Jul 2018 19:25:45 +0000 (13:25 -0600)]
patman: Show the current directory in GetInputFilename()

When this fails it is useful to see the current directory, since U-Boot's
build system will typically change into the output directory during the
build. Add this information to the error.

Signed-off-by: Simon Glass <sjg@chromium.org>
6 years agobinman: Add support for Chromium GBB
Simon Glass [Tue, 17 Jul 2018 19:25:44 +0000 (13:25 -0600)]
binman: Add support for Chromium GBB

This entry contains a Google Binary Block, used to store keys and bitmaps
in a Chromium image.

Signed-off-by: Simon Glass <sjg@chromium.org>
6 years agopatman: Add a few more helpers to the tools library
Simon Glass [Tue, 17 Jul 2018 19:25:43 +0000 (13:25 -0600)]
patman: Add a few more helpers to the tools library

Add functions to read and write a file, looking through a list of search
paths to find it.

Signed-off-by: Simon Glass <sjg@chromium.org>
6 years agopatman: Allow test commands to fall back to real ones
Simon Glass [Tue, 17 Jul 2018 19:25:42 +0000 (13:25 -0600)]
patman: Allow test commands to fall back to real ones

Tests use the 'test_result' feature to return a predetermined command
result for particular commands. The avoids needing to have the real
command available just to run a test. It works by calling the function
provided by the test, to get the value.

However sometimes the test does need to run the real command. Allow it to
fall back to do this when the function does not return a result.

Signed-off-by: Simon Glass <sjg@chromium.org>
6 years agodtoc: Export the _FindNode() function
Simon Glass [Tue, 17 Jul 2018 19:25:41 +0000 (13:25 -0600)]
dtoc: Export the _FindNode() function

This is useful for clients that want to find a node. Export it so it can
be used by others.

Signed-off-by: Simon Glass <sjg@chromium.org>
6 years agobinman: Add an entry filled with a repeating byte
Simon Glass [Tue, 17 Jul 2018 19:25:40 +0000 (13:25 -0600)]
binman: Add an entry filled with a repeating byte

It is sometimes useful to have an area of the image which is all zeroes,
or all 0xff. This can often be achieved by padding the size of an an
existing entry and setting the pad byte for an entry or image.

But it is useful to have an explicit means of adding blocks of repeating
data to the image. Add a 'fill' entry type to handle this.

Signed-off-by: Simon Glass <sjg@chromium.org>
6 years agobinman: Add support for a cros_ec image
Simon Glass [Tue, 17 Jul 2018 19:25:39 +0000 (13:25 -0600)]
binman: Add support for a cros_ec image

Add an entry type which can hold a Chrome OS EC.

To make this work a new entry type is created, which supports getting a
blob filename from the command line.

Signed-off-by: Simon Glass <sjg@chromium.org>
6 years agobinman: Add support for flashrom FMAP
Simon Glass [Tue, 17 Jul 2018 19:25:38 +0000 (13:25 -0600)]
binman: Add support for flashrom FMAP

Add an entry which can hold an FMAP region as used by flashrom, an
open-source flashing tool used on Linux x86 machines. This provides a
simplified non-hierarchical view of the entries in the image and has a
signature at the start to allow flashrom to find it in the image.

Signed-off-by: Simon Glass <sjg@chromium.org>
6 years agobinman: Create README.entries
Simon Glass [Tue, 17 Jul 2018 19:25:37 +0000 (13:25 -0600)]
binman: Create README.entries

Create a new README containing documentation for the entry types supported
by binman. This provides an easy reference in one place. It is
automatically generated from the source-code documentation.

Add a reference to this from the binman README.

Signed-off-by: Simon Glass <sjg@chromium.org>
6 years agobinman: Allow creation of entry documentation
Simon Glass [Tue, 17 Jul 2018 19:25:36 +0000 (13:25 -0600)]
binman: Allow creation of entry documentation

Binman supports quite a number of different entries now. The operation of
these is not always obvious but at present the source code is the only
reference for understanding how an entry works.

Add a way to create documentation (from the source code) which can be put
in a new 'README.entries' file.

Signed-off-by: Simon Glass <sjg@chromium.org>
6 years agobinman: Expand documentation for entries
Simon Glass [Tue, 17 Jul 2018 19:25:35 +0000 (13:25 -0600)]
binman: Expand documentation for entries

At present only the more complex entries are documented. It is useful to
have documentation for all entries in one place.

As a first step, add and expand the documentation to cover all entries.

Signed-off-by: Simon Glass <sjg@chromium.org>
6 years agobinman: Allow help to work without libfdt
Simon Glass [Tue, 17 Jul 2018 19:25:34 +0000 (13:25 -0600)]
binman: Allow help to work without libfdt

At present binman needs libfdt.py to be available before it will do
anything, even print help. Import those modules later to avoid this, as it
is bad practice to fail to even show help on startup.

Signed-off-by: Simon Glass <sjg@chromium.org>
6 years agobinman: Support an entry that holds text
Simon Glass [Tue, 17 Jul 2018 19:25:33 +0000 (13:25 -0600)]
binman: Support an entry that holds text

It is useful to able to write an identifying string to the image within an
entry. Add a 'text' entry type to handle this. The actual text is
typically passed to binman on the command line. The text is not itself
nul-terminated but this can be achieved if required by setting the size of
the entry to something larger than the text.

Signed-off-by: Simon Glass <sjg@chromium.org>
6 years agobinman: Add support for passing arguments to entries
Simon Glass [Tue, 17 Jul 2018 19:25:32 +0000 (13:25 -0600)]
binman: Add support for passing arguments to entries

Sometimes it is useful to pass binman the value of an entry property from
the command line. For example some entries need access to files and it is
not always convenient to put these filenames in the image definition
(device tree).

Add a -a option which can be used like this:

   -a<prop>=<value>

where

   <prop> is the property to set
   <value> is the value to set it to

Signed-off-by: Simon Glass <sjg@chromium.org>
6 years agodtoc: Add missing comments to fdt_util
Simon Glass [Tue, 17 Jul 2018 19:25:31 +0000 (13:25 -0600)]
dtoc: Add missing comments to fdt_util

This module has a few missing comments. Add them.

Signed-off-by: Simon Glass <sjg@chromium.org>
6 years agobinman: Add a new 'image-pos' property
Simon Glass [Wed, 1 Aug 2018 21:22:42 +0000 (15:22 -0600)]
binman: Add a new 'image-pos' property

At present each entry has an offset within its parent section. This is
useful for figuring out how entries relate to one another. However it
is sometimes necessary to locate an entry within an image, regardless
of which sections it is nested inside.

Add a new 'image-pos' property to provide this information. Also add
some documentation for the -u option binman provides, which updates the
device tree with final entry information.

Since the image position is a better symbol to use for the position of
U-Boot as obtained by SPL, update the SPL symbols to use this instead of
offset, which might be incorrect if hierarchical sections are used.

Signed-off-by: Simon Glass <sjg@chromium.org>
6 years agobinman: Enhance the map and fdt-update output
Simon Glass [Tue, 17 Jul 2018 19:25:28 +0000 (13:25 -0600)]
binman: Enhance the map and fdt-update output

At present the .map file produced for each image does not include the
overall image size. This is useful information.

Update the code to generate it in the .map file as well as the updated
FDT. Also fix a few comments while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>
6 years agobinman: Tidy up some comments in the tests
Simon Glass [Tue, 17 Jul 2018 19:25:27 +0000 (13:25 -0600)]
binman: Tidy up some comments in the tests

A few lines are commented out and can be removed. Also fix return-value
docs for _DoReadFile() and _DoReadFileDtb().

Signed-off-by: Simon Glass <sjg@chromium.org>
6 years agobinman: Add comments to elf_test
Simon Glass [Tue, 17 Jul 2018 19:25:26 +0000 (13:25 -0600)]
binman: Add comments to elf_test

The purpose of some of the tests is not obvious from the function names.
Add a few comments to help with understanding.

Signed-off-by: Simon Glass <sjg@chromium.org>
6 years agobinman: Rename 'position' to 'offset'
Simon Glass [Wed, 1 Aug 2018 21:22:37 +0000 (15:22 -0600)]
binman: Rename 'position' to 'offset'

After some thought, I believe there is an unfortunate naming flaw in
binman. Entries have a position and size, but now that we support
hierarchical sections it is unclear whether a position should be an
absolute position within the image, or a relative position within its
parent section.

At present 'position' actually means the relative position. This indicates
a need for an 'image position' for code that wants to find the location of
an entry without having to do calculations back through parents to
discover this image position.

A better name for the current 'position' or 'pos' is 'offset'. It is not
always an absolute position, but it is always an offset from its parent
offset.

It is unfortunate to rename this concept now, 18 months after binman was
introduced. However I believe it is the right thing to do. The impact is
mostly limited to binman itself and a few changes to in-tree users to
binman:

   tegra
   sunxi
   x86

The change makes old binman definitions (e.g. downstream or out-of-tree)
incompatible if they use the 'pos = <...>' property. Later work will
adjust binman to generate an error when it is used.

Signed-off-by: Simon Glass <sjg@chromium.org>
6 years agobinman: Don't depend on dict order in ELF testOutsideFile()
Simon Glass [Tue, 17 Jul 2018 19:25:24 +0000 (13:25 -0600)]
binman: Don't depend on dict order in ELF testOutsideFile()

At present this test assumes that the symbols are returned in address
order. However, objdump can list symbols in any order and dictionaries do
not guarantee any particular order when iterating through item.

Update elf.GetSymbols() to return an OrderedDict, sorted by address, to
avoid any problems.

Signed-off-by: Simon Glass <sjg@chromium.org>
6 years agoMerge tag 'arc-updates-for-2018.09-rc2' of git://git.denx.de/u-boot-arc
Tom Rini [Wed, 1 Aug 2018 13:26:15 +0000 (09:26 -0400)]
Merge tag 'arc-updates-for-2018.09-rc2' of git://git.denx.de/u-boot-arc

That's a set of prety minor changes and fixes for ARC.

Among them:
 * Improvement in CREG GPIO driver used on ARC dev boards
   that allow us to re-use the driver for SPI's chip select

 * Enable SPI-flsh on AXS10x boards which allows to update
   U-Boot binary that gets loaded by boot-ROM

 * Fix accommodating always utilized unaligned access by
   GCC for ARC starting from 8.1.0

6 years agoMerge git://git.denx.de/u-boot-mpc85xx
Tom Rini [Wed, 1 Aug 2018 00:01:30 +0000 (20:01 -0400)]
Merge git://git.denx.de/u-boot-mpc85xx

6 years ago.travis.yml: Exclude openrd platforms
Tom Rini [Tue, 31 Jul 2018 18:49:34 +0000 (14:49 -0400)]
.travis.yml: Exclude openrd platforms

The openrd platforms are currently orphaned, and are constantly on-edge
or overflowing their binary limit.  Exclude them from travis for now.

Cc: Vagrant Cascadian <vagrant@debian.org>
Cc: Chris Packham <judge.packham@gmail.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
6 years ago.travis.yml: Exclude kirkwood machines from the arm926ejs job
Tom Rini [Tue, 31 Jul 2018 18:48:42 +0000 (14:48 -0400)]
.travis.yml: Exclude kirkwood machines from the arm926ejs job

We have a specific job for kirkwood platforms so exclude them from this
job.

Signed-off-by: Tom Rini <trini@konsulko.com>
6 years agoopenrd: Mark as Orphaned
Tom Rini [Tue, 31 Jul 2018 11:22:13 +0000 (07:22 -0400)]
openrd: Mark as Orphaned

After talking with Albert, mark these boards as orphaned as he no longer
has one.

Cc: Albert ARIBAUD <albert-u-boot@aribaud.net>
Cc: Vagrant Cascadian <vagrant@debian.org>
Cc: Chris Packham <judge.packham@gmail.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
6 years agols1046ardb: Add qspi_spl variant to the MAINTAINERS file
Tom Rini [Tue, 31 Jul 2018 12:49:42 +0000 (08:49 -0400)]
ls1046ardb: Add qspi_spl variant to the MAINTAINERS file

Signed-off-by: Tom Rini <trini@konsulko.com>
6 years agopico-pi: Add Otavio as maintainer
Tom Rini [Tue, 31 Jul 2018 12:48:46 +0000 (08:48 -0400)]
pico-pi: Add Otavio as maintainer

Update the MAINTAINERS file to list Otavio Salvador as the maintainer
for this board.

Acked-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Tom Rini <trini@konsulko.com>
6 years agodm: Fix CMD_DM enabling
Michal Simek [Tue, 31 Jul 2018 06:11:28 +0000 (08:11 +0200)]
dm: Fix CMD_DM enabling

The patch "dm: Change CMD_DM enabling"
(sha1: 08a00cba06a7e608ae65e3d7ea225cf8c639429d) was incorrectly updated
and PICO_IMX7D is missing imply CMD_DM and WARP7 has it twice.
This patch is fixing it.

Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoRevert "powerpc/T104xRDB: Fix endian access issue on EHCI intinalization"
Ran Wang [Thu, 14 Jun 2018 02:45:40 +0000 (10:45 +0800)]
Revert "powerpc/T104xRDB: Fix endian access issue on EHCI intinalization"

There was an EHCI endian accessor issue. Now it's fixed by commit
9829ce2ff25c ("usb: ehci: Fix accessors for big-endian platforms and
descriptors"). Revert commit e6a727fffec7 ("powerpc/T104xRDB: Fix
endian access issue on EHCI intinalization"). On T104x platform,
USB EHCI register use little endian.

Signed-off-by: Ran Wang <ran.wang_1@nxp.com>
[YS: revised commit message]
Reviewed-by: York Sun <york.sun@nxp.com>
6 years agoRevert "powerpc/p1_p2_rdb_pc: Fix endian access issue on EHCI intinalization"
Ran Wang [Thu, 14 Jun 2018 02:45:39 +0000 (10:45 +0800)]
Revert "powerpc/p1_p2_rdb_pc: Fix endian access issue on EHCI intinalization"

There was an EHCI endian accessor issue. Now it's fixed by commit
9829ce2ff25c ("usb: ehci: Fix accessors for big-endian platforms and
descriptors"). Revert commit 0f2296bab141 ("powerpc/p1_p2_rdb_pc:
Fix endian access issue on EHCI intinalization"). On P1 P2 platforms,
USB EHCI register use little endian.

Signed-off-by: Ran Wang <ran.wang_1@nxp.com>
[YS: revised commit message]
Reviewed-by: York Sun <york.sun@nxp.com>
6 years agoARC: Enable unaligned access in hardware if compiler uses it
Alexey Brodkin [Sun, 29 Jul 2018 06:47:52 +0000 (09:47 +0300)]
ARC: Enable unaligned access in hardware if compiler uses it

Even if ARC core might handle unaligned access to data this
hardware feature by default is disabled.

But GCC starting from 8.1.0 unconditionally uses it for ARC HS cores.
Which leads to quite strange and fatal run-time failures like the one
below if HW is not configured properly:
| hsdk# sf probe
| Misaligned data access exception @ 0xbff794d4
| ECR:    0x000d0000
| RET:    0xbff794d4
| BLINK:  0xbff79644
| STAT32: 0x00000800
| GP: 0x1003e000   r25: 0xbfd58f08
| BTA: 0xbff794a4  SP: 0xbfd58cd4  FP: 0xbfd58ef0
| LPS: 0xbff90240 LPE: 0xbff90244 LPC: 0x00000000
| r00: 0x00000000 r01: 0x00000003 r02: 0x000026bf
| r03: 0x00000000 r04: 0x00000100 r05: 0x00000000
| r06: 0x00000001 r07: 0x00000000 r08: 0x1dcd6500
| r09: 0x00000000 r10: 0x00200000 r11: 0x00000000
| r12: 0x1b3d4440 r13: 0xbff9eca4 r14: 0xbfd59d68
| r15: 0xbfd60cd0 r16: 0x00000000 r17: 0x00000000
| r18: 0xbff9ed14 r19: 0xbfd59c78 r20: 0xbfd58d40
| r21: 0xbfd58d44 r22: 0x00000000 r23: 0x00000000
| r24: 0xbfd59ba8
| Resetting CPU ...

Now we're checking for __ARC_UNALIGNED__ define emitted by the
compiler if it's going to use unaligned access and then we
force-enable it in hardware too.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
6 years agoHSDK: Fixes and improvements in README
Alexey Brodkin [Wed, 11 Jul 2018 15:54:48 +0000 (18:54 +0300)]
HSDK: Fixes and improvements in README

1. Explained prerequisites for "make bsp-generate" command.
2. Cleaned-up duplicates

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
6 years agoARC: AXS10x/HSDK: Use our own version of mkimage
Alexey Brodkin [Wed, 11 Jul 2018 15:24:44 +0000 (18:24 +0300)]
ARC: AXS10x/HSDK: Use our own version of mkimage

Since U-Boot tools are being built anyways it's much nicer
to use them instead of relying on some of them bein installed
on build host (which might easily not be the case).

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
6 years agoARC: AXS10x: add tool and make target to generate bsp
Eugeniy Paltsev [Wed, 27 Jun 2018 12:20:48 +0000 (15:20 +0300)]
ARC: AXS10x: add tool and make target to generate bsp

AXS10x boards have preloader that reads SPI flash pages and searches
special image header to fetch and load binary.

Add tool, make target (bsp-generate) to generate
update script and u-boot binary image with header for preloader.

Also add script to default environment to apply updates.

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
6 years agoAXS10x: add spi flash support
Eugeniy Paltsev [Fri, 8 Jun 2018 15:52:14 +0000 (18:52 +0300)]
AXS10x: add spi flash support

AXS10x boards have n25q512 spi flash IC, so add corresponding
nodes to device tree and enaple corresponding options in
defconfig.

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
6 years agoCREG GPIO: add device tree bindings
Eugeniy Paltsev [Fri, 8 Jun 2018 14:58:24 +0000 (17:58 +0300)]
CREG GPIO: add device tree bindings

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
6 years agoGPIO: CREG: improve flexibility of hsdk-creg-gpio driver
Eugeniy Paltsev [Fri, 8 Jun 2018 14:58:23 +0000 (17:58 +0300)]
GPIO: CREG: improve flexibility of hsdk-creg-gpio driver

CREG GPIO is a driver for weird soc-specific output ports, which are
controlled by some fields in memory mapped register.

Example:

31                 9        7        5           0   < bit number
|                  |        |        |           |
[     not used     | gpio-1 | gpio-0 | <-shift-> ]   < 32 bit register
                       ^        ^
                       |        |
                write 0x2 == set output to "1" (activate)
                write 0x3 == set output to "0" (deactivate)

As of tooday we only support fixed (hardcoded) bit per gpio line,
activate / deactivatei and shift values. Fix that by read them from
device tree to be able to use this driver for other boards.

Remove "hsdk" prefix from compatible string as this driver can be
used with different boards like HSDK, AXS101, AXS103, etc.

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
6 years agoPrepare v2017.09-rc1
Tom Rini [Tue, 31 Jul 2018 01:47:29 +0000 (21:47 -0400)]
Prepare v2017.09-rc1

Signed-off-by: Tom Rini <trini@konsulko.com>
6 years agofs-test.sh: Update expected result output
Tom Rini [Mon, 30 Jul 2018 20:06:04 +0000 (16:06 -0400)]
fs-test.sh: Update expected result output

Given 0dc1bfb7302d ("fs: fat: cannot write to subdirectories") we have
changed how the FAT code works from creating the illegal file "./file"
and instead rejecting the path.  The correct behavior would be to write
"file" to "." but not writing an illegal file is a step in the right
direction.  For now, update the expected output to account for the
failure.

Signed-off-by: Tom Rini <trini@konsulko.com>
6 years agoMerge tag 'signed-efi-next' of git://github.com/agraf/u-boot
Tom Rini [Mon, 30 Jul 2018 20:02:29 +0000 (16:02 -0400)]
Merge tag 'signed-efi-next' of git://github.com/agraf/u-boot

Patch queue for efi - 2018-07-25

Highlights this time:

  - Many small fixes to improve spec compatibility (found by SCT)
  - Almost enough to run with sandbox target
  - GetTime() improvements
  - Enable EFI_LOADER and HYP entry on ARMv7 with NONSEC=y

6 years agotpmv2: Make it select CMD_LOG
Tom Rini [Sat, 28 Jul 2018 13:20:12 +0000 (09:20 -0400)]
tpmv2: Make it select CMD_LOG

The TPMv2 code requires the log functionality, so select it.

Signed-off-by: Tom Rini <trini@konsulko.com>
6 years agotools: genboardscfg: move buildman path to first
Peng Fan [Tue, 24 Jul 2018 06:27:18 +0000 (14:27 +0800)]
tools: genboardscfg: move buildman path to first

To system which has kconfiglib installed, genboardscfg will
use system kconfiglib, we need it use U-Boot owned version,
so move the buildman path to first.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Cc: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Tom Rini <trini@konsulko.com>
Acked-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agoKconfig: Sort bool, default, select and imply options
Michal Simek [Mon, 23 Jul 2018 13:55:15 +0000 (15:55 +0200)]
Kconfig: Sort bool, default, select and imply options

Another round of sorting Kconfig entries aplhabetically.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Acked-by: Alexey Brodkin <abrodkin@synopsys.com>
Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
6 years agodm: Change CMD_DM enabling
Michal Simek [Mon, 23 Jul 2018 13:55:14 +0000 (15:55 +0200)]
dm: Change CMD_DM enabling

CMD_DM is used for debug purpose and it shouldn't be enabled by default
via Kconfig. Unfortunately this is in the tree for quite a long time
that's why solution is to use imply DM for all targets which are
enabling DM.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
6 years agoKconfig: Sort bool, default, select and imply options
Michal Simek [Mon, 23 Jul 2018 13:55:13 +0000 (15:55 +0200)]
Kconfig: Sort bool, default, select and imply options

Fix Kconfig bool, default, select and imply options to be
alphabetically sorted.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
6 years agoKconfig: Replace spaces with tabs and missing newline
Michal Simek [Mon, 23 Jul 2018 13:55:12 +0000 (15:55 +0200)]
Kconfig: Replace spaces with tabs and missing newline

Trivial Kconfig cleanup. Use tabs instead of spaces and every Kconfig
entry should be separated by newline.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
6 years agocommon: Log should depends on DM not be selected by DM
Michal Simek [Mon, 23 Jul 2018 13:55:11 +0000 (15:55 +0200)]
common: Log should depends on DM not be selected by DM

Better use depends on instead of select.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
6 years agou-boot: remove driver lookup loop from env_save()
Nicholas Faustini [Mon, 23 Jul 2018 08:01:07 +0000 (10:01 +0200)]
u-boot: remove driver lookup loop from env_save()

When called with ENVOP_SAVE, env_get_location() only returns the
gd->env_load_location variable without actually checking for
the environment location and priority.

This behaviour causes env_save() to fall into an infinite loop when
the low-level drv->save() call fails.

The env_save() function should not loop through the environment
location list but it should save the environment into the location
stored in gd->env_load_location by the last env_load() call.

Signed-off-by: Nicholas Faustini <nicholas.faustini@azcomtech.com>
Reviewed-by: Simon Goldschmidt <sgoldschmidt@de.pepperl-fuchs.com>
6 years agoKconfig: Remove trailing whitespaces in prompt
Michal Simek [Mon, 23 Jul 2018 06:38:56 +0000 (08:38 +0200)]
Kconfig: Remove trailing whitespaces in prompt

Remove additional trailing whitespaces in prompt reported by kconfiglib:

warning: DM_PMIC_SANDBOX (defined at drivers/power/pmic/Kconfig:133) has
leading or trailing whitespace in its prompt
warning: <choice> (defined at dts/Kconfig:204) has leading or trailing
whitespace in its prompt

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Felix Brack <fb@ltec.ch>
6 years agoRevert "fdt_support: Use CONFIG_NR_DRAM_BANKS if defined"
Ramon Fried [Sun, 22 Jul 2018 05:12:14 +0000 (08:12 +0300)]
Revert "fdt_support: Use CONFIG_NR_DRAM_BANKS if defined"

This reverts commit 5e5745465c94605720295fab942eacbdd215db90.

The reverted commit didn't support the scenario where there are less
DRAM banks in U-Boot than in Linux.
Also, it didn't introduce any new functionality, only limitaion.
User could just increase MEMORY_BANKS_MAX if it's too small.
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agoconfigs: omap3_logic: Remove USB Storage and enable CONFIG_BLK
Adam Ford [Sat, 21 Jul 2018 17:53:59 +0000 (12:53 -0500)]
configs: omap3_logic: Remove USB Storage and enable CONFIG_BLK

With the pending requirement for CONFIG_BLK, this patch removes
the USB_STORAGE option which assumes that DM_USB is enabled, but isn't
yet available for the omap2340 musb glue among other issues.  Once
the USB issues are resolved, a future patch can enable them again.

Signed-off-by: Adam Ford <aford173@gmail.com>
6 years agodrivers: rtc: correctly set week day for mc146818
Heinrich Schuchardt [Sat, 21 Jul 2018 16:40:20 +0000 (18:40 +0200)]
drivers: rtc: correctly set week day for mc146818

The driver sets the weekday incorrectly when called by the
'date set' command.

Sunday is 1, Saturday is 7 unlike in U-Boot (see data sheet
https://www.nxp.com/docs/en/data-sheet/MC146818.pdf, table 3).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
6 years agosandbox: compile both TPM stack versions and drivers
Miquel Raynal [Thu, 19 Jul 2018 20:35:12 +0000 (22:35 +0200)]
sandbox: compile both TPM stack versions and drivers

Now that TPMv1 and TPMv2 can be compiled at the same time, let's compile
them both with Sandbox as well as both drivers (and, it is already
implied in Kconfig: both commands).

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agotpm: make TPM_V2 be compiled by default
Miquel Raynal [Thu, 19 Jul 2018 20:35:11 +0000 (22:35 +0200)]
tpm: make TPM_V2 be compiled by default

TPM_V1 was already compiled by default. Now that both can be compiled
at the same time, compiled them both by default.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agotest/py: tpm2: switch from 'tpm' to 'tpm2' command
Miquel Raynal [Thu, 19 Jul 2018 20:35:10 +0000 (22:35 +0200)]
test/py: tpm2: switch from 'tpm' to 'tpm2' command

While using the 'tpm' command should work on most cases, this test suite
only works with TPMv2 and since the work to make both versions build at
the same time, we might end up having both 'tpm' (TPMv1) and 'tpm2'
(TPMv2) commands available at the same time. Ensure this test suite
always use the right one.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agotpm: allow TPM v1 and v2 to be compiled at the same time
Miquel Raynal [Thu, 19 Jul 2018 20:35:09 +0000 (22:35 +0200)]
tpm: allow TPM v1 and v2 to be compiled at the same time

While there is probably no reason to do so in a real life situation, it
will allow to compile test both stacks with the same sandbox defconfig.

As we cannot define two 'tpm' commands at the same time, the command for
TPM v1 is still called 'tpm' and the one for TPM v2 'tpm2'. While this
is the exact command name that must be written into eg. test files, any
user already using the TPM v2 stack can continue to do so by just writing
'tpm' because as long as TPM v1 support is not compiled, U-Boot prompt
will search for the closest command named after 'tpm'.

The command set can also be changed at runtime (not supported yet, but
ready to be), but as one can compile only either one stack or the other,
there is still one spot in the code where conditionals are used: to
retrieve the v1 or v2 command set.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
[trini: In sandbox_tpm2_fill_buf() use NULL not \0 to ensure NULL
terminated string due to LLVM warning]
Signed-off-by: Tom Rini <trini@konsulko.com>
6 years agotpm: remove stale symbol in Kconfig
Miquel Raynal [Thu, 19 Jul 2018 20:35:08 +0000 (22:35 +0200)]
tpm: remove stale symbol in Kconfig

The TPM_DRIVER_SELECTED symbol was used in one of the initial series
about TPMv2 but its use has been dropped, making these selects
useless, remove them.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agotpm: compile Sandbox driver by default
Miquel Raynal [Thu, 19 Jul 2018 20:35:07 +0000 (22:35 +0200)]
tpm: compile Sandbox driver by default

When Sandbox and the TPM stack are both selected, compile Sandbox TPM
driver by default.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agotpm: fix typo in kernel doc
Miquel Raynal [Thu, 19 Jul 2018 20:35:06 +0000 (22:35 +0200)]
tpm: fix typo in kernel doc

The udevice given to the open() function of course must be opened,
not closed.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agoMerge git://git.denx.de/u-boot-fsl-qoriq
Tom Rini [Fri, 27 Jul 2018 17:09:30 +0000 (13:09 -0400)]
Merge git://git.denx.de/u-boot-fsl-qoriq

6 years agoopenrd: Once again shrink binary size
Tom Rini [Fri, 27 Jul 2018 11:56:59 +0000 (07:56 -0400)]
openrd: Once again shrink binary size

With some recent changes to relevant drivers here the openrd board
(openrd_client in this case) does not fit within its size constraint.
We can however drop the slightly extended baudrate table and then the
duplication of mtdparts/mtdids in the default environment.  These
defaults are set in the environment by the 'mtdparts' command and
otherwise referenced throughout the code.

Signed-off-by: Tom Rini <trini@konsulko.com>
6 years agoMerge git://git.denx.de/u-boot-dm
Tom Rini [Fri, 27 Jul 2018 03:12:47 +0000 (23:12 -0400)]
Merge git://git.denx.de/u-boot-dm

6 years agoMerge branch 'master' of git://git.denx.de/u-boot-tegra
Tom Rini [Fri, 27 Jul 2018 03:12:39 +0000 (23:12 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-tegra

6 years agofdt_support: make FDT_FIXUP_PARTITIONS depend on CMD_MTDPARTS
Masahiro Yamada [Fri, 20 Jul 2018 02:04:09 +0000 (11:04 +0900)]
fdt_support: make FDT_FIXUP_PARTITIONS depend on CMD_MTDPARTS

fdt_fixup_mtdparts() calls mtdparts_init() and device_find(),
which are defined in cmd/mtdparts.c

The combination of FDT_FIXUP_PARTITIONS=y and CMD_MTDPARTS=n
emits the following link error:

  common/fdt_support.c:903: undefined reference to `mtdparts_init'
  common/fdt_support.c:914: undefined reference to `device_find'

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agofdt: fix fdtdec_setup_memory_banksize()
Jens Wiklander [Fri, 13 Jul 2018 10:12:11 +0000 (12:12 +0200)]
fdt: fix fdtdec_setup_memory_banksize()

Prior to this patch is fdtdec_setup_memory_banksize() incorrectly
ignoring the "status" field. This patch fixes that by testing the status
with fdtdec_get_is_enabled() before using a memory node.

Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agodoc: driver-model: Fix typo
Chris Packham [Fri, 6 Jul 2018 10:29:46 +0000 (22:29 +1200)]
doc: driver-model: Fix typo

Signed-off-by: Chris Packham <judge.packham@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agopatman: Split alias entries on arbitrary whitespace
Adam Sampson [Wed, 27 Jun 2018 13:38:58 +0000 (14:38 +0100)]
patman: Split alias entries on arbitrary whitespace

Previously the first three words in a git-mailrc alias entry could only
be separated by spaces. git-send-email and Mutt both allow arbitrary
whitespace here.

Signed-off-by: Adam Sampson <ats@offog.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agogit-mailrc: Replace tabs with spaces in alias entries
Adam Sampson [Wed, 27 Jun 2018 13:38:57 +0000 (14:38 +0100)]
git-mailrc: Replace tabs with spaces in alias entries

patman's _ReadAliasFile only splits on spaces, not tabs, so the entries
for dinh and maxime weren't being recognised as valid. I'll fix patman
in a separate patch, but this makes all the entries consistent.

Signed-off-by: Adam Sampson <ats@offog.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agotegra: beaver/apalis: Fix DTC warning
Tom Warren [Thu, 26 Jul 2018 20:14:15 +0000 (13:14 -0700)]
tegra: beaver/apalis: Fix DTC warning

Fix warning when compiling tegra30-beaver/-apalis.dts with latest DTC:

  "Warning (avoid_unnecessary_addr_size): /pci/pch@1f,0: unnecessary
   #address-cells/#size-cells without "ranges" or child "reg" property"

Signed-off-by: Tom Warren <twarren@nvidia.com>
6 years agoARM: tegra: avoid using secure carveout RAM
Stephen Warren [Fri, 22 Jun 2018 19:03:19 +0000 (13:03 -0600)]
ARM: tegra: avoid using secure carveout RAM

If a secure carveout exists, U-Boot cannot use that memory. Fix
carveout_size() to reflect this, and hence transitively fix
usable_ram_size_below_4g() and board_get_usable_ram_top(). This change
ensures that when U-Boot copies the secure monitor code to install it, the
copy target is not in-use for U-Boot code/data.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
6 years agoARM: PSCI: Enable the PSCI node
Stephen Warren [Fri, 22 Jun 2018 19:03:18 +0000 (13:03 -0600)]
ARM: PSCI: Enable the PSCI node

When fixing up the DT to report PSCI support, explicitly enable the node.
DTs may ship with the node disabled in case a PSCI implementation is not
present, and expect any PSCI implementation to enable the node if they are
actually present.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
6 years agoARM: PSCI: Support PSCI v0.2
Stephen Warren [Fri, 22 Jun 2018 19:03:17 +0000 (13:03 -0600)]
ARM: PSCI: Support PSCI v0.2

Enhance the PSCI DT editing code to allow setting a PSCI v0.2 compatible
value in the DT. The CONFIG_ option is added to the whitelist to match the
existing PSCI_1_0 option. While not adding new options to Kconfig isn't
ideal, I figure it's better to keep related options together.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
6 years agoARM: define MON_MODE
Stephen Warren [Fri, 22 Jun 2018 19:03:16 +0000 (13:03 -0600)]
ARM: define MON_MODE

Add a MON_MODE define for ARM's monitor mode. This can be used later by
a secure monitor to avoid hard-coding mode IDs.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
6 years agoARM: tegra: implement RAM repair
Bibek Basu [Fri, 22 Jun 2018 19:02:28 +0000 (13:02 -0600)]
ARM: tegra: implement RAM repair

RAM repair has a few pre-requisites:
1) PMIC power supply (rail) enabled.
2) PMC CRAIL power partition powered.
3) Fuse clock active (it's the default).
4) PLLP reshift branch enabled (it's the default, when PLLP is active).

RAM repair also only need run whenever specific partitions are powered
(main SoC and CCPLEX respectively); RAM repair does not need to be
triggered when any other partition changes state.

start_cpu() needs to be re-ordered slightly to match these requirements.
Note that C0NC and CE0 aren't required for RAM repair to
operate, but they also do no harm, so the entire of powerup_cpus() is
moved rather than splitting it up. The call to remove_cpu_resets() is
moved last to ensure that all other actions complete before releasing
reset; since the PMC power partitions are now enabled early, releasing
reset is what causes the CPUs to start executing code, and RAM repair must
complete before the CPU boots.

Note that this commit is the result of squashing a numbmer of commits
in NVIDIA's downstream L4T branch, hence the multiple signoffs below.

Signed-off-by: Bibek Basu <bbasu@nvidia.com>
Signed-off-by: Sandipan Patra <spatra@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
6 years agoRevert "tegra: Introduce SRAM repair on tegra124"
Stephen Warren [Fri, 22 Jun 2018 19:02:27 +0000 (13:02 -0600)]
Revert "tegra: Introduce SRAM repair on tegra124"

This reverts commit 701b7b1d2cf657d435d2bd6caf43d0247d37220d. It will
be immediately replaced by a different implementation that is more
complete and runs are more targetted times.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
6 years agoMerge branch 'master' of git://git.denx.de/u-boot-net
Tom Rini [Thu, 26 Jul 2018 19:55:42 +0000 (15:55 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-net

6 years agotegra: Indicate that binman makes all three output files
Simon Glass [Sat, 21 Jul 2018 01:49:27 +0000 (19:49 -0600)]
tegra: Indicate that binman makes all three output files

Use GNU make pattern rules to indicate that a single run of binman
produces all three Tegra output files. The avoids make running binman
three times (perhaps in parallel) and those instances inteferring with
each other.

See http://patchwork.ozlabs.org/patch/944611/ for the bug report.

Signed-off-by: Simon Glass <sjg@chromium.org>
Tested-by: Stephen Warren <swarren@nvidia.com>
6 years agoMAINTAINERS: Mark NAND as Orphaned
Tom Rini [Thu, 26 Jul 2018 16:02:03 +0000 (12:02 -0400)]
MAINTAINERS: Mark NAND as Orphaned

Scott is no longer maintaining the NAND subsystem, mark as orphaned for
now.

Acked-by: Scott Wood <oss@buserror.net>
Signed-off-by: Tom Rini <trini@konsulko.com>
6 years agonet: zynq_gem: convert to use livetree
Siva Durga Prasad Paladugu [Mon, 16 Jul 2018 12:55:45 +0000 (18:25 +0530)]
net: zynq_gem: convert to use livetree

This patch updates the zynq gem driver to support livetree.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Vipul Kumar <vipul.kumar@xilinx.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
6 years agodrivers: net: zynq_gem: fix phy dt node setting
Grygorii Strashko [Thu, 5 Jul 2018 17:02:52 +0000 (12:02 -0500)]
drivers: net: zynq_gem: fix phy dt node setting

Now zynq_gem driver will overwrite UCLASS_ETH node when PHY is
connected and configured which is not correct.
Use struct phydev->node instead.

Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Tested-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>