]> git.kernelconcepts.de Git - karo-tx-uboot.git/log
karo-tx-uboot.git
8 years agoboard/BuR/kwb: Support booting Linux
Hannes Petermaier [Tue, 3 Feb 2015 12:22:40 +0000 (13:22 +0100)]
board/BuR/kwb: Support booting Linux

For series testing purpose we need to boot some linux, therefore we enable
the needed features

- bootz
- devicetree

Signed-off-by: Hannes Petermaier <oe5hpm@oevsv.at>
8 years agoboard/BuR/kwb: switch to board HW-Rev3
Hannes Petermaier [Tue, 3 Feb 2015 12:22:39 +0000 (13:22 +0100)]
board/BuR/kwb: switch to board HW-Rev3

The board has been redesigned, therefore we need from now other I/O Pins to
mux and handle.

Older boards aren't supported from now anymore.

Signed-off-by: Hannes Petermaier <oe5hpm@oevsv.at>
8 years agoboard/BuR/tseries: cosmetic changes
Hannes Petermaier [Tue, 3 Feb 2015 12:22:38 +0000 (13:22 +0100)]
board/BuR/tseries: cosmetic changes

remove unnary '#define ETHLED_ORANGE (96+16) /* GPIO3_16 */'

Signed-off-by: Hannes Petermaier <oe5hpm@oevsv.at>
8 years agoboard/BuR/tseries: Rework default-environment settings.
Hannes Petermaier [Tue, 3 Feb 2015 12:22:37 +0000 (13:22 +0100)]
board/BuR/tseries: Rework default-environment settings.

Due to several changes of the boot-process we've redesigned the default-
environment settings completly.

Signed-off-by: Hannes Petermaier <oe5hpm@oevsv.at>
8 years agoboard/BuR/common: Add support for displaying BMP on LCD
Hannes Petermaier [Tue, 3 Feb 2015 12:22:36 +0000 (13:22 +0100)]
board/BuR/common: Add support for displaying BMP on LCD

Customer wants to display some logo very quickly after power on, so we support
from now loading a compressed bmp.gz to the screen.

Signed-off-by: Hannes Petermaier <oe5hpm@oevsv.at>
8 years agoboard/BuR/common: Enable CONFIG_CMD_TIME
Hannes Petermaier [Tue, 3 Feb 2015 12:22:35 +0000 (13:22 +0100)]
board/BuR/common: Enable CONFIG_CMD_TIME

time measurement of u-boot commands is needed very often during development.
We add this feature until development is completed. Maybe forever :)

Signed-off-by: Hannes Petermaier <oe5hpm@oevsv.at>
8 years agoboard/BuR/common: Introduce Network Console and common environment for it
Hannes Petermaier [Tue, 3 Feb 2015 12:22:34 +0000 (13:22 +0100)]
board/BuR/common: Introduce Network Console and common environment for it

It is often necessary to "break in" into boards bootloader commandline if
something fails or even for development purposes some parameters have to be
changed.

So we enable u-boot's CONFIG_NETCONSOLE feature.
We also modify Networksettings to apply with this new use-case.

Signed-off-by: Hannes Petermaier <oe5hpm@oevsv.at>
8 years agoboard/BuR/tseries: Chg Pinmux - enable UART1 pins
Hannes Petermaier [Tue, 3 Feb 2015 12:22:33 +0000 (13:22 +0100)]
board/BuR/tseries: Chg Pinmux - enable UART1 pins

Signed-off-by: Hannes Petermaier <oe5hpm@oevsv.at>
8 years agoboard/BuR/tseries: Chg pinmux - use free NAND Pins in non NAND-config as GPIO
Hannes Petermaier [Tue, 3 Feb 2015 12:22:32 +0000 (13:22 +0100)]
board/BuR/tseries: Chg pinmux - use free NAND Pins in non NAND-config as GPIO

On boards were we have no NAND-flash soldered, we want to use those free pins
as regular gpio.

Signed-off-by: Hannes Petermaier <oe5hpm@oevsv.at>
8 years agoboard/BuR/tseries: Change pinmux for GPIO2_28 from GPIO to PWM-Timeroutput
Hannes Petermaier [Tue, 3 Feb 2015 12:22:31 +0000 (13:22 +0100)]
board/BuR/tseries: Change pinmux for GPIO2_28 from GPIO to PWM-Timeroutput

Signed-off-by: Hannes Petermaier <oe5hpm@oevsv.at>
8 years agoboard/BuR/tseries: Enable EXT4 support
Hannes Petermaier [Tue, 3 Feb 2015 12:22:30 +0000 (13:22 +0100)]
board/BuR/tseries: Enable EXT4 support

Signed-off-by: Hannes Petermaier <oe5hpm@oevsv.at>
8 years agoboard/BuR/tseries: Enable U-Boot BOOTCOUNT feature
Hannes Petermaier [Tue, 3 Feb 2015 12:22:29 +0000 (13:22 +0100)]
board/BuR/tseries: Enable U-Boot BOOTCOUNT feature

Signed-off-by: Hannes Petermaier <oe5hpm@oevsv.at>
8 years agoboard/BuR/tseries: Enable HW-Watchdog
Hannes Petermaier [Tue, 3 Feb 2015 12:22:28 +0000 (13:22 +0100)]
board/BuR/tseries: Enable HW-Watchdog

Signed-off-by: Hannes Petermaier <oe5hpm@oevsv.at>
8 years agoboard/BuR/common: try to setup cpsw mac-address from the devicetree
Hannes Petermaier [Tue, 3 Feb 2015 12:22:27 +0000 (13:22 +0100)]
board/BuR/common: try to setup cpsw mac-address from the devicetree

since we have a dtb blob programmed on the board we try to setup the cpsw
interface with the programmed mac.
If this method fails, we fall back to the device-fuses.

Signed-off-by: Hannes Petermaier <oe5hpm@oevsv.at>
8 years agoboard/BuR/common: Take usage of am335x LCD-Display
Hannes Petermaier [Tue, 3 Feb 2015 12:22:26 +0000 (13:22 +0100)]
board/BuR/common: Take usage of am335x LCD-Display

a summary screen to the lcd.
Values are taken from environment and or devicetree blob.

Signed-off-by: Hannes Petermaier <oe5hpm@oevsv.at>
8 years agocommon/lcd: Add command for writing to lcd-display
Hannes Petermaier [Tue, 3 Feb 2015 12:22:25 +0000 (13:22 +0100)]
common/lcd: Add command for writing to lcd-display

Sometimes we do not want redirect u-boot's console to screen but anyway we want
write out some status information out of a u-boot script to the display.

So we cannot use the normal "echo ....", instead we write explicitly using
"lcdputs ..." for writing to the actual cursor position on LCD.

Signed-off-by: Hannes Petermaier <oe5hpm@oevsv.at>
8 years agocommon/lcd: Add command for setting cursor within lcd-console
Hannes Petermaier [Tue, 3 Feb 2015 12:22:24 +0000 (13:22 +0100)]
common/lcd: Add command for setting cursor within lcd-console

