]> git.ipfire.org Git - thirdparty/u-boot.git/log
thirdparty/u-boot.git
8 years agodrivers: usb: Remove !DM_USB code from host driver
Michal Simek [Wed, 21 Dec 2016 10:28:17 +0000 (11:28 +0100)] 
drivers: usb: Remove !DM_USB code from host driver

Glue logic depends on DM_USB that's why remove !DM_USB
code because only this default case is tested.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agodrivers: usb: Add USB_XHCI_ZYNQMP to Kconfig
Michal Simek [Wed, 21 Dec 2016 10:10:24 +0000 (11:10 +0100)] 
drivers: usb: Add USB_XHCI_ZYNQMP to Kconfig

Move symbol to Kconfig to cleanup configuration file.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agousb: storage: Show number of storage devices detected for DM_USB
Michal Simek [Tue, 20 Dec 2016 15:26:25 +0000 (16:26 +0100)] 
usb: storage: Show number of storage devices detected for DM_USB

By enabling DM_USB information about number of storage devices
was lost.
Get this information back simply by printing number of devices detected
via BLK uclass.

For example:
scanning bus 0 for devices... 7 USB Device(s) found
       scanning usb for storage devices... 3 Storage Device(s) found
       scanning usb for ethernet devices... 0 Ethernet Device(s) found

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agodrivers: usb: Add DWC3 Xilinx ZynqMP glue logic
Michal Simek [Thu, 31 Mar 2016 11:53:58 +0000 (13:53 +0200)] 
drivers: usb: Add DWC3 Xilinx ZynqMP glue logic

By enabling BLK by default this is the next driver which needs to get
support for DM_USB. Adding generic DWC3 glue logic which only
parse nodes and read device mode. Based on it probe proper
host/peripheral DWC3 drivers for it.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agodrivers: usb: dwc3: add ti dwc3 peripheral driver with driver model support
Michal Simek [Wed, 21 Dec 2016 12:18:40 +0000 (13:18 +0100)] 
drivers: usb: dwc3: add ti dwc3 peripheral driver with driver model support

Add a TI DWC3 peripheral driver with driver model support and the
driver will be bound by the DWC3 wrapper driver based on the
dr_mode device tree entry.

Xilinx: Remove dwc3-omap changes + limit zynqmp static init

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
8 years agoam43xx: Add USB device boot support to SPL
Tom Rini [Thu, 6 Aug 2015 17:05:08 +0000 (22:35 +0530)] 
am43xx: Add USB device boot support to SPL

Add in code to initialize the DWC3 gadget controller so that we can do
RNDIS in SPL on these platforms.

Xilinx: Remove am43xx changes and add usb/common to Makefile compilation

Signed-off-by: Tom Rini <trini@ti.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
8 years agodrivers: usb: common: add support to get maximum speed from dt
Mugunthan V N [Tue, 15 Mar 2016 10:34:08 +0000 (16:04 +0530)] 
drivers: usb: common: add support to get maximum speed from dt

Add support to get maximum speed from dt so that usb drivers
makes use of it for DT parsing.

Xilinx: Fix error message.

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
8 years agodrivers: usb: dwc3: add ti dwc3 misc driver for wrapper
Mugunthan V N [Mon, 14 Mar 2016 16:15:02 +0000 (21:45 +0530)] 
drivers: usb: dwc3: add ti dwc3 misc driver for wrapper

Add a misc driver for DWC3 wrapper, so that based on dr_mode the
USB devices can bind to USB host or USB device drivers.

Xilinx: Remove changes related to dwc3-omap.c

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
8 years agodrivers: usb: dwc3: remove devm_zalloc from linux_compact
Mugunthan V N [Mon, 11 Jan 2016 06:37:19 +0000 (12:07 +0530)] 
drivers: usb: dwc3: remove devm_zalloc from linux_compact

devm_zalloc() is already defined in dm/device.h header, so
devm_zalloc can be removed from linux_compact.h beader file.

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
8 years agodrivers: usb: gadget: ether/rndis: convert driver to adopt device driver model
Mugunthan V N [Fri, 18 Nov 2016 05:39:15 +0000 (11:09 +0530)] 
drivers: usb: gadget: ether/rndis: convert driver to adopt device driver model

Adopt usb ether gadget and rndis driver to adopt driver model

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
8 years agodrivers: usb: gadget: ether: prepare driver for driver model migration
Mugunthan V N [Fri, 18 Nov 2016 05:38:27 +0000 (11:08 +0530)] 
drivers: usb: gadget: ether: prepare driver for driver model migration

prepare driver for driver model migration

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
8 years agodrivers: usb: gadget: ether: use net device priv to pass usb ether priv
Mugunthan V N [Fri, 18 Nov 2016 05:37:18 +0000 (11:07 +0530)] 
drivers: usb: gadget: ether: use net device priv to pass usb ether priv

Use net device priv to pass usb ether priv and use it in
net device ops callback.

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
8 years agodrivers: usb: gadget: ether: consolidate global devices to single struct
Mugunthan V N [Fri, 18 Nov 2016 05:36:13 +0000 (11:06 +0530)] 
drivers: usb: gadget: ether: consolidate global devices to single struct

Consolidate the net device, usb eth device and gadget device
struct to single struct and a single global variable so that the
same can be passed as priv of ethernet driver.

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
8 years agodrivers: usb: gadget: ether: adopt to usb driver model
Mugunthan V N [Fri, 18 Nov 2016 05:19:12 +0000 (10:49 +0530)] 
drivers: usb: gadget: ether: adopt to usb driver model

Convert usb ether gadget to adopt usb driver model

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
8 years agodrivers: usb: gadget: ether: access network_started using local variable
Mugunthan V N [Fri, 18 Nov 2016 05:19:13 +0000 (10:49 +0530)] 
drivers: usb: gadget: ether: access network_started using local variable

network_started of struct eth_dev can be accessed using local
variable dev and no reason to access it with the global struct.

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
8 years agotools: mkimage: Call fclose in error path
Michal Simek [Tue, 20 Dec 2016 08:54:18 +0000 (09:54 +0100)] 
tools: mkimage: Call fclose in error path

