]> git.kernelconcepts.de Git - karo-tx-uboot.git/log
karo-tx-uboot.git
9 years agoboard/ls1021aqds: Add DDR4 support
York Sun [Thu, 11 Sep 2014 20:32:07 +0000 (13:32 -0700)]
board/ls1021aqds: Add DDR4 support

LS1021AQDS has a variant with DDR4 slot. This patch adds a new defconfig
for this variant to enable DDR4 support. RAW timing parameters are not
added for DDR4. The board timing parameters are only tuned for single-
rank 1600 and 1800MT/s with Micron DIMM 9ASF51272AZ-2G1A1 due to DIMM
availability.

Signed-off-by: York Sun <yorksun@freescale.com>
CC: Alison Wang <alison.wang@freescale.com>
9 years agodriver/ddr/fsl: Fix DDR4 driver
York Sun [Thu, 11 Sep 2014 20:32:06 +0000 (13:32 -0700)]
driver/ddr/fsl: Fix DDR4 driver

When accumulated ECC is enabled, the DQ_MAP for ECC[4:7] needs to be set
to 0, i.e. 0->0, 1->1, etc., required by controller logic, even these pins
are not actually connected.

Also fix a bug when reading from DDR register to use proper accessor for
correct endianess.

Signed-off-by: York Sun <yorksun@freescale.com>
9 years agoARMv8/ls2085a: Move u-boot location to make room for RCW
York Sun [Mon, 8 Sep 2014 19:20:02 +0000 (12:20 -0700)]
ARMv8/ls2085a: Move u-boot location to make room for RCW

When booting with SP, RCW resides at the beginning of IFC NOR flash.

Signed-off-by: York Sun <yorksun@freescale.com>
9 years agoARMv8/ls2085a: Enable secondary cores
York Sun [Mon, 8 Sep 2014 19:20:01 +0000 (12:20 -0700)]
ARMv8/ls2085a: Enable secondary cores

Spin table is at the very beginning of boot code. Each core has an individual
release address within the spin table, the ft_cpu_setup fn updates the
"cpu-release-addr" property of each cpu node with the corresponding release
address.

Also fix CPU_RELEASE_ADDR to point to secondary_boot_func.

Signed-off-by: York Sun <yorksun@freescale.com>
Signed-off-by: Arnab Basu <arnab.basu@freescale.com>
9 years agoarmv8/fsl-lsch3: Release secondary cores from boot hold off with Boot Page
York Sun [Mon, 8 Sep 2014 19:20:00 +0000 (12:20 -0700)]
armv8/fsl-lsch3: Release secondary cores from boot hold off with Boot Page

Secondary cores need to be released from holdoff by boot release
registers. With GPP bootrom, they can boot from main memory
directly. Individual spin table is used for each core. Spin table
and the boot page is reserved in device tree so OS won't overwrite.

Signed-off-by: York Sun <yorksun@freescale.com>
Signed-off-by: Arnab Basu <arnab.basu@freescale.com>
9 years agofdt_support: Make of_bus_default_count_cells non static
Arnab Basu [Mon, 8 Sep 2014 19:19:59 +0000 (12:19 -0700)]
fdt_support: Make of_bus_default_count_cells non static

of_bus_default_count_cells can be used to get the #address-cells
and #size-cells defined by the current node's parent node. This
is required when using of_read_number to read from FDT nodes that
can be 32 or 64 bytes depending on values defined by the parent.

Signed-off-by: Arnab Basu <arnab.basu@freescale.com>
CC: Scott Wood <scottwood@freescale.com>
9 years agofdt_support: Move of_read_number to fdt_support.h
Arnab Basu [Mon, 8 Sep 2014 19:19:58 +0000 (12:19 -0700)]
fdt_support: Move of_read_number to fdt_support.h

This is being done so that it can be used outside 'fdt_support.c'. Making
life more convenient when reading device node properties that can be 32
or 64 bits long.

Signed-off-by: Arnab Basu <arnab.basu@freescale.com>
Cc: Scott Wood <scottwood@freescale.com>
9 years agodriver/ddr/fsl: Fix tXP and tCKE
York Sun [Thu, 21 Aug 2014 23:13:22 +0000 (16:13 -0700)]
driver/ddr/fsl: Fix tXP and tCKE

The driver was written using old DDR3 spec which only covers low speeds.
The value would be suboptimal for higher speeds. Fix both timing according
to latest DDR3 spec, remove tCKE as an config option.

Signed-off-by: York Sun <yorksun@freescale.com>
9 years agoARMv8/ls2085a_emu: Enable DP-DDR as standalone memory block
York Sun [Wed, 13 Aug 2014 17:21:05 +0000 (10:21 -0700)]
ARMv8/ls2085a_emu: Enable DP-DDR as standalone memory block

DP-DDR is used for DPAA, separated from main memory pool for general
use. It has 32-bit bus width and use a standard DDR4 DIMM (64-bit).

Signed-off-by: York Sun <yorksun@freescale.com>
9 years agodriver/ddr: Restruct driver to allow standalone memory space
York Sun [Fri, 1 Aug 2014 22:51:00 +0000 (15:51 -0700)]
driver/ddr: Restruct driver to allow standalone memory space

U-boot has been initializing DDR for the main memory. The presumption
is the memory stays as a big continuous block, either linear or
interleaved. This change is to support putting some DDR controllers
to separated space without counting into main memory. The standalone
memory controller could use different number of DIMM slots.

Signed-off-by: York Sun <yorksun@freescale.com>
9 years agoboard/ls2085a: Add support of NOR and NAND flash for simulator
Prabhakar Kushwaha [Wed, 16 Jul 2014 03:51:12 +0000 (09:21 +0530)]
board/ls2085a: Add support of NOR and NAND flash for simulator