Sometimes we do not want redirect u-boot's console to screen but anyway we want
write out some status information out of a u-boot script to the display.

To define the specific position of the string to be written, we have to set
the cursor with "setcurs" before writing.

Signed-off-by: Hannes Petermaier <oe5hpm@oevsv.at>
8 years agodrivers/video/am335x-fb: Add possibility to wait for stable power/picture
Hannes Petermaier [Tue, 3 Feb 2015 12:22:23 +0000 (13:22 +0100)]
drivers/video/am335x-fb: Add possibility to wait for stable power/picture

Often on boards exists a circuit which switches power on/off to LCD display.
Due to the need of limiting the in-rush current the output voltage from this
circuit rises "slowly", so it is necessary to wait a bit (VCC ramp up time)
before starting output on LCD-pins.
This time is specified in <n> ms within the panel-settings, called "pup_delay"

Further some LCDs need a couple of frames to stabilize the image on it.
We have now the possibility to wait some time after starting output on LCD.
This time is also specified in <n> ms within panel-settings, called "pon_delay"

Signed-off-by: Hannes Petermaier <oe5hpm@oevsv.at>
8 years agoarm: spear: Move to generic board support
Stefan Roese [Tue, 3 Feb 2015 07:27:21 +0000 (08:27 +0100)]
arm: spear: Move to generic board support

Without this change the board support for these SPEAr boards would
be dropped soon. Generic board support seems to work just fine.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Viresh Kumar <viresh.kumar@linaro.org>
Cc: Vipin Kumar <vk.vipin@gmail.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
8 years agobuildman: Add a space before the list of boards
Simon Glass [Fri, 6 Feb 2015 05:06:11 +0000 (22:06 -0700)]
buildman: Add a space before the list of boards

Tweak the output slightly so we don't get things like:

   - board1 board2+  board3 board4

There should be a space before the '+'.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agobuildman: Correct toolchain download feature
Simon Glass [Tue, 3 Mar 2015 00:05:15 +0000 (17:05 -0700)]
buildman: Correct toolchain download feature

Commit d908898 updated the ScanPath() function but not its documentation
and not all its callers.

This breaks the toolchain check after it is downloaded. Fix it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Heiko Schocher <hs@denx.de>
8 years agodreamplug: set CONFIG_BUILD_TARGET to build u-boot.kwb
Ian Campbell [Tue, 24 Feb 2015 08:38:57 +0000 (08:38 +0000)]
dreamplug: set CONFIG_BUILD_TARGET to build u-boot.kwb

Saves having to remember to ask make for it explicitly.

Signed-off-by: Ian Campbell <ijc@hellion.org.uk>
Acked-By: Prafulla Wadaskar <prafulla@marvell.com>
8 years agodreamplug: switch to GENERIC_BOARD
Ian Campbell [Tue, 24 Feb 2015 08:38:56 +0000 (08:38 +0000)]
dreamplug: switch to GENERIC_BOARD

Built and booted to a Linux prompt with no issues discovered. network and usb
access to the external mmc are ok. (my internal mmc is knackered at the h/w
level).

Signed-off-by: Ian Campbell <ijc@hellion.org.uk>
Acked-By: Prafulla Wadaskar <prafulla@marvell.com>
8 years agokwbimage: align v1 binary header to 4B
Chris Packham [Sun, 22 Feb 2015 22:25:20 +0000 (11:25 +1300)]
kwbimage: align v1 binary header to 4B

According to the Armada-XP documentation the binary header format
requires the header length to be aligned to 4B.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
Acked-by: Stefan Roese <sr@denx.de>
Acked-by: Prafulla Wadaskar <prafulla@marvell.com>
8 years agoarm: aspenite: convert to generic board
Ajay Bhargav [Mon, 16 Feb 2015 15:04:48 +0000 (16:04 +0100)]
arm: aspenite: convert to generic board

Enable CONFIG_SYS_GENERIC_BOARD for Marvell Aspenite.

Signed-off-by: Ajay Bhargav <ajay.bhargav@einfochips.com>
Acked-by: Prafulla Wadaskar <prafulla@marvell.com>
Acked-by: Luka Perkov <luka.perkov@sartura.hr>
8 years agoarm: gplugd: convert to generic board
Ajay Bhargav [Mon, 16 Feb 2015 15:02:30 +0000 (16:02 +0100)]
arm: gplugd: convert to generic board

Enable CONFIG_SYS_GENERIC_BOARD for Marvell gplugD.

Signed-off-by: Ajay Bhargav <ajay.bhargav@einfochips.com>
Acked-by: Prafulla Wadaskar <prafulla@marvell.com>
Acked-by: Luka Perkov <luka.perkov@sartura.hr>
8 years agoarm: socfpga: Enable DM and DM_SPI
Marek Vasut [Wed, 18 Feb 2015 21:33:46 +0000 (22:33 +0100)]
arm: socfpga: Enable DM and DM_SPI

Enable DM and DM_SPI support for both Cyclone 5 and Arria 5 boards,
since they use drivers which require those.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Chin Liang See <clsee@opensource.altera.com>
Cc: Dinh Nguyen <dinguyen@opensource.altera.com>
Acked-by: Pavel Machek <pavel@denx.de>
Acked-by: Simon Glass <sjg@chromium.org>
Acked-by: Stefan Roese <sr@denx.de>
Cc: Tom Rini <trini@konsulko.com>
Cc: Vince Bridgers <vbridger@opensource.altera.com>
8 years agoSECURE_BOOT : enable esbc_validate command for powerpc and arm platforms.
gaurav rana [Fri, 27 Feb 2015 04:16:17 +0000 (09:46 +0530)]
SECURE_BOOT : enable esbc_validate command for powerpc and arm platforms.

esbc_validate command uses various IP Blocks: Security Monitor, CAAM block
and SFP registers. Hence the respective CONFIG's are enabled.

Apart from these CONFIG_SHA_PROG_HW_ACCEL and CONFIG_RSA are also enabled.

Signed-off-by: Gaurav Rana <gaurav.rana@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
8 years agoSECURE BOOT: Add command for validation of images
gaurav rana [Fri, 27 Feb 2015 04:15:35 +0000 (09:45 +0530)]
SECURE BOOT: Add command for validation of images

1. esbc_validate command is meant for validating header and
   signature of images (Boot Script and ESBC uboot client).
   SHA-256 and RSA operations are performed using SEC block in HW.
   This command works on both PBL based and Non PBL based Freescale
   platforms.
   Command usage:
   esbc_validate img_hdr_addr [pub_key_hash]
2. ESBC uboot client can be linux. Additionally, rootfs and device
   tree blob can also be signed.
3. In the event of header or signature failure in validation,
   ITS and ITF bits determine further course of action.
4. In case of soft failure, appropriate error is dumped on console.
5. In case of hard failure, SoC is issued RESET REQUEST after
   dumping error on the console.
