oweals/u-boot.git
7 years agoscsi: Take lun from device block description
Michal Simek [Fri, 18 Nov 2016 14:52:51 +0000 (15:52 +0100)]
scsi: Take lun from device block description

Prepare LUN(Logical unit number) directly in block description structure
and reuse it.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agoscsi: Extract device detection algorithm
Michal Simek [Fri, 18 Nov 2016 14:42:13 +0000 (15:42 +0100)]
scsi: Extract device detection algorithm

The patch enables running detection algorithm on block device
description structure.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agoscsi: Extract block device initialization
Michal Simek [Fri, 18 Nov 2016 14:27:00 +0000 (15:27 +0100)]
scsi: Extract block device initialization

Extract block device initialization to specific function.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agocommon: miiphyutil: Work and report phy address in hex in mdio cmd
Michal Simek [Wed, 16 Nov 2016 07:41:01 +0000 (08:41 +0100)]
common: miiphyutil: Work and report phy address in hex in mdio cmd

It is confusing that mdio commands work and report phy id as
decimal value when mii is working with hex values.

For example:
ZynqMP> mdio list
gem:
21 - TI DP83867 <--> ethernet@ff0e0000
ZynqMP> mdio read ethernet@ff0e0000 0
Reading from bus gem
PHY at address 21:
0 - 0x1140
ZynqMP> mii dump 21 0
Incorrect PHY address. Range should be 0-31
...
ZynqMP> mii dump 15
0.     (1140)                 -- PHY control register --
  (8000:0000) 0.15    =     0    reset

U-Boot normally takes hex values that's why this patch is changing mdio
command to handle hex instead of changing mii command to handle decimal
values.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
7 years agoARM: zynq: Enable SD1 and qspi for picozed board
Siva Durga Prasad Paladugu [Fri, 7 Oct 2016 05:41:52 +0000 (11:11 +0530)]
ARM: zynq: Enable SD1 and qspi for picozed board

Enable SD1 and qspi for picozed board.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoARM: zynq(mp): remove unneeded CONFIG_USB_MAX_CONTROLLER_COUNT defines
Masahiro Yamada [Thu, 13 Oct 2016 15:40:00 +0000 (00:40 +0900)]
ARM: zynq(mp): remove unneeded CONFIG_USB_MAX_CONTROLLER_COUNT defines

ARCH_ZYNQ(MP) selects DM_USB, where CONFIG_USB_MAX_CONTROLLER_COUNT
is not used.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Moritz Fischer <moritz.fischer@ettus.com>
Acked-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoARM64: zynqmp: List secondary software boot modes
Michal Simek [Wed, 26 Oct 2016 07:24:32 +0000 (09:24 +0200)]
ARM64: zynqmp: List secondary software boot modes

Using alternative bootmode field to support automatic secondary boot
modes. It is purely software setting where SW modes are using free
bootmode combinations.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoARM64: zynqmp: Use DTS name for different psu_init_gpl* files in SPL
Michal Simek [Tue, 29 Nov 2016 11:03:51 +0000 (12:03 +0100)]
ARM64: zynqmp: Use DTS name for different psu_init_gpl* files in SPL

CONFIG_SYS_CONFIG_NAME is not proper config option for different low
level init files because different board revisions requires different
psu_init_gpl* files.

Also at the end of moving drivers to DM all board specific configuration
files should be removed.

The same changes was done for Zynq.
"ARM: zynq: Simplify zynq configuration"
(sha1: ad5b5801264e573bfbf17a20b04c546985c5bfc1)

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoARM64: zynqmp: Force certain bootmode for SPL
Michal Simek [Tue, 30 Aug 2016 14:17:27 +0000 (16:17 +0200)]
ARM64: zynqmp: Force certain bootmode for SPL

ZynqMP provides an option to overwrite bootmode setting which
can change SPL behavior.
For example: boot SPL via JTAG and then SPL loads images from SD.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoMerge git://www.denx.de/git/u-boot-marvell
Tom Rini [Thu, 1 Dec 2016 14:24:02 +0000 (09:24 -0500)]
Merge git://www.denx.de/git/u-boot-marvell

7 years agotools/kwbimage: add DEBUG option
Chris Packham [Wed, 9 Nov 2016 09:21:45 +0000 (22:21 +1300)]
tools/kwbimage: add DEBUG option

Offset 0x1 in the generated kwb image file is a set of flags, bit 0
enables debug output from the BootROM firmware.  Allow a DEBUG option in
the kwb configuration to request debug output from the BootROM firmware.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
Signed-off-by: Stefan Roese <sr@denx.de>
7 years agotools/kwbimage: add BAUDRATE option
Chris Packham [Wed, 9 Nov 2016 09:07:45 +0000 (22:07 +1300)]
tools/kwbimage: add BAUDRATE option

Offset 0x18 in some Marvell datasheets this field is redacted as
"reserved". This offset is actually a set of options and bits 2:0 allow
the selection of the UART baudrate.

Allow a BAUDRATE option to set the UART baudrate for any messages coming
from the BootROM firmware.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
Signed-off-by: Stefan Roese <sr@denx.de>
7 years agoarm: mvebu: move SYS_MVEBU_PLL_CLOCK to Kconfig
Chris Packham [Wed, 26 Oct 2016 01:08:30 +0000 (14:08 +1300)]
arm: mvebu: move SYS_MVEBU_PLL_CLOCK to Kconfig

The main PLL frequency is 2GHz for Armada-XP and 1GHZ for Armada 375,
38x and 39x.

[ Linux commit ae142bd9976532aa5232ab0b00e621690d8bfe6a ]

Signed-off-by: Chris Packham <judge.packham@gmail.com>
Signed-off-by: Stefan Roese <sr@denx.de>
7 years agomvebu: db-88f6820-amc: Enable FIT support
Chris Packham [Mon, 24 Oct 2016 22:40:55 +0000 (11:40 +1300)]
mvebu: db-88f6820-amc: Enable FIT support

Signed-off-by: Chris Packham <judge.packham@gmail.com>
Signed-off-by: Stefan Roese <sr@denx.de>
7 years agoSPL: mmc: Make spl_mmc_load_image available
Marek Vasut [Thu, 1 Dec 2016 01:06:35 +0000 (02:06 +0100)]
SPL: mmc: Make spl_mmc_load_image available

Make the spl_mmc_load_image() available globally, so it can be
invoked directly by SPL on extremely space-constrained systems.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Tom Rini <trini@konsulko.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Jaehoon Chung <jh80.chung@samsung.com>
7 years agommc: Tinification of the mmc code
Marek Vasut [Thu, 1 Dec 2016 01:06:33 +0000 (02:06 +0100)]
mmc: Tinification of the mmc code

