]> git.ipfire.org Git - people/ms/u-boot.git/log
people/ms/u-boot.git
8 years agovideo: mxsfb: introduce lcdif_power_down
Peng Fan [Thu, 29 Oct 2015 07:54:49 +0000 (15:54 +0800)] 
video: mxsfb: introduce lcdif_power_down

Introudce a new function lcdif_power_down.

1. Waits for a VSYNC interrupt to guarantee the reset is done at the
   VSYNC edge, which somehow makes the LCDIF consume the display FIFO(?)
   and helps the LCDIF work normally at the kernel stage.
2. Add power down function to stop lcdif.

The reason to introduce lcdif_power_down is that we want lcdif to be in
initial state when doing uboot reset or before kernel boot to make
system stable, otherwise system may hang.

Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Anatolij Gustschin <agust@denx.de>
Acked-by: Anatolij Gustschin <agust@denx.de>
8 years agoimx: mx6ul_14x14_evk: support lcdif display
Peng Fan [Thu, 29 Oct 2015 07:54:48 +0000 (15:54 +0800)] 
imx: mx6ul_14x14_evk: support lcdif display

Support lcdif display:
1. Add pinmux and pad settings for LCDIF
2. Introduce setup_lcd to do the settings for LCDIF
3. Enable VIDEO related macros in board header files
4. Add a new env videomode which is needed by mxsfb.c. The
   settings for videomode in this patch is for TFT43AB.
5. Tested on mx6ul 14x14/9x9 evk.

Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
Cc: Stefano Babic <sbabic@denx.de>
8 years agoimx: mx6: add clock api for lcdif
Peng Fan [Thu, 29 Oct 2015 07:54:47 +0000 (15:54 +0800)] 
imx: mx6: add clock api for lcdif

Implement mxs_set_lcdclk, enable_lcdif_clock and enable_pll_video.
The three API can be used to configure lcdif related clock when
CONFIG_VIDEO_MXS enabled.

Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
Cc: Stefano Babic <sbabic@denx.de>
8 years agoimx: mx6: crm_reg: add LCDIF related macros
Peng Fan [Thu, 29 Oct 2015 07:54:46 +0000 (15:54 +0800)] 
imx: mx6: crm_reg: add LCDIF related macros

Add i.MX6UL/SX LCDIF related macros. Discard uneccessary
'#ifdef xxx'.

Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
Cc: Stefano Babic <sbabic@denx.de>
Reviewed-by: Stefano Babic <sbabic@denx.de>
8 years agoimx: mx6: fix register address
Peng Fan [Thu, 29 Oct 2015 07:54:45 +0000 (15:54 +0800)] 
imx: mx6: fix register address

1. Move WDOG3_BASE_ADDR to '#if !(defined(__ASSEMBLY__))'.
2. Add i.MX6UL LCDIF register base address. And Introduce
   LCDIF1_BASE_ADDR to support runtime check.
3. include <asm/imx-common/regs-lcdif.h> for imx-regs.h to avoid
   building error for mxsfb.c, since mxsfb.c use imx-regs.h.

Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
Cc: Stefano Babic <sbabic@denx.de>
8 years agoimx: lcdif: use one register structure for i.MXes
Peng Fan [Thu, 29 Oct 2015 07:54:44 +0000 (15:54 +0800)] 
imx: lcdif: use one register structure for i.MXes

Share one lcdif structure for i.MXes.
1. Discard struct mxs_lcdif_regs from imx-regs.h of i.MX7
2. Add i.MX6SX/6UL/7D support in imx-lcdif.h of imx-common

Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
Cc: Stefano Babic <sbabic@denx.de>
8 years agoimx: imx-common: move lcdif structure and macro definition to imx-common
Peng Fan [Thu, 29 Oct 2015 07:54:43 +0000 (15:54 +0800)] 
imx: imx-common: move lcdif structure and macro definition to imx-common

Move 'struct mxs_lcdif_regs' and lcdif related macro definitions to
arch/arm/include/asm/imx-common/regs-lcdif.h.

Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
Cc: Stefano Babic <sbabic@denx.de>
8 years agoimx: include linux/types.h for regs-common.h
Peng Fan [Thu, 29 Oct 2015 07:54:42 +0000 (15:54 +0800)] 
imx: include linux/types.h for regs-common.h

There are uint8_t, uint32_t types in regs-common.h, so include
linux/types.h.

Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
Cc: Stefano Babic <sbabic@denx.de>
8 years agomxs: regs-common.h must be wrapped with !__ASSEMBLY__
Peng Fan [Thu, 29 Oct 2015 07:54:41 +0000 (15:54 +0800)] 
mxs: regs-common.h must be wrapped with !__ASSEMBLY__

regs-common.h must be wrapped with #ifndef __ASSEMBLY__

Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
Cc: Stefano Babic <sbabic@denx.de>
8 years agoxfi3: correct function name
Peng Fan [Thu, 29 Oct 2015 07:54:40 +0000 (15:54 +0800)] 
xfi3: correct function name

board_mxsfb_system_setup must be renamed mxsfb_system_setup.

Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
Cc: Marek Vasut <marek.vasut@gmail.com>
Cc: Stefano Babic <sbabic@denx.de>
8 years agomxs: add parameter base_addr for mxs_set_lcdclk
Peng Fan [Thu, 29 Oct 2015 07:54:39 +0000 (15:54 +0800)] 
mxs: add parameter base_addr for mxs_set_lcdclk

Change mxs_set_lcdclk prototype to add a new parameter
base_addr. There are two LCD interfaces for i.MX6SX,
we may support LCDIF1 or LCDIF2.

Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Anatolij Gustschin <agust@denx.de>
Acked-by: Anatolij Gustschin <agust@denx.de>
8 years agoarm: novena: Fix kernel_addr_r env variable
Marek Vasut [Tue, 10 Nov 2015 19:54:12 +0000 (20:54 +0100)] 
arm: novena: Fix kernel_addr_r env variable

The kernel_addr_r should be set to the same value as CONFIG_LOADADDR,
get rid of the duplication.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Sean Cross <xobs@kosagi.com>
Cc: Stefano Babic <sbabic@denx.de>
8 years agoimx: mx7: default enable non-secure mode
Peng Fan [Fri, 23 Oct 2015 02:13:05 +0000 (10:13 +0800)] 
imx: mx7: default enable non-secure mode