6. KEY REVOCATION Feature:
   QorIQ platforms like B4/T4 have support of srk key table and key
   revocation in ISBC code in Silicon.
   The srk key table allows the user to have a key table with multiple
   keys and revoke any key in case of particular key gets compromised.
   In case the ISBC code uses the key revocation and srk key table to
   verify the u-boot code, the subsequent chain of trust should also
   use the same.
6. ISBC KEY EXTENSION Feature:
   This feature allows large number of keys to be used for esbc validation
   of images. A set of public keys is being signed and validated by ISBC
   which can be further used for esbc validation of images.

Signed-off-by: Ruchika Gupta <ruchika.gupta@freescale.com>
Signed-off-by: Gaurav Rana <gaurav.rana@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
8 years agofsl_sec_mon: Add driver for Security Monitor block of Freescale
gaurav rana [Fri, 27 Feb 2015 04:14:22 +0000 (09:44 +0530)]
fsl_sec_mon: Add driver for Security Monitor block of Freescale

The Security Monitor is the SOC’s central reporting point for
security-relevant events such as the success or failure of boot
software validation and the detection of potential security compromises.

The API's for transition of Security states have been added
which will be used in case of SECURE BOOT.

Signed-off-by: Ruchika Gupta <ruchika.gupta@freescale.com>
Signed-off-by: Gaurav Rana <gaurav.rana@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
8 years agofsl_sfp : Move ccsr_sfp_regs definition to common include
gaurav rana [Fri, 27 Feb 2015 04:13:49 +0000 (09:43 +0530)]
fsl_sfp : Move ccsr_sfp_regs definition to common include

Freescale sfp has been used for mpc8xxx. It will be used
for ARM-based SoC as well. This patch moves the CCSR defintion of
sfp_regs to common include. This patch also defines ccsr_sfp_regs
definition for newer versions of SFP.

Signed-off-by: Ruchika Gupta <ruchika.gupta@freescale.com>
Signed-off-by: Gaurav Rana <gaurav.rana@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
8 years agorsa : Compile Modular Exponentiation files based on CONFIG_RSA_SOFTWARE_EXP
gaurav rana [Fri, 27 Feb 2015 03:40:06 +0000 (09:10 +0530)]
rsa : Compile Modular Exponentiation files based on CONFIG_RSA_SOFTWARE_EXP

Remove dependency of rsa_mod_exp from CONFIG_FIT_SIGNATURE.
As rsa modular exponentiation is an independent module
and can be invoked independently.

Signed-off-by: Gaurav Rana <gaurav.rana@freescale.com>
Acked-by: Simon Glass <sjg@chromium.org>
Reviewed-by: York Sun <yorksun@freescale.com>
8 years agompc85xx/t104xrdb : remove raw timing parameter
vijay rai [Tue, 3 Feb 2015 13:02:41 +0000 (13:02 +0000)]
mpc85xx/t104xrdb : remove raw timing parameter

This board uses DDR DIMM. Reading SPD provides more flexibility.
Raw timing parameter code should be removed after debugging.

Signed-off-by: Vijay Rai <vijay.rai@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
8 years agonet: Support DMA threshold mode in DWMAC driver
Sonic Zhang [Thu, 29 Jan 2015 06:38:50 +0000 (14:38 +0800)]
net: Support DMA threshold mode in DWMAC driver

- DMA threshold mode can be selected in board config head file.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
8 years agonet: configure DWMAC DMA by default AXI burst length
Sonic Zhang [Thu, 29 Jan 2015 05:37:31 +0000 (13:37 +0800)]
net: configure DWMAC DMA by default AXI burst length

Board can define its own AXI burst length to improve DWMAC DMA performance.

v2-changes:
- Avoid write burst len register when the Macro is not defined.

v3-changes:
- Add axi_bus register member to struct eth_dma_regs.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
8 years agoscripts/checkstack.pl: update to get AArch64 port from Linux
Kim Phillips [Wed, 28 Jan 2015 19:15:01 +0000 (13:15 -0600)]
scripts/checkstack.pl: update to get AArch64 port from Linux

Bring checkstack.pl up to date from its upstream Linux development.
Effectively, the following linux commits:

208ad00 checkstack.pl: port to AArch64
fda9f99 scripts/checkstack.pl: automatically handle 32-bit and 64-bit mode for ARCH=x86
7eb6e34 kbuild: trivial - remove trailing empty lines
690998b scripts/checkstack.pl: Add metag support

Reported-by: York Sun <yorksun@freescale.com>
Cc: Masahiro Yamada <yamada.m@jp.panasonic.com>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
8 years agogpt: support random UUIDs without setting environment variables
Rob Herring [Mon, 26 Jan 2015 15:44:18 +0000 (09:44 -0600)]
gpt: support random UUIDs without setting environment variables

Currently, an environment variable must be used to store the randomly
generated UUID for each partition. This is not necessary, so make storing
the UUID optional. Now passing uuid_disk and uuid are optional when random
UUIDs are enabled.

Signed-off-by: Rob Herring <robh@kernel.org>
Acked-by: Przemyslaw Marczak <p.marczak@samsung.com>
8 years agogpt: fix error reporting on partition table write failures
Rob Herring [Mon, 26 Jan 2015 15:43:15 +0000 (09:43 -0600)]
gpt: fix error reporting on partition table write failures

The gpt command always reports success even if writing the partition table
failed. Propagate the return value of gpt_restore so we get proper status
reported.

Signed-off-by: Rob Herring <robh@kernel.org>
Reviewed-by: Przemyslaw Marczak <p.marczak@samsung.com>
8 years agoarm, da8xx: convert ipam390 board to generic board support
Heiko Schocher [Tue, 24 Feb 2015 06:04:59 +0000 (07:04 +0100)]
arm, da8xx: convert ipam390 board to generic board support

enable generic board support for the ipam390 board.

Signed-off-by: Heiko Schocher <hs@denx.de>
8 years agotravis.yml: some adaptions
Heiko Schocher [Thu, 5 Mar 2015 08:02:23 +0000 (09:02 +0100)]
travis.yml: some adaptions

- adapt to build with eldk-5.4
- add more targets for building with buildman:
  - freescale -x arm,m68k,aarch64
  - arm1136
  - arm1176
  - arm720t
  - arm920t
  - davinci
  - kirkwood

Signed-off-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Roger Meier <r.meier@siemens.com>
8 years agoarm: pxa: introducing cpuinfo display for marvell pxa270m
Marcel Ziswiler [Wed, 4 Mar 2015 13:57:31 +0000 (14:57 +0100)]
arm: pxa: introducing cpuinfo display for marvell pxa270m

According to table 2-3 on page 87 of Marvell's latest PXA270
Specification Update Rev. I from 2010.04.19 [1] there exists a breed of
chips with a new CPU ID for PXA270M A1 stepping which our latest
Colibri PXA270 V2.4A modules actually have assembled. This patch helps
in correctly identifying those chips upon boot as well which then looks
as follows:

CPU: Marvell PXA27xM rev. A1

[1] http://www.marvell.com/application-processors/pxa-family/assets/pxa_27x_spec_update.pdf

Acked-by: Marek Vasut <marex@denx.de>
8 years agokconfig: common: Fix memtest bool name
Nikolaos Pasaloukos [Thu, 5 Mar 2015 13:15:20 +0000 (13:15 +0000)]
kconfig: common: Fix memtest bool name

Fix the name appearing in menuconfig for memtest command

Signed-off-by: Nikolaos Pasaloukos <Nikolaos.Pasaloukos@imgtec.com>
Cc: Masahiro Yamada <yamada.m@jp.panasonic.com
8 years agowoodburn: Convert to generic board
Stefano Babic [Thu, 5 Mar 2015 09:41:17 +0000 (10:41 +0100)]
woodburn: Convert to generic board

Boards need to select CONFIG_SYS_GENERIC_BOARD in order to
prevent removal from the project.

Signed-off-by: Stefano Babic <sbabic@denx.de>
8 years agomx35pdk: Convert to generic board
Stefano Babic [Thu, 5 Mar 2015 09:41:16 +0000 (10:41 +0100)]
mx35pdk: Convert to generic board

Boards need to select CONFIG_SYS_GENERIC_BOARD in order to
prevent removal from the project.

Signed-off-by: Stefano Babic <sbabic@denx.de>
8 years agoflea3: Convert to generic board
Stefano Babic [Thu, 5 Mar 2015 09:41:15 +0000 (10:41 +0100)]
flea3: Convert to generic board

Boards need to select CONFIG_SYS_GENERIC_BOARD in order to
prevent removal from the project.

Signed-off-by: Stefano Babic <sbabic@denx.de>
8 years agofsl_sec.h: Fix thinko
Tom Rini [Thu, 5 Mar 2015 13:56:39 +0000 (08:56 -0500)]
fsl_sec.h: Fix thinko

In 0200020 we added a number of tests for 'if
defined(CONFIG_SYS_FSL_SEC_LE) && !defined(CONFIG_MX6)' and
accidentally did one as 'ifdef defined...'

Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agomx5: fix get_reset_cause
Stefano Babic [Mon, 2 Mar 2015 09:12:13 +0000 (10:12 +0100)]
mx5: fix get_reset_cause

commit d9f43c8f5c1d7ed27c99a06be85a4bb64b2c73fb sets
get_reset_cause() as static, but this conflicts with mx5
where its prototype is in sys_proto.h.

Drop it from sys_proto.h and drop print_cpuinfo from mx53_loco,
factorizing the call for this board.

Signed-off-by: Stefano Babic <sbabic@denx.de>
CC: Jason Liu <jason.hui@linaro.org>
8 years agodt: socfpga: Import and enable Arria V DK DTS
Marek Vasut [Tue, 30 Dec 2014 20:08:57 +0000 (21:08 +0100)]
dt: socfpga: Import and enable Arria V DK DTS

Import DTS for Arria V development kit and enable support
for DT. The DT is imported from Linux 3.19-rc1 as of commit
97bf6af1f928216fd6c5a66e8a57bfa95a659672 .

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Chin Liang See <clsee@opensource.altera.com>
Cc: Dinh Nguyen <dinguyen@opensource.altera.com>
Acked-by: Pavel Machek <pavel@denx.de>
Reviewed-by: Stefan Roese <sr@denx.de>
Cc: Vince Bridgers <vbridger@opensource.altera.com>
8 years agodt: socfpga: Import and enable Cyclone V DK DTS
Marek Vasut [Tue, 30 Dec 2014 20:05:53 +0000 (21:05 +0100)]
dt: socfpga: Import and enable Cyclone V DK DTS

Import DTS for Cyclone V development kit and enable support
for DT. The DT is imported from Linux 3.19-rc1 as of commit
97bf6af1f928216fd6c5a66e8a57bfa95a659672 .

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Chin Liang See <clsee@opensource.altera.com>
Cc: Dinh Nguyen <dinguyen@opensource.altera.com>
Acked-by: Pavel Machek <pavel@denx.de>
Reviewed-by: Stefan Roese <sr@denx.de>
Cc: Vince Bridgers <vbridger@opensource.altera.com>
8 years agoarm: socfpga: Add Altera Arria V DK support
Marek Vasut [Tue, 30 Dec 2014 17:16:08 +0000 (18:16 +0100)]
arm: socfpga: Add Altera Arria V DK support

Add support for the Altera Arria V development kit.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Chin Liang See <clsee@opensource.altera.com>
Cc: Dinh Nguyen <dinguyen@opensource.altera.com>
Cc: Pavel Machek <pavel@denx.de>
Cc: Stefan Roese <sr@denx.de>
Cc: Vince Bridgers <vbridger@opensource.altera.com>
8 years agoarm: socfpga: Zap board_early_init_f()
Marek Vasut [Tue, 30 Dec 2014 20:31:21 +0000 (21:31 +0100)]
arm: socfpga: Zap board_early_init_f()

Zap this unused empty function, no point in having it.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Chin Liang See <clsee@opensource.altera.com>
Acked-by: Dinh Nguyen <dinguyen@opensource.altera.com>
Acked-by: Pavel Machek <pavel@denx.de>
Reviewed-by: Stefan Roese <sr@denx.de>
Cc: Vince Bridgers <vbridger@opensource.altera.com>
8 years agoarm: socfpga: Zap checkboard()
Marek Vasut [Tue, 30 Dec 2014 20:29:35 +0000 (21:29 +0100)]
arm: socfpga: Zap checkboard()

Since all boards now have a DT, instead of hard-coding the board
name into the U-Boot binary, read the board name from DT "model"
property.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Chin Liang See <clsee@opensource.altera.com>
Cc: Dinh Nguyen <dinguyen@opensource.altera.com>
Acked-by: Pavel Machek <pavel@denx.de>
Acked-by: Stefan Roese <sr@denx.de>
Cc: Vince Bridgers <vbridger@opensource.altera.com>
8 years agoarm: socfpga: Drop cyclone5 suffix from board file name
Marek Vasut [Tue, 30 Dec 2014 20:16:25 +0000 (21:16 +0100)]
arm: socfpga: Drop cyclone5 suffix from board file name

Drop the _cyclone5 suffix from socfpga_cyclone5.c since this file
will contain Arria 5 support as well.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Chin Liang See <clsee@opensource.altera.com>
Acked-by: Dinh Nguyen <dinguyen@opensource.altera.com>
Acked-by: Pavel Machek <pavel@denx.de>
Reviewed-by: Stefan Roese <sr@denx.de>
Cc: Vince Bridgers <vbridger@opensource.altera.com>
8 years agoarm: socfpga: Add USB and UDC support for Cyclone V DK
Marek Vasut [Tue, 30 Dec 2014 19:04:20 +0000 (20:04 +0100)]
arm: socfpga: Add USB and UDC support for Cyclone V DK

