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
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>
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
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>
Dai Okamura [Wed, 6 Dec 2017 05:16:32 +0000 (14:16 +0900)]
ARM: uniphier: fix SSCPLL init code for LD11 SoC
Commit
682e09ff9f35 ("ARM: uniphier: add PLL init code for LD20 SoC")
missed to write the computed value to the SSCPLLCTRL2 register.
Fixes:
682e09ff9f35 ("ARM: uniphier: add PLL init code for LD20 SoC")
Signed-off-by: Dai Okamura <okamura.dai@socionext.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Masahiro Yamada [Wed, 6 Dec 2017 04:51:50 +0000 (13:51 +0900)]
mtd: nand: denali: make NAND_DENALI unconfigurable option
denali.c has no driver entry in itself. It makes sense only when
compiled together with denali_dt.c
Let NAND_DENALI_DT select NAND_DENALI, and hide NAND_DENALI from
the Kconfig menu.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Masahiro Yamada [Wed, 6 Dec 2017 04:16:45 +0000 (13:16 +0900)]
ARM: uniphier: compile pll-base-ld20.c for PXs3
Fix the link error for the combination of
CONFIG_ARCH_UNIPHIER_LD11=n
CONFIG_ARCH_UNIPHIER_LD20=n
CONFIG_ARCH_UNIPHIER_PXS3=y
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Eugeniy Paltsev [Sun, 10 Dec 2017 18:20:08 +0000 (21:20 +0300)]
ARC: clk: introduce HSDK CGU clock driver
Synopsys HSDK clock controller generates and supplies clocks to various
controllers and peripherals within the SoC.
Each clock has assigned identifier and client device tree nodes can use
this identifier to specify the clock which they consume. All available
clocks are defined as preprocessor macros in the
dt-bindings/clock/snps,hsdk-cgu.h header and can be used in device
tree sources.
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Eugeniy Paltsev [Thu, 30 Nov 2017 14:41:32 +0000 (17:41 +0300)]
ARC: cache: explicitly initialize "*_exists" variables
dcache_exists, icache_exists, slc_exists and ioc_exists global
variables in "arch/arc/lib/cache.c" remain uninitialized if
SoC doesn't have corresponding HW.
This happens because we use the next constructions for their
definition and initialization:
-------------------------->>---------------------
int ioc_exists __section(".data");
if (/* condition */)
ioc_exists = 1;
-------------------------->>---------------------
That's quite a non-trivial issue as one may think of it.
The point is we intentionally put those variables in ".data" section
so they might survive relocation (remember we initilaize them very early
before relocation and continue to use after reloaction). While being
non-initialized and not explicitly put in .data section they would end-up
in ".bss" section which by definition is filled with zeroes.
But since we place those variables in .data section we need to care
about their proper initialization ourselves.
Also while at it we change their type to "bool" as more appropriate.
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Eugeniy Paltsev [Tue, 28 Nov 2017 13:51:07 +0000 (16:51 +0300)]
ARC: add defines of some cache and xCCM AUX registers
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Eugeniy Paltsev [Tue, 28 Nov 2017 13:48:40 +0000 (16:48 +0300)]
ARC: add macro to get CPU id
ARCNUM [15:8] field in ARC_AUX_IDENTITY register allows us to
uniquely identify each core in a multi-core system.
I.e. with help of this macro each core may get its index in SMP system.
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Eugeniy Paltsev [Sat, 21 Oct 2017 12:35:12 +0000 (15:35 +0300)]
ARC: HSDK: Fixup DW SDIO CIU frequency to 50000000Hz
DW SDIO controller has external CIU clock divider controlled via
register in the SDIO IP. Due to its unexpected default value
(we expected it to divide by 1 but in reality it divides by 8)
SDIO IP uses wrong CIU clock (it should be 100000000Hz but actual
is 12500000Hz) and works unstable (see STAR
9001204800).
So increase SDIO CIU frequency from actual 12500000Hz to 50000000Hz
by switching from the default divisor value (div-by-8) to the
minimum possible value of the divisor (div-by-2) in HSDK platform
code.
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Eugeniy Paltsev [Mon, 16 Oct 2017 12:15:33 +0000 (15:15 +0300)]
ARC: add asm/gpio.h to fix compilation error with CONFIG_CMD_GPIO
With CONFIG_CMD_GPIO compilation reports error:
-------------------------->8---------------------
common/cmd_gpio.c:13:22: fatal error: asm/gpio.h: No such file or directory
#include <asm/gpio.h>
^
-------------------------->8---------------------
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Masahiro Yamada [Wed, 29 Nov 2017 10:13:46 +0000 (19:13 +0900)]
ARM: socfpga: remove unneeded CONFIG_SYS_NAND_USE_FLASH_BBT
Neither denali.c nor denali_spl.c references this option.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Masahiro Yamada [Wed, 29 Nov 2017 10:13:45 +0000 (19:13 +0900)]
ARM: socfpga: remove unused CONFIG_NAND_DENALI_ECC_SIZE
This option is no longer used.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Chris Brandt [Wed, 29 Nov 2017 19:49:21 +0000 (14:49 -0500)]
usb: r8a66597: convert wait loop to readw_poll_timeout
It is better to use an existing wait loop implementation.
Signed-off-by: Chris Brandt <chris.brandt@renesas.com>
Marek Vasut [Sun, 8 Oct 2017 18:41:18 +0000 (20:41 +0200)]
ARM: rmobile: Add R8A77995 D3 Draak board
Add bits to support yet another board, the R8A77995 D3 Draak.
The DT file is from Linux 4.15-rc1 , commit
b35334447513c14a4dd55a67c269a743d4a4824b .
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Marek Vasut [Mon, 9 Oct 2017 19:08:10 +0000 (21:08 +0200)]
ARM: rmobile: Add R8A77970 V3M Eagle board
Add bits to support yet another board, the R8A77970 V3M Eagle.
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Marek Vasut [Sat, 21 Oct 2017 09:35:49 +0000 (11:35 +0200)]
net: ravb: Add R8A77995 D3 compatible
Add new compatible to the Ethernet AVB driver for R8A77995 D3 SoC.
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Joe Hershberger <joe.hershberger@ni.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>