Strip fw_printenv like the other tools

Signed-off-by: Loïc Minier <lool@debian.org>
Block: Remove MG DISK support

This driver is unused and obsolete.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Wolfgang Denk <wd@denx.de>
Cc: unsik Kim <donari75@gmail.com>
checkpatch: add check for whitespace before semicolon at end-of-line

This tests for a bad habits of mine like this:

	return 0 ;

Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
menu: only timeout when menu is displayed

Make the menu timeout apply only when prompt flag is set and after the
menu is displayed. This allows auto boot to work no matter whether prompt
is set or cleared. Use the default selection if the menu times out.

This also fixes the timeout value given to readline_into_buffer to be
seconds instead of 10th of seconds.

Old behavior:

if prompt
  display menu and wait for choice
else
  wait for timeout
  if key pressed
    display menu and wait for choice
  else
    exit command

New behavior:

if prompt
  display menu
  if key pressed
    wait for choice
  else
    boot default entry on timeout
else
  boot default entry

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
pxe: support include files at top-level

Include files outside of a menu were not getting included and parsed.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
pxe: add support for label menu text

Use a menu string if present, otherwise use the kernel string.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
pxe: support linux entries for labels

Kernels can be specified using "linux" or "kernel" entry. The difference
is kernel is supposed to detect the type of file, but for u-boot both are
treated the same.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
pxe: support absolute paths

If the file path starts with a '/', then don't pre-pend the bootfile path.
This fixes a problem with running 'pxe boot' multiple times where the
bootfile path gets pre-pended to itself each time.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
pxe: parse initrd file from append string

For syslinux, the initrd can be set in the append string as
"initrd=<file>", so try to find it there if we haven't already set the
initrd.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
pxe: add support for parsing local syslinux files

Add a new command "sysboot" which parses syslinux menu files and boots
using kernel and initrd specified by menu files. The operation is similar
to "pxe boot" except local files on ext2 or fat filesystem are parsed.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
ext2load: increase read speed

This patch dramatically drops the amount of time u-boot needs to read a
file from an ext2 partition.  On a typical 2 to 5 MB file (kernels and
initrds) it goes from tens of seconds to a couple seconds.

All we are doing here is grouping contiguous blocks into one read.

Boot tested on Globalscale Technologies Dreamplug (Kirkwood ARM SoC)
with three different files.  sha1sums were calculated in Linux
userspace, and then confirmed after ext2load.

Signed-off-by: Jason Cooper <u-boot@lakedaemon.net>
Tested-by: Eric Nelson <eric.nelson@boundarydevices.com>
Tested-by: Thierry Reding <thierry.reding@avionic-design.de>
sh: ap_sh4a_4a: Fix wrong register initialization value

The value of ET0_ERXD6 and GPSR1_INIT was wrong.
This fixes them.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
tools/mkenvimage.c: fix basename(3) usage

Use the POSIX variant of basename due to BSD systems (e.g. OS X) do not provide
GNU version of basename(3). It is save to use the POSIX variant here cause we do
never use argv[0] later on which may be modified by the basename(3) POSIX
variant.
On systems providing GNU variant the GNU variant should be used since string.h
is included before libgen.h. Therefore let the _GNU_SOURCE as is.

This patch fixes following warning (on OS X):
---8<---
mkenvimage.c: In function ‘main’:
mkenvimage.c:105: warning: implicit declaration of function ‘basename’
mkenvimage.c:105: warning: assignment makes pointer from integer without a cast
--->8---

Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
cc: Keith Mok <ek9852@gmail.com>
powerpc/mpc83xx: fix copyright string in serdes.c

The misspelling of "semiconductor" causes some internal copyright analysis
tools to complain.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
powerpc/mpc83xx: increment malloc heap size

extention of commit 3b6b256 "powerpc/mpc83xx: increment
malloc heap size for the MPC832x MDS boards" to all other
mpc83xx based boards.  It fixes "Unable to save the rest
of sector" messages when trying to save the environment
to flash.

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
powerpc/85xx: Add USB device-tree fixup for various platforms

Add USB device-tree fixup for following platforms:
MPC8536DS, P1022DS, P1023RDS, P2020COME, P2020DS, P2041RDB, P3060QDS

Signed-off-by: Ramneek Mehresh <ramneek.mehresh@freescale.com>
powerpc/mpc85xx:Add BSC9131/BSC9130/BSC9231 Processor Support

- BSC9131 is integrated device that targets Femto base station market.
   It combines Power Architecture e500v2 and DSP StarCore SC3850 core
   technologies with MAPLE-B2F baseband acceleration processing elements.
 - BSC9130 is exactly same as BSC9131 except that the max e500v2
   core and DSP core frequencies are 800M(these are 1G in case of 9131).
 - BSC9231 is similar to BSC9131 except no MAPLE

