]> git.ipfire.org Git - thirdparty/u-boot.git/log
thirdparty/u-boot.git
5 years agow1: Add 1-Wire uclass
Maxime Ripard [Tue, 18 Sep 2018 07:35:24 +0000 (10:35 +0300)] 
w1: Add 1-Wire uclass

We might want to use 1-Wire devices connected on boards such as EEPROMs in
U-Boot.

Provide a framework to be able to do that.

Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
[eugen.hristev@microchip.com: reworked]
Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
5 years agocommon: Generic loader for file system
Tien Fong Chee [Fri, 6 Jul 2018 08:28:03 +0000 (16:28 +0800)] 
common: Generic loader for file system

This is file system generic loader which can be used to load
the file image from the storage into target such as memory.
The consumer driver would then use this loader to program whatever,
ie. the FPGA device.

Signed-off-by: Tien Fong Chee <tien.fong.chee@intel.com>
5 years agodoc: dtbinding: Add file system firmware loader binding document
Tien Fong Chee [Fri, 6 Jul 2018 08:27:35 +0000 (16:27 +0800)] 
doc: dtbinding: Add file system firmware loader binding document

Add a document to describe file system firmware loader binding
information.

Signed-off-by: Tien Fong Chee <tien.fong.chee@intel.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agodoc: Add new doc for file system firmware loader driver model
Tien Fong Chee [Fri, 6 Jul 2018 08:27:08 +0000 (16:27 +0800)] 
doc: Add new doc for file system firmware loader driver model

Provide information about

- overview of file system firmware loader driver model
- describe storage device and partition in device tree source
- describe fie system firmware loader API

Signed-off-by: Tien Fong Chee <tien.fong.chee@intel.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agoblock: Add a function to find block device descriptor
Tien Fong Chee [Fri, 6 Jul 2018 08:26:36 +0000 (16:26 +0800)] 
block: Add a function to find block device descriptor

Add a function to find the block device descriptor of the parent
device.

Signed-off-by: Tien Fong Chee <tien.fong.chee@intel.com>
[trini: Move function declaration to avoid warning]
Signed-off-by: Tom Rini <trini@konsulko.com>
5 years agocmd: ubifs: Factor out some checking codes into cmd_ubifs_mount()
Tien Fong Chee [Fri, 6 Jul 2018 08:26:01 +0000 (16:26 +0800)] 
cmd: ubifs: Factor out some checking codes into cmd_ubifs_mount()

cmd_ubifs_mount() function would be called directly instead of
involving whole command machinery for mounting ubifs in
generic firmware loader, so some checking codes need to be factored out
into cmd_ubifs_mount() without breaking original functionality design.

Signed-off-by: Tien Fong Chee <tien.fong.chee@intel.com>
Reviewed-by: Marek Vasut <marex@denx.de>
Reviewed-by: Heiko Schocher <hs@denx.de>
5 years agocmd: ubifs: Move ubifs_initialized checking into cmd_ubifs_umount()
Tien Fong Chee [Fri, 6 Jul 2018 08:25:12 +0000 (16:25 +0800)] 
cmd: ubifs: Move ubifs_initialized checking into cmd_ubifs_umount()

cmd_ubifs_umount() function would be called directly instead of involving
whole command machinery in generic firmware loader, so checking on
ubifs_initialized status need to be done in cmd_ubifs_umount() without
breaking original functionality design.

Signed-off-by: Tien Fong Chee <tien.fong.chee@intel.com>
Reviewed-by: Marek Vasut <marex@denx.de>
Reviewed-by: Heiko Schocher <hs@denx.de>
[trini: Fix conflicting type error in cmd/ubi.c]
Signed-off-by: Tom Rini <trini@konsulko.com>
5 years agovideo: Add support for Arm's Mali Display Processors
Liviu Dudau [Fri, 28 Sep 2018 12:50:53 +0000 (13:50 +0100)] 
video: Add support for Arm's Mali Display Processors

Add support for Arm Mali Display Processors DP500, DP550 and DP650.
Only one layer is being used to display the console or boot logo,
even if more layers are supported in the hardware.

Signed-off-by: Liviu Dudau <liviu.dudau@foss.arm.com>
5 years agopatman: Detect missing tools and report them
Simon Glass [Fri, 14 Sep 2018 10:57:25 +0000 (04:57 -0600)] 
patman: Detect missing tools and report them

When tools are needed but not present, at present we just get an error
which can be confusing for the user. Try to be helpful by reporting the
tool as missing and suggesting a possible remedy.

Also update the Run() method to support this.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agobinman: Support updating all device tree files
Simon Glass [Fri, 14 Sep 2018 10:57:24 +0000 (04:57 -0600)] 
binman: Support updating all device tree files

Binman currently supports updating the main device tree with things like
the position of each entry. Extend this support to SPL and TPL as well,
since they may need (a subset of) this information.

Also adjust DTB output files to have a .out extension since this seems
clearer than having a .dtb extension with 'out' in the name somwhere.

Also add a few missing comments and update the DT setup code to use
ReadFile and WriteFile().

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agobinman: Allow control of whether a fake DT is used
Simon Glass [Fri, 14 Sep 2018 10:57:23 +0000 (04:57 -0600)] 
binman: Allow control of whether a fake DT is used

We use a fake device tree in tests most of the time since tests don't
normally care about the actual data. For example, for U-Boot proper we use
U_BOOT_DTB_DATA which is just a four-character string. This makes testing
the image output against an expected value very easy.

However in some cases, such as when the test wants to check that the DT
output containing particular nodes, we do actually need the real DT. Add
support for this, along with a command-line option to select 'test mode'.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agobinman: Obtain the list of device trees from the config
Simon Glass [Fri, 14 Sep 2018 10:57:22 +0000 (04:57 -0600)] 
binman: Obtain the list of device trees from the config