Add new configuration option CONFIG_MMC_TINY which strips away all
memory allocation within the MMC code and code for handling multiple
cards. This allows extremely space-constrained SPL code use the MMC
framework.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Tom Rini <trini@konsulko.com>
Cc: Jaehoon Chung <jh80.chung@samsung.com>
7 years agommc: Fix warning if debug() is not used
Marek Vasut [Thu, 1 Dec 2016 01:06:32 +0000 (02:06 +0100)]
mmc: Fix warning if debug() is not used

If debug() is not used, then the whole content of debug(...) will
be removed by the preprocessor, which will result in the following
warning. This patch adds __maybe_unused annotation to fix this.

drivers/mmc/mmc.c: In function ‘mmc_init’:
drivers/mmc/mmc.c:1685:11: warning: variable ‘start’ set but not used [-Wunused-but-set-variable]
  unsigned start;

Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Pantelis Antoniou <panto@antoniou-consulting.com>
Cc: Jaehoon Chung <jh80.chung@samsung.com>
7 years agommc: add bkops-enable command
Tomas Melin [Fri, 25 Nov 2016 09:01:03 +0000 (11:01 +0200)]
mmc: add bkops-enable command

Add new command that provides possibility to enable the
background operations handshake functionality
(BKOPS_EN, EXT_CSD byte [163]) on eMMC devices.

This is an optional feature of eMMCs, the setting is write-once.
The command must be explicitly taken into use with
CONFIG_CMD_BKOPS_ENABLE.

Signed-off-by: Tomas Melin <tomas.melin@vaisala.com>
7 years agommc: s5p_sdhci: fix to check proper pinmux id
Seung-Woo Kim [Thu, 24 Nov 2016 06:05:51 +0000 (15:05 +0900)]
mmc: s5p_sdhci: fix to check proper pinmux id

At sdhci_get_config(), there was wrong condition to check pimux
id, so this patch fixes to check proper pinmux id.

Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
7 years agots4600: Disable CONFIG_DISPLAY_CPUINFO
Tom Rini [Wed, 30 Nov 2016 19:14:47 +0000 (14:14 -0500)]
ts4600: Disable CONFIG_DISPLAY_CPUINFO

Without this change we see:
../arch/arm/cpu/arm926ejs/mxs/mxs.c: In function ‘print_cpuinfo’:
../arch/arm/cpu/arm926ejs/mxs/mxs.c:181:23: warning: unused variable ‘data’ [-Wunused-variable]
../arch/arm/cpu/arm926ejs/mxs/mxs.c:180:6: warning: variable ‘cpurev’ set but not used [-Wunused-but-set-variable]

So the easy solution is to disable CONFIG_DISPLAY_CPUINFO

Reviewed-by: Sebastien Bourdelin <sebastien.bourdelin@savoirfairelinux.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
7 years agoMerge branch 'master' of git://git.denx.de/u-boot-mips
Tom Rini [Wed, 30 Nov 2016 19:08:28 +0000 (14:08 -0500)]
Merge branch 'master' of git://git.denx.de/u-boot-mips

7 years agotravis.yml: Split Freescale ARM job up more
Tom Rini [Wed, 30 Nov 2016 19:05:08 +0000 (14:05 -0500)]
travis.yml: Split Freescale ARM job up more

In order to avoid running into the time limit, split the 32bit and 64bit
Freescale boards into separate jobs.  We could either pass
"freescale & armv8" to buildman or exclude all of the 32bit CPUs.  While
the former is shorter I fear the amount of possible escaping required
would make things less readable.

Signed-off-by: Tom Rini <trini@konsulko.com>
7 years agoMIPS: Fix map_physmem for cached mappings
Paul Burton [Mon, 26 Sep 2016 18:28:57 +0000 (19:28 +0100)]
MIPS: Fix map_physmem for cached mappings

map_physmem should return a pointer that can be used by the CPU to
access the given memory - on MIPS simply returning the physical address
as it does prior to this patch doesn't achieve that. Instead return a
pointer to the memory within (c)kseg0, which matches up consistently
with the (c)kseg1 pointer that uncached mappings return via ioremap.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
7 years agoMIPS: Use ram_top, not bi_memsize, in arch_lmb_reserve
Paul Burton [Mon, 26 Sep 2016 18:28:56 +0000 (19:28 +0100)]
MIPS: Use ram_top, not bi_memsize, in arch_lmb_reserve

When calculating the region to reserve for the stack in
arch_lmb_reserve, make use of ram_top instead of adding bi_memsize to
CONFIG_SYS_SDRAM_BASE. This avoids overflow if the system has enough
memory to reach the end of the address space.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
7 years agomips: Let cache.h be included from assembly source
Marek Vasut [Fri, 25 Nov 2016 22:32:22 +0000 (23:32 +0100)]
mips: Let cache.h be included from assembly source

Add ifdef __ASSEMBLY__ around the function prototype to let cache.h
be included from assembly code.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Cc: Paul Burton <paul.burton@imgtec.com>
7 years agocommon/board_f: enable initr_trap for MIPS
Daniel Schwierzeck [Sat, 9 Jan 2016 17:34:15 +0000 (18:34 +0100)]
common/board_f: enable initr_trap for MIPS

Enable initr_trap hook also for MIPS to install and enable
U-Boot's specific MIPS exception handlers.

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agoMIPS: add handling for generic and EJTAG exceptions
Daniel Schwierzeck [Sat, 9 Jan 2016 17:34:14 +0000 (18:34 +0100)]
MIPS: add handling for generic and EJTAG exceptions

Add exception handlers for generic and EJTAG exceptions. Most of
the assembly code is imported from Linux kernel and adapted to U-Boot.
The exception vector table will be reserved above the stack before
U-Boot is relocated. The exception handlers will be installed and
activated after relocation in the initr_traps hook function.

Generic exceptions are handled by showing a CPU register dump similar
to Linux kernel. For example:

malta # md 1
00000001:
Ooops:
$ 0   : 00000000 00000000 00000009 00000004
$ 4   : 8ff7e108 00000000 0000003a 00000000
$ 8   : 00000008 00000001 8ff7cd18 00000004
$12   : 00000002 00000000 00000005 0000003a
$16   : 00000004 00000040 00000001 00000001
$20   : 00000000 8fff53c0 00000008 00000004
$24   : ffffffff 8ffdea44
$28   : 90001650 8ff7cd00 00000004 8ffe6818
Hi    : 00000000
Lo    : 00000004
epc   : 8ffe6848 (text bfc28848)
ra    : 8ffe6818 (text bfc28818)
Status: 00000006
Cause : 00000410 (ExcCode 04)
BadVA : 8ff9e928
PrId  : 00019300
 ### ERROR ### Please RESET the board ###