Support PSCI and switch to non-secure mode when booting linux.

Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
Signed-off-by: Frank Li <Frank.Li@freescale.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
8 years agomx7: psci: add basic psci support
Peng Fan [Fri, 23 Oct 2015 02:13:04 +0000 (10:13 +0800)] 
mx7: psci: add basic psci support

1. add basic psci support for imx7 chip.
2. support cpu_on and cpu_off.
3. switch to non-secure mode when boot linux kernel.
4. set csu allow accessing all peripherial register in non-secure mode.

Signed-off-by: Frank Li <Frank.Li@freescale.com>
Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
8 years agoarm: discard relocation entries for secure text
Peng Fan [Fri, 23 Oct 2015 02:13:03 +0000 (10:13 +0800)] 
arm: discard relocation entries for secure text

The code such as PSCI in section named secure is bundled with
u-boot image, and when bootm, the code will be copied to their
runtime address same to compliation/linking address -
CONFIG_ARMV7_SECURE_BASE.

When compile the PSCI code and link it into the u-boot image,
there will be relocation entries in .rel.dyn section for PSCI.
Actually, we do not needs these relocation entries.

If still keep the relocation entries in .rel.dyn section,
r0 at line 103 and 106 in arch/arm/lib/relocate.S may be an invalid
address which may not support read/write for one SoC.
102         /* relative fix: increase location by offset */
103         add     r0, r0, r4
104         ldr     r1, [r0]
105         add     r1, r1, r4
106         str     r1, [r0]

So discard them to avoid touching the relocation entry in
arch/arm/lib/relocate.S.

Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
Cc: Tom Warren <twarren@nvidia.com>
Cc: York Sun <yorksun@freescale.com>
Cc: Hans De Goede <hdegoede@redhat.com>
Cc: Ian Campbell <ijc@hellion.org.uk>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Cc: Tom Rini <trini@konsulko.com>
Cc: Jan Kiszka <jan.kiszka@siemens.com>
Cc: Stefano Babic <sbabic@denx.de>
Acked-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
8 years agoARM: tegra: note that p2371-2180 is Jetson TX1
Stephen Warren [Thu, 12 Nov 2015 15:58:22 +0000 (08:58 -0700)] 
ARM: tegra: note that p2371-2180 is Jetson TX1

p2371-2180 is the engineering board name for the Jetson TX1 developer
kit. Update Kconfig description and help text to make this obvious to
everyone.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
8 years agogw_ventana: Remove empty reset_cpu()
Fabio Estevam [Tue, 3 Nov 2015 13:54:21 +0000 (11:54 -0200)] 
gw_ventana: Remove empty reset_cpu()

There is really no need to provide an empty reset_cpu() implementation,
so just remove it.

Cc: Tim Harvey <tharvey@gateworks.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Tim Harvey <tharvey@gateworks.com>
8 years agoot1200: Remove empty reset_cpu()
Fabio Estevam [Tue, 3 Nov 2015 00:21:35 +0000 (22:21 -0200)] 
ot1200: Remove empty reset_cpu()

There is really no need to provide an empty reset_cpu() implementation,
so just remove it.

Cc: Christian Gmeiner <christian.gmeiner@gmail.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Christian Gmeiner <christian.gmeiner@gmail.com>
8 years agonovena: Remove empty reset_cpu()
Fabio Estevam [Tue, 3 Nov 2015 00:21:34 +0000 (22:21 -0200)] 
novena: Remove empty reset_cpu()

There is really no need to provide an empty reset_cpu() implementation,
so just remove it.

Cc: Marek Vasut <marex@denx.de>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Marek Vasut <marex@denx.de>
8 years agomx6ul_14x14_evk: Remove empty reset_cpu()
Fabio Estevam [Tue, 3 Nov 2015 00:21:33 +0000 (22:21 -0200)] 
mx6ul_14x14_evk: Remove empty reset_cpu()

There is really no need to provide an empty reset_cpu() implementation,
so just remove it.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
8 years agomx6sxsabresd: Remove empty reset_cpu()
Fabio Estevam [Tue, 3 Nov 2015 00:21:32 +0000 (22:21 -0200)] 
mx6sxsabresd: Remove empty reset_cpu()

There is really no need to provide an empty reset_cpu() implementation,
so just remove it.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
8 years agomx6slevk: Remove empty reset_cpu()
Fabio Estevam [Tue, 3 Nov 2015 00:21:31 +0000 (22:21 -0200)] 
mx6slevk: Remove empty reset_cpu()

There is really no need to provide an empty reset_cpu() implementation,
so just remove it.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
8 years agomx6sabresd: Remove empty reset_cpu()
Fabio Estevam [Tue, 3 Nov 2015 00:21:30 +0000 (22:21 -0200)] 
mx6sabresd: Remove empty reset_cpu()

There is really no need to provide an empty reset_cpu() implementation,
so just remove it.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Reviewed-by: Stefano Babic <sbabic@denx.de>
8 years agoarm: imx: Switch mx6cuboxi to use config_distro_bootcmd.h.
Vagrant Cascadian [Tue, 27 Oct 2015 20:18:22 +0000 (13:18 -0700)] 
arm: imx: Switch mx6cuboxi to use config_distro_bootcmd.h.

This allows for more flexible and standardized boot across multiple
platforms.

Remove redundant legacy boot environment.

Cc: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Vagrant Cascadian <vagrant@debian.org>
8 years agoarm: imx: Switch Wandboard to use config_distro_bootcmd.h.
Vagrant Cascadian [Tue, 27 Oct 2015 19:49:40 +0000 (12:49 -0700)] 
arm: imx: Switch Wandboard to use config_distro_bootcmd.h.

This allows for more flexible and standardized boot across multiple
platforms.

Remove redundant legacy boot environment.

Signed-off-by: Vagrant Cascadian <vagrant@debian.org>
8 years agoTegra: T210: Add QSPI driver
Tom Warren [Mon, 12 Oct 2015 21:50:54 +0000 (14:50 -0700)] 
Tegra: T210: Add QSPI driver

This is the normal Tegra SPI driver modified to work with the
QSPI controller in Tegra210. It does not do 2x/4x transfers
or any other QSPI protocol.