We always have a device tree for U-Boot proper. But we may also have one
for SPL and TPL. Add a new Entry method to find out what DTs an entry
has, and use that list when updating DTs.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agobinman: Centralise device-tree updates within binman
Simon Glass [Fri, 14 Sep 2018 10:57:21 +0000 (04:57 -0600)] 
binman: Centralise device-tree updates within binman

At present we have a few calls to device-tree functions in binman and plan
to add more as we add new entry types which need to report their results.

It makes sense to put this code in a central place so that we can make
sure all device trees are updated. At present we only have U-Boot proper,
but plan to add SPL and TPL too.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agobinman: Move state logic into the state module
Simon Glass [Fri, 14 Sep 2018 10:57:20 +0000 (04:57 -0600)] 
binman: Move state logic into the state module

Rather than reaching into this module from control, move the code that
needs this info into state.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agobinman: Move state information into a new module
Simon Glass [Fri, 14 Sep 2018 10:57:19 +0000 (04:57 -0600)] 
binman: Move state information into a new module

At present the control module has state information in it, since it is the
primary user of this. But it is a bit odd to have entries and other
modules importing control to obtain this information.

It seems better to have a dedicated state module, which control can use as
well. Create a new module using code from control and update other modules
to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agobinman: Add an entry method for getting the default filename
Simon Glass [Fri, 14 Sep 2018 10:57:18 +0000 (04:57 -0600)] 
binman: Add an entry method for getting the default filename

Various entry implementations provide a way to obtain the default filename
for an entry. But at present there is no base-class implementation for
this function. Add one so that the API is defined.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agodtoc: Add a way to create an Fdt object from a data block
Simon Glass [Fri, 14 Sep 2018 10:57:17 +0000 (04:57 -0600)] 
dtoc: Add a way to create an Fdt object from a data block

Support creating an Fdt object without having to write the data to a file
first.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agodtoc: Add methods for adding and updating properties
Simon Glass [Fri, 14 Sep 2018 10:57:16 +0000 (04:57 -0600)] 
dtoc: Add methods for adding and updating properties

Add a few more functions which allow creating and modifying property
values. If only we could do this so easily in the real world.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agodtoc: Support adding new nodes
Simon Glass [Fri, 14 Sep 2018 10:57:15 +0000 (04:57 -0600)] 
dtoc: Support adding new nodes

Add a way to add new nodes and sync them back to the blob.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agodtoc: Fixed endianness in Prop.GetEmpty()
Simon Glass [Fri, 14 Sep 2018 10:57:14 +0000 (04:57 -0600)] 
dtoc: Fixed endianness in Prop.GetEmpty()

This should be big endian, since that is what device tree uses. Fix it.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agodtoc: Allow syncing of the device tree back to a file
Simon Glass [Fri, 14 Sep 2018 10:57:13 +0000 (04:57 -0600)] 
dtoc: Allow syncing of the device tree back to a file

At present we require the caller to manually update the device tree using
individual calls to libfdt functions. This is not ideal. It would be
better if we could make changes using the Python structure and then call a
Sync() function to write them back.

Add this feature to the Fdt class. Update binman and the tests to match.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agobinman: Support building a selection of images
Simon Glass [Fri, 14 Sep 2018 10:57:12 +0000 (04:57 -0600)] 
binman: Support building a selection of images

Sometimes it is useful to build only a subset of the images provided by
the binman configuration. Add a -i option for this. It can be given
multiple times to build several images. If the option is not given, all
images are built.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agobinman: Tidy up the vblock entry
Simon Glass [Fri, 14 Sep 2018 10:57:11 +0000 (04:57 -0600)] 
binman: Tidy up the vblock entry

At present if there are two vblock entries an image their contents are
written to the same file in the output directory. This prevents checking
the contents of each separately.

Fix this by adding part of the entry path to the filename, and add some
missing comments.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agobinman: Add x86 support for starting TPL
Simon Glass [Fri, 14 Sep 2018 10:57:10 +0000 (04:57 -0600)] 
binman: Add x86 support for starting TPL

Sometimes we want to include TPL for x86 platforms, such as when we want
to select between different SPL images (e.g. for Chrome OS verified boot).
Add support for this.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agobinman: Generate an error when text is not provided
Simon Glass [Fri, 14 Sep 2018 10:57:09 +0000 (04:57 -0600)] 
binman: Generate an error when text is not provided

When the value of a text entry is not provided an execption is generated
talking about a None type. This is confusing. Add a more explanatory error
and a test for this case.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agobinman: Allow 'fill' entry to have a size of 0
Simon Glass [Fri, 14 Sep 2018 10:57:08 +0000 (04:57 -0600)] 
binman: Allow 'fill' entry to have a size of 0

The check for this should be for None, not 0. Fix it and add a test.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agobinman: Move 'special properties' docs to README.entries
Simon Glass [Fri, 14 Sep 2018 10:57:07 +0000 (04:57 -0600)] 
binman: Move 'special properties' docs to README.entries

This information should be in the entry it relates to, not in the main
README. Move it.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agofdt: Add Python support for adding/removing nodes
Simon Glass [Fri, 14 Sep 2018 10:57:06 +0000 (04:57 -0600)] 
fdt: Add Python support for adding/removing nodes

Pull this support from these upstream commits:

   bfbfab0 pylibfdt: Add a means to add and delete notes
   9005f41 pylibfdt: Allow delprop() to return errors

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agovideo: Add support for NXP's TDA19988 HDMI encoder
Liviu Dudau [Fri, 28 Sep 2018 12:49:31 +0000 (13:49 +0100)] 
video: Add support for NXP's TDA19988 HDMI encoder

