platform/kernel/u-boot.git
8 years agospi: designware_spi: Use GENMASK
Jagan Teki [Thu, 22 Oct 2015 19:31:36 +0000 (01:01 +0530)]
spi: designware_spi: Use GENMASK

Replace numeric mask hexcodes with GENMASK macro
in designware_spi

Cc: Stefan Roese <sr@denx.de>
Cc: Marek Vasut <marex@denx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Jagan Teki <jteki@openedev.com>
8 years agospi: atmel_spi: Use GENMASK
Jagan Teki [Thu, 22 Oct 2015 19:29:00 +0000 (00:59 +0530)]
spi: atmel_spi: Use GENMASK

Replace numeric mask hexcodes with GENMASK macro
in atmel_spi

Cc: Bo Shen <voice.shen@atmel.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Jagan Teki <jteki@openedev.com>
8 years agospi: xilinx_spi: Use BIT macro
Jagan Teki [Thu, 22 Oct 2015 20:09:31 +0000 (01:39 +0530)]
spi: xilinx_spi: Use BIT macro

Replace numerical bit shift with BIT macro
in xilinx_spi

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

Cc: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Jagan Teki <jteki@openedev.com>
8 years agospi: ti_qspi: Use BIT macro
Jagan Teki [Thu, 22 Oct 2015 20:09:20 +0000 (01:39 +0530)]
spi: ti_qspi: Use BIT macro

Replace numerical bit shift with BIT macro
in ti_qspi

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

Reviewed-by: Vignesh R <vigneshr@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Jagan Teki <jteki@openedev.com>
8 years agospi: tegra: Use BIT macro
Jagan Teki [Thu, 22 Oct 2015 20:09:06 +0000 (01:39 +0530)]
spi: tegra: Use BIT macro

Replace numerical bit shift with BIT macro
in tegra*.c

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

Cc: Stephen Warren <swarren@wwwdotorg.org>
Cc: Tom Warren <twarren@nvidia.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Jagan Teki <jteki@openedev.com>
8 years agospi: sh_qspi: Use BIT macro
Jagan Teki [Thu, 22 Oct 2015 20:08:47 +0000 (01:38 +0530)]
spi: sh_qspi: Use BIT macro

Replace numerical bit shift with BIT macro
in sh_qspi

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

Cc: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Jagan Teki <jteki@openedev.com>
8 years agospi: omap3_spi: Use BIT macro
Jagan Teki [Thu, 22 Oct 2015 20:08:32 +0000 (01:38 +0530)]
spi: omap3_spi: Use BIT macro

Replace numerical bit shift with BIT macro
in omap3_spi

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

Cc: Nikita Kiryanov <nikita@compulab.co.il>
Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Jagan Teki <jteki@openedev.com>
8 years agospi: mpc8xxx_spi: Use BIT macro
Jagan Teki [Thu, 22 Oct 2015 20:08:07 +0000 (01:38 +0530)]
spi: mpc8xxx_spi: Use BIT macro

Replace numerical bit shift with BIT macro
in mpc8xxx_spi

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

Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Jagan Teki <jteki@openedev.com>
8 years agospi: ich: Use BIT macro
Jagan Teki [Thu, 22 Oct 2015 20:07:56 +0000 (01:37 +0530)]
spi: ich: Use BIT macro

Replace numerical bit shift with BIT macro
in ich

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

Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Jagan Teki <jteki@openedev.com>
8 years agospi: fsl: Use BIT macro
Jagan Teki [Thu, 22 Oct 2015 20:07:18 +0000 (01:37 +0530)]
spi: fsl: Use BIT macro

Replace numerical bit shift with BIT macro
in fsl_*spi.c

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

Cc: York Sun <yorksun@freescale.com>
Cc: Haikun Wang <Haikun.Wang@freescale.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Jagan Teki <jteki@openedev.com>
8 years agospi: designware_spi: Use BIT macro
Jagan Teki [Thu, 22 Oct 2015 20:06:23 +0000 (01:36 +0530)]
spi: designware_spi: Use BIT macro

Replace numerical bit shift with BIT macro
in designware_spi

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

Cc: Stefan Roese <sr@denx.de>
Cc: Marek Vasut <marex@denx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Jagan Teki <jteki@openedev.com>
8 years agospi: cadence_qspi_apb: Use BIT macro
Jagan Teki [Thu, 22 Oct 2015 20:06:06 +0000 (01:36 +0530)]
spi: cadence_qspi_apb: Use BIT macro

Replace numerical bit shift with BIT macro
in cadence_qspi_apb

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

Cc: Stefan Roese <sr@denx.de>
Cc: Marek Vasut <marex@denx.de>
Acked-by: Vikas Manocha <vikas.manocha@st.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Jagan Teki <jteki@openedev.com>
8 years agospi: bfin_spi6xx: Use BIT macro
Jagan Teki [Thu, 22 Oct 2015 20:05:47 +0000 (01:35 +0530)]
spi: bfin_spi6xx: Use BIT macro

Replace numerical bit shift with BIT macro
in bfin_spi6xx

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

Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Jagan Teki <jteki@openedev.com>
8 years agospi: atmel_spi: Use BIT macro
Jagan Teki [Thu, 22 Oct 2015 20:05:26 +0000 (01:35 +0530)]
spi: atmel_spi: Use BIT macro

Replace numerical bit shift with BIT macro
in atmel_spi

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

Cc: Bo Shen <voice.shen@atmel.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Jagan Teki <jteki@openedev.com>
8 years agospi: zynq_[q]spi: Use GENMASK macro
Jagan Teki [Thu, 22 Oct 2015 15:36:37 +0000 (21:06 +0530)]
spi: zynq_[q]spi: Use GENMASK macro

GENMASK macro used on zynq_spi.c and zynq_qspi.c

GENMASK is used to create a contiguous bitmask([hi:lo]).
Ex: (0x7 << 3) => GENMASK(5, 3)