Add support of NOR and NAND flash for simulator target.
Here
  IFC - CS0: NOR flash
  IFC - CS1: NAND flash

Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agodriver/mtd: Use generic timer API for FSL IFC, eLBC
Prabhakar Kushwaha [Tue, 23 Sep 2014 04:27:47 +0000 (09:57 +0530)]
driver/mtd: Use generic timer API for FSL IFC, eLBC

Freescale's flash control driver is using architecture specific timer API
i.e. usec2ticks

Replace usec2ticks with get_timer() (generic timer API)

Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
Acked-by: Scott Wood <scottwood@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agoboard/ls2085a: Update env_addr after NOR flash relocation
Prabhakar Kushwaha [Mon, 14 Jul 2014 11:45:44 +0000 (17:15 +0530)]
board/ls2085a: Update env_addr after NOR flash relocation

LS2085a has 2 regions in system memory map. Region1 is default map from
where system boots. Once u-boot is moved to DDR, IFC is re-mapped to
Region2.

So, update gd->env_addr to reflect correct address.

Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agoMerge git://git.denx.de/u-boot-dm
Tom Rini [Tue, 23 Sep 2014 19:21:43 +0000 (15:21 -0400)]
Merge git://git.denx.de/u-boot-dm

9 years agodm: avoid dev->req_seq overflow
Robert Baldyga [Thu, 18 Sep 2014 15:13:07 +0000 (17:13 +0200)]
dm: avoid dev->req_seq overflow

Since dev->req_seq value is initialized from "reg" property of fdt node,
there is posibility, that address value contained in fdt is greater than
INT_MAX, and then value in dev->req_seq is negative which led to probe()
fail.

This patch fix this problem by ensuring that req_seq is positive, unless
it's one of errno codes.

Signed-off-by: Robert Baldyga <r.baldyga@samsung.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agodm: serial: Don't require device tree to configure a console
Simon Glass [Wed, 17 Sep 2014 15:02:40 +0000 (09:02 -0600)]
dm: serial: Don't require device tree to configure a console

Allow serial_find_console_or_panic() to work without a device tree.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agodm: core: Allow device_bind() to used without CONFIG_OF_CONTROL
Simon Glass [Wed, 17 Sep 2014 15:02:38 +0000 (09:02 -0600)]
dm: core: Allow device_bind() to used without CONFIG_OF_CONTROL

The sequence number support in driver model requires device tree control.
It should be skipped if CONFIG_OF_CONTROL is not defined, and should not
require functions from fdtdec.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agosf: Add an empty entry to the parameter list
Simon Glass [Mon, 15 Sep 2014 12:33:36 +0000 (06:33 -0600)]
sf: Add an empty entry to the parameter list

The list is supposed to be terminated with a NULL name, but is not. If a
board probes a chip which does not appear in the table, U-Boot will crash
(at least on sandbox).

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agodm: Fix repeated comment in README
Simon Glass [Mon, 15 Sep 2014 12:33:18 +0000 (06:33 -0600)]
dm: Fix repeated comment in README

A merge error ended up repeating a similar sentence twice. Fix it.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agoMerge branch 'misc' of git://git.denx.de/u-boot-x86
Tom Rini [Tue, 23 Sep 2014 14:52:18 +0000 (10:52 -0400)]
Merge branch 'misc' of git://git.denx.de/u-boot-x86

9 years agopatman: Add a -m option to avoid copying the maintainers
Simon Glass [Mon, 15 Sep 2014 02:23:17 +0000 (20:23 -0600)]
patman: Add a -m option to avoid copying the maintainers

The get_maintainers script is a useful default, but sometimes is copies
too many people, or takes a long time to run.

Add an option to disable it and update the README.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agobuildman: Fix the logic for the bloat command
Simon Glass [Mon, 15 Sep 2014 02:23:16 +0000 (20:23 -0600)]
buildman: Fix the logic for the bloat command

This check should now be done whatever mode buildman is running in, since
we may be displaying information while building.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agosandbox: Update minor documentation changes
Jagannadha Sutradharudu Teki [Sun, 31 Aug 2014 15:49:43 +0000 (21:19 +0530)]
sandbox: Update minor documentation changes

- Use _defconfig instead of _config, but still _config is working.
- Corrected README.sandbox path in ./README

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agoMerge branch 'u-boot-ti/master' into 'u-boot-arm/master'
Albert ARIBAUD [Sun, 21 Sep 2014 14:56:44 +0000 (16:56 +0200)]
Merge branch 'u-boot-ti/master' into 'u-boot-arm/master'

9 years agoARM: at91sam9rlek: convert to generic board support
Wu, Josh [Tue, 2 Sep 2014 10:14:11 +0000 (18:14 +0800)]
ARM: at91sam9rlek: convert to generic board support

Signed-off-by: Josh Wu <josh.wu@atmel.com>
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
9 years agoARM: at91sam9n12ek: convert to generic board support
Wu, Josh [Tue, 2 Sep 2014 10:13:23 +0000 (18:13 +0800)]
ARM: at91sam9n12ek: convert to generic board support

Signed-off-by: Josh Wu <josh.wu@atmel.com>
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
9 years agomtd: atmel_nand: Disable subpage NAND write when using Atmel PMECC
Boris BREZILLON [Tue, 2 Sep 2014 08:23:09 +0000 (10:23 +0200)]
mtd: atmel_nand: Disable subpage NAND write when using Atmel PMECC

Disable subpage write when using PMECC to prevent buggy partial page write.

This fix has been taken from linux sources (see commit
90445ff6241e2a13445310803e2efa606c61f276)

Signed-off-by: Boris BREZILLON <boris.brezillon@free-electrons.com>
Acked-by: Josh Wu <josh.wu@atmel.com>
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
9 years agoUSB: ehci-atmel: use pcr to enable or disable clock
Bo Shen [Wed, 6 Aug 2014 09:24:57 +0000 (17:24 +0800)]
USB: ehci-atmel: use pcr to enable or disable clock

If the SoC has pcr, we use pcr (peripheral control register)
to enable or disable clock.