EJTAG exceptions are checked for SDBBP and delegated to the SDBBP handler
if necessary. Otherwise the debug mode will simply be exited. The SDBBP
handler currently prints the contents of registers c0_depc and c0_debug.
This could be extended in the future to handle semi-hosting according to
the MIPS UHI specification.

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Paul Burton <paul.burton@imgtec.com>
Tested-by: Paul Burton <paul.burton@imgtec.com>
7 years agoMIPS: reserve space for exception vectors
Daniel Schwierzeck [Sat, 9 Jan 2016 17:34:14 +0000 (18:34 +0100)]
MIPS: reserve space for exception vectors

In order to set own exception handlers, a table with the exception
vectors must be built in DRAM and the CPU EBase register must be
set to the base address of this table.

Reserve the space above the stack and use gd->irq_sp as storage
for the exception base address.

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
7 years agoMIPS: add asm-offsets for struct pt_regs
Daniel Schwierzeck [Sat, 9 Jan 2016 17:34:14 +0000 (18:34 +0100)]
MIPS: add asm-offsets for struct pt_regs

Import asm-offsets.c from kernel to generate offset for struct pt_regs
needed by exception handlers.

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
7 years agoMIPS: add possibility to setup initial stack and global data in SRAM
Daniel Schwierzeck [Sat, 4 Jun 2016 14:13:21 +0000 (16:13 +0200)]
MIPS: add possibility to setup initial stack and global data in SRAM

This adds a new Kconfig option CONFIG_MIPS_INIT_STACK_IN_SRAM which
a SoC can select if it supports some kind of SRAM. Together with
CONFIG_SYS_INIT_SP_ADDR the initial stack and global data can be
set up in that SRAM. This can be used to provide a C environment
also for lowlevel_init().

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
7 years agoMIPS: factor out code for initial stack and global data
Daniel Schwierzeck [Sun, 25 Sep 2016 16:36:38 +0000 (18:36 +0200)]
MIPS: factor out code for initial stack and global data

Move the code for setting up the initial stack and global data
to a macro to be able to use it more than once.

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
7 years agoMIPS: fix iand optimize setup of CP0 registers
Daniel Schwierzeck [Sun, 7 Feb 2016 23:37:59 +0000 (00:37 +0100)]
MIPS: fix iand optimize setup of CP0 registers

Clear cp0 status while preserving implementation specific bits.
Set bits BEV and ERL as the arch specification requires after
a reset or soft-reset exception.

Extend and fix initialization of watch registers. Check if additional
watch register sets are implemented and initialize them too.

Initialize cp0 count as early as possible to get the most
accurate boot timing.

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
7 years agoMIPS: fix ROM exception vectors
Daniel Schwierzeck [Sun, 7 Feb 2016 18:39:58 +0000 (19:39 +0100)]
MIPS: fix ROM exception vectors

When booting from ROM, early exceptions can't be handled
properly. Instead of busy-looping give the developer the
possibilty to examine the situation. Invoke an UHI
exception operation which can be read as unhandled exception
by a hardware debugger if one is attached. If the debugger
doesn't support UHI, the exception is read as unexpected
breakpoint.

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
7 years agoMIPS: make inclusion of ROM exception vectors configurable
Daniel Schwierzeck [Sun, 14 Feb 2016 17:52:57 +0000 (18:52 +0100)]
MIPS: make inclusion of ROM exception vectors configurable

This adds a compile time option to include code for static
exception vectors. Static exception vectors are only needed,
when the U-Boot entry point is equal to the CPU reset exception
vector address. For instance this is the case when U-Boot is
used as ROM in Qemu or booted from parallel NOR flash. When
U-Boot is booted from RAM (e.g. loaded there by SPL), the
exception vectors need to be setup dynamically, which is done
in follow-up commits.

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
7 years agoMerge branch 'master' of git://www.denx.de/git/u-boot-imx
Tom Rini [Wed, 30 Nov 2016 14:57:52 +0000 (09:57 -0500)]
Merge branch 'master' of git://denx.de/git/u-boot-imx

7 years agoimx6: clock: Enable External Memory Interface [EIM] clock (eim_slow_clock)
Lukasz Majewski [Mon, 28 Nov 2016 06:18:14 +0000 (07:18 +0100)]
imx6: clock: Enable External Memory Interface [EIM] clock (eim_slow_clock)

This patch extends the imx6 clock code to enable or disable the EIM
slow clock, which in necessary when one wants to use EIM interface t
o read/write from external memory (e.g. NOR).

Signed-off-by: Lukasz Majewski <l.majewski@majess.pl>
7 years agomx6sx: Add initial support for Samtec VIN|ING 2000 board
Christoph Fritz [Tue, 29 Nov 2016 15:13:40 +0000 (16:13 +0100)]
mx6sx: Add initial support for Samtec VIN|ING 2000 board

This patch adds initial support for Samtec VIN|ING 2000 board.

Signed-off-by: Christoph Fritz <chf.fritz@googlemail.com>
Reviewed-by: Stefano Babic <sbabic@denx.de>
Acked-by: Marek Vasut <marex@denx.de>
7 years agoMerge git://git.denx.de/u-boot-mpc85xx
Tom Rini [Wed, 30 Nov 2016 00:42:48 +0000 (19:42 -0500)]
Merge git://git.denx.de/u-boot-mpc85xx

7 years agotravis.yml: Add samsung and rockchip builds
Tom Rini [Tue, 29 Nov 2016 17:41:19 +0000 (12:41 -0500)]
travis.yml: Add samsung and rockchip builds

The catch-all job is failing due to time limits depending on factors out
of our control, so move Samsung and Rockchip boards into their own jobs
and then exclude them from the general ARM and AArch64 jobs.

Signed-off-by: Tom Rini <trini@konsulko.com>
7 years agoimx7: SPI: add suport for SPI flash in mikroBUS slot
Angus Ainslie [Fri, 11 Nov 2016 18:31:39 +0000 (11:31 -0700)]
imx7: SPI: add suport for SPI flash in mikroBUS slot

Enable the escpi3 nets attached to the mikroBUS slot
on the i.MX7 Sabre evalution board. Also enble the SPI flash
commands to work with the "flash click" board.

This is V2 of this patch with changes recommended by the maintainer