Cc: Michal Simek <michal.simek@xilinx.com>
Acked-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Jagan Teki <jteki@openedev.com>
8 years agospi: zynq_[q]spi: Use BIT macro
Jagan Teki [Thu, 22 Oct 2015 15:10:16 +0000 (20:40 +0530)]
spi: zynq_[q]spi: Use BIT macro

Used BIT macro on zynq_spi.c and zynq_qspi.c

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

Cc: Michal Simek <michal.simek@xilinx.com>
Acked-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Jagan Teki <jteki@openedev.com>
8 years agoocotea: Drop
Tom Rini [Sat, 24 Oct 2015 21:24:07 +0000 (17:24 -0400)]
ocotea: Drop

This board has not compiled for me for quite some time due to size
constraints, remove.

Cc: Stefan Roese <sr@denx.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Stefan Roese <sr@denx.de>
8 years agotaishan: Drop
Tom Rini [Sat, 24 Oct 2015 21:24:06 +0000 (17:24 -0400)]
taishan: Drop

This board has not compiled for me for quite some time due to size
constraints, remove.

Cc: Stefan Roese <sr@denx.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Stefan Roese <sr@denx.de>
8 years agoebony: Drop
Tom Rini [Sat, 24 Oct 2015 21:24:05 +0000 (17:24 -0400)]
ebony: Drop

This board has not compiled for me for quite some time due to size
constraints, remove.

Cc: Stefan Roese <sr@denx.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Stefan Roese <sr@denx.de>
8 years agotaihu: Remove
Tom Rini [Sat, 24 Oct 2015 21:24:04 +0000 (17:24 -0400)]
taihu: Remove

This board has not compiled for me for quite some time due to size
constraints, remove.

Cc: John Otken <jotken@softadvances.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Stefan Roese <sr@denx.de>
8 years agocfi_flash: use specific width types for cword
Ryan Harkin [Fri, 23 Oct 2015 15:50:51 +0000 (16:50 +0100)]
cfi_flash: use specific width types for cword

This patch changes the cword union to use specific length types that are
architecture indepented.

This patch also renames the members of the cword union to represent
their usage, i.e.:

    c  -> w8
    s  -> w16
    l  -> w32
    ll -> w64

Where "w" stands for "width" in bits.

I discovered this problem when enabling CFI flash on vexpress64.
cword.l was an unsigned long int, but it was intended to be 32 bits wide.
Unfortunately, it's 64-bits wide on a 64-bit system, meaning that a
64-bit system fails when attempting to use 32-bit wide CFI flash parts.

Similar problems also existed with the other cword sizes.

Signed-off-by: Ryan Harkin <ryan.harkin@linaro.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Stefan Roese <sr@denx.de>
8 years agoarm: ls1021a: Add QSPI or IFC support in SD boot
Alison Wang [Thu, 15 Oct 2015 09:54:40 +0000 (17:54 +0800)]
arm: ls1021a: Add QSPI or IFC support in SD boot

As QSPI and IFC are pin-multiplexed on LS1021A, only IFC is supported in
SD boot now. For the customer's demand, QSPI needs to be supported in SD
boot too.

This patch adds QSPI or IFC support in SD boot according to the
corresponding defconfig. For detail, ls1021atwr_sdcard_ifc_defconfig is
used to support IFC in SD boot and ls1021atwr_sdcard_qspi_defconfig is
used to support QSPI in SD boot.

Signed-off-by: Alison Wang <alison.wang@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
8 years agoQE: modify the address of qe ucode
Zhao Qiang [Wed, 16 Sep 2015 08:20:42 +0000 (16:20 +0800)]
QE: modify the address of qe ucode

The address of uboot changed, so change qe ucode

Signed-off-by: Zhao Qiang <B45475@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
8 years agoarmv8/fsl-lsch3: fdt: Check the pointer returned from call to a function may be NULL
Alison Wang [Tue, 1 Sep 2015 02:47:27 +0000 (10:47 +0800)]
armv8/fsl-lsch3: fdt: Check the pointer returned from call to a function may be NULL

Pointer 'reg' returned from call to function 'fdt_getprop' may be
NULL, will be passed to function and may be dereferenced there by
passing argument 1 to function 'of_read_number'. So check pointer
'reg' first.

Signed-off-by: Alison Wang <alison.wang@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
8 years agofdt_support: Don't panic if stdout alias is missing
Scott Wood [Wed, 2 Sep 2015 03:48:08 +0000 (22:48 -0500)]
fdt_support: Don't panic if stdout alias is missing

Currently, using fdt_fixup_stdout() on a device tree that is missing
the relevant alias results in this:

WARNING: could not set linux,stdout-path FDT_ERR_NOTFOUND.
ERROR: /chosen node create failed
 - must RESET the board to recover.

FDT creation failed! hanging...### ERROR ### Please RESET the board ###

There is no reason for this to be a fatal error rather than a warning,
and removing this allows for a smooth transition on a platform where
the device tree currently lacks the correct aliases but will have them
in the future.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Cc: Kumar Gala <galak@kernel.crashing.org>
Cc: Simon Glass <sjg@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: York Sun <yorksun@freescale.com>
8 years agoarm/fsl-ls: Add CONFIG_OF_STDOUT_VIA_ALIAS
Scott Wood [Tue, 1 Sep 2015 02:05:49 +0000 (21:05 -0500)]
arm/fsl-ls: Add CONFIG_OF_STDOUT_VIA_ALIAS

This will allow OF-based earlycon to be used once the appropriate
aliases are added to the device tree and kernel support is fixed.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
8 years agoUBI: Fastmap: Fix PEB array type
Heiko Schocher [Thu, 22 Oct 2015 04:19:22 +0000 (06:19 +0200)]
UBI: Fastmap: Fix PEB array type

