Michal Simek [Wed, 22 Aug 2018 14:18:34 +0000 (16:18 +0200)]
net: gem: Do not setup any clock for Xilinx SoC Versal
Xilinx SoC Versal is using fixed clock where setting rate is not supported.
That's why workaround the driver till real clock driver is supported.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Wed, 22 Aug 2018 12:55:27 +0000 (14:55 +0200)]
arm64: versal: Add support for new Xilinx Versal ACAPs
Xilinx is introducing Versal, an adaptive compute acceleration platform
(ACAP), built on 7nm FinFET process technology. Versal ACAPs combine
Scalar Processing Engines, Adaptable Hardware Engines, and Intelligent
Engines with leading-edge memory and interfacing technologies to deliver
powerful heterogeneous acceleration for any application. The Versal AI
Core series has five devices, offering 128 to 400 AI Engines. The series
includes dual-core Arm Cortex™-A72 application processors, dual-core Arm
Cortex-R5 real-time processors, 256KB of on-chip memory with ECC, more
than 1,900 DSP engines optimized for high-precision floating point with
low latency.
The patch is adding necessary infrastructure in place without enabling
platform which is done in separate patch.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Thu, 7 Sep 2017 07:20:32 +0000 (09:20 +0200)]
arm64: gic: Do gicv3 secure initialization based on EL level
Do gic cpu initialization based on EL level which u-boot enters.
U-Boot can't access EL3 regs when runs in EL2/EL1, etc.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Wed, 27 Jun 2018 13:53:59 +0000 (15:53 +0200)]
arm64: zynqmp: Enable CDC ethernet gadget for zcu100/Ultra96
Ethernet is not present on this board that's why there are two other
options how to wire the board to ethernet. The first is asix_eth usb
host converter which is already enabled by default. The second option is
to use USB CDC/RNDIS ethernet gadget.
This patch is enabling CDC which is working with Linux.
With new bind/unbind command there is no need to call usb_ether_init()
from platform code and use for example these commands:
bind /amba/usb0@
ff9d0000/dwc3@
fe200000 usb_ether
dhcp
unbind /amba/usb0@
ff9d0000/dwc3@
fe200000
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Thu, 4 Oct 2018 07:41:54 +0000 (09:41 +0200)]
xilinx: Sync defconfigs with current Kconfig
There are some inconsistencies which should be fixed.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Tue, 28 Feb 2017 10:46:37 +0000 (11:46 +0100)]
arm: zynq: Add efuse node for Zynq-7000S devices
Add access to efuse for Zynq-7000S device detection.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Thu, 13 Sep 2018 06:44:02 +0000 (08:44 +0200)]
arm: zynq: Add support for DLC20 board
Xilinx DLC20 has I2C0 with EEPROM(1KB), UART1, GPIO, SD0 (EMMC 4GB),
USB0 device, ENET0, QSPI (16MB) and DDR(two of 256MB each).
Boards have mix of Winbond/ST QSPIs.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Wed, 18 Jul 2018 11:27:24 +0000 (13:27 +0200)]
arm: zynq: Enable FIT fpga loading in SPL for zc706
Enable loading FPGA from FIT image in SPL.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Wed, 18 Jul 2018 12:33:15 +0000 (14:33 +0200)]
spl: fpga: Implement fpga bistream loading with fpga_load
This patch partially reverts:
"spl: fit: Add support for loading FPGA bitstream"
(sha1:
26a642238bdecc53527142dc043b29e21c5cc94c)
There shouldn't be a need to call private spl_load_fpga_image function
because the whole sequence should be already handled by fpga framework.
If there is missing loading bistream by chunks it should be done via
fpga framework instead of having private hooks.
Also spl_load_fpga_image() weak function is not used anywhere and
opening a way for not reviewed hacks out of mainline U-Boot is not the
right way to go.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Tom Rini [Tue, 16 Oct 2018 00:26:22 +0000 (20:26 -0400)]
Prepare v2018.11-rc2
Signed-off-by: Tom Rini <trini@konsulko.com>
Michal Simek [Wed, 3 Oct 2018 13:53:52 +0000 (15:53 +0200)]
Revert "fdt: fdtdec_setup_memory_banksize() use livetree"
This reverts commit
c35a7d375ec8f0a8ee343ae4868be3242172632e.
This commit is breaking SPL on zc706.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Patrice Chotard <patrice.chotard@st.com> [on STM32F746-disco]
Tom Rini [Mon, 15 Oct 2018 11:20:07 +0000 (07:20 -0400)]
Merge tag 'arc-more-updates-for-2018.11-rc2-2' of git://git.denx.de/u-boot-arc
More fixes and improvements for ARC here:
Fixes (this time included for real):
* Take care of global uninitialized variables
They used to be put right after .bss section and were never
zeroed as they should be. Now merged with normal .bss
Improvements:
* Print more verbose CPU info for boards built on real silicon
* Add support for SD-card detection on all ARC boards
* Quite a few fixes for IoT DK
- Support reset by command
- Print of CPU freq on boot
- Link for eFlash etc
Alexey Brodkin [Thu, 11 Oct 2018 20:12:05 +0000 (23:12 +0300)]
ARC: Don't use COMMON section for global not-initialized variables
By default GCC puts global non-initialized variables in COMMON section.
And we used to ignore existence of COMMON section in our linker
scripts though smart LD silently appended it right after .bss.
And the problem here is variables from COMMON section even though
require zeroing in run-time were not zeroed as they were placed
right after __bss_end symbol.
It was a pure luck we never faced serious problem due to this,
but now it is fixed.
Now as for some other architectures we'll just force GCC to put
those global variables in normal .bss section.
This solution is much nicer than adding COMMON section to each and
every linker script.
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Tom Rini [Fri, 12 Oct 2018 15:54:30 +0000 (11:54 -0400)]
Merge git://git.denx.de/u-boot-sunxi
[trini: Convert da850evm_nand defconfig now to to SPL_DM]
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Fri, 12 Oct 2018 15:54:13 +0000 (11:54 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-spi
Alexey Brodkin [Thu, 11 Oct 2018 11:14:13 +0000 (14:14 +0300)]
iot_dk: Link for eFlash
That's what we'll have in production.
But note it won't work for loading via JTAG as
eFlash is not directly writable, one needs to use
prebootloader to flash uboot.bin from SD-card into eFlash.
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Alexey Brodkin [Thu, 11 Oct 2018 09:39:55 +0000 (12:39 +0300)]
axs10x/emdk/hsdk/iot_dk: Implement board_mmc_getcd()
So now we may detect MMC/SD-card existence and
instead of completely misleading message on missing card:
------------------------>8-----------------------
Loading Environment from FAT... Card did not respond to voltage select!
------------------------>8-----------------------
we now get very clear one:
------------------------>8-----------------------
Loading Environment from FAT... MMC: no card present
------------------------>8-----------------------
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Alexey Brodkin [Wed, 10 Oct 2018 13:15:20 +0000 (16:15 +0300)]
iot_dk: Save CPU clock value to gd->cpu_clk
Since gd->cpu_clk is a global item we may once populate it from .dtb
ans use it then in other places like for printing CPU info etc.
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Alexey Brodkin [Wed, 10 Oct 2018 12:53:45 +0000 (15:53 +0300)]
iot_dk: Add support of 136 MHz clock
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Alexey Brodkin [Wed, 10 Oct 2018 11:20:11 +0000 (14:20 +0300)]
iot_dk: Implement board reset
It is done by writing some magic sequence in a special register.
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Alexey Brodkin [Wed, 10 Oct 2018 11:03:47 +0000 (14:03 +0300)]
iot_dk/hsdk: Implement its own print_cpuinfo()
ARC IDENTITY register only encodes major architecture
type and version while for a particular board/silicon we
may know better which template was used and so we may identify
CPU more precise, which exactly we do here.
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Alexey Brodkin [Wed, 10 Oct 2018 10:59:33 +0000 (13:59 +0300)]
ARC: make generic print_cpuinfo() weak
This allows board to override print_cpuinfo() because
they might know better which ARChitect template was used.
This way we may not only derive base architecture type and
version but more meaningful things like "ARC EM7D" instead of
simple "ARC EM", "ARC HS36" instead of "ARC HS".
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Alexey Brodkin [Tue, 9 Oct 2018 10:26:26 +0000 (13:26 +0300)]
iot_dk: Disable networking support
There's no Ethernet controller on the board so no point in having
networking support. This also saves us 5.5 kB of precious memory.
| # bloat-o-meter u-boot.net u-boot.no_net_regex | tail -1
| Total: Before=127892, After=122334, chg -4.35%
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Alexey Brodkin [Tue, 2 Oct 2018 12:04:39 +0000 (15:04 +0300)]
iot_dk: Add localversion string
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Tom Rini [Fri, 12 Oct 2018 00:07:48 +0000 (20:07 -0400)]
ldpaa_eth.c: Fix warning when PHYLIB is not enabled
We need to #ifdef some variables to avoid warning about them being
unused.
Fixes:
1a048cd65645 ("driver: net: fsl-mc: Add support of multiple phys for dpmac")
Signed-off-by: Tom Rini <trini@konsulko.com>
Ashish Kumar [Tue, 25 Sep 2018 08:41:33 +0000 (14:11 +0530)]
sf: Add MICRON manufacturer id
NOR flash name MT35X_QLKA and MT25Q_** used on NXP board has
manufacturer id as 0x2C, which are rather for newer flashes
after the split of Micron from ST.
So macro for this micron manufacturer id.
Signed-off-by: Suresh Gupta <suresh.gupta@nxp.com>
Signed-off-by: Yogesh Gaur <yogeshnarayan.gaur@nxp.com>
Signed-off-by: Ashish Kumar <Ashish.Kumar@nxp.com>
[jagan: updated commit message]
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Tom Rini [Thu, 11 Oct 2018 19:28:32 +0000 (15:28 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-net
Pankaj Bansal [Wed, 10 Oct 2018 08:38:34 +0000 (14:08 +0530)]
driver: net: fsl-mc: Add support of multiple phys for dpmac
Till now we have had cases where we had one phy device per dpmac.
Now, with the upcoming products (LX2160AQDS), we have cases, where there
are sometimes two phy devices for one dpmac. One phy for TX lanes and
one phy for RX lanes. to handle such cases, add the support for multiple
phys in ethernet driver. The ethernet link is up if all the phy devices
connected to one dpmac report link up. also the link capabilities are
limited by the weakest phy device.
i.e. say if there are two phys for one dpmac. one operates at 10G without
autoneg and other operate at 1G with autoneg. Then the ethernet interface
will operate at 1G without autoneg.
Signed-off-by: Pankaj Bansal <pankaj.bansal@nxp.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Pankaj Bansal [Wed, 10 Oct 2018 08:38:33 +0000 (14:08 +0530)]
driver: net: fsl-mc: initialize dpmac irrespective of phy
The dpmac initalization should not depend on phy.
As the phy is not necessary to be present for dpmac to function.
Therefore, remove dpmac initialization dependency from phy.
Signed-off-by: Pankaj Bansal <pankaj.bansal@nxp.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Pankaj Bansal [Wed, 10 Oct 2018 08:38:32 +0000 (14:08 +0530)]
driver: net: fsl-mc: Modify the dpmac link detection method
when there is no phy present for a dpmac, a dummy phy device is created.
when we move to multiple phy method, we need to create as many dummy phy
devices.
Change this method so that we don't need to create dummy phy devices.
We always report linkup if no phy is present.
Signed-off-by: Pankaj Bansal <pankaj.bansal@nxp.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Pankaj Bansal [Wed, 10 Oct 2018 08:38:31 +0000 (14:08 +0530)]
driver: net: fsl-mc: fix error handing in init_phy
if an error occurs during init_phy, we should free the phydev structure
which has been allocated by phy_connect.
Signed-off-by: Pankaj Bansal <pankaj.bansal@nxp.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Pankaj Bansal [Wed, 10 Oct 2018 08:38:30 +0000 (14:08 +0530)]
driver: net: fsl-mc: remove unused strcture elements
The phydev structure is present in both ldpaa_eth_priv and
wriop_dpmac_info. the phydev in wriop_dpmac_info is not being used
As the phydev is created based on phy_addr and bus members of
wriop_dpmac_info, it is appropriate to keep phydev in wriop_dpmac_info.
Also phy_regs is not being used, therefore remove it
Signed-off-by: Pankaj Bansal <pankaj.bansal@nxp.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Tom Rini [Wed, 10 Oct 2018 17:35:17 +0000 (13:35 -0400)]
Merge tag 'dm-9oct18' of git://git.denx.de/u-boot-dm
Test improvements to tidy up output and drop duplicate tests
Sandbox SPL/TPL support
Various dm-related improvements
Tom Rini [Wed, 10 Oct 2018 17:35:14 +0000 (13:35 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-sh
Patrick Delaunay [Fri, 5 Oct 2018 09:33:53 +0000 (11:33 +0200)]
arm: remove duplicated prototypes in u-boot.arm.h
Remove the function prototypes duplicated between u-boot.arm.h
and init.h/common.h
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Patrick Delaunay [Fri, 5 Oct 2018 09:33:52 +0000 (11:33 +0200)]
arm: remove prototype for get_timer_masked
The interruption support had be removed for ARM architecture and
the function get_timer_masked() is no more used except in some
the timer.c files.
This patch clean each timer.c which implement this function and
remove the associated prototype in u-boot-arm.h
For timer.c, I don't verify if the weak version of get_timer
(in lib/time.c) can be used
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Patrick Delaunay [Fri, 5 Oct 2018 09:33:51 +0000 (11:33 +0200)]
arm: remove prototype for udelay_masked
The interruption support had be removed for ARM architecture and
the function udelay_masked() is no more used except in some timer.c
files and have the same content than udelay() or __udelay().
This patch update each timer.c implementing this function and
remove the associated prototype in u-boot-arm.h.
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Patrick Delaunay [Fri, 5 Oct 2018 09:33:50 +0000 (11:33 +0200)]
arm: remove prototype for reset_timer_masked
Remove prototype for function only used in one file
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Patrick Delaunay [Fri, 5 Oct 2018 09:33:49 +0000 (11:33 +0200)]
arm: remove prototype for arch_interrupt_init
Remove prototype for no more existing function
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Marek Vasut [Thu, 4 Oct 2018 19:16:31 +0000 (21:16 +0200)]
bootm: Add board specific OS preboot hook
Add board-specific hook which is executed before the code hands over
control to the OS. This lets the board perform some last-minute clean
ups.
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
Andrew F. Davis [Wed, 3 Oct 2018 15:03:23 +0000 (10:03 -0500)]
arm: K3: am654: Add support for getting boot mode
Read the boot mode register to find the boot mode. Only use eMMC boot0
mode when the mode is eMMC boot (called BOOT_DEVICE_MMC1 currently due
to current conflating of boot mode and boot device), and not iff the
boot device is MMC port 0.
Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
Andrew F. Davis [Wed, 3 Oct 2018 15:03:22 +0000 (10:03 -0500)]
arm: K3: am654: Choose MMC boot device based on boot port
For most devices the boot mode maps directly to the boot
device. For MMC this is not the case as we have two MMC
boot modes and two MMC boot devices (ports). Check the
boot port to determine which MMC device was our boot
device. Make this change for both primary and secondary
boot modes.
Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
Keerthy [Wed, 3 Oct 2018 12:25:14 +0000 (17:55 +0530)]
gpio: da8xx: Push generic defines of gpio.h out of mach-davinci
Push generic defines of gpio.h out of mach-davinci to drivers/gpio
now that non-davinci architectures are beginning to use this IP.
Signed-off-by: Keerthy <j-keerthy@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
[trini: Fix calimain build]
Signed-off-by: Tom Rini <trini@konsulko.com>
Keerthy [Wed, 3 Oct 2018 12:25:13 +0000 (17:55 +0530)]
gpio: da8xx: Add k2g compatible
Add k2g compatible so that k3 SoCs can be supported
Signed-off-by: Keerthy <j-keerthy@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Nicholas Faustini [Wed, 3 Oct 2018 10:58:49 +0000 (12:58 +0200)]
board: ks2: move uinitrd fixup logic inside ft_board_setup_ex
The uinitrd fixup logic should be executed after the FDT /chosen
node has been properly populated by fdt_initrd()
Signed-off-by: Nicholas Faustini <nicholas.faustini@azcomtech.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Nicholas Faustini [Wed, 3 Oct 2018 10:58:48 +0000 (12:58 +0200)]
fdt: add call to ft_board_setup_ex() for ks2 boards
When updating the board FDT, some of the operations
are performed by ft_board_setup_ex() and should be
executed also by the fdt command.
Signed-off-by: Nicholas Faustini <nicholas.faustini@azcomtech.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Loic Devulder [Wed, 3 Oct 2018 10:02:07 +0000 (12:02 +0200)]
ARM: meson: Add Khadas VIM2 board support
This adds platform code for the Khadas VIM2 board based on a
Meson GXM (S912) SoC with the Meson GXM configuration.
This initial submission supports UART, MMC/SDCard and Ethernet.
USB is partially supported.
All the code is from Neil Armstrong! I just rebased the code, do
some cleanup and tested on my board.
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Loic Devulder <ldevulder@suse.de>
Acked-by: Neil Armstrong <narmstrong@baylibre.com>
Loic Devulder [Wed, 3 Oct 2018 10:02:06 +0000 (12:02 +0200)]
ARM: meson: Add Khadas VIM2 board DT
This adds Device Tree for the Khadas VIM2 board.
The meson-gxm-khadas-vim2.dts is synchronized from Linux 4.18.10.
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Loic Devulder <ldevulder@suse.de>
Acked-by: Neil Armstrong <narmstrong@baylibre.com>
Patrice Chotard [Wed, 3 Oct 2018 07:38:38 +0000 (09:38 +0200)]
ARM: dts: stm32mp1: Add usbotg_hs regulator for stm32mp157c-ev1
Add usbotg_hs regulator to allow to use the USB mass-storage
feature on OTG usb port.
Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Pankaj Bansal [Wed, 10 Oct 2018 08:38:29 +0000 (14:08 +0530)]
driver: net: fsl-mc: modify the label name
The goto label name is misspelled it should be DPMAC not DPAMC
Signed-off-by: Pankaj Bansal <pankaj.bansal@nxp.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Duncan Hare [Sun, 24 Jun 2018 22:40:41 +0000 (15:40 -0700)]
net: Consolidate UDP header functions
Make it possible to add TCP versions of the same, while reusing
IP portions. This patch should not change any behavior.
Signed-off-by: Duncan Hare <DH@Synoia.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Joe Hershberger [Wed, 26 Sep 2018 21:49:02 +0000 (16:49 -0500)]
net: Don't overwrite waiting packets with asynchronous replies
Peter originally sent a fix, but it breaks a number of other things.
This addresses the original reported issue in a different way.
That report was:
> U-Boot has 1 common buffer to send Ethernet frames, pointed to by
> net_tx_packet. When sending to an IP address without knowing the MAC
> address, U-Boot makes an ARP request (using the arp_tx_packet buffer)
> to find out the MAC address of the IP addressr. When a matching ARP
> reply is received, U-Boot continues sending the frame stored in the
> net_tx_packet buffer.
>
> However, in the mean time, if U-Boot needs to send out any network
> packets (e.g. replying ping packets or ARP requests for its own IP
> address etc.), it will use the net_tx_packet buffer to prepare the
> new packet. Thus this buffer is no longer the original packet meant
> to be transmitted after the ARP reply. The original packet will be
> lost.
This instead uses the ARP tx buffer to send async replies in the case
where we are actively waiting for an ARP reply.
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reported-by: Tran Tien Dat <peter.trantiendat@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Joe Hershberger [Wed, 26 Sep 2018 21:49:01 +0000 (16:49 -0500)]
test: eth: Add a test for the target being pinged
The target will respond to pings while doing other network handling.
Make sure that the response happens and is correct.
This currently corrupts the ongoing operation of the device if it
happens to be awaiting an ARP reply of its own to whatever serverip it
is attempting to communicate with. In the test, add an expectation that
the user operation (ping, in this case) will fail. A later patch will
address this problem.
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Joe Hershberger [Wed, 26 Sep 2018 21:49:00 +0000 (16:49 -0500)]
test: eth: Add a test for ARP requests
This tests that ARP requests made to this target's IP address are
responded-to by the target when it is doing other networking operations.
This currently corrupts the ongoing operation of the device if it
happens to be awaiting an ARP reply of its own to whatever serverip it
is attempting to communicate with. In the test, add an expectation that
the user operation (ping, in this case) will fail. A later patch will
address this problem.
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Joe Hershberger [Wed, 26 Sep 2018 21:48:59 +0000 (16:48 -0500)]
net: sandbox: Add a priv ptr for tests to use
Tests need to be able to pass their "unit test state" to the handlers
where asserts are evaluated. Add a function that allows the tests to set
this private data on the sandbox eth device.
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Joe Hershberger [Wed, 26 Sep 2018 21:48:58 +0000 (16:48 -0500)]
net: Add an accessor to know if waiting for ARP
This single-sources the state of the ARP.
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Joe Hershberger [Wed, 26 Sep 2018 21:48:57 +0000 (16:48 -0500)]
net: sandbox: Allow fake eth to handle more than 1 packet response
Use up to the max allocated receive buffers so as to be able to test
more complex situations.
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Joe Hershberger [Wed, 26 Sep 2018 21:48:56 +0000 (16:48 -0500)]
net: sandbox: Share the priv structure with tests
If tests want to implement tx handlers, they will likely need access to
the details in the priv structure.
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Joe Hershberger [Wed, 26 Sep 2018 21:48:55 +0000 (16:48 -0500)]
net: sandbox: Make the fake eth driver response configurable
Make the send handler registerable so tests can check for different
things.
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Joe Hershberger [Wed, 26 Sep 2018 21:48:54 +0000 (16:48 -0500)]
net: sandbox: Refactor sandbox send function
Make the behavior of the send function reusable.
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Joe Hershberger [Wed, 26 Sep 2018 21:48:53 +0000 (16:48 -0500)]
net: sandbox: Move disabled flag into priv struct
Store the per-device data with the device.
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Priyanka Jain [Mon, 27 Aug 2018 09:45:19 +0000 (15:15 +0530)]
phy: Add 25G_AUI, XLAUI, CAUI2, CAUI4 related macros
NXP SoCs like LX2160A can support new ethernet modes
which are 25G_AUI(25G), XLAUI(40G), CAUI2(50G)
and CAUI4(100G)
Add corresponding macros definitions in phy_interface.h
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Janine Hagemann [Tue, 28 Aug 2018 06:25:39 +0000 (08:25 +0200)]
net: phy: ti: Add binding for the CLK_OUT pin muxing
The DP83867 has a muxing option for the CLK_OUT pin. It is possible
to set CLK_OUT for different channels.
Create a binding to select a specific clock for CLK_OUT pin.
Based on commit
9708fb630d19 ("net: phy: dp83867: Add binding for
the CLK_OUT pin muxing option") of mainline linux kernel.
Signed-off-by: Janine Hagemann <j.hagemann@phytec.de>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Janine Hagemann [Tue, 28 Aug 2018 06:25:38 +0000 (08:25 +0200)]
net: phy: ti: Recover from "port mirroring" N/A MODE4
The DP83867 when not properly bootstrapped - especially with LED_0 pin -
can enter N/A MODE4 for "port mirroring" feature.
To provide normal operation of the PHY, one needs not only to explicitly
disable the port mirroring feature, but as well stop some IC internal
testing (which disables RGMII communication).
To do that the STRAP_STS1 (0x006E) register must be read and RESERVED bit
11 examined. When it is set, the another RESERVED bit (11) at PHYCR
(0x0010) register must be clear to disable testing mode and enable RGMII
communication.
Thorough explanation of the problem can be found at following e2e thread:
"DP83867IR: Problem with RESERVED bits in PHY Control Register (PHYCR) -
Linux driver"
https://e2e.ti.com/support/interface/ethernet/f/903/p/571313/
2096954#
2096954
Based on commit
ac6e058b75be ("net: phy: dp83867: Recover from "port mirroring"
N/A MODE4") of mainline linux kernel.
Signed-off-by: Janine Hagemann <j.hagemann@phytec.de>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: Lukasz Majewski <lukma@denx.de>
Janine Hagemann [Tue, 28 Aug 2018 06:25:37 +0000 (08:25 +0200)]
net: phy: ti: Add lane swapping support in the DP83867 TI's PHY driver
This patch adds support for enabling or disabling the lane swapping
(called "port mirroring" in PHY's CFG4 register) feature of the DP83867
TI's PHY device.
One use case is when bootstrap configuration enables this feature (because
of e.g. LED_0 wrong wiring) so then one needs to disable it in software
(at u-boot/Linux).
Based on commit
fc6d39c39581 ("net: phy: dp83867: Add lane swapping
support in the DP83867 TI's PHY driver") of mainline linux kernel.
Signed-off-by: Janine Hagemann <j.hagemann@phytec.de>
Acked-by: Lukasz Majewski <lukma@denx.de>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Bin Meng [Tue, 31 Jul 2018 09:55:23 +0000 (02:55 -0700)]
linux/if_ether.h: Add VLAN related macros
There are VLAN related macros defined in include/linux/if_vlan.h
in Linux kernel, as well as some kernel useful structures and inline
functions. Instead of a complete import from kernel, let's add these
VLAN macros to U-Boot's include/linux/if_ether.h.
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Bin Meng [Tue, 31 Jul 2018 09:55:22 +0000 (02:55 -0700)]
net.h: Include linux/if_ether.h to avoid duplication
There are plenty of existing drivers that have macros like ETH_ALEN
defined in their own source files. Now that we imported the kernel's
if_ether.h to U-Boot we can reduce some duplication.
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Bin Meng [Tue, 31 Jul 2018 09:55:21 +0000 (02:55 -0700)]
linux/if_ether.h: Initial import from Linux kernel v4.17
This imports include/uapi/linux/if_ether.h from Linux kernel v4.17.
It can be very helpful When porting Linux ethernet driver to U-Boot.
Note it is not exactly the same as the kernel one, as checkpatch
issues are fixed.
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Icenowy Zheng [Sat, 6 Oct 2018 15:23:32 +0000 (23:23 +0800)]
sunxi: fix DRAM gate/reset sequence of H6
Currently the DRAM bus gate and reset is changed at the same time in
H6 DRAM initialization code, which disobeys the user manual's
programming guide.
Fix the sequence by follow the sequence suggested by the user manual
(ungate the bus clock after release the reset signal).
By some experiments it seems to fix the DRAM size detection failure that
rarely happens.
Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
Acked-by: Maxime Ripard <maxime.ripard@bootlin.com>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
Jagan Teki [Mon, 3 Sep 2018 17:30:24 +0000 (23:00 +0530)]
board: da8xxevm: Add SPL DM for serial, spi
This patch add SPL DM support for da8xxevm boards
with SPL serial, SPI drivers supported via platdata.
Cc: Adam Ford <aford173@gmail.com>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Tested-by: Adam Ford <aford173@gmail.com> #da850evm
Jagan Teki [Mon, 3 Sep 2018 17:30:23 +0000 (23:00 +0530)]
spi: davinci: Add platdata support
Davanci spi driver has DM support already, this patch
add support for platdata so-that SPL can use it for
low foot-print.
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Tested-by: Adam Ford <aford173@gmail.com>
Adam Ford [Mon, 8 Oct 2018 19:13:03 +0000 (14:13 -0500)]
mtd: uboot: Fix hanging during mtd list command
Some boards (like omap3_logic) hang when trying to access
address 0. This happens when executing the new 'mtd list' command.
This patch enhances the checks for conditions that would
preclude mtd_probe_devices() from operating.
Fixes:
5db66b3aee6f ("cmd: mtd: add 'mtd' command")
Suggested-by: Boris Brezillon <boris.brezillon@bootlin.com>
Signed-off-by: Adam Ford <aford173@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com>
Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
Bin Meng [Sun, 29 Jul 2018 07:11:22 +0000 (00:11 -0700)]
net: pch_gbe: Make probe/remove static
These two routines are internal to pch_gbe driver.
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Bin Meng [Thu, 26 Jul 2018 10:15:58 +0000 (03:15 -0700)]
linux/compat.h: Add netdev_### log macros
Currently there are two ethernet drivers (mvneta.c and mvpp2.c) that
has netdev_### (eg: netdev_dbg) log macros defined in its own driver
file. This adds these log macros in a common place linux/compat.h.
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Bin Meng [Thu, 26 Jul 2018 09:39:40 +0000 (02:39 -0700)]
linux/mdio.h: Sync with Linux kernel v4.17
This syncs U-Boot's include/linux/mdio.h with Linux kernel v4.17
include/uapi/linux/mdio.h.
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Bin Meng [Thu, 26 Jul 2018 09:39:39 +0000 (02:39 -0700)]
linux/mii.h: Sync with Linux kernel v4.17
This syncs U-Boot's include/linux/mii.h with Linux kernel v4.17
include/uapi/linux/mii.h.
While we are here, this also fixes some style issues.
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Marek Vasut [Tue, 9 Oct 2018 11:13:13 +0000 (13:13 +0200)]
ARM: dts: rmobile: Reinstate missing CPLD on ULCB
The CPLD is used to reset the ULCB and it was removed
during DT sync with Linux 4.17. Reinstate it.
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Marek Vasut [Tue, 2 Oct 2018 22:46:24 +0000 (00:46 +0200)]
mmc: tmio: Limit DMA to 32bit on R-Car Gen3
The internal DMAC on Gen3 is 32bit only, limit the DMA address
range to 32bit.
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Marek Vasut [Tue, 2 Oct 2018 22:44:37 +0000 (00:44 +0200)]
mmc: tmio: Pass full address to tmio_sd_addr_is_dmaable()
Pass the entire source data pointer to tmio_sd_addr_is_dmaable()
so we don't have to apply casts throughout the code.
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Simon Glass [Mon, 1 Oct 2018 18:22:49 +0000 (12:22 -0600)]
dtoc: Fix the value of SetInt()
This does not set the correct value at present. Fix it.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Mon, 1 Oct 2018 18:22:48 +0000 (12:22 -0600)]
video: Tidy up a few comments in video.o
Add a little more information to one comment and update the guard comment
to be more accurate.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Anatolij Gustschin <agust@denx.de>
Simon Glass [Mon, 1 Oct 2018 18:22:47 +0000 (12:22 -0600)]
video: at91: Adjust vidconsole_position_cursor() to use char pos
At present this function uses pixels but it seems more useful for it to
position in terms of characters on the screen. This also matches the
comment to the function. Update this.
Unfortunately there is one user of this function (at91). Have a crack at
fixing this, since I cannot test it.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Anatolij Gustschin <agust@denx.de>
Simon Glass [Mon, 1 Oct 2018 18:22:46 +0000 (12:22 -0600)]
sysreset: Add a way to find the last reset
We have a method to return the last reset as a string for humans, but not
a method that allows it to be used programmatically. Add a new method that
returns the last reset as an enum.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Mon, 1 Oct 2018 18:22:45 +0000 (12:22 -0600)]
sysreset: Tidy up a few comments and logging
Some comments are incorrect or missing pieces. Fix these and use logging
to print the error.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Mon, 1 Oct 2018 18:22:44 +0000 (12:22 -0600)]
pci: Add a little more debugging to pci_rom
Add some logging on failure.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Simon Glass [Mon, 1 Oct 2018 18:22:43 +0000 (12:22 -0600)]
fdt: Allow C++ comments in link scripts and DT files
At present // in a device-tree file or link script causes a warning. But
this is used in the standard license header. Update the compiler flags to
use C99, which permits this.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Mon, 1 Oct 2018 18:22:42 +0000 (12:22 -0600)]
ctags: Minor changes to fix ctags output
At present ctags emits lines with unmatched quotes which means that the
output file is invalid. This is with exuberant-ctags version 5.9~svn201103
but I also see it with plain ctags. I am not sure that it is a bug though.
Make a few minor changes in the source code to fix this problem.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Mon, 1 Oct 2018 18:22:41 +0000 (12:22 -0600)]
panel: Expand the backlight support
At present the panel can be turned on but not off, and the brightness
cannot be controlled at run-time. Add a new API function to both the panel
and backlight uclasses to handle this. Enhance the PWM backlight driver
to deal with custom levels properly and allow the backlight to be turned
on and off.
Update the test to cover thes new features.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Mon, 1 Oct 2018 18:22:40 +0000 (12:22 -0600)]
test: panel: Add a test for the panel uclass
At present this uclass has no tests. Add a simple one which checks the PWM
configuration, regulator and GPIO.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Mon, 1 Oct 2018 18:22:39 +0000 (12:22 -0600)]
cros_ec: Add support for v3 messages on LPC
At present version 3 messages are only supported on SPI. Add support for
using LPC as well, as used on samus.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Mon, 1 Oct 2018 18:22:38 +0000 (12:22 -0600)]
cros_ec: Update cros_ec_read_hash() to specify the image
Allow selection of which EC image to hash.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Mon, 1 Oct 2018 18:22:37 +0000 (12:22 -0600)]
x86: Update mtrr functions to allow leaving cache alone
At present the mtrr functions disable the cache before making changes and
enable it again afterwards. This is fine in U-Boot, but does not work if
running in CAR (such as we are in SPL).
Update the functions so that the caller can request that caches be left
alone.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Simon Glass [Mon, 1 Oct 2018 18:22:36 +0000 (12:22 -0600)]
cros: Update ec_commands to latest version
This file has changed quite a bit in the last 5 years as the capabilities
of the ECs have grown. Sync it up with the copy in coreboot commit
b9141f2215.
The only change is the addition of EC_VBNV_BLOCK_SIZE_V2. This is needed
because U-Boot uses the new v2 vboot API and this is not currently fully
supported by Chromium OS firmware.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Mon, 1 Oct 2018 18:22:35 +0000 (12:22 -0600)]
Rename GPT_HEADER_SIGNATURE to avoid conflict
The current name conflicts with the Chrome OS verified boot library, which
prevents it being built. That library uses a string whereas U-Boot uses a
64-bit hex value. Rename this in U-Boot.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Mon, 1 Oct 2018 18:22:34 +0000 (12:22 -0600)]
Add a header file for strings
Add a string.h header for libraries that expect this to be available, now
that U-Boot's version has moved to include/linux.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Mon, 1 Oct 2018 18:22:32 +0000 (12:22 -0600)]
log: Add comments to the rest of the log categories
At present some of the log categories are missing comments. Add them.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Mon, 1 Oct 2018 18:22:30 +0000 (12:22 -0600)]
binman: Move to three-digit test-file numbers
We now have 99 tests. Before adding any more, rename everything to three
digits. This helps to preserve the ordering of tests and makes it easier
to find things.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Mon, 1 Oct 2018 18:22:29 +0000 (12:22 -0600)]
tpm: Add a few new commands for v1
These are needed for the 2018 version of Chromium OS vboot. Add an
implementation for TPM v1, with v2 to come later.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Mon, 1 Oct 2018 18:22:28 +0000 (12:22 -0600)]
tpm: Tidy up logging in tpm-common.c
At present this file uses logging but it should use the new macros. Update
it and add a log message for an error.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Mon, 1 Oct 2018 18:22:27 +0000 (12:22 -0600)]
tpm: Use livetree and allow children
Adjust the TPM drivers to use livetree (only one does not). Also,
sometimes TPMs can have child devices if they provide a service to the
system (such as storing secure data), so permit that.
Signed-off-by: Simon Glass <sjg@chromium.org>