The BSC9131 SoC includes the following function and features:
    . Power Architecture subsystem including a e500 processor with 256-Kbyte shared
      L2 cache
    . StarCore SC3850 DSP subsystem with a 512-Kbyte private L2 cache
    . The Multi Accelerator Platform Engine for Femto BaseStation Baseband
      Processing (MAPLE-B2F)
    . A multi-standard baseband algorithm accelerator for Channel Decoding/Encoding,
     Fourier Transforms, UMTS chip rate processing, LTE UP/DL Channel processing,
     and CRC algorithms
    . Consists of accelerators for Convolution, Filtering, Turbo Encoding,
     Turbo Decoding, Viterbi decoding, Chiprate processing, and Matrix Inversion
     operations
    . DDR3/3L memory interface with 32-bit data width without ECC and 16-bit with
     ECC, up to 400-MHz clock/800 MHz data rate
    . Dedicated security engine featuring trusted boot
    . DMA controller
    . OCNDMA with four bidirectional channels
    . Interfaces
    . Two triple-speed Gigabit Ethernet controllers featuring network acceleration
      including IEEE 1588. v2 hardware support and virtualization (eTSEC)
    . eTSEC 1 supports RGMII/RMII
    . eTSEC 2 supports RGMII
    . High-speed USB 2.0 host and device controller with ULPI interface
    . Enhanced secure digital (SD/MMC) host controller (eSDHC)
    . Antenna interface controller (AIC), supporting three industry standard
      JESD207/three custom ADI RF interfaces (two dual port and one single port)
      and three MAXIM's MaxPHY serial interfaces
    . ADI lanes support both full duplex FDD support and half duplex TDD support
    . Universal Subscriber Identity Module (USIM) interface that facilitates
      communication to SIM cards or Eurochip pre-paid phone cards
    . TDM with one TDM port
    . Two DUART, four eSPI, and two I2C controllers
    . Integrated Flash memory controller (IFC)
    . TDM with 256 channels
    . GPIO
    . Sixteen 32-bit timers

The DSP portion of the SoC consists of DSP core (SC3850) and various
accelerators pertaining to DSP operations.

This patch takes care of code pertaining to power side functionality only.

Signed-off-by: Ramneek Mehresh <ramneek.mehresh@freescale.com>
Signed-off-by: Priyanka Jain <Priyanka.Jain@freescale.com>
Signed-off-by: Akhil Goyal <Akhil.Goyal@freescale.com>
Signed-off-by: Poonam Aggrwal <poonam.aggrwal@freescale.com>
Signed-off-by: Rajan Srivastava <rajan.srivastava@freescale.com>
Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
powerpc/mpc85xx:Add BSC9131 RDB Support

BSC9131RDB is a Freescale reference design board for BSC9131 SoC. BSC9131 SOC
 is an integrated device that targets Femto base station market. It combines
 Power Architecture e500v2 and DSP StarCore SC3850 core technologies with
 MAPLE-B2F baseband acceleration processing elements

  BSC9131RDB Overview
   -----------------
     -1Gbyte DDR3 (on board DDR)
     -128Mbyte 2K page size NAND Flash
     -256 Kbit M24256 I2C EEPROM
     -128 Mbit SPI Flash memory
     -USB-ULPI
     -eTSEC1: Connected to RGMII PHY
     -eTSEC2: Connected to RGMII PHY
     -DUART interface: supports one UARTs up to 115200 bps for console display
Apart from the above it also consists various peripherals to support DSP
functionalities.

This patch adds support for mainly Power side functionalities and peripherals

Signed-off-by: Ramneek Mehresh <ramneek.mehresh@freescale.com>
Signed-off-by: Priyanka Jain <Priyanka.Jain@freescale.com>
Signed-off-by: Akhil Goyal <Akhil.Goyal@freescale.com>
Signed-off-by: Rajan Srivastava <rajan.srivastava@freescale.com>
Signed-off-by: Poonam Aggrwal <poonam.aggrwal@freescale.com>
Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
powerpc/p1010rdb: update mux config of p1010rdb board

On p1010rdb some signals are muxed for tdm/can/uart/flash.
If we don't set fsl_p1010mux:tdm_can to "can" or "tdm" explicitly,
defaultly we keep spi chip selection to spi-flash instead of to
tdm/slic and disable uart1 when not using flexcan, as well disable sdhc.

Signed-off-by: Shengzhou Liu <Shengzhou.Liu@freescale.com>
PATCH 1/4][v4] doc:Add documentation for e500 external debugger support

This describes requirement of e500 and e500v2 processor to support external
debugger.

It also provide an insight of the configuration switch required and their
description.

Signed-off-by: Radu Lazarescu <radu.lazarescu@freescale.com>
Signed-off-by: Marius Grigoras <marius.grigoras@freescale.com>
Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>