oweals/u-boot.git
9 years agoPrepare v2015.07-rc3 v2015.07-rc3
Tom Rini [Mon, 29 Jun 2015 21:22:01 +0000 (17:22 -0400)]
Prepare v2015.07-rc3

Signed-off-by: Tom Rini <trini@konsulko.com>
9 years agomtd, spi: Check if flash pointer is used
Heiko Schocher [Mon, 27 Apr 2015 05:42:07 +0000 (07:42 +0200)]
mtd, spi: Check if flash pointer is used

If flash pointer is used free it, before probing a new
flash and storing it in flash.

Signed-off-by: Heiko Schocher <hs@denx.de>
Tested-by: Jagannadh Teki <jteki@openedev.com>
Reviewed-by: Jagannadh Teki <jteki@openedev.com>
9 years agospi, sf: Use offset and size in sf cmd from mtdpartition
Heiko Schocher [Mon, 27 Apr 2015 05:42:06 +0000 (07:42 +0200)]
spi, sf: Use offset and size in sf cmd from mtdpartition

With this patch, it is possible to get the offset and size information
from the mtdpartiton setting in "mtdparts", similiar to the
"nand" commandos.

=> sf
sf - SPI flash sub-system

Usage:
sf probe [[bus:]cs] [hz] [mode] - init flash device on given SPI bus
                                  and chip select
sf read addr offset|partition len       - read `len' bytes starting at
                                          `offset' to memory at `addr'
sf write addr offset|partition len      - write `len' bytes from memory
                                          at `addr' to flash at `offset'
sf erase offset|partition [+]len        - erase `len' bytes from `offset'
                                          `+len' round up `len' to block size
sf update addr offset|partition len     - erase and write `len' bytes from memory
                                          at `addr' to flash at `offset'
=>
for example "env" is defined in mtdparts:

=> sf read 13000000 env
device 0 offset 0xd0000, size 0x10000
SF: 65536 bytes @ 0xd0000 Read: OK

zynq-uboot> mtdparts add nor0 0x10000@0x0 env
zynq-uboot> sf erase env 0x10000
SF: 65536 bytes @ 0x0 Erased: OK

zynq-uboot> sf write 0x100 env
device 0 offset 0x0, size 0x10000
SF: 65536 bytes @ 0x0 Written: OK

zynq-uboot> sf read 0x40000 env
device 0 offset 0x0, size 0x10000
SF: 65536 bytes @ 0x0 Read: OK

Signed-off-by: Heiko Schocher <hs@denx.de>
Tested-by: Jagannadh Teki <jteki@openedev.com>
Reviewed-by: Jagannadh Teki <jteki@openedev.com>
9 years agomtd, nand: Move common functions from cmd_nand.c to common place
Heiko Schocher [Mon, 27 Apr 2015 05:42:05 +0000 (07:42 +0200)]
mtd, nand: Move common functions from cmd_nand.c to common place

Move common functions from cmd_nand.c (for calculating offset
and size from cmdline paramter) to common place, so they could
used from other commands which use mtd partitions.

For onenand the arg_off_size() is left in common/cmd_onenand.c.
It should use now the common arg_off() function, but as I could
not test onenand I let it there ...

Signed-off-by: Heiko Schocher <hs@denx.de>
Acked-by: Scott Wood <scottwood@freescale.com>
Reviewed-by: Jagannadh Teki <jteki@openedev.com>
9 years agomtd, spi: Add MTD layer driver
Daniel Schwierzeck [Mon, 27 Apr 2015 05:42:04 +0000 (07:42 +0200)]
mtd, spi: Add MTD layer driver

Add MTD layer driver for spi, original patch from:
http://git.denx.de/?p=u-boot/u-boot-mips.git;a=commitdiff;h=bb246819cdc90493dd7089eaa51b9e639765cced

Changes from Heiko Schocher against this patch:
- Remove compile error if not defining CONFIG_SPI_FLASH_MTD:

  LD      drivers/mtd/spi/built-in.o
drivers/mtd/spi/sf_probe.o: In function `spi_flash_mtd_unregister':
/home/hs/abb/imx6/u-boot/drivers/mtd/spi/sf_internal.h:168: multiple definition of `spi_flash_mtd_unregister'
drivers/mtd/spi/sf_params.o:/home/hs/abb/imx6/u-boot/drivers/mtd/spi/sf_internal.h:168: first defined here
drivers/mtd/spi/sf_ops.o: In function `spi_flash_mtd_unregister':
/home/hs/abb/imx6/u-boot/drivers/mtd/spi/sf_internal.h:168: multiple definition of `spi_flash_mtd_unregister'
drivers/mtd/spi/sf_params.o:/home/hs/abb/imx6/u-boot/drivers/mtd/spi/sf_internal.h:168: first defined here
make[1]: *** [drivers/mtd/spi/built-in.o] Fehler 1
make: *** [drivers/mtd/spi] Fehler 2

- Add a README entry.
- Add correct writebufsize, to fit with Linux v3.14
  MTD, UBI/UBIFS sync.

Note (From Jagan): For testing raw mtd parition erase/read/write operations
using cmd_sf, sf_mtd should be required to register the spi flash device to
MTD layer but the sf_mtd_info ops were not required until and unless if we
use any flash filesystem layer say for example UBI. Due to this the foot-print
got increased ~290bytes in non-UBI case here that should be acceptible.

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Signed-off-by: Heiko Schocher <hs@denx.de>
Tested-by: Jagannadh Teki <jteki@openedev.com>
Reviewed-by: Jagannadh Teki <jteki@openedev.com>
9 years agodefconfig: ls1021a: Add OF_CONTROL and DM support
Haikun Wang [Sat, 27 Jun 2015 16:21:05 +0000 (21:51 +0530)]
defconfig: ls1021a: Add OF_CONTROL and DM support

PI and QSPI only work when boot from QSPI on ls1021a.
This patch only enable options in qspi boot defconfig.

Signed-off-by: Haikun Wang <haikun.wang@freescale.com>
Tested-by: Haikun Wang <haikun.wang@freescale.com>
Signed-off-by: Jagan Teki <jteki@openedev.com>
9 years agoarm: ls102xa: Enable Driver Model SPI for ls1021atwr
Haikun Wang [Sat, 27 Jun 2015 16:16:13 +0000 (21:46 +0530)]
arm: ls102xa: Enable Driver Model SPI for ls1021atwr

Enable Driver Model SPI for ls1021atwr board.
DSPI and QSPI only be enabled when boot from QSPI.
DSPI and QSPI are compatible under Driver Model SPI.

Signed-off-by: Haikun Wang <Haikun.Wang@freescale.com>
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Tested-by: Haikun Wang <haikun.wang@freescale.com>
Reviewed-by: Prabhakar Kushwaha <prabhakar@freescale.com>
Reviewed-by: Jagan Teki <jteki@openedev.com>
9 years agoarm: ls102xa: Enable Driver Model SPI for ls1021aqds
Haikun Wang [Mon, 29 Jun 2015 07:38:46 +0000 (13:08 +0530)]
arm: ls102xa: Enable Driver Model SPI for ls1021aqds