CC: Jagan Teki <jteki@openedev.com>
7 years agoarm: mx6: specify SPL padding
Stefan Agner [Tue, 15 Nov 2016 18:38:23 +0000 (10:38 -0800)]
arm: mx6: specify SPL padding

Specify standard padding for payload to 68KB. This is derived from
the maximum header size plus maximum SPL size. It matches the
already defined offset for SD/eMMC devices (69KB) too. This allows
to use the u-boot-with-spl.imx build target to generate a directly
flashable image which can be flashed using:

  dd if=u-boot-with-spl.imx of=/dev/mmcblk0 bs=512 skip=2

While the patch has been created with SD/eMMC in mind, this also
works with other boot media. The board file needs to configure the
media specific (absolute) payload offset accordingly. Especially
the IVT offset is boot media specific and can be retrieved from the
reference manual (Table 8-25. Image Vector Table Offset and Initial
Load Region Size). For NAND boot a define like this should do the
job:

 #define CONFIG_SYS_NAND_U_BOOT_OFFS (SPL_PAD_TO + 0x400)

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
7 years agomx6sx: Add initial support for UDOO Neo Board
Breno Lima [Fri, 25 Nov 2016 18:56:57 +0000 (16:56 -0200)]
mx6sx: Add initial support for UDOO Neo Board

UDOO Neo Board is a development board from Seco that has three models:
 - UDOO Neo Basic
 - UDOO Neo Basic Kick Starter
 - UDOO Neo Extended
 - UDOO Neo Full

All versions are based on the i.MX6 SoloX processor.

For more details about the UDOO Neo board, please refer to:
http://www.udoo.org/udoo-neo/

This work is based on a previous commit of Francesco Montefoschi
<francesco.monte@gmail.com>:
https://github.com/fmntf/u-boot/commit/877b71184a5105e708024f232d36aed574961844

Only tested on the UDOO Neo Full board.

Signed-off-by: Breno Lima <breno.lima@nxp.com>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
7 years agocolibri_vf: Read kernel and device tree from static UBI volumes
Sanchayan Maity [Fri, 25 Nov 2016 10:49:17 +0000 (16:19 +0530)]
colibri_vf: Read kernel and device tree from static UBI volumes

Our update scripts write the kernel and device tree in seperate
UBI volumes. This allows to use a lot less UBI/UBIFS support in
U-Boot, which should lower the risk of hitting bugs in this area.

Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
7 years agoARM: ts4600: add basic board support
Sebastien Bourdelin [Tue, 8 Nov 2016 17:18:07 +0000 (12:18 -0500)]
ARM: ts4600: add basic board support

This commit adds basic support including:
MMC, Serial console

Signed-off-by: Sebastien Bourdelin <sebastien.bourdelin@savoirfairelinux.com>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
7 years agoboard: ge: bx50v3: add the PMIC configuration support
Ken Lin [Fri, 18 Nov 2016 17:20:54 +0000 (12:20 -0500)]
board: ge: bx50v3: add the PMIC configuration support

Change the PMIC bulk configuration from auto mode to sync mode to avoid
voltage dropout issue seen in auto mode.

Signed-off-by: Ken Lin <ken.lin@advantech.com.tw>
Signed-off-by: Akshay Bhat <akshay.bhat@timesys.com>
7 years agoARM: mx6: ddr: use Kconfig for inclusion of DDR calibration routines
Eric Nelson [Sun, 30 Oct 2016 23:33:50 +0000 (16:33 -0700)]
ARM: mx6: ddr: use Kconfig for inclusion of DDR calibration routines

The DDR calibration routines are gated by conditionals for the
i.MX6DQ SOCs, but with the use of the sysinfo parameter, these
are usable on at least i.MX6SDL and i.MX6SL variants with DDR3.

Also, since only the Novena board currently uses the dynamic
DDR calibration routines, these routines waste space on other
boards using SPL.

Add a KConfig entry to allow boards to selectively include the
DDR calibration routines.

Signed-off-by: Eric Nelson <eric@nelint.com>
7 years agomx6: ddr: add routine to return DDR calibration data
Eric Nelson [Sun, 30 Oct 2016 23:33:49 +0000 (16:33 -0700)]
mx6: ddr: add routine to return DDR calibration data

Add routine mmdc_read_calibration() to return the output of DDR
calibration. This can be used for debugging or to aid in construction
of static memory configuration.

This routine will be used in a subsequent patch set adding a virtual
"mx6memcal" board, but could also be useful when gathering statistics
during an initial production run.

Signed-off-by: Eric Nelson <eric@nelint.com>
7 years agomx6: ddr: pass mx6_ddr_sysinfo to calibration routines
Eric Nelson [Sun, 30 Oct 2016 23:33:48 +0000 (16:33 -0700)]
mx6: ddr: pass mx6_ddr_sysinfo to calibration routines

The DDR calibration routines have scattered support for bus
widths other than 64-bits:

-- The mmdc_do_write_level_calibration() routine assumes the
presence of PHY1, and
-- The mmdc_do_dqs_calibration() routine tries to determine
whether one or two DDR PHYs are active by reading MDCTL.

Since a caller of these routines must have a valid struct mx6_ddr_sysinfo
for use in calling mx6_dram_cfg(), and the bus width is available in the
"dsize" field, use this structure to inform the calibration routines which
PHYs are active.

This allows the use of the DDR calibration routines on CPU variants
like i.MX6SL that only have a single MMDC port.

Signed-off-by: Eric Nelson <eric@nelint.com>
Reviewed-by: Marek Vasut <marex@denx.de>
7 years agomx6: ddr: allow 32 cycles for DQS gating calibration
Eric Nelson [Sun, 30 Oct 2016 23:33:47 +0000 (16:33 -0700)]
mx6: ddr: allow 32 cycles for DQS gating calibration

The DDR calibration code is only setting flag DG_CMP_CYC (DQS gating sample
cycle) for the first PHY.

Set the 32-cycle flag for both PHYs and clear when done so the MPDGCTRL0
output value isn't polluted with calibration artifacts.

Signed-off-by: Eric Nelson <eric@nelint.com>
Reviewed-by: Marek Vasut <marex@denx.de>
7 years agoimx: mx6: ddr: add register MPZQLP2CTL for LPDDR2
Eric Nelson [Fri, 28 Oct 2016 17:13:57 +0000 (10:13 -0700)]
imx: mx6: ddr: add register MPZQLP2CTL for LPDDR2

Add constants for the MPZQLP2CTL DDR register for both
banks to allow setting the LPDDR2 timing values in
.cfg files using a named constant instead of hex addresses
as is currently done in mx6slevk and other board files.