Signed-off-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
9 years agoUSB: ohci-at91: use pcr to enable or disable clock
Bo Shen [Wed, 6 Aug 2014 09:24:56 +0000 (17:24 +0800)]
USB: ohci-at91: use pcr to enable or disable clock

If the SoC has pcr, we use pcr (peripheral control register)
to enable or disable clock.

Signed-off-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
9 years agoARM: atmel: add pcr related definition
Bo Shen [Wed, 6 Aug 2014 09:24:55 +0000 (17:24 +0800)]
ARM: atmel: add pcr related definition

Using CPU_HAS_PCR micro to present the SoC has pcr
(peripheral control register).

Signed-off-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
9 years agoARM: atmel: use pcr to enable or disable peripheral clock
Bo Shen [Wed, 6 Aug 2014 09:24:54 +0000 (17:24 +0800)]
ARM: atmel: use pcr to enable or disable peripheral clock

When use pcr (peripheral control register), then we won't need
to care about the peripheral ID.

Signed-off-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
9 years agoARM: atmel: sama5d3: add timings register
Bo Shen [Fri, 1 Aug 2014 08:37:09 +0000 (16:37 +0800)]
ARM: atmel: sama5d3: add timings register

Signed-off-by: Bo Shen <voice.shen@atmel.com>
Reviewed-by: Andreas Bießmann <andreas.devel@googlemail.com>
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
9 years agoARM: atmel: sama5d3xek: enable NOR flash support
Bo Shen [Fri, 18 Jul 2014 08:43:08 +0000 (16:43 +0800)]
ARM: atmel: sama5d3xek: enable NOR flash support

Signed-off-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
9 years agoARM: atmel: sama5d3xek: add nor flash init function
Bo Shen [Fri, 18 Jul 2014 08:43:07 +0000 (16:43 +0800)]
ARM: atmel: sama5d3xek: add nor flash init function

Add NOR flash hardware init function, including SMC and PIO
configuration.

Signed-off-by: Bo Shen <voice.shen@atmel.com>
Reviewed-by: Andreas Bießmann <andreas.devel@googlemail.com>
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
9 years agomtd: atmel-nand: use pmecc_readl(b)/pmecc_writel to access the pmecc register
Wu, Josh [Tue, 24 Jun 2014 10:18:06 +0000 (18:18 +0800)]
mtd: atmel-nand: use pmecc_readl(b)/pmecc_writel to access the pmecc register

We defined the macro pmecc_readl(b)/pmecc_writel for pmecc register access.
But in the driver we also use the readl(b)/writel.
To keep consistent, this patch make all use pmecc_readl(b)/pmecc_writel.

Signed-off-by: Josh Wu <josh.wu@atmel.com>
Reviewed-by: Andreas Bießmann <andreas.devel@googlemail.com>
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
9 years agoam335x_evm: Add boot script support to am335x_evm
Guillaume GARDET [Thu, 11 Sep 2014 07:23:08 +0000 (09:23 +0200)]
am335x_evm: Add boot script support to am335x_evm

This patch adds boot script support to am335x_evm

Signed-off-by: Guillaume GARDET <guillaume.gardet@free.fr>
Cc: Tom Rini <trini@ti.com>
9 years agoOMAP4: Use generic 'load' command instead of 'fatload' for 'loadbootscript' and ...
Guillaume GARDET [Fri, 5 Sep 2014 13:32:46 +0000 (15:32 +0200)]
OMAP4: Use generic 'load' command instead of 'fatload' for 'loadbootscript' and 'loadbootenv' as already done for 'loadimage' and 'loaduimage'.

This patch uses generic 'load' command instead of 'fatload' for 'loadbootscript' and 'loadbootenv' as already done for 'loadimage' and 'loaduimage' for OMAP4 boards.

This allows to use EXT partition instead of FAT, while keeping FAT compatibility.

Signed-off-by: Guillaume GARDET <guillaume.gardet@free.fr>
Cc: Tom Rini <trini@ti.com>
9 years agoARM: keystone: ddr3: workaround for ddr3a/3b memory issue
Murali Karicheri [Wed, 10 Sep 2014 12:54:59 +0000 (15:54 +0300)]
ARM: keystone: ddr3: workaround for ddr3a/3b memory issue

This patch implements a workaround to fix DDR3 memory issue.
The code for workaround detects PGSR0 errors and then preps for
and executes a software-controlled hard reset.In board_early_init,
where logic has been added to identify whether or not the previous
reset was a PORz. PLL initialization is skipped in the case of a
software-controlled hard reset.

Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: Keegan Garcia <kgarcia@ti.com>
Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@ti.com>
9 years agokconfiglib: change SPDX-License-Identifier to ISC
Masahiro Yamada [Wed, 17 Sep 2014 04:37:45 +0000 (13:37 +0900)]
kconfiglib: change SPDX-License-Identifier to ISC