Add support for the NXP TDA19988 HDMI encoder as used on the Juno
development board from Arm.

Signed-off-by: Liviu Dudau <liviu.dudau@foss.arm.com>
5 years agoARM: dts: sun8i: Update A23/A33/r16 dts(i) files from Linux-v4.18-rc3
Jagan Teki [Sat, 4 Aug 2018 19:10:11 +0000 (00:40 +0530)] 
ARM: dts: sun8i: Update A23/A33/r16 dts(i) files from Linux-v4.18-rc3

Update all A23/A33/r16 devicetree dtsi and dtsi files from
Linux-v4.18-rc3 with below commits.

A23:
commit bc3bd041fe766219a44688b182c260064007f0cc
Author: Miquel Raynal <miquel.raynal@bootlin.com>
Date:   Tue Apr 24 17:55:02 2018 +0200

    ARM: dts: sun8i: a23/a33: declare NAND pins

A33:
commit 88fe315d2c0a397ef42d7639addab0e021ae911d
Author: Maxime Ripard <maxime.ripard@bootlin.com>
Date:   Wed Apr 4 11:57:15 2018 +0200

    ARM: dts: sun8i: a33: Add the DSI-related nodes

r16:
commit 9621d0bd1b0d61167e1853ac68cf4869c31bcc96
Author: Miquel Raynal <miquel.raynal@bootlin.com>
Date:   Tue Apr 24 17:55:03 2018 +0200

    ARM: dts: nes: add Nintendo NES/SuperNES Classic Edition support

Note:
- Drop pinctrl from sun8i-r16-nintendo-nes-classic-edition.dts since
  sun8i-a23-a33.dtsi is added with Linux sync.
- Don't sync non U-Boot supported dts files
   sun8i-a23-ippo-q8h-v1.2.dts
   sun8i-a23-ippo-q8h-v5.dts
   sun8i-a33-et-q8-v1.6.dts
   sun8i-a33-ippo-q8h-v1.2.dts
   sun8i-r16-nintendo-nes-classic.dts
   sun8i-r16-nintendo-super-nes-classic.dts

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
5 years agoARM: dts: sun7i: Update A20 dts(i) files from Linux-v4.18-rc3
Jagan Teki [Sat, 4 Aug 2018 19:10:10 +0000 (00:40 +0530)] 
ARM: dts: sun7i: Update A20 dts(i) files from Linux-v4.18-rc3

Update all A10 devicetree dtsi and dtsi files from Linux-v4.18-rc3
with below commit:
commit 5d9ef839f874f4e3923c8a9ae7b136c6c3912cd5
Author: Stefan Mavrodiev <stefan@olimex.com>
Date:   Wed May 16 14:38:08 2018 +0300

    ARM: dts: sun7i: Add Olimex A20-SOM-EVB-eMMC board

Note:
- Update sun7i-a20-primo73.dts as per Linux, since
  this dts is U-Boot specific.
- Drop sun7i-a20-olimex-som-evb-emmc.dts since no board
  added for this.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
5 years agoARM: dts: sun6i: Update A31/A31s dts(i) files from Linux-v4.18-rc3
Jagan Teki [Sat, 4 Aug 2018 19:10:09 +0000 (00:40 +0530)] 
ARM: dts: sun6i: Update A31/A31s dts(i) files from Linux-v4.18-rc3

Update all A31/A31s devicetree dtsi and dtsi files from
Linux-v4.18-rc3 with below commit:
commit b240b419db5d624ce7a5a397d6f62a1a686009ec
Merge: 9c2dd8405c0c 518d2f43c358
Author: Linus Torvalds <torvalds@linux-foundation.org>
Date:   Thu Apr 5 21:18:09 2018 -0700

    Merge tag 'armsoc-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
5 years agoARM: dts: sun5i: Update A10s/A13/gr8/r8 dts(i) files from Linux-v4.18-rc3
Jagan Teki [Sat, 4 Aug 2018 19:10:08 +0000 (00:40 +0530)] 
ARM: dts: sun5i: Update A10s/A13/gr8/r8 dts(i) files from Linux-v4.18-rc3

Update all A10s/A13/gr8/r8devicetree dtsi and dtsi files from
Linux-v4.18-rc3 with below commit:
commit 190e3138f9577885691540dca59c2f07540bde04
Merge: cafc87023b0d a7affb13b271
Author: Arnd Bergmann <arnd@arndb.de>
Date:   Tue Mar 27 14:58:00 2018 +0200

    Merge tag 'sunxi-h3-h5-for-4.17' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into next/dt

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
5 years agoARM: dts: sun4i: Update A10 dts(i) files from Linux-v4.18-rc3
Jagan Teki [Sat, 4 Aug 2018 19:10:07 +0000 (00:40 +0530)] 
ARM: dts: sun4i: Update A10 dts(i) files from Linux-v4.18-rc3

Update all A10 devicetree dtsi and dtsi files from Linux-v4.18-rc3
with below commit:
commit 590b0c0cfc6162aeebbf43eaafb9753b56df1532
Author: Pascal Roeleven <dev@pascalroeleven.nl>
Date:   Fri Apr 20 12:21:12 2018 +0200

    ARM: dts: sun4i: Fix incorrect clocks for displays

Note: Update pinctrl-0 for sun4i-a10-inet-3f.dts, sun4i-a10-inet-3w.dts
like other dts file since there dts file are U-Boot specific.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
5 years agoinclude/video.h: Remove declaration of functions that don't exist.
Liviu Dudau [Mon, 17 Sep 2018 16:45:03 +0000 (17:45 +0100)] 
include/video.h: Remove declaration of functions that don't exist.

video_init, video_putc and video_puts functions are not implemented
anywhere, remove their declaration from the header.

