platform/kernel/u-boot.git
9 years agopowerpc/mpc85xx: Use IFC accessor function
Prabhakar Kushwaha [Tue, 23 Sep 2014 05:27:12 +0000 (10:57 +0530)]
powerpc/mpc85xx: Use IFC accessor function

IFC registers can be of type Little Endian or big Endian depending upon
Freescale SoC. Here SoC defines the register type of IFC IP.

So use IFC acessor functions instead of in_be32().

Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agot104xrdb: Add Errata A_007662, A_008007 workaround in pbi.cfg
Priyanka Jain [Wed, 17 Sep 2014 10:27:54 +0000 (15:57 +0530)]
t104xrdb: Add Errata A_007662, A_008007 workaround in pbi.cfg

-A_007662 states that for x1 link width, PCIe2 controller trains in
 Gen1 speed while configured for Gen2 speed.
 Workaround:Set the width to x1 and speed to Gen2 by writing to
 CCSR registers in PBI phase

-A_008007 states that PVR register may show random value.
 Workaround: Reset PVR register using DCSR space in PBI phase

Add PBI based software workaround for A_007662 and A_008007
in t104x_pbi.cfg. This is required for SPL-based bootloaders
like NAND-boot, SD-boot, SPI-boot

Signed-off-by: Priyanka Jain <Priyanka.Jain@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agopowerpc/t4rdb: Add support of CPLD
Chunhe Lan [Fri, 12 Sep 2014 06:47:09 +0000 (14:47 +0800)]
powerpc/t4rdb: Add support of CPLD

This support of CPLD includes

    - Files and register definitions
    - Command to switch alternate bank
    - Command to switch default bank

Signed-off-by: Chunhe Lan <Chunhe.Lan@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
9 years ago85xx/b4:Correct USB DR controller liodn entry
ramneek mehresh [Thu, 21 Aug 2014 12:22:17 +0000 (17:52 +0530)]
85xx/b4:Correct USB DR controller liodn entry

LIODN entry for B4860/B4420 mentions USB controller as "mph"
insread of "dr". This results in PAMU not permitting bus
transactions for USB DR controller on B4860 resulting in
USB function failure. Replacing "fsl-usb2-mph" with
"fsl-usb2-dr" allows USB DR controller bus transactions

Signed-off-by: Poonam Aggrwal <poonam.aggrwal@freescale.com>
Signed-off-by: Ramneek Mehresh <ramneek.mehresh@freescale.com>
Reviewed-by: Sethi Varun-B16395 <Varun.Sethi@freescale.com>
Reviewed-by: Sun Yusong-R58495 <yorksun@freescale.com>
9 years agosbc8548: enable and test CONFIG_SYS_GENERIC_BOARD
Paul Gortmaker [Thu, 14 Aug 2014 14:42:52 +0000 (10:42 -0400)]
sbc8548: enable and test CONFIG_SYS_GENERIC_BOARD

Tested on the following baseline (note "dirty" since I enabled
ALT_BOOT in the config in order to use the alternate boot bank.)

Everything seems to work fine with no additional changes.  The
banner warning message is now gone.

 ---

U-Boot 2014.10-rc1-00075-ge49f14af1349-dirty (Aug 14 2014 - 10:26:15)

CPU:   8548E, Version: 2.1, (0x80390021)
Core:  e500, Version: 2.2, (0x80210022)
Clock Configuration:
       CPU0:990  MHz,
       CCB:396  MHz,
       DDR:198  MHz (396 MT/s data rate), LBC:99   MHz
L1:    D-cache 32 KiB enabled
       I-cache 32 KiB enabled
I2C:   ready
DRAM:  Detected UDIMM
    SDRAM: 128 MiB
256 MiB (DDR2, 64-bit, CL=3, ECC off)
Flash: 72 MiB
L2:    512 KiB enabled
*** Warning - bad CRC, using default environment

PCI: Host, 64 bit, 66 MHz, sync, arbiter
  00:01.0     - 8086:1026 - Network controller
PCI1: Bus 00 - 00

PCIe1: Root Complex, x1 gen1, regs @ 0xe000a000
  02:00.0     - 1148:9e00 - Network controller
PCIe1: Bus 01 - 02
In:    serial
Out:   serial
Err:   serial
Net:   eTSEC0 [PRIME], eTSEC1
Hit any key to stop autoboot:  0
=> ver

U-Boot 2014.10-rc1-00075-ge49f14af1349-dirty (Aug 14 2014 - 10:26:15)
powerpc-linux-gcc (GCC) 4.5.2
GNU ld (GNU Binutils) 2.21
=>

 ---

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agodriver/net/fm/memac_phy: set NEG bit for external MDIOs
Shaohui Xie [Wed, 13 Aug 2014 10:38:09 +0000 (18:38 +0800)]
driver/net/fm/memac_phy: set NEG bit for external MDIOs

NEG bit default is '1' for external MDIOs as per FMAN-v3 RM, but on some
platforms, e.g. T2080QDS, this bit is '0', which leads to MDIO failure
on XAUI PHY, so set this bit definitely to align with the RM.

Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agoFman/mEMAC: mEMAC fix for 10G MAC and PHY
Shaohui Xie [Wed, 13 Aug 2014 10:32:19 +0000 (18:32 +0800)]
Fman/mEMAC: mEMAC fix for 10G MAC and PHY

1. use Payload length check disable when enable MAC;
2. add XGMII support for setting MAC interface mode;
3. only enable auto negotiation for Non-XGMII mode;
4. return 0xffff if clause 22 is used to read 10G phy_id;

Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com>
Signed-off-by: Roy Zang <tie-fei.zang@freescale.com>
Acked-By: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agompc85xx/kmp204x: raise u-boot size to 768KB
Valentin Longchamp [Fri, 24 Oct 2014 08:11:16 +0000 (10:11 +0200)]
mpc85xx/kmp204x: raise u-boot size to 768KB

Until now this defined to be 512KB and the total binary size actually
was on the edge of this limit. Most of the powerpc boards have thus
moved to 768KB.

Since on the current kmp204x boards there is 1MB reserved for u-boot on
the SPI boot flash, there is no problem to set the limit to 768KB as
well to be on line with the other powerpc boards and to eventually
configure in some additional features (and binary size) to u-boot.

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agoMerge branch 'master' of git://git.denx.de/u-boot-sunxi
Tom Rini [Thu, 13 Nov 2014 15:35:13 +0000 (10:35 -0500)]
Merge branch 'master' of git://git.denx.de/u-boot-sunxi

9 years agoMerge branch 'master' of git://git.denx.de/u-boot-arm
Tom Rini [Thu, 13 Nov 2014 14:32:45 +0000 (09:32 -0500)]
Merge branch 'master' of git://git.denx.de/u-boot-arm