The PEB array is an array of __be32, so let's fix the
scan_pool() prototype accordingly.

Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
Signed-off-by: Heiko Schocher <hs@denx.de>
8 years agoubi,ubifs: sync with linux v4.2
Heiko Schocher [Thu, 22 Oct 2015 04:19:21 +0000 (06:19 +0200)]
ubi,ubifs: sync with linux v4.2

sync with linux v4.2

commit 64291f7db5bd8150a74ad2036f1037e6a0428df2
Author: Linus Torvalds <torvalds@linux-foundation.org>
Date:   Sun Aug 30 11:34:09 2015 -0700

    Linux 4.2

This update is needed, as it turned out, that fastmap
was in experimental/broken state in kernel v3.15, which
was the last base for U-Boot.

Signed-off-by: Heiko Schocher <hs@denx.de>
Tested-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
8 years agolinux, compat: add missing definitions for ubi
Heiko Schocher [Thu, 22 Oct 2015 04:19:20 +0000 (06:19 +0200)]
linux, compat: add missing definitions for ubi

add missing definitions for the ubi/ubifs sync
with linux 4.2, also change "#define kfree ..."
into a static inline, so prevent ubi compile error:

   CC      drivers/mtd/ubi/fastmap.o
drivers/mtd/ubi/fastmap.c: In function 'scan_pool':
drivers/mtd/ubi/fastmap.c:475:3: error: called object 'free' is not a function

Signed-off-by: Heiko Schocher <hs@denx.de>
8 years agospi: zynq_qspi: Minor cleanups
Jagan Teki [Sun, 25 Oct 2015 04:01:54 +0000 (09:31 +0530)]
spi: zynq_qspi: Minor cleanups

- Use __func__ on debug
- Removed unnecessary comment
- Fix function name in debug as zynq_qspi_xfer instead of spi_xfer

Signed-off-by: Jagan Teki <jteki@openedev.com>
8 years agosf: Add FSR support to spi_flash_cmd_wait_ready
Jagan Teki [Tue, 29 Sep 2015 11:24:31 +0000 (16:54 +0530)]
sf: Add FSR support to spi_flash_cmd_wait_ready

This patch adds flag status register reading support to
spi_flash_cmd_wait_ready.

Cc: Simon Glass <sjg@chromium.org>
Cc: Marek Vasut <marex@denx.de>
Cc: Michal Simek <michal.simek@xilinx.com>
Cc: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Cc: Stefan Roese <sr@denx.de>
Cc: Tom Warren <twarren@nvidia.com>
Cc: Tom Rini <trini@konsulko.com>
Cc: Hou Zhiqiang <B48286@freescale.com>
Tested-by: Jagan Teki <jteki@openedev.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Jagan Teki <jteki@openedev.com>
8 years agosf: Update status reg check in spi_flash_cmd_wait_ready
Jagan Teki [Wed, 2 Sep 2015 06:09:50 +0000 (11:39 +0530)]
sf: Update status reg check in spi_flash_cmd_wait_ready

Current flash wait_ready logic is not modular to add new
register status check, hence updated the status check for
adding few more register checks in future.

Below are the sf speed runs with 'sf update' on whole flash, 16MiB.

=> sf update 0x100 0x0 0x1000000
device 0 whole chip
16777216 bytes written, 0 bytes skipped in 59.564s, speed 289262 B/s

=> sf update 0x100 0x0 0x1000000
device 0 whole chip
16777216 bytes written, 0 bytes skipped in 62.549s, speed 275036 B/s

=> sf update 0x100 0x0 0x1000000
device 0 whole chip
16777216 bytes written, 0 bytes skipped in 61.276s, speed 284359 B/s

Cc: Simon Glass <sjg@chromium.org>
Cc: Marek Vasut <marex@denx.de>
Cc: Michal Simek <michal.simek@xilinx.com>
Cc: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Cc: Stefan Roese <sr@denx.de>
Cc: Tom Warren <twarren@nvidia.com>
Cc: Tom Rini <trini@konsulko.com>
Tested-by: Jagan Teki <jteki@openedev.com>
Signed-off-by: Jagan Teki <jteki@openedev.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
8 years agosf: Make flash->flags use for generic usage
Jagan Teki [Tue, 29 Sep 2015 05:47:02 +0000 (11:17 +0530)]
sf: Make flash->flags use for generic usage

Use the flash->flags for generic usage, not only for dm-spi-flash,
this will be used for future flag additions.

[Correct the spi flash flags detect logic]
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Jagan Teki <jteki@openedev.com>
8 years agosf: Optimize BAR write code
Jagan Teki [Wed, 2 Sep 2015 06:09:48 +0000 (11:39 +0530)]
sf: Optimize BAR write code

Optimized spi-flash bar writing code and also removed
unnecessary bank_sel in read_ops.

Cc: Simon Glass <sjg@chromium.org>
Cc: Michal Simek <michal.simek@xilinx.com>
Cc: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Jagan Teki <jteki@openedev.com>
8 years agosf: Add spi_flash_read_bar
Jagan Teki [Wed, 2 Sep 2015 06:09:47 +0000 (11:39 +0530)]
sf: Add spi_flash_read_bar

Add spi_flash_read_bar function for reading bar and
discovering bar commands at probe time.

Cc: Michal Simek <michal.simek@xilinx.com>
Cc: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Jagan Teki <jteki@openedev.com>
8 years agosf: Return bank_sel, if flash->bank_curr == bank_sel
Jagan Teki [Wed, 2 Sep 2015 06:09:46 +0000 (11:39 +0530)]
sf: Return bank_sel, if flash->bank_curr == bank_sel

If computed bank_sel is same as flash->bank_curr which is
computed at probe time, then return the bank_sel instead of zero.

Cc: Michal Simek <michal.simek@xilinx.com>
Cc: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Jagan Teki <jteki@openedev.com>
8 years agospi: zynq_spi: Remove unneeded headers
Jagan Teki [Wed, 2 Sep 2015 06:09:45 +0000 (11:39 +0530)]
spi: zynq_spi: Remove unneeded headers