Signed-off-by: Eric Nelson <eric@nelint.com>
7 years agotools: imximage: display DCD block offset, length
Eric Nelson [Thu, 17 Nov 2016 00:13:41 +0000 (17:13 -0700)]
tools: imximage: display DCD block offset, length

These values can be used to sign a U-Boot image for use when
loading an image through the Serial Download Protocol (SDP).

Note that the address of 0x910000 is usable with the stock
configuration of imx_usb_loader on i.MX6 and i.MX7 SOCs:

https://github.com/boundarydevices/imx_usb_loader/blob/master/mx6_usb_work.conf#L3

Refer to the section on imx_usb_loader in this post for more
details:

https://boundarydevices.com/high-assurance-boot-hab-dummies/

Signed-off-by: Eric Nelson <eric@nelint.com>
7 years agoarm: imx: wandboard: fix compile error if CONFIG_VIDEO is deactivated
Sven Ebenfeld [Fri, 25 Nov 2016 20:42:53 +0000 (21:42 +0100)]
arm: imx: wandboard: fix compile error if CONFIG_VIDEO is deactivated

When I tried to deactivate VIDEO support for the Wandboard, it still
tried to initialize the Framebuffer and so on. That is the reason for
the added ifdefs. CONFIG_VIDEO is enabled in the configuration as default
and therefore nothing changes for the default user.

The structs mx6dl_i2c2_pad_info and mx6q_i2c2_pad_info are only available
when CONFIG_IPUV3 are set and should not be tried to access, when that
define is not defined.

Signed-off-by: Sven Ebenfeld <sven.ebenfeld@gmail.com>
7 years agopwm: imx: increase support up to PWM8 for i.MX6SX
Christoph Fritz [Tue, 22 Nov 2016 11:01:28 +0000 (12:01 +0100)]
pwm: imx: increase support up to PWM8 for i.MX6SX

This patch increases supported PWMs from previously PWM4 now up to PWM8
if i.MX6SX is in use.

Signed-off-by: Christoph Fritz <chf.fritz@googlemail.com>
7 years agotbs2910: Make Ethernet functional again
Soeren Moch [Sun, 27 Nov 2016 15:02:19 +0000 (16:02 +0100)]
tbs2910: Make Ethernet functional again

Configure the PHY to output a 125MHz clk from CLK_25M and set tx clock delay.
This patch is similar to commit 4b6035da482cccda06aeb419634f99937c9fc783
("mx6sabresd: Make Ethernet functional again").

Signed-off-by: Soeren Moch <smoch@web.de>
7 years agoimx: make ipu's di configurable
Max Krummenacher [Tue, 1 Nov 2016 14:04:21 +0000 (15:04 +0100)]
imx: make ipu's di configurable

The ipu has two display interfaces. Make the used one a parameter
in struct display_info_t instead of using unconditionally DI0.
DI0 is the default setting.

Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
Reviewed-by: Eric Nelson <eric@nelint.com>
7 years agospl: mmc: fix switch statement
Max Krummenacher [Tue, 1 Nov 2016 14:04:20 +0000 (15:04 +0100)]
spl: mmc: fix switch statement

If CONFIG_SPL_LIBCOMMON_SUPPORT is not defined there is a lone case statement
at the end of the switch leading to a compile error.
Remove the offending case statement.

| common/spl/spl_mmc.c:339:7: error: label at end of compound statement

Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Acked-by: Marek Vasut <marex@denx.de>
7 years agoARM: mx6: add MMC2 boot device detection support in SPL
Marcin Niestroj [Fri, 21 Oct 2016 11:53:54 +0000 (13:53 +0200)]
ARM: mx6: add MMC2 boot device detection support in SPL

Check BOOT_CFG2[3:4] to determine which SD/MMC port is selected to boot
from. If MMC2 is selected return BOOT_DEVICE_MMC2. In all other cases
return BOOT_DEVICE_MMC1, as we do not have corresponding macro for MMC3
and MMC4.

Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
7 years agoMerge branch 'master' of git://git.denx.de/u-boot
Stefano Babic [Tue, 29 Nov 2016 15:28:28 +0000 (16:28 +0100)]
Merge branch 'master' of git://git.denx.de/u-boot

Signed-off-by: Stefano Babic <sbabic@denx.de>
7 years agoarmv7: psci: cpu_off: flush D-Cache before disable D-Cache
Peng Fan [Tue, 22 Nov 2016 11:41:09 +0000 (19:41 +0800)]
armv7: psci: cpu_off: flush D-Cache before disable D-Cache

Before disable cache, need to first flush cache.

There maybe dirty data in D-Cache before disable D-Cache.
After disable D-Cache, the first store instructions in
psci_v7_flush_dcache_all will directly store registers
{r4-r5, r7, r9-r11, lr} to memory.
If there is dirty data before disable D-Cache,
psci_v7_flush_dcache_all will flush data to memory,
and may overwrite the memory that hold the registers
{r4-r5, r7, r9-r11, lr}.

So before disable cache, first flush D-Cache.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Cc: Chen-Yu Tsai <wens@csie.org>
Cc: Hans de Goede <hdegoede@redhat.com>
Cc: Hongbo Zhang <hongbo.zhang@nxp.com>
Cc: York Sun <york.sun@nxp.com>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: Tom Rini <trini@konsulko.com>
7 years agovexpress64: Juno: Change PCI buss addresses for IO to start from zero.
Liviu Dudau [Tue, 22 Nov 2016 11:19:18 +0000 (11:19 +0000)]
vexpress64: Juno: Change PCI buss addresses for IO to start from zero.

Juno uses a 1:1 mapping between CPU and PCI addresses for IO. First,
that will trip devices that cannot use more than 16 bits of addresses
for IO, second it is un-necessary as the system can handle zero-based
PCI addresses just fine.

Change the mapping to start IO bus addresses from zero.

Signed-off-by: Liviu Dudau <Liviu.Dudau@foss.arm.com>
7 years agobcm2835: Reserve the spin table in efi memory map
Alexander Graf [Wed, 2 Nov 2016 09:36:20 +0000 (10:36 +0100)]
bcm2835: Reserve the spin table in efi memory map

Firmware provides a spin table on the raspberry pi. This table shouldn't
get overwritten by payloads, so we need to mark it as reserved.

Signed-off-by: Alexander Graf <agraf@suse.de>
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
7 years agobcm2835 video: Map frame buffer as 32bpp
Alexander Graf [Wed, 2 Nov 2016 09:36:19 +0000 (10:36 +0100)]
bcm2835 video: Map frame buffer as 32bpp

To enable working efifb support, let's map the frame buffer as 32bpp
instead of 16bpp.