This patch is fixing missing fclose() calls
in error patch introduced by:
"tools: mkimage: Use fstat instead of stat to avoid malicious hacks"
(sha1: ebe0f53f48e8f9ecc823e533a85b05c13638c350)

Reported-by: Coverity (CID: 155064, 155065)
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agoARM64: zynqmp: Simplify filesystem command disabling for mini
Michal Simek [Fri, 16 Dec 2016 13:07:49 +0000 (14:07 +0100)] 
ARM64: zynqmp: Simplify filesystem command disabling for mini

Move config options to Kconfig.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agoARM: zynq: Move BOOTZ enabling to defconfig
Michal Simek [Fri, 16 Dec 2016 13:02:50 +0000 (14:02 +0100)] 
ARM: zynq: Move BOOTZ enabling to defconfig

Simplify config file.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agoARM64: zynqmp: Remove already disabled commands in mini configuration
Michal Simek [Fri, 16 Dec 2016 13:00:51 +0000 (14:00 +0100)] 
ARM64: zynqmp: Remove already disabled commands in mini configuration

This patch removes these configuration parameters.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agoARM64: zynqmp: Simplify BOOTI disabling for mini configuration
Michal Simek [Fri, 16 Dec 2016 12:58:56 +0000 (13:58 +0100)] 
ARM64: zynqmp: Simplify BOOTI disabling for mini configuration

Disable BOOTI via defconfig.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agoARM64: zynqmp: Remove configs which go against each other
Michal Simek [Fri, 16 Dec 2016 12:56:08 +0000 (13:56 +0100)] 
ARM64: zynqmp: Remove configs which go against each other

Simplify configuration.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agoARM64: zynqmp: Remove BOOTDELAY setup from board file
Michal Simek [Fri, 16 Dec 2016 12:55:15 +0000 (13:55 +0100)] 
ARM64: zynqmp: Remove BOOTDELAY setup from board file

Simplify configuration.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agoARM: zynq: Remove ZYNQ_M29EW_WB_HACK macro
Michal Simek [Fri, 16 Dec 2016 12:46:20 +0000 (13:46 +0100)] 
ARM: zynq: Remove ZYNQ_M29EW_WB_HACK macro

This functionality should be covered by:
"mtd: cfi_flash: Write buffer size adjustment for M29EW Numonyx devices"
(sha1: 6f13889eb03fd3ce7b643aa6134856b3a2bf8d88)

That's why remove this macro and hack.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agoARM: zynq: Remove unused cc108 config file
Michal Simek [Fri, 16 Dec 2016 11:40:16 +0000 (12:40 +0100)] 
ARM: zynq: Remove unused cc108 config file

cc108 is handled via zynq-common.h config. The only missing
piece is different ENV_OFFSET setting for qspi boot mode
but this depends on user configuration. This board is tested via jtag
boot mode only that's why if qspi mode is required we can fix it later.
Comment was added to zynq-common.h not to be lost.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agoARM: zynq: Remove ocm configuration file
Michal Simek [Fri, 16 Dec 2016 11:28:55 +0000 (12:28 +0100)] 
ARM: zynq: Remove ocm configuration file

There is no reference to this file to build.
Remove this unused file.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agoARM: zynq: Add RSA dependency directly to Kconfig
Michal Simek [Fri, 16 Dec 2016 11:19:02 +0000 (12:19 +0100)] 
ARM: zynq: Add RSA dependency directly to Kconfig

Simplify zynq config file.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agoMerge tag 'v2016.11' into master
Michal Simek [Fri, 16 Dec 2016 10:08:33 +0000 (11:08 +0100)] 
Merge tag 'v2016.11' into master

Prepare v2016.11

- Add missing CONFIG_ macros to Kconfig. It should be fixed in future
- Fix spl_mmc fpga code
- Add missing defconfig macros
- Remove FPGA macros because it was moved to Kconfig in mainline

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agoARM64: zynqmp: Remove unused ARM_SMC macro
Michal Simek [Fri, 16 Dec 2016 07:57:42 +0000 (08:57 +0100)] 
ARM64: zynqmp: Remove unused ARM_SMC macro

There is no reference in the code anymore. Remove it.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agoARM: zynq: Remove unused afx targets
Michal Simek [Fri, 16 Dec 2016 07:41:04 +0000 (08:41 +0100)] 
ARM: zynq: Remove unused afx targets

AFX targets are not tested regularly and by moving stuff to Kconfig
these platforms are likely broken. Remove them from the tree.
If there is any request to get them back testing platform needs to be
prepared and images should be validated.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agoARM: zynq: Remove unused cse targets
Michal Simek [Fri, 16 Dec 2016 07:39:38 +0000 (08:39 +0100)] 
ARM: zynq: Remove unused cse targets

CSE targets are not tested regularly and by moving stuff to Kconfig
these platforms are likely broken. Remove them from the tree.
If there is any request to get them back testing platform needs to be
prepared and images should be validated.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agoARM64: zynqmp: Disable QSPI for zcu100-revB
Michal Simek [Thu, 15 Dec 2016 12:45:11 +0000 (13:45 +0100)] 
ARM64: zynqmp: Disable QSPI for zcu100-revB

RevB has no QSPI connected that's why remove it from defconfig.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agoimage-fit: Fix fit_get_node_from_config semantics
Paul Burton [Tue, 20 Sep 2016 17:17:12 +0000 (18:17 +0100)] 
image-fit: Fix fit_get_node_from_config semantics

Commit bac17b78dace ("image-fit: switch ENOLINK to ENOENT") changed
fit_get_node_from_config to return -ENOENT when a property doesn't
exist, but didn't change any of its callers which check return values.
Notably it didn't change boot_get_ramdisk, which leads to U-Boot failing
to boot FIT images which don't include ramdisks with the following
message:

  Ramdisk image is corrupt or invalid

It also didn't take into account that by returning -ENOENT to denote the
lack of a property we lost the ability to determine from the return
value of fit_get_node_from_config whether it was the property or the
configuration node that was missing, which may potentially lead callers
to accept invalid FIT images.