Signed-off-by: Liviu Dudau <liviu.dudau@foss.arm.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heiko Schocher <hs@denx.de>
5 years agovideo: cfb_console: flush cache in display_rle8_bitmap
Sébastien Szymanski [Mon, 10 Sep 2018 07:58:58 +0000 (09:58 +0200)] 
video: cfb_console: flush cache in display_rle8_bitmap

Otherwise BMP RLE8 images are not properly displayed.

Signed-off-by: Sébastien Szymanski <sebastien.szymanski@armadeus.com>
5 years agocmd: Add osd commands
Mario Six [Thu, 27 Sep 2018 07:19:34 +0000 (09:19 +0200)] 
cmd: Add osd commands

Add command to query information from and write text to on-screen
display (OSD) devices.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agotest: list: Add tests for hexdump.c
Mario Six [Thu, 27 Sep 2018 07:19:33 +0000 (09:19 +0200)] 
test: list: Add tests for hexdump.c

Add tests for the hex2bin, bin2hex, and hex_to_bin functions, which were
recently added to U-Boot.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agotest: Add ut_asserteq_mem
Mario Six [Thu, 27 Sep 2018 07:19:32 +0000 (09:19 +0200)] 
test: Add ut_asserteq_mem

Add a unit test assert-method, which compares two given memory areas for
byte-wise equality.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agovideo_osd: Add osd sandbox driver and tests
Mario Six [Thu, 27 Sep 2018 07:19:31 +0000 (09:19 +0200)] 
video_osd: Add osd sandbox driver and tests

Add sandbox driver and tests for the new OSD uclass.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agovideo_osd: Add ihs_video_out driver
Mario Six [Thu, 27 Sep 2018 07:19:30 +0000 (09:19 +0200)] 
video_osd: Add ihs_video_out driver

Add a driver for IHS OSDs on IHS FPGAs.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Mario Six <mario.six@gdsys.cc>
5 years agodrivers: Add OSD uclass
Mario Six [Thu, 27 Sep 2018 07:19:29 +0000 (09:19 +0200)] 
drivers: Add OSD uclass

Some devices offer a text-based OSD (on-screen display) that can be
programmatically controlled (i.e. text displayed on).

Add a uclass to support such devices.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Mario Six <mario.six@gdsys.cc>
5 years agodm: video: support more escape sequences
Heinrich Schuchardt [Wed, 19 Sep 2018 19:31:48 +0000 (21:31 +0200)] 
dm: video: support more escape sequences

The EFI subsystems needs to know the size of the terminal. If the
environment variable

stdout = serial,vidconsole

this size cannot be read from the video console. So the EFI subsystem
sends escape sequences to read the size. With this patch we get support
for the following escape sequences:

ESC "7" Save cursor position
ESC "8" Restore cursor position

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agodm: video: adjust struct vidconsole_priv description
Heinrich Schuchardt [Wed, 19 Sep 2018 18:18:38 +0000 (20:18 +0200)] 
dm: video: adjust struct vidconsole_priv description

The third component of struct vidconsole_priv is ycur.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoMAINTAINERS: assign include/video*.h
Heinrich Schuchardt [Wed, 19 Sep 2018 18:16:32 +0000 (20:16 +0200)] 
MAINTAINERS: assign include/video*.h

The include/video*.h files are part of the drivers in drivers/video. So it
makes sense to assign them to the same maintainer.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agopowerpc: dts: Enable device tree support for T2080QDS
Jagdish Gediya [Mon, 3 Sep 2018 16:05:12 +0000 (21:35 +0530)] 
powerpc: dts: Enable device tree support for T2080QDS

Add device tree for T2080QDS board and enable CONFIG_OF_CONTROL
so that device tree can be compiled.

Update board README for device tree usage.

Signed-off-by: Jagdish Gediya <jagdish.gediya@nxp.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: York Sun <york.sun@nxp.com>
5 years agopowerpc: dts: Add u-boot.dtsi to use binman for MPC85xx boards
Jagdish Gediya [Mon, 3 Sep 2018 16:05:11 +0000 (21:35 +0530)] 
powerpc: dts: Add u-boot.dtsi to use binman for MPC85xx boards

Signed-off-by: Jagdish Gediya <jagdish.gediya@nxp.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: York Sun <york.sun@nxp.com>
5 years agopowerpc: mpc85xx: Use binman to embed dtb inside U-Boot
Jagdish Gediya [Mon, 3 Sep 2018 16:05:10 +0000 (21:35 +0530)] 
powerpc: mpc85xx: Use binman to embed dtb inside U-Boot

Below is the sequence to embed dtb inside U-Boot,
1. Remove bootpg and resetvec section if needed
2. Append dtb
3. Append bootpg and resetvec section back if removed in step 1

Above procedure is required only when CONFIG_MPC85xx and
CONFIG_OF_SEPARATE are defined.

Add new config CONFIG_MPC85XX_HAVE_RESET_VECTOR to indicate that
image has resetvec section. Step 1 and step 3 described above are
required only if this config is y.

Signed-off-by: Jagdish Gediya <jagdish.gediya@nxp.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: York Sun <york.sun@nxp.com>
5 years agopowerpc: mpc85xx: Select BINMAN by default
Jagdish Gediya [Mon, 3 Sep 2018 16:05:09 +0000 (21:35 +0530)] 
powerpc: mpc85xx: Select BINMAN by default

Signed-off-by: Jagdish Gediya <jagdish.gediya@nxp.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: York Sun <york.sun@nxp.com>
5 years agobinman: Add support for PowerPC mpc85xx 'bootpg + resetvec' entry
Jagdish Gediya [Mon, 3 Sep 2018 16:05:08 +0000 (21:35 +0530)] 
binman: Add support for PowerPC mpc85xx 'bootpg + resetvec' entry