- Removed unneeded inclusion of header files
- Add "Xilinx" on license text

Cc: Michal Simek <michal.simek@xilinx.com>
Cc: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Jagan Teki <jteki@openedev.com>
8 years agozynq-common: Add SPL SPI offset, size configs
Siva Durga Prasad Paladugu [Mon, 14 Sep 2015 07:29:08 +0000 (12:59 +0530)]
zynq-common: Add SPL SPI offset, size configs

Define CONFIG_SYS_SPI_ARGS_OFFS, CONFIG_SYS_SPI_ARGS_SIZE
and CONFIG_SYS_SPI_KERNEL_OFFS which will be used in SPL
spi mode. These macros defines the device tree offset, size
and the kernel image offset in flash respectively.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Reviewed-by: Jagan Teki <jteki@openedev.com>
8 years agospi: zynq_qspi: Fix to configure CPOL, CPHA mask
Jagan Teki [Mon, 7 Sep 2015 20:09:44 +0000 (01:39 +0530)]
spi: zynq_qspi: Fix to configure CPOL, CPHA mask

priv->mode is initialized when .set_speed triggers
with mode value, so checking mode for configuring
CPOL, CPHA using priv->mode is invalid hence use
mode from .set_speed argument, and at the end
priv->mode will initialized with mode.

This patch also replaces formatting string to use
speed instead of mode in .set_speed ops.

Signed-off-by: Jagan Teki <jteki@openedev.com>
8 years agozynq-common: Enable ISSI SPI-NOR flash support
Jagan Teki [Fri, 4 Sep 2015 13:00:34 +0000 (18:30 +0530)]
zynq-common: Enable ISSI SPI-NOR flash support

This patch enabled CONFIG_SPI_FLASH_ISSI for qspi on zynq boards.

Signed-off-by: Jagan Teki <jteki@openedev.com>
Cc: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Cc: Michal Simek <michal.simek@xilinx.com>
8 years agosf: params: Add IS25LP128 part support
Jagan Teki [Fri, 4 Sep 2015 12:59:12 +0000 (18:29 +0530)]
sf: params: Add IS25LP128 part support

Added support for IS25LP128 flash part.

Signed-off-by: Jagan Teki <jteki@openedev.com>
Cc: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Cc: Michal Simek <michal.simek@xilinx.com>
8 years agosf: params: Add IS25LP064 part support
Jagan Teki [Fri, 4 Sep 2015 12:57:58 +0000 (18:27 +0530)]
sf: params: Add IS25LP064 part support

Added support for IS25LP064 flash part.

Signed-off-by: Jagan Teki <jteki@openedev.com>
Cc: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Cc: Michal Simek <michal.simek@xilinx.com>
8 years agosf: params: Add IS25LP032 part support
Jagan Teki [Fri, 4 Sep 2015 12:55:45 +0000 (18:25 +0530)]
sf: params: Add IS25LP032 part support

Added support for IS25LP032 flash part.

Signed-off-by: Jagan Teki <jteki@openedev.com>
Cc: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Cc: Michal Simek <michal.simek@xilinx.com>
8 years agospi: zynq_spi: Store cs value into private data
Jagan Teki [Mon, 17 Aug 2015 13:01:39 +0000 (18:31 +0530)]
spi: zynq_spi: Store cs value into private data

Store cs value into private data and use it while activating
chipselect instead of passing through function.

Signed-off-by: Jagan Teki <jteki@openedev.com>
8 years agospi: zynq_spi: Rename baudrate divisor mask name
Jagan Teki [Mon, 17 Aug 2015 12:57:47 +0000 (18:27 +0530)]
spi: zynq_spi: Rename baudrate divisor mask name

Rename ZYNQ_SPI_CR_BRD_MASK to ZYNQ_SPI_CR_BAUD_MASK
for more readable.

Signed-off-by: Jagan Teki <jteki@openedev.com>
8 years agospi: zynq_spi: Add config reg shift named macros
Jagan Teki [Mon, 17 Aug 2015 12:55:03 +0000 (18:25 +0530)]
spi: zynq_spi: Add config reg shift named macros

Update the numerical values for baudrate and chipselect
with config reg shift named macro's

Signed-off-by: Jagan Teki <jteki@openedev.com>
8 years agospi: Kconfig: Add Zynq QSPI controller entry
Jagan Teki [Sat, 15 Aug 2015 18:49:38 +0000 (00:19 +0530)]
spi: Kconfig: Add Zynq QSPI controller entry

Add Zynq QSPI controller Kconfig entry.

Signed-off-by: Jagan Teki <jteki@openedev.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Michal Simek <michal.simek@xilinx.com>
Cc: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
8 years agoconfigs: zynq: Enable zynq qspi controller
Jagan Teki [Mon, 31 Aug 2015 12:08:40 +0000 (17:38 +0530)]
configs: zynq: Enable zynq qspi controller

Enable zynq qspi controller driver on respective zynq boards.

Signed-off-by: Jagan Teki <jteki@openedev.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Michal Simek <michal.simek@xilinx.com>
Cc: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Tested-by: Jagan Teki <jteki@openedev.com>
8 years agozynq-common: Enable Bank/Extended address register support
Jagan Teki [Mon, 17 Aug 2015 13:26:38 +0000 (18:56 +0530)]
zynq-common: Enable Bank/Extended address register support

Enabled SPI flash Bank/Extended address register support.

Bank/Extended address registers are used to access the flash
which has size > 16MiB in 3-byte addressing.

Signed-off-by: Jagan Teki <jteki@openedev.com>
8 years agozynq-common: Enable zynq qspi controller support
Jagan Teki [Mon, 17 Aug 2015 13:25:02 +0000 (18:55 +0530)]
zynq-common: Enable zynq qspi controller support

This patch adds support for zynq qspi controller driver
on zynq-common.h