Signed-off-by: Yen Lin <yelin@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
Reviewed-by: Jagan Teki <jteki@openedev.com>
8 years agoARM: tegra: rename GPU functions
Alexandre Courbot [Mon, 19 Oct 2015 04:57:03 +0000 (13:57 +0900)] 
ARM: tegra: rename GPU functions

Rename GPU functions to less generic names to avoid potential name
collisions.

Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
8 years agoARM: tegra: simplify GPU setup
Alexandre Courbot [Mon, 19 Oct 2015 04:57:02 +0000 (13:57 +0900)] 
ARM: tegra: simplify GPU setup

Enable the GPU node in the system-wide ft_system_setup() hook instead of
the board-specific ft_board_hook(). This allows us to enable GPU per SoC
generation instead of per-board as we did initially.

Reported-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
8 years agoARM: tegra: remove vpr_configured() function
Alexandre Courbot [Mon, 19 Oct 2015 04:57:01 +0000 (13:57 +0900)] 
ARM: tegra: remove vpr_configured() function

There is no justification for this function, especially in exported
form.

Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
8 years agoARM: tegra: error check Tegra210 XUSB padctl waits
Stephen Warren [Fri, 23 Oct 2015 16:50:53 +0000 (10:50 -0600)] 
ARM: tegra: error check Tegra210 XUSB padctl waits

Add code to detect timeouts when waiting for HW events such as PLL
lock done. Any errors are logged and trigger an error return code.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
8 years agoARM: tegra: add lane tables to Tegra210 XUSB padctl
Stephen Warren [Fri, 23 Oct 2015 16:50:52 +0000 (10:50 -0600)] 
ARM: tegra: add lane tables to Tegra210 XUSB padctl

Add the tables defining which pads and mux options exist in the Tegra210
XUSB padctl hardware.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
8 years agoARM: tegra: switch Tegra210 to common XUSB padctl
Stephen Warren [Fri, 23 Oct 2015 16:50:51 +0000 (10:50 -0600)] 
ARM: tegra: switch Tegra210 to common XUSB padctl

This change simply deletes code from the Tegra210 XUSB padctl driver that
is already present in the common XUSB padctl code. Since all the arrays
in tegra210_socdata are empty, this update may leave the Tegra210 XUSB
padctl driver non-functional at run-time. However, (a) this driver is not
used yet so no regression can be observed and (b) the next commit will
immediately fix this up.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
8 years agoARM: tegra: parameterize common XUSB code
Stephen Warren [Fri, 23 Oct 2015 16:50:50 +0000 (10:50 -0600)] 
ARM: tegra: parameterize common XUSB code

There are some differences between the Tegra124 and Tegra210 XUSB padctl
code. So far, the common XUSB padctl code only supports Tegra124. Add
some parameters etc. so that it can work for both chips.

This also allows moving Tegra124's process_nodes() into the common file;
something that would have requires edits during the move if done in the
previous commit.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
8 years agoARM: tegra: create common XUSB padctl driver file
Stephen Warren [Fri, 23 Oct 2015 16:50:49 +0000 (10:50 -0600)] 
ARM: tegra: create common XUSB padctl driver file

A fair amount of the XUSB padctl driver will be common between Tegra124
and Tegra210. To avoid cut/paste between the two chips, create a new
file that will contain the common code, and convert the Tegra124 code to
use it. This change doesn't move every last piece of code that can/will be
shared, but rather concentrates on moving code that can be moved with zero
changes, so there are no other diffs mixed in.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
8 years agoARM: tegra: clean up XUSB padctl error() calls
Stephen Warren [Fri, 23 Oct 2015 16:50:48 +0000 (10:50 -0600)] 
ARM: tegra: clean up XUSB padctl error() calls

This file defines pr_fmt(), so the individual error() calls don't need to
include the prefix in their format strings. Doing so results in duplicate
text in any error messages. Remove the duplication.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
8 years agoARM: tegra: rename dummy XUSB padctl implementation
Stephen Warren [Fri, 23 Oct 2015 16:50:47 +0000 (10:50 -0600)] 
ARM: tegra: rename dummy XUSB padctl implementation

A future patch will soon move some of the XUSB padctl code into a common
file in arch/arm/mach-tegra. Rename the existing dummy XUSB padctl file
to avoid conflicting with that, or being confusing.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
8 years agoARM: tegra: enable PCI support of p2371-2180
Stephen Warren [Mon, 5 Oct 2015 23:02:40 +0000 (17:02 -0600)] 
ARM: tegra: enable PCI support of p2371-2180

p2371-2180 has two PCI ports; a regular x4 slot and a x1 M.2 slot. This
patch adds the relevant DT to enable the PCI controller and configure
the XUSB padctl pin muxing, and code to turn on the PCI power and enable
PCI features in U-Boot. I have only tested the x4 slot.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
8 years agoARM: tegra: add PCI to Tegra210 SoC DT
Stephen Warren [Mon, 5 Oct 2015 23:02:39 +0000 (17:02 -0600)] 
ARM: tegra: add PCI to Tegra210 SoC DT

Tegra210's PCI controller is largely identical to Tegra124, and hence
shares the same binding. However, it has a unique compatible value due
to the existence of at least one new HW bug that would prevent any driver
for a previous HW version from operating correctly.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
8 years agopci: tegra: add/enable support for Tegra210
Stephen Warren [Mon, 5 Oct 2015 23:00:44 +0000 (17:00 -0600)] 
pci: tegra: add/enable support for Tegra210

This needs a separate compatible value from Tegra124 since the new HW
version has bugs that would prevent a driver for previous HW versions
from operating at all.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
8 years agopci: tegra: call tegra_pcie_board_init() earlier
Stephen Warren [Mon, 5 Oct 2015 23:00:43 +0000 (17:00 -0600)] 
pci: tegra: call tegra_pcie_board_init() earlier

The board PCI setup code may control regulators that are required simply
to bring up the PCI controller itself (or PLLs, IOs, ... it uses). Move
the call to this function earlier so that all board-provided resources
are ready early enough for everything to work.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
8 years agopci: tegra: implement PCA enable workaround
Stephen Warren [Mon, 5 Oct 2015 23:00:42 +0000 (17:00 -0600)] 
pci: tegra: implement PCA enable workaround