This entry contains the PowerPC mpc85xx boot page and resetvec
sections.

Signed-off-by: Jagdish Gediya <jagdish.gediya@nxp.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: York Sun <york.sun@nxp.com>
5 years agobinman: Add a new "skip-at-start" property in Section class
Jagdish Gediya [Mon, 3 Sep 2018 16:05:07 +0000 (21:35 +0530)] 
binman: Add a new "skip-at-start" property in Section class

Currently binman calculates '_skip_at_start' based on 'end-at-4gb'
property and it is used for x86 images.

For PowerPC mpc85xx based CPU, CONFIG_SYS_TEXT_BASE is the entry
offset of the first entry. It can be 0xeff40000 or 0xfff40000 for
nor flash boot, 0x201000 for sd boot etc, so "_skip_at_start"
should be set to CONFIG_SYS_TEXT_BASE.

'end-at-4gb' property is not applicable where CONFIG_SYS_TEXT_BASE +
Image size != 4gb.

Add new property 'skip-at-start' in Section class so that
'_skip_at_start' can be calculated either based on 'end-at-4gb'
or based on "skip-at-start".

Add a test case to check that 'skip-at-start' and 'end-at-4gb'
property can't be used together.

Signed-off-by: Jagdish Gediya <jagdish.gediya@nxp.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: York Sun <york.sun@nxp.com>
5 years agopowerpc/dts: Makefile changes to clean and build dts
Jagdish Gediya [Mon, 3 Sep 2018 16:05:06 +0000 (21:35 +0530)] 
powerpc/dts: Makefile changes to clean and build dts

Signed-off-by: Jagdish Gediya <jagdish.gediya@nxp.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: York Sun <york.sun@nxp.com>
5 years agopowerpc/dts: Define '_end' symbol in mpc85xx U-Boot lds files
Jagdish Gediya [Mon, 3 Sep 2018 16:05:05 +0000 (21:35 +0530)] 
powerpc/dts: Define '_end' symbol in mpc85xx U-Boot lds files

'board_fdt_blob_setup' function sets up fdt blob at '&_end' so
define '_end' symbol in mpc85xx lds files.

Signed-off-by: Jagdish Gediya <jagdish.gediya@nxp.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: York Sun <york.sun@nxp.com>
5 years agoarmv7: ls102xa: Disable QE before enter deep sleep
Ran Wang [Wed, 26 Sep 2018 05:46:30 +0000 (13:46 +0800)] 
armv7: ls102xa: Disable QE before enter deep sleep

Otherwise system will hang after executing wfi.

Signed-off-by: Ran Wang <ran.wang_1@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
5 years agodrivers: qe: Move CONFIG_U_QE to Kconfig
Ran Wang [Wed, 26 Sep 2018 05:46:29 +0000 (13:46 +0800)] 
drivers: qe: Move CONFIG_U_QE to Kconfig

Signed-off-by: Ran Wang <ran.wang_1@nxp.com>
[York S: revised subject line and removed commit message]
Reviewed-by: York Sun <york.sun@nxp.com>
5 years agonet: fman: Support both new and legacy FMan Compatibles
Zhao Qiang [Wed, 29 Aug 2018 03:46:34 +0000 (11:46 +0800)] 
net: fman: Support both new and legacy FMan Compatibles

Recently the FMan Port and MAC compatibles were changed. This patch
aligns the FMan Port and MAC compatibles to the new FMan device tree
binding document. The FMan device tree binding document can be found
in the Linux kernel version 3.18.0, commit
297d35fd2a7d3fbd4e5c0f0c1c18213117ba11ba
./Documentation/devicetree/bindings/powerpc/fsl/fman.txt

This patch doesn't affect legacy compatibles support.

Signed-off-by: Zhao Qiang <qiang.zhao@nxp.com>
[York S: reformatted commit message]
Reviewed-by: York Sun <york.sun@nxp.com>
5 years agols2080ardb: remove dhcp function from env as boot source
Priyanka Jain [Tue, 18 Sep 2018 05:27:27 +0000 (10:57 +0530)] 
ls2080ardb: remove dhcp function from env as boot source

Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
5 years agols1088a: remove dhcp function from u-boot env as boot source
Pramod Kumar [Fri, 14 Sep 2018 11:24:33 +0000 (16:54 +0530)] 
ls1088a: remove dhcp function from u-boot env as boot source

Signed-off-by: Pramod Kumar <pramod.kumar_1@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
5 years agols1012a: remove debug info from u-boot log
Pramod Kumar [Wed, 12 Sep 2018 08:46:49 +0000 (14:16 +0530)] 
ls1012a: remove debug info from u-boot log

Signed-off-by: Pramod Kumar <pramod.kumar_1@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
5 years agoarmv8: ls1043a: enable icid setup for qman portals
Laurentiu Tudor [Mon, 27 Aug 2018 14:34:00 +0000 (17:34 +0300)] 
armv8: ls1043a: enable icid setup for qman portals

Enable support for ICID setup of qman portals and the required device
tree fixups.

Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
5 years agoarmv8: ls1043a: add icid setup support
Laurentiu Tudor [Mon, 27 Aug 2018 14:33:59 +0000 (17:33 +0300)] 
armv8: ls1043a: add icid setup support

Reuse the existing ICID setup code done for LS1046A smmu enablement
and add the equivalent setup for LS1043A chips.

Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
5 years agoarmv8: ls1043a: advertise QMan v3 in configuration
Laurentiu Tudor [Mon, 27 Aug 2018 14:33:58 +0000 (17:33 +0300)] 
armv8: ls1043a: advertise QMan v3 in configuration