Signed-off-by: Jagan Teki <jteki@openedev.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Acked-by: Michal Simek <michal.simek@xilinx.com>
Tested-by: Jagan Teki <jteki@openedev.com>
8 years agoconfigs: Enable legacy SPI flash interface support
Jagan Teki [Mon, 31 Aug 2015 12:06:03 +0000 (17:36 +0530)]
configs: Enable legacy SPI flash interface support

Enable legacy spi-flash interface support for boards which
supports qspi controller with connected spi-nor flash.

Signed-off-by: Jagan Teki <jteki@openedev.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Michal Simek <michal.simek@xilinx.com>
Cc: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Tested-by: Jagan Teki <jteki@openedev.com>
8 years agodts: zed: Enable zynq qspi controller node
Jagan Teki [Sat, 15 Aug 2015 17:49:05 +0000 (23:19 +0530)]
dts: zed: Enable zynq qspi controller node

Enabled zynq qspi controller node for zed board.

Signed-off-by: Jagan Teki <jteki@openedev.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Acked-by: Michal Simek <michal.simek@xilinx.com>
8 years agodts: zc770-xm010: Enable zynq qspi controller node
Jagan Teki [Fri, 4 Sep 2015 07:19:49 +0000 (12:49 +0530)]
dts: zc770-xm010: Enable zynq qspi controller node

Enabled zynq qspi controller node for zc770-xm010 board.

=> sf probe 0 -- bus1 for selecting qspi controller
=> sf probe 1 -- bus0 for selecting spi controller

Signed-off-by: Jagan Teki <jteki@openedev.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Acked-by: Michal Simek <michal.simek@xilinx.com>
8 years agodts: zc706: Enable zynq qspi controller node
Jagan Teki [Sat, 15 Aug 2015 17:46:21 +0000 (23:16 +0530)]
dts: zc706: Enable zynq qspi controller node

Enabled zynq qspi controller node for zc706 board.

Signed-off-by: Jagan Teki <jteki@openedev.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Acked-by: Michal Simek <michal.simek@xilinx.com>
8 years agodts: zc702: Enable zynq qspi controller node
Jagan Teki [Sat, 15 Aug 2015 17:45:21 +0000 (23:15 +0530)]
dts: zc702: Enable zynq qspi controller node

Enabled zynq qspi controller node for zc702 board.

Signed-off-by: Jagan Teki <jteki@openedev.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Acked-by: Michal Simek <michal.simek@xilinx.com>
8 years agodts: microzed: Enable zynq qspi controller node
Jagan Teki [Sat, 15 Aug 2015 17:38:51 +0000 (23:08 +0530)]
dts: microzed: Enable zynq qspi controller node

Enabled zynq qspi controller node for microzed board,
verified the same on spansion spi-nor flash.

Signed-off-by: Jagan Teki <jteki@openedev.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Acked-by: Michal Simek <michal.simek@xilinx.com>
Tested-by: Jagan Teki <jteki@openedev.com>
8 years agodoc: device-tree-bindings: spi: Add zynq qspi info
Jagan Teki [Sat, 15 Aug 2015 17:36:56 +0000 (23:06 +0530)]
doc: device-tree-bindings: spi: Add zynq qspi info

Added device-tree-binding information for zynq qspi controller
driver.

Signed-off-by: Jagan Teki <jteki@openedev.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Acked-by: Michal Simek <michal.simek@xilinx.com>
Tested-by: Jagan Teki <jteki@openedev.com>
8 years agodts: zynq: Add zynq qspi controller nodes
Jagan Teki [Sat, 15 Aug 2015 17:32:31 +0000 (23:02 +0530)]
dts: zynq: Add zynq qspi controller nodes

This patch adds zynq qspi controller nodes in zynq-7000.dtsi.

Signed-off-by: Jagan Teki <jteki@openedev.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Acked-by: Michal Simek <michal.simek@xilinx.com>
Tested-by: Jagan Teki <jteki@openedev.com>
8 years agospi: Add zynq qspi controller driver
Jagan Teki [Mon, 17 Aug 2015 13:08:06 +0000 (18:38 +0530)]
spi: Add zynq qspi controller driver

Added zynq qspi controller driver for Xilinx Zynq APSOC,
this driver is driver-model driven with devicetree support.

=> sf probe
SF: Detected S25FL128S_64K with page size 256 Bytes, erase size 64 KiB, total 16 MiB
=> mw.b 0x100 0xCC 0x1000000
=> sf update 0x100 0x0 0x1000000
device 0 whole chip
16777216 bytes written, 0 bytes skipped in 59.842s, speed 289262 B/s
=> sf read 0x3000000 0x0 0x1000000
device 0 whole chip
SF: 16777216 bytes @ 0x0 Read: OK
=> cmp.b 0x3000000 0x100 0x1000000
Total of 16777216 byte(s) were the same

Signed-off-by: Jagan Teki <jteki@openedev.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Cc: Michal Simek <michal.simek@xilinx.com>
Acked-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Tested-by: Jagan Teki <jteki@openedev.com>
8 years agocommon/board_f.c: modify the macro to use get_clocks() more common
Gong Qianyu [Wed, 9 Sep 2015 08:44:16 +0000 (16:44 +0800)]
common/board_f.c: modify the macro to use get_clocks() more common

get_clocks() should not be limited by ESDHC.

Signed-off-by: Gong Qianyu <Qianyu.Gong@freescale.com>
8 years agoarm, powerpc: select SYS_GENERIC_BOARD
Masahiro Yamada [Tue, 20 Oct 2015 12:09:06 +0000 (21:09 +0900)]
arm, powerpc: select SYS_GENERIC_BOARD

We have finished Generic Board conversion for ARM and PowerPC, i.e.
all the boards have been converted except OpenRISC, SuperH, SPARC,
which have not supported Generic Board framework yet.