Fix this by having fit_get_node_from_config return -EINVAL when the
configuration node isn't found and -ENOENT when the property isn't
found, which seems to make semantic sense. Callers that previously
checked for -ENOLINK are adjusted to check for -ENOENT, which fixes the
breakage introduced by commit bac17b78dace ("image-fit: switch ENOLINK
to ENOENT").

The only other user of the return fit_get_node_from_config return value,
indirectly, is bootm_find_os which already checked for -ENOENT. From a
read-through of the code I suspect it ought to have been checking for
-ENOLINK prior to bac17b78dace ("image-fit: switch ENOLINK to ENOENT")
anyway, which would make it right after this patch, but this would be
good to get verified by someone who knows this x86 code or is able to
test it.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Cc: Jonathan Gray <jsg@jsg.id.au>
Cc: Marek Vasut <marex@denx.de>
Acked-by: Marek Vasut <marex@denx.de>
Acked-by: Stefan Roese <sr@denx.de>
Acked-by: George McCollister <george.mccollister@gmail.com>
Tested-by: George McCollister <george.mccollister@gmail.com>
8 years agoMerge tag 'v2016.09' into master
Michal Simek [Thu, 15 Dec 2016 12:22:01 +0000 (13:22 +0100)] 
Merge tag 'v2016.09' into master

Prepare v2016.09

- Fix fpga part in spl_mmc (use mmc_get_blk_desc(mmc)
  instead of &mmc->block_dev
- Fix dependencies in defconfig

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agoARM64: zynqmp: Replace board specific with generic memory bank decoding
Nathan Rossi [Sat, 10 Dec 2016 13:20:36 +0000 (23:20 +1000)] 
ARM64: zynqmp: Replace board specific with generic memory bank decoding

The dram_init and dram_init_banksize functions were using a board
specific implementation for decoding the memory banks from the fdt. This
board specific implementation uses a static variable 'tmp' which makes
these functions unsafe for execution from within the board_init_f
context.

This change makes the dram_init* functions use a generic implementation
of decoding and populating memory bank and size data.

Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
Fixes: 8d59d7f63b ("ARM64: zynqmp: Read RAM information from DT")
Cc: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agoARM: zynq: Replace board specific with generic memory bank decoding
Nathan Rossi [Thu, 8 Dec 2016 15:47:48 +0000 (01:47 +1000)] 
ARM: zynq: Replace board specific with generic memory bank decoding

The dram_init and dram_init_banksize functions were using a board
specific implementation for decoding the memory banks from the fdt. This
board specific implementation uses a static variable 'tmp' which makes
these functions unsafe for execution from within the board_init_f
context.

This unsafe use of a static variable was causing a specific bug when
using the zynq_zybo configuration, U-Boot would generate the following
error during image load. This was caused due to dram_init overwriting
the relocations for the 'image' variable within the do_bootm function.
Out of coincidence the un-initialized memory has a compression type
which is the same as the value for the relocation type R_ARM_RELATIVE.

   Uncompressing Invalid Image ... Unimplemented compression type 23

It should be noted that this is just one way the issue could surface,
other cases my not be observed in normal boot flow. Depending on the
size of various sections, and location of relocations within __rel_dyn
and the compiler/linker the outcome of this bug can differ greatly.

This change makes the dram_init* functions use a generic implementation
of decoding and populating memory bank and size data.

Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
Fixes: 758f29d0f8 ("ARM: zynq: Support systems with more memory banks")
Cc: Michal Simek <monstr@monstr.eu>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agofdt: add memory bank decoding functions for board setup
Nathan Rossi [Thu, 8 Dec 2016 15:47:28 +0000 (01:47 +1000)] 
fdt: add memory bank decoding functions for board setup

Add two functions for use by board implementations to decode the memory
banks of the /memory node so as to populate the global data with
ram_size and board info for memory banks.

The fdtdec_setup_memory_size() function decodes the first memory bank
and sets up the gd->ram_size with the size of the memory bank. This
function should be called from the boards dram_init().

The fdtdec_setup_memory_banksize() function decode the memory banks
(up to the CONFIG_NR_DRAM_BANKS) and populates the base address and size
into the gd->bd->bi_dram array of banks. This function should be called
from the boards dram_init_banksize().

Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Michal Simek <monstr@monstr.eu>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agoARM64: zynqmp: List secondary software boot modes
Michal Simek [Wed, 26 Oct 2016 07:24:32 +0000 (09:24 +0200)] 
ARM64: zynqmp: List secondary software boot modes

Using alternative bootmode field to support automatic secondary boot
modes. It is purely software setting where SW modes are using free
bootmode combinations.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agozynqmp: mini: Add mini uboot support for eMMC
Siva Durga Prasad Paladugu [Tue, 13 Dec 2016 14:28:46 +0000 (19:58 +0530)] 
zynqmp: mini: Add mini uboot support for eMMC

Add mini uboot support for eMMc, in which both
sd controllers were enabled, dcc is used for
uart.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agotools: mkimage: Extend mkimage to also include pmufw
Michal Simek [Fri, 21 Oct 2016 10:58:17 +0000 (12:58 +0200)] 
tools: mkimage: Extend mkimage to also include pmufw

This is generated command line when PMUFW_INIT_FILE is setup.

./tools/mkimage -T zynqmpimage -R ./"" -n
./"board/xilinx/zynqmp/pmufw.bin" -d spl/u-boot-spl.bin spl/boot.bin

pmufw has to be in binary format and mkimage is using dynamic
header size generation without using calloc function based on pmufw
size. Boot.bin header is filled with pmufw size and pmufw is copied to
header data section. When header is generated mkimage append
u-boot-spl.bin.

This patch also add pmufw to the u-boot tree with enabling it for zcu100
and zcu102.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agotools: mkimage: Use fstat instead of stat to avoid malicious hacks
Michal Simek [Tue, 6 Dec 2016 15:38:13 +0000 (16:38 +0100)] 
tools: mkimage: Use fstat instead of stat to avoid malicious hacks

The patch is fixing:
"tools: mkimage: Check if file is regular file"
(sha1: 56c7e8015509312240b1ee15f2ff74510939a45d)
which contains two issues reported by Coverity
Unchecked return value from stat and incorrect calling sequence where
attack can happen between calling stat and fopen.
Using pair in opposite order (fopen and fstat) is fixing this issue
because fstat is using the same file descriptor (FILE *).

Also fixing issue with:
"tools: mkimage: Add support for initialization table for Zynq and
ZynqMP" (sha1: 3b6460809c2a28360029c1c48247648fac4455c9)
where file wasn't checked that it is regular file.

Reported-by: Coverity (CID: 154711, 154712)
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
9 years agoARM64: zynqmp: Add psu_init_gpl* files for zcu100 revB
Michal Simek [Thu, 1 Dec 2016 14:38:26 +0000 (15:38 +0100)] 
ARM64: zynqmp: Add psu_init_gpl* files for zcu100 revB

Taken from zcu100 HW repo.
"revB: just_ps: PSU init files corresponding to TCL"
(sha1: 2d2753c19b6cc7572faaa7024e7ef79862ce5fbc)

with sleep.h and prog_reg() commented.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoARM64: zcu100: Correct GT Ref clock source
Nathalie Chan King Choy [Wed, 9 Nov 2016 21:45:06 +0000 (13:45 -0800)] 
ARM64: zcu100: Correct GT Ref clock source

Choose ref clock sources to match ZCU100 schematic.

Signed-off-by: Nathalie Chan King Choy <nathalie@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoARM64: zynqmp: psu_init for zcu100 w/ 2016.3_1110
Nathalie Chan King Choy [Mon, 7 Nov 2016 22:24:36 +0000 (14:24 -0800)] 
ARM64: zynqmp: psu_init for zcu100 w/ 2016.3_1110

Created a zcu100 design with just PS block (no PL) using 2016.3_1110, which
is supposed to be the 2016.3 released version.  Added the psu_init_gpl.*
changes, except for those which remove the changes from Michal's commit
having the DDR init "ARM64: zynqmp: Fix ddr init for zcu100"
(sha1: 0973da9e42cfec4146baa09d94d0b9b9d24952f7).

This patch is breaking USB but following up fixes it.

sleep.h and prog_reg() were commented. This should be fixed in v2017.1.

Signed-off-by: Nathalie Chan King Choy <nathalie@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoARM64: zynqmp: Add updated psu_init_gpl* files for zcu102
Michal Simek [Wed, 30 Nov 2016 10:09:56 +0000 (11:09 +0100)] 
ARM64: zynqmp: Add updated psu_init_gpl* files for zcu102

With origin files there was an issue with serdes setting for SCSI.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoARM64: zynqmp: Add support for zcu100-revB board
Michal Simek [Thu, 24 Nov 2016 09:42:43 +0000 (10:42 +0100)] 
ARM64: zynqmp: Add support for zcu100-revB board

Move revA to own configuration to be able to run it and use it.
In this patch there are no psu_init_gpl* files for SPL yet.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoARM64: zynqmp: Use DTS name for different psu_init_gpl* files in SPL
Michal Simek [Tue, 29 Nov 2016 11:03:51 +0000 (12:03 +0100)] 
ARM64: zynqmp: Use DTS name for different psu_init_gpl* files in SPL

CONFIG_SYS_CONFIG_NAME is not proper config option for different low
level init files because different board revisions requires different
psu_init_gpl* files.

Also at the end of moving drivers to DM all board specific configuration
files should be removed.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoARM64: zynqmp: Fix secondary bootmode enabling
Michal Simek [Tue, 25 Oct 2016 09:43:02 +0000 (11:43 +0200)] 
ARM64: zynqmp: Fix secondary bootmode enabling

Do not setup use_alt bit which copy alternative boot mode to
boot mode. The reason is that this bit is cleared after POR
but not after any software reset which will cause
that after SW reset bootrom will look for different boot image.

This patch setups alternative boot mode selection (purely SW
handling) and extends code to read this alternative boot mode first and
use it if it is setup.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoARM64: zynqmp: Enable SPL for zcu106
Michal Simek [Mon, 28 Nov 2016 09:39:00 +0000 (10:39 +0100)] 
ARM64: zynqmp: Enable SPL for zcu106

psu_init* files are taken from early design and sleep.h
and prog_reg() are commented out.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoconfigs: zynqmp: Add support to save env to FAT
Siva Durga Prasad Paladugu [Fri, 18 Nov 2016 04:57:48 +0000 (10:27 +0530)] 
configs: zynqmp: Add support to save env to FAT

Add support to save environment as a file of FAT filesystem
on to SD card. The file will be saved with name uEnv.txt.
This environment will be retrieved during boot.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoconfigs: zynqmp: Increase environment size to 32K
Siva Durga Prasad Paladugu [Fri, 18 Nov 2016 04:57:47 +0000 (10:27 +0530)] 
configs: zynqmp: Increase environment size to 32K

Increase environment size to 32K as the current default
environment itself is greater than 4K.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoARM64: zynqmp: Remove CONFIG_IDENT_STRING
Michal Simek [Thu, 24 Nov 2016 10:04:33 +0000 (11:04 +0100)] 
ARM64: zynqmp: Remove CONFIG_IDENT_STRING

CONFIG_IDENT_STRING is passed via defconfig already.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoARM64: zynqmp: Fix cells format in zcu100
Michal Simek [Thu, 24 Nov 2016 09:53:24 +0000 (10:53 +0100)] 
ARM64: zynqmp: Fix cells format in zcu100

Trivial fixes.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoARM64: zynqmp: Add missing spi in HS connector
Michal Simek [Thu, 24 Nov 2016 09:33:30 +0000 (10:33 +0100)] 
ARM64: zynqmp: Add missing spi in HS connector

Enable spi driver in HS connector.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agotools: mkimage: Check if file is regular file
Michal Simek [Fri, 21 Oct 2016 11:16:13 +0000 (13:16 +0200)] 
tools: mkimage: Check if file is regular file

Current Makefile.spl passes -R parameter which is not empty
and pointing to ./ folder.
"./tools/mkimage -T zynqmpimage -R ./"" -d spl/u-boot-spl.bin
spl/boot.bin"
That's why mkimage is trying to parse ./ file and generate
register init which is wrong.
Check that passed filename is regular file. If not do not work with it.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Series-to: u-boot
Series-cc: mike.looijmans@topic.nl

9 years agoARM64: zynqmp: Remove DTC 1.4.2 warnings
Michal Simek [Fri, 11 Nov 2016 12:21:04 +0000 (13:21 +0100)] 
ARM64: zynqmp: Remove DTC 1.4.2 warnings

DTC 1.4.2 reports these warnings:
Warning (unit_address_vs_reg): Node /amba_apu has a reg or ranges
property, but no unit name
Warning (unit_address_vs_reg): Node /amba has a reg or ranges property,
but no unit name
Warning (unit_address_vs_reg): Node /amba/usb@fe200000 has a unit name,
but no reg property
Warning (unit_address_vs_reg): Node /amba/usb@fe300000 has a unit name,
but no reg property
Warning (unit_address_vs_reg): Node
/amba/dma@fd4c0000/dma-video0channel@fd4c0000 has a unit name, but no
reg property
Warning (unit_address_vs_reg): Node
/amba/dma@fd4c0000/dma-video1channel@fd4c0000 has a unit name, but no
reg property
Warning (unit_address_vs_reg): Node
/amba/dma@fd4c0000/dma-video2channel@fd4c0000 has a unit name, but no
reg property
Warning (unit_address_vs_reg): Node
/amba/dma@fd4c0000/dma-graphicschannel@fd4c0000 has a unit name, but no
reg property
Warning (unit_address_vs_reg): Node
/amba/dma@fd4c0000/dma-audio0channel@fd4c0000 has a unit name, but no
reg property
Warning (unit_address_vs_reg): Node
/amba/dma@fd4c0000/dma-audio1channel@fd4c0000 has a unit name, but no
reg property
Warning (unit_address_vs_reg): Node /memory has a reg or ranges
property, but no unit name

This patch is fixing them.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoARM: zynq: Remove DTC 1.4.2 warnings
Michal Simek [Fri, 11 Nov 2016 12:11:37 +0000 (13:11 +0100)] 
ARM: zynq: Remove DTC 1.4.2 warnings

DTC 1.4.2 reports these warnings:
Warning (unit_address_vs_reg): Node /memory has a reg or ranges
property, but no unit name
Warning (unit_address_vs_reg): Node /pmu has a reg or ranges property,
but no unit name
Warning (unit_address_vs_reg): Node /fixedregulator@0 has a unit name,
but no reg property

This patch is fixing them.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoARM64: zynqmp: usb1 on zcu100 is not peripheral
Nathalie Chan King Choy [Thu, 24 Nov 2016 02:55:20 +0000 (18:55 -0800)] 
ARM64: zynqmp: usb1 on zcu100 is not peripheral

For the ZCU100 board, usb1 is host and that's specified in dwc3_1.

Signed-off-by: Nathalie Chan King Choy <nathalie@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoARM: zynq: Remove spi-max-frequency
Michal Simek [Mon, 21 Nov 2016 09:43:37 +0000 (10:43 +0100)] 
ARM: zynq: Remove spi-max-frequency

spi-max-frequency for spi bus depends on devices which are
connected to it. Remove this parameter from dtsi file.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoARM: zynq: Sync with Linux kernel
Michal Simek [Mon, 21 Nov 2016 09:43:04 +0000 (10:43 +0100)] 
ARM: zynq: Sync with Linux kernel

Use the same position as is used in Linux kernel.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoARM: dt: zynq: Add labels to cpu nodes to allow overriding OPPs.
Moritz Fischer [Mon, 9 Nov 2015 18:51:51 +0000 (10:51 -0800)] 
ARM: dt: zynq: Add labels to cpu nodes to allow overriding OPPs.

By adding labels to the cpu nodes in the dtsi, a dts that
includes it can change the OPPs by referencing the cpu0
through the label.

Signed-off-by: Moritz Fischer <moritz.fischer@ettus.com>
Reviewed-by: Sören Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoARM: dts: zynq: replace gpio-key,wakeup with wakeup-source property
Sudeep Holla [Wed, 21 Oct 2015 10:10:16 +0000 (11:10 +0100)] 
ARM: dts: zynq: replace gpio-key,wakeup with wakeup-source property

Though the keyboard driver for GPIO buttons(gpio-keys) will continue to
check for/support the legacy "gpio-key,wakeup" boolean property to
enable gpio buttons as wakeup source, "wakeup-source" is the new
standard binding.

This patch replaces the legacy "gpio-key,wakeup" with the unified
"wakeup-source" property in order to avoid any futher copy-paste
duplication.

Cc: Michal Simek <michal.simek@xilinx.com>
Cc: "Sören Brinkmann" <soren.brinkmann@xilinx.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoARM64: zynqmp: Sync main dtsi with kernel
Michal Simek [Mon, 21 Nov 2016 09:32:42 +0000 (10:32 +0100)] 
ARM64: zynqmp: Sync main dtsi with kernel

Linux kernel is having one more empty line between
License and dts file. Add it there to be in sync.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoARM64: zynqmp: Add idle state for ZynqMP
Stefan Krsmanovic [Fri, 21 Oct 2016 10:44:56 +0000 (12:44 +0200)] 
ARM64: zynqmp: Add idle state for ZynqMP

Added the idle-states node to describe zynqmp idle states. Only cpu-sleep-0
idle state is added in this patch. References to the idle-states node are
added in all CPU nodes. Time values: entry/exit latencies and min-residency,
needs to be tuned. arm,psci-suspend-param is selected to comply with PSCIv1.0
and Extended StateID format.

Signed-off-by: Stefan Krsmanovic <stefan.krsmanovic@aggios.com>
Acked-by: Will Wong <willw@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoARM64: zynqmp: usb1 on zcu100 is used as peripheral
Michal Simek [Tue, 18 Oct 2016 14:18:28 +0000 (16:18 +0200)] 
ARM64: zynqmp: usb1 on zcu100 is used as peripheral

It should be used as peripheral all the time.

Reported-by: Alexey Firago <Alexey_Firago@mentor.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoARM64: zynqmp: clk: Add the clock for watchdog
Shubhrajyoti Datta [Fri, 21 Oct 2016 10:42:19 +0000 (16:12 +0530)] 
ARM64: zynqmp: clk: Add the clock for watchdog

The watchdog clock node is missing.
Add the same. This solves the below error.

cdns-wdt fd4d0000.watchdog: input clock not found
cdns-wdt: probe of fd4d0000.watchdog failed with error -2

Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agonet: zynq_gem: Use clock driver for ZynqMP
Siva Durga Prasad Paladugu [Tue, 15 Nov 2016 10:45:42 +0000 (16:15 +0530)] 
net: zynq_gem: Use clock driver for ZynqMP

Enable and use the clock driver routine
defined in clock driver toset required
clock appropriately.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoclk: zynqmp: Add clock driver support for zynqmp
Siva Durga Prasad Paladugu [Tue, 15 Nov 2016 10:45:41 +0000 (16:15 +0530)] 
clk: zynqmp: Add clock driver support for zynqmp

Add basic clock driver support for zynqmp which
sets the required clock for GEM controller

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoPrepare v2016.11 v2016.11
Tom Rini [Mon, 14 Nov 2016 16:27:11 +0000 (11:27 -0500)] 
Prepare v2016.11

Signed-off-by: Tom Rini <trini@konsulko.com>
9 years agoMAINTAINERS: mark sunxi status as Orphan
Hans de Goede [Mon, 14 Nov 2016 11:53:25 +0000 (12:53 +0100)] 
MAINTAINERS: mark sunxi status as Orphan

Ian has not had any time for sunxi for some time now and I'm
in the same situation now, so I'm stepping down as sunxi
custodian and marking the sunxi support as Orphan.

Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
Cc: Chen-Yu Tsai <wens@csie.org>
Cc: Ian Campbell <ijc@hellion.org.uk>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agovideo: bmp: Fix compilation errors with CONFIG_BMP_xxBPP enabled
Stefan Roese [Sat, 12 Nov 2016 09:32:38 +0000 (10:32 +0100)] 
video: bmp: Fix compilation errors with CONFIG_BMP_xxBPP enabled

Compiling the 'bmp' command with DM and having one of the following macros
enabled:

CONFIG_BMP_16BPP, CONFIG_BMP_24BPP ONFIG_BMP_32BPP

generates this error:

drivers/video/video_bmp.c: In function ‘video_bmp_display’:
drivers/video/video_bmp.c:315:22: error: ‘lcd_line_length’ undeclared (first use in this function)
    fb -= width * 2 + lcd_line_length;
                          ^

This patch moves to using the correct variable instead and enables the
'bmp' command for DM again.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Anatolij Gustschin <agust@denx.de>
9 years agonet: write enetaddr down to hardware on env_callback
Marek Vasut [Sat, 12 Nov 2016 15:28:40 +0000 (16:28 +0100)] 
net: write enetaddr down to hardware on env_callback

If mac-address is changed using "setenv ethaddr ...." command the new
mac-adress also must be written into the responsible ethernet driver.
This fixes the legacy ethernet handling.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Hannes Schmelzer <oe5hpm@oevsv.at>
Cc: Joe Hershberger <joe.hershberger@ni.com>
Cc: Tom Rini <trini@konsulko.com>
Reviewed-by: Hannes Schmelzer <oe5hpm@oevsv.at>
9 years agospi: ti_qspi: Fix baudrate divider calculation
Vignesh R [Sat, 5 Nov 2016 10:35:16 +0000 (16:05 +0530)] 
spi: ti_qspi: Fix baudrate divider calculation

Fix the divider calculation logic to choose a value so that the
resulting baudrate is either equal to or closest possible baudrate less
than the requested value. While at that, cleanup ti_spi_set_speed().

Signed-off-by: Vignesh R <vigneshr@ti.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
9 years agoARM: dts: dra7xx: Update spi-max-frequency for qspi slave node
Vignesh R [Sat, 5 Nov 2016 10:35:15 +0000 (16:05 +0530)] 
ARM: dts: dra7xx: Update spi-max-frequency for qspi slave node

Update the spi-max-frequency property of m25p80 flash slave to match
that of TI QSPI controller node, so that QSPI operations happen at
maximum supported frequency of 76.8MHz.

Signed-off-by: Vignesh R <vigneshr@ti.com>
Reviewed-by: Jagan Teki <jteki@openedev.com>
9 years agoARM: k2g: Update PLL Multiplier and divider values
Lokesh Vutla [Thu, 3 Nov 2016 10:05:02 +0000 (15:35 +0530)] 
ARM: k2g: Update PLL Multiplier and divider values

Only a certain set of PLLM/D values are recommended to configure the DDR
at the required speeds for a given clock input frequency. Updating these
values as specified in Data Sheet[1] Table 5-18

[1] http://www.ti.com/lit/ds/symlink/66ak2g02.pdf

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
9 years agoARM: keystone2: PLL: Enable glitch free initialization sequence
Lokesh Vutla [Thu, 3 Nov 2016 10:02:51 +0000 (15:32 +0530)] 
ARM: keystone2: PLL: Enable glitch free initialization sequence

Update the PLL initialization sequence to avoid glitches while
programming. User guide for the same is available at[1].

[1] http://www.ti.com/lit/ug/sprugv2h/sprugv2h.pdf

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
9 years agoarm: Set TTB XN bit in case DCACHE_OFF for LPAE mode
Keerthy [Sat, 29 Oct 2016 09:49:10 +0000 (15:19 +0530)] 
arm: Set TTB XN bit in case DCACHE_OFF for LPAE mode

While we setup the mmu initially we mark set_section_dcache with
DCACHE_OFF flag. In case of non-LPAE mode the DCACHE_OFF macro
is rightly defined with TTB_SECT_XN_MASK set so as to mark all the
4GB XN. In case of LPAE mode  XN(Execute-never) bit is not set with
DCACHE_OFF. Hence XN bit is not set by default for DCACHE_OFF which
keeps all the regions execute okay and this leads to random speculative
fetches in random memory regions which was eventually caught by kernel
omap-l3-noc driver.

Fix this to mark the regions as XN by default.

Signed-off-by: Keerthy <j-keerthy@ti.com>
Reviewed-by: Alexander Graf <agraf@suse.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
9 years agoarm: print the cache config option in hex instead of decimal
Keerthy [Sat, 29 Oct 2016 09:49:09 +0000 (15:19 +0530)] 
arm: print the cache config option in hex instead of decimal

Printing the option value in hex makes it more comprehensible.

Signed-off-by: Keerthy <j-keerthy@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
9 years agomx6ull_14x14_evk: Add README file
Diego Dorta [Thu, 10 Nov 2016 17:05:37 +0000 (15:05 -0200)] 
mx6ull_14x14_evk: Add README file

Add a README file to help users getting started with the board.

Signed-off-by: Diego Dorta <diego.dorta@nxp.com>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
9 years agodavinci: omapl138_lcdk: keep booting even when MAC address is invalid
Fabien Parent [Thu, 10 Nov 2016 16:16:35 +0000 (17:16 +0100)] 
davinci: omapl138_lcdk: keep booting even when MAC address is invalid

If the MAC address specified on the EEPROM is invalid (multicast or
zero address), then u-boot fails to boot. Having a bad MAC address
in the EEPROM should not prevent the system from booting.

This commit changes the error path to just print an error messages
in case of bad MAC address.

Signed-off-by: Fabien Parent <fparent@baylibre.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
9 years agoboard: am335x/mux: Do not hang when encountering a bad EEPROM
Alex G [Wed, 9 Nov 2016 04:48:44 +0000 (20:48 -0800)] 
board: am335x/mux: Do not hang when encountering a bad EEPROM

In most cases, the SPL and u-boot.img will be on the same boot media.
Since the SPL was loaded by the boot rom, the pinmux will already have
been configured for this media. This, the board will still be able to
boot successfully, or at least reach the u-boot console, where more
recovery options are available.

I've encountered this on a beaglebone black with a corrupted EEPROM.
Removing this check allowed the board to boot successfully. I've also
seen this on EVM-based boards with an unprogrammed EEPROM. On those
boards, for some reason there were no UART messages. This made it look
as if the SOC was dead.

Remove the hang(), as it is not a fatal error. Also reformat the error
message to be clearer as to the cause. The original message made it
appear as if the wrong binary was being loaded.

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
9 years agoigep00x0: add Hynix timings
Ladislav Michl [Fri, 4 Nov 2016 11:59:46 +0000 (12:59 +0100)] 
igep00x0: add Hynix timings

Tested on IGEPv2 with Micron MT29F4G16ABBDA3W and
Hynix H27S4G6F2DKA-BM

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
Reviewed-by: Javier Martinez Canillas <javier@samsung.com>
Tested-by: Javier Martinez Canillas <javier@samsung.com>
9 years agoigep00x0: consolidate defconfigs
Ladislav Michl [Fri, 4 Nov 2016 11:57:27 +0000 (12:57 +0100)] 
igep00x0: consolidate defconfigs

Defconfigs should remain the same except CONFIG_SYS_EXTRA_OPTIONS.
Drop NAND specific defconfig as flash type is runtime detected.

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
Reviewed-by: Javier Martinez Canillas <javier@samsung.com>
9 years agoigep00x0: disable CONFIG_DISPLAY_BOARDINFO
Ladislav Michl [Fri, 4 Nov 2016 11:55:21 +0000 (12:55 +0100)] 
igep00x0: disable CONFIG_DISPLAY_BOARDINFO

As a single U-Boot binary can now run on various board modifications,
drop CONFIG_DISPLAY_BOARDINFO as it prints flash memory information
too early to give us chance to easily detect it. Also saves few bytes
as a bonus.

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
Reviewed-by: Javier Martinez Canillas <javier@samsung.com>
Tested-by: Javier Martinez Canillas <javier@samsung.com>
9 years agotools: fix mksunxiboot build for tools-all target
Andre Przywara [Thu, 10 Nov 2016 12:13:23 +0000 (12:13 +0000)] 
tools: fix mksunxiboot build for tools-all target

Commit fed329aebe3a ("tools: add mksunxiboot to tools-all target") added
mksunxiboot to the tools-all target, but used the CONFIG_SUNXI symbol
to enable its build. Now commit aec9a0f19f64 ("sunxi: Rename CONFIG_SUNXI
to CONFIG_ARCH_SUNXI"), merged before that, renamed that symbol, so that
the first patch basically gets ineffective.
Adjust the symbol name in tools/Makefile to make it build again.

Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
9 years agoARM64: zynqmp: Extend sdboot mode to be able to run commands
Michal Simek [Wed, 9 Nov 2016 13:17:36 +0000 (14:17 +0100)] 
ARM64: zynqmp: Extend sdboot mode to be able to run commands

This change is taken from Zynq which was done by:
"zynq_common: Add uEnv.txt boot environment load support"
(sha1: c7e6af90ef545902daacb0d83e5dc29c722dcf9d)

uenvcmd is variable which stores commands for different platform
initialization in SD boot mode.

Reported-by: Alexey Figaro <Alexey_Firago@mentor.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoMerge branch 'master' of git://git.denx.de/u-boot-tegra
Tom Rini [Tue, 8 Nov 2016 15:36:57 +0000 (10:36 -0500)] 
Merge branch 'master' of git://git.denx.de/u-boot-tegra

9 years agoARM: tegra186: call secure monitor for all cache-wide ops
Stephen Warren [Wed, 19 Oct 2016 21:18:47 +0000 (15:18 -0600)] 
ARM: tegra186: call secure monitor for all cache-wide ops

An SMC call is required for all cache-wide operations on Tegra186. This
patch implements the two missing hooks now that U-Boot supports them, and
fixes the mapping of "hook name" to SMC call code.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
9 years agoarmv8: add hooks for all cache-wide operations
Stephen Warren [Wed, 19 Oct 2016 21:18:46 +0000 (15:18 -0600)] 
armv8: add hooks for all cache-wide operations

SoC-specific logic may be required for all forms of cache-wide
operations; invalidate and flush of both dcache and icache (note that
only 3 of the 4 possible combinations make sense, since the icache never
contains dirty lines). This patch adds an optional hook for all
implemented cache-wide operations, and renames the one existing hook to
better represent exactly which operation it is implementing. A dummy
no-op implementation of each hook is provided.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
9 years agoARM: tegra: translate __asm_flush_l3_cache to assembly
Stephen Warren [Wed, 19 Oct 2016 21:18:45 +0000 (15:18 -0600)] 
ARM: tegra: translate __asm_flush_l3_cache to assembly

When performing a cache disable function, code must not access DRAM.
That is because when the cache is disabled, it will be bypassed and all
loads and stores will be serviced by RAM. This prevents accessing any
dirty data in the cache. In turn, this means the stack cannot be
used, since that is in RAM. To guarantee that code doesn't use RAM (and
in particular the stack) __asm_flush_l3_cache() must be manually
implemented in assembly, rather than implemented in C since the compiler
won't know not to touch RAM.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
9 years agoARM: tegra: ensure nvtboot_boot_x0 alignment
Stephen Warren [Wed, 19 Oct 2016 21:18:44 +0000 (15:18 -0600)] 
ARM: tegra: ensure nvtboot_boot_x0 alignment

nvtboot_boot_x0 is a 64-bit variable and hence must be 64-bit aligned.
So far this has happened by accident! Fix the code so this is guaranteed.

This fixes the following build error:
... relocation truncated to fit: R_AARCH64_LDST64_ABS_LO12_NC
    against symbol `nvtboot_boot_x0' ...

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
9 years agoMerge branch 'master' of git://git.denx.de/u-boot-net
Tom Rini [Mon, 7 Nov 2016 18:16:00 +0000 (13:16 -0500)] 
Merge branch 'master' of git://git.denx.de/u-boot-net

9 years agonet: use random ethernet address if invalid and not zero
Siva Durga Prasad Paladugu [Wed, 2 Nov 2016 11:52:13 +0000 (12:52 +0100)] 
net: use random ethernet address if invalid and not zero

Use random ethernet address if the ethernet address found
is invalid, not zero and config for random address
is defined.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
9 years agonet: mvgbe: Fix build error with CONFIG_PHYLIB
Chris Packham [Mon, 31 Oct 2016 21:48:32 +0000 (10:48 +1300)] 
net: mvgbe: Fix build error with CONFIG_PHYLIB

Commit 5a49f17481bb ("net: mii: Use spatch to update miiphy_register")
updated the mvgbe implementation of smi_reg_read/smi_reg_write. Prior to
that change mvgbe_phy_read and mvgbe_phy_write where used as wrappers to
satisfy the phylib APIs. Because these functions weren't updated in that
commit build errors where triggered when CONFIG_PHYLIB was enabled.

Fix these build errors by removing mvgbe_phy_read and mvgbe_phy_write
and using smi_reg_read/smi_reg_write directly.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
9 years agonet: phy: micrel: center FLP burst timing at 16ms
Ash Charles [Fri, 21 Oct 2016 21:31:33 +0000 (17:31 -0400)] 
net: phy: micrel: center FLP burst timing at 16ms

Like [1], reset the FLP burst timing for the KSZ9031 to the 16ms
specified by the IEEE802.3 standard from the chip's default of 8ms.

For more details, see the "Auto-Negotiation Timing" section of the
KSZ9031RNX datasheet.

[1] https://patchwork.kernel.org/patch/6558371/

Signed-off-by: Ash Charles <ash.charles@savoirfairelinux.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
9 years agoARM: tegra: enable Ethernet on p2771-0000
Stephen Warren [Mon, 12 Sep 2016 17:51:15 +0000 (11:51 -0600)] 
ARM: tegra: enable Ethernet on p2771-0000

Enable the Ethernet device in DT, provide board-specific configuration,
and enable the driver in Kconfig.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
9 years agoARM: tegra: add DWC EQoS (ethernet) to Tegra186 DT
Stephen Warren [Mon, 12 Sep 2016 17:51:14 +0000 (11:51 -0600)] 
ARM: tegra: add DWC EQoS (ethernet) to Tegra186 DT

Tegra186 includes a Synopsys DWC EQoS (Ethernet) device. Add this to the
Tegra186 SoC DT so that boards can make use of it.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
9 years agoARM: tegra: configure Ethernet address on Tegra186
Stephen Warren [Mon, 12 Sep 2016 17:51:13 +0000 (11:51 -0600)] 
ARM: tegra: configure Ethernet address on Tegra186

On Tegra186, the bootloader which runs before U-Boot passes the Ethernet
MAC address to U-Boot using device tree. Extract this value and write it
to the environment, so that the Ethernet uclass picks it up and uses it
for the built-in Ethernet device.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
9 years agoARM: tegra: add SoC-level hook for board_late_init()
Stephen Warren [Mon, 12 Sep 2016 17:51:12 +0000 (11:51 -0600)] 
ARM: tegra: add SoC-level hook for board_late_init()

Extend the Tegra186 implementation of board_late_init() to call a per-SoC
"hook" function. This will allow SoC-specific (rather than Tegra-wide)
functionality to be implemented without the core Tegra code needing to be
aware of the details. While board186.c is currently only used for
Tegra186, it should be applicable to any other future SoC, and perhaps its
simple design could be back-ported to older SoCs in the future too.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
9 years agonet: add driver for Synopsys Ethernet QoS device
Stephen Warren [Fri, 21 Oct 2016 20:46:47 +0000 (14:46 -0600)] 
net: add driver for Synopsys Ethernet QoS device

This driver supports the Synopsys Designware Ethernet QoS (Quality of
Service) a/k/a eqos IP block, which is a different design than the HW
supported by the existing designware.c driver. The IP supports many
options for bus type, clocking/reset structure, and feature list. This
driver currently supports the specific configuration used in NVIDIA's
Tegra186 chip, but should be extensible to other combinations quite
easily, as explained in the source.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Simon Glass <sjg@chromium.org> # V1
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
9 years agodt: net: add DWC EQoS binding
Stephen Warren [Fri, 21 Oct 2016 20:46:46 +0000 (14:46 -0600)] 
dt: net: add DWC EQoS binding

The Synopsys DWC EQoS is a configurable Ethernet MAC/DMA IP block which
supports multiple options for bus type, clocking and reset structure, and
feature list.

This patch imports the binding from the Linux kernel, including my V3
patch to extend the binding to cover the Tegra186, which is applied for
next-20160912. So far, my changes have been acked by Lars Persson, the
original author of the binding.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>