The QMan IP block in this SoC is version 3.2 so advertise
this in the SoC configuration header.

Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
5 years agoarmv8: fsl-layerscape: add missing qe base address define
Laurentiu Tudor [Mon, 27 Aug 2018 14:33:57 +0000 (17:33 +0300)] 
armv8: fsl-layerscape: add missing qe base address define

Add define for QUICC Engine register block base address.

Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com>
[York S: revised commit message]
Reviewed-by: York Sun <york.sun@nxp.com>
5 years agodriver: net: fsl-mc: Memset MC reserve ram memory before usage
Prabhakar Kushwaha [Mon, 27 Aug 2018 07:28:52 +0000 (12:58 +0530)] 
driver: net: fsl-mc: Memset MC reserve ram memory before usage

Memory reserved for Management Complex needs to be cleaned before any
usage.

Signed-off-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
[York S: revised commit message]
Reviewed-by: York Sun <york.sun@nxp.com>
5 years agou-boot: fixup the iommu-map property of fsl-mc node
Nipun Gupta [Mon, 20 Aug 2018 10:31:14 +0000 (16:01 +0530)] 
u-boot: fixup the iommu-map property of fsl-mc node

The iommu-map property in the fsl-mc node is updated by
valid stream-ids by u-boot. This patch is to fixup this
property for LS208x and LS1088.

Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
5 years agols1012afrwy: Add ls1012afrwy revC board support.
Pramod Kumar [Tue, 14 Aug 2018 04:19:55 +0000 (09:49 +0530)] 
ls1012afrwy: Add ls1012afrwy revC board support.

LS1012AFRWY supports three board revisions.
Revision A and B board are collectively identified as revA/B,
Revision C board is identifies as revC.

Signed-off-by: Pramod Kumar <pramod.kumar_1@nxp.com>
[York S: revised commit message]
Reviewed-by: York Sun <york.sun@nxp.com>
5 years agoscsi: ceva: add ls1021a soc support.
Peng Ma [Wed, 1 Aug 2018 06:15:43 +0000 (14:15 +0800)] 
scsi: ceva: add ls1021a soc support.

Add ahci compatible support for ls1021a soc.

Signed-off-by: Peng Ma <peng.ma@nxp.com>
Acked-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: York Sun <york.sun@nxp.com>
5 years agoarm: ls1021atwr: enable DM support for sata
Peng Ma [Wed, 1 Aug 2018 06:15:42 +0000 (14:15 +0800)] 
arm: ls1021atwr: enable DM support for sata

Enable related configs to support sata DM feature.

Signed-off-by: Peng Ma <peng.ma@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
5 years agoarmv7: dts: fsl-ls1021a: add sata node support enable sata for ls1021a-qds and ls1021...
Peng Ma [Wed, 1 Aug 2018 06:15:41 +0000 (14:15 +0800)] 
armv7: dts: fsl-ls1021a: add sata node support enable sata for ls1021a-qds and ls1021a-twr

Add sata node to support this feature.

Signed-off-by: Peng Ma <peng.ma@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
5 years agoarmv7: fsl: remove sata support
Peng Ma [Wed, 1 Aug 2018 06:15:40 +0000 (14:15 +0800)] 
armv7: fsl: remove sata support

Remove the old implementation in order to enable DM for sata

Signed-off-by: Peng Ma <peng.ma@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
5 years agoarm64: ls1043aqds: enable DM support for sata
Peng Ma [Wed, 1 Aug 2018 03:35:16 +0000 (11:35 +0800)] 
arm64: ls1043aqds: enable DM support for sata

Enable related configs to support sata DM feature.

Signed-off-by: Peng Ma <peng.ma@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
5 years agoscsi: ceva: add ls1043a soc support
Peng Ma [Wed, 1 Aug 2018 03:35:15 +0000 (11:35 +0800)] 
scsi: ceva: add ls1043a soc support

Add ahci compatible support for ls1043a soc.

Signed-off-by: Peng Ma <peng.ma@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
5 years agoarmv8: dts: fsl-ls1043a: add sata node support
Peng Ma [Wed, 1 Aug 2018 03:35:14 +0000 (11:35 +0800)] 
armv8: dts: fsl-ls1043a: add sata node support

Add sata node to support ls1043a.

Signed-off-by: Peng Ma <peng.ma@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
5 years agoEnable CONFIG_BLK and CONFIG_DM_MMC to Kconfig
Yinbo Zhu [Tue, 25 Sep 2018 06:47:13 +0000 (14:47 +0800)] 
Enable CONFIG_BLK and CONFIG_DM_MMC to Kconfig

This enables the folowing to Kconfig:
CONFIG_BLK
CONFIG_DM_MMC

Signed-off-by: Yinbo Zhu <yinbo.zhu@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
5 years agoarmv7: ls1021a: enable esdhc
Yinbo Zhu [Tue, 25 Sep 2018 06:47:12 +0000 (14:47 +0800)] 
armv7: ls1021a: enable esdhc

This patch is to enable eSDHC for ls1021a.

Signed-off-by: Yinbo Zhu <yinbo.zhu@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
5 years agoarmv8: ls1046a: add eSDHC node
Yinbo Zhu [Tue, 25 Sep 2018 06:47:11 +0000 (14:47 +0800)] 
armv8: ls1046a: add eSDHC node

This patch is to add eSDHC node for ls1046a.

Signed-off-by: Yinbo Zhu <yinbo.zhu@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
5 years agoarmv8: ls1043a: add eSDHC node
Yinbo Zhu [Tue, 25 Sep 2018 06:47:10 +0000 (14:47 +0800)] 
armv8: ls1043a: add eSDHC node

This patch is to add eSDHC node for ls1043a.

Signed-off-by: Yinbo Zhu <yinbo.zhu@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
5 years agoarmv8: ls1088a: add eSDHC node
Yinbo Zhu [Tue, 25 Sep 2018 06:47:09 +0000 (14:47 +0800)] 
armv8: ls1088a: add eSDHC node