Select SYS_GENERIC_BOARD in arch/Kconfig and delete all the macro
defines in include/configs/*.h.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoRevert "ARM: zynq: disable CONFIG_SYS_MALLOC_F to fix MMC boot"
Simon Glass [Mon, 19 Oct 2015 12:50:03 +0000 (06:50 -0600)]
Revert "ARM: zynq: disable CONFIG_SYS_MALLOC_F to fix MMC boot"

This reverts commit 321f86e18d6aae9f7b7ba3ef1eb0cec769481874.

The original bug has been fixed.

Signed-off-by: Simon Glass <sjg@chromium.org>
Tested-on: Zedboard and ZC706 board
Tested-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Tested-on: zc702
Tested-by: Michal Simek <michal.simek@xilinx.com>
8 years agozynq: Move SPL console init out of board_init_f()
Simon Glass [Mon, 19 Oct 2015 12:50:02 +0000 (06:50 -0600)]
zynq: Move SPL console init out of board_init_f()

We should not init the console this early since it precludes using driver
model for the UART, since it is not set up at the start of board_init_f().
See the README for more information. The debug UART does not have this
restriction. If we want to do early init with the console on it can be done
in spl_board_init().

Move the preloader_console_init() call from board_init_f() to board_init_r().

Signed-off-by: Simon Glass <sjg@chromium.org>
Tested-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Tested-by: Michal Simek <michal.simek@xilinx.com>
8 years agomicroblaze: Add a TODO to call board_init_f_mem()
Simon Glass [Mon, 19 Oct 2015 12:50:01 +0000 (06:50 -0600)]
microblaze: Add a TODO to call board_init_f_mem()

This C function should be used to do the early memory layout and init. This
is beyond my powers, so just add a TODO for the maintainer.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Michal Simek <michal.simek@xilinx.com>
8 years agoarm: Switch 32-bit ARM to using generic global_data setup
Simon Glass [Mon, 19 Oct 2015 12:50:00 +0000 (06:50 -0600)]
arm: Switch 32-bit ARM to using generic global_data setup

There is quite a bit of assembler code that can be removed if we use the
generic global_data setup. Less arch-specific code makes it easier to add
new features and maintain the start-up code.

Drop the unneeded code and adjust the hooks in board_f.c to cope.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agoarm: Switch aarch64 to using generic global_data setup
Simon Glass [Mon, 19 Oct 2015 12:49:59 +0000 (06:49 -0600)]
arm: Switch aarch64 to using generic global_data setup

There is quite a bit of assembler code that can be removed if we use the
generic global_data setup. Less arch-specific code makes it easier to add
new features and maintain the start-up code.

Drop the unneeded code and adjust the hooks in board_f.c to cope.

Tested on LS2085ARDB and LS2085AQDS (armv8 SoC).
Tested-by: York Sun <yorksun@freescale.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agoboard_init_f_mem(): Don't create an unused early malloc() area
Simon Glass [Mon, 19 Oct 2015 12:49:58 +0000 (06:49 -0600)]
board_init_f_mem(): Don't create an unused early malloc() area

Change the #ifdef so that the early malloc() area is not set up in SPL if
CONFIG_SYS_SPL_MALLOC_START is defined. In that case it would never actually
be used, and just chews up stack space.

Signed-off-by: Simon Glass <sjg@chromium.org>
Tested-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoboard_init_f_mem(): Don't require memset()
Simon Glass [Mon, 19 Oct 2015 12:49:57 +0000 (06:49 -0600)]
board_init_f_mem(): Don't require memset()

Unfortunately memset() is not always available, so provide a substitute when
needed.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agoMove board_init_f_mem() into a common location
Simon Glass [Mon, 19 Oct 2015 12:49:56 +0000 (06:49 -0600)]
Move board_init_f_mem() into a common location

This function will be used by both SPL and U-Boot proper. So move it into
a common place. Also change the #ifdef so that the early malloc() area is
not set up in SPL if CONFIG_SYS_SPL_MALLOC_START is defined. In that case
it would never actually be used, and just chews up stack space.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agofs-test.sh: fix pre-requisite detection
Stephen Warren [Sat, 3 Oct 2015 19:56:48 +0000 (13:56 -0600)]
fs-test.sh: fix pre-requisite detection

In the following snippet:

if [ ! -x `which $prereq` ]; then

When $prereq does not exist, `which $prereq` evaluates to the empty string,
which results in *no* argument being passed to the -x operator, which then
evaluates to true, which is the equivalent of the prereq having been found. In
order for this to fail as expected, we must pass an empty argument, which then
causes -x to fail. Do this by wrapping the `` in quotes so there's always an
argument to -x, even if the value of the argument is zero-length.

Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
8 years agotest: fat: add test of non-contiguous file reads
Stephen Warren [Sat, 3 Oct 2015 19:56:47 +0000 (13:56 -0600)]
test: fat: add test of non-contiguous file reads

In my patch series to replace fs/fat with "ff.c", I enhanced ff.c to
optimize file reading, so that reads of contiguous clusters are submitted
to the IO device as a single read. This test attempts to torture-test
edge-cases of that enhancement.

BTW, the only way I found to validate that this script actually does
create non-contiguous files was to manually inspect the FAT bitmap in a
hex dump of the FAT image. hdparm --fibmap doesn't work on loop-mounted
filesystems. filefrag -v -e seems to lie about files being contiguous
when they aren't.

Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
8 years agoitest: make memory access work under sandbox
Stephen Warren [Sat, 3 Oct 2015 19:56:46 +0000 (13:56 -0600)]
itest: make memory access work under sandbox

itest accesses memory, and hence must map/unmap it. Without doing so, it
accesses invalid addresses and crashes.

Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agodistro_bootcmd: Add support for booting from ubifs
Roy Spliet [Thu, 17 Sep 2015 22:46:59 +0000 (18:46 -0400)]
distro_bootcmd: Add support for booting from ubifs

Under the assumptions of having a UBI volume called boot, containing
a ubifs filesystem.

Signed-off-by: Roy Spliet <rspliet@eclipso.eu>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
8 years agoubifs: Add generic fs support
Hans de Goede [Thu, 17 Sep 2015 22:46:58 +0000 (18:46 -0400)]
ubifs: Add generic fs support

Add generic fs support, so that commands like ls, load and test -e can be
used on ubifs.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
8 years agoubifs: Add functions for generic fs use
Hans de Goede [Thu, 17 Sep 2015 22:46:57 +0000 (18:46 -0400)]
ubifs: Add functions for generic fs use

Implement the necessary functions for implementing generic fs support
for ubifs.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
8 years agoubifs: Modify ubifs u-boot wrapper function prototypes for generic fs use
Hans de Goede [Thu, 17 Sep 2015 22:46:56 +0000 (18:46 -0400)]
ubifs: Modify ubifs u-boot wrapper function prototypes for generic fs use

Modify the ubifs u-boot wrapper function prototypes for generic fs use,
and give them their own header file.

This is a preparation patch for adding ubifs support to the generic fs
code from fs/fs.c.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
8 years agodisk/part: Only build hostfs special handling when CONFIG_SANDBOX is set
Hans de Goede [Thu, 17 Sep 2015 22:46:55 +0000 (18:46 -0400)]
disk/part: Only build hostfs special handling when CONFIG_SANDBOX is set

This is not necessary / useful when not building with CONFIG_SANDBOX and
with the addition of ubifs support to the generic fs commands it actually
gets in the way, since both operate on a fake / NULL blkdev.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
8 years agoAllow imxtract to extract part of script image.
Pierre Aubert [Wed, 16 Sep 2015 06:29:11 +0000 (08:29 +0200)]
Allow imxtract to extract part of script image.

Scripts are multi-file images, the imxtract command should handle them
in the same manner.

Signed-off-by: Pierre Aubert <p.aubert@staubli.com>
8 years agoFix bad return value checks (detected with Coccinelle)
Thomas Huth [Tue, 25 Aug 2015 15:09:40 +0000 (17:09 +0200)]
Fix bad return value checks (detected with Coccinelle)

In the "Getting Started with Coccinelle - KVM edition" presentation that
has been held by Julia Lawall at the KVM forum 2015 (see the slides at
http://events.linuxfoundation.org/sites/events/files/slides/tutorial_kvm_0.pdf),
she pointed out some bad return value checks in U-Boot that can be
detected with Coccinelle by using the following config file:

@@
identifier x,y;
identifier f;
statement S;
@@
x = f(...);
(
 if (x < 0) S
|
 if (
-     y
+     x
 < 0) S
)

This patch now fixes these issues.

Signed-off-by: Thomas Huth <huth@tuxfamily.org>
8 years agoARM: rpi: Add CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG support
Guillaume GARDET [Tue, 25 Aug 2015 13:10:26 +0000 (15:10 +0200)]
ARM: rpi: Add CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG support

Add CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG support and enable it to set
'board_rev' and 'board_name' envs.
'board_rev' can be used in scripts to determine what board we are running on
and 'board_name' for pretty printing.

Signed-off-by: Guillaume GARDET <guillaume.gardet@free.fr>
Cc: Stephen Warren <swarren@wwwdotorg.org>
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
8 years agoallow LED initialization without STATUS_LED_BOOT
Bernhard Nortmann [Fri, 21 Aug 2015 13:13:21 +0000 (15:13 +0200)]
allow LED initialization without STATUS_LED_BOOT

For current U-Boot to initialize status LEDs via status_led_init(), it
is required to have both CONFIG_STATUS_LED and STATUS_LED_BOOT defined.
This may be a particular concern with GPIO LEDs, where __led_init() is
required to correctly set up the GPIO (gpio_request and
gpio_direction_output). Without STATUS_LED_BOOT the initialization isn't
called, which could leave the user with a non-functional "led" command -
due to the fact that the LED routines in gpio_led.c use gpio_set_value()
just fine, but the GPIO never got set up properly in the first place.

I think having CONFIG_STATUS_LED is sufficient to justify a
corresponding call to status_led_init(), even with no STATUS_LED_BOOT
defined. To do so, common/board_r.c needs call that routine, so it now
is exposed via status_led.h.

Signed-off-by: Bernhard Nortmann <bernhard.nortmann@web.de>
[trini: Add dummy __led_init to pca9551_led.c]
Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agoadd generic stubs for GPIO LEDs
Bernhard Nortmann [Fri, 21 Aug 2015 13:13:20 +0000 (15:13 +0200)]
add generic stubs for GPIO LEDs

For boards that support LEDs driven via GPIO (CONFIG_GPIO_LED),
it may be useful to have some generic stubs (wrapper functions)
for the "colored" LEDs.

This allows defining STATUS_LED_* values directly to GPIO numbers,
e.g.: #define STATUS_LED_GREEN 248 /* = PH24 */