9 years agoarm: mx6: Fix missing Kconfig option for Novena
Marek Vasut [Thu, 13 Nov 2014 10:06:21 +0000 (11:06 +0100)]
arm: mx6: Fix missing Kconfig option for Novena

Add two missing Kconfig options for Novena and drop the SPL
from the Novena config.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Sean Cross <xobs@kosagi.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
9 years agosunxi: gmac: Update bananapi fixup to the new CONFIG_TARGET_<BOARD> structure
Zoltan HERPAI [Tue, 11 Nov 2014 12:21:26 +0000 (13:21 +0100)]
sunxi: gmac: Update bananapi fixup to the new CONFIG_TARGET_<BOARD> structure

The magic bit toucher needs to be updated to reflect the new board Kconfig structure

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
9 years agosun6i: ehci: Add sun6i ehci support
Hans de Goede [Fri, 7 Nov 2014 13:51:12 +0000 (14:51 +0100)]
sun6i: ehci: Add sun6i ehci support

Add support for the 2 ehci controllers found on the sun6i (A31) soc.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
Acked-by: Marek Vasut <marex@denx.de>
9 years agosunxi: ehci: Add proper Kconfig options to select the usb Vbus gpio-s
Hans de Goede [Fri, 7 Nov 2014 15:09:00 +0000 (16:09 +0100)]
sunxi: ehci: Add proper Kconfig options to select the usb Vbus gpio-s

Add proper Kconfig options to select the usb Vbus gpio-s, besides moving to
Kconfig being the right thing to do, an added advantage of this is that it
allows for boards without Vbus gpio-s.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agosun6i: Add Mele M9 board
Hans de Goede [Mon, 27 Oct 2014 22:29:49 +0000 (23:29 +0100)]
sun6i: Add Mele M9 board

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agosun6i: Enable SPL
Hans de Goede [Sat, 25 Oct 2014 18:18:10 +0000 (20:18 +0200)]
sun6i: Enable SPL

Enable the SPL now that we've all the necessary bits in place.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agosun6i: Poke magic sram controller register to avoid cache issues
Hans de Goede [Sun, 2 Nov 2014 15:55:09 +0000 (16:55 +0100)]
sun6i: Poke magic sram controller register to avoid cache issues

Without this the cache will only work in write-through mode, and as soon as
it is put in write-back mode things break.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agosun6i: Add dram initialization code
Hans de Goede [Sat, 25 Oct 2014 18:27:23 +0000 (20:27 +0200)]
sun6i: Add dram initialization code

Add full support for dram initialization, using a fixed clock and autodetection
of the memory organization (numbers of channels, bus-width, etc.).

This is based on dram_sun6i.c and dram.h from u-boot in the Allwinner A31 SDK,
extended with extra initialization sequences and the autodetect algorithm
from boot0.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agosun4i: Rename dram files to dram_sun4i.x
Hans de Goede [Sun, 2 Nov 2014 19:31:16 +0000 (20:31 +0100)]
sun4i: Rename dram files to dram_sun4i.x

In preparation for adding sun6i dram support.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agosun6i: Add cpucfg register definitions
Hans de Goede [Mon, 27 Oct 2014 22:59:27 +0000 (23:59 +0100)]
sun6i: Add cpucfg register definitions

Not used atm, for future use (e.g. PSCI).

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agosun6i: Add clock functions needed for SPL / DRAM init
Hans de Goede [Sat, 25 Oct 2014 18:16:33 +0000 (20:16 +0200)]
sun6i: Add clock functions needed for SPL / DRAM init

Add clock_init_safe and clockset_pll5 functions, as these are needed for
SPL support resp. DRAM init (which is needed for SPL too).

Also add some extra clock register constant defines.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agosun6i: Add basic axp221 driver
Oliver Schinagl [Fri, 26 Jul 2013 10:56:58 +0000 (12:56 +0200)]
sun6i: Add basic axp221 driver

The A31 uses the AXP221 pmic for various voltages.

Signed-off-by: Oliver Schinagl <oliver@schinagl.nl>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
--
Changes in v2:
-Rebase
Changes in v3:
-Add support for all dldo and aldo-s
-Add Kconfig option to select building AXP221 and to select voltage of
 dldo and aldo-s
Changes in v4:
-Add axp221_setbits helper function
-Use symbolic names for enabled bits in CTRL1 - CTRL3 registers

9 years agosun6i: Add new p2wi controller driver
Oliver Schinagl [Thu, 25 Jul 2013 12:07:42 +0000 (14:07 +0200)]
sun6i: Add new p2wi controller driver

The A31 uses a new push-pull two wire interface, which features higher
transfer speeds (upto 6 MHz) in theory. While the hardware can burst 8
bytes each time, this driver will only see very little use and thus is
limited to single byte transmission only.

Signed-off-by: Oliver Schinagl <oliver@schinagl.nl>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agozynq: zybo: Move CONFIG_DEFAULT_DEVICE_TREE to defconfig
Michal Simek [Thu, 13 Nov 2014 12:22:40 +0000 (13:22 +0100)]
zynq: zybo: Move CONFIG_DEFAULT_DEVICE_TREE to defconfig

This is a MIME GnuPG-signed message.  If you see this text, it means that
your E-mail or Usenet software does not support MIME signed messages.
The Internet standard for MIME PGP messages, RFC 2015, was published in 1996.
To open this message correctly you will need to install E-mail or Usenet
software that supports modern Internet standards.

Move CONFIG_DEFAULT_DEVICE_TREE from board config
directly to defconfig.

This patch removes compilation warning:
include/configs/zynq_zybo.h:24:0: warning: "CONFIG_DEFAULT_DEVICE_TREE"
redefined [enabled by default]
 #define CONFIG_DEFAULT_DEVICE_TREE zynq-zybo

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoMerge branch 'zynq' of git://www.denx.de/git/u-boot-microblaze
Tom Rini [Thu, 13 Nov 2014 13:38:17 +0000 (08:38 -0500)]
Merge branch 'zynq' of git://denx.de/git/u-boot-microblaze

9 years agokconfig: arm: move "armv8" define to arch/arm/Kconfig
Masahiro Yamada [Thu, 6 Nov 2014 02:39:27 +0000 (11:39 +0900)]
kconfig: arm: move "armv8" define to arch/arm/Kconfig

Commit 2e07c249a67e (kconfig: arm: introduce symbol for ARM CPUs)
collected the default values of CONFIG_SYS_CPU into arch/arm/Kconfig.