Signed-off-by: Alexander Graf <agraf@suse.de>
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
7 years agoARM: bcm283x: Implement EFI RTS reset_system
Alexander Graf [Wed, 2 Nov 2016 09:36:18 +0000 (10:36 +0100)]
ARM: bcm283x: Implement EFI RTS reset_system

The rpi has a pretty simple way of resetting the whole system. All it takes
is to poke a few registers at a well defined location in MMIO space.

This patch adds support for the EFI loader implementation to allow an OS to
reset and power off the system when we're outside of boot time.

Signed-off-by: Alexander Graf <agraf@suse.de>
7 years agodrivers: net: keystone_net: add rgmii link type support when parsing dt
Mugunthan V N [Thu, 11 Aug 2016 14:34:03 +0000 (20:04 +0530)]
drivers: net: keystone_net: add rgmii link type support when parsing dt

Add support to detect RGMII link interface from link-interface
device tree entry. Also rename the existing link type enums so
that it provides meaningful interface like SGMII.

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Reported-by: Sekhar Nori <nsekhar@ti.com>
Tested-by: Sekhar Nori <nsekhar@ti.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
7 years agoARM: bcm283x: use OF_CONTROL for bcm283x
Fabian Vogt [Mon, 26 Sep 2016 12:26:51 +0000 (14:26 +0200)]
ARM: bcm283x: use OF_CONTROL for bcm283x

This patch removes use of U_BOOT_DEVICE in board/raspberrypi/rpi/rpi.c,
enables OF_CONTROL in the config and adjusts the rpi_*defconfig configs.

Signed-off-by: Fabian Vogt <fvogt@suse.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agoboard: rpi: move uart deactivation to board_init
Fabian Vogt [Mon, 26 Sep 2016 12:26:50 +0000 (14:26 +0200)]
board: rpi: move uart deactivation to board_init

When using OF_CONTROL, the disabled value of the mini UART platdata
gets reset after board_early_init_f. So move detection and disabling
to board_init and remove board_early_init_f.
This uses the first device using the mini uart driver, as this method
works reliably with different device trees or even no device tree at all.

Signed-off-by: Fabian Vogt <fvogt@suse.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agoserial: bcm283x_mu: support disabling after initialization
Fabian Vogt [Mon, 26 Sep 2016 12:26:49 +0000 (14:26 +0200)]
serial: bcm283x_mu: support disabling after initialization

For the Raspberry Pi 3 it needs to be possible to disable the serial
device after initialization happens, as only after the GPIO device is available
it is known whether the mini uart is usable.

Signed-off-by: Fabian Vogt <fvogt@suse.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agofdt: adjust bcm283x device tree for u-boot
Fabian Vogt [Mon, 26 Sep 2016 12:26:48 +0000 (14:26 +0200)]
fdt: adjust bcm283x device tree for u-boot

The information currently set via platdata has to be represented in the
device tree now. bcm283x-uboot.dtsi adds the u-boot specific "skip-init"
property to the serial nodes and enables initialization in the pre-reloc phase.

Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Signed-off-by: Fabian Vogt <fvogt@suse.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agofdt: import bcm283x device tree sources from the linux kernel tree
Fabian Vogt [Mon, 26 Sep 2016 12:26:47 +0000 (14:26 +0200)]
fdt: import bcm283x device tree sources from the linux kernel tree

This patch adds device trees for the bcm283x platform to be used with
OF_CONTROL. The version 4.8-rc7 of the linux kernel was used as source.

Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Signed-off-by: Fabian Vogt <fvogt@suse.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agofdt: add dt-bindings for bcm2835
Fabian Vogt [Mon, 26 Sep 2016 12:26:46 +0000 (14:26 +0200)]
fdt: add dt-bindings for bcm2835

This patch adds dt-bindings as used by the linux kernel device trees
for the bcm283x family.

Albert Aribaud <albert.u.boot@aribaud.net>
Signed-off-by: Fabian Vogt <fvogt@suse.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agoserial: pl01x: expose skip_init platdata option in DT
Fabian Vogt [Mon, 26 Sep 2016 12:26:45 +0000 (14:26 +0200)]
serial: pl01x: expose skip_init platdata option in DT

To be able to represent the skip-init platdata element with OF_CONTROL,
it needs to be read from the device tree as well and put into the platform data.

Cc: Eric Anholt <eric@anholt.net>
Signed-off-by: Fabian Vogt <fvogt@suse.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agoserial: bcm283x_mu: add device tree support
Fabian Vogt [Mon, 26 Sep 2016 12:26:44 +0000 (14:26 +0200)]
serial: bcm283x_mu: add device tree support

This patch adds device tree support for the bcm283x mini-uart driver.

Signed-off-by: Fabian Vogt <fvogt@suse.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agogpio: bcm2835: add device tree support
Fabian Vogt [Mon, 26 Sep 2016 12:26:43 +0000 (14:26 +0200)]
gpio: bcm2835: add device tree support

This patch adds device tree support for the bcm2835 GPIO driver.

Signed-off-by: Fabian Vogt <fvogt@suse.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agofs/fat/fatwrite: Local variable as buffer to store dir_slot entries
Tien Fong Chee [Thu, 28 Jul 2016 06:08:56 +0000 (23:08 -0700)]
fs/fat/fatwrite: Local variable as buffer to store dir_slot entries

fill_dir_slot use get_contents_vfatname_block as a temporary buffer for
constructing a list of dir_slot entries. To save the memory and providing
correct type of memory for above usage, a local buffer with accurate size
declaration is introduced.

The local array size 640 is used because for long file name entry,
each entry use 32 bytes, one entry can store up to 13 characters.
The maximum number of entry possible is 20. So, total size is
32*20=640bytes.

Signed-off-by: Genevieve Chan <ccheauya@altera.com>
Signed-off-by: Tien Fong Chee <tfchee@altera.com>
7 years agospl: add USB Gadget config option
Stefan Agner [Mon, 21 Nov 2016 18:58:53 +0000 (10:58 -0800)]
spl: add USB Gadget config option

Introduce USB Gadget config option. This allows to combine Makefile
entries for SPL_USBETH_SUPPORT and SPL_DFU_SUPPORT.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Acked-by: Lukasz Majewski <l.majewski@samsung.com>
Tested-by: Ravi Babu <ravibabu@ti.com>
7 years agospl: dfu: move DFU Kconfig to SPL Kconfig
Stefan Agner [Mon, 21 Nov 2016 18:58:52 +0000 (10:58 -0800)]
spl: dfu: move DFU Kconfig to SPL Kconfig