To keep those optional, it's probably best to introduce an additional
configuration setting. I've chosen CONFIG_GPIO_LED_STUBS for that.
Placing the code in drivers/misc/gpio_led.c also ensures that it
automatically depends on CONFIG_GPIO_LED too.

Signed-off-by: Bernhard Nortmann <bernhard.nortmann@web.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agofdt: fix fdtdec_get_pci_addr() for CONFIG_PHYS_64BIT
Stephen Warren [Fri, 2 Oct 2015 23:44:06 +0000 (17:44 -0600)]
fdt: fix fdtdec_get_pci_addr() for CONFIG_PHYS_64BIT

PCI addresses are always represented as 3 cells in DT. (one cell for bus
and device, and two cells for a 64-bit addres). This does not vary based
on either the physical address size of the CPU, nor any #address-cells
property in DT (or more precisely, #address-cells must be set to 3 in any
PCIe controller's node).

Fix fdtdec_get_pci_addr() to use conversion functions that operate on
(fixed) cell-sized data rather than (varying) physical-address-sized
data, so that the function works on 64-bit systems.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Thierry Reding <treding@nvidia.com>
8 years agoenv: export fdt_blob to the environment variable
Thomas Chou [Fri, 16 Oct 2015 00:44:51 +0000 (08:44 +0800)]
env: export fdt_blob to the environment variable

Export fdt_blob to the environment variable. So that we may
use it to boot Linux.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Acked-by: Simon Glass <sjg@chromium.org>
8 years agodm: tpm: Drop CONFIG_DM_TPM
Simon Glass [Sat, 3 Oct 2015 12:39:36 +0000 (06:39 -0600)]
dm: tpm: Drop CONFIG_DM_TPM

Now that all TPM drivers use driver model, we can drop the special driver
model CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Christophe Ricard<christophe-h.ricard@st.com>
8 years agodm: tpm: Every TPM drivers should depends on DM_TPM
Christophe Ricard [Tue, 6 Oct 2015 20:54:44 +0000 (22:54 +0200)]
dm: tpm: Every TPM drivers should depends on DM_TPM

Every TPM drivers should now depends on DM_TPM and not only TPM.

Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Acked-by: Simon Glass <sjg@chromium.org>
8 years agodm: tpm: Remove every compilation switch for TPM driver model
Christophe Ricard [Tue, 6 Oct 2015 20:54:43 +0000 (22:54 +0200)]
dm: tpm: Remove every compilation switch for TPM driver model

As every TPM drivers support UCLASS_TPM, we can only rely on DM_TPM
functions.

This simplify a bit the code.

Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Acked-by: Simon Glass <sjg@chromium.org>
8 years agodm: tpm: Add Driver Model support for tpm_atmel_twi driver
Christophe Ricard [Tue, 6 Oct 2015 20:54:42 +0000 (22:54 +0200)]
dm: tpm: Add Driver Model support for tpm_atmel_twi driver

tpm_atmel_twi can fit perfectly to the new UCLASS_TPM class.

Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Acked-by: Simon Glass <sjg@chromium.org>
8 years agodm: tpm: Move tpm_tis_i2c to tpm_i2c_infineon
Christophe Ricard [Tue, 6 Oct 2015 20:54:41 +0000 (22:54 +0200)]
dm: tpm: Move tpm_tis_i2c to tpm_i2c_infineon

As there is no TCG specification or recommendation for i2c TPM 1.2,
move tpm_tis_i2c driver to tpm_i2c_infineon. Other tpm vendors like Atmel
or STMicroelectronics may have a different transport protocol for i2c.

Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Acked-by: Simon Glass <sjg@chromium.org>
8 years agodm: core: Tidy up comments in device.h
Simon Glass [Tue, 29 Sep 2015 05:32:06 +0000 (23:32 -0600)]
dm: core: Tidy up comments in device.h

Correct a few nits found in a recent review. Expand the comments in
dev_get_driver_data() to make it clearer.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agodm: core: Remove a comment about dropping per_child_auto_alloc_size
Simon Glass [Tue, 29 Sep 2015 05:32:05 +0000 (23:32 -0600)]
dm: core: Remove a comment about dropping per_child_auto_alloc_size

This has proven useful and we no-longer intend to remove it. Drop the
comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agodm: core: Tidy up devres comments
Simon Glass [Tue, 29 Sep 2015 05:32:04 +0000 (23:32 -0600)]
dm: core: Tidy up devres comments

Adjust the devres comments to be consistent with the rest of the file, and
add one for the struct udevice member. Also rename the 'p' parameter to
'ptr' to avoid single-character names.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agodm: core: Fix device flag whitespace
Simon Glass [Tue, 29 Sep 2015 05:32:03 +0000 (23:32 -0600)]
dm: core: Fix device flag whitespace

Line up the flag values in the code for easier readability.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agodm: core: Adjust device.h header file order
Simon Glass [Tue, 29 Sep 2015 05:32:02 +0000 (23:32 -0600)]
dm: core: Adjust device.h header file order

Move a few functions around so that the ordering is consistent.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agodm: Rename dev_get_parentdata() to dev_get_parent_priv()
Simon Glass [Tue, 29 Sep 2015 05:32:01 +0000 (23:32 -0600)]
dm: Rename dev_get_parentdata() to dev_get_parent_priv()

The current name is inconsistent with other driver model data access
functions. Rename it and fix up all users.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
8 years agodm: keystone: serial: Add driver model support
Lokesh Vutla [Sat, 19 Sep 2015 09:17:36 +0000 (14:47 +0530)]
dm: keystone: serial: Add driver model support

Add driver model support for keystone serial driver.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Acked-by: Simon Glass <sjg@chromium.org>
8 years agonet: convert altera_tse to driver model and phylib
Thomas Chou [Thu, 22 Oct 2015 07:29:11 +0000 (15:29 +0800)]
net: convert altera_tse to driver model and phylib

Convert altera_tse to driver model and phylib.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Reviewed-by: Marek Vasut <marex@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agonios2: fix virt_to_phys for nios2 with MMU
Thomas Chou [Thu, 22 Oct 2015 07:38:24 +0000 (15:38 +0800)]
nios2: fix virt_to_phys for nios2 with MMU

As the virtual address and physical address mapping of nios2 with
MMU are different. Add a check of MMU, and fix the mapping.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Acked-by: Marek Vasut <marex@denx.de>
Reviewed-by: Ley Foon Tan <lftan@altera.com>
8 years agonios2: add README.nios2
Thomas Chou [Wed, 21 Oct 2015 14:37:04 +0000 (22:37 +0800)]
nios2: add README.nios2

Add README.nios2 about how to add nios2 boards to u-boot.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Acked-by: Marek Vasut <marex@denx.de>
8 years agonios2: zap nios2-generic board dir
Thomas Chou [Fri, 23 Oct 2015 06:55:36 +0000 (14:55 +0800)]
nios2: zap nios2-generic board dir

As we use device tree to control u-boot now, the generic
board can be removed.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>