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

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

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

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

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

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

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

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

Enable CONFIG_SYS_GENERIC_BOARD for imx6slevk to use generic board.

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

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

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

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

Do the same on the README document for consistency.

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

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

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

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

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

cc: Masahiro Yamada <yamada.m@jp.panasonic.com>
cc: Tom Rini <trini@ti.com>
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
10 years agomx6sxsabresd: Add PCI support
Fabio Estevam [Mon, 25 Aug 2014 17:26:46 +0000 (14:26 -0300)]
mx6sxsabresd: Add PCI support

Tested with an Intel Wireless PCI 7260HMW card:

U-Boot 2014.10-rc1-16576-g4a8a8a8-dirty (Aug 23 2014 - 16:05:11)

CPU:   Freescale i.MX6SX rev1.0 at 792 MHz
Reset cause: WDOG
Board: MX6SX SABRE SDB
I2C:   ready
DRAM:  1 GiB
MMC:   FSL_SDHC: 0
  00:01.0     - 16c3:abcd - Bridge device
   01:00.0    - 8086:08b1 - Network controller

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
10 years agopcie_imx: Add mx6solox support
Fabio Estevam [Mon, 25 Aug 2014 17:26:45 +0000 (14:26 -0300)]
pcie_imx: Add mx6solox support

Let PCI on mx6solox also be supported.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Marek Vasut <marex@denx.de>
10 years agomx6: imx-regs: Provide a structure for GPC registers
Fabio Estevam [Mon, 25 Aug 2014 17:26:44 +0000 (14:26 -0300)]
mx6: imx-regs: Provide a structure for GPC registers

Introduce a structure for accessing the General Power Controller block (GPC)
registers.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
10 years agomx6qsabreauto: Remove imx6q-sabreauto.dts
Fabio Estevam [Fri, 5 Sep 2014 18:36:27 +0000 (15:36 -0300)]
mx6qsabreauto: Remove imx6q-sabreauto.dts

Commit fa9c021632473 ("mx6: add example DTB for mx6qsabreauto") introduced
'imx6q-sabreauto.dts' but it adds no real value as the dts file only contains
the 'model' and 'compatible' strings.

After this commit the final binary is also changed from 'u-boot.imx' to
'u-boot-dtb.imx', which may confuse users.

So revert it until a more complete and useful device tree could be provided.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Otavio Salvador <otavio@ossystems.com.br>
10 years agoimx: nitrogen6x: Replace 'fatload' by 'load' command in env settings to be filesystem...
Guillaume GARDET [Tue, 26 Aug 2014 10:05:31 +0000 (12:05 +0200)]
imx: nitrogen6x: Replace 'fatload' by 'load' command in env settings to be filesystem independent

nitrogen6x.h file defines CONFIG_CMD_FS_GENERIC, so we are able to use generic
'load' command instead of 'fatload'. It allows to use ext filesystem and keep
compatibilty with fat filesystem.

Signed-off-by: Guillaume GARDET <guillaume.gardet@free.fr>
Cc: Stefano Babic <sbabic@denx.de>
Acked-By: Eric Nelson <eric.nelson@boundarydevices.com>
10 years agomx6dlsabresd: Use its own DCD table
Fabio Estevam [Thu, 21 Aug 2014 13:02:25 +0000 (10:02 -0300)]
mx6dlsabresd: Use its own DCD table

Currently mx6dlsabresd shares the same DCD settings with the nitrogen board.

Provide a DCD configuration file specific to mx6dlsabresd with the settings
recommended by the Freescale hardware team.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
10 years agoarm: vf610: lpuart: disable FIFO on initializaton
Stefan Agner [Tue, 19 Aug 2014 15:54:28 +0000 (17:54 +0200)]
arm: vf610: lpuart: disable FIFO on initializaton

UART does not use the UART FIFO, but we should also not rely that
the UART FIFO is diabled by default. For instance, when loading
U-Boot using the boot ROMs serial downloader protocol over UART,
FIFO is enabled at U-Boot start time.

This patch disables the RX and TX FIFO, sets back their thresholds
and flushes them.

Signed-off-by: Stefan Agner <stefan@agner.ch>
10 years agoarm: vf610: lpuart: fix status register handling
Stefan Agner [Tue, 19 Aug 2014 15:54:27 +0000 (17:54 +0200)]
arm: vf610: lpuart: fix status register handling

The status register 1 (S1) is not writeable, hence we should not
write it. In order to clear the RDRF flag we only need to read
the data register.

Also, when stressing U-Boot a lot with serial input, an overflow can
occur which asserts the S1_OR flag (while not asserting the S1_RDRF
flag). To clear this flag we again just need to read the data
register, hence add this flag to the abort conditions for the while
loop.

Insert a compiler barrier to make sure reading the data register
gets executed after reading the status register.

Signed-off-by: Stefan Agner <stefan@agner.ch>
10 years agomx6: Fix ECSPI typo in soc_boot_modes
Nikolay Dimitrov [Sun, 10 Aug 2014 17:03:07 +0000 (20:03 +0300)]
mx6: Fix ECSPI typo in soc_boot_modes

Signed-off-by: Nikolay Dimitrov <picmaster@mail.bg>
Cc: Stefano Babic <sbabic@denx.de>
Acked-by: Anatolij Gustschin <agust@denx.de>
10 years agoimximage: Fix imximage IVT bug for EIM-NOR boot
Ye.Li [Wed, 20 Aug 2014 08:55:32 +0000 (16:55 +0800)]
imximage: Fix imximage IVT bug for EIM-NOR boot

The load region size of EIM-NOR are defined to 0. For this case,
the parameter "imximage_init_loadsize" must be calculated.
The imximage tool implements the calculation in the "imximage_generate"
function, but the following function "imximage_set_header" resets the value
and not calculate. This bug cause some fields of IVT head are not
correct, for example the boot_data and DCD overlay the application area.