The DFU Kconfig menu entries should be part of the SPL
Kconfig file. Also avoid using the top level Makefile by
moving the config dependent build artifacts to the driver/
and driver/usb/gadget/ Makfiles.

With that, DFU can be built again in SPL if
CONFIG_SPL_DFU_SUPPORT is enabled.

Fixes: 6ad6102246d8 ("usb:gadget: Disallow DFU in SPL for now")

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Lukasz Majewski <l.majewski@samsung.com>
7 years agospl: add RAM boot device only if it is actually defined
Stefan Agner [Mon, 21 Nov 2016 18:58:51 +0000 (10:58 -0800)]
spl: add RAM boot device only if it is actually defined

Some devices (e.g. dra7xx) support loading to RAM using DFU without
having direct boot from RAM support. Make sure the linker list
does not contain BOOT_DEVICE_RAM if CONFIG_SPL_RAM_DEVICE is not
enabled.

Fixes: 98136b2f26fa ("spl: Convert spl_ram_load_image() to use linker list")

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Acked-by: Lukasz Majewski <l.majewski@samsung.com>
7 years agoREADME: fix typo FAT_ENV_DEV_AND_PART
Nicolae Rosia [Mon, 21 Nov 2016 15:33:58 +0000 (17:33 +0200)]
README: fix typo FAT_ENV_DEV_AND_PART

The actual define symbol is FAT_ENV_DEVICE_AND_PART

Signed-off-by: Nicolae Rosia <Nicolae_Rosia@Mentor.com>
7 years agoxyz-modem: Change getc timeout loop waiting
tomas.melin@vaisala.com [Mon, 21 Nov 2016 08:18:51 +0000 (10:18 +0200)]
xyz-modem: Change getc timeout loop waiting

This fixes the loop delay when using a hw watchdog.

In case a watchdog is used that accesses CPU registers,
the defined delay of 20us in a tight loop will cause a
huge delay in the actual timeout seen. This is caused
by the fact that udelay will inheritantly call WATCHDOG_RESET.
Together with the omap wdt implementation, the seen timeout increases up to
around 30s. This makes the loop very slow and causes long
delays when using the modem.

Instead, implement the 2 sec loop by using the timer interface to know
when to break out of the timeout loop. Watchdog kicking is taken care of
by getc().

Signed-off-by: Tomas Melin <tomas.melin@vaisala.com>
7 years agosata: fix sata command can not being executed bug
Tang Yuantian [Mon, 21 Nov 2016 02:24:20 +0000 (10:24 +0800)]
sata: fix sata command can not being executed bug

Commit d97dc8a0 separated the non-command code into its own file
which caused variable sata_curr_device can not be set to a correct
value.

Before commit d97dc8a0, variable sata_curr_device can be set
correctly in sata_initialize().
After commit d97dc8a0, sata_initialize() is moved out to its own file.
Accordingly, variable sata_curr_device is removed from sata_initialize()
too. This caused sata_curr_device never gets a chance to be set properly
which prevent other commands from being executed.

This patch sets variable sata_curr_device properly.

Fixes: d97dc8a0 (dm: sata: Separate the non-command code into its
 own file)

Signed-off-by: Tang Yuantian <yuantian.tang@nxp.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agotools/env: fix environment alignment tests for block devices
Max Krummenacher [Sat, 19 Nov 2016 12:58:56 +0000 (13:58 +0100)]
tools/env: fix environment alignment tests for block devices

commit 183923d3e412500bdc597d1745e2fb6f7f679ec7 enforces that the
environment must start at an erase block boundary.

For block devices the sample fw_env.config does not mandate a erase block size
for block devices. A missing setting defaults to the full env size.

Depending on the environment location the alignment check now errors out for
perfectly legal settings.

Fix this by defaulting to the standard blocksize of 0x200 for environments
stored in a block device.
That keeps the fw_env.config files for block devices working even with that
new check.

Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
7 years agotools/Makefile: suppress "which swig" error output
Andre Przywara [Sat, 19 Nov 2016 12:04:59 +0000 (12:04 +0000)]
tools/Makefile: suppress "which swig" error output

The Makefile in tools/ tries to find the "swig" utility by calling "which".
If nothing is found in the path, some versions of which will print an error
message:
$ make clean
which: no swig in (/usr/local/bin:/usr/bin:/bin)