This patch is to add eSDHC node for ls1088a.

Signed-off-by: Yinbo Zhu <yinbo.zhu@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
5 years agoarmv8: ls2088a: add eSDHC node
Yinbo Zhu [Tue, 25 Sep 2018 06:47:08 +0000 (14:47 +0800)] 
armv8: ls2088a: add eSDHC node

This patch is to add eSDHC node for ls2088a.

Signed-off-by: Yinbo Zhu <yinbo.zhu@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
5 years agoarmv8/ls1088a/ls2088a: esdhc: Add esdhc clock support
Yinbo Zhu [Tue, 25 Sep 2018 06:47:07 +0000 (14:47 +0800)] 
armv8/ls1088a/ls2088a: esdhc: Add esdhc clock support

This patch adds esdhc clock support for ls1088a and ls2088a.

Signed-off-by: Yinbo Zhu <yinbo.zhu@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
5 years agoppa/fm/qe: use block layer in ppa/fm/qe driver
Yinbo Zhu [Tue, 25 Sep 2018 06:47:06 +0000 (14:47 +0800)] 
ppa/fm/qe: use block layer in ppa/fm/qe driver

At present the MMC subsystem maintains its own list of MMC devices.
This cannot work with driver model when CONFIG_BLK is enabled, use
blk_dread to replace previous mmc read interface, use
mmc_get_blk_desc to get the mmc device property.

Signed-off-by: Yinbo Zhu <yinbo.zhu@nxp.com>
[York S: reformatted commit message]
Reviewed-by: York Sun <york.sun@nxp.com>
5 years agoMerge tag 'xilinx-for-v2018.11' of git://git.denx.de/u-boot-microblaze
Tom Rini [Thu, 27 Sep 2018 12:29:10 +0000 (08:29 -0400)] 
Merge tag 'xilinx-for-v2018.11' of git://git.denx.de/u-boot-microblaze

Xilinx changes for v2018.11

- Handle BOARD_LATE_INIT via Kconfig

SPL:
- Enable GZIP for all partitions types(not only for kernel)

ZynqMP:
- Rearrange pmufw version handling
- Support newer PMUFW with improved fpga load sequence

Zynq:
- Cleanup config file
- Simplify zybo config by enabling option via Kconfig

net:
- Fix gems max-speed property reading
- Enable support for fixed-link phys

5 years agonet: zynq_gem: Add support for fixed-link phy
Michal Simek [Thu, 20 Sep 2018 07:42:27 +0000 (09:42 +0200)] 
net: zynq_gem: Add support for fixed-link phy

Based on dt-specs fixed-link doesn't require phy-handle to be used.
Fix driver to only read phy related setting when phy-handle is found.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
5 years agoMerge tag 'signed-efi-next' of git://github.com/agraf/u-boot
Tom Rini [Wed, 26 Sep 2018 19:14:02 +0000 (15:14 -0400)] 
Merge tag 'signed-efi-next' of git://github.com/agraf/u-boot

Patch queue for efi - 2018-09-26

A lot of goodness in this release. We're *very* close to running the
UEFI Shell and SCT natively. The only missing piece are HII protocols.

  - FAT write support (needed for SCT)
  - improved FAT directory support (needed for SCT)
  - RTC support with QEMU -M virt
  - Sandbox support (run UEFI binaries in Linux - yay)
  - Proper UTF-16 support
  - EFI_UNICODE_COLLATION_PROTOCOL support (for UEFI Shell)
  - EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL support (for UEFI Shell)
  - Fix window size determination
  - Fix Tegra by explicitly unmapping RAM
  - Clean up handle entanglement
  - Lots of generic code cleanup

[trini: Fixup merge conflict in include/configs/qemu-arm.h]
Signed-off-by: Tom Rini <trini@konsulko.com>
5 years agosandbox: Fix set_working_fdt_addr users
Alexander Graf [Wed, 26 Sep 2018 12:07:41 +0000 (14:07 +0200)] 
sandbox: Fix set_working_fdt_addr users

When running sandbox with the new pointer sanitization we just recently
introduced, we're running into a case with FIT images where we end up
interpreting pointers as addresses.

What happened is that most callers of set_working_fdt_addr() simply
convert pointers into addresses without taking into account that they
might be 2 separate address spaces. Fix the callers up to map their
pointers into addresses.

This makes sandbox tests pass for me again.

Signed-off-by: Alexander Graf <agraf@suse.de>
5 years agoarm: zynq: zybo: migrate CONFIG_DISPLAY to defconfig
Luis Araneda [Thu, 13 Sep 2018 04:02:07 +0000 (01:02 -0300)] 
arm: zynq: zybo: migrate CONFIG_DISPLAY to defconfig

Only add CONFIG_DISPLAY to defconfig because CONFIG_I2C_EDID
is automatically selected by CONFIG_DISPLAY

Signed-off-by: Luis Araneda <luaraneda@gmail.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agonet: zynq_gem: Fix reading of max-speed property
Siva Durga Prasad Paladugu [Tue, 4 Sep 2018 13:38:53 +0000 (19:08 +0530)] 
net: zynq_gem: Fix reading of max-speed property

max-speed property is part of phynode and it has to be
read using ofnode_read_u32_default(). This fixes the issue
of incorrect max-speed read from DT.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agospl: fit: Enable GZIP compression also for no kernel partitions
Michal Simek [Tue, 24 Jul 2018 13:05:00 +0000 (15:05 +0200)] 
spl: fit: Enable GZIP compression also for no kernel partitions