Signed-off-by: Ye.Li <B37916@freescale.com>
10 years agoiMX6: Disable the L2 before chaning the PL310 latency
Ye.Li [Wed, 20 Aug 2014 09:18:24 +0000 (17:18 +0800)]
iMX6: Disable the L2 before chaning the PL310 latency

The Latency parameters of PL310 Tag RAM latency control register and
Data RAM Latency control register are set in L2 cache enable. And
setting these registers must have PL310 NOT enabled.

But when using Plugin mode boot, the PL310 is enabled by bootrom.
The patch disables the PL310 before applying this setting.

Signed-off-by: Ye.Li <Ye.Li@freescale.com>
10 years agoimx: ventana: Avoid undefined behaviour
Thierry Reding [Fri, 22 Aug 2014 07:46:35 +0000 (09:46 +0200)]
imx: ventana: Avoid undefined behaviour

The leds array within struct ventana has space for 3 elements, but the
setup_board_gpio() function tries to set up 4 GPIOs for LEDs. Recent
versions of GCC complain about that:

board/gateworks/gw_ventana/gw_ventana.c: In function 'setup_board_gpio':
board/gateworks/gw_ventana/gw_ventana.c:987:27: warning: iteration 3u invokes undefined behavior [-Waggressive-loop-optimizations]
   if (gpio_cfg[board].leds[i])
   ^