This commit moves "armv8" to there for consistency.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Georges Savoundararadj <savoundg@gmail.com>
9 years agokconfig: arm: select CPU_V7 for some new boards
Masahiro Yamada [Thu, 6 Nov 2014 02:39:26 +0000 (11:39 +0900)]
kconfig: arm: select CPU_V7 for some new boards

This commit adds "select CPU_V7" for some new boards that were not
covered by commit 2e07c249a67e
(kconfig: arm: introduce symbol for ARM CPUs).

Redundant "SYS_CPU" defines and "string" directives should be removed.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Stefan Roese <sr@denx.de>
Acked-by: Georges Savoundararadj <savoundg@gmail.com>
9 years agoARM: remove unused CPU directory
Masahiro Yamada [Thu, 13 Nov 2014 09:40:07 +0000 (18:40 +0900)]
ARM: remove unused CPU directory

There is no board with CPU "arm_intcm".

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
9 years agokbuild: Make scripts executable
Masahiro Yamada [Thu, 30 Oct 2014 02:06:14 +0000 (11:06 +0900)]
kbuild: Make scripts executable

The Makefiles call the respective interpreter explicitly, but this makes
it easier to use the scripts manually.

(This commit follows commit 06ed5c2bfaca of Linux Kernel)

Signed-off-by: Michal Marek <mmarek@suse.cz>
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
9 years agopowerpc: remove orphaned boards mcc200 and prs200
Nikita Kiryanov [Tue, 11 Nov 2014 13:46:05 +0000 (15:46 +0200)]
powerpc: remove orphaned boards mcc200 and prs200

mcc200 and prs200 are old and have no maintainer. Remove the boards.

This also removes the mcc200 specific 1bpp BMP support from
common/lcd.c

Cc: Wolfgang Denk <wd@denx.de>
Cc: Anatolij Gustschin <agust@denx.de>
Cc: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: York Sun <yorksun@freescale.com>
Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
9 years agokm_arm: convert the km_arm boards to the generic board support
Valentin Longchamp [Fri, 3 Oct 2014 09:46:53 +0000 (11:46 +0200)]
km_arm: convert the km_arm boards to the generic board support

This implies that all the km_kirkwood boards and their variants now are
using the generic board init sequence.

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
9 years agomalloc: Output region when debugging
Thierry Reding [Tue, 26 Aug 2014 15:34:22 +0000 (17:34 +0200)]
malloc: Output region when debugging

When DEBUG is set, output memory region used for malloc().

Signed-off-by: Thierry Reding <treding@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agoARM: cache-cp15: Use more accurate types
Thierry Reding [Tue, 26 Aug 2014 15:34:21 +0000 (17:34 +0200)]
ARM: cache-cp15: Use more accurate types

size_t is the canonical type to represent variables that contain a size.
Use it instead of signed integer. Physical addresses can be larger than
32-bit, so use a more appropriate type for them as well. phys_addr_t is
a type that is 32-bit on systems that use 32-bit addresses and 64-bit if
the system is 64-bit or uses a form of physical address extension to use
a larger address space on 32-bit systems. Using these types the same API
can be implemented on a wider range of systems.

Signed-off-by: Thierry Reding <treding@nvidia.com>
9 years agoARM: cache_v7: Various minor cleanups
Thierry Reding [Tue, 26 Aug 2014 15:34:20 +0000 (17:34 +0200)]
ARM: cache_v7: Various minor cleanups

Remove two gratuituous blank lines, uses u32 (instead of int) as the
type for values that will be written to a register, moves the beginning
of the variable declaration section to a separate line (rather than the
one with the opening brace) and keeps the function signature on a single
line where possible.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agoMerge branch 'master' of git://git.denx.de/u-boot-socfpga
Tom Rini [Tue, 11 Nov 2014 21:59:44 +0000 (16:59 -0500)]
Merge branch 'master' of git://git.denx.de/u-boot-socfpga

9 years agoMerge branch 'master' of git://git.denx.de/u-boot-usb
Tom Rini [Tue, 11 Nov 2014 21:59:25 +0000 (16:59 -0500)]
Merge branch 'master' of git://git.denx.de/u-boot-usb

9 years agoMerge branch 'master' of git://git.denx.de/u-boot-uniphier
Tom Rini [Tue, 11 Nov 2014 20:49:10 +0000 (15:49 -0500)]
Merge branch 'master' of git://git.denx.de/u-boot-uniphier

9 years agoRevert "lib: bootm: add missing include"
Michal Simek [Tue, 11 Nov 2014 14:45:36 +0000 (15:45 +0100)]
Revert "lib: bootm: add missing include"

This is a MIME GnuPG-signed message.  If you see this text, it means that
your E-mail or Usenet software does not support MIME signed messages.
The Internet standard for MIME PGP messages, RFC 2015, was published in 1996.
To open this message correctly you will need to install E-mail or Usenet
software that supports modern Internet standards.

This reverts commit 1e96220a5687efae2aed45ce56e143336c40d0a7.

Remove duplicated vxworks.h header.
The same change was done by
"ARM: prevent compiler warnings from bootm.c"
(sha1: 8d196e52b58d1e50a80c2f5067b201cda521c75c)

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoARM: UniPhier: call pin_init() also in the normal boot
Masahiro Yamada [Tue, 11 Nov 2014 13:18:22 +0000 (22:18 +0900)]
ARM: UniPhier: call pin_init() also in the normal boot

CONFIG_UNIPHIER_SERIAL has been moved to Kconfig and
it is defined in ./.config but not in spl/.config,
so pin_init() should be called from the normal image
so that UART works correctly.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
9 years agoARM: UniPhier: consolidate board_postclk_init() function
Masahiro Yamada [Tue, 11 Nov 2014 13:18:21 +0000 (22:18 +0900)]
ARM: UniPhier: consolidate board_postclk_init() function

This commit merges
  arch/arm/cpu/armv7/uniphier/ph1-*/board_postclk_init.c
to
  arch/arm/cpu/armv7/uniphier/board_postclk_init.c

Because PH1-Pro4 does not have the BCU block, add __weak to
bcu_init().

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
9 years agoARM: UniPhier: decrease pre-reloc malloc area size
Masahiro Yamada [Tue, 11 Nov 2014 12:50:41 +0000 (21:50 +0900)]
ARM: UniPhier: decrease pre-reloc malloc area size

In the current implementation of the boot sequence of UniPhier
platform, 32KB temporary RAM is available before relocation.
The malloc area and the stack shares the 32KB area.

With CONFIG_SYS_MALLOC_F_LEN set to 0x7000 (28KB), only 0x1000 (4KB)
is left for the stack.  In some use cases, the system hangs up
with stack over-flow.