Commit f219e01311b2 (tools: Import Kconfiglib)
added SPDX GPL-2.0+ to this library by mistake.
It should be ISC.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Ulf Magnusson <ulfalizer@gmail.com>
9 years agoMerge branch 'master' of git://git.denx.de/u-boot-arm
Tom Rini [Wed, 17 Sep 2014 22:01:04 +0000 (18:01 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-arm

9 years agoMerge branch 'u-boot-imx/master' into 'u-boot-arm/master'
Albert ARIBAUD [Wed, 17 Sep 2014 21:35:34 +0000 (23:35 +0200)]
Merge branch 'u-boot-imx/master' into 'u-boot-arm/master'

9 years agoRevert "ARM: SPL: do not set gd again"
Tom Rini [Tue, 16 Sep 2014 15:08:46 +0000 (11:08 -0400)]
Revert "ARM: SPL: do not set gd again"

At the high level, the problem is that we set gd multiple times (and
still do, even after the commit we're reverting).  We set important
parts of gd to the copy which is not above stack but rather in the data
section.  For the release, we're going to revert this change and for the
next release we shall correct things to only, really, set gd once to an
appropriate location and ensure that comments about it are correct too.

This reverts commit f0c3a6c4ad09210d5d4aeafe87685ee75e5683d6.

Acked-by: Albert Aribaud <albert.u.boot@aribaud.net>
Signed-off-by: Tom Rini <trini@ti.com>
9 years agokconfig: armv8: move CONFIG_ARM64 to Kconfig
Masahiro Yamada [Sat, 13 Sep 2014 18:01:51 +0000 (03:01 +0900)]
kconfig: armv8: move CONFIG_ARM64 to Kconfig

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
9 years agovexpress64: kconfig: consolidate CONFIG_TARGET_VEXPRESS_AEMV8A_SEMI
Masahiro Yamada [Sat, 13 Sep 2014 18:01:50 +0000 (03:01 +0900)]
vexpress64: kconfig: consolidate CONFIG_TARGET_VEXPRESS_AEMV8A_SEMI

We do not have to distinguish CONFIG_TARGET_VEXPRESS_AEMV8A_SEMI
from CONFIG_TARGET_VEXPRESS_AEMV8A.  Rename the former to the latter.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Reviewed-by: Steve Rae <srae@broadcom.com>
Cc: David Feng <fenghua@phytium.com.cn>
9 years agonet: dns: fix for DNS queries sent to the wrong MAC address
Gerhard Sittig [Fri, 12 Sep 2014 06:48:15 +0000 (08:48 +0200)]
net: dns: fix for DNS queries sent to the wrong MAC address

When a DNS query is sent out, the ethernet packet can get directed to
the MAC address of a server that was communicated to before.  This is
wrong when the previously stored MAC address corresponds to a different
server's IP address, i.e. when the IP address of the previous and the
current communication are different.

The error can get reproduced by running a sequence of e.g. a TFTP
download and a DNS query, where the TFTP and DNS servers reside on
individual machines.

The fix is to clear the server's MAC address that might be left from a
previous operation, and to fetch the peer's MAC address in a new ARP
lookup, before the DNS query is sent.  This is the approach taken in
other network services, like 8e52533d1095 ("net: tftpsrv: Get correct
client MAC address").

Reported-by: Dirk Zimoch <dirk.zimoch@psi.ch>
Signed-off-by: Gerhard Sittig <gsi@denx.de>
9 years agokconfig: add sanity checks for SPL configuration
Masahiro Yamada [Wed, 10 Sep 2014 09:13:10 +0000 (18:13 +0900)]
kconfig: add sanity checks for SPL configuration

For the SPL configuration, "make <dir>/<target>" is used.
Here,
  <dir> is either "spl" or "tpl"
  <target> is one of "config", "menuconfig", "xconfig", etc.

This commit adds two checks:

[1] If <dir> is given an unsupported subimage, the configuration
    should error out like this:

  $ make qpl/menuconfig
  ***
  *** "make qpl/menuconfig" is not supported.
  ***

[2] Make sure that "CONFIG_SPL" is enabled in the ".config" before
    running "make spl/menuconfig.  Otherwise, the SPL image
    is not built at all.  Having "spl/.config" makes no sense.
    In such a case, the configuration should exit with a message:

  $ make spl/menuconfig
  ***
  *** Create ".config" with "CONFIG_SPL" enabled
  *** before "make spl/menuconfig".
  ***

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Suggested-by: Simon Glass <sjg@chromium.org>
9 years agonet: usb: Add SMSC copyright to smsc95xx driver
Simon Glass [Mon, 8 Sep 2014 19:44:14 +0000 (13:44 -0600)]
net: usb: Add SMSC copyright to smsc95xx driver

This driver was upstreamed without an SMSC copyright, even thought it seems
that SMSC was the original author.

See the kernel version for a code comparison:

http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=2f7ca802bdae2ca41022618391c70c2876d92190

It's not clear who actually moved this code, or whether the kernel was the
original source, or somewhere else, but it probably should still have the
SMSC copyright.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agomtdcore: Fix a build error with CONFIG_CMD_MTDPARTS_SPREAD
maxin.john@enea.com [Mon, 8 Sep 2014 17:04:16 +0000 (19:04 +0200)]
mtdcore: Fix a build error with CONFIG_CMD_MTDPARTS_SPREAD

This patch fixes the build error for CONFIG_CMD_MTDPARTS_SPREAD

Signed-off-by: Maxin B. John <maxin.john@enea.com>
9 years agomtd: nand: davinci_nand: update write_page function for keystone RBL
Khoronzhuk, Ivan [Sat, 6 Sep 2014 19:17:07 +0000 (22:17 +0300)]
mtd: nand: davinci_nand: update write_page function for keystone RBL

After mtd was synced with Linux 3.14
(ff94bc40af3481d47546595ba73c136de6af6929)
the number of parameters for write_page function of nand_chip was
changed. The additional two var were needed for subpage write.
As keystone has no supbage write they are not needed. So correct
only function definition by upgrading it's parameter list.
That helps to get ritd of compilation warning.

Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@ti.com>
9 years agogeneric_board: do not set gd->fdt_blob unless CONFIG_OF_CONTROL=y
Masahiro Yamada [Sat, 6 Sep 2014 14:39:00 +0000 (23:39 +0900)]
generic_board: do not set gd->fdt_blob unless CONFIG_OF_CONTROL=y

gd->fdt_blob is used for FDT control of U-Boot.
If CONFIG_OF_CONTROL is not defined, it is useless.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Simon Glass <sjg@chromium.org>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agokbuild: standalone: simplify clean-files
Masahiro Yamada [Thu, 4 Sep 2014 16:56:52 +0000 (01:56 +0900)]
kbuild: standalone: simplify clean-files

Files added $(extra-) are removed by "make clean".
Besides, wildcard "*.srec *.bin" is simpler.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
9 years agoscripts/Makefile.clean: clean also $(extra-m) and $(extra-)
Masahiro Yamada [Thu, 4 Sep 2014 16:56:51 +0000 (01:56 +0900)]
scripts/Makefile.clean: clean also $(extra-m) and $(extra-)

This commit is a backport from Linux Kernel,
commit 9d5db8949f1ecf4019785b04d8986835d3c0e99e,
written by me.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
9 years agokconfig: show an error message when defconfig is not found
Masahiro Yamada [Thu, 4 Sep 2014 13:16:15 +0000 (22:16 +0900)]
kconfig: show an error message when defconfig is not found

When a non-existing defconfig is specified,
display an easy-to-understand message
(fake the error message on Linux Kernel):

  $ make foo_defconfig
  ***
  *** Can't find default configuration "confis/foo_defconfig"!
  ***

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
9 years agocommon: fix include guards for CONFIG_MP
Gabriel Huau [Wed, 3 Sep 2014 20:57:54 +0000 (13:57 -0700)]
common: fix include guards for CONFIG_MP

This was breaking the build for some boards:
MPC8536DS MPC8536DS_36BIT MPC8536DS_SDCARD MPC8536DS_SPIFLASH qemu-ppce500

Include only these features for some PPC boards if the configuration for MultiProcessor
is enabled.

Signed-off-by: Gabriel Huau <contact@huau-gabriel.fr>
Cc: Tom Rini <trini@ti.com>
Cc: York Sun <yorksun@freescale.com>
Acked-by: York Sun <yorksun@freescale.com>
9 years agokconfig: fix a bug of "make config"
Masahiro Yamada [Wed, 3 Sep 2014 20:41:34 +0000 (05:41 +0900)]
kconfig: fix a bug of "make config"

Since 3ff291f371fa9858426774f3732924bacb61ed1c
(kconfig: convert Kconfig helper script into a shell script),
"make config" is not working because of a missing '$' before '(Q)'.

Besides, "make config" should be invoked via scripts/multiconfig.sh
to avoid a warning message:
Kconfig:11:warning: environment variable KCONFIG_OBJDIR undefined

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agokconfig: fix savedefconfig to handle TPL correctly
Masahiro Yamada [Wed, 3 Sep 2014 20:41:33 +0000 (05:41 +0900)]
kconfig: fix savedefconfig to handle TPL correctly

Since 3ff291f371fa9858426774f3732924bacb61ed1c
(kconfig: convert Kconfig helper script into a shell script),
"make savedefconfig" of TPL boards has not been working.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.o.rg
Acked-by: Simon Glass <sjg@chromium.org>
9 years agokconfig: fix whitespace handling bug of savedefconfig
Masahiro Yamada [Wed, 3 Sep 2014 20:41:32 +0000 (05:41 +0900)]
kconfig: fix whitespace handling bug of savedefconfig

Commit 3ff291f371fa9858426774f3732924bacb61ed1c
(kconfig: convert Kconfig helper script into a shell script)
introduced another regression.

Shell usually handles whitespaces as separators,
so "make saveconfig" outputs

  # CONFIG_FOO is not set

into:

  #
  CONFIG_FOO
  is
  not
  set

Whitespaces should not be treated as separators here.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agokconfig: fix savedefconfig to output empty defconfig
Masahiro Yamada [Wed, 3 Sep 2014 20:41:31 +0000 (05:41 +0900)]
kconfig: fix savedefconfig to output empty defconfig

Commit 3ff291f371fa9858426774f3732924bacb61ed1c
(kconfig: convert Kconfig helper script into a shell script)
introduced a minor regression.

make alldefconfig; make savedefconfig
should create an empty 'defconfig'.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agostandalone: use GCC_VERSION defined in compiler-gcc.h
Masahiro Yamada [Wed, 3 Sep 2014 17:40:59 +0000 (02:40 +0900)]
standalone: use GCC_VERSION defined in compiler-gcc.h

Now GCC_VERSION is defined in include/linux/compiler-gcc.h
(with a little different definition).
Use it and delete the one in examples/standlone/stub.c.

This should work on Clang too because __GNUC__, __GNUC_MINOR__,
__GNUC_PATCHLEVEL__ are also defined on Clang.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Jeroen Hofstee <jeroen@myspectrum.nl>
9 years agocompiler*.h: sync include/linux/compiler*.h with Linux 3.16
Masahiro Yamada [Wed, 3 Sep 2014 17:40:58 +0000 (02:40 +0900)]
compiler*.h: sync include/linux/compiler*.h with Linux 3.16

Copy them from Linux v3.16 tag.
My main motivation of this commit is to add compiler-clang.h.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Jeroen Hofstee <jeroen@myspectrum.nl>
9 years agoimplement the Android sparse image format
Steve Rae [Wed, 3 Sep 2014 17:05:54 +0000 (10:05 -0700)]
implement the Android sparse image format

update to provide usable implementation to U-Boot

Signed-off-by: Steve Rae <srae@broadcom.com>
9 years agocleanup code which handles the Android sparse image format
Steve Rae [Wed, 3 Sep 2014 17:05:53 +0000 (10:05 -0700)]
cleanup code which handles the Android sparse image format

- port dprintf() to debug()
- update formatting

Signed-off-by: Steve Rae <srae@broadcom.com>
9 years agoupdate code which handles Android sparse image format
Steve Rae [Wed, 3 Sep 2014 17:05:52 +0000 (10:05 -0700)]
update code which handles Android sparse image format

- remove unnecessary functions

Signed-off-by: Steve Rae <srae@broadcom.com>
9 years agoadd code to handle Android sparse image format
Steve Rae [Wed, 3 Sep 2014 17:05:51 +0000 (10:05 -0700)]
add code to handle Android sparse image format

Add original file (pristine) from :
  https://www.codeaurora.org/cgit/quic/la/kernel/lk/plain/app/aboot/aboot.c?h=master
[3b5092d20bd15a7a2879c13e9f64acc48d04af2d]

Signed-off-by: Steve Rae <srae@broadcom.com>
9 years agocmd_mem: add static to internally used functions
Masahiro Yamada [Wed, 3 Sep 2014 15:38:26 +0000 (00:38 +0900)]
cmd_mem: add static to internally used functions

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agokgdb: Remove first_entry for kgdb
Peng Fan [Mon, 1 Sep 2014 13:48:07 +0000 (21:48 +0800)]
kgdb: Remove first_entry for kgdb

There are two ways to run into handle_exception, run command 'kgdb' and
encounter a breakpoint which triggers exception handling.

The origin source code only saves regs when first run command 'kgdb'.
Take the following for example, When run 'kgdb', regs is saved to entry_regs.
When run 'bootz', regs is not saved. However, if we set a breakpoint, then
continue. When breakpoint is reached, run `quit`, and Now return to the
instruction which follows kgdb, but not bootz.This may cause errors. So,
save regs for each handle_exception call to return to the correct place.
Example:
Target      |    Host
=>kgdb      |    (gdb)b bootz
            |    (gdb)c
=>bootz     |
            |    (gdb)Here stop because of breakpoint
            |    (gdb)q

Signed-off-by: Peng Fan <van.freenix@gmail.com>
9 years agotools/genboardscfg.py: improve performance more with Kconfiglib
Masahiro Yamada [Mon, 1 Sep 2014 10:57:38 +0000 (19:57 +0900)]
tools/genboardscfg.py: improve performance more with Kconfiglib

The idea of using Kconfiglib was given by Tom Rini.
It allows us to scan lots of defconfigs very quickly.
This commit also uses multiprocessing for further acceleration.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Suggested-by: Tom Rini <trini@ti.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agotools: Import Kconfiglib
Masahiro Yamada [Mon, 1 Sep 2014 10:57:37 +0000 (19:57 +0900)]
tools: Import Kconfiglib

Kconfiglib is the flexible Python Kconfig parser and library
created by Ulf Magnusson.
(https://github.com/ulfalizer/Kconfiglib)

This commit imports kconfiglib.py from
commit ce84c22e58fa59cb93679d4ead03c3cd1387965e,
with ISC SPDX-License-Identifier.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Signed-off-by: Ulf Magnusson <ulfalizer@gmail.com>
Cc: Ulf Magnusson <ulfalizer@gmail.com>
Cc: Wolfgang Denk <wd@denx.de>
9 years agoSPDX: Add ISC SPDX-License-Identifier
Masahiro Yamada [Mon, 1 Sep 2014 10:57:36 +0000 (19:57 +0900)]
SPDX: Add ISC SPDX-License-Identifier

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Wolfgang Denk <wd@denx.de>
9 years agokbuild: force to define __UBOOT__ in all the C sources
Masahiro Yamada [Sun, 31 Aug 2014 06:16:53 +0000 (15:16 +0900)]
kbuild: force to define __UBOOT__ in all the C sources

U-Boot has imported various source files from other projects,
mostly Linux.

Something like

  #ifdef __UBOOT__
    [ modification for U-Boot ]
  #else
    [ original code ]
  #endif

is an often used strategy for clarification of adjusted parts,
that is, easier re-sync in future.

Instead of defining __UBOOT__ in each source file,
passing it from the top Makefile would be easier.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Marek Vasut <marex@denx.de>
Acked-by: Heiko Schocher <hs@denx.de>
9 years agortl8169: Defer network packet processing
Thierry Reding [Thu, 28 Aug 2014 10:38:03 +0000 (12:38 +0200)]
rtl8169: Defer network packet processing

When network protocol errors occur (such as a file not being found on a
TFTP server), the processing done by the NetReceive() function will end
up calling the driver's .halt() implementation. However, after that the
device no longer has access to the memory buffers and will cause errors
such as this in the rtl_recv() function when trying to hand descriptors
back to the device:

pci_hose_bus_to_phys: invalid physical address

This can be fixed by deferring processing of network packets until the
descriptors have been handed back. That way rtl_halt() tearing down
network buffers is not going to prevent access to the buffers.

Reported-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
9 years agoopenrisc: Fix a few type cast related warnings
Vasili Galka [Tue, 26 Aug 2014 10:46:17 +0000 (13:46 +0300)]
openrisc: Fix a few type cast related warnings

Use size_t type for positive offsets instead of the loff_t type. The
later is defined as long long, which is larger than the pointer type
on OpenRISC architecture and therefore the following warning was
generated:

"warning: cast to pointer from integer of different size"

Signed-off-by: Vasili Galka <vvv444@gmail.com>
9 years agoFix a few printf argument verification warnings
Vasili Galka [Tue, 26 Aug 2014 10:45:48 +0000 (13:45 +0300)]
Fix a few printf argument verification warnings

The parameters of size_t type shall be formatted using "%zu" and not
using "%d".

Precision argument for the "%.*s" parameters shall be of int type.

Signed-off-by: Vasili Galka <vvv444@gmail.com>
9 years agocosmetic: README.scrapyard: add NIOS2 boards
Masahiro Yamada [Mon, 25 Aug 2014 01:37:49 +0000 (10:37 +0900)]
cosmetic: README.scrapyard: add NIOS2 boards

Commit 70fbc461 removed obsolete PCI5441 and PK1C20 boards.
This commit adds them to README.scrapyard and also fills
some commit IDs and dates for removed boards.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Thomas Chou <thomas@wytron.com.tw>
Acked-by: Thomas Chou <thomas@wytron.com.tw>
9 years agokconfig: remove redundant "string" type in arch and board Kconfigs
Masahiro Yamada [Sat, 13 Sep 2014 18:01:49 +0000 (03:01 +0900)]
kconfig: remove redundant "string" type in arch and board Kconfigs

Now the types of CONFIG_SYS_{ARCH, CPU, SOC, VENDOR, BOARD, CONFIG_NAME}
are specified in arch/Kconfig.

We can delete the ones in arch and board Kconfig files.

This commit can be easily reproduced by the following command:

find . -name Kconfig -a ! -path ./arch/Kconfig | xargs sed -i -e '
/config[[:space:]]SYS_\(ARCH\|CPU\|SOC\|\VENDOR\|BOARD\|CONFIG_NAME\)/ {
    N
    s/\n[[:space:]]*string//
}
'

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
9 years agokconfig: add CONFIG_SYS_{ARCH, CPU, ...} type def to arch/Kconfig
Masahiro Yamada [Sat, 13 Sep 2014 18:01:48 +0000 (03:01 +0900)]
kconfig: add CONFIG_SYS_{ARCH, CPU, ...} type def to arch/Kconfig

This commit adds the type definitions (+ help messages) of
CONFIG_SYS_{ARCH, CPU, SOC, VENDOR, BOARD, CONFIG_NAME} to arch/Kconfig,
which would save lots of type defs for taget boards.
(See also the next commit.)

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
9 years agoMerge branch 'master' of git://git.denx.de/u-boot-dm
Tom Rini [Sat, 13 Sep 2014 20:32:52 +0000 (16:32 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-dm

9 years agoMerge branch 'master' of git://git.denx.de/u-boot-arm
Tom Rini [Fri, 12 Sep 2014 15:27:46 +0000 (11:27 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-arm

9 years agoarm: Fix _start for CONFIG_SYS_DV_NOR_BOOT_CFG
Benoît Thébaudeau [Wed, 3 Sep 2014 21:32:34 +0000 (23:32 +0200)]
arm: Fix _start for CONFIG_SYS_DV_NOR_BOOT_CFG

The boards using CONFIG_SYS_DV_NOR_BOOT_CFG (i.e. calimain,
da850evm_direct_nor and enbw_cmc) had the _start symbol defined after
the CONFIG_SYS_DV_NOR_BOOT_CFG word rather than before it in
arch/arm/lib/vectors.S. Because of that, if by lack of luck
'gd->mon_len = (ulong)&__bss_end - (ulong)_start' (see setup_mon_len())
was a multiple of 4 kiB (see reserve_uboot()), then the last BSS word
overlapped the first word of the following reserved RAM area (or went
beyond the top of RAM without such an area) after relocation because
__image_copy_start did not match _start (see relocate_code()).

This was broken by commit 41623c9 'arm: move exception handling out of
start.S files', which defined _start twice (before and after the
CONFIG_SYS_DV_NOR_BOOT_CFG word), then by commit 0a26e1d 'arm: fix a
double-definition error of _start symbol', which kept the definition of
the _start symbol after the CONFIG_SYS_DV_NOR_BOOT_CFG word. This new
commit fixes this issue by restoring the original behavior, i.e. by
defining the _start symbol before the CONFIG_SYS_DV_NOR_BOOT_CFG word.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau.dev@gmail.com>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Cc: Manfred Rudigier <manfred.rudigier@omicron.at>
Cc: Christian Riesch <christian.riesch@omicron.at>
Cc: Sudhakar Rajashekhara <sudhakar.raj@ti.com>
Cc: Heiko Schocher <hs@denx.de>
9 years agoarm: Make reset position-independent
Benoît Thébaudeau [Wed, 3 Sep 2014 21:32:33 +0000 (23:32 +0200)]
arm: Make reset position-independent

Some boards, like mx31pdk and tx25, require the beginning of the SPL
code to be position-independent. For these two boards, this is because
they use the i.MX external NAND boot, which starts by executing the
first NAND Flash page from the NFC page buffer. The SPL then needs to
copy itself to its actual link address in order to free the NFC page
buffer and use it to load the non-SPL image from Flash before running
it. This means that the SPL runtime address differs from its link
address between the reset and the initial copy performed by
board_init_f(), so this part of the SPL binary must be
position-independent.

This requirement was broken by commit 41623c9 'arm: move exception
handling out of start.S files', which used an absolute address to branch
to the reset routine. This new commit restores the original behavior,
which just performed a relative branch. This fixes the boot of mx31pdk
and tx25.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau.dev@gmail.com>
Reported-by: Helmut Raiger <helmut.raiger@hale.at>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Cc: Magnus Lilja <lilja.magnus@gmail.com>
Cc: John Rigby <jcrigby@gmail.com>
Tested-by: Magnus Lilja <lilja.magnus@gmail.com>
9 years agoimx: mx6slevk: Change to use generic board
Ye.Li [Tue, 9 Sep 2014 06:51:58 +0000 (14:51 +0800)]
imx: mx6slevk: Change to use generic board

Enable CONFIG_SYS_GENERIC_BOARD for imx6slevk to use generic board.

Signed-off-by: Ye.Li <B37916@freescale.com>
9 years agoimx: mx6q/dlarm2: Change to use generic board
Ye.Li [Tue, 9 Sep 2014 06:51:57 +0000 (14:51 +0800)]
imx: mx6q/dlarm2: Change to use generic board

Enable the CONFIG_SYS_GENERIC_BOARD for imx6q/dl arm2 board to
use generic board.

Signed-off-by: Ye.Li <B37916@freescale.com>
9 years agoREADME.imximage: Fix the maximum DCD size
Fabio Estevam [Tue, 9 Sep 2014 15:28:18 +0000 (12:28 -0300)]
README.imximage: Fix the maximum DCD size

In commit 021e79c85371 ("tools: imximage: Fix the maximum DCD size for
mx53/mx6") we have fixed the maximum DCD size for mx53/mx53.

Do the same on the README document for consistency.

Reported-by: Jonas Karlsson <jonas.d.karlsson@gmail.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
9 years agoimx: Fix build of mx6sxsabresd
Stefano Babic [Wed, 10 Sep 2014 11:02:40 +0000 (13:02 +0200)]
imx: Fix build of mx6sxsabresd

Commit 224beb833e544b802f08765271cec07667d39669 add clock
enabling function for FEC, but the masks are not available
for SX processor and the mx6sxsabresd cannot be built clean.

Signed-off-by: Stefano Babic <sbabic@denx.de>
CC: Fabio Estevam <fabio.estevam@freescale.com>
CC: Nikita Kiryanov <nikita@compulab.co.il>
9 years agoREADME.clang: build command with clang
Jeroen Hofstee [Wed, 10 Sep 2014 18:08:52 +0000 (20:08 +0200)]
README.clang: build command with clang

Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
9 years agoMakefile: default to cc for host compiler
Jeroen Hofstee [Wed, 10 Sep 2014 18:08:51 +0000 (20:08 +0200)]
Makefile: default to cc for host compiler

Since the host compiler might not be gcc but e.g. clang
default to cc/c++ to invoke it.

cc: Masahiro Yamada <yamada.m@jp.panasonic.com>
cc: Tom Rini <trini@ti.com>
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
9 years agodm: tegra: Enable driver model for serial
Simon Glass [Thu, 4 Sep 2014 22:27:36 +0000 (16:27 -0600)]
dm: tegra: Enable driver model for serial

Use driver model for serial ports.

Since Tegra now uses driver model for serial, adjust the definition of
V_NS16550_CLK so that it is clear that this is only used for SPL.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agotegra: dts: Add serial port details
Simon Glass [Thu, 4 Sep 2014 22:27:35 +0000 (16:27 -0600)]
tegra: dts: Add serial port details

Some Tegra device tree files do not include information about the serial
ports. Add this and also add information about the input clock speed.

The console alias needs to be set up to indicate which port is used for
the console.

Also add a binding file since this is missing.

Series-changes; 5
- Add full serial port nodes from Linux tree (commit fc9d4dbe)
- Use /chosen/stdout-path instead of /aliases/console to specify the console

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agodm: serial: Add driver model support for ns16550
Simon Glass [Thu, 4 Sep 2014 22:27:34 +0000 (16:27 -0600)]
dm: serial: Add driver model support for ns16550

Add driver model support so that ns16550 can support operation both with
and without driver model.

The driver needs a clock frequency so cannot stand alone unfortunately. The
clock frequency must be provided by a separate driver.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agodm: serial: Collect common baud rate code in ns16550
Simon Glass [Thu, 4 Sep 2014 22:27:33 +0000 (16:27 -0600)]
dm: serial: Collect common baud rate code in ns16550

The same sequence is used in several places, so move it into a function.
Note that UART_LCR_BKSE is an alias for UART_LCR_DLAB.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agodm: serial: Move baud rate calculation to ns16550.c
Simon Glass [Thu, 4 Sep 2014 22:27:32 +0000 (16:27 -0600)]
dm: serial: Move baud rate calculation to ns16550.c

Move the function that calculates the baud rate divisor into ns16550.c so
it can be used by that file.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agosandbox: dts: Add a serial console node
Simon Glass [Thu, 4 Sep 2014 22:27:29 +0000 (16:27 -0600)]
sandbox: dts: Add a serial console node

If the sandbox device tree is provided to U-Boot (with the -d flag) then it
will use the device tree version in preference to the built-in device. The
only difference is the colour.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agosandbox: serial: Support a coloured console
Simon Glass [Thu, 4 Sep 2014 22:27:28 +0000 (16:27 -0600)]
sandbox: serial: Support a coloured console

The current sandbox serial driver is a pretty trivial example and does not
have the featues that might be needed for other board serial drivers. To
help provide a better example, add a text colour property to the device
tree for sandbox. This uses platform data, a device tree node, driver
private data and a remove() method.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agosandbox: Convert serial driver to use driver model
Simon Glass [Thu, 4 Sep 2014 22:27:27 +0000 (16:27 -0600)]
sandbox: Convert serial driver to use driver model

Adjust the sandbox serial driver to use the new driver model uclass. The
driver works much as before, but within the new framework.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agodm: Add a uclass for serial devices
Simon Glass [Thu, 4 Sep 2014 22:27:26 +0000 (16:27 -0600)]
dm: Add a uclass for serial devices

Serial devices support simple byte input/output and a few operations to find
out whether data is available. Add a basic uclass for serial devices to be
used by drivers that are converted to driver model.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agodm: Adjust lists_bind_fdt() to return the bound device
Simon Glass [Thu, 4 Sep 2014 22:27:25 +0000 (16:27 -0600)]
dm: Adjust lists_bind_fdt() to return the bound device

Allow the caller to find out the device that was bound in response to this
call.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agodm: fdt: Add a function to look up a chosen node
Simon Glass [Thu, 4 Sep 2014 22:27:24 +0000 (16:27 -0600)]
dm: fdt: Add a function to look up a chosen node

Within /chosen we may have a node which points to another node, similar
to how /aliases works. Add a helper function to do this lookup.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agoserial: Set up the 'priv' pointer when creating a serial device
Simon Glass [Thu, 4 Sep 2014 22:27:23 +0000 (16:27 -0600)]
serial: Set up the 'priv' pointer when creating a serial device

The stdio_dev structure has a private pointer for its creator, but it is
not set up by the serial system. Set it to point to the serial device so
that it can be found by code called by stdio.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agotegra: Convert tegra GPIO driver to use driver model
Simon Glass [Wed, 3 Sep 2014 23:37:03 +0000 (17:37 -0600)]
tegra: Convert tegra GPIO driver to use driver model

This is an implementation of GPIOs for Tegra that uses driver model. It has
been tested on trimslice and also using the new iotrace feature.

The implementation uses a top-level GPIO device (which has no actual GPIOS).
Under this all the banks are created as separate GPIO devices.

The GPIOs are named as per the Tegra datasheet/header files: A0..A7, B0..B7,
..., Z0..Z7, AA0..AA7, etc.

Since driver model is not yet available before relocation, or in SPL, a
special function is provided for seaboard's SPL code.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agodm: tegra: Set up a pre-reloc malloc()
Simon Glass [Wed, 3 Sep 2014 23:37:02 +0000 (17:37 -0600)]
dm: tegra: Set up a pre-reloc malloc()

Allocate 1KB so that driver model can operate before relocation.

Signed-off-by: Simon Glass <sjg@chromium.org>