Add support for USB host mode and USB device mode for the
Cyclone V development kit and enable support for UMS (to
export SD card as USB mass storage). The UMS is activated
via 'ums 0 mmc 0' command, the system must be connected to
a host PC via HPS USB port and SD card must be installed
for this to work.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Chin Liang See <clsee@opensource.altera.com>
Acked-by: Dinh Nguyen <dinguyen@opensource.altera.com>
Acked-by: Pavel Machek <pavel@denx.de>
Reviewed-by: Stefan Roese <sr@denx.de>
Cc: Vince Bridgers <vbridger@opensource.altera.com>
8 years agoarm: socfpga: Sync Cyclone V DK PLL configuration
Marek Vasut [Tue, 30 Dec 2014 18:41:17 +0000 (19:41 +0100)]
arm: socfpga: Sync Cyclone V DK PLL configuration

Sync SoCFPGA Cyclone V development kit pinmux configuration with
Rocketboard U-Boot v2013.01.01-114-g9381569 (ACDS14.1_REL_GSRD_PR).

NOTE: This change is useless until we get proper SPL support, at
      which point this will likely need further rework.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Chin Liang See <clsee@opensource.altera.com>
Acked-by: Dinh Nguyen <dinguyen@opensource.altera.com>
Cc: Pavel Machek <pavel@denx.de>
Reviewed-by: Stefan Roese <sr@denx.de>
Cc: Vince Bridgers <vbridger@opensource.altera.com>
8 years agoarm: socfpga: Sync Cyclone V DK pinmux configuration
Marek Vasut [Tue, 30 Dec 2014 18:41:17 +0000 (19:41 +0100)]
arm: socfpga: Sync Cyclone V DK pinmux configuration

Sync SoCFPGA Cyclone V development kit pinmux configuration with
Rocketboard U-Boot v2013.01.01-114-g9381569 (ACDS14.1_REL_GSRD_PR).

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Chin Liang See <clsee@opensource.altera.com>
Acked-by: Dinh Nguyen <dinguyen@opensource.altera.com>
Cc: Pavel Machek <pavel@denx.de>
Reviewed-by: Stefan Roese <sr@denx.de>
Cc: Vince Bridgers <vbridger@opensource.altera.com>
8 years agoarm: socfpga: Minor coding style fix
Marek Vasut [Tue, 30 Dec 2014 19:16:36 +0000 (20:16 +0100)]
arm: socfpga: Minor coding style fix

Replace multiple spaces with a single tab.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Chin Liang See <clsee@opensource.altera.com>
Acked-by: Dinh Nguyen <dinguyen@opensource.altera.com>
Acked-by: Pavel Machek <pavel@denx.de>
Reviewed-by: Stefan Roese <sr@denx.de>
Cc: Vince Bridgers <vbridger@opensource.altera.com>
8 years agoti: armv7: Move SPL SDRAM init to the right place, drop unused CONFIG_SPL_STACK
Simon Glass [Tue, 3 Mar 2015 15:03:02 +0000 (08:03 -0700)]
ti: armv7: Move SPL SDRAM init to the right place, drop unused CONFIG_SPL_STACK

Currently in some cases SDRAM init requires global_data to be available
and soon this will not be available prior to board_init_f().  Adjust the
code paths in these cases to be correct.  In some cases we had the SPL
stack be in DDR as we might have large stacks (due to Falcon Mode +
Environment).  In these cases switch to CONFIG_SPL_STACK_R.  In other
cases we had simply been setting CONFIG_SPL_STACK into SRAM.  In these
cases we no longer need to (CONFIG_SYS_INIT_SP_ADDR is used and is also
in SRAM) so drop those lines.

Signed-off-by: Simon Glass <sjg@chromium.org>
Tested on Beagleboard, Beagleboard xM
Tested-by: Matt Porter <mporter@konsulko.com>
Tested on Beaglebone Black, AM43xx GP EVM, OMAP5 uEVM, OMAP4 Pandaboard
Tested-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agoMake export interface support CONFIG_SYS_MALLOC_SIMPLE
Simon Glass [Tue, 3 Mar 2015 15:03:01 +0000 (08:03 -0700)]
Make export interface support CONFIG_SYS_MALLOC_SIMPLE

When CONFIG_SYS_MALLOC_SIMPLE is defined, free() is a static inline. Make
sure that the export interface still builds in this case.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agoarm: spl: Allow board_init_r() to run with a larger stack
Simon Glass [Tue, 3 Mar 2015 15:03:00 +0000 (08:03 -0700)]
arm: spl: Allow board_init_r() to run with a larger stack

At present SPL uses a single stack, either CONFIG_SPL_STACK or
CONFIG_SYS_INIT_SP_ADDR. Since some SPL features (such as MMC and
environment) require a lot of stack, some boards set CONFIG_SPL_STACK to
point into SDRAM. They then set up SDRAM very early, before board_init_f(),
so that the larger stack can be used.

This is an abuse of lowlevel_init(). That function should only be used for
essential start-up code which cannot be delayed. An example of a valid use is
when only part of the SPL code is visible/executable, and the SoC must be set
up so that board_init_f() can be reached. It should not be used for SDRAM
init, console init, etc.

Add a CONFIG_SPL_STACK_R option, which allows the stack to be moved to a new
address before board_init_r() is called in SPL.

The expected SPL flow (for CONFIG_SPL_FRAMEWORK) is documented in the README.

Signed-off-by: Simon Glass <sjg@chromium.org>
For version 1:
Acked-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
Reviewed-by: Stefan Roese <sr@denx.de>
Tested-by: Bo Shen <voice.shen@atmel.com>
Acked-by: Bo Shen <voice.shen@atmel.com>
Acked-by: Heiko Schocher <hs@denx.de>
Tested-by: Heiko Schocher <hs@denx.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agodm: tegra: Enable driver model in SPL and adjust the GPIO driver
Simon Glass [Tue, 3 Mar 2015 15:02:59 +0000 (08:02 -0700)]
dm: tegra: Enable driver model in SPL and adjust the GPIO driver

Use the full driver model GPIO and serial drivers in SPL now that these are
supported. Since device tree is not available they will use platform data.

Remove the special SPL GPIO function as it is no longer needed.

This is all in one commit to maintain bisectability.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agoarm: spl: Avoid setting up a duplicate global data structure
Simon Glass [Tue, 3 Mar 2015 15:02:58 +0000 (08:02 -0700)]
arm: spl: Avoid setting up a duplicate global data structure

This is already set up in crt0.S. We don't need a new structure and don't
really want one in the 'data' section of the image, since it will be empty
and crt0.S's changes will be ignored.

As an interim measure, remove it only if CONFIG_DM is not defined. This
allows us to press ahead with driver model in SPL and allow the stragglers
to catch up.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agoarm: Reduce the scope of lowlevel_init()
Simon Glass [Tue, 3 Mar 2015 15:02:57 +0000 (08:02 -0700)]
arm: Reduce the scope of lowlevel_init()