Enable Driver Model SPI for ls1021aqds board.
DSPI and QSPI is enabled only when boot from QSPI.
DSPI and QSPI are compatible under Driver Model SPI.

Signed-off-by: Haikun Wang <Haikun.Wang@freescale.com>
Tested-by: Haikun Wang <haikun.wang@freescale.com>
Reviewed-by: Jagan Teki <jteki@openedev.com>
9 years agodm: ls1021aqds: dts: Use "spi_dataflash" driver instead of "spi_flash_std" for DSPI...
Haikun Wang [Fri, 26 Jun 2015 11:30:41 +0000 (19:30 +0800)]
dm: ls1021aqds: dts: Use "spi_dataflash" driver instead of "spi_flash_std" for DSPI flash

The type of DSPI flash on ls1021aqds is AT45DB021, it has specail
commands and page-size.
Use the special spi flash driver instead of "spi_flash_std" driver.

Signed-off-by: Haikun Wang <haikun.wang@freescale.com>
Tested-by: Haikun Wang <haikun.wang@freescale.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Jagan Teki <jteki@openedev.com>
9 years agodm: sf: Add Atmel DataFlash spi flash driver
Haikun Wang [Fri, 26 Jun 2015 11:30:27 +0000 (19:30 +0800)]
dm: sf: Add Atmel DataFlash spi flash driver

Atmel DataFlash chips have commands different from common spi
flash commands.
Atmel DataFlash also have special page-size.
This driver add support for accessing Atmel DataFlash.
It is based on the Driver Model.
Example:
=> sf probe 1:0
SPI DataFlash: Detected AT45DB021B with page size 264 Bytes, erase size 264 Bytes, total 264 KiB, revision d
=> sf erase 0 42000
SF: 270336 bytes @ 0x0 Erased: OK
=> mw.l 82000000 45444342 20000
=> sf write 82000000 0 42000
SF: 270336 bytes @ 0x0 Written: OK
=> sf read 83000000 0 42000
SF: 270336 bytes @ 0x0 Read: OK
=> cmp.b 82000000 83000000 42000
Total of 270336 byte(s) were the same

Signed-off-by: Haikun Wang <haikun.wang@freescale.com>
Tested-by: Haikun Wang <haikun.wang@freescale.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Chakra Divi <cdivi@openedev.com>
Reviewed-by: Jagan Teki <jteki@openedev.com>
9 years agoMerge git://git.denx.de/u-boot-marvell
Tom Rini [Sun, 28 Jun 2015 20:31:32 +0000 (16:31 -0400)]
Merge git://git.denx.de/u-boot-marvell

9 years agodb-88f6820-gp.h: Load data blobs into lower memory
Kevin Smith [Mon, 18 May 2015 16:09:46 +0000 (16:09 +0000)]
db-88f6820-gp.h: Load data blobs into lower memory

By default on this platform, u-boot loads data into high memory
in the range of 0x7Fxxxxxx, which generates a data abort when the
kernel tries to read it.  Config the u-boot environment to load
the device tree and initrd image into lower memory to make them
accessible to the kernel.

Signed-off-by: Kevin Smith <kevin.smith@elecsyscorp.com>
Acked-by: Stefan Roese <sr@denx.de>
9 years agomv-common.h: Include support for device trees
Kevin Smith [Mon, 18 May 2015 16:09:45 +0000 (16:09 +0000)]
mv-common.h: Include support for device trees

Signed-off-by: Kevin Smith <kevin.smith@elecsyscorp.com>
Acked-by: Stefan Roese <sr@denx.de>
9 years agoRevert "sunxi/nand: Add support to the SPL for loading u-boot from internal NAND...
Ian Campbell [Fri, 26 Jun 2015 18:42:24 +0000 (19:42 +0100)]
Revert "sunxi/nand: Add support to the SPL for loading u-boot from internal NAND memory"

This reverts commit f76eba38b3eda905ff3bdc18dd1240d3dcbc6e5a.

This patch did not have a full and proper copyright/S-o-b chain.

Signed-off-by: Ian Campbell <ijc@hellion.org.uk>
Conflicts:
include/configs/sun6i.h
include/configs/sun8i.h

9 years agoMove defaults from config_cmd_default.h to Kconfig
Joe Hershberger [Mon, 22 Jun 2015 21:15:30 +0000 (16:15 -0500)]
Move defaults from config_cmd_default.h to Kconfig

This sets the default commands Kconfig to match
include/config_cmd_default.h commands in the common/Kconfig and removes
them from include/configs.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
[trini: rastaban, am43xx_evm_usbhost_boot, am43xx_evm_ethboot updates]
Signed-off-by: Tom Rini <trini@konsulko.com>
9 years agoMove default y configs out of arch/board Kconfig
Joe Hershberger [Mon, 22 Jun 2015 21:15:29 +0000 (16:15 -0500)]
Move default y configs out of arch/board Kconfig

Some archs/boards specify their own default by pre-defining the config
which causes the Kconfig system to mix up the order of the configs in
the defconfigs... This will cause merge pain if allowed to proliferate.

Remove the configs that behave this way from the archs.

A few configs still remain, but that is because they only exist as
defaults and do not have a proper Kconfig entry. Those appear to be:

SPIFLASH
DISPLAY_BOARDINFO

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
[trini: rastaban, am43xx_evm_usbhost_boot, am43xx_evm_ethboot updates,
drop DM_USB from MSI_Primo81 as USB_MUSB_SUNXI isn't converted yet to DM]
Signed-off-by: Tom Rini <trini@konsulko.com>
9 years agoa3m071: Add needed dependency on LIB_RAND
Joe Hershberger [Mon, 22 Jun 2015 21:15:28 +0000 (16:15 -0500)]
a3m071: Add needed dependency on LIB_RAND

Boards using link-local need lib rand.

When link-local is moved to Kconfig, this dependency will be described
there.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
9 years agocommon: Add the CMD_ENV_EXISTS config to Kconfig
Joe Hershberger [Mon, 22 Jun 2015 21:15:26 +0000 (16:15 -0500)]
common: Add the CMD_ENV_EXISTS config to Kconfig

This command needs to exist in the Kconfig so that it can be moved from
the config_cmd_default.h.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
9 years agocommon: Fix comment for saveenv in Kconfig
Joe Hershberger [Mon, 22 Jun 2015 21:15:25 +0000 (16:15 -0500)]
common: Fix comment for saveenv in Kconfig

The help for this was simply copied from another command.

Update it to reflect the command.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
9 years agomtd: spi: Add the SPI_FLASH config to Kconfig
Joe Hershberger [Mon, 22 Jun 2015 21:15:24 +0000 (16:15 -0500)]
mtd: spi: Add the SPI_FLASH config to Kconfig

This config needs to be available in the Kconfig to allow it to be
removed from arch defaults.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
9 years agommc: bcm2835_sdhci: Restore original delay behavior
Marek Vasut [Fri, 19 Jun 2015 21:39:41 +0000 (23:39 +0200)]
mmc: bcm2835_sdhci: Restore original delay behavior

Patch 33fe2fb8df01647f97a7bce96a1c7781a7f6d253 titled
"mmc: bcm283x: Remove get_timer_us() from mmc driver"
incorrectly replaced ad-hoc get_timer_us() function
with a plain get_timer(). The get_timer() operates in
mSec units instead of uSec though, which caused very
slow operation of the driver.

Restore the original behavior of the driver, but avoid
get_timer_us() and use timer_get_us() instead. The later
is part of the standard API.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Jakub Kiciński <moorray3@wp.pl>
Cc: Stephen Warren <swarren@wwwdotorg.org>
Tested-by: Jakub Kicinski <kubakici@wp.pl>
9 years agoMerge git://git.denx.de/u-boot-usb
Tom Rini [Fri, 19 Jun 2015 18:21:32 +0000 (14:21 -0400)]
Merge git://git.denx.de/u-boot-usb

9 years agosiemens,am33x,thuban: rename dxr2 to thuban
Heiko Schocher [Mon, 15 Jun 2015 12:57:15 +0000 (14:57 +0200)]
siemens,am33x,thuban: rename dxr2 to thuban

Update new naming scheme.

Signed-off-by: Samuel Egli <samuel.egli@siemens.com>
Acked-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
9 years agosiemens,am33x,rastaban: add rastaban config
Heiko Schocher [Mon, 15 Jun 2015 12:56:41 +0000 (14:56 +0200)]
siemens,am33x,rastaban: add rastaban config

rastaban is a draco version with more flash, more RAM
and faster CPU. Number of partitions is the same but
rootfs partition is different.

Signed-off-by: Samuel Egli <samuel.egli@siemens.com>
Acked-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
9 years agoREADME: Describe CONFIG_SYS_NO_FLASH
Chris Packham [Fri, 19 Jun 2015 08:25:59 +0000 (20:25 +1200)]
README: Describe CONFIG_SYS_NO_FLASH

Unlike most configuration options defining this actually disables
support for a feature (parallel flash). Eventually the logic behind this
should probably be flipped so that '#ifndef CONFIG_SYS_NO_FLASH' becomes
'#ifdef CONFIG_HAS_PARALLEL_FLASH' but for now lets document the
existing behaviour.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
9 years agoARM: BeagleBoard-X15: Enable VTT regulator
Lokesh Vutla [Tue, 16 Jun 2015 15:06:05 +0000 (20:36 +0530)]
ARM: BeagleBoard-X15: Enable VTT regulator

BeagleBoard-X15 uses a vtt regulator for DDR3 termination
and this is controlled by gpio7_11. Configuring gpio7_11.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
9 years agoam43xx_evm: add eth boot support
Mugunthan V N [Tue, 16 Jun 2015 14:53:39 +0000 (20:23 +0530)]
am43xx_evm: add eth boot support

add cpsw ethernet boot mode support to download spl and
u-boot.img via tftp protocol. Also adding a seperate config
for ethernet boot mode as the default build falcon mode and
environment on MMC is defined for ethernet boot mode
environment should be set to nowhere.

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
9 years agoam43xx_evm: add usb host boot support
Mugunthan V N [Tue, 16 Jun 2015 14:53:38 +0000 (20:23 +0530)]
am43xx_evm: add usb host boot support

While booting via usb host mode, ROM uses DMA to copy MLO over USB so
ARM internal RAM cannot be used. Adding USB host boot support by
introducing new config target which sets SPL_TEXT_BASE to OCMC ram.

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
9 years agoam43xx: Update CONFIG_SPL_TEXT_BASE
Tom Rini [Tue, 16 Jun 2015 14:53:37 +0000 (20:23 +0530)]
am43xx: Update CONFIG_SPL_TEXT_BASE

With 1.2 silicon this is now the documented starting usable point for
downloading images to (and corrects a problem with peripheral booting
with prior silicon).  Prior silicon is OK using this address as well.

Signed-off-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
9 years agoARM: DRA7: Change configuration to prevent DDR reset control from EMIF
Nishanth Menon [Tue, 16 Jun 2015 13:29:01 +0000 (08:29 -0500)]
ARM: DRA7: Change configuration to prevent DDR reset control from EMIF

DRA7/AM57xx devices can be operated in many different configurations.
When the SoC is supposed to support a configuration where low power mode
state may involve the SoC completely powered off and DDR is in self
refresh, SoC EMIF controller should not be the master of the reset
signal and an external entity might be in control of things.

The default configuration of Linux on TI evms involve not powering off
the voltage rails (due to various reasons including reliability concerns)
and must not allow DDR reset to be controlled by EMIF. On platforms
where external entity might control the reset signal, this configuration
will be a "dont care".

Fixes: 536d87470869 ("ARM: DRA7: Update DDR IO registers")
Tested-by: Keerthy <j-keerthy@ti.com>
Acked-by: Brad Griffis <bgriffis@ti.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
9 years agoti: omap4: remove CONFIG_SPL_EXT_SUPPORT from ti_omap4_common.h since it is now in...
Guillaume GARDET [Tue, 16 Jun 2015 13:00:10 +0000 (15:00 +0200)]
ti: omap4: remove CONFIG_SPL_EXT_SUPPORT from ti_omap4_common.h since it is now in ti_armv7_common.h

Signed-off-by: Guillaume GARDET <guillaume.gardet@free.fr>
Cc: Tom Rini <trini@konsulko.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
9 years agoti: armv7: enable EXT support in SPL (using ti_armv7_common.h)
Guillaume GARDET [Tue, 16 Jun 2015 13:00:09 +0000 (15:00 +0200)]
ti: armv7: enable EXT support in SPL (using ti_armv7_common.h)

Tested on Pandaboard (rev. A3) and Beagleboard xM (rev. B).
Compilation tested on TI armv7 boards and OMAP boards from other vendors.

Signed-off-by: Guillaume GARDET <guillaume.gardet@free.fr>
Cc: Tom Rini <trini@konsulko.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
9 years agoarm, am33xx: update for siemens am335x based boards
Heiko Schocher [Tue, 16 Jun 2015 12:59:34 +0000 (14:59 +0200)]
arm, am33xx: update for siemens am335x based boards

updates for the siemens am335x based boards:

- draco: add delay for DDR3 configuration
- change MTD partition layout and add a possibility
  to redefine MTD layout in board header.
- move ubi support to common header file
- draco: improve dtb naming
- draco: set CONFIG_SYS_CBSIZE to 1024
- add generic env based led
  Leds can now be defined in Environment
- add generic env based dfu button
  Which gpio is used for the dfu button can be defined
  through the Environment
- set MACH_TYPE only if defined
- draco: increase CPU freq to 300MHz
- Add time command to siemens am33xx boards
- DDR3: increase default tRFC
- draco: enable pullup for DFU and ERST pin
- change print format DDR3

Signed-off-by: Samuel Egli <samuel.egli@siemens.com>
Acked-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Heiko Schocher <hs@denx.de>
9 years agocommon: cmd_part: start and size sub-commands introduction
Paul Kocialkowski [Mon, 15 Jun 2015 19:35:05 +0000 (21:35 +0200)]
common: cmd_part: start and size sub-commands introduction

This introduces the part start and part size sub-commands. The purpose of these
is to store the start block and size of a partition in a variable, given the
device and partition number.

This allows reading raw data that fits a single partition more easily.
For instance, this could be used to figure out the start block and size of a
kernel partition when a partition table is present, given the partition number.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Acked-by: Stephen Warren <swarren@nvidia.com>
[trini: Change "%lx" to LBAF]
Signed-off-by: Tom Rini <trini@konsulko.com>
9 years agocommon: cmd_part: Proper alignment
Paul Kocialkowski [Mon, 15 Jun 2015 19:35:04 +0000 (21:35 +0200)]
common: cmd_part: Proper alignment

This fixes a misaligned declaration.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
9 years agokeystone2: use correct EFUSE_BOOTROM fileds to configure speed
Vitaly Andrianov [Mon, 15 Jun 2015 12:54:15 +0000 (08:54 -0400)]
keystone2: use correct EFUSE_BOOTROM fileds to configure speed

The get_max_arm_speed() and get_max_dev_speed() used wrong register
fields to get the maximum speeds. This commit fixes the bug.

Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
9 years agousb: kbd: Disable idle input reports when we do not need them
Hans de Goede [Thu, 18 Jun 2015 20:34:34 +0000 (22:34 +0200)]
usb: kbd: Disable idle input reports when we do not need them

When we're polling and thus handling key-repeat in software, make sure
to disable idle reports, some keyboards may have these enabled by default
messing up our software keyrepeat.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
9 years agousb: ehci: Properly deal with data toggle for interrupt endpoints
Hans de Goede [Thu, 18 Jun 2015 20:34:33 +0000 (22:34 +0200)]
usb: ehci: Properly deal with data toggle for interrupt endpoints

Without this we loose every other interrupt packet. We never noticed this
because with keyboards the packets which we were loosing would normally
be key release packets.

But now that we do keyrepeat in software instead of relying on the hid
idle functionality, missing a release will result in key repeat triggering.

This commit fixes this.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
9 years agousb.h: Always declare usb function prototypes
Hans de Goede [Wed, 10 Jun 2015 15:04:04 +0000 (17:04 +0200)]
usb.h: Always declare usb function prototypes

There is no harm in declaring the function prototypes even if nothing
implements them, and when CONFIG_DM_USB=y the various usb functions are
available regardless of any controller drivers being enabled.

This fixes compile warnings due to missing prototypes on ARCHs where
the ARCH Kconfig always enables CONFIG_DM_USB and various usb drivers.

One could argue that in the case of no controllers CONFIG_DM_USB should not
be set, but this problem is typically seen during bringup of boards which
do actually have usb controllers.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
9 years agoCPCI4052: Remove CONFIG_SYS_LONGHELP
Tom Rini [Tue, 2 Jun 2015 15:12:20 +0000 (11:12 -0400)]
CPCI4052: Remove CONFIG_SYS_LONGHELP

With the change to make sure that CONFIG_CMD_NET is enabled this board
no longer fits into the linker script:

powerpc-linux-ld.bfd: section .resetvec loaded at [fffffffc,ffffffff] overlaps section .u_boot_list loaded at [ffffff58,00000723]
powerpc-linux-ld.bfd: u-boot: section .resetvec lma 0xfffffffc adjusted to 0x724
powerpc-linux-ld.bfd: u-boot: section `.resetvec' can't be allocated in segment 0
LOAD: .data.init .text .rodata .reloc .data .u_boot_list .resetvec
powerpc-linux-ld.bfd: final link failed: File truncated

Drop CONFIG_SYS_LONGHELP to free up space.

Cc: Matthias Fuchs <matthias.fuchs@esd-electronics.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
9 years agospl: spl_mmc: MMC boot mode provisions checks
Paul Kocialkowski [Mon, 8 Jun 2015 21:05:09 +0000 (23:05 +0200)]
spl: spl_mmc: MMC boot mode provisions checks

This allows using only one of either raw or fs mode for SPL mmc boot, without
the need to have provisions for the other. In particular, a device may have
U-Boot installed on a file system on the mmc, without ever needing to read
U-Boot from raw memory. Thus, there is no reason to provide a sector or
partition for raw mode. This allows this behaviour and still provides a robust
fallback mechanism in case provisions for both modes are defined.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
9 years agospl: spl_mmc: Minor cosmetics
Paul Kocialkowski [Wed, 3 Jun 2015 16:48:51 +0000 (18:48 +0200)]
spl: spl_mmc: Minor cosmetics

This switches some printf calls to puts and avoids a test repetition.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
9 years agotools/env/fw_env.h: Correct include order
Peter Robinson [Wed, 17 Jun 2015 15:58:32 +0000 (16:58 +0100)]
tools/env/fw_env.h: Correct include order

When building tools-only (or env) we need to be sure that we do use
<linux/kconfig.h> and do not use <generated/autoconf.h>.  This will fix
problems such as running 'make defconfig' or 'make sandbox_config' and
then 'make tools-only'.

Based on the responses below to the thread add linux/kconfig.h higher in
the includes and drop the now unneeded autoconf.h lower down to ensure
the default environment is included correctly

http://lists.denx.de/pipermail/u-boot/2015-June/216849.html

Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
9 years agofix: samsung: common: autoboot.cmd: Correct itbcfg definition
Łukasz Majewski [Wed, 17 Jun 2015 10:49:23 +0000 (12:49 +0200)]
fix: samsung: common: autoboot.cmd: Correct itbcfg definition

This fix is necessary to avoid booting the default ITB configuration.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
9 years agommc_write.c: Make mmc_berase do 32bit safe 64bit math
Tom Rini [Fri, 12 Jun 2015 00:53:31 +0000 (20:53 -0400)]
mmc_write.c: Make mmc_berase do 32bit safe 64bit math

We want to see if the requested start or total block count are
unaligned.  We discard the whole numbers and only care about the
remainder.  Update the code to use div_u64_rem here and add a comment.

Cc: Hans de Goede <hdegoede@redhat.com>
Cc: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
Cc: Bernhard Nortmann <bernhard.nortmann@web.de>
Reported-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
Tested-by: Bernhard Nortmann <bernhard.nortmann@web.de>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
9 years agoboard/BuR/tseries: remove lpj= from environment-variable
Hannes Petermaier [Thu, 11 Jun 2015 10:31:54 +0000 (12:31 +0200)]
board/BuR/tseries: remove lpj= from environment-variable

since we have now various processor-speeds it isn't useful anymore to
preinitialize kernels-delay loop.

Rather we want the kernel to calibrate it on every boot.
This wastes around 80ms boottime but is compatible to all CPU-speeds.

Signed-off-by: Hannes Schmelzer <oe5hpm@oevsv.at>
9 years agoboard/BuR/common: support timer5 for pwm-backlight
Hannes Petermaier [Thu, 11 Jun 2015 10:25:43 +0000 (12:25 +0200)]
board/BuR/common: support timer5 for pwm-backlight

in future we support yet another b&r am335x based board, where Timer 5 is
wired to backlight-driver.

So we introduce a new driver-type '2' to setup timer5 instead timer6.

Signed-off-by: Hannes Schmelzer <oe5hpm@oevsv.at>
Reviewed-by: Simon Glass <sjg@chromium.org>
9 years agoti: am335x/am437x/omap5 devices: Fix breakage when CONFIG_CMD_NET is not used
Cooper Jr., Franklin [Wed, 10 Jun 2015 13:54:02 +0000 (08:54 -0500)]
ti: am335x/am437x/omap5 devices: Fix breakage when CONFIG_CMD_NET is not used

Currently there is no default value for NETARGS if CONFIG_CMD_NET=y isn't set.
This results in build errors which was first discovered when trying to run
make env.

By defining a blank NETARGS these errors can be avoided.

Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com>
Tested-by: Maxin B. John <maxin.john@enea.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
9 years agoboards: tam3517-common: enable gpmc prefetch mode
Jeroen Hofstee [Sat, 30 May 2015 08:11:25 +0000 (10:11 +0200)]
boards: tam3517-common: enable gpmc prefetch mode

Since the tam3517 base board has a 16bit wide nand connected to
the gpmc, enable the prefetch mode, since that is now supported.

Cc: Scott Wood <scottwood@freescale.com>
Cc: Tom Rini <trini@konsulko.com>
Cc: pekon gupta <pekon@ti.com>
Cc: Nishanth Menon <nm@ti.com>
Cc: Daniel Mack <zonque@gmail.com>
Cc: Tapani Utriainen <tapani@technexion.com>
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
Reviewed-by: Tom Rini <trini@konsulko.com>
9 years agomtd: OMAP: Enable GPMC prefetch mode for 16 bit access
Jeroen Hofstee [Sat, 30 May 2015 08:11:24 +0000 (10:11 +0200)]
mtd: OMAP: Enable GPMC prefetch mode for 16 bit access

commit c316f57 "mtd: OMAP: Enable GPMC prefetch mode" only enabled
prefetch mode for 8 bit nand access, this adds 16 bit as well.

Cc: Scott Wood <scottwood@freescale.com>
Cc: Tom Rini <trini@konsulko.com>
Cc: Daniel Mack <zonque@gmail.com>
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
Reviewed-by: Tom Rini <trini@konsulko.com>
9 years agoomap_gpmc: move prefetch out of CONFIG_NAND_OMAP_ELM
Jeroen Hofstee [Sat, 30 May 2015 08:11:23 +0000 (10:11 +0200)]
omap_gpmc: move prefetch out of CONFIG_NAND_OMAP_ELM

The prefech mode is a feature of the gpmc, not the ELM. An am3517
does not have an elm, but can do prefeches, so move the code out
of the CONFIG_NAND_OMAP_ELM ifdef.

Cc: Scott Wood <scottwood@freescale.com>
Cc: Tom Rini <trini@konsulko.com>
Cc: Daniel Mack <zonque@gmail.com>
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
Reviewed-by: Tom Rini <trini@konsulko.com>
9 years agoMSI_Primo81_defconfig: enable USB OTG port and keyboard support
Karsten Merker [Sun, 14 Jun 2015 10:08:42 +0000 (12:08 +0200)]
MSI_Primo81_defconfig: enable USB OTG port and keyboard support

The MSI Primo 81 is an Allwinner A31s-based tablet on which the
OTG port is the only accessible USB interface.  The existing
defconfig had VGA console on the LCD enabled, but was missing
keyboard support because the prerequisites for that (sunxi MUSB
support and AXP221 GPIO support) had not been available before.
All previously missing dependencies are available now, so this
patch enables keyboard support and its prerequisites in the
defconfig.

Signed-off-by: Karsten Merker <merker@debian.org>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
9 years agosun6i: cpu_reset: Do not return from cpu_reset()
Hans de Goede [Sun, 14 Jun 2015 14:53:15 +0000 (16:53 +0200)]
sun6i: cpu_reset: Do not return from cpu_reset()

Currently on sun6i after a "reset" the prompt returns and the user can
even type stuff until the watchdog triggers and does the actual reset.

This is somewhat unexpected behavior for the "reset" command, this
commit adds an endless loop to wait for the watchdog to trigger so that
we do not return to the prompt.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agosunxi: musb: Remove unused sunxi_musb_exit method
Hans de Goede [Sun, 14 Jun 2015 09:58:43 +0000 (11:58 +0200)]
sunxi: musb: Remove unused sunxi_musb_exit method

Remove the unused sunxi_musb_exit method, there is no code in u-boot
calling the exit method, and our implementation was broken as it did
not disable the clocks and asserted reset.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agosunxi: musb: Do not fully reset the controler from sunxi_musb_disable
Hans de Goede [Sun, 14 Jun 2015 09:55:28 +0000 (11:55 +0200)]
sunxi: musb: Do not fully reset the controler from sunxi_musb_disable

Fully resetting the controller is a too big hammer, and the musb_core will
then afterwards fail to communicate with any endpoints other then 0 as
too much state was cleared.

Instead report vbus low for 200ms which will effectively end the current
session without needing to do a full reset.

This fixes usb mass-storage devices no longer working after a "usb reset"

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agoMerge git://git.denx.de/u-boot-usb
Tom Rini [Tue, 16 Jun 2015 00:45:50 +0000 (20:45 -0400)]
Merge git://git.denx.de/u-boot-usb

9 years agoMerge git://git.denx.de/u-boot-marvell
Tom Rini [Mon, 15 Jun 2015 12:31:11 +0000 (08:31 -0400)]
Merge git://git.denx.de/u-boot-marvell

9 years agoomap5: Exclude more environment from SPL builds
Tom Rini [Sat, 13 Jun 2015 00:52:29 +0000 (20:52 -0400)]
omap5: Exclude more environment from SPL builds

In the cases where we make use of environment in SPL we do not need
these defaults compiled in and available.  These are taking up space
that in some cases now prevent linking, so drop.

Signed-off-by: Tom Rini <trini@konsulko.com>
9 years agoboard: add support for Vision System's Baltos Industrial PC
Yegor Yefremov [Fri, 29 May 2015 17:27:29 +0000 (19:27 +0200)]
board: add support for Vision System's Baltos Industrial PC

Vision Systems's Baltos is based on AM335x SoC
from Texas Instruments. This patch adds support
such Industrial PCs in mainline u-boot.

[ balbi@ti.com: updated original patch to current u-boot ]

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
9 years agoARM: DRA7: emif: Fix DDR init sequence during warm reset
Lokesh Vutla [Thu, 4 Jun 2015 04:38:50 +0000 (10:08 +0530)]
ARM: DRA7: emif: Fix DDR init sequence during warm reset

Unlike OMAP5, EMIF PHY used in DRA7 will be left in unknown state after
warm reset, emif needs to be configured to bring it back to a known
state. So configure EMIF during warm reset.

Reported-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
9 years agoavr32: move CONFIG_SYS_GENERIC_BOARD to Kconfig
Masahiro Yamada [Thu, 11 Jun 2015 10:14:50 +0000 (19:14 +0900)]
avr32: move CONFIG_SYS_GENERIC_BOARD to Kconfig

Now all the AVR32 boards have been converted into Generic Board.
Select it in Kconfig and clean up defines in header files.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Andreas Bießmann <andreas.devel@googlemail.com>
9 years agoARM: AM43x: Fix MAX_RAM_BANK_SIZE
Lokesh Vutla [Wed, 10 Jun 2015 10:24:50 +0000 (15:54 +0530)]
ARM: AM43x: Fix MAX_RAM_BANK_SIZE

On AM437x-GP Evm there is 2GB of DDR3 memory available as stated in
AM437x GP EVM HardwareUser's guide http://www.ti.com/lit/ug/spruhw7/spruhw7.pdf.
But MAX_RAM_BANK_SIZE is defined as 1GB.
Fixing MAX_RAM_BANK_SIZE to 2GB on AM43xx.

Reported-by: Shivasharan Nagalikar <shivasharan.nagalikar@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
9 years agoam33xx: Re-enable SW levelling for DDR2
Tom Rini [Fri, 5 Jun 2015 10:21:11 +0000 (15:51 +0530)]
am33xx: Re-enable SW levelling for DDR2

The recent changes for hw leveling on am33xx were not intended for
DDR2 boards, only DDR3. Update emif_sdram_type to take a sdram_config
value to check against. This lets us pass in the value we would use to
configure, when we have not yet configured the board yet.  In other cases
update the call to be as functional as before and check an already
programmed value in.

Tested-by: Yan Liu <yan-liu@ti.com>
Signed-off-by: Tom Rini <trini@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
9 years agoARM: BeagleBoard-x15: Enable i2c5 clocks
Lokesh Vutla [Fri, 5 Jun 2015 09:49:21 +0000 (15:19 +0530)]
ARM: BeagleBoard-x15: Enable i2c5 clocks

On AM57xx evm I2C5 is used to detect the LCD board by reading the
EEPROM present on the bus.
Enable i2c5 clocks to help that.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
9 years agoam43xx_evm: Enable NAND boot
Tom Rini [Fri, 5 Jun 2015 09:43:46 +0000 (12:43 +0300)]
am43xx_evm: Enable NAND boot

Enable booting from NAND on the am437xx-evm.

Signed-off-by: Tom Rini <trini@ti.com>
Signed-off-by: Roger Quadros <rogerq@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
9 years agoam335x_evm: nand: Fix boot from NAND
Roger Quadros [Fri, 5 Jun 2015 09:42:21 +0000 (12:42 +0300)]
am335x_evm: nand: Fix boot from NAND

Use the correct partition names from with the Device Tree blob
and the kernel is picked up. Also use partition name instead of
number for the root filesystem in the kernel boot arguments.

Signed-off-by: Roger Quadros <rogerq@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
9 years agoam335x_evm: am44xx_evm: dra7xx_evm: nand: Fix file-system partition name
Roger Quadros [Fri, 5 Jun 2015 09:42:20 +0000 (12:42 +0300)]
am335x_evm: am44xx_evm: dra7xx_evm: nand: Fix file-system partition name

We almost always use UBIFS for user accessible NAND file systems and
the UBIFS file system might contain more than one volume within the
single NAND partition. The last NAND partition is therefore more
appropriately named as "NAND.file-system" instead of "NAND.rootfs"

The Linux kernel (as of v3.16) also uses "NAND.file-system" to name the
last NAND partition. This patch makes the partition name consistent
between u-boot and the kernel.

Signed-off-by: Roger Quadros <rogerq@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
9 years agoconfigs: am43xx_evm: Enable NAND
Roger Quadros [Fri, 5 Jun 2015 08:09:02 +0000 (11:09 +0300)]
configs: am43xx_evm: Enable NAND

AM43xx EVMs have NAND so enable it.

Signed-off-by: Roger Quadros <rogerq@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
9 years agohighbank: add custom ahci_link_up function
Mark Langsdorf [Thu, 4 Jun 2015 23:58:49 +0000 (00:58 +0100)]
highbank: add custom ahci_link_up function

The Calxeda highbank SOC needs a custom sequence to bring up SATA links,
so override ahci_link_up with custom function to handle combophy setup.

Signed-off-by: Mark Langsdorf <mark.langsdorf@gmail.com>
Signed-off-by: Richard Gibbs
Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Andre Przywara <osp@andrep.de>
9 years agotools/kwboot: Add parameters to set delay and timeout via cmdline
Stefan Roese [Fri, 29 May 2015 11:25:04 +0000 (13:25 +0200)]
tools/kwboot: Add parameters to set delay and timeout via cmdline

To support the Armada 38x, new values for the request-delay and the
response-timeout are needed. As the values already implemented in
this tool (for Kirkwood and Armada XP) don't seem to work here.
To make this more flexible, lets add make those 2 parameters
configurable via the cmdline. Here the new parameters:

-q <req-delay>:  use specific request-delay
-s <resp-timeo>: use specific response-timeout

For the Marvell DB-88F6820 these values are known to work:

One board:
-q 2 -s 1

2nd board:
-q 5 -s 5

So this seems to be even board specific. But with this patch now
those values can be specified and tested via the cmdline.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Kevin Smith <kevin.smith@elecsyscorp.com>
Cc: Dirk Eibach <dirk.eibach@gdsys.cc>
Cc: Luka Perkov <luka.perkov@sartura.hr>
9 years agoarm: mvebu: Update CBAR with SOC regs base
Kevin Smith [Mon, 18 May 2015 16:09:44 +0000 (16:09 +0000)]
arm: mvebu: Update CBAR with SOC regs base

SMP-enabled Linux kernels read the CBAR register in CP15 to find
the address of the SCU registers.  After remapping internal
registers, also update the CBAR so the kernel can find them.

Signed-off-by: Kevin Smith <kevin.smith@elecsyscorp.com>
Acked-by: Stefan Roese <sr@denx.de>
9 years agoarm: mvebu: Disable L2 cache before enabling d-cache
Stefan Roese [Mon, 18 May 2015 16:09:43 +0000 (16:09 +0000)]
arm: mvebu: Disable L2 cache before enabling d-cache

L2 cache may still be enabled by the BootROM. We need to first disable
it before enabling d-cache support.

Signed-off-by: Stefan Roese <sr@denx.de>
Tested-by: Kevin Smith <kevin.smith@elecsyscorp.com>
9 years agotools/kwbimage.c: Correct header size for SPI boot
Kevin Smith [Mon, 16 Mar 2015 14:58:21 +0000 (14:58 +0000)]
tools/kwbimage.c: Correct header size for SPI boot

If defined, the macro CONFIG_SYS_SPI_U_BOOT_OFFS allows a board
to specify the offset of the payload image into the kwb image
file.  This value was being used to locate the image, but was not
used in the "header size" field of the main header.  Move the
use of this macro into the function that returns the header size
so that the same value is used in all places.

Signed-off-by: Kevin Smith <kevin.smith@elecsyscorp.com>
Tested-by: Stefan Roese <sr@denx.de>
9 years agoahci: extend data io wait to 10s
Mark Langsdorf [Thu, 4 Jun 2015 23:58:46 +0000 (00:58 +0100)]
ahci: extend data io wait to 10s

The AHCI driver currently waits 5s before timing out when sending a
data command to a drive. Some drives take upwards of 8s to respond to
the initial data command while they're spinning up. Increase the
data io timeout to 10s so that those drives can be found on initial
scsi scan.

Signed-off-by: Mark Langsdorf <mark.langsdorf@gmail.com>
Signed-off-by: Andre Przywara <osp@andrep.de>
9 years agoahci: support LBA48 data reads for 2+TB drives
Mark Langsdorf [Thu, 4 Jun 2015 23:58:45 +0000 (00:58 +0100)]
ahci: support LBA48 data reads for 2+TB drives

Enable full 48-bit LBA48 data reads by passing the upper word of the
LBA block pointer in bytes 9 and 10 of the FIS.

This allows uboot to load data from any arbitrary sector on a drive
with 2 or more TB of available data connected to an AHCI controller.

Signed-off-by: Mark Langsdorf <mark.langsdorf@gmail.com>
Signed-off-by: Andre Przywara <osp@andrep.de>
[trini: Make use of CONFIG_SYS_64BIT_LBA in a few places to drop
 warnings on platforms that don't enable that feature ]
Signed-off-by: Tom Rini <trini@konsulko.com>
9 years agocmd_scsi: use lbaint_t for LBA values instead of u32
Mark Langsdorf [Thu, 4 Jun 2015 23:58:44 +0000 (00:58 +0100)]
cmd_scsi: use lbaint_t for LBA values instead of u32

Signed-off-by: Mark Langsdorf <mark.langsdorf@gmail.com>
Signed-off-by: Andre Przywara <osp@andrep.de>
9 years agoARM: highbank: add reset support for Calxeda Midway machine
Mark Langsdorf [Thu, 4 Jun 2015 23:58:43 +0000 (00:58 +0100)]
ARM: highbank: add reset support for Calxeda Midway machine

The Calxeda Midway part has A15 cores, which do not have the Highbank
A9's SCU used there for resetting the chip.
Add code to distinguish between the A9 and the A15 and invoke the
appropriate register writes to support the newer part.

Andre: rework detection of Highbank vs. Midway
Rob: fix Andre's reworked detection

Signed-off-by: Mark Langsdorf <mark.langsdorf@gmail.com>
Signed-off-by: Andre Przywara <osp@andrep.de>
Signed-off-by: Rob Herring <robh@kernel.org>
9 years agoARM: highbank: add missing SCU register setup for reset
Rob Herring [Thu, 4 Jun 2015 23:58:42 +0000 (00:58 +0100)]
ARM: highbank: add missing SCU register setup for reset

Andre: assign names to the magic values

Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Andre Przywara <osp@andrep.de>
9 years agoARM: BeagleBoard-x15: Add mux data
Lokesh Vutla [Thu, 4 Jun 2015 11:12:42 +0000 (16:42 +0530)]
ARM: BeagleBoard-x15: Add mux data

Adding the mux data, manual and virtual mode
settings for BeagleBoard-X15.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Roger Quadros <rogerq@ti.com>
9 years agoARM: BeagleBoard-x15: Enable IO delay recalibration sequence
Lokesh Vutla [Thu, 4 Jun 2015 11:12:41 +0000 (16:42 +0530)]
ARM: BeagleBoard-x15: Enable IO delay recalibration sequence

Enable IO delay recalibration sequence.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
9 years agoARM: DRA7: CPSW: Remove IO delay hack
Lokesh Vutla [Thu, 4 Jun 2015 11:12:40 +0000 (16:42 +0530)]
ARM: DRA7: CPSW: Remove IO delay hack

Now all manual mode configurations are done as part of
IO delay recalibration sequence, remove the hack done for
CPSW.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
9 years agoARM: DRA7-evm: Add mux data
Nishanth Menon [Thu, 4 Jun 2015 11:12:39 +0000 (16:42 +0530)]
ARM: DRA7-evm: Add mux data

Adding the mux data, manual and virtual mode
settings for DRA7-evm.

Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Vishal Mahaveer <vishalm@ti.com>
9 years agoARM: DRA7-evm: Enable IO delay recalibration sequence
Lokesh Vutla [Thu, 4 Jun 2015 11:12:38 +0000 (16:42 +0530)]
ARM: DRA7-evm: Enable IO delay recalibration sequence

Enabling IO delay recalibration sequence for DRA7 EVM.
UART and I2C are configured before IO delay recalibration sequence
as these are used earlier and safe to use.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
9 years agoARM: DRA7: Add support for manual mode configuration
Lokesh Vutla [Thu, 4 Jun 2015 11:12:37 +0000 (16:42 +0530)]
ARM: DRA7: Add support for manual mode configuration

In addition to the regular mux configuration, certain pins of DRA7
require to have "manual mode" also programmed, when predefined
delay characteristics cannot be used for the interface.

struct iodelay_cfg_entry is introduced for populating
manual mode IO timings.
For configuring manual mode, along with the normal pad
configuration do the following steps:
- Select MODESELECT field of each assocaited PAD.
  CTRL_CORE_PAD_XXX[8]:MODESELECT = 1(Enable MANUAL_MODE macro along with mux)
- Populate A_DELAY, G_DELAY values that are specified in DATA MANUAL.
  And pass the offset of the CFG_XXX register in iodelay_cfg_entry.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
9 years agoARM: DRA7: Add support for IO delay configuration
Lokesh Vutla [Thu, 4 Jun 2015 11:12:36 +0000 (16:42 +0530)]
ARM: DRA7: Add support for IO delay configuration

On DRA7, in addition to the regular muxing of pins, an additional
hardware module called IODelay which is also expected to be
configured. This "IODelay" module has it's own register space that is
independent of the control module.

It is advocated strongly in TI's official documentation considering
the existing design of the DRA7 family of processors during mux or
IODelay recalibration, there is a potential for a significant glitch
which may cause functional impairment to certain hardware. It is
hence recommended to do muxing as part of IOdelay recalibration.

IODELAY recalibration sequence:
- Complete AVS voltage change on VDD_CORE_L
- Unlock IODLAY config registers.
- Perform IO delay calibration with predefined values.
- Isolate all the IOs
- Update the delay mechanism for each IO with new calibrated values.
- Configure PAD configuration registers
- De-isolate all the IOs.
- Relock IODELAY config registers.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
9 years agoARM: DRA7: Add support for virtual mode configuration
Lokesh Vutla [Thu, 4 Jun 2015 11:12:35 +0000 (16:42 +0530)]
ARM: DRA7: Add support for virtual mode configuration

In addition to the regular mux configuration, certain pins of DRA7
require to have "virtual mode" also programmed.
This allows for predefined delay characteristics to be used by the SoC
to meet timing characterstics needed for the interface.

Provide easy to use macro to do the same.

For configuring virtual mode, along with normal pad configuration add
the following two steps:
- Select MODESELECT field of each assocaited PAD.
  CTRL_CORE_PAD_XXX[8]:MODESELECT = 1
- DELAYMODE filed should be configured with value given in DATA Manual.
  CTRL_CORE_PAD_XXX[7:4]:DELAYMODE =[0-15] (as given in DATA manual).

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
9 years agoARM: DRA7: Add pinctrl register definitions
Lokesh Vutla [Thu, 4 Jun 2015 11:12:34 +0000 (16:42 +0530)]
ARM: DRA7: Add pinctrl register definitions

Adopting the pinctrl register definitions from Linux kernel
to be consistent.
Old definitions will be removed once all the pinctrl data
is adapted to new definitions.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
9 years agoARM: DRA7: Make do_set_mux32() generic
Lokesh Vutla [Thu, 4 Jun 2015 11:12:33 +0000 (16:42 +0530)]
ARM: DRA7: Make do_set_mux32() generic

do_set_mux32() is redefined in dra7xx and beagle_x15 boards.
IO delay recalibration sequence also needs this.
Making it generic to avoid duplication.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
9 years agoARM: DRA7xx: EMIF: Fix DLL_CALIB_CTRL register
Lokesh Vutla [Wed, 3 Jun 2015 11:27:47 +0000 (16:57 +0530)]
ARM: DRA7xx: EMIF: Fix DLL_CALIB_CTRL register

When DLL_CALIB_INTERVAL is set, an extra delay is added
which is not required and it consumes EMIF bandwidth.
So making the DLL_CALIB_CTRL[8:0]DLL_CALIB_INTERVAL bits to 0.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
9 years agoARM: DRA7: Update DDR IO registers
Lokesh Vutla [Wed, 3 Jun 2015 09:13:27 +0000 (14:43 +0530)]
ARM: DRA7: Update DDR IO registers

Update DDR IO register values.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
9 years agoARM: DRA7: Update DDR IO configuration
Lokesh Vutla [Wed, 3 Jun 2015 09:13:26 +0000 (14:43 +0530)]
ARM: DRA7: Update DDR IO configuration

DDRIO_2 and LPDDR2CH1_1 registers are not present
for DRA7. So not configuring these registers for DRA7xx

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
9 years agoARM: DRA7: Add is_dra72x cpu check definition
Lokesh Vutla [Wed, 3 Jun 2015 09:13:25 +0000 (14:43 +0530)]
ARM: DRA7: Add is_dra72x cpu check definition

A generic is_dra72x cpu check is useful for grouping
all the revisions under that. This is used in the
subsequent patches.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
9 years agoARM: DRA72-evm: Enable HW leveling
Lokesh Vutla [Wed, 3 Jun 2015 09:13:24 +0000 (14:43 +0530)]
ARM: DRA72-evm: Enable HW leveling

Updating EMIF registers to enable HW leveling
on DRA72-evm.
Also updating the timing registers.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
9 years agoARM: DRA7-evm: Enable HW leveling
Lokesh Vutla [Wed, 3 Jun 2015 09:13:23 +0000 (14:43 +0530)]
ARM: DRA7-evm: Enable HW leveling

Updating EMIF registers to enable HW leveling
on DRA7-evm.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
9 years agoARM: BeagleBoard-X15: Enable HW leveling
Lokesh Vutla [Wed, 3 Jun 2015 09:13:22 +0000 (14:43 +0530)]
ARM: BeagleBoard-X15: Enable HW leveling

Updating EMIF registers to enable HW leveling
on BeagleBoard-X15.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
9 years agoARM: DRA7: DDR3: Add support for HW leveling
Lokesh Vutla [Wed, 3 Jun 2015 09:13:21 +0000 (14:43 +0530)]
ARM: DRA7: DDR3: Add support for HW leveling

DRA7 EMIF supports Full leveling for DDR3.
Adding support for the Full leveling sequence.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
9 years agokconfiglib: sync with the latest in Kconfiglib project
Masahiro Yamada [Wed, 27 May 2015 02:39:22 +0000 (11:39 +0900)]
kconfiglib: sync with the latest in Kconfiglib project

This commit imports some updates of kconfiglib.py from
https://github.com/ulfalizer/Kconfiglib

 - Warn about and ignore the "allnoconfig_y" Kconfig option
 - Statements in choices inherit menu/if deps
 - Add Symbol.is_allnoconfig_y()
 - Hint that modules are still supported despite warnings.
 - Add warning related to get_defconfig_filename().
 - Fix typo in docs.
 - Allow digits in $-references to symbols.

Signed-off-by: Ulf Magnusson <ulfalizer@gmail.com>
Signed-off-by: Philip Craig <philipjcraig@gmail.com>
Signed-off-by: Jakub Sitnicki <jsitnicki@gmail.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
9 years agoNokia RX-51: Fix calculating return address in save_boot_params
Pali Rohár [Tue, 9 Jun 2015 17:05:00 +0000 (19:05 +0200)]
Nokia RX-51: Fix calculating return address in save_boot_params

Commit e11c6c279d823dc0d2f470c5c2e3c0a9854a640f broke calculating lr register
in function save_boot_params() and caused U-Boot to crash at early boot time
on Nokia N900 board.

This patch fix calculating return address in lr register and make Nokia N900
board bootable again. Patch was tested in qemu and also on real N900 HW.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
9 years agoMerge git://git.denx.de/u-boot-dm
Tom Rini [Fri, 12 Jun 2015 01:18:52 +0000 (21:18 -0400)]
Merge git://git.denx.de/u-boot-dm

9 years agocommon/cmd_bdinfo: show gd->board_type
Hannes Schmelzer [Thu, 11 Jun 2015 10:27:09 +0000 (12:27 +0200)]
common/cmd_bdinfo: show gd->board_type

sometimes it is usefull to know if board-detection has
written the correct value into gd->board_type.

For this we add some output to the bdinfo command.

Signed-off-by: Hannes Schmelzer <oe5hpm@oevsv.at>