This does not apply to all version of "which", though:
$ echo $0
bash
$ type which
which is aliased to `type -path'
$ which foo <== this version is OK
$ /usr/bin/which foo <== this one is chatty
/usr/bin/which: no foo in (/usr/local/bin:/usr/bin:/bin)
$ sh <== make uses /bin/sh
sh-4.3$ which foo <== no alias here
which: no foo in (/usr/local/bin:/usr/bin:/bin)

This error message is rather pointless in our case, since we just have
this very check to care for this. So add stderr redirection to suppress
the message.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agoti_armv7_keystone2: env: Add NFS loading support for PMMC and MON
Andrew F. Davis [Fri, 18 Nov 2016 17:56:16 +0000 (11:56 -0600)]
ti_armv7_keystone2: env: Add NFS loading support for PMMC and MON

NFS loading support has been added to the default environment for
most boot components, as PMMC and MON loading were added later they
did not originally get the NFS commands added, add these now.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
7 years agokeystone2: Move target selection to Kconfig
Andrew F. Davis [Fri, 18 Nov 2016 17:56:15 +0000 (11:56 -0600)]
keystone2: Move target selection to Kconfig

The config option TARGET_K2x_EVM is set by the k2x defconfigs to pick
a board target, but the header configs also set K2x_EVM. This config
is redundant, remove it and use TARGET_K2x_EVM everywhere in its place.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
7 years agobootcounter_ram: Fix misaligned cache warning
Stefan Roese [Fri, 18 Nov 2016 16:21:52 +0000 (17:21 +0100)]
bootcounter_ram: Fix misaligned cache warning

This patch fixes the warning about misaligned cache on Armada XP:

CACHE: Misaligned operation at range [7ffff0007fffffac]

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Valentin Longchamp <valentin.longchamp@keymile.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agolinux/compat.h: Properly implement ndelay fallback
mario.six@gdsys.cc [Fri, 18 Nov 2016 13:40:37 +0000 (14:40 +0100)]
linux/compat.h: Properly implement ndelay fallback

Commit c68c62 ("i2c: mvtwsi: Make delay times frequency-dependent")
extensively used the ndelay function with a calculated parameter
which is dependant on the configured frequency of the I2C bus. If
standard speed is employed, the parameter is usually 10000 (10000ns
period length for 100kHz frequency).

But, since the arm architecture does not implement a proper version of
ndelay, the fallback default from include/linux/compat.h is used,
which defines every ndelay as udelay(1). This causes problems for
slower speeds on arm, since the delay time is now 9us too short for
the desired frequency, which leads to random failures of the I2C
interface.

To remedy this, we implement a proper, parameter-aware ndelay fallback
for architectures that don't implement a real ndelay function.

Reported-By: Jason Brown <Jason.brown@apcon.com>
To: Tom Rini <trini@konsulko.com>
To: Heiko Schocher <hs@denx.de>
Signed-off-by: Mario Six <mario.six@gdsys.cc>
7 years agocolibri_vf: usb gadget: toradex pid is now set generically
Max Krummenacher [Wed, 16 Nov 2016 16:49:25 +0000 (17:49 +0100)]
colibri_vf: usb gadget: toradex pid is now set generically

remove now unused CONFIG_TRDX_PID_XXX

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Acked-by: Stefan Agner <stefan.agner@toradex.com>
Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
7 years agoapalis/colibri_t30: move environment location
Marcel Ziswiler [Wed, 16 Nov 2016 16:49:24 +0000 (17:49 +0100)]
apalis/colibri_t30: move environment location

Now with the config block handling in place move the U-Boot environment
location before the config block at the end of 1st "boot sector" as
deployed during production using our downstream BSP.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
7 years agoapalis/colibri_imx7/pxa270/t20/t30/vf: integrate config block handling
Marcel Ziswiler [Wed, 16 Nov 2016 16:49:23 +0000 (17:49 +0100)]
apalis/colibri_imx7/pxa270/t20/t30/vf: integrate config block handling

With our common code in place actually make use of it across all our
modules.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
7 years agotoradex: config block handling
Marcel Ziswiler [Wed, 16 Nov 2016 16:49:22 +0000 (17:49 +0100)]
toradex: config block handling

Add Toradex factory configuration block handling. The config block is a
data structure which gets stored to flash during production testing. The
structure holds such information as board resp. hardware revision,
product ID and serial number which is used as the NIC part of the
Ethernet MAC address as well. The config block will be read upon boot by
the show_board_info() function, displayed as part of the board
information and passed to Linux via device tree or ATAGs.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
7 years agoapalis/colibri_t20/t30: deactivate displaying board info
Marcel Ziswiler [Wed, 16 Nov 2016 16:49:21 +0000 (17:49 +0100)]
apalis/colibri_t20/t30: deactivate displaying board info

Deactivate CONFIG_DISPLAY_BOARDINFO in favour of
CONFIG_DISPLAY_BOARDINFO_LATE which also displays on the LCD.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
7 years agogeneric-board: make show_board_info a weak function
Marcel Ziswiler [Wed, 16 Nov 2016 16:49:20 +0000 (17:49 +0100)]
generic-board: make show_board_info a weak function

Make show_board_info() a weak function which allows for custom board
specific implementations thereof.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
7 years agoRevert "generic-board: allow showing custom board info"
Marcel Ziswiler [Wed, 16 Nov 2016 16:49:19 +0000 (17:49 +0100)]
Revert "generic-board: allow showing custom board info"

Drop CONFIG_CUSTOM_BOARDINFO as it is not Kconfig compliant and anyway
not really used anywhere plus the upcoming weak show_board_info()
approach seems much superior.

This reverts commit a9ad18c9d5fe2554753b0f9a52adfd5ebce61147.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
7 years agospl: remove redundant call to parse_image_header()
tomas.melin@vaisala.com [Wed, 16 Nov 2016 11:15:05 +0000 (13:15 +0200)]
spl: remove redundant call to parse_image_header()

Image header was checked twice.

Signed-off-by: Tomas Melin <tomas.melin@vaisala.com>
Acked-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agospl: add check for FIT-header when loading image
tomas.melin@vaisala.com [Wed, 16 Nov 2016 10:54:39 +0000 (12:54 +0200)]
spl: add check for FIT-header when loading image

Add check for FDT_MAGIC, otherwise also legacy images will be loaded as
a FIT. With this check in place, the loader works correct both
with legacy and FIT images.

Signed-off-by: Tomas Melin <tomas.melin@vaisala.com>
Acked-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agosun8i_emac: Fix mdio read sequence
Philipp Tomsich [Wed, 16 Nov 2016 01:40:27 +0000 (01:40 +0000)]
sun8i_emac: Fix mdio read sequence

To send a parametrized command to the PHY over MDIO, we should write
the data first, the trigger the execution by the command register
write. Fix the access pattern in our MDIO write routine.
Apparently this doesn't really matter with the Realtek PHY on the
Pine64, but other PHYs (which require more setup) will choke on
the wrong order.
[Andre: add commit message]

Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Acked-by: Jagan Teki <jagan@openedev.com>
7 years agosunxi: add support for Nintendo NES Classic Edition
FUKAUMI Naoki [Thu, 17 Nov 2016 23:31:29 +0000 (08:31 +0900)]
sunxi: add support for Nintendo NES Classic Edition

Add board support for sun8i_r16 Nintendo NES Classic edition.

Signed-off-by: FUKAUMI Naoki <naobsd@gmail.com>
[jagan: Add commit message body]
Signed-off-by: Jagan Teki <jagan@openedev.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
7 years agomtd: nand: add support for the TC58NVG2S0H chip
Boris Brezillon [Tue, 8 Nov 2016 16:21:12 +0000 (17:21 +0100)]
mtd: nand: add support for the TC58NVG2S0H chip

Add the description of the Toshiba TC58NVG2S0H SLC nand to the nand_ids
table so we can use the NAND ECC infos and the ONFI timings.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
7 years agosunxi: Mele_M5_defconfig: Drop non existing STATUSLED setting
Hans de Goede [Sun, 13 Nov 2016 18:54:08 +0000 (19:54 +0100)]
sunxi: Mele_M5_defconfig: Drop non existing STATUSLED setting

And also remove it from scripts/config_whitelist.txt as the
Mele_M5_defconfig was the only one defining it.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
Reviewed-by: Jagan Teki <jagan@openedev.com>
7 years agosunxi: mmc: Set CONFIG_SYS_MMC_MAX_DEVICE
Emmanuel Vadot [Sat, 5 Nov 2016 19:51:11 +0000 (20:51 +0100)]
sunxi: mmc: Set CONFIG_SYS_MMC_MAX_DEVICE

Set CONFIG_SYS_MMC_MAX_DEVICE to 4 for sunxi SoC.
This define is needed in the API code.

Signed-off-by: Emmanuel Vadot <manu@bidouilliste.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>