board/gateworks/gw_ventana/gw_ventana.c:986:2: note: containing loop
  for (i = 0; i < 4; i++) {
  ^

Fix this by making the upper bound of the loop match the array size.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Acked-by: Tim Harvey <tharvey@gateworks.com>
10 years agotools: imximage: Fix the maximum DCD size for mx53/mx6
Fabio Estevam [Mon, 1 Sep 2014 12:56:23 +0000 (09:56 -0300)]
tools: imximage: Fix the maximum DCD size for mx53/mx6

According to mx53 and mx6 reference manuals:

"The maximum size of the DCD limited to 1768 bytes."

As each DCD entry consists of 8 bytes, we have a total of 1768 / 8 = 221, and
excluding the first entry, which is the header leads to 220 as the maximum
number for DCD size.

Reported-by: Jonas Karlsson <jonas.d.karlsson@gmail.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Nitin Garg <nitin.garg@freescale.com>
Acked-by: Nitin Garg <nitin.garg@freescale.com>
10 years agoimx: ventana: add pci fixup for PLX PEX860x switch GPIO
Tim Harvey [Fri, 8 Aug 2014 05:49:57 +0000 (22:49 -0700)]
imx: ventana: add pci fixup for PLX PEX860x switch GPIO

Most Gateworks Ventana boards use a PLX PEX860x PCIe switch for PCIe expansion.
These boards use GPIO on the PLX device as PERST# for the downstream ports
thus we assert this when the PLX is enumerated.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
10 years agopci: add support for board_pci_fixup_dev function
Tim Harvey [Fri, 8 Aug 2014 05:49:56 +0000 (22:49 -0700)]
pci: add support for board_pci_fixup_dev function

Some board-level drivers may wish to have per-device fixup functions
for PCI devices.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
10 years agoarm: mx6: cm_fx6: add sata support
Nikita Kiryanov [Wed, 20 Aug 2014 12:09:06 +0000 (15:09 +0300)]
arm: mx6: cm_fx6: add sata support

Add support for SATA.

Cc: Igor Grinberg <grinberg@compulab.co.il>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Tom Rini <trini@ti.com>
Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
10 years agoarm: mx6: cm_fx6: use eeprom
Nikita Kiryanov [Wed, 20 Aug 2014 12:09:05 +0000 (15:09 +0300)]
arm: mx6: cm_fx6: use eeprom

Use Compulab eeprom module to obtain revision number, serial number, and
mac address from the EEPROM.

Cc: Igor Grinberg <grinberg@compulab.co.il>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Tom Rini <trini@ti.com>
Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
10 years agoarm: mx6: cm_fx6: add i2c support
Nikita Kiryanov [Wed, 20 Aug 2014 12:09:04 +0000 (15:09 +0300)]
arm: mx6: cm_fx6: add i2c support

Add support for all 3 I2C busses on Compulab CM-FX6 CoM.

Cc: Igor Grinberg <grinberg@compulab.co.il>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Tom Rini <trini@ti.com>
Acked-by: Igor Grinberg <grinberg@compulab.co.il>
Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
10 years agoarm: mx6: cm_fx6: add usb support
Nikita Kiryanov [Wed, 20 Aug 2014 12:09:03 +0000 (15:09 +0300)]
arm: mx6: cm_fx6: add usb support

Add USB and USB OTG host support for Compulab CM-FX6 CoM.

Cc: Igor Grinberg <grinberg@compulab.co.il>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Tom Rini <trini@ti.com>
Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
10 years agoarm: mx6: cm_fx6: add ethernet support
Nikita Kiryanov [Wed, 20 Aug 2014 12:09:02 +0000 (15:09 +0300)]
arm: mx6: cm_fx6: add ethernet support

Add ethernet support for Compulab CM-FX6 CoM

Cc: Igor Grinberg <grinberg@compulab.co.il>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Tom Rini <trini@ti.com>
Acked-by: Igor Grinberg <grinberg@compulab.co.il>
Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
10 years agoarm: mx6: cm_fx6: add nand support
Nikita Kiryanov [Wed, 20 Aug 2014 12:09:01 +0000 (15:09 +0300)]
arm: mx6: cm_fx6: add nand support

Add NAND support for Compulab CM-FX6 CoM.

Cc: Igor Grinberg <grinberg@compulab.co.il>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Tom Rini <trini@ti.com>
Acked-by: Igor Grinberg <grinberg@compulab.co.il>
Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
10 years agoarm: mx6: add support for Compulab cm-fx6 CoM
Nikita Kiryanov [Sun, 7 Sep 2014 15:59:29 +0000 (18:59 +0300)]
arm: mx6: add support for Compulab cm-fx6 CoM

Add initial support for Compulab CM-FX6 CoM.
Support includes MMC, SPI flash, and SPL with dynamic DRAM detection.

Cc: Igor Grinberg <grinberg@compulab.co.il>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Tom Rini <trini@ti.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Acked-by: Marek Vasut <marex@denx.de>
Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
10 years agoarm: mx6: add get_cpu_type()
Nikita Kiryanov [Wed, 20 Aug 2014 12:08:59 +0000 (15:08 +0300)]
arm: mx6: add get_cpu_type()

Define get_cpu_type(). Reuse it in is_cpu_type().

Cc: Igor Grinberg <grinberg@compulab.co.il>
Cc: Stefano Babic <sbabic@denx.de>
Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
10 years agoarm: mx6: ddr: fix cs0_end calculation
Nikita Kiryanov [Wed, 20 Aug 2014 12:08:58 +0000 (15:08 +0300)]
arm: mx6: ddr: fix cs0_end calculation

Current way of calculation CS0_END field for MMDCx_MDASP register
is problematic because in most cases the user is forced to define
cs_density in an unnatural way: as value - 2, instead of value.

This breaks the abstraction provided by struct mx6_ddr_sysinfo
because the user is forced to be aware of the way the calculation
is performed.

Refactor the calculation.

Cc: Stefano Babic <sbabic@denx.de>
Cc: Tim Harvey <tharvey@gateworks.com>
Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
10 years agoarm: mx6: ddr: configure MMDC for slow_pd
Nikita Kiryanov [Wed, 20 Aug 2014 12:08:57 +0000 (15:08 +0300)]
arm: mx6: ddr: configure MMDC for slow_pd

According to MX6 TRM, both MMDC and DRAM should be configured to
the same powerdown precharge. Currently, mx6_dram_cfg()
configures MMDC for fast pd (MDPDC[7] = 0), and the DRAM for
'slow exit (DLL off)' (MR0[12] = 0).

Configure MMDC for slow pd.

Cc: Stefano Babic <sbabic@denx.de>
Cc: Tim Harvey <tharvey@gateworks.com>
Cc: Igor Grinberg <grinberg@compulab.co.il>
Acked-by: Igor Grinberg <grinberg@compulab.co.il>
Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
Acked-by: Tim Harvey <tharvey@gateworks.com>
10 years agoarm: mx6: ddr: do not write into reserved bit
Nikita Kiryanov [Wed, 20 Aug 2014 12:08:56 +0000 (15:08 +0300)]
arm: mx6: ddr: do not write into reserved bit

Bit 16 in mapsr register is in a reserved field. Don't write to it.

Cc: Stefano Babic <sbabic@denx.de>
Cc: Tim Harvey <tharvey@gateworks.com>
Acked-by: Tim Harvey <tharvey@gateworks.com>
Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
10 years agoarm: mx6: ddr: cleanup
Nikita Kiryanov [Sun, 7 Sep 2014 15:58:11 +0000 (18:58 +0300)]
arm: mx6: ddr: cleanup

No functional changes.

Cc: Stefano Babic <sbabic@denx.de>
Cc: Tim Harvey <tharvey@gateworks.com>
Acked-by: Tim Harvey <tharvey@gateworks.com>
Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
10 years agoi2c: imx: add macros to setup pads for multiple SoC types
Nikita Kiryanov [Wed, 20 Aug 2014 12:08:54 +0000 (15:08 +0300)]
i2c: imx: add macros to setup pads for multiple SoC types

Add macro which defines i2c_pads_info structs for multiple SoC types,
and a macro which selects the appropriate struct based on CPU type,
thus eliminating the need to manage multiple i2c pad configurations
manually when supporting multiple SoC types.

Cc: Stefano Babic <sbabic@denx.de>
Cc: Tim Harvey <tharvey@gateworks.com>
Acked-by: Tim Harvey <tharvey@gateworks.com>
Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
10 years agosata: dwc_ahsata: implement sata_port_status
Nikita Kiryanov [Wed, 20 Aug 2014 12:08:53 +0000 (15:08 +0300)]
sata: dwc_ahsata: implement sata_port_status

Define the new common function sata_port_status() which can be
used to query the sata driver for the state of ports, and implement it
for dwc_ahsata.

Cc: Stefano Babic <sbabic@denx.de>
Cc: Tom Rini <trini@ti.com>
Cc: Marek Vasut <marex@denx.de>
Reviewed-by: Marek Vasut <marex@denx.de>
Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
10 years agocompulab: eeprom: add support for defining eeprom i2c bus
Nikita Kiryanov [Wed, 20 Aug 2014 12:08:52 +0000 (15:08 +0300)]
compulab: eeprom: add support for defining eeprom i2c bus

Create CONFIG_SYS_I2C_EEPROM_BUS #define to tell the EEPROM
module what I2C bus the EEPROM is located at. Make cl_eeprom_read()
switch to that bus when reading EEPROM.

Cc: Igor Grinberg <grinberg@compulab.co.il>
Cc: Dmitry Lifshitz <lifshitz@compulab.co.il>
Cc: Tom Rini <trini@ti.com>
Cc: Marek Vasut <marex@denx.de>
Acked-by: Igor Grinberg <grinberg@compulab.co.il>
Acked-by: Dmitry Lifshitz <lifshitz@compulab.co.il>
Reviewed-by: Marek Vasut <marex@denx.de>
Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
10 years agomx6: add clock enabling functions
Nikita Kiryanov [Wed, 20 Aug 2014 12:08:49 +0000 (15:08 +0300)]
mx6: add clock enabling functions

Add functions to enable/disable clocks for UART, SPI, ENET, and MMC.

Cc: Stefano Babic <sbabic@denx.de>
Cc: Igor Grinberg <grinberg@compulab.co.il>
Acked-by: Igor Grinberg <grinberg@compulab.co.il>
Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
10 years agoimx: ventana: added cputype env var
Tim Harvey [Fri, 8 Aug 2014 05:35:42 +0000 (22:35 -0700)]
imx: ventana: added cputype env var

There are many similarities between the IMX6QUAD/IMX6DUAL and there are
many similarities between the IMX6SOLO/IMX6DUALITE. Add a 'soctype' env
variable that tells you which type you have.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
10 years agoimx: ventana: add GW5520 support
Tim Harvey [Thu, 21 Aug 2014 06:35:14 +0000 (23:35 -0700)]
imx: ventana: add GW5520 support

The GW5520 has an IMX6Q SoC with 512MB of DDR3, 256MB of NAND flash as well as:
 * 2x MiniPCIe sockets
 * 2x USB host sockets
 * 2x i210 GigE
 * HDMI out
 * digital I/O expansion

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
10 years agoimx: ventana: base SPL MMDC calibration on width and size not board
Tim Harvey [Thu, 21 Aug 2014 06:31:11 +0000 (23:31 -0700)]
imx: ventana: base SPL MMDC calibration on width and size not board

The IMX6 MMDC calibration registers depend on propagation delay and capacitive
loading between the SoC's MMDC and the DDR3 chips. On the Ventana boards the
board layout varies little in trace-lengths such that propagation delays are
irrelevant thus we can simply things by using calibration values obtained
from various board layouts based on a common SoC and DDR chip configuration.

This eliminates board-model from being needed allowing more flexibility. These
values were tested on a large sample size of Gateworks Ventana boards ranging
in layout, and memory configuration over the entire temperature range supported.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
10 years agoimx: ventana: updated notes regarding NAND boot errata
Tim Harvey [Thu, 21 Aug 2014 06:30:36 +0000 (23:30 -0700)]
imx: ventana: updated notes regarding NAND boot errata

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
10 years agonet: fec_mxc: Poll FEC_TBD_READY after polling TDAR
Fabio Estevam [Mon, 25 Aug 2014 16:34:17 +0000 (13:34 -0300)]
net: fec_mxc: Poll FEC_TBD_READY after polling TDAR

When testing the FEC driver on a mx6solox we noticed that the TDAR bit gets
always cleared prior then the READY bit is cleared in the last BD, which causes
FEC packets reception to always fail.

As explained by Ye Li:

"The TDAR bit is cleared when the descriptors are all out from TX ring, but on
mx6solox we noticed that the READY bit is still not cleared right after TDAR.
These are two distinct signals, and in IC simulation, we found that TDAR always
gets cleared prior than the READY bit of last BD becomes cleared.
In mx6solox, we use a later version of FEC IP. It looks like that this
intrinsic behaviour of TDAR bit has changed in this newer FEC version."

Fix this by polling the READY bit of BD after the TDAR polling, which covers the
mx6solox case and does not harm the other SoCs.

No performance drop has been noticed with this patch applied when testing TFTP
transfers on several boards of different i.mx SoCs.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Marek Vasut <marex@denx.de>
10 years agonet: fec_mxc: Adjust RX DMA alignment for mx6solox
Fabio Estevam [Mon, 25 Aug 2014 16:34:16 +0000 (13:34 -0300)]
net: fec_mxc: Adjust RX DMA alignment for mx6solox

mx6solox has a requirement for 64 bytes alignment for RX DMA transfer.
Other SoCs work with the standard 32 bytes alignment.

Adjust it accordingly by using 64 bytes aligment in the FEC RX DMA buffers,
which addresses the needs from mx6solox and also works for the other SoCs.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Marek Vasut <marex@denx.de>
10 years agoclang: workaround for generated constants
Jeroen Hofstee [Wed, 30 Jul 2014 19:54:54 +0000 (21:54 +0200)]
clang: workaround for generated constants

KBuild abuses the asm statement to write to a file and
clang chokes about these invalid asm statements. Hack it
even more by fooling this is actual valid asm code.

cc: Masahiro Yamada <yamada.m@jp.panasonic.com>
cc: Tom Rini <trini@ti.com>
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
10 years agoeabi_compat: add __aeabi_memcpy __aeabi_memset
Jeroen Hofstee [Wed, 30 Jul 2014 19:54:53 +0000 (21:54 +0200)]
eabi_compat: add __aeabi_memcpy __aeabi_memset

cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
10 years agoARM: make gd a function for clang
Jeroen Hofstee [Wed, 30 Jul 2014 19:54:52 +0000 (21:54 +0200)]
ARM: make gd a function for clang

"clang does not support global register variables; this is
unlikely to be implemented soon because it requires additional
LLVM backend support" [1]

Workaround it by obtaining the value of gd/r9 by an inline
asm routine. Note there is no set routine added for ARM at the
moment, since most if not all updates of gd from c are actually
not needed for ARM.

[1] http://clang.llvm.org/docs/UsersManual.html

cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
10 years agocc-option: also detect unsupported warnings options
Jeroen Hofstee [Wed, 30 Jul 2014 19:54:51 +0000 (21:54 +0200)]
cc-option: also detect unsupported warnings options

By default clang will echo a warning if a warning option is
unknown. Turning warnings into errors when polling for options
also catches such cases and prevents passing arguments to the
compiler which cause warnings.

cc: Masahiro Yamada <yamada.m@jp.panasonic.com>
cc: Tom Rini <trini@ti.com>
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
10 years agoARM: SPL: do not set gd again
Jeroen Hofstee [Wed, 30 Jul 2014 19:54:50 +0000 (21:54 +0200)]
ARM: SPL: do not set gd again

Just before calling board_init_f, crt0.S has already
reserved space for the initial gd on the stack. There
should be no need to allocate it again.

cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
10 years agoboard_r: ARM[64] do not set gd again
Jeroen Hofstee [Wed, 30 Jul 2014 19:54:49 +0000 (21:54 +0200)]
board_r: ARM[64] do not set gd again

For ARM / ARM64 the relocation routines already updated
gd to the new value. Don't set it again. This allows
compilation with clang as it cannot update gd directly.

cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
10 years agoMerge branch 'u-boot-sunxi/master' into 'u-boot-arm/master'
Albert ARIBAUD [Tue, 9 Sep 2014 07:19:10 +0000 (09:19 +0200)]
Merge branch 'u-boot-sunxi/master' into 'u-boot-arm/master'

10 years agoMerge branch 'u-boot-samsung/master' into 'u-boot-arm/master'
Albert ARIBAUD [Mon, 8 Sep 2014 22:21:24 +0000 (00:21 +0200)]
Merge branch 'u-boot-samsung/master' into 'u-boot-arm/master'

10 years agoCONFIGS: peach-pit: Enable display for peach_pit board
Ajay Kumar [Fri, 5 Sep 2014 11:23:38 +0000 (16:53 +0530)]
CONFIGS: peach-pit: Enable display for peach_pit board

Enable drivers for FIMD, DP and parade bridge chip.

Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
10 years agoARM: exynos: peach_pit: Add DT nodes for fimd and parade bridge chip
Ajay Kumar [Fri, 5 Sep 2014 11:23:37 +0000 (16:53 +0530)]
ARM: exynos: peach_pit: Add DT nodes for fimd and parade bridge chip

This patch adds DT properties for fimd and the parade bridge chip
present on peach_pit. The panel supports 1366x768 resolution.

Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com>
Acked-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
10 years agoexynos5420: add callbacks needed for exynos_fb driver
Ajay Kumar [Fri, 5 Sep 2014 11:23:36 +0000 (16:53 +0530)]
exynos5420: add callbacks needed for exynos_fb driver

Add initialization code for peach_pit panel, parade bridge chip,
and backlight.

Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com>
Acked-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
10 years agoARM: exynos: Add missing declaration for gpio_direction_input
Ajay Kumar [Fri, 5 Sep 2014 11:23:35 +0000 (16:53 +0530)]
ARM: exynos: Add missing declaration for gpio_direction_input

This patch adds missing declaration for gpio_direction_input
function, thereby helps in resolving compilation warnings.

Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
10 years agovideo: Add driver for Parade PS8625 dP to LVDS bridge
Vadim Bendebury [Fri, 5 Sep 2014 11:23:34 +0000 (16:53 +0530)]
video: Add driver for Parade PS8625 dP to LVDS bridge

The initialization table comes from the "Illustration of I2C command
for initialing PS8625" document supplied by Parade.

Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com>
Acked-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
10 years agovideo: exynos_fimd: Add framework to disable FIMD sysmmu
Ajay Kumar [Fri, 5 Sep 2014 11:23:33 +0000 (16:53 +0530)]
video: exynos_fimd: Add framework to disable FIMD sysmmu

On Exynos5420 and newer versions, the FIMD sysmmus are in
"on state" by default.
We have to disable them in order to make FIMD DMA work.
This patch adds the required framework to exynos_fimd driver,
and disables FIMD sysmmu on Exynos5420.

Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
10 years agoarm: exynos: Add get_lcd_clk and set_lcd_clk callbacks for Exynos5420
Ajay Kumar [Fri, 5 Sep 2014 11:23:32 +0000 (16:53 +0530)]
arm: exynos: Add get_lcd_clk and set_lcd_clk callbacks for Exynos5420

Add get_lcd_clk and set_lcd_clk callbacks for Exynos5420 needed by
exynos video driver.
Also, configure ACLK_400_DISP1 as the parent for MUX_ACLK_400_DISP1_SUB_SEL.

Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com>
Acked-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
10 years agoarm: exynos: Add RPLL for Exynos5420
Ajay Kumar [Fri, 5 Sep 2014 11:23:31 +0000 (16:53 +0530)]
arm: exynos: Add RPLL for Exynos5420

RPLL is needed to drive the LCD panel on Exynos5420 based boards.

Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com>
Acked-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
10 years agoexynos_fb: Remove usage of static defines
Ajay Kumar [Fri, 5 Sep 2014 11:23:30 +0000 (16:53 +0530)]
exynos_fb: Remove usage of static defines

Previously, we used to statically assign values for vl_col, vl_row and
vl_bpix using #defines like LCD_XRES, LCD_YRES and LCD_COLOR16.

Introducing the function exynos_lcd_early_init() would take care of this
assignment on the fly by parsing FIMD DT properties, thereby allowing us
to remove LCD_XRES and LCD_YRES from the main config file.

Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com>
Acked-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
10 years agosun7i: Add support for Olimex A20-OLinuXino-LIME
FUKAUMI Naoki [Tue, 2 Sep 2014 02:17:19 +0000 (11:17 +0900)]
sun7i: Add support for Olimex A20-OLinuXino-LIME

This patch adds support for Olimex A20-OLinuXino-LIME board.

Signed-off-by: FUKAUMI Naoki <naobsd@gmail.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
10 years agosunxi: Correct typo CONFIG_FTDFILE => CONFIG_FDTFILE
Ian Campbell [Sun, 31 Aug 2014 12:13:43 +0000 (13:13 +0100)]
sunxi: Correct typo CONFIG_FTDFILE => CONFIG_FDTFILE

Patch is the result of:
  sed -i -e 's/FTDFILE/FDTFILE/g' board/sunxi/Kconfig configs/* include/configs/sunxi-common.h
  sed -i -e 's/ftdfile/fdtfile/g' board/sunxi/Kconfig

Reported-by: Vagrant Cascadian <vagrant@debian.org>
Signed-off-by: Ian Campbell <ijc@hellion.org.uk>
Acked-by: Hans de Goede <hdegoede@redhat.com>
[ ijc -- s/Spotted-by/Reported-by/ and resolve conflict vs "remove
         redundant "SPL" from CONFIG_SYS_EXTRA_OPTIONS" ]

10 years agokconfig: remove redundant "SPL" from CONFIG_SYS_EXTRA_OPTIONS
Masahiro Yamada [Sun, 31 Aug 2014 13:32:19 +0000 (22:32 +0900)]
kconfig: remove redundant "SPL" from CONFIG_SYS_EXTRA_OPTIONS

CONFIG_SPL is defined as a primary option in Kconfig.
It should not be added to CONFIG_SYS_EXTRA_OPTIONS.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
10 years agoodroid: set MPLL clock to 880MHz
Przemyslaw Marczak [Thu, 24 Jul 2014 10:42:01 +0000 (12:42 +0200)]
odroid: set MPLL clock to 880MHz

This patch changes MPLL from 800MHz to 880MHz on Odroid.

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
10 years agoMAINTAINERS: update the maintainer of Arndale board
Masahiro Yamada [Mon, 4 Aug 2014 01:13:35 +0000 (10:13 +0900)]
MAINTAINERS: update the maintainer of Arndale board

Inderpal's email address is not working any more.
Chander will be a new maintainer.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Chander Kashyap <k.chander@samsung.com>
Cc: Minkyu Kang <mk7.kang@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
10 years agoodroid: kconfig: add odroid_defconfig
Przemyslaw Marczak [Mon, 1 Sep 2014 11:50:53 +0000 (13:50 +0200)]
odroid: kconfig: add odroid_defconfig

This config is valid for two devices:
- Odroid X2,
- Odroid U3.

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Cc: Minkyu Kang <mk7.kang@samsung.com>
Cc: Tom Rini <trini@ti.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
10 years agoodroid: add odroid U3/X2 device tree description
Przemyslaw Marczak [Mon, 1 Sep 2014 11:50:52 +0000 (13:50 +0200)]
odroid: add odroid U3/X2 device tree description

This is a standard description for Odroid boards.

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Cc: Minkyu Kang <mk7.kang@samsung.com>
Cc: Tom Rini <trini@ti.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
10 years agoodroid: add board file for Odroid X2/U3 based on Samsung Exynos4412
Przemyslaw Marczak [Mon, 1 Sep 2014 11:50:51 +0000 (13:50 +0200)]
odroid: add board file for Odroid X2/U3 based on Samsung Exynos4412

This board file supports standard features of Odroid X2 and U3 boards:
- Exynos4412 core clock set to 1000MHz and MPLL peripherial clock set to 800MHz,
- MAX77686 power regulator,
- USB PHY,
- enable XCL205 - power for board peripherials
- check board type: U3 or X2.
- enable Odroid U3 FAN cooler

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Cc: Minkyu Kang <mk7.kang@samsung.com>
Cc: Tom Rini <trini@ti.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
10 years agosamsung: misc: use board specific functions to set env board info
Przemyslaw Marczak [Mon, 1 Sep 2014 11:50:50 +0000 (13:50 +0200)]
samsung: misc: use board specific functions to set env board info

This change adds setup of environmental board info using
get_board_name() and get_board_type() functions for config
CONFIG_BOARD_TYPES.

This is useful in case of running many boards with just one config.

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Cc: Minkyu Kang <mk7.kang@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
10 years agosamsung: board: enable support of multiple board types
Przemyslaw Marczak [Mon, 1 Sep 2014 11:50:49 +0000 (13:50 +0200)]
samsung: board: enable support of multiple board types

This change adds declaration of functions:
- set_board_type() - called at board_early_init_f()
- get_board_type() - called at checkboard()

For supporting multiple board types in a one config - it is welcome
to display the current board model. This is what get_board_type()
should return.

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Cc: Minkyu Kang <mk7.kang@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
10 years agoarm:reset: call the reset_misc() before the cpu reset
Przemyslaw Marczak [Mon, 1 Sep 2014 11:50:48 +0000 (13:50 +0200)]
arm:reset: call the reset_misc() before the cpu reset

On an Odroid U3 board, the SOC is unable to reset the eMMC card
in the DWMMC mode by the cpu software reset. Manual reset of the card
by switching proper gpio pin - fixes this issue.

Such solution needs to add a call to pre reset function.
This is done by the reset_misc() function, which is called before reset_cpu().
The function reset_misc() is a weak function.

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Cc: Minkyu Kang <mk7.kang@samsung.com>
Cc: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
Cc: Tom Rini <trini@ti.com>
Changes v4:
- arch/arm/reset: fix weak function attribute to proper style
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
10 years agosamsung:board: misc_init_r: call set_dfu_alt_info()
Przemyslaw Marczak [Mon, 1 Sep 2014 11:50:47 +0000 (13:50 +0200)]
samsung:board: misc_init_r: call set_dfu_alt_info()

This change enable automatic setting of dfu alt info
on every boot. This is useful in case of booting one
u-boot binary from multiple media.

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
10 years agosamsung: misc: add function for setting $dfu_alt_info
Przemyslaw Marczak [Mon, 1 Sep 2014 11:50:46 +0000 (13:50 +0200)]
samsung: misc: add function for setting $dfu_alt_info

This change introduces new common function:
- set_dfu_alt_info() - put dfu system and bootloader setting
                       into $dfu_alt_info.
functions declaration:
- char *get_dfu_alt_system(void)
- char *get_dfu_alt_boot(void)
- void set_dfu_alt_info(void)
and new config:
- CONFIG_SET_DFU_ALT_INFO

This function can be used for auto setting dfu configuration on boot.
Such feature is useful for multi board support by one u-boot binary.
Each board should define two functions:
- get_dfu_alt_system()
- get_dfu_alt_boot()

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Cc: Minkyu Kang <mk7.kang@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
10 years agoboard:samsung: check the boot device and init the right mmc driver.
Przemyslaw Marczak [Mon, 1 Sep 2014 11:50:45 +0000 (13:50 +0200)]
board:samsung: check the boot device and init the right mmc driver.

It is possible to boot device using a micro SD or eMMC slots.
In this situation, boot device should be registered as a block
device 0 in the MMC framework, because CONFIG_SYS_MMC_ENV_DEV
is usually set to "0" in the most config cases.

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
10 years agoarch:exynos: boot mode: add get_boot_mode(), code cleanup
Przemyslaw Marczak [Mon, 1 Sep 2014 11:50:44 +0000 (13:50 +0200)]
arch:exynos: boot mode: add get_boot_mode(), code cleanup

This patch introduces code clean-up for exynos boot mode check.
It includes:
- removal of typedef: boot_mode
- move the boot mode enum to arch-exynos/power.h
- add bootmode for sequence: eMMC 4.4 ch4 / SD ch2
- add new function: get_boot_mode() for OM[5:1] pin check
- update spl boot code

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Changes v5:
- exynos: boot mode: add missing bootmode (1st:EMMC 4.4 / 2nd:SD ch2)

Changes v6:
- none

changes v7:
- change boot mode name: BOOT_MODE_MMC to BOOT_MODE_SD
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
10 years agoexynos: pinmux: fix the gpio names for exynos4x12 mmc
Przemyslaw Marczak [Mon, 1 Sep 2014 11:50:43 +0000 (13:50 +0200)]
exynos: pinmux: fix the gpio names for exynos4x12 mmc

This change fixes the bad gpio configuration for the exynos dwmmc.

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Cc: Beomho Seo <beomho.seo@samsung.com>
Cc: Minkyu Kang <mk7.kang@samsung.com>
Cc: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
10 years agosamsung: misc: fix soc revision setting in the set_board_info()
Przemyslaw Marczak [Mon, 1 Sep 2014 11:50:42 +0000 (13:50 +0200)]
samsung: misc: fix soc revision setting in the set_board_info()

The byte order of soc revision was inverted, now it is fixed.

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Cc: Minkyu Kang <mk7.kang@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
10 years agoARM: DRA72: DDR3: Add emif settings for 666MHz clock
R Sricharan [Thu, 28 Aug 2014 06:31:04 +0000 (12:01 +0530)]
ARM: DRA72: DDR3: Add emif settings for 666MHz clock

On DRA72x, EMIF supports DDR3 upto 667MHz.
Adding the required settings for DDR3 at 666MHz and enabling it.

Signed-off-by: R Sricharan <r.sricharan@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
10 years agoAM335x: igep0033: Convert to generic board and use ti_am335x_common.h.
Enric Balletbo i Serra [Wed, 3 Sep 2014 15:59:57 +0000 (17:59 +0200)]
AM335x: igep0033: Convert to generic board and use ti_am335x_common.h.

To reduce code duplication update am335x_igep0033.h to use ti_am335x_common.h
and convert to generic board.

Signed-off-by: Enric Balletbo i Serra <eballetbo@iseebcn.com>
10 years agomtd: nand: omap_gpmc: Fix 'bit-flip' errors
Rostislav Lisovy [Tue, 2 Sep 2014 15:00:30 +0000 (17:00 +0200)]
mtd: nand: omap_gpmc: Fix 'bit-flip' errors

OMAP GPMC driver used with some NAND Flash devices (e.g. Spansion
S34ML08G1) causes that U-boot shows hundreds of 'nand: bit-flip
corrected' error messages. Possible cause was discussed in the
mailinglist thread:
http://lists.denx.de/pipermail/u-boot/2014-April/177508.html

Quote (Author: Pekon Gupta <pekon@ti.com>): "The issue is mainly
due to a NAND protocol violation in the omap driver since the
Random Data Output command (05h-E0h) expects to see only the
column address that should be addressed within the already loaded
read page into the read buffer. Only 2 address cycles with ALE
active should be provided between the 05h and E0h commands. The
Page read command expects the full address footprint (2bytes for
column address + 3bytes for row address), but once the page is
loaded into the read buffer, Random Data Output should be used
with only 2bytes for column address."

This patch combines the solution proposed in the mailinglist and
the patch provided by the Spansion company (GPLv2 code, source:
http://www.spansion.com/Support/Software/u-boot-psp-04.04.00.01-NAND.zip)

Signed-off-by: Rostislav Lisovy <lisovy@merica.cz>
10 years agomtd: nand: omap_gpmc: Enable multiple NAND flash devices
Rostislav Lisovy [Tue, 2 Sep 2014 14:23:58 +0000 (16:23 +0200)]
mtd: nand: omap_gpmc: Enable multiple NAND flash devices

Since the CS of a device connected to the GPMC was
stored in the global variable, it was not possible to
use multiple devices. In this patch the CS is stored per
device in its 'struct omap_nand_info'. This makes it
possible to use up to 'GPMC_MAX_CS' NAND Flash devices
connected to U-boot.

Signed-off-by: Rostislav Lisovy <lisovy@merica.cz>
10 years agomtd: nand: davinci_nand: correct keystone RBL layout definition
Khoronzhuk, Ivan [Mon, 1 Sep 2014 21:20:02 +0000 (00:20 +0300)]
mtd: nand: davinci_nand: correct keystone RBL layout definition

In case when 4K page keystone RBL layout is used the compilation
error is appeared. That's because the #ifdef has to be placed under
struct name. This patch correct it.

Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@ti.com>
10 years agoarm: am335x: add Kconfig range attribute to prevent invalid CONS_INDEX
Masahiro Yamada [Sun, 31 Aug 2014 16:05:32 +0000 (01:05 +0900)]
arm: am335x: add Kconfig range attribute to prevent invalid CONS_INDEX

The help message in board/ti/am335x/Kconfig says AM335x has
6 UARTs, so the valid number for CONFIG_CONS_INDEX is from 1 to 6.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Tom Rini <trini@ti.com>
10 years agokeystone2: use readl/writel functions instead of redefinition
Khoronzhuk, Ivan [Thu, 28 Aug 2014 13:07:45 +0000 (16:07 +0300)]
keystone2: use readl/writel functions instead of redefinition

There is no reason to redefine pure readl/writel functions.
So remove this redundancy.

Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@ti.com>
Acked-by: Vitaly Andrianov <vitalya@ti.com>
10 years agoomap3_beagle: Add boot script support to omap3 beagle board
Guillaume GARDET [Tue, 26 Aug 2014 08:48:13 +0000 (10:48 +0200)]
omap3_beagle: Add boot script support to omap3 beagle board

This patch adds boot script support to omap3 beagle board.

Signed-off-by: Guillaume GARDET <guillaume.gardet@free.fr>
Cc: Tom Rini <trini@ti.com>
10 years agoARM: keystone: clock: use correct BWADJ field mask for PASSPLLCTL0
Khoronzhuk, Ivan [Mon, 11 Aug 2014 08:59:42 +0000 (11:59 +0300)]
ARM: keystone: clock: use correct BWADJ field mask for PASSPLLCTL0

The mask for BWADJ field of PASSPLLCTL0 register has to be 0xff, but
by mistake, here is used shift instead of mask, so correct it.

Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@ti.com>
10 years agoPrepare v2014.10-rc2 v2014.10-rc2
Tom Rini [Tue, 2 Sep 2014 20:58:29 +0000 (16:58 -0400)]
Prepare v2014.10-rc2

Signed-off-by: Tom Rini <trini@ti.com>
10 years agoMerge git://git.denx.de/u-boot-usb
Tom Rini [Tue, 2 Sep 2014 20:37:57 +0000 (16:37 -0400)]
Merge git://git.denx.de/u-boot-usb

10 years agoMerge branch 'master' of git://git.denx.de/u-boot-arc
Tom Rini [Tue, 2 Sep 2014 20:37:17 +0000 (16:37 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-arc

10 years agoUSB: gadget: s3c: get rid of debug compile warning
Bo Shen [Wed, 27 Aug 2014 09:28:18 +0000 (17:28 +0800)]
USB: gadget: s3c: get rid of debug compile warning

When enable debug option to compile, it will give the following
warning, this patch is used to get rid of it.
--->8---
warning: 'flags' is used uninitialized in this function [-Wuninitialized]
---8<---

Signed-off-by: Bo Shen <voice.shen@atmel.com>
10 years agoUSB: gadget: atmel: get rid of debug compile warning
Bo Shen [Wed, 27 Aug 2014 09:28:17 +0000 (17:28 +0800)]
USB: gadget: atmel: get rid of debug compile warning

When enable debug option to compile, it will give the following
warning, this patch is used to get rid of it.
--->8---
warning: 'flags' is used uninitialized in this function [-Wuninitialized]
---8<---

Signed-off-by: Bo Shen <voice.shen@atmel.com>
10 years agousb: ci_udc: implement dfu_usb_get_reset
Stephen Warren [Mon, 25 Aug 2014 20:02:15 +0000 (14:02 -0600)]
usb: ci_udc: implement dfu_usb_get_reset

This allows the USB code to determine whether a USB bus reset was issued,
which in turn allows the code to differentiate between a detach (return
to shell prompt) and a board reset/reboot request.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
10 years agoudc: dfu: s3c_udc: Provide function to check if USB reset was asserted
Lukasz Majewski [Mon, 25 Aug 2014 09:07:29 +0000 (11:07 +0200)]
udc: dfu: s3c_udc: Provide function to check if USB reset was asserted

New dfu_usb_get_reset() method is necessary to distinct two different
use cases of dfu-util program.
This method checks if the USB bus reset has been really performed after
DFU DETACH.

Without this function the previous DFU behavior is preserved.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
10 years agodfu: Provide means to find difference between dfu-util -e and -R
Lukasz Majewski [Mon, 25 Aug 2014 09:07:28 +0000 (11:07 +0200)]
dfu: Provide means to find difference between dfu-util -e and -R

This commit provides distinction between DFU device detach and reset.
The -R behavior is preserved with proper handling of the dfu-util's -e
switch, which detach the DFU device.

By running dfu-util -e; one can force device to finish the execution of
dfu command on target and execute some other scripted commands.

Moreover, some naming has been changed - the dfu_reset() method now is known
as dfu_detach(). New name better reflects the purpose of the code.

It was also necessary to increase the number of usb_gadget_handle_interrupts()
calls since we also must wait for detection of the USB reset event.

Example usage:
1. -e (detach) switch
 dfu-util -a0 -D file1.bin;dfu-util -a3 -D uImage;dfu-util -e

 access to u-boot prompt.

2. -R (reset) switch
 dfu-util -a0 -D file1.bin;dfu-util -R -a3 -D uImage

 target board reset

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Tested-by: Stephen Warren <swarren@nvidia.com>
10 years agoMerge git://git.denx.de/u-boot-dm
Tom Rini [Tue, 2 Sep 2014 12:22:26 +0000 (08:22 -0400)]
Merge git://git.denx.de/u-boot-dm

10 years agompc5xxx: Add stub implementation of cache functions
Vasili Galka [Tue, 26 Aug 2014 11:05:31 +0000 (14:05 +0300)]
mpc5xxx: Add stub implementation of cache functions

Some drivers (e.g. net/e1000) reference these functions. So, this
fixes the build of MVBC_P board.

I'm not familiar with the MPC5xxx platform, maybe a full
implementation shall be implemented instead of this stub in the
future.

Signed-off-by: Vasili Galka <vvv444@gmail.com>
Cc: Wolfgang Denk <wd@denx.de>, Marek Vasut <marex@denx.de>
Acked-by: Wolfgang Denk <wd@denx.de>
10 years agodm: sandbox: dts: Add a GPIO bank
Simon Glass [Mon, 11 Aug 2014 15:24:03 +0000 (09:24 -0600)]
dm: sandbox: dts: Add a GPIO bank

Add a bank of GPIOs for sandbox which can be used for testing this
functionality.

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