Tegra210's PCIe controller has a bug that requires the PCA (performance
counter) feature to be enabled. If this isn't done, accesses to device
configuration space will hang the chip for tens of seconds. Implement
the workaround.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
8 years agopci: tegra: use #address-/size-cells from DT
Stephen Warren [Mon, 5 Oct 2015 23:00:41 +0000 (17:00 -0600)] 
pci: tegra: use #address-/size-cells from DT

The number of cells used by each entry in the DT ranges property is
determined by the #address-cells/#size-cells properties. Fix the code
to respect this.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
8 years agopci: tegra: clip RAM size to 32-bits
Stephen Warren [Mon, 5 Oct 2015 23:00:40 +0000 (17:00 -0600)] 
pci: tegra: clip RAM size to 32-bits

Tegra peripherals can generally access a 32-bit physical address space,
and I believe this applies to PCIe. Clip the PCI region that refers to
DRAM so it fits into 32-bits to avoid issues.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
8 years agoARM: tegra210: implement PLLE init procedure from TRM
Stephen Warren [Mon, 5 Oct 2015 22:58:52 +0000 (16:58 -0600)] 
ARM: tegra210: implement PLLE init procedure from TRM

Implement the procedure that the TRM mandates to initialize PLLREFE and
PLLE. This makes the PLL actually lock.

Note that this section of the TRM is being cleaned up to remove some
confusion. The set of register accesses in this patch should be final,
although the step numbers/descriptions might still change.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
8 years agomx7dsabresd: enable DFU support
Tzu-Jung Lee [Tue, 27 Oct 2015 23:00:50 +0000 (23:00 +0000)] 
mx7dsabresd: enable DFU support

On the target board:

  => dfu 0 mmc 0

On the host PC:

  $ dfu-util -l

    Found DFU: [0525:a4a5] devnum=0, cfg=1, intf=0, alt=0, name="image"
    Found DFU: [0525:a4a5] devnum=0, cfg=1, intf=0, alt=1, name="u-boot"
    Found DFU: [0525:a4a5] devnum=0, cfg=1, intf=0, alt=2, name="bootimg"
    Found DFU: [0525:a4a5] devnum=0, cfg=1, intf=0, alt=3, name="rootfs"

  Update with a full SD image

  $ dfu-util -a image -D core-image-minimal-imx7dsabresd.sdcard

  Update u-boot only

  $ dfu-util -a u-boot -D u-boot.imx

Signed-off-by: Tzu-Jung Lee <roylee17@currantlabs.com>
Reviewed-by: Fabio Estevam <fabio.estevam@freescale.com>
8 years agoMerge git://git.denx.de/u-boot
Stefano Babic [Thu, 12 Nov 2015 16:13:26 +0000 (17:13 +0100)] 
Merge git://git.denx.de/u-boot

8 years agoMerge branch 'next' of git://git.denx.de/u-boot-blackfin
Tom Rini [Thu, 12 Nov 2015 15:48:13 +0000 (10:48 -0500)] 
Merge branch 'next' of git://git.denx.de/u-boot-blackfin

8 years agonios2: add 3c120 and 10m50 devboards MAINTAINERS
Thomas Chou [Tue, 10 Nov 2015 12:36:09 +0000 (20:36 +0800)] 
nios2: add 3c120 and 10m50 devboards MAINTAINERS

Add 3c120 and 10m50 devboards MAINTAINERS

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Acked-by: Marek Vasut <marex@denx.de>
8 years agonios2: change README.nios2 to use 10m50 as template
Thomas Chou [Tue, 10 Nov 2015 23:59:31 +0000 (07:59 +0800)] 
nios2: change README.nios2 to use 10m50 as template

The 10m50 devboard becomes the new golden reference design of
Nios II Linux. So change README.nios2 to use 10m50 as template.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Acked-by: Marek Vasut <marex@denx.de>
8 years agonios2: rename board nios2-generic to 3c120_devboard
Thomas Chou [Tue, 10 Nov 2015 23:56:04 +0000 (07:56 +0800)] 
nios2: rename board nios2-generic to 3c120_devboard

Rename board nios2-generic to 3c120_devboard. Since nios2 is
converted to driver model and device tree control of u-boot,
the nios2-generic board directory is removed. We can rename
the board back to a real board name. Now the boards maintained
in u-boot mainline are the same as Linux kernel, namely 3c120
and 10m50.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Reviewed-by: Marek Vasut <marex@denx.de>
Acked-by: Marek Vasut <marex@denx.de>
8 years agonios2: add 10m50 devboard support
Thomas Chou [Mon, 9 Nov 2015 06:45:06 +0000 (14:45 +0800)] 
nios2: add 10m50 devboard support

Add 10m50 devboard support. It is based on the Golden Hardware
Reference Design (GHRD), available at,

http://rocketboards.org/foswiki/view/Documentation/
AlteraMAX1010M50RevCDevelopmentKitLinuxSetup

Though we supported only one nios2-generic board in the past. Now,
with the removal of the nios2-generic board dir, adding new nios2
boards to u-boot is easier than before. It should be helpful to
add those boards supported in Linux mainline. There are only two
such nios2 boards, the 3c120 devboard and 10m50 devboard. The
nios2-generic is actually 3c120, and should restore the name. The
10m50 is this one.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Reviewed-by: Marek Vasut <marex@denx.de>
8 years agonet: altera_tse: add mSG-DMA support
Thomas Chou [Mon, 9 Nov 2015 06:36:29 +0000 (14:36 +0800)] 
net: altera_tse: add mSG-DMA support

The Modular Scatter-Gather DMA core is a new DMA core to work
with the Altera Triple-Speed Ethernet MegaCore. It replaces the
legacy Scatter-Gather Direct Memory Access (SG-DMA) controller
core. Please find details on the "Embedded Peripherals IP User
Guide" of Altera.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Reviewed-by: Marek Vasut <marex@denx.de>
8 years agonet: altera_tse: add priv ops to prepare msgdma support
Thomas Chou [Mon, 9 Nov 2015 03:02:15 +0000 (11:02 +0800)] 
net: altera_tse: add priv ops to prepare msgdma support