Even with driver-model UART enabled, the malloc area of 0x2000 (8KB)
should be enough.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
9 years agoARM: UniPhier: add set_pinsel macro for use in assembly code
Masahiro Yamada [Fri, 7 Nov 2014 12:08:52 +0000 (21:08 +0900)]
ARM: UniPhier: add set_pinsel macro for use in assembly code

The function sg_set_pinsel is useful for switching I/O pins
but it can be only used in C code.  This commit adds a simple
macro that is available in asm code.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
9 years agoARM: UniPhier: enable USB features
Masahiro Yamada [Fri, 7 Nov 2014 09:48:34 +0000 (18:48 +0900)]
ARM: UniPhier: enable USB features

FAT-formated USB storage device access is available.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
9 years agousb: UniPhier: add UniPhier on-chip EHCI host driver support
Masahiro Yamada [Fri, 7 Nov 2014 09:48:33 +0000 (18:48 +0900)]
usb: UniPhier: add UniPhier on-chip EHCI host driver support

Support EHCI host driver used on Panasonic UniPhier platform.
Since Device Tree is not supported on UniPhier yet, the base address
of USB cores are passed from board files (platdevice.c).

TODO for me:
Move the base address to device trees.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Marek Vasut <marex@denx.de>
9 years agoARM: UniPhier: add MIO register file
Masahiro Yamada [Fri, 7 Nov 2014 09:48:32 +0000 (18:48 +0900)]
ARM: UniPhier: add MIO register file

This commit adds register defines of MIO (Media I/O) block
of UniPhier platform.  This file is necessary to control
the reset signals of the USB cores.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
9 years agousb: add basic USB configs in Kconfig
Masahiro Yamada [Fri, 7 Nov 2014 09:48:31 +0000 (18:48 +0900)]
usb: add basic USB configs in Kconfig

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Marek Vasut <marex@denx.de>
9 years agoARM: UniPhier: add EHCI host pin settings for PH1-Pro4
Masahiro Yamada [Fri, 7 Nov 2014 09:33:52 +0000 (18:33 +0900)]
ARM: UniPhier: add EHCI host pin settings for PH1-Pro4

These IO pins are necessary for port power control and
over current detect.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
9 years agoARM: UniPhier: move DDR related configuration to Kconfig
Masahiro Yamada [Thu, 6 Nov 2014 11:16:42 +0000 (20:16 +0900)]
ARM: UniPhier: move DDR related configuration to Kconfig

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
9 years agoARM: UniPhier: reset on-board devices on start-up
Masahiro Yamada [Wed, 5 Nov 2014 05:25:15 +0000 (14:25 +0900)]
ARM: UniPhier: reset on-board devices on start-up

If a support card is attached to the main board, the on-board
SMSC9118 LAN controller is available.  It must be kept in reset
state for a while on start-up.

When the board is kicked via a debbuger rather than pushing the
hardware reset button, on-board chips are not reset; in this case
the reset signals should be asserted by software.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
9 years agoserial: UniPhier: borrow macros from linux/serial_reg.h
Masahiro Yamada [Thu, 30 Oct 2014 03:11:14 +0000 (12:11 +0900)]
serial: UniPhier: borrow macros from linux/serial_reg.h

The same bit-field macros are defined in include/linux/serial_reg.h
so let's include it and delete duplicated defines.

Also, remove unnecessary inclusion of <common.h>.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
9 years agokconfig: zynq: Add ZYBO board
Peter Crosthwaite [Thu, 28 Aug 2014 11:16:41 +0000 (21:16 +1000)]
kconfig: zynq: Add ZYBO board

Add a defconfig and Kconfigury for the Digilent ZYBO board.

Signed-off-by: Peter Crosthwaite <crosthwaite.peter@gmail.com>
Acked-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
Reviewed-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoconfigs: zynq: Add config support for ZYBO
Tinghui Wang [Thu, 28 Aug 2014 11:16:40 +0000 (21:16 +1000)]
configs: zynq: Add config support for ZYBO

This patch adds config support needed for ZYBO target and has
been tested on Rev. B ZYBO hardware.

Signed-off-by: Tinghui Wang <steven.wang@digilentinc.com>
[PC changes:
 * Dropped boards.cfg change (rebase conflict)
 * Dropped custom u-boot env
 * Added DTS
 * Misc forward-porting changes
]
Signed-off-by: Peter Crosthwiate <crosthwaite.peter@gmail.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoarm: dts: zynq: Add digilent ZYBO board dts
Peter Crosthwaite [Thu, 28 Aug 2014 11:16:39 +0000 (21:16 +1000)]
arm: dts: zynq: Add digilent ZYBO board dts

It's a Zynq board similar in design to the currently supported ones.
512MB of RAM and UART1 is used.

Signed-off-by: Peter Crosthwaite <crosthwaite.peter@gmail.com>
Acked-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agozynq: Use GPLed files for SPL
Soren Brinkmann [Thu, 30 Oct 2014 17:52:43 +0000 (10:52 -0700)]
zynq: Use GPLed files for SPL

The latest Xilinx tools generate ps7_init files that are explicitly
available under GPL. Change the makefile to allow drop in of those files
for building the SPL.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Acked-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
Reviewed-and-tested-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoPrepare v2015.01-rc1 v2015.01-rc1
Tom Rini [Mon, 10 Nov 2014 21:19:51 +0000 (16:19 -0500)]
Prepare v2015.01-rc1

Signed-off-by: Tom Rini <trini@ti.com>
9 years agoMerge branch 'master' of git://git.denx.de/u-boot-i2c
Tom Rini [Mon, 10 Nov 2014 14:20:52 +0000 (09:20 -0500)]
Merge branch 'master' of git://git.denx.de/u-boot-i2c

9 years agoMerge branch 'master' of git://git.denx.de/u-boot-blackfin
Tom Rini [Mon, 10 Nov 2014 14:20:38 +0000 (09:20 -0500)]
Merge branch 'master' of git://git.denx.de/u-boot-blackfin

9 years agoMerge branch 'master' of git://git.denx.de/u-boot-arm
Tom Rini [Sat, 8 Nov 2014 01:35:20 +0000 (20:35 -0500)]
Merge branch 'master' of git://git.denx.de/u-boot-arm

9 years agoAdded support for comments in input to mkenvimage.
Dominik Muth [Thu, 28 Aug 2014 10:25:27 +0000 (12:25 +0200)]
Added support for comments in input to mkenvimage.

This patch adds support for comments in the input to mkenvimage, i.e. in
the environment source: All lines starting with a # in the firs column
will be ignored.

Additionally empty lines will also be ignored.