There is no reason to limit gzip usage only for OS_BOOT and kernel image
type.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Tested-by: York Sun <york.sun@nxp.com>
5 years agofpga: zynqmp: Modify PL bitstream loading sequence
Siva Durga Prasad Paladugu [Tue, 21 Aug 2018 10:14:50 +0000 (15:44 +0530)] 
fpga: zynqmp: Modify PL bitstream loading sequence

This patch modifies PL bitstream loading sequence as per
latest Xilfpga which supports all variants of bitstream images
generated from vivado and from bootgen. With this new change in
Xilfpga, uboot doesn't need to validate and swap bitstream as it will
be taken care inside Xilfpga. ZynqMP PL driver now checks for supporting
PMUFW version before skipping the validation and swap sequence as there
can be old PMUFW which doesn't supports this feature. In this case, driver
uses old way of PL bitstream loading sequence.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoarm64: zynqmp: Return pmufw version for zynqmp_pmufw_version()
Siva Durga Prasad Paladugu [Tue, 21 Aug 2018 10:14:49 +0000 (15:44 +0530)] 
arm64: zynqmp: Return pmufw version for zynqmp_pmufw_version()

Modify the zynqmp_pmufw_version() routine to return PMUFW version so
that it can be reused wherever required. Get PMUFW version from PMU
only once at bootup and later just return stored value.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoarm64: zynqmp: Move PM version related macros to .h
Siva Durga Prasad Paladugu [Tue, 21 Aug 2018 10:14:48 +0000 (15:44 +0530)] 
arm64: zynqmp: Move PM version related macros to .h

This patch moves the PM version related macros to .h file so that
they can be reused in other files.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoarm: zynq: Remove useless comments from config file
Michal Simek [Wed, 15 Aug 2018 10:48:52 +0000 (12:48 +0200)] 
arm: zynq: Remove useless comments from config file

Moving options to Kconfig some comments are useless now.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoarm64: zynqmp: Handle CONFIG_BOARD_LATE_INIT via Kconfig
Michal Simek [Mon, 20 Aug 2018 06:24:14 +0000 (08:24 +0200)] 
arm64: zynqmp: Handle CONFIG_BOARD_LATE_INIT via Kconfig

Disable BOARD_LATE_INIT via Kconfig.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoconfig.mk: Remove duplicated -fno-strict-aliasing
Bin Meng [Mon, 17 Sep 2018 05:35:29 +0000 (22:35 -0700)] 
config.mk: Remove duplicated -fno-strict-aliasing

Now that we already disable the "strict-aliasing" globally, remove
the duplicates in the nds32/riscv/x86 arch-specific Makefiles.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Rick Chen <rick@andestech.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agoMakefile: Use -fno-strict-aliasing globally
Bin Meng [Mon, 17 Sep 2018 05:35:28 +0000 (22:35 -0700)] 
Makefile: Use -fno-strict-aliasing globally

The -fstrict-aliasing option is implicitly enabled at levels -O2,
-O3, -Os by GCC. This option allows the compiler to assume the
strictest aliasing rules applicable to the language being compiled.
For example, the practice of reading from a different union member
than the one most recently written to (called "type-punning") is
common. In this case, "type-punning" only works if the memory is
accessed through the union type, but might not work by taking the
address, casting the resulting pointer and dereferencing the result,
which is an undefined behavior per the "strict aliasing rules".

GCC's -Wstrict-aliasing (included in -Wall) option does not catch
all cases, but does attempt to catch the more common pitfalls. So
there are cases that GCC does not report but the codes are violating
the "strict aliasing rules".

Given lots of codes that may be written to rely on "type-punning",
and Linux kernel disables it by -fno-strict-aliasing globally, since
U-Boot currently does this on nds32/riscv/x86 builds only, extend
this for all architecture builds.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agoserial: omap: Add support for AM654 uart controller
Lokesh Vutla [Fri, 14 Sep 2018 14:13:35 +0000 (19:43 +0530)] 
serial: omap: Add support for AM654 uart controller

AM654 uses a UART controller that is compatible (partially) with
existing OMAP UART, Introduce a compatible for adding support
for this controller.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
5 years agoconfigs: Drop CONFIG_SYS_SCSI_MAXDEVICE
Tuomas Tynkkynen [Wed, 12 Sep 2018 22:28:57 +0000 (01:28 +0300)] 
configs: Drop CONFIG_SYS_SCSI_MAXDEVICE

This option has never been used for anything. Drop it.

Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agoata: Drop CONFIG_SYS_SCSI_MAX_* from boards using DM_SCSI
Tuomas Tynkkynen [Wed, 12 Sep 2018 22:28:56 +0000 (01:28 +0300)] 
ata: Drop CONFIG_SYS_SCSI_MAX_* from boards using DM_SCSI

These options are not used or necessary when device model is being used
for SCSI. Just drop them.

Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agoata: ahci: Don't cap AHCI port count under CONFIG_DM_SCSI
Tuomas Tynkkynen [Wed, 12 Sep 2018 22:28:55 +0000 (01:28 +0300)] 
ata: ahci: Don't cap AHCI port count under CONFIG_DM_SCSI

When using device model this sort of hardcoded limits aren't used or
necessary.

Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agoata: ahci: Loop over the actual number of ports, not the maximum
Tuomas Tynkkynen [Wed, 12 Sep 2018 22:28:54 +0000 (01:28 +0300)] 
ata: ahci: Loop over the actual number of ports, not the maximum

The loop in ahci_start_ports() is looping over the maximum number of
SCSI devices in the system, which can be larger than the amount of ports
a particular AHCI controller has. The extra looping isn't directly
harmful because the link_port_map bitmap won't have the bit set for a
nonexistent port, but it is wasteful. Replace the loop limit with the
port count of the AHCI controller instead.

Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
Reviewed-by: Simon Glass <sjg@chromium.org>