This function has grown into something of a monster. Some boards are setting
up a console and DRAM here in SPL. This requires global_data which should be
set up in one place (crt0.S).

There is no need for SPL to use s_init() for anything since board_init_f()
is called immediately afterwards.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agopowerpc: 85xx: Modify CONFIG_USB_MAX_CONTROLLER_COUNT for P1022DS
Ying Zhang [Fri, 30 Jan 2015 06:52:11 +0000 (14:52 +0800)]
powerpc: 85xx: Modify CONFIG_USB_MAX_CONTROLLER_COUNT for P1022DS

Modify CONFIG_USB_MAX_CONTROLLER_COUNT value to 1 on P1022DS.
As ETSEC2 and USB2 are muxed; thus if ETSEC2 is enabled, the
system bus hangs on USB2 if ETSEC2 is enabled but "usb start"
command is issued. Hence making default controller count to 1
to avoid system hang.

Signed-off-by: Nikhil Badola <nikhil.badola@freescale.com>
Reviewed-by: Yusong Sun <yorksun@freescale.com>
8 years agopowerpc/mpc85xx: Add DSP side awareness for Freescale Heterogeneous SoCs
Shaveta Leekha [Mon, 19 Jan 2015 07:16:54 +0000 (12:46 +0530)]
powerpc/mpc85xx: Add DSP side awareness for Freescale Heterogeneous SoCs

The code provides framework for heterogeneous multicore chips based on StarCore
and Power Architecture which are chasis-2 compliant, like B4860 and B4420

It will make u-boot recognize all non-ppc cores and peripherals like
SC3900/DSP CPUs, MAPLE, CPRI and print their configuration in u-boot logs.
Example boot logs of B4860QDS:

U-Boot 2015.01-00232-geef6e36-dirty (Jan 19 2015 - 11:58:45)

CPU0:  B4860E, Version: 2.2, (0x86880022)
Core:  e6500, Version: 2.0, (0x80400120)
Clock Configuration:
       CPU0:1600 MHz, CPU1:1600 MHz, CPU2:1600 MHz, CPU3:1600 MHz,
       DSP CPU0:1200 MHz, DSP CPU1:1200 MHz, DSP CPU2:1200 MHz, DSP CPU3:1200 MHz,
       DSP CPU4:1200 MHz, DSP CPU5:1200 MHz,
       CCB:666.667 MHz,
       DDR:933.333 MHz (1866.667 MT/s data rate) (Asynchronous), IFC:166.667 MHz
       CPRI:600  MHz
       MAPLE:600  MHz, MAPLE-ULB:800  MHz, MAPLE-eTVPE:1000 MHz
       FMAN1: 666.667 MHz
       QMAN:  333.333 MHz

Top level changes include:
(1) Top level CONFIG to identify HETEROGENUOUS clusters
(2) CONFIGS for SC3900/DSP components
(3) Global structures like "cpu_type" and "MPC85xx_SYS_INFO"
    updated for dsp cores and other components
(3) APIs to get DSP num cores and their Mask like:
        cpu_dsp_mask, cpu_num_dspcores etc same as that of PowerPC
(5) Code to fetch and print SC cores and other heterogenous
    device's frequencies
(6) README added for the same

Signed-off-by: Shaveta Leekha <shaveta@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
8 years agoapalis/colibri_t30: add misc cmds increase buf sizes and max args
Marcel Ziswiler [Sun, 1 Mar 2015 01:05:39 +0000 (02:05 +0100)]
apalis/colibri_t30: add misc cmds increase buf sizes and max args

In order to work with our downstream U-Boot environment and update
scripts add support for the following miscellaneous commands:

CONFIG_CMD_SETEXPR
CONFIG_FAT_WRITE

Increase the console I/O and print as well as argument buffer sizes:

CONFIG_SYS_CBSIZE
CONFIG_SYS_PBSIZE
CONFIG_SYS_BARGSIZE

Increase the maximum number of arguments allowed:

CONFIG_SYS_MAXARGS

Signed-off-by: Marcel Ziswiler <marcel@ziswiler.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
8 years agoapalis_t30: enable gigabit ethernet via pcie
Marcel Ziswiler [Sun, 1 Mar 2015 01:05:38 +0000 (02:05 +0100)]
apalis_t30: enable gigabit ethernet via pcie

Now with all the Tegra PCIe and Intel E1000 gigabit Ethernet driver
updates being merged actually make use of it.

While at it get rid of the USB networking support which now does not
make much sense any longer.

Signed-off-by: Marcel Ziswiler <marcel@ziswiler.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
8 years agoapalis/colibri_t30: fix MMC/SD card detect GPIOs
Marcel Ziswiler [Sun, 1 Mar 2015 01:05:37 +0000 (02:05 +0100)]
apalis/colibri_t30: fix MMC/SD card detect GPIOs

This fixes the MMC/SD card detect GPIOs for Apalis T30 which got broken
by the following commit:

2b2b50bc8748 "dm: tegra: dts: Use TEGRA_GPIO() macro for all GPIOs"

While at it also re-add the comments describing which particular
Apalis/Colibri pins those GPIOs are on.

Signed-off-by: Marcel Ziswiler <marcel@ziswiler.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Stefan Agner <stefan.agner@toradex.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
8 years agodm: tegra: dts: add aliases for spi on apalis_t30
Marcel Ziswiler [Sun, 1 Mar 2015 01:05:36 +0000 (02:05 +0100)]
dm: tegra: dts: add aliases for spi on apalis_t30

All boards with a SPI interface have a suitable spi alias except Apalis
T30. Add these missing aliases just as the following commit did for the
others:

d2f60f93325a "dm: tegra: dts: Add aliases for spi on tegra30 boards"

Signed-off-by: Marcel Ziswiler <marcel@ziswiler.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
8 years agoARM: tegra: pinmux: add Tegra210 support
Stephen Warren [Tue, 24 Feb 2015 21:08:31 +0000 (14:08 -0700)]
ARM: tegra: pinmux: add Tegra210 support

This patch incorporates a few fixes from Tom Warren <twarren@nvidia.com>.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
8 years agoARM: tegra: pinmux: support Tegra210's e_io_hv pin option
Stephen Warren [Tue, 24 Feb 2015 21:08:30 +0000 (14:08 -0700)]
ARM: tegra: pinmux: support Tegra210's e_io_hv pin option

Tegra210 has a per-pin option named e_io_hv, which indicates that the
pin's input path should be configured to be 3.3v-tolerant. Add support
for this.

Note that this is very similar to previous chip's rcv_sel option.
However, since the Tegra TRM names this option differently for the
different chips, we support the new name so that the code exactly matches
the naming in the TRM, to avoid confusion.

This patch incorporates a few fixes from Tom Warren <twarren@nvidia.com>.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
8 years agoARM: tegra: pinmux: account for different drivegroup base registers
Stephen Warren [Tue, 24 Feb 2015 21:08:29 +0000 (14:08 -0700)]
ARM: tegra: pinmux: account for different drivegroup base registers