Add priv ops to prepare msgdma support. These ops are dma type
specific.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Reviewed-by: Marek Vasut <marex@denx.de>
8 years agonet: altera_tse: wait sgdma in altera_tse_recv
Thomas Chou [Mon, 9 Nov 2015 00:00:00 +0000 (08:00 +0800)] 
net: altera_tse: wait sgdma in altera_tse_recv

Move the sgdma wait from free_pkt to recv. This is the proper
place to wait recv sgdma done.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Reviewed-by: Marek Vasut <marex@denx.de>
8 years agonet: altera_tse: factor out stop mac func
Thomas Chou [Sun, 8 Nov 2015 02:57:05 +0000 (10:57 +0800)] 
net: altera_tse: factor out stop mac func

Factor out the stop mac function to prepare msgdma support.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Reviewed-by: Marek Vasut <marex@denx.de>
8 years agonet: zap altera_tse_initialize prototypes
Thomas Chou [Sun, 8 Nov 2015 03:04:49 +0000 (11:04 +0800)] 
net: zap altera_tse_initialize prototypes

Zap the altera_tse_initialize() prototypes, since it is converted
to driver model.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Reviewed-by: Marek Vasut <marex@denx.de>
8 years agonios2: nios2-generic: do not allocate rx buf in net.c
Thomas Chou [Thu, 5 Nov 2015 08:37:33 +0000 (16:37 +0800)] 
nios2: nios2-generic: do not allocate rx buf in net.c

Do not allocate rx buf in net.c, because altera_tse allocates
its own rx buf in driver. This can save 6KB memory.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
8 years agomtd: add altera quadspi driver
Thomas Chou [Mon, 9 Nov 2015 06:56:02 +0000 (14:56 +0800)] 
mtd: add altera quadspi driver

Add Altera Generic Quad SPI Controller support. The controller
converts SPI NOR flash to parallel flash interface. So it is
not like other SPI flash, but rather like CFI flash.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
8 years agonios2: add memcpy_fromio and memcpy_toio
Thomas Chou [Thu, 5 Nov 2015 07:09:57 +0000 (15:09 +0800)] 
nios2: add memcpy_fromio and memcpy_toio

Add memcpy_fromio() and memcpy_toio().

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
8 years agonios2: use cfi flash driver model
Thomas Chou [Wed, 28 Oct 2015 07:10:39 +0000 (15:10 +0800)] 
nios2: use cfi flash driver model

Use cfi flash driver model.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
8 years agocfi_flash: convert to driver model
Thomas Chou [Sat, 7 Nov 2015 06:31:08 +0000 (14:31 +0800)] 
cfi_flash: convert to driver model

Convert cfi flash to driver model.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agodm: implement a MTD uclass
Thomas Chou [Sat, 7 Nov 2015 06:20:31 +0000 (14:20 +0800)] 
dm: implement a MTD uclass

Implement a Memory Technology Device (MTD) uclass. It should
include most flash drivers in the future. Though no uclass ops
are defined yet, the MTD ops could be used.

The NAND flash driver is based on MTD. The CFI flash and SPI
flash support MTD, too. It should make sense to convert them
to MTD uclass.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
8 years agoARM: uniphier: drop UniPhier specific SMP code
Masahiro Yamada [Fri, 6 Nov 2015 13:16:30 +0000 (22:16 +0900)] 
ARM: uniphier: drop UniPhier specific SMP code

The latest Linux can directly handle SMP operations for UniPhier SoCs
without any help of U-boot.  Drop the relevant code from U-boot.

