Tom Rini [Mon, 18 Dec 2017 23:39:00 +0000 (18:39 -0500)]
Merge git://git.denx.de/u-boot-fsl-qoriq
Heiko Schocher [Thu, 14 Dec 2017 10:19:22 +0000 (11:19 +0100)]
common: image.c: Fix CACHE: Misaligned operation output
When booting a itb file with a Ramdisk on a imx6 based
board, U-Boot drops the warning:
Loading Kernel Image ... OK
Loading Ramdisk to
4ecf1000, end
4ef8b11f ... \
CACHE: Misaligned operation at range [
4ecf1000,
4ef8b11f]
Fix it!
Signed-off-by: Heiko Schocher <hs@denx.de>
Tested-by: Ayoub Zaki <hs@denx.de>
Sam Protsenko [Tue, 12 Dec 2017 18:07:41 +0000 (20:07 +0200)]
am335x_evm: Fix DFU for eMMC
Use dfu_alt_info_emmc variable from include/environment/ti/dfu.h file.
It was probably overlooked when extracting DFU variables to mentioned
file.
This patch fixes DFU on BeagleBone Black, so that we can use commands
like ones below to upgrade various images on eMMC:
=> setenv dfu_alt_info $dfu_alt_info_emmc
=> dfu 0 mmc 1
$ dfu-util -D MLO -a MLO.raw
$ dfu-util -D u-boot.img -a u-boot.img.raw
Without this patch, the user is forced to assign the value to
dfu_alt_info_emmc manually, which contradicts with instructions [1].
[1] http://processors.wiki.ti.com/index.php/Linux_Core_U-Boot_User%27s_Guide
Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Jerome Brunet [Tue, 12 Dec 2017 15:03:55 +0000 (16:03 +0100)]
net: phy: meson-gxl: detect LPA corruption
This patch is ported from the Linux patch posted at [1] and applied to
net tree as commit
f1e2400a80ff.
The purpose of this change is to fix the incorrect detection of the link
partner (LP) advertised capabilities which sometimes happens with this PHY
(roughly 1 time in a dozen)
This issue may cause the link to be negotiated at 10Mbps/Full or
10Mbps/Half when 100MBps/Full is actually possible. In some case, the link
is even completely broken and no communication is possible.
To detect the corruption, we must look for a magic undocumented bit in the
WOL bank (hint given by the SoC vendor kernel) but this is not enough to
cover all cases. We also have to look at the LPA ack. If the LP supports
Aneg but did not ack our base code when aneg is completed, we assume
something went wrong.
The detection of a corrupted LPA triggers a restart of the aneg process.
This solves the problem but may take up to 6 retries to complete.
[1] https://lkml.kernel.org/r/
20171208110811.30789-1-jbrunet@baylibre.com
Fixes:
8995a96d1d67 ("net: phy: Add Amlogic Meson GXL Internal PHY support")
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Hans Verkuil [Tue, 12 Dec 2017 13:23:39 +0000 (14:23 +0100)]
ARM: arch-meson: fix writel arguments order
Using writel causes a "Synchronous Abort". Invert the arguments.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Tom Rini [Mon, 18 Dec 2017 17:23:27 +0000 (12:23 -0500)]
Merge tag 'xilinx-for-v2018.01-rc2-v2' of git://denx.de/git/u-boot-microblaze
Xilinx changes for v2018.01-rc2-v2
fpga:
- Enable loading bitstream via fit image for !xilinx platforms
zynq:
- Fix SPL SD boot mode
zynqmp:
- Not not reset in panic
- Do not use simple allocator because of fat changes
- Various dt chagnes
- modeboot variable setup
- Fix fpga loading on automotive devices
- Fix coverity issues
test:
- Fix env test for !hush case - Stephen's patch
York Sun [Mon, 11 Dec 2017 16:39:05 +0000 (08:39 -0800)]
armv8: ls1046aqds: Adjust IFC timing for NOR flash
Increase setup, assertion and hold time related to chip-select signal.
Additional delay is needed for the signal to propogate through FPGA.
This adjustment slightly increase the read and write cycle but has no
impact on burst read or write.
Signed-off-by: York Sun <york.sun@nxp.com>
York Sun [Thu, 7 Dec 2017 22:37:40 +0000 (14:37 -0800)]
armv8: ls2085a: Update README file for NAND boot
Update README file to note LS2088A and LS1088A don't support booting
from NAND flash.
Signed-off-by: York Sun <york.sun@nxp.com>
York Sun [Mon, 18 Dec 2017 16:24:55 +0000 (08:24 -0800)]
armv8: ls2080a: Increase load image len for NAND boot
Again the image size increases and the length needs to be adjusted.
Signed-off-by: York Sun <york.sun@nxp.com>
Stephen Warren [Fri, 10 Nov 2017 10:59:15 +0000 (11:59 +0100)]
test/py: Setup variables based on HUSH selection
After adding our small zynq uboot which has hush parser off same
variable tests start to failed. Use quotes only when hush is enabled.
Reported-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Siva Durga Prasad Paladugu [Thu, 7 Dec 2017 09:35:30 +0000 (15:05 +0530)]
arm64: zynqmp: Access timestamp_ref_ctrl register only if running in el3
Access the timestamp ref ctrl register only if runinng
at el3 level otherwise just return. This change fixes
the issue when CRL APB is marked as secure and accessing
when not in el3 causes exception.
Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Tue, 5 Dec 2017 14:42:25 +0000 (15:42 +0100)]
tools: zynqmpimage: Check return values from file functions
Check all return values from file functions.
In case of negative return exit immediately.
Also change fsize return value which can't be negative.
Reported-by: Coverity (CID: 23276, 23304, 169357)
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Siva Durga Prasad Paladugu [Tue, 31 Jan 2017 05:14:06 +0000 (10:44 +0530)]
arm64: zynqmp: Dont use 4K sector erase by default for spi-flashes
Dont use 4K sector erase by default, Disabling this
would use 64K sector erase and decreases erase time.
Also disabled by the fact that UBIFS and JFFS2 won't work
with 4K sector erase.
Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Fri, 8 Dec 2017 14:18:05 +0000 (15:18 +0100)]
arm64: zynqmp: Enable spi flashes
Enabling all spi flashes because some of these boards can have different
flashes compared to public version.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Tom Rini [Sun, 17 Dec 2017 20:37:29 +0000 (15:37 -0500)]
Merge tag 'signed-efi-v2018.01' of git://github.com/agraf/u-boot
Patch queue for efi - 2017-12-17
A few fixes for 2018.01:
- Compile fix with helloworld example
- DP match fix (fixes FreeBSD loader and grub on block storage)
- More DP fixes for SD, block
- Fix use-after-free
Heinrich Schuchardt [Mon, 11 Dec 2017 11:56:42 +0000 (12:56 +0100)]
efi_loader: comments for dp_part_fill()
Add a description for dp_part_fill().
Reword a comment in the function.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
Heinrich Schuchardt [Mon, 11 Dec 2017 11:56:41 +0000 (12:56 +0100)]
efi_loader: correct DeviceNodeToText for media types
When converting device nodes and paths to text we should
stick to the UEFI spec.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
Heinrich Schuchardt [Mon, 11 Dec 2017 11:56:40 +0000 (12:56 +0100)]
efi_loader: correctly setup device paths for block devices
According to the UEFI spec the numbering of partitions has to
start with 1.
Partion number 0 is reserved for the optional device path for
the complete block device.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
Heinrich Schuchardt [Mon, 11 Dec 2017 11:56:39 +0000 (12:56 +0100)]
efi_loader: correctly determine if an MMC device is an SD-card
The SD cards and eMMC devices have different device nodes.
The current coding interpretes all MMC devices as eMMC.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
Heinrich Schuchardt [Mon, 4 Dec 2017 17:03:03 +0000 (18:03 +0100)]
efi_loader: error handling in efi_load_image()
If a failure occurs when trying to load an image, it is insufficient
to free() the EFI object. We must remove it from the object list,
too. Otherwise a use after free will occur the next time we
iterate over the object list.
Furthermore errors in setting up the image should be handled.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
Heinrich Schuchardt [Mon, 4 Dec 2017 17:03:02 +0000 (18:03 +0100)]
efi_loader: new function efi_delete_handle()
Provide a function to remove a handle from the object list
after removing all protocols.
To avoid forward declarations other functions have to move up
in the coding.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
Heinrich Schuchardt [Mon, 4 Dec 2017 17:03:01 +0000 (18:03 +0100)]
efi_loader: return status from efi_setup_loaded_image()
efi_setup_loaded_image() should return an error code indicating if
an error has occurred.
An error occurs if a protocol cannot be installed.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
Alexander Graf [Mon, 11 Dec 2017 13:29:46 +0000 (14:29 +0100)]
efi_loader: Ensure efi_dp_find_obj() finds exact matches
When calling efi_dp_find_obj(), we usually want to find the *exact* match
of an object for a given device path. However, I ran into a nasty corner case
where I had the following objects with paths available:
Handle 0x9feffa70
/HardwareVendor(
e61d73b9-a384-4acc-aeab-
82e828f3628b)[0: ]/USB(6,0)/EndEntire
Handle 0x9feffb58
/HardwareVendor(
e61d73b9-a384-4acc-aeab-
82e828f3628b)[0: ]/USB(6,0)/HD(1,800,32000,
2de808cb00000000,1,1)/EndEntire
and was searching for
/HardwareVendor(
e61d73b9-a384-4acc-aeab-
82e828f3628b)[0: ]/USB(6,0)/HD(1,800,32000,
2de808cb00000000,1,1)/EndEntire
But because our device path search looked for any substring match, it would
return
/HardwareVendor(
e61d73b9-a384-4acc-aeab-
82e828f3628b)[0: ]/USB(6,0)/EndEntire
because that path is a full substring of the path we were searching for.
So this patch adapts the device path search logic to always look for exact
matches first. The way we distinguish between those cases is by looking at
whether our caller actually deals with remainders.
As a side effect, the code as is from all I can tell now never does a
substring match anymore, because it always gets called with rem=NULL, so
we always only do exact matches now.
Reported-by: Jonathan Gray <jsg@jsg.id.au>
Signed-off-by: Alexander Graf <agraf@suse.de>
Alexander Graf [Mon, 11 Dec 2017 08:45:30 +0000 (09:45 +0100)]
efi_loader: helloworld.c: Reduce file size
The efi linker script includes sections needed for the dynamic linker.
However, in our EFI application environment we don't have a dynamic linker.
So let's remove them. That way we save on 4k padding and reduce the file
size of the hello world efi binary from ~4k to ~1k.
Signed-off-by: Alexander Graf <agraf@suse.de>
Alexander Graf [Mon, 11 Dec 2017 08:40:47 +0000 (09:40 +0100)]
efi_loader: helloworld.c: Explicitly use .rodata for loaded_image_guid
Commit
bbf75dd9345d0b ("efi_loader: output load options in helloworld")
introduced a const variable in efi_main() called loaded_image_guid which
got populated from a constant struct.
While you would usually expect a compiler to realize that this variable
should really just be a global pointer to .rodata, gcc disagrees and instead
puts it on the stack. Unfortunately in some implementations of gcc it does
so my calling memcpy() which we do not implement in our hello world
environment.
So let's explicitly move it to a global variable which in turn puts it in
.rodata reliably and gets rid of the memcpy().
Fixes:
bbf75dd9345d0b ("efi_loader: output load options in helloworld")
Reported-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Tested-by: Florian Fainelli <f.fainelli@gmail.com>
Yangbo Lu [Fri, 8 Dec 2017 07:35:37 +0000 (15:35 +0800)]
armv8: ls1012ardb: support hwconfig for eSDHC1 enabling
I2C reading for DIP switch setting is not reliable for LS1012ARDB
RevD and later versions. This patch is to add hwconfig support to
enable/disable eSDHC1 manually for these boards. Also drop 'status'
fix-up for eSDHC0 and leave it as it is. It shouldn't always be
fixed up with 'okay'.
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
Yangbo Lu [Fri, 8 Dec 2017 07:35:36 +0000 (15:35 +0800)]
armv8: ls1012ardb: add more board version information
Add LS1012ARDB RevC/RevC1/RevC2/RevD/RevE information and
detect it when u-boot starts up.
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
Yangbo Lu [Fri, 8 Dec 2017 07:35:35 +0000 (15:35 +0800)]
armv8: ls1012ardb: clean up definitions for I2C IO expanders
This patch is to clean up definitions for I2C IO expanders.
The value 0x10 of __SW_BOOT_EMU is wrong. It should be 0x2.
Fixed it in this patch.
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
Yogesh Gaur [Thu, 7 Dec 2017 05:40:14 +0000 (11:10 +0530)]
board/ls2080a, ls1088a: Add check for mc-dpl applied in fdt
Function fdt_fixup_board_enet() performs fdt fixup. Only return
fdt_status_okay() when both MC is applied and DPL is deployed, else
return fdt_status_fail().
This check is added to LS1088A/LS2080A/LS2088A boards.
Signed-off-by: Yogesh Gaur <yogeshnarayan.gaur@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
Tom Rini [Thu, 14 Dec 2017 20:46:07 +0000 (15:46 -0500)]
Merge git://git.denx.de/u-boot-dm
Michal Simek [Fri, 8 Dec 2017 14:03:26 +0000 (15:03 +0100)]
arm64: zynqmp: Enable fpga bitstream loading
Enable fpga loadb and loadbp for zynqmp platforms.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Fri, 8 Dec 2017 14:01:19 +0000 (15:01 +0100)]
arm64: zynqmp: Enable SPL ram support
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Fri, 8 Dec 2017 13:46:30 +0000 (14:46 +0100)]
arm64: zynqmp: Enable misc devices
Enable misc devices for zynqmp targets.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Wed, 6 Dec 2017 07:33:50 +0000 (08:33 +0100)]
arm64: zynqmp: Add support for zynqmp automotive silicons
Remove silicon prefix. Automotive grade devices are using xazu instead
of xczu prefix.
The patch "fpga: xilinx: Check for substring in device ID validation"
(sha1:
f72132673a01216e760864e442f168977cce2bd2)
enables this functionality for zynq devices that only substrings are
checked.
Unfortunately there is no way how to detect device grade that's why
this change is reasonable.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Mon, 31 Jul 2017 08:37:09 +0000 (10:37 +0200)]
arm64: zynqmp: Add missing zynq_board_read_rom_ethaddr() prototype
Add missing zynq_board_read_rom_ethaddr() prototype reported by sparse.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
Michal Simek [Mon, 27 Feb 2017 07:11:38 +0000 (08:11 +0100)]
arm64: zynqmp: Use only earlycon bootargs instead of full one
This is the same patch as was done earlier.
Please look at Linux patch:
"arm64: zynqmp: Use only earlycon bootargs instead of full one"
(sha1:
f3609c8d4af28b9cc22ca49bf8e529b582ec188c)
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Mon, 30 Oct 2017 08:46:52 +0000 (09:46 +0100)]
arm64: zynqmp: Remove undocumented dma properties
Remove overfetch, ratectrl, include-sg and src-issue dma properties.
Driver is not using them and they are also not documented in the binding
doc.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Kedareswara rao Appana <appanad@xilinx.com>
Javier Martinez Canillas [Thu, 15 Jun 2017 18:54:13 +0000 (20:54 +0200)]
arm64: zynqmp: Add generic compatible string for I2C EEPROM
The at24 driver allows to register I2C EEPROM chips using different vendor
and devices, but the I2C subsystem does not take the vendor into account
when matching using the I2C table since it only has device entries.
But when matching using an OF table, both the vendor and device has to be
taken into account so the driver defines only a set of compatible strings
using the "atmel" vendor as a generic fallback for compatible I2C devices.
So add this generic fallback to the device node compatible string to make
the device to match the driver using the OF device ID table.
Signed-off-by: Javier Martinez Canillas <javier@dowhile0.org>
Acked-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Fri, 1 Dec 2017 14:35:43 +0000 (15:35 +0100)]
arm64: zynqmp: Enable clock command for all boards
clk command provides an option to see actual clock setting.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Fri, 1 Dec 2017 14:50:31 +0000 (15:50 +0100)]
arm64: zynqmp: Enable phys for zcu102
Enable USB3.0 and SATA phy for zcu102 boards.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Fri, 1 Dec 2017 14:18:24 +0000 (15:18 +0100)]
arm64: zynqmp: Setup modeboot variable based on bootmode
Setup bootmode variable based on bootmode selection.
This is helping with setting up boot method.
Also setup sdbootdevice.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Siva Durga Prasad Paladugu [Tue, 21 Feb 2017 12:28:28 +0000 (17:58 +0530)]
arm64: zynqmp: Read boot mode register using zynqmp_mmio_read
Dont read boot mode register directly read it using
zynqmp_mmio_read().
Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Fri, 1 Dec 2017 14:13:36 +0000 (15:13 +0100)]
arm64: zynqmp: Enable SPL_CLK when SPL is enabled
Setup proper dependency in Kconfig for SPL_CLK.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Mon, 16 Jan 2017 11:07:33 +0000 (12:07 +0100)]
arm64: zynqmp: Add support for generic QSPI boot
This patch is enabling support for SPL QSPI boot.
First of all it is necessary to generate atf-spi.ub which is different
format than atf-uboot.ub (this can be made as legacy image too)
ADDR=`arm-xilinx-linux-gnueabi-readelf -a bl31.elf | grep "Entry point
address" | cut -d ':' -f 2 | sed -e 's/^[ \t]*//'`
aarch64-linux-gnu-objcopy -O binary bl31.elf bl31.bin
./tools/mkimage -f auto -A arm64 -T firmware -C none -O u-boot -a $ADDR
-e $ADDR -n "atf1" -E -b arch/arm/dts/zynqmp-zcu102.dtb -d bl31.bin
atf-uboot.ub
./tools/mkimage -A arm64 -T firmware -C none -O u-boot -a $ADDR -e $ADDR
-n "atf-for-qspi" -E -d bl31.bin atf-spi.ub
This patch is using this QSPI layout with offsets:
0 boot.bin
512k atf-ub
640k u-boot.bin
1280k u-boot.img
Which corresponding by writing these images(read from MMC)
mmcinfo
sf probe
load mmc 0
10000000 boot.bin
sf erase 0 +$filesize
sf write
10000000 0 $filesize
load mmc 0
10000000 atf-spi.ub
sf erase 0x80000 +$filesize
sf write
10000000 0x80000 $filesize
load mmc 0
10000000 u-boot.bin
sf erase 0xa0000 +$filesize
sf write
10000000 0xa0000 $filesize
load mmc 0
10000000 u-boot.img
sf erase 0x140000 +$filesize
sf write
10000000 0x140000 $filesize
For testing u-boot running in EL3 you can break atf-spi.ub like this:
sf probe
sf erase 0x80000 +4
Then u-boot.img is executed.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Fri, 1 Dec 2017 13:43:05 +0000 (14:43 +0100)]
arm64: zynqmp: Add reference to pmu firmware node
This reference is needed for pinctrl driver where some signals can be
routed directly to platform management unit (PMU).
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Fri, 1 Dec 2017 13:34:03 +0000 (14:34 +0100)]
arm64: zynqmp: Do not use SPL_SYS_MALLOC_SIMPLE allocator
This was caused by: "fs/fat: Reduce stack usage"
(sha1:
2460098cffacd18729262e3ed36656e6943783ed) which converted
fat code to use malloc. But simple malloc is not freeing space
that's why full malloc implementation is needed.
Malloc space is added to RAM.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Mon, 6 Feb 2017 13:34:01 +0000 (14:34 +0100)]
arm64: zynqmp: Do not perform reset in case of panic
Do not perform reset when panic happens because in the next reset
panic happens again and logs are overflood by the same errors.
This can be enabled by default and reset can be performed via watchdog.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Fri, 1 Dec 2017 12:50:33 +0000 (13:50 +0100)]
arm: zynq: Fix SPL SD boot mode
This patch is fixing two issues:
1. Insufficient stack size for fat fs buffers
2. Insufficient space in malloc area
Tested on zc702 and zc706.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Goldschmidt Simon [Fri, 10 Nov 2017 14:17:41 +0000 (14:17 +0000)]
fpga: allow programming fpga from FIT image for all FPGA drivers
This drops the limit that fpga is only loaded from FIT images for Xilinx.
This is done by moving the 'partial' check from 'common/image.c' to
'drivers/fpga/xilinx.c' (the only driver supporting partial images yet)
and supplies a weak default implementation in 'drivers/fpga/fpga.c'.
Signed-off-by: Simon Goldschmidt <sgoldschmidt@de.pepperl-fuchs.com>
Tested-by: Michal Simek <michal.simek@xilinx.com> (On zcu102)
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Tom Rini [Wed, 13 Dec 2017 22:58:46 +0000 (17:58 -0500)]
Merge branch 'master' of git://git.denx.de/u-boot-socfpga
Tom Rini [Wed, 13 Dec 2017 22:58:36 +0000 (17:58 -0500)]
Merge branch 'master' of git://git.denx.de/u-boot-usb
Tom Rini [Wed, 13 Dec 2017 22:58:27 +0000 (17:58 -0500)]
Merge branch 'rmobile-mx' of git://git.denx.de/u-boot-sh
Tom Rini [Wed, 13 Dec 2017 22:58:18 +0000 (17:58 -0500)]
Merge git://git.denx.de/u-boot-samsung
Wenbin song [Mon, 4 Dec 2017 04:18:29 +0000 (12:18 +0800)]
armv8: layerscape: Discard the needless cpu nodes
Using "cpu_pos_mask()" function to detect the real online cpus,
and discard the needless cpu nodes on kernel dts.
Signed-off-by: Wenbin Song <wenbin.song@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
Wenbin song [Mon, 4 Dec 2017 04:18:28 +0000 (12:18 +0800)]
armv8: ls1043a/ls2080a: check SoC by device ID
Check LS1043A/LS2080a by device ID without using personality ID to
determine revision number. This check applies to all various
personalities of the same SoC family.
Signed-off-by: Wenbin Song <wenbin.song@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
Rajesh Bhagat [Thu, 30 Nov 2017 11:14:45 +0000 (16:44 +0530)]
arm64: ls1012afrdm: Add distro boot support
Include common config_distro_defaults.h and config_distro_bootcmd.h
for u-boot enviroments to support automatical distro boot which
scan boot.scr from external storage devices(e.g. SD and USB)
and execute autoboot script.
Signed-off-by: Bhaskar Upadhaya <Bhaskar.Upadhaya@nxp.com>
Signed-off-by: Rajesh Bhagat <rajesh.bhagat@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
Rajesh Bhagat [Thu, 30 Nov 2017 11:14:38 +0000 (16:44 +0530)]
arm64: ls1012ardb: Add distro boot support
Include common config_distro_defaults.h and config_distro_bootcmd.h
for u-boot enviroments to support automatical distro boot which
scan boot.scr from external storage devices(e.g. SD and USB)
and execute autoboot script.
Signed-off-by: Bhaskar Upadhaya <Bhaskar.Upadhaya@nxp.com>
Signed-off-by: Rajesh Bhagat <rajesh.bhagat@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
Yangbo Lu [Mon, 27 Nov 2017 07:40:17 +0000 (15:40 +0800)]
armv8: ls1088ardb: support force SDHC mode by hwconfig
The BRDCFG5[SPISDHC] register field of Qixis device is used
to control SPI and SDHC signal routing.
10 = Force SDHC Mode
- SPI_CS[0] is routed to CPLD for SDHC_VS use.
- SPI_CS[1] is unused.
- SPI_CS[2:3] are routed to the TDMRiser slot.
11 = Force eMMC Mode
- SPI_CS[0:3] are routed to the eMMC card.
0X = Auto Mode
- If SDHC_CS_B=0 (SDHC card installed): Use SDHC mode
described above.
- Else SDHC_CS_B=1 (no SDHC card installed): Use eMMC
mode described above.
In default the hardware uses auto mode, but sometimes we need
to use force SDHC mode to support SD card hotplug, or SD sleep
waking up in kernel. This patch is to support force SDHC mode
by hwconfig.
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
Felix Brack [Thu, 30 Nov 2017 12:52:37 +0000 (13:52 +0100)]
power: pmic/regulator: Add basic support for TPS65910
Texas Instrument's TPS65910 PMIC contains 3 buck DC-DC converts, one
boost DC-DC converter and 8 LDOs. This patch implements driver model
support for the TPS65910 PMIC and its regulators making the get/set
API for regulator value/enable available.
This patch depends on the patch "am33xx: Add a function to query MPU
voltage in uV" to build correctly. For boards relying on the DT
include file tps65910.dtsi the v3 patch "power: extend prefix match
to regulator-name property" and an appropriate regulator naming is
also required.
Signed-off-by: Felix Brack <fb@ltec.ch>
Reviewed-by: Simon Glass <sjg@chromium.org>
Stefan Roese [Wed, 29 Nov 2017 15:46:42 +0000 (16:46 +0100)]
dm: blk: Use uclass_find_first/next_device() in blk_first/next_device()
This patch changes the calls to uclass_first/next_device() in blk_first/
next_device() to use uclass_find_first/next_device() instead. These functions
don't prepare the devices, which is correct in this case.
With this patch applied, the "usb storage" command now works again as
expected:
=> usb storage
Device 0: Vendor: SanDisk Rev: 1.00 Prod: Ultra
Type: Removable Hard Disk
Capacity: 58656.0 MB = 57.2 GB (
120127488 x 512)
Without this patch, it used to generate this buggy output:
=> usb storage
Card did not respond to voltage select!
mmc_init: -95, time 26
No storage devices, perhaps not 'usb start'ed..?
Signed-off-by: Stefan Roese <sr@denx.de>
Suggested-by: Simon Glass <sjg@chromium.org>
Cc: Simon Glass <sjg@chromium.org>
Cc: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Felix Brack [Mon, 27 Nov 2017 08:14:16 +0000 (09:14 +0100)]
power: extend prefix match to regulator-name property
This patch extends pmic_bind_children prefix matching. In addition to
the node name the property regulator-name is used while trying to match
prefixes. This allows assigning different drivers to regulator nodes
named regulator@1 and regulator@10 for example.
I have discarded the idea of using other properties then regulator-name
as I do not see any benefit in using property compatible or even
regulator-compatible. Of course I am open to change this if there are
good reasons to do so.
Signed-off-by: Felix Brack <fb@ltec.ch>
Reviewed-by: Simon Glass <sjg@chromium.org>
Philipp Tomsich [Fri, 24 Nov 2017 17:37:58 +0000 (18:37 +0100)]
dm: reset: have the reset-command perform a COLD reset
The DM version of do_reset has been issuing a warm-reset, which (on
some platforms keeps GPIOs and other parts of the platform active).
This may cause unintended behaviour, as calling do_reset usually
indicates a desire to reset the board/platform and not just the CPU.
This changes do_reset to always request a COLD reset.
Note that programmatic uses can still invoke a WARM reset through
reset_cpu() or using sysreset_walk().
Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Simon Glass [Tue, 14 Nov 2017 01:55:06 +0000 (18:55 -0700)]
binman: tegra: Convert to use binman
Update tegra to use binman for image creation. This still includes the
current Makefile logic, but a later patch will remove this. Three output
files are created, all of which combine
SPL and U-Boot:
u-boot-tegra.bin - standard image
u-boot-dtb-tegra.bin - same as u-boot-tegra.bin
u-boot-nodtb-target.bin - includes U-Boot without the appended device tree
The latter is useful for build systems where the device is appended later,
perhaps after being modified.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Tue, 14 Nov 2017 01:55:05 +0000 (18:55 -0700)]
binman: Add documentation for the symbol feature
Add this feature to the README.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Simon Glass [Tue, 14 Nov 2017 01:55:04 +0000 (18:55 -0700)]
binman: Add binman support to spl_ram.c
SPL supports reading U-Boot from a RAM location. At present this is
hard-coded to the U-Boot text base address. Use binman to allow this to
come from the image file, if binman is used.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Tue, 14 Nov 2017 01:55:03 +0000 (18:55 -0700)]
binman: Add binman symbol support to SPL
Allow SPL to access binman symbols and use this to get the address of
U-Boot. This falls back to CONFIG_SYS_TEXT_BASE if the binman symbol
is not available.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Tue, 14 Nov 2017 01:55:02 +0000 (18:55 -0700)]
binman: arm: Include the binman symbol table
This area of the image contains symbols whose values are filled in by
binman. If this feature is not used, the table is empty.
Add this to the ARM SPL link script.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Tue, 14 Nov 2017 01:55:01 +0000 (18:55 -0700)]
binman: Support accessing binman tables at run time
Binman construct images consisting of multiple binary files. These files
sometimes need to know (at run timme) where their peers are located. For
example, SPL may want to know where U-Boot is located in the image, so
that it can jump to U-Boot correctly on boot.
In general the positions where the binaries end up after binman has
finished packing them cannot be known at compile time. One reason for
this is that binman does not know the size of the binaries until
everything is compiled, linked and converted to binaries with objcopy.
To make this work, we add a feature to binman which checks each binary
for symbol names starting with '_binman'. These are then decoded to figure
out which entry and property they refer to. Then binman writes the value
of this symbol into the appropriate binary. With this, the symbol will
have the correct value at run time.
Macros are used to make this easier to use. As an example, this declares
a symbol that will access the 'u-boot-spl' entry to find the 'pos' value
(i.e. the position of SPL in the image):
binman_sym_declare(unsigned long, u_boot_spl, pos);
This converts to a symbol called '_binman_u_boot_spl_prop_pos' in any
binary that includes it. Binman then updates the value in that binary,
ensuring that it can be accessed at runtime with:
ulong u_boot_pos = binman_sym(ulong, u_boot_spl, pos);
This assigns the variable u_boot_pos to the position of SPL in the image.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Tue, 14 Nov 2017 01:55:00 +0000 (18:55 -0700)]
binman: Support enabling debug in tests
The elf module can provide some debugging information to assist with
figuring out what is going wrong. This is also useful in tests. Update the
-D option so that it is passed through to tests as well.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Tue, 14 Nov 2017 01:54:59 +0000 (18:54 -0700)]
binman: Adjust size of test SPL binary
This is only 3 bytes long which is not enough to hold two symbol values,
needed to test the binman symbols feature. Increase it to 15 bytes.
Using very small regions is useful since we can easily compare them in
tests and errors are fairly easy to diagnose.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Tue, 14 Nov 2017 01:54:58 +0000 (18:54 -0700)]
binman: Add tests binaries with binman symbols
For testing we need to build some ELF files containing binman symbols. Add
these to the Makefile and check in the binaries:
u_boot_binman_syms - normal, valid ELF file
u_boot_binman_syms_bad - missing the __image_copy_start symbol
u_boot_binman_syms_size - has a binman symbol with an invalid size
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Tue, 14 Nov 2017 01:54:57 +0000 (18:54 -0700)]
binman: Drop a stale comment about the 'board' feature
This feature is now supported. Drop the incorrect comment.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Tue, 14 Nov 2017 01:54:56 +0000 (18:54 -0700)]
binman: Add support for including spl/u-boot-spl-nodtb.bin
This file contains SPL image without a device tree. Add support for
including this in images.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Tue, 14 Nov 2017 01:54:55 +0000 (18:54 -0700)]
binman: Add support for including spl/u-boot-spl.dtb
This file contains the SPL device tree. Add support for including this by
itself in images.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Tue, 14 Nov 2017 01:54:54 +0000 (18:54 -0700)]
binman: Add a function to read ELF symbols
In some cases we need to read symbols from U-Boot. At present we have a
a few cases which does this via 'nm' and 'grep'.
It is better to use objdump since that tells us the size of the symbols
and also whether it is weak or not.
Add a new module which reads ELF information from files. Update existing
uses of 'nm' to use this module.
Signed-off-by: Simon Glass <sjg@chromium.org>
Baruch Siach [Sun, 10 Dec 2017 15:34:35 +0000 (17:34 +0200)]
README: update the kernel coding style reference
The old CodingStyle document has been converted to ReST and moved
elsewhere. Link to the web version of this document instead.
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Tuomas Tynkkynen [Sat, 9 Dec 2017 01:51:48 +0000 (03:51 +0200)]
ARM: pxa: Remove unused ifdefs
These ifdefs are protecting #include statements for files that have
never existed. AFAICT this hardware.h has been copied from the kernel
and the ifdefs have never served a role in U-Boot, so delete them.
Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
Michal Simek [Fri, 8 Dec 2017 14:47:18 +0000 (15:47 +0100)]
test: py: Add an option to skip sleep test
Some QEMUs have a problem with time setup that's why
sleep test is failing. Introduce env__sleep_accurate
boardenv variable to have an option to skip sleep test.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Patrick Delaunay [Wed, 6 Dec 2017 17:08:20 +0000 (18:08 +0100)]
test/py: gpt: update size of gpt partition
- avoid disturbing 0MiB partition size (in fact < 1MiB)
- test overlap limit between part1 and part2
- test gpt write with data with modifier 'M' for MiB
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Peng Fan [Tue, 5 Dec 2017 05:20:59 +0000 (13:20 +0800)]
SPL: Add FIT data-position property support
For external data, FIT has a optional property "data-position" which
can set the external data to a fixed offset to FIT beginning.
Add the support for this property in SPL FIT.
Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tomas Melin <tomas.melin@vaisala.com>
Cc: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
Cc: "Andrew F. Davis" <afd@ti.com>
Cc: Igor Grinberg <grinberg@compulab.co.il>
Cc: "tomas.melin@vaisala.com" <tomas.melin@vaisala.com>
Cc: Kever Yang <kever.yang@rock-chips.com>
Cc: Andre Przywara <andre.przywara@arm.com>
Cc: York Sun <york.sun@nxp.com>
Cc: Lokesh Vutla <lokeshvutla@ti.com>
Cc: "Cooper Jr., Franklin" <fcooper@ti.com>
Cc: George McCollister <george.mccollister@gmail.com>
Cc: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Cc: Rick Altherr <raltherr@google.com>
Cc: Tom Rini <trini@konsulko.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: York Sun <york.sun@nxp.com>
Adam Ford [Mon, 4 Dec 2017 23:54:50 +0000 (17:54 -0600)]
ARM: omap3_logic: Enable NAND unlocking during Falcon mode
Falcon mode was already working with SD card. This enables the
unlocking of NAND to allow the NAND read & write. This also
expands the README file based on the am335x describing how to
setup Falcon mode.
Signed-off-by: Adam Ford <aford173@gmail.com>
Adam Ford [Sun, 3 Dec 2017 12:24:53 +0000 (06:24 -0600)]
ARM: omap3_logic: Unlock NAND automatically in U-Boot
The Micron Flash is locked by default. This will automaticlly
unlock so manually unlocking is unnecessary in U-Boot.
Signed-off-by: Adam Ford <aford173@gmail.com>
Adam Ford [Sat, 2 Dec 2017 17:10:55 +0000 (11:10 -0600)]
omap3_logic: Increase CMD_SPL_WRITE_SIZE
The SPL-OS partition is 0x20000, so let's make
CONFIG_CMD_SPL_WRITE_SIZE same size. This should allow for better
falcon mode operation.
Signed-off-by: Adam Ford <aford173@gmail.com>
Jorge Ramirez-Ortiz [Sat, 2 Dec 2017 16:24:42 +0000 (17:24 +0100)]
drivers: spmi-msm: fix scanning for peripherals
A typo in the probe function causes not all peripherals to be scanned
(in the case of the Dragonboard820c - work in progress - it wont find pmic0).
Tuomas Tynkkynen [Fri, 8 Dec 2017 13:36:21 +0000 (15:36 +0200)]
ata: Migrate CONFIG_MVSATA_IDE to Kconfig
Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
Tuomas Tynkkynen [Fri, 8 Dec 2017 13:36:20 +0000 (15:36 +0200)]
ata: Migrate CONFIG_LIBATA to Kconfig
This symbol enables some library code used by various SATA drivers,
so make this a non-user-visible symbol select'ed by the respective
drivers, and let moveconfig handle the rest.
Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
Tuomas Tynkkynen [Fri, 8 Dec 2017 13:36:19 +0000 (15:36 +0200)]
ata: Migrate CONFIG_SCSI_AHCI to Kconfig
And use 'imply' liberally.
Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
Tuomas Tynkkynen [Fri, 8 Dec 2017 13:36:18 +0000 (15:36 +0200)]
ata: Migrate CONFIG_DWC_AHSATA to Kconfig
Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
Tuomas Tynkkynen [Fri, 8 Dec 2017 13:36:17 +0000 (15:36 +0200)]
ata: Migrate CONFIG_FSL_SATA to Kconfig
Use 'imply' here liberally to avoid the combinatorial explosion of
defconfig changes in the PowerPC boards.
Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
Tuomas Tynkkynen [Fri, 8 Dec 2017 13:36:16 +0000 (15:36 +0200)]
ata: Migrate CONFIG_SATA_MV to Kconfig
Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
Tuomas Tynkkynen [Fri, 8 Dec 2017 13:36:15 +0000 (15:36 +0200)]
ata: Migrate CONFIG_SATA_SIL3114 to Kconfig
Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
Tuomas Tynkkynen [Fri, 8 Dec 2017 13:36:14 +0000 (15:36 +0200)]
ata: Migrate CONFIG_SATA_SIL to Kconfig
Use 'imply' here liberally to avoid the combinatorial explosion of
defconfig changes in the PowerPC boards.
Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
Tuomas Tynkkynen [Fri, 8 Dec 2017 13:36:13 +0000 (15:36 +0200)]
ata: Drop CONFIG_MX51_PATA
The last user of this driver went away in August 2015 in commit:
b6073fd2115 ("arm: Remove mx51_efikamx, mx51_efikasb boards")
Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
Tuomas Tynkkynen [Fri, 8 Dec 2017 13:36:12 +0000 (15:36 +0200)]
ata: Drop CONFIG_SATA_DWC
The last user of this driver went away in June 2017, in commit:
98f705c9ce ("powerpc: remove 4xx support")
Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
Tom Rini [Tue, 12 Dec 2017 15:57:58 +0000 (10:57 -0500)]
Merge git://git.denx.de/u-boot-arc
Alexey Brodkin [Sun, 10 Dec 2017 17:55:44 +0000 (20:55 +0300)]
gpio/hsdk: Depend on DM_GPIO instead of simple DM
This driver really is DM GPIO one and so we need to have a correct
dependency, because DM alone doesn't provide required for CMD_GPIO
call and we're seeing build failures like this:
---------------------->8---------------------
cmd/built-in.o: In function 'do_gpio':
.../cmd/gpio.c:188: undefined reference to 'gpio_request'
...
---------------------->8---------------------
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Eugeniy Paltsev <paltsev@synopsys.com>
Cc: Simon Glass <sjg@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tom Rini [Mon, 11 Dec 2017 22:06:04 +0000 (17:06 -0500)]
Merge git://git.denx.de/u-boot-uniphier
Tom Rini [Mon, 11 Dec 2017 22:05:43 +0000 (17:05 -0500)]
Merge git://git.denx.de/u-boot-arc
Masahiro Yamada [Wed, 6 Dec 2017 05:16:34 +0000 (14:16 +0900)]
ARM: uniphier: use FIELD_PREP for PLL settings
It is tedious to define both mask and bit-shift. <linux/bitfield.h>
provides a convenient way to get access to register fields with a
single shifted mask.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Masahiro Yamada [Wed, 6 Dec 2017 05:16:33 +0000 (14:16 +0900)]
ARM: uniphier: compute SSCPLL values more precisely
Use DIV_ROUND_CLOSEST(). To make the JK value even more precise,
I used a bigger coefficient, then divide it by 512.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>