Tegra210 starts its drive group registers at a different offset from the
APB MISC register block that other SoCs. Update the code to handle this.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
8 years agoARM: tegra: pinmux: support hsm/schmitt on pins
Stephen Warren [Tue, 24 Feb 2015 21:08:28 +0000 (14:08 -0700)]
ARM: tegra: pinmux: support hsm/schmitt on pins

T210 support HSM and Schmitt options in the pinmux register (previous
chips placed these options in the drive group register). Update the
code to handle this.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
8 years agoARM: tegra: pinmux: partially handle varying register layouts
Stephen Warren [Tue, 24 Feb 2015 21:08:27 +0000 (14:08 -0700)]
ARM: tegra: pinmux: partially handle varying register layouts

Tegra210 moves some bits around in the pinmux registers. Update the code
to handle this.

This doesn't attempt to address the issues with the group-to-group varying
drive group register layout mentioned earlier. This patch handles the
SoC-to-SoC differences in the mux register layout.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
8 years agoARM: tegra: pinmux: move some type definitions
Stephen Warren [Tue, 24 Feb 2015 21:08:26 +0000 (14:08 -0700)]
ARM: tegra: pinmux: move some type definitions

On some future SoCs, some per-drive-group features became per-pin
features. Move all type definitions early in the header so they can
be enabled irrespective of the setting of TEGRA_PMX_SOC_HAS_DRVGRPS.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
8 years agoARM: tegra: pinmux: handle feature removal on newer SoCs
Stephen Warren [Tue, 24 Feb 2015 21:08:25 +0000 (14:08 -0700)]
ARM: tegra: pinmux: handle feature removal on newer SoCs

On some future SoCs, some of the per-drive-group features no longer
exist. Add some ifdefs to support this.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
8 years agoARM: tegra: pinmux: simplify some defines
Stephen Warren [Tue, 24 Feb 2015 21:08:24 +0000 (14:08 -0700)]
ARM: tegra: pinmux: simplify some defines

Future SoCs have a slightly different combination of pinmux options per
pin. This will be simpler to handle if we simply have one define per
option, rather than grouping various options together, in combinations
that don't align with future chips.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
8 years agoARM: tegra: pinmux: add note re: drive group field defines
Stephen Warren [Tue, 24 Feb 2015 21:08:23 +0000 (14:08 -0700)]
ARM: tegra: pinmux: add note re: drive group field defines

Tegra's drive group registers have a remarkably inconsistent layout. The
current U-Boot driver doesn't take this into account at all. Add a
comment to describe the issue, so at least anyone debugging the driver
will be aware of this. To solve this, we'd need to add a per-drive-group
data structure describing the layout for the individual register. Since
we don't set up too many drive groups in U-Boot at present, this
hopefully isn't causing too much practical issue. Still, we probably need
to fix this sometime.

Wth Tegra210, the register layout becomes almost entirely consistent, so
this problem partially solves itself over time.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
8 years agoARM: tegra: import latest Jetson TK1 pinmux
Stephen Warren [Wed, 18 Feb 2015 20:27:04 +0000 (13:27 -0700)]
ARM: tegra: import latest Jetson TK1 pinmux

Syseng has revamped the Jetson TK1 pinmux spreadsheet, basing the content
completely on correct configuration for the board/schematic, rather than
the previous version which was based on the bare minimum changes relative
to another reference board.

The new spreadsheet sets TRISTATE for any input-only pins. This only works
correctly if the global CLAMP bit is not set, so the Jetson TK1 board code
has been adjusted accordingly. Apparently syseng have changed their mind
since the previous advice that this needed to be set:-/

This content comes from Jetson_TK1_customer_pinmux.xlsm (v09) downloaded
from https://developer.nvidia.com/hardware-design-and-development.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
8 years agoARM: tegra: add function to clear pinmux CLAMPING bit
Stephen Warren [Wed, 18 Feb 2015 20:27:03 +0000 (13:27 -0700)]
ARM: tegra: add function to clear pinmux CLAMPING bit

This is needed to correctly apply the new Jetson TK1 pinmux config.

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: support running in non-secure mode
Stephen Warren [Mon, 19 Jan 2015 23:25:52 +0000 (16:25 -0700)]
ARM: tegra: support running in non-secure mode

When the CPU is in non-secure (NS) mode (when running U-Boot under a
secure monitor), certain actions cannot be taken, since they would need
to write to secure-only registers. One example is configuring the ARM
architectural timer's CNTFRQ register.

We could support this in one of two ways:
1) Compile twice, once for secure mode (in which case anything goes) and
   once for non-secure mode (in which case certain actions are disabled).
   This complicates things, since everyone needs to keep track of
   different U-Boot binaries for different situations.
2) Detect NS mode at run-time, and optionally skip any impossible actions.
   This has the advantage of a single U-Boot binary working in all cases.

(2) is not possible on ARM in general, since there's no architectural way
to detect secure-vs-non-secure. However, there is a Tegra-specific way to
detect this.

This patches uses that feature to detect secure vs. NS mode on Tegra, and
uses that to:

* Skip the ARM arch timer initialization.

* Set/clear an environment variable so that boot scripts can take
  different action depending on which mode the CPU is in. This might be
  something like:
  if CPU is secure:
    load secure monitor code into RAM.
    boot secure monitor.
    secure monitor will restart (a new copy of) U-Boot in NS mode.
  else:
    execute normal boot process

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
8 years agoARM: tegra: move common config defines centrally
Stephen Warren [Mon, 19 Jan 2015 23:25:51 +0000 (16:25 -0700)]
ARM: tegra: move common config defines centrally

All boards need CONFIG_BOARD_EARLY_INIT_F, and many actively need
CONFIG_BOARD_LATE_INIT. Move both of these into tegra-common.h so that
board config headers don't need to repeatedly define them.

Later commits will add new code in board_late_init() which applies to
all boards, so CONFIG_BOARD_LATE_INIT should be enabled for all Tegra
boards.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
8 years agoARM: tegra: support large RAM sizes
Stephen Warren [Tue, 23 Dec 2014 17:34:51 +0000 (10:34 -0700)]
ARM: tegra: support large RAM sizes

Some systems have so much RAM that the end of RAM is beyond 4GB. An
example would be a Tegra124 system (where RAM starts at 2GB physical)
that has more than 2GB of RAM.

In this case, we want gd->ram_size to represent the actual RAM size, so
that the actual RAM size is passed to the OS. This is useful if the OS
implements LPAE, and can actually use the "extra" RAM.

However, we can't use get_ram_size() to verify the actual amount of RAM
present on such systems, since some of the RAM can't be accesses, which
confuses that function. Avoid calling get_ram_size() when the RAM size
is too large for it to work correctly. It's never actually needed anyway,
since there's no reason for the BCT to report the wrong RAM size.