Signed-off-by: Dominik Muth <dominik.muth@bkvibro.com>
9 years agoZFS: Clean up cppcheck warnings where relevant, leaked memory etc
Jorgen Lundman [Fri, 7 Nov 2014 01:08:35 +0000 (10:08 +0900)]
ZFS: Clean up cppcheck warnings where relevant, leaked memory etc

In a message from Wolfgang Denk highlighting warnings from cppcheck,
the patch will address those that are correctly diagnosed. Some are
false-positives:

> [fs/zfs/zfs.c:937]: (error) Memory leak: l
dmu_read() allocates "l" if successful, so error-case should not free
it.
> [fs/zfs/zfs.c:1141]: (error) Memory leak: dnbuf
dmu_read() allocates "dnbuf" if successful, so error-case should not
free it.
> [fs/zfs/zfs.c:1372]: (error) Memory leak: osp
zio_read() allocates "osp" if successful, so error-case should
not free it.
> [fs/zfs/zfs.c:1726]: (error) Memory leak: nvlist
int_zfs_fetch_nvlist() allocates "nvlist" if successful, so error-case
should not free it.

Signed-off-by: Jorgen Lundman <lundman@lundman.net>
9 years agoboard/esd/common/auto_update.c: fix Uninitialized variable
Wolfgang Denk [Thu, 6 Nov 2014 13:03:05 +0000 (14:03 +0100)]
board/esd/common/auto_update.c: fix Uninitialized variable

cppcheck reports:

[board/esd/common/auto_update.c:458]: (error) Uninitialized variable: cnt

The variable is not really used anywhere, so remove it.

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Matthias Fuchs <matthias.fuchs@esd-electronics.com>
Acked-by: Matthias Fuchs <matthias.fuchs@esd.eu>
9 years agoARM: MXS: fix Uninitialized variable error
Wolfgang Denk [Thu, 6 Nov 2014 13:03:04 +0000 (14:03 +0100)]
ARM: MXS: fix Uninitialized variable error

cppcheck reports:

[arch/arm/cpu/arm926ejs/mxs/timer.c:96]: (error) Uninitialized
variable: now

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Marek Vasut <marex@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
9 years agoi2c: rcar_i2c: Fix order of restart and clear status
Nobuhiro Iwamatsu [Tue, 4 Nov 2014 04:28:50 +0000 (13:28 +0900)]
i2c: rcar_i2c: Fix order of restart and clear status

In case of repeated START condition, the restart has to be kicked
before clear status (MSR register). If it is kicked after clear status,
R-Car I2C may transfer data (TXD register) or receive data (RXD register)
instead of transferring slave address (MAR register).

Signed-off-by: Ryo Kataoka <ryo.kataoka.wt@renesas.com>
Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
9 years agodrivers/i2c/fsl_i2c: Change CONFIG_I2C_TIMEOUT to 100ms
Shaveta Leekha [Mon, 3 Nov 2014 05:13:14 +0000 (10:43 +0530)]
drivers/i2c/fsl_i2c: Change CONFIG_I2C_TIMEOUT to 100ms

Some slow I2C devices like Power Monitor(ZM7304) at times
do not work well with low timeout value, so I2C bus get stuck
during read cycle with this device, changing it to 100ms from
10ms works fine

A lot of other i2c drivers like mxc and i2c drivers of BOOTROM
also use relax timeouts to give sufficient ticks to work well
with slower devices

Signed-off-by: Shaveta Leekha <shaveta@freescale.com>
Signed-off-by: Poonam Aggrwal <poonam.aggrwal@freescale.com>
9 years agoppc4xx: Handle i2c stuck on combined xfer
Dirk Eibach [Wed, 29 Oct 2014 14:56:44 +0000 (15:56 +0100)]
ppc4xx: Handle i2c stuck on combined xfer

ppc4xx i2c master gets stuck on errors while repeated start is
active. Can be easily reproduced by "i2c md" on an unpopulated
i2c address. There is not stop condition given, scl remains
pulled low.
The only way out seems to be doing a stop manually and then a
soft reset.

Signed-off-by: Dirk Eibach <dirk.eibach@gdsys.cc>
Reviewed-by: Stefan Roese <sr@denx.de>
9 years agoppc4xx: Fix i2c repeated start
Dirk Eibach [Wed, 29 Oct 2014 14:56:43 +0000 (15:56 +0100)]
ppc4xx: Fix i2c repeated start

Debugging some i2c trouble I saw on my scope that repeated
start is not working properply. The 4xx even held clock pulled down
after transfers. Having a look in the driver I realized
that IIC_CNTL_RPST is set on that part of the transfer that should
begin with a repeated start. But repeated start is about not sending a
stop condition, so IIC_CNTL_RPST has to be set on the last transfer
before the repeated start happens.

Signed-off-by: Dirk Eibach <dirk.eibach@gdsys.cc>
Reviewed-by: Stefan Roese <sr@denx.de>
9 years agobfin: the max bfin sdh block count is 127
Sonic Zhang [Fri, 15 Aug 2014 09:08:50 +0000 (17:08 +0800)]
bfin: the max bfin sdh block count is 127

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
9 years agobfin: make the CPU macro of LDR target more genenric
Sonic Zhang [Tue, 12 Aug 2014 10:45:26 +0000 (18:45 +0800)]
bfin: make the CPU macro of LDR target more genenric

Remove BFIN from the CPU macro in Makefile.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
9 years agousb_storage: blacklist Enclosure Service Devices
Soeren Moch [Sat, 8 Nov 2014 06:02:14 +0000 (07:02 +0100)]
usb_storage: blacklist Enclosure Service Devices

Skip enclosure service devices when probing for usb storage devices.

This avoids long timeouts when probing for external usb harddisks
which provide "Enclosure Services".

Signed-off-by: Soeren Moch <smoch@web.de>
--

This is a new version of the patch
"usb_storage: skip all unknown devices when probing"
http://http://lists.denx.de/pipermail/u-boot/2014-November/194622.html

Cc: Marek Vasut <marex@denx.de>
Cc: Tom Rini <trini@ti.com>
9 years agoboard/matrix_vision/mvblx/sys_eeprom.c: fix buffer overflow
Wolfgang Denk [Thu, 6 Nov 2014 13:03:02 +0000 (14:03 +0100)]
board/matrix_vision/mvblx/sys_eeprom.c: fix buffer overflow

Fix error detected by cppcheck:

[board/matrix_vision/mvblx/sys_eeprom.c:353]: (error) Buffer is
accessed out of bounds.