See commit b1e4006aeda8c8784029de17d47987c21ea75f6d ("ARM: uniphier:
rework SMP operations to use trampoline code") in Linux Kernel.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoARM: dts: uniphier: add USB xHCI nodes for PH1-Pro5 and ProXstream2
Masahiro Yamada [Wed, 4 Nov 2015 12:56:07 +0000 (21:56 +0900)] 
ARM: dts: uniphier: add USB xHCI nodes for PH1-Pro5 and ProXstream2

This makes USB3.0 available on new SoCs/boards.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agoARM: dts: uniphier: fix interrupt number of USB core for PH1-Pro4
Masahiro Yamada [Wed, 4 Nov 2015 12:56:06 +0000 (21:56 +0900)] 
ARM: dts: uniphier: fix interrupt number of USB core for PH1-Pro4

The IRQ is not used in U-Boot, but this would be useful to sync
device trees between Linux and U-Boot.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoMerge branch 'master' of git://git.denx.de/u-boot-arm
Tom Rini [Tue, 10 Nov 2015 18:38:08 +0000 (13:38 -0500)] 
Merge branch 'master' of git://git.denx.de/u-boot-arm

8 years agoARM: tegra: enable CONFIG_SYS_NONCACHED_MEMORY everywhere
Stephen Warren [Mon, 5 Oct 2015 18:09:02 +0000 (12:09 -0600)] 
ARM: tegra: enable CONFIG_SYS_NONCACHED_MEMORY everywhere

Now that we have solved the problems that prevented this feature from
being enabled, enable it everywhere.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
8 years agoARM: tegra: add custom MMU setup on ARMv8
Stephen Warren [Mon, 5 Oct 2015 18:09:01 +0000 (12:09 -0600)] 
ARM: tegra: add custom MMU setup on ARMv8

This sets up a fine-grained page table, which is a requirement for
noncached_init() to operate correctly.

MMU setup code currently exists in a number of places:
- A version in the core ARMv8 support code that sets up page tables that
use very large block sizes that CONFIG_SYS_NONCACHED_MEMORY doesn't
support.
- Enhanced versions for fsl-lsch3 and zynmq that set up finer grained
page tables.

Ideally, rather than duplicating the MMU setup code yet again this patch
would instead consolidate all the different routines into the core ARMv8
code so that it supported all use-cases. However, this will require
significant effort since there appear to be a number of discrepancies[1]
between different versions of the code, and between the defines/values by
some copies of the MMU setup code use and the architectural MMU
documentation. Some reverse engineering will be required to determine the
intent of the current code.

[1] For example, in the core ARMv8 MMU setup code, three defines named
TCR_EL[123]_IPS_BITS exist, but only one of them sets the IPS field and
the others set a different field (T1SZ) in the page tables. As far as I
can tell so far, there should be no need to set different values per
exception level nor to modify the T1SZ field at all, since TTBR1 shouldn't
be enabled anyway. Another example is inconsistent values for *_VA_BITS
between the current core ARMv8 MMU setup code and the various SoC-
specific MMU setup code. Another example is that asm/armv8/mmu.h's value
for SECTION_SHIFT doesn't match asm/system.h's MMU_SECTION_SHIFT;
research is needed to determine which code relies on which of those
values and why, and whether fixing the incorrect value will cause any
regression.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
8 years agoarmv8: allow custom MMU setup routines on ARMv8
Stephen Warren [Mon, 5 Oct 2015 18:09:00 +0000 (12:09 -0600)] 
armv8: allow custom MMU setup routines on ARMv8

In order for noncached_init() to operate correctly, SoCs must set up a
custom page table with fine-grained (2MiB) sections, which can be
configured from noncached_init().

This is currently performed by arch/arm/cpu/armv8/{fsl-lsch3,zynqmp}/cpu.c
by cut/pasting and re-implementing mmu_setup, enable_caches(), etc. There
are some other reasons for the duplication there though, such as enabling
icache early, and enabling dcaching earlier with a different configuration.

This change makes mmu_setup() a weak implementation, so that the MMU setup
code can be replaced without having to duplicate other code that calls it.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
8 years agoarmv8: enable compilation with CONFIG_SYS_NONCACHED_MEMORY
Stephen Warren [Mon, 5 Oct 2015 18:08:59 +0000 (12:08 -0600)] 
armv8: enable compilation with CONFIG_SYS_NONCACHED_MEMORY

The implementation of noncached_init() uses define MMU_SECTION_SIZE.
Define this on ARM64.

Move the prototype of noncached_{init,alloc}() to a location that
doesn't depend on !defined(CONFIG_ARM64).

Note that noncached_init() calls mmu_set_region_dcache_behaviour() which
relies on something having set up translation tables with 2MB block size.
The core ARMv8 MMU setup code does not do this by default, but currently
relies on SoC specific MMU setup code. Be aware of this before enabling
this feature on your platform!

Signed-off-by: Stephen Warren <swarren@nvidia.com>
8 years agols1043ardb: Add missing config entries to MAINTAINERS
Fabio Estevam [Tue, 10 Nov 2015 15:41:03 +0000 (13:41 -0200)] 
ls1043ardb: Add missing config entries to MAINTAINERS

ls1043ardb_nand_defconfig and ls1043ardb_sdcard_defconfig are missing
in the MAINTAINERS file, so add them for completeness.

Reported-by: Albert Aribaud <albert.u.boot@aribaud.net>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Reviewed-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
8 years agoboard/ti: Update MAINTAINERS entries with more boards
Tom Rini [Tue, 10 Nov 2015 14:14:38 +0000 (09:14 -0500)] 
board/ti: Update MAINTAINERS entries with more boards

A few config files have been added without updating MAINTAINERS.

Reported-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agoarm: stm32f4: fix a bug when a random sector gets erased
Vadzim Dambrouski [Fri, 23 Oct 2015 18:14:07 +0000 (21:14 +0300)] 
arm: stm32f4: fix a bug when a random sector gets erased

Old sector number is not being cleared from FLASH_CR register. For example
when first erased sector was 001 and then you want to erase sector 010,
sector 011 gets erased instead.
This patch clears old sector number from FLASH_CR register before a new
one is written.

Signed-off-by: Vadzim Dambrouski <pftbest@gmail.com>
8 years agoarm: stm32f4: fix a bug when only first sector gets erased
Vadzim Dambrouski [Fri, 23 Oct 2015 18:14:06 +0000 (21:14 +0300)] 
arm: stm32f4: fix a bug when only first sector gets erased

flash_lock call is inside a for loop, so after the first iteration flash
is locked and no more sectors can be erased.
Move flash_lock out of the loop.

Signed-off-by: Vadzim Dambrouski <pftbest@gmail.com>
8 years agopowerpc: Finish updating u-boot*lds scripts for newer binutils
Tom Rini [Tue, 10 Nov 2015 14:16:52 +0000 (09:16 -0500)] 
powerpc: Finish updating u-boot*lds scripts for newer binutils

In 522b021 we dropped 'PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4)' lines in
the mpc85xx linker scripts as this is not required and breaks newer
binutils.  This commit cleans up the rest of the powerpc linker scripts.

Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agoboard/ti: Update MAINTAINERS entries with more boards
Tom Rini [Tue, 10 Nov 2015 14:13:55 +0000 (09:13 -0500)] 
board/ti: Update MAINTAINERS entries with more boards

A few config files have been added without updating MAINTAINERS.

Reported-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agoVarious Makefiles: Add SPDX-License-Identifier tags
Tom Rini [Tue, 10 Nov 2015 01:06:16 +0000 (01:06 +0000)] 
Various Makefiles: Add SPDX-License-Identifier tags

After consulting with some of the SPDX team, the conclusion is that
Makefiles are worth adding SPDX-License-Identifier tags too, and most of
ours have one.  This adds tags to ones that lack them and converts a few
that had full (or in one case, very partial) license blobs into the
equivalent tag.

Cc: Kate Stewart <kstewart@linuxfoundation.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agoRevive OpenRD targets
Albert ARIBAUD [Fri, 23 Oct 2015 16:06:43 +0000 (18:06 +0200)] 
Revive OpenRD targets

Revert commit 7a2c1b13 which dropped OpenRD boards.
Assume maintainership of OpenRD.
Remove OpenRD from scrapyard.
Switch OpenRD to generic board.
Switch to Thumb build.

Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
8 years agokirkwood: support CONFIG_SYS_THUMB_BUILD
Albert ARIBAUD [Fri, 23 Oct 2015 16:06:42 +0000 (18:06 +0200)] 
kirkwood: support CONFIG_SYS_THUMB_BUILD

Kirkwood files cpu.c and cache.c cannot build in Thumb state;
force them in ARM state even under CONFIG_SYS_THUMB_BUILD.

Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
8 years agotricorder: switch to CONFIG_SYS_THUMB_BUILD
Albert ARIBAUD [Fri, 23 Oct 2015 16:06:41 +0000 (18:06 +0200)] 
tricorder: switch to CONFIG_SYS_THUMB_BUILD

The tricorder and tricorder_flash boards have grown too big.
Reduce their size by building them with CONFIG_SYS_THUMB_BUILD.

Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
8 years agoarm: support Thumb-1 with CONFIG_SYS_THUMB_BUILD
Albert ARIBAUD [Fri, 23 Oct 2015 16:06:40 +0000 (18:06 +0200)] 
arm: support Thumb-1 with CONFIG_SYS_THUMB_BUILD

When building a Thumb-1-only target with CONFIG_SYS_THUMB_BUILD,
some files fail to build, most of the time because they include
mcr instructions, which only exist for Thumb-2.

This patch introduces a Kconfig option CONFIG_THUMB2 and uses
it to select between Thumb-2 and ARM mode for the aforementioned
files.

Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
8 years agostm32f429-discovery: add CONFIG_SYS_THUMB_BUILD
Albert ARIBAUD [Fri, 23 Oct 2015 16:06:39 +0000 (18:06 +0200)] 
stm32f429-discovery: add CONFIG_SYS_THUMB_BUILD

This target is ARMv7-M therefore can only build for Thumb,
but it did not #define CONFIG_SYS_THUMB_BUILD, so the U-Boot
code did not know it had to build for Thumb(2), not ARM.

This patch is binary-invariant: builds of stm32f429-discovery
with and without this patch were compared and found to differ
only by their U-Boot version strings.

Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
8 years agoarm: fix compile warnings when semihosting is enabled on ARMv7M target.
Vadzim Dambrouski [Mon, 19 Oct 2015 16:40:15 +0000 (19:40 +0300)] 
arm: fix compile warnings when semihosting is enabled on ARMv7M target.

This patch fixes compile warnings like this:

warning: format '%lu' expects argument of type 'long unsigned int',
         but argument 5 has type 'size_t'

In C99 standard you can use %zu modifier to print size_t values.

Signed-off-by: Vadzim Dambrouski <pftbest@gmail.com>
8 years agoarm: add support for semihosting for ARMv7M targets
Vadzim Dambrouski [Mon, 19 Oct 2015 16:40:14 +0000 (19:40 +0300)] 
arm: add support for semihosting for ARMv7M targets

If you enable CONFIG_SEMIHOSTING for STM32F429 target, you will get compile
error looking like this:

arch/arm/lib/semihosting.c: In function 'smh_read':
{standard input}: Assembler messages:
{standard input}:34: Error: invalid swi expression
{standard input}:34: Error: value of 1193046 too large for field of 2 bytes at 0
scripts/Makefile.build:277: recipe for target 'arch/arm/lib/semihosting.o' failed

The source of the problem is "svc #0x123456" instruction. This instruction
can not be encoded using Thumb2 instruction set used by ARMv7M CPUs.
ARM documentation suggests using "bkpt #0xAB" instruction instead [1].
This patch fixes compile errors and adds support for semihosting for
STM32F429 or any other ARMv7M target.
This change was sested on STM32F429-DISCOVERY board using OpenOCD and
"smhload" u-boot command.

[1] http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0471c/Bgbjhiea.html

Signed-off-by: Vadzim Dambrouski <pftbest@gmail.com>
8 years agompc85xx/u-boot*.lds: remove _GLOBAL_OFFSET_TABLE_ definition
Zhenhua Luo [Sun, 25 Oct 2015 05:02:28 +0000 (10:32 +0530)] 
mpc85xx/u-boot*.lds: remove _GLOBAL_OFFSET_TABLE_ definition

In binutils-2.25, the _GLOBAL_OFFSET_TABLE_ symbols defined by PROVIDE in
u-boot.lds overrides the linker built-in symbols
(https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commitdiff;
h=b893397a4b1316610f49819344817715e4305de9),
so the linker is treating _GLOBAL_OFFSET_TABLE_ as a definition into the
.reloc section.

To align with the change of binutils-2.25, the _GLOBAL_OFFSET_TABLE_ symbol
should not be defined in sections, and the symbols in linker generated .got
section should be used(https://sourceware.org/ml/binutils/2008-09/
msg00122.html)

Fixed the following build errors with binutils-2.25:
| powerpc-poky-linux-gnuspe-ld.bfd: _GLOBAL_OFFSET_TABLE_ not defined in
linker created .got

Signed-off-by: Zhenhua Luo <zhenhua.luo@freescale.com>
Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
8 years agoReplace "extern inline" with "static inline"
Måns Rullgård [Fri, 6 Nov 2015 12:44:01 +0000 (12:44 +0000)] 
Replace "extern inline" with "static inline"

A number of headers define functions as "extern inline" which is
causing problems with gcc5.  The reason is that starting with
version 5.1, gcc defaults to the standard C99 semantics for the
inline keyword.

Under the traditional GNU inline semantics, an "extern inline"
function would never create an external definition, the same
as inline *without* extern in C99.  In C99, and "extern inline"
definition is simply an external definition with an inline hint.
In short, the meanings of inline with and without extern are
swapped between GNU and C99.

The upshot is that all these definitions in header files create
an external definition wherever those headers are included,
resulting in multiple definition errors at link time.

Changing all these functions to "static inline" fixes the problem
since this works as desired in all gcc versions.  Although the
semantics are slightly different (a static inline definition may
result in an actual function being emitted), it works as intended
in practice.

This patch also removes extern prototype declarations for the
changed functions where they existed.

Signed-off-by: Mans Rullgard <mans@mansr.com>
8 years agoARM64: zynqmp: Sync zynq_sdhci_init() declaration
Michal Simek [Thu, 5 Nov 2015 16:06:29 +0000 (17:06 +0100)] 
ARM64: zynqmp: Sync zynq_sdhci_init() declaration

This patch fix compilation error:
drivers/mmc/zynq_sdhci.c:16:5: error: conflicting types for
‘zynq_sdhci_init’
 int zynq_sdhci_init(phys_addr_t regbase)
     ^
In file included from drivers/mmc/zynq_sdhci.c:14:0:
./arch/arm/include/asm/arch/sys_proto.h:16:5: note: previous declaration
of ‘zynq_sdhci_init’ was here
 int zynq_sdhci_init(unsigned long regbase);
     ^

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agoMerge branch 'master' of git://git.denx.de/u-boot-nios
Tom Rini [Fri, 6 Nov 2015 14:21:33 +0000 (09:21 -0500)] 
Merge branch 'master' of git://git.denx.de/u-boot-nios

8 years agoMerge branch 'master' of git://git.denx.de/u-boot-mips
Tom Rini [Fri, 6 Nov 2015 14:17:17 +0000 (09:17 -0500)] 
Merge branch 'master' of git://git.denx.de/u-boot-mips

8 years agoMIPS: bootm: use CONFIG_IS_ENABLED() everywhere
Daniel Schwierzeck [Sun, 1 Nov 2015 16:36:15 +0000 (17:36 +0100)] 
MIPS: bootm: use CONFIG_IS_ENABLED() everywhere

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoMIPS: bootm: rework and fix broken bootm code
Daniel Schwierzeck [Sun, 1 Nov 2015 16:36:14 +0000 (17:36 +0100)] 
MIPS: bootm: rework and fix broken bootm code

The move to 'generic board' as well as changes in the generic
bootm code broke the boot of FIT uImage's. Especially uImage's
with additional initramfs images or FDT's do not work anymore.

Refactor the bootm code to work again with the generic bootm code.

Always relocate ramdisk and FDT in step 'bootm prep' because the
generic bootm code does this only for legacy uImage's.

Move the step 'bootm cmdline' to 'bootm prep' because the Linux
kernel parameters rd_start and rd_size have to be initialized after
the relocation of the ramdisk.

Furthermore support the step 'bootm fake'.

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agocommon/board_f: enable setup_board_part1() for MIPS
Daniel Schwierzeck [Sun, 1 Nov 2015 16:36:13 +0000 (17:36 +0100)] 
common/board_f: enable setup_board_part1() for MIPS

The variables bd_t:bi_memstart and bd_t:bi_memsize have to be
initialized also on MIPS. Otherwise LMB and cmd_bdinfo do not
correctly work. This currently breaks the booting of FIT images
on MIPS. Enable the board_init_f hook setup_board_part1()
for MIPS to fix this.

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agonet: altera_tse: get numbers of fdt address and size cells
Thomas Chou [Fri, 6 Nov 2015 01:37:17 +0000 (09:37 +0800)] 
net: altera_tse: get numbers of fdt address and size cells

Get numbers of fdt address and size cells in altera_tse_probe(),
thereby remove the assumption of one address cell and one size
cell.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
8 years agonet: altera_tse: use BIT macro
Thomas Chou [Fri, 6 Nov 2015 01:37:08 +0000 (09:37 +0800)] 
net: altera_tse: use BIT macro

Replace numerical bit shift with BIT macro
in altera_tse

:%s/(1 << nr)/BIT(nr)/g
where nr = 0, 1, 2 .... 31

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Reviewed-by: Marek Vasut <marex@denx.de>
Reviewed-by: Chin Liang See <clsee@altera.com>
Reviewed-by: Jagan Teki <jteki@openedev.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
8 years agonet: altera_tse: remove the useless parenthesis
Thomas Chou [Fri, 6 Nov 2015 01:36:52 +0000 (09:36 +0800)] 
net: altera_tse: remove the useless parenthesis

Remove the useless parenthesis.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Reviewed-by: Marek Vasut <marex@denx.de>
Reviewed-by: Chin Liang See <clsee@altera.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
8 years agonet: altera_tse: fix packed and aligned attribute
Thomas Chou [Fri, 6 Nov 2015 01:36:41 +0000 (09:36 +0800)] 
net: altera_tse: fix packed and aligned attribute

Fix packed and aligned attribute warnings.

WARNING: __packed is preferred over __attribute__((packed))
#14: FILE: drivers/net/altera_tse.h:14:
+#define __packed_1_    __attribute__ ((packed, aligned(1)))

WARNING: __aligned(size) is preferred over
__attribute__((aligned(size)))
#14: FILE: drivers/net/altera_tse.h:14:
+#define __packed_1_    __attribute__ ((packed, aligned(1)))

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Reviewed-by: Marek Vasut <marex@denx.de>
Reviewed-by: Chin Liang See <clsee@altera.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
8 years agonet: altera_tse: use data type u32 for regs and desc
Thomas Chou [Fri, 6 Nov 2015 01:36:26 +0000 (09:36 +0800)] 
net: altera_tse: use data type u32 for regs and desc

Use data type u32/u16/u8 for regs and desc, as it is more
portable.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Reviewed-by: Marek Vasut <marex@denx.de>
Reviewed-by: Chin Liang See <clsee@altera.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
8 years agonet: altera_tse: remove unused macro and regs def
Thomas Chou [Fri, 6 Nov 2015 01:36:06 +0000 (09:36 +0800)] 
net: altera_tse: remove unused macro and regs def

Remove unused macro and regs def.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Reviewed-by: Marek Vasut <marex@denx.de>
Reviewed-by: Chin Liang See <clsee@altera.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
8 years agonios2: trim CONFIG_SYS_MEMTEST_END
Thomas Chou [Wed, 4 Nov 2015 05:25:20 +0000 (13:25 +0800)] 
nios2: trim CONFIG_SYS_MEMTEST_END

Trim CONFIG_SYS_MEMTEST_END location.

CONFIG_SYS_MONITOR_LEN
  Reserving 256k for U-Boot at: d7fc0000
CONFIG_ENV_SIZE
CONFIG_SYS_MALLOC_LEN
  Reserving 256k for malloc() at: d7f80000
0x10000 for the rest
  Reserving 68 Bytes for Board Info at: d7f7ffbc
  Reserving 208 Bytes for Global Data at: d7f7feec
  Reserving 12000 Bytes for FDT at: d7f7d00c
  Stack

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
8 years agonios2: trim CONFIG_SYS_MALLOC_LEN
Thomas Chou [Wed, 4 Nov 2015 05:28:29 +0000 (13:28 +0800)] 
nios2: trim CONFIG_SYS_MALLOC_LEN

Trim CONFIG_SYS_MALLOC_LEN size, because CONFIG_ENV_SIZE
is included to total memory allocation in common.h,

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Reviewed-by: Chin Liang See <clsee@altera.com>