In systems with >=4GB RAM, we still need to clip the reported RAM size
since U-Boot uses a 32-bit variable to represent the RAM size in bytes.

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: fix variable naming in query_sdram_size()
Stephen Warren [Tue, 23 Dec 2014 17:34:50 +0000 (10:34 -0700)]
ARM: tegra: fix variable naming in query_sdram_size()

size_mb is used to hold a value that's sometimes KB, sometimes MB,
and sometimes bytes. Use separate correctly named variables to avoid
confusion here. Also fix indentation of a conditional statement.

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 agocommon: board: support systems with where RAM ends beyond 4GB
Stephen Warren [Tue, 23 Dec 2014 17:34:49 +0000 (10:34 -0700)]
common: board: support systems with where RAM ends beyond 4GB

Some systems have so much RAM that the end of RAM is beyond 4GB. An
example would be a Tegra124 system (where RAM starts at 2GB physical)
that has more than 2GB of RAM.

In this case, we can gd->ram_size to represent the actual RAM size, so
that the actual RAM size is passed to the OS. This is useful if the OS
implements LPAE, and can actually use the "extra" RAM.

However, U-Boot does not implement LPAE and so must deal with 32-bit
physical addresses. To this end, we enhance board_get_usable_ram_top() to
detect the "over-sized" case, and limit the relocation addres so that it
fits into 32-bits of physical address space.

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 agoOdroid U3: use common code for dram reservation
Przemyslaw Marczak [Tue, 17 Feb 2015 13:50:27 +0000 (14:50 +0100)]
Odroid U3: use common code for dram reservation

This commit removes the dram reservation from board file,
because it is done in a common code.

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Cc: Minkyu Kang <mk7.kang@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
8 years agoOdroid-XU3: enable the last dram bank and reserve 22MiB
Przemyslaw Marczak [Tue, 17 Feb 2015 13:50:26 +0000 (14:50 +0100)]
Odroid-XU3: enable the last dram bank and reserve 22MiB

This commit enables the last DRAM bank and reserves
the last 22 MiB of it, for the secure firmware.

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Cc: Akshay Saraswat <akshay.s@samsung.com>
Cc: Hyungwon Hwang <human.hwang@samsung.com>
Cc: Minkyu Kang <mk7.kang@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
8 years agoboard: samsung: reserve memory for the secure firmware
Przemyslaw Marczak [Tue, 17 Feb 2015 13:50:25 +0000 (14:50 +0100)]
board: samsung: reserve memory for the secure firmware

Since more than one board requires memory reservation
for the secure firmware, the reservation code can be
made in a common code.
Now, to reserve some part of the the last bank,
board config should define:
- CONFIG_TZSW_RESERVED_DRAM - len in bytes
- CONFIG_NR_DRAM_BANKS - number of memory banks

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Cc: Akshay Saraswat <akshay.s@samsung.com>
Cc: Hyungwon Hwang <human.hwang@samsung.com>
Cc: Minkyu Kang <mk7.kang@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
8 years agosamsung: board: fix: Define loop iterator as an unsigned int to suppress gcc 4.8...
Łukasz Majewski [Wed, 4 Mar 2015 09:54:48 +0000 (10:54 +0100)]
samsung: board: fix: Define loop iterator as an unsigned int to suppress gcc 4.8 warning

This patch suppress following warning:

board/samsung/common/board.c:95:32: warning: iteration 4u invokes undefined behavior [-Waggressive-loop-optimizations]
   addr = CONFIG_SYS_SDRAM_BASE + (i * SDRAM_BANK_SIZE);
                                ^
board/samsung/common/board.c:94:2: note: containing loop

about possible signed integer overflow at gcc 4.8.2 (odroid board)

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
8 years agoPrepare v2015.04-rc3
Tom Rini [Tue, 3 Mar 2015 23:08:39 +0000 (18:08 -0500)]
Prepare v2015.04-rc3

Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agompc837xerdb: "fix Calling __hwconfig without a buffer" warning
Sinan Akman [Wed, 21 Jan 2015 01:47:01 +0000 (20:47 -0500)]
mpc837xerdb: "fix Calling __hwconfig without a buffer" warning

Signed-off-by: Sinan Akman <sinan@writeme.com>
8 years agoarm64: Add Xilinx ZynqMP support
Michal Simek [Thu, 15 Jan 2015 09:01:51 +0000 (10:01 +0100)]
arm64: Add Xilinx ZynqMP support

Add basic Xilinx ZynqMP arm64 support.
Serial and SD is supported.
It supports emulation platfrom ep108 and QEMU.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoatngwmkii: convert to generic board
Andreas Bießmann [Sun, 1 Mar 2015 21:01:13 +0000 (22:01 +0100)]
atngwmkii: convert to generic board

Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
8 years agokconfig: remove unneeded U-Boot extension code
Masahiro Yamada [Fri, 27 Feb 2015 15:45:26 +0000 (00:45 +0900)]
kconfig: remove unneeded U-Boot extension code

This code was introduced to support the multiple .config
configuration in U-Boot.  We do not need it any more.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
8 years agoserial: ns16550: Fix build error due to a typo
Axel Lin [Sat, 28 Feb 2015 07:55:36 +0000 (15:55 +0800)]
serial: ns16550: Fix build error due to a typo

Fix trivial typo.

Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Axel Lin <axel.lin@ingics.com>
8 years agoMAINTAINERS, git-mailrc: Update my email address
Tom Rini [Mon, 2 Mar 2015 13:37:50 +0000 (08:37 -0500)]
MAINTAINERS, git-mailrc: Update my email address

Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agoarmv7.h: Add <asm/io.h>
Tom Rini [Mon, 2 Mar 2015 13:24:45 +0000 (08:24 -0500)]
armv7.h: Add <asm/io.h>

With a389531 we now call readl() from this file so add <asm/io.h> so
that we have a prototype for the function.

Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agowarp: Select BOUNCE_BUFFER and CMD_EXT options
Fabio Estevam [Sat, 28 Feb 2015 18:16:43 +0000 (15:16 -0300)]
warp: Select BOUNCE_BUFFER and CMD_EXT options

Add EXT2/EXT4 and BOUNCE_BUFFER support.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Otavio Salvador <otavio@ossystems.com.br>
8 years agowarp: Add USB Mass Storage support
Fabio Estevam [Sat, 28 Feb 2015 18:16:42 +0000 (15:16 -0300)]
warp: Add USB Mass Storage support

With UMS support we are able to flash the eMMC from U-boot, which is very
convenient.

Add UMS support to make the eMMC flashing process easier.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Otavio Salvador <otavio@ossystems.com.br>
8 years agomx6slevk: Provide a proper pad configuration for OTG1_ID pin
Fabio Estevam [Sat, 28 Feb 2015 17:25:46 +0000 (14:25 -0300)]
mx6slevk: Provide a proper pad configuration for OTG1_ID pin

Pass the same pad configuration as done in the kernel so that OTG1_ID pin can
properly work in device mode.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>