Signed-off-by: Wolfgang Denk <wd@denx.de>
cc: Michael Jones <michael.jones@matrix-vision.de>
Acked-by: Michael Jones <michael.jones@matrix-vision.de>
9 years agocommon/cmd_fitupd.c: restore corrupted file
Wolfgang Denk [Thu, 6 Nov 2014 13:03:01 +0000 (14:03 +0100)]
common/cmd_fitupd.c: restore corrupted file

This file got corrupted by the automatic editin of commit 1a45966 "Add
GPL-2.0+ SPDX-License-Identifier to source files"; restore the
opiginal content and manually insert the SPDX ID.

The bug was detected by running cppcheck, which reported:
[common/cmd_fitupd.c:8]: (error) Invalid number of character ({) when
these macros are defined: 'CONFIG_UPDATE_TFTP'.

Signed-off-by: Wolfgang Denk <wd@denx.de>
9 years agodrivers/net/uli526x.c: fix syntax error
Wolfgang Denk [Thu, 6 Nov 2014 13:03:00 +0000 (14:03 +0100)]
drivers/net/uli526x.c: fix syntax error

Fix error detected by cppcheck:

[drivers/net/uli526x.c:551]: (error) printf format string requires 3
parameters but only 2 are given.

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Roy Zang <tie-fei.zang@freescale.com>
9 years agoboard/cogent/lcd.c: fix syntax error
Wolfgang Denk [Thu, 6 Nov 2014 13:02:58 +0000 (14:02 +0100)]
board/cogent/lcd.c: fix syntax error

Fix error detected by cppcheck:

[board/cogent/lcd.c:237]: (error) Invalid number of character (()
when these macros are defined:
'CONFIG_SHOW_ACTIVITY;CONFIG_STATUS_LED'.

Signed-off-by: Wolfgang Denk <wd@denx.de>
9 years agocppcheck cleanup: fix nullPointer errors
Wolfgang Denk [Thu, 6 Nov 2014 13:02:57 +0000 (14:02 +0100)]
cppcheck cleanup: fix nullPointer errors

There are a number of places where U-Boot intentionally and legally
accesses physical address 0x0000, for example when installing
exception vectors on systems where these are located in low memory.

Add "cppcheck-suppress nullPointer" comments to silence cppcheck
where this is intentional and legal.

Signed-off-by: Wolfgang Denk <wd@denx.de>
9 years agodoc: fix documentation of out-of-tree build
Timo Ketola [Thu, 6 Nov 2014 12:39:05 +0000 (14:39 +0200)]
doc: fix documentation of out-of-tree build

Correct environment variable for output directory is KBUILD_OUTPUT.

Signed-off-by: Timo Ketola <timo@exertus.fi>
9 years agotools/env: Fix environment size and CRC on 64-bit hosts
Dominic Sacré [Tue, 4 Nov 2014 23:30:18 +0000 (00:30 +0100)]
tools/env: Fix environment size and CRC on 64-bit hosts

On architectures where 'long' is 64 bit, the u-boot environment
as seen by the fw_env tools was missing 4 bytes.
This patch fixes getenvsize(), and thus also ensures that the
environment's CRC32 checksum is calculated correctly.

Signed-off-by: Dominic Sacré <dominic.sacre@gmx.de>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Tom Rini <trini@ti.com>
9 years agoMAINTAINERS: CFI flash maintainership only includes the CFI related files
Stefan Roese [Fri, 31 Oct 2014 12:57:42 +0000 (13:57 +0100)]
MAINTAINERS: CFI flash maintainership only includes the CFI related files

All the other files in drivers/mtd/* are not really CFI related. So lets
only include the files that are CFI specific.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Heiko Schocher <hs@denx.de>
Cc: Scott Wood <scottwood@freescale.com>
Cc: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Jagan Teki <jagannadh.teki@gmail.com>
Acked-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
Acked-by: Heiko Schocher <hs@denx.de>
9 years agokbuild: sync misc scripts with Linux 3.18-rc1
Masahiro Yamada [Thu, 30 Oct 2014 02:06:13 +0000 (11:06 +0900)]
kbuild: sync misc scripts with Linux 3.18-rc1

This commit imports some updates in misc scripts from Linux 3.18-rc1.

[1] commit cbb4d3e6510b99522719c5ef0 by Horia Geanta
scripts/kernel-doc: handle object-like macros

[2] commit 164f0d2efaaef83 by Michal Marek
kbuild: Fix handling of backslashes in *.cmd files

[3] commit 270a00963cd367214e by Randy Dunlap
scripts/kernel-doc: recognize __meminit

[4] commit a4954fd7724c0f55361eb5 by Masahiro Yamada
  kbuild: remove obj-n and lib-n handling

[5] commit 5b2389b45d1a9c12b9f by Masahiro Yamada
kbuild: simplify build, clean, modbuiltin shorthands

Signed-off-by: Horia Geanta <horia.geanta@freescale.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
9 years agokconfig: sync kconfig files with Linux 3.18-rc1
Masahiro Yamada [Thu, 30 Oct 2014 02:06:12 +0000 (11:06 +0900)]
kconfig: sync kconfig files with Linux 3.18-rc1

This commit imports Kconfig updates from Linux 3.18-rc1.

'kvmconfig' and 'tinyconfig' help message have been commented out
since they are unavailable at least now;  in the future perhaps
we can implement 'tinyconfig' to disable most of CONFIG_CMD_* to
create a very small U-Boot image.

[1] commit 3aaefce10351 by Josh Triplett
x86, platform, kconfig: move kvmconfig functionality to a helper

[2] commit 0da1d4a0b951 by Josh Triplett
x86: Add "make tinyconfig" to configure the tiniest possible kernel

[3] commit c40724d3f381 by Brian Norris
  kconfig: lxdialog: fix spelling

[4] commit 7285996aa000 by Brian Norris
  kconfig: nconfig: fix multi-byte UTF handling

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
9 years agokbuild: sync top Makefile with Linux 3.18-rc1
Masahiro Yamada [Thu, 30 Oct 2014 02:06:11 +0000 (11:06 +0900)]
kbuild: sync top Makefile with Linux 3.18-rc1

Since Linux 3.15, relative path feature and related fixes,
cleanups have been merged to the top Makefile.

The relative path feature looks stable enough, so let's import it
to U-Boot along with various cleanups.

Commits imported from Linux (some need adjustment) are:

[1] commit 7e1c04779efd by Michal Marek
  kbuild: Use relative path for $(objtree)

[2] commit 890676c65d69 by Michal Marek
  kbuild: Use relative path when building in the source tree

[3] commit 9da0763bdd82 by Michal Marek
  kbuild: Use relative path when building in a subdir of the source tree

[4] commit c2e28dc975ea by Michal Marek
  kbuild: Print the name of the build directory

[5] commit 066b7ed95580 by Michal Marek
  kbuild: Do not print the build directory with make -s

[6] commit 3f1d9a6cec01 by Michal Marek
  kbuild: make -s should be used with kernelrelease/kernelversion/image_name

[7] commit 7ff525712acf by Masahiro Yamada
  kbuild: fake the "Entering directory ..." message more simply

[8] commit 745a254322c8 by Masahiro Yamada
  kbuild: use $(Q) for sub-make target

[9] commit aa55c8e2f7a3 by Masahiro Yamada
  kbuild: handle C=... and M=... after entering into build directory

[10] commit ab7474ea5361 by Borislav Petkov
  Kbuild: Ignore GREP_OPTIONS env variable

To use relative path feature, tools/Makefile and scripts/Makefile.autoconf
must be tweaked.

Signed-off-by: Michal Marek <mmarek@suse.cz>
Signed-off-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
9 years agokbuild: improve multi-objs dependency and cleanups
Masahiro Yamada [Thu, 30 Oct 2014 02:06:10 +0000 (11:06 +0900)]
kbuild: improve multi-objs dependency and cleanups

Since Linux 3.18-rc1, Kbuild is able to handle multi-objs
dependency correctly, which also allows us futher cleanups
of some makefiles.

This commit imports those commits:

[1] commit c8589d1e9e01 by Masahiro Yamada
kbuild: handle multi-objs dependency appropriately

[2] commit 97e3226e6e98 by Masahiro Yamada
kbuild: handle the dependency of multi-objs hostprogs appropriately

[3] commit 022af62d0190 by Masahiro Yamada
kbuild: refactor script/kconfig/Makefile

[4] commit 221ecca6cafe by Masahiro Yamada
kbuild: remove redundant clean-files from scripts/kconfig/Makefile

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
9 years agokbuild: bug fixes and cleanups of Makefile.host
Masahiro Yamada [Thu, 30 Oct 2014 02:06:09 +0000 (11:06 +0900)]
kbuild: bug fixes and cleanups of Makefile.host

This commit imports updates of scripts/Makefile.host
from Linux 3.18-rc1.

Imported commits are:

[1] commit d8d9efe22709 by Masahiro Yamada
  kbuild: fix a typo in scripts/Makefile.host

[2] commit edb950c17de0 by Masahiro Yamada
  kbuild: fix a bug of C++ host program handling

[3] commit 62e2210798ed by Masahiro Yamada
  kbuild: drop shared library support from Makefile.host

[4] commit 663935593915 by Masahiro Yamada
  kbuild: clean up scripts/Makefile.host

[5] commit 1791ff7179f6 by Masahiro Yamada
  kbuild: clean-up and bug fix of scripts/Makefile.host

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
9 years agokbuild: remove "clobber" target
Masahiro Yamada [Thu, 30 Oct 2014 01:58:32 +0000 (10:58 +0900)]
kbuild: remove "clobber" target

Now we stick to Linux Kernel's build system, so squash
"clobber" to "clean" target.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
9 years agohush: make run_command() return an error on parsing failure
Rabin Vincent [Wed, 29 Oct 2014 22:21:41 +0000 (23:21 +0100)]
hush: make run_command() return an error on parsing failure

run_command() returns success even if the command had a syntax error;
correct this behaviour.

Signed-off-by: Rabin Vincent <rabin@rab.in>
Acked-by: Simon Glass <sjg@chromium.org)
9 years agohush: fix segfault on syntax error
Rabin Vincent [Wed, 29 Oct 2014 22:21:40 +0000 (23:21 +0100)]
hush: fix segfault on syntax error

Hush segfaults if it sees a syntax error while attempting to parse a
command:

 $ ./u-boot -c "'"
 ...
 syntax error
 Segmentation fault (core dumped)

This is due to a NULL pointer dereference of in_str->p in static_peek().
The problem is that the exit condition for the loop in
parse_stream_outer() checks for rcode not being -1, but rcode is only
ever 0 or 1.

Signed-off-by: Rabin Vincent <rabin@rab.in>
Acked-by: Simon Glass <sjg@chromium.org)
Tested-by: Simon Glass <sjg@chromium.org)
9 years agohush: return consistent codes from run_command()
Rabin Vincent [Wed, 29 Oct 2014 22:21:39 +0000 (23:21 +0100)]
hush: return consistent codes from run_command()

Attempting to run:
 - an empty string
 - a string with just spaces

returns different error codes, 1 for the empty string and 0
for the string with just spaces.  Make both of them return
0 for consistency.

Signed-off-by: Rabin Vincent <rabin@rab.in>
Acked-by: Simon Glass <sjg@chromium.org)
9 years agosandbox: init cli for -c
Rabin Vincent [Wed, 29 Oct 2014 22:21:38 +0000 (23:21 +0100)]
sandbox: init cli for -c

sandbox crashes if a variable is set in the -c command, because
hush's top_vars is not allocated.  Call cli_init() from sandbox
to ensure this is done before we execute the -c command.

 $ ./u-boot -c 'a=1'
 ...
 Segmentation fault (core dumped)

Signed-off-by: Rabin Vincent <rabin@rab.in>
Acked-by: Simon Glass <sjg@chromium.org)
Tested-by: Simon Glass <sjg@chromium.org)
9 years agodlmalloc: ensure gd is set for early alloc
Rabin Vincent [Wed, 29 Oct 2014 22:21:37 +0000 (23:21 +0100)]
dlmalloc: ensure gd is set for early alloc

Attempting to run the sandbox leads to a segfault, because some dynamic
libraries (outside of u-boot) attempt to use malloc() to allocate memory
before u-boot's gd variable is initialized.

Check for gd not being NULL in the SYS_MALLOC_F_LEN handling, so that
malloc() doesn't crash when called at this point.

 $ gdb -q --args ./u-boot
 (gdb) r
 Program received signal SIGSEGV, Segmentation fault.
 0x0000000000412b9b in malloc (bytes=bytes@entry=37) at common/dlmalloc.c:2184
 2184 if (!(gd->flags & GD_FLG_RELOC)) {
 (gdb) p gd
 $1 = (gd_t *) 0x0
 (gdb) bt
 #0  0x0000000000412b9b in malloc (bytes=bytes@entry=37) at common/dlmalloc.c:2184
 #1  0x00007ffff75bf8e1 in set_binding_values (domainname=0x7ffff11f4f12 "libgpg-error", dirnamep=0x7fffffffe168, codesetp=0x0)
     at bindtextdom.c:228
 #2  0x00007ffff75bfb4c in set_binding_values (codesetp=0x0, dirnamep=0x7fffffffe168, domainname=<optimized out>) at bindtextdom.c:350
 #3  __bindtextdomain (domainname=<optimized out>, dirname=0x7ffff11f4f00 "/usr/share/locale") at bindtextdom.c:348
 #4  0x00007ffff11eca17 in ?? () from /lib/x86_64-linux-gnu/libgpg-error.so.0
 #5  0x00007ffff7dea9fa in call_init (l=<optimized out>, argc=argc@entry=1, argv=argv@entry=0x7fffffffe208,
     env=env@entry=0x7fffffffe218) at dl-init.c:78
 #6  0x00007ffff7deaae3 in call_init (env=0x7fffffffe218, argv=0x7fffffffe208, argc=1, l=<optimized out>) at dl-init.c:36
 #7  _dl_init (main_map=0x7ffff7ffe1a8, argc=1, argv=0x7fffffffe208, env=0x7fffffffe218) at dl-init.c:126
 #8  0x00007ffff7ddd1ca in _dl_start_user () from /lib64/ld-linux-x86-64.so.2

Signed-off-by: Rabin Vincent <rabin@rab.in>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agopower_spi.c: Rewrite pmic_reg function
Tom Rini [Sat, 25 Oct 2014 11:38:31 +0000 (07:38 -0400)]
power_spi.c: Rewrite pmic_reg function

The pmic_spi_free function isn't ever used, and as the frameworks stand
today, cannot be, so remove it.  Integrate the probe function into
pmic_reg as it's not really a "probe" today.  Finally, add an err label
for the common failure cases.

Cc: Lukasz Majewski <l.majewski@samsung.com>
Cc: Przemyslaw Marczak <p.marczak@samsung.com>
Cc: Stefano Babic <sbabic@denx.de>
Signed-off-by: Tom Rini <trini@ti.com>
Acked-by: Stefano Babic <sbabic@denx.de>
9 years agoimage-fdt: boot_get_fdt() return value when no DTB exists
Noam Camus [Wed, 22 Oct 2014 14:17:49 +0000 (17:17 +0300)]
image-fdt: boot_get_fdt() return value when no DTB exists

I believe that when no DTB is around we should return 1.
This why I fixed such scenarious to not return zero anymore.
Else kernel might get NULL pointer to DTB which doesn't exists.

Signed-off-by: Noam Camus <noamc@ezchip.com>
9 years agopowerpc: o2dnt: convert to generic board
Anatolij Gustschin [Tue, 21 Oct 2014 20:31:26 +0000 (22:31 +0200)]
powerpc: o2dnt: convert to generic board

Signed-off-by: Anatolij Gustschin <agust@denx.de>
9 years agonet: smc911x: Keep MAC programmed
Marek Vasut [Sat, 11 Oct 2014 16:42:58 +0000 (18:42 +0200)]
net: smc911x: Keep MAC programmed

Make sure to keep the MAC address programmed in the SMC911x ADDRH
and ADDRL registers. Linux can read those registers to determine
the MAC address on EEPROM-less configurations.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Joe Hershberger <joe.hershberger@ni.com>
Cc: Tom Rini <trini@ti.com>
9 years agosort drivers/mmc/Makefile
Pavel Machek [Tue, 9 Sep 2014 13:16:10 +0000 (15:16 +0200)]
sort drivers/mmc/Makefile

Sort drivers/mmc makefile, as requested by wd.

Signed-off-by: Pavel Machek <pavel@denx.de>
Acked-by: Chin Liang See <clsee@altera.com>
9 years agogeneric-board: make compile-time noise for non-generic boards
Masahiro Yamada [Thu, 6 Nov 2014 18:32:07 +0000 (03:32 +0900)]
generic-board: make compile-time noise for non-generic boards

Commit 0f605c1501f6 (Start the deprecation process for generic board)
added a run-time warning message.  Let's be noisier for non-generic
boards to inform the dead line of the conversion.

This commit intentionally outputs a warning message to stdout.
We still have many unconverted boards.  If we print the message
to stderr, MAKEALL and buildman will report tons of broken boards
and really important information will be buried.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Marek Vasut <marex@denx.de>
Acked-by: Simon Glass <sjg@chromium.org>
Cc: Tom Rini <trini@ti.com>
9 years agoMerge git://git.denx.de/u-boot-ti
Tom Rini [Fri, 7 Nov 2014 21:18:35 +0000 (16:18 -0500)]
Merge git://git.denx.de/u-boot-ti

9 years agousb: eth: fix Makefile
Rene Griessl [Fri, 7 Nov 2014 15:53:47 +0000 (16:53 +0100)]
usb: eth: fix Makefile

fix obj-y term

Signed-off-by: Rene Griessl <rgriessl@cit-ec.uni-bielefeld.de>
9 years agousb: include <asm/cache.h> and <part.h> from include/usb.h
Masahiro Yamada [Fri, 7 Nov 2014 09:34:55 +0000 (18:34 +0900)]
usb: include <asm/cache.h> and <part.h> from include/usb.h

The header file include/usb.h references ARCH_DMA_MINALIGH and
block_dev_desc_t, thus it must include <asm/cache.h> and <part.h>.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
9 years agousb: rmobile: Use ARRAY_SIZE(usb_base_address) instead of CONFIG_USB_MAX_CONTROLLER_COUNT
Nobuhiro Iwamatsu [Tue, 4 Nov 2014 07:17:21 +0000 (16:17 +0900)]
usb: rmobile: Use ARRAY_SIZE(usb_base_address) instead of CONFIG_USB_MAX_CONTROLLER_COUNT

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
CC: Marek Vasut <marex@denx.de>
9 years agousb: ehci: fix Interrupt on Doorbell flag of USBCMD
Masahiro Yamada [Wed, 5 Nov 2014 14:11:10 +0000 (23:11 +0900)]
usb: ehci: fix Interrupt on Doorbell flag of USBCMD

CMD_IAAD (Interrupt on Async Advance Doorbell) is bit 6, not bit 5.
While we are here, sort the flags.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
9 years agoarm: socfpga: Add example UDC config
Marek Vasut [Tue, 4 Nov 2014 03:25:09 +0000 (04:25 +0100)]
arm: socfpga: Add example UDC config

Add example of an USB UDC configuration with DFU and UMS.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Chin Liang See <clsee@altera.com>
Cc: Dinh Nguyen <dinguyen@opensource.altera.com>
Cc: Vince Bridgers <vbridger@altera.com>
Acked-by: Pavel Machek <pavel@denx.de>
Cc: Stefan Roese <sr@denx.de>
Reviewed-by: Lukasz Majewski <l.majewski@samsung.com>