Commit Graph

8123 Commits

Author SHA1 Message Date
Benoît Thébaudeau 2dc0aa0227 nand: mxc: Prepare to add support for i.MX5
Add some abstraction to NFC definitions so that some parts of the current code
can also be used for future i.MX5 code.

Clean up a few things by the way.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Acked-by: Scott Wood <scottwood@freescale.com>
Tested-by: Fabio Estevam <fabio.estevam@freescale.com>
2013-04-12 07:55:04 +02:00
Joe Hershberger 785881f775 env: Add redundant env support to UBI env
Allow the user to specify two UBI volumes to use for the environment

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
2013-04-11 15:52:55 -04:00
Joe Hershberger 2b74433f36 env: Add support for UBI environment
UBI is a better place for the environment on NAND devices because it
handles wear-leveling and bad blocks.

Gluebi is needed in Linux to access the env as an MTD partition.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
2013-04-11 15:52:55 -04:00
Joe Hershberger 7182906750 ubi: Expose a few simple functions from the cmd_ubi
Part, Read, and Write functionality that will be used by env_ubi.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
2013-04-11 15:52:54 -04:00
Jon Hunter eef6da0326 omap5912-osk: Fix get_timer() and CONFIG_SYS_HZ
The function get_timer() should return time in ms and CONFIG_SYS_HZ
should be set to 1000 by default. Fix both of these items.

Signed-off-by: Jon Hunter <jon-hunter@ti.com>
2013-04-10 16:03:02 -04:00
Jon Hunter 54ef1f6774 omap5912-osk: Increase flash partition for u-boot
The current u-boot binary needs more than 128KB of flash space and so
move the u-boot environment from an offset of 128KB to 256KB in flash
to ensure the enviroment does not overlap with u-boot.

Signed-off-by: Jon Hunter <jon-hunter@ti.com>
2013-04-10 16:03:01 -04:00
Jon Hunter 2a309f33de omap5912-osk: Fix device initialisation
In the current u-boot, the device pin multiplexing and clock
initialisation needs to be early during the boot process and before
board_init() is called. U-boot is currently crashing on this board
because this is not being done early enough. Therefore, add a s_init()
function for the omap5912-osk board to do this.

Also fix the stack pointer so that it is pointing to the end of the
internal RAM and not the beginning as this was also causing the device
to crash.

Signed-off-by: Jon Hunter <jon-hunter@ti.com>
2013-04-10 16:03:01 -04:00
Tom Rini a519602d95 omap5_uevm: Correct to 2MiB aligned partitions on eMMC
This has a 2MiB erase block size eMMC, so make sure we align on that for
best possible performance.

Signed-off-by: Tom Rini <trini@ti.com>
2013-04-10 15:10:10 -04:00
Pantelis Antoniou ef4e9fc6aa am335x_evm: Enable DFU for NAND and MMC, provide example alt_infos
- Add CONFIG_DFU_NAND, CONFIG_DFU_MMC
- Set dfu_alt_info_nand, dfu_alt_info_emmc and dfu_alt_info_mmc to show
  working examples for those cases.
- Increase CONFIG_SYS_MAXARGS due to hush parsing bugs that would
  otherwise disallow 'setenv dfu_alt_info ${dfu_alt_info_nand}'.
- Enable CONFIG_FAT_WRITE to allow updating on MMC

Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
Signed-off-by: Tom Rini <trini@ti.com>
2013-04-10 15:22:24 +02:00
Tom Rini af5666c885 am335x_evm: Add CONFIG_CMD_MTDPARTS and relevant defaults
Signed-off-by: Tom Rini <trini@ti.com>
2013-04-10 15:22:24 +02:00
Pantelis Antoniou 559eae1cb6 am335x_evm: Define CONFIG_SYS_CACHELINE_SIZE
drivers/usb/gadget/composite.c requires that this is defined early.

Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
Signed-off-by: Tom Rini <trini@ti.com>
Acked-by: Tom Rini <trini@ti.com>
2013-04-10 15:22:24 +02:00
Pantelis Antoniou c6631764c2 dfu: NAND specific routines for DFU operation
Support for NAND storage devices to work with the DFU framework.

Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
Signed-off-by: Tom Rini <trini@ti.com>
Acked-by: Scott Wood <scottwood@freescale.com>
2013-04-10 15:22:24 +02:00
Tom Rini c39d6a0ea5 nand: Extend nand_(read|write)_skip_bad with *actual and limit parameters
We make these two functions take a size_t pointer to how much space
was used on NAND to read or write the buffer (when reads/writes happen)
so that bad blocks can be accounted for.  We also make them take an
loff_t limit on how much data can be read or written.  This means that
we can now catch the case of when writing to a partition would exceed
the partition size due to bad blocks.  To do this we also need to make
check_skip_len count not just complete blocks used but partial ones as
well.  All callers of nand_(read|write)_skip_bad are adjusted to call
these with the most sensible limits available.

The changes were started by Pantelis and finished by Tom.

Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
Signed-off-by: Tom Rini <trini@ti.com>
2013-04-10 15:22:22 +02:00
Tom Rini a24c3155db dfu: Change indentation of defines in <dfu.h>
Signed-off-by: Tom Rini <trini@ti.com>
2013-04-10 13:42:49 +02:00
Pantelis Antoniou ea2453d56b dfu: Support larger than memory transfers.
Previously we didn't support upload/download larger than available
memory.  This is pretty bad when you have to update your root filesystem
for example.

This patch removes that limitation (and the crashes when you transfered
any file larger than 4MB) by making raw image writes be done in chunks
and making file maximum size be configurable.

The sequence number is a 16 bit counter; make sure we handle rollover
correctly. This fixes the wrong transfers for large (> 256MB) images.

Also utilize a variable to handle initialization, so that we don't rely
on just the counter sent by the host.

Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
Signed-off-by: Tom Rini <trini@ti.com>
2013-04-10 13:42:05 +02:00
Łukasz Majewski 3cb5ca75a1 dfu: Increase DFU buffer size from 4MiB to 8MiB
Increase size of DMA buffer from 4MiB to 8MiB. This is necessary due to
uImage size increase.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
2013-04-08 12:00:51 -04:00
Tom Rini dd2445ec1b omap5_common.h: Use fallback CONFIG_SYS_BAUDRATE_TABLE
Cc: Sricharan R <r.sricharan@ti.com>
Signed-off-by: Tom Rini <trini@ti.com>
2013-04-08 11:40:59 -04:00
Tom Rini 9552ee3ea9 omap5_uevm.h: Move uEVM-specific choices to omap5_uevm.h
The omap5_uevm platform has eMMC, and it makes sense to say that our
default env storage shall reside there.  Other platforms may not, so
move this choice to the EVM config.  In addition, we should provide some
way to partition the flash for later usage, so take advantage of the GPT
partition table support code and allow that to be setup with some
reasonable defaults.

Cc: Sricharan R <r.sricharan@ti.com>
Signed-off-by: Tom Rini <trini@ti.com>
2013-04-08 11:40:56 -04:00
SRICHARAN R aaed0a23c9 ARM: OMAP4/5: Make bootz as the default boot command
So with OMAP added to multi platform kernel,
the uImage no more contains a valid load address.
With the uboot already supporting zImage,
change the default boot command to bootz
instead.

Acked-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Sricharan R <r.sricharan@ti.com>
Tested-by: Nishanth Menon <nm@ti.com>
2013-04-08 11:29:05 -04:00
SRICHARAN R 143070df8e ARM: OMAP4/5: Change the default boot command to work with device tree
Now with kernel moving to all device tree, the default
boot command is changed to pass the device tree blob.
Also, adding the findfdt command to get the dt-blob
based on the board.

Thanks to Tom Rini <trini@ti.com> for suggesting this.

Signed-off-by: Sricharan R <r.sricharan@ti.com>
2013-04-08 11:29:05 -04:00
Nishanth Menon 78fd004107 omap5: Allow use of a plain text env file
For production systems it is better to use script images since
they are protected by checksums and carry valuable information
like name and timestamp. Also, you can't validate the content
passed to env import.

But for development, it is easier to use the env import command and
plain text files instead of script-images.

Since both OMAP5evm/uevm boards are used primarily for development,
we allow U-Boot to load env var from a text file in case that an
boot.scr script-image is not present.

The variable uenvcmd (if existent) will be executed (using run) after
uEnv.txt was loaded. If uenvcmd doesn't exist the default boot sequence
will be started.

Inspired by commit: d70f54808d
(omap4: allow the use of a plain text env file instead boot scripts)

Signed-off-by: Sricharan R <r.sricharan@ti.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
Tested-by: Sricharan R <r.sricharan@ti.com>
2013-04-08 11:29:05 -04:00
SRICHARAN R d3501ed584 ARM: OMAP5: Set fdt_high to enable booting with Device tree
While booting with dt blob, if fdt_high is not set to
0xffffffff, the dt blob gets relocated to a high ram address,
which the kernel is not able to use without HIGHMEM.

So set it to 0xffffffff to avoid the issue.

Acked-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Sricharan R <r.sricharan@ti.com>
Tested-by: Nishanth Menon <nm@ti.com>
2013-04-08 11:29:05 -04:00
SRICHARAN R 2c2a9f3a1f ARM: OMAP5: Rename omap5_evm to omap5_uevm
The omap5-uevm is the reference board name for OMAP5 soc
based platform. So rename it accordingly.

Acked-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Sricharan R <r.sricharan@ti.com>
Tested-by: Nishanth Menon <nm@ti.com>
2013-04-08 11:29:05 -04:00
Hunter, Jon d1da76e9f8 omap2420-h4: Fix get_timer() and CONFIG_SYS_HZ
The function get_timer() should return time in ms and CONFIG_SYS_HZ
should be set to 1000 by default. Fix both of these items.

Signed-off-by: Jon Hunter <jon-hunter@ti.com>
2013-04-08 11:29:05 -04:00
Hunter, Jon faad9c0256 omap2420-h4: Add device tree support
Enable device-tree support for the omap2420-h4 board.

Signed-off-by: Jon Hunter <jon-hunter@ti.com>
2013-04-08 11:29:05 -04:00
Hunter, Jon 47f58a7357 omap2420-h4: Fix booting from NOR flash
The omap2420-h4 board is using a RAM based address as the linker
location for code. This is causing several problems when attempting
to run the latest u-boot code base on this board from flash. Update
the default linker location for code to be in NOR flash. Please note
that OMAP maps the NOR flash to address 0x08000000 by default and so
use this as the default address for the NOR flash.

Also remove legacy code that attempts to calculate where in flash the
sdata structure, that holds the memory interface configuration data,
is located. By changing the default linker location for code to flash
this is no longer necessary.

Signed-off-by: Jon Hunter <jon-hunter@ti.com>
2013-04-08 11:29:05 -04:00
Andreas Bießmann 616cf60ee0 tricorder: enable hw assisted BCH8 in SPL and u-boot
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
Cc: Tom Rini <trini@ti.com>
Cc: Thomas Weber <weber@corscience.de>
Cc: Ilya Yanok <ilya.yanok@cogentembedded.com>
Cc: Scott Wood <scottwood@freescale.com>
2013-04-08 11:29:05 -04:00
Manfred Huber fd2aeac560 omap3_beagle: Flush UART3 xmit on enable if TEMT is broken
Flush UART3 xmit on enable if TEMT is broken

On some OMAP3 devices when UART3 is configured for boot mode before SPL starts
only THRE bit is set. We have to empty the transmitter before initialization
starts. This patch avoids the use of CONFIG_SYS_NS16550_BROKEN_TEMT.

Signed-off-by: Manfred Huber <man.huber@arcor.de>
Tested-by: Javier Martinez Canillas <javier@dowhile0.org>
Tested-by: Andreas Bießmann <andreas.devel@googlemail.com>
2013-04-08 11:29:05 -04:00
Bin Liu 4de602f2b0 musb: am335x: disable bulk split-combine feature
On TI AM335x devices, MUSB has bulk split/combine feature enabled
in the ConfigData register, but the current MUSB driver does not
support it yet. Therefore, disable the feature for now, until the
driver adds the support.

One usecase which is broken because of this feature is that Ether
gadget stops working in Fullspeed mode (by un-defining
CONFIG_USB_GADGET_DUALSPEED)

After desabled this feature, MUSB driver send packets in proper size
(no more than 64 bytes) in Fullspeed mode.

This has been validated with Ether gadget in Fullspeed mode on AM335x
EVM.

Signed-off-by: Bin Liu <b-liu@ti.com>
2013-04-08 11:29:04 -04:00
Tom Rini bc5fd908d9 Merge branch 'master' of git://www.denx.de/git/u-boot-cfi-flash 2013-04-04 12:01:27 -04:00
Albert ARIBAUD fed029f3c3 Merge branch 'u-boot-samsung/master' into 'u-boot-arm/master' 2013-04-04 15:44:57 +02:00
Albert ARIBAUD be08abc242 Merge branch 'u-boot-imx/master' into 'u-boot-arm/master' 2013-04-04 11:49:32 +02:00
Stephen Warren 5eaa215607 ARM: bcm2835: fix get_timer() to return ms
Apparently, CONFIG_SYS_HZ must be 1000. Change this, and fix the timer
driver to conform to this.

Have the timer implementation export a custom API get_timer_us() for use
by the BCM2835 MMC API, which needs us resolution for a HW workaround.

Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
2013-04-04 08:14:54 +02:00
Fabio Estevam d8e9eb9c04 wandboard: Remove CONFIG_SYS_FSL_USDHC_NUM
CONFIG_SYS_FSL_USDHC_NUM is not used for wandboard.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Otavio Salvador <otavio@ossystems.com.br>
2013-04-03 11:40:44 +02:00
Fabio Estevam 773d56d40d mx6qsabrelite: Remove duplicate 'mmc dev'
No need to call 'mmc dev' twice.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Otavio Salvador <otavio@ossystems.com.br>
2013-04-03 11:40:44 +02:00
Fabio Estevam 69089245c2 wandboard: Remove duplicate 'mmc dev'
No need to call 'mmc dev' twice.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Otavio Salvador <otavio@ossystems.com.br>
2013-04-03 11:40:44 +02:00
Alexandre Pereira da Silva 50cea244fe mx23_olinuxino: Fix netboot console
The netargs variable was referencing the non-existing variable
console_mainline. Change that to console variable instead.

Signed-off-by: Alexandre Pereira da Silva <aletes.xgr@gmail.com>
Acked-by: Otavio Salvador <otavio@ossystems.com.br>
2013-04-03 11:28:40 +02:00
Abbas Raza aad4659a2f mmc: i.MX6: fsl_esdhc: Define maximum bus width supported by a board
Maximum bus width supported by some i.MX6 boards is not 8bit like
others. In case where both host controller and card support 8bit transfers,
they agree to communicate on 8bit interface while some boards support only 4bit interface.
Due to this reason the mmc 8bit default mode fails on these boards. To rectify this,
define maximum bus width supported by these boards (4bit). If max_bus_width is not
defined, it is 0 by default and 8bit width support will be enabled in host
capabilities otherwise host capabilities are modified accordingly.

It is tested with a MMCplus card.

Signed-off-by: Abbas Raza <Abbas_Raza@mentor.com>
cc: stefano Babic <sbabic@denx.de>
cc: Andy Fleming <afleming@gmail.com>
Acked-by: Dirk Behme <dirk.behme@de.bosch.com>
Acked-by: Andrew Gabbasov <andrew_gabbasov@mentor.com>
2013-04-03 11:26:28 +02:00
Otavio Salvador 2feae93ac0 mx23_olinuxino: Change definitions to use spaces instead of tabs
Change all "#define/ifdef<TAB>" sequences into "#define/ifdef<SPACE>".

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
2013-04-03 11:26:12 +02:00
Benoît Thébaudeau d37b33481d mx25pdk: Enable imxdi RTC
The mx25pdk board supports the i.MX25 DryIce RTC (imxdi), so enable it. This
allows to compile-test the imxdi driver in the mainline tree.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Acked-by: Fabio Estevam <fabio.estevam@freescale.com>
2013-04-03 11:26:12 +02:00
Fabio Estevam ab461be65d mx28evk: Introduce a new target for saving env vars to NAND
Introduce 'mx28evk_nand' target for saving environment variables into NAND.

The mx28evk board does not come with a NAND flash populated from the
factory. It comes with an empty slot (U23), which allows the insertion of a
48-pin TSOP flash device.

Tested with a K9LBG08U0D.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Reviewed-by: Otavio Salvador <otavio@ossystems.com.br>
2013-04-03 10:55:18 +02:00
Otavio Salvador 85449dbd4b mx6qsabre{sd,auto}: Add boot mode select
Adds support for 'bmode' command which let user to choose where to
boot from; this allows U-Boot to load system from another storage
without messing with jumpers.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
2013-04-03 10:41:51 +02:00
aaron.williams@caviumnetworks.com 239cb9d904 mtd: cfi_flash: Fix CFI flash driver for 8-bit bus support
This commit is based on that patch from aaron.williams@caviumnetworks.com
with same commit title. pulled the same code changes into current u-boot tree.

http://patchwork.ozlabs.org/patch/140863/
http://lists.denx.de/pipermail/u-boot/2011-April/089606.html

This patch corrects the addresses used when working with Spansion/AMD FLASH chips.
Addressing for 8 and 16 bits is almost identical except in the 16-bit case the
LSB of the address is always 0.  The confusion arose because the addresses
in the datasheet for 16-bit mode are word addresses but this code assumed it was
byte addresses.

I have only been able to test this on our Octeon boards which use either an 8-bit
or 16-bit bus.  I have not tested the case where there's an 8-bit part on a 16-bit
bus.

This patch also adds some delays as suggested by Spansion.

If a part can be both 8 and 16-bits, it forces it to work in 8-bit mode if an
8-bit bus is detected.

Apart from the pulled changes, fixed few minor code cleanups and tested
on 256M29EW, 512M29EW flashes.

Before this fix:
---------------
Bank # 1: CFI conformant flash (8 x 8)  Size: 64 MB in 512 Sectors
  AMD Standard command set, Manufacturer ID: 0xFF, Device ID: 0xFF
  Erase timeout: 4096 ms, write timeout: 2 ms
  Buffer write timeout: 5 ms, buffer size: 1024 bytes

After this fix:
--------------
Bank # 1: CFI conformant flash (8 x 8)  Size: 64 MB in 512 Sectors
  AMD Standard command set, Manufacturer ID: 0x89, Device ID: 0x7E2301
  Erase timeout: 4096 ms, write timeout: 2 ms
  Buffer write timeout: 5 ms, buffer size: 1024 bytes

Signed-off-by: Aaron Williams <aaron.williams@caviumnetworks.com>
Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
Tested-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
2013-04-02 14:27:45 +02:00
York Sun 472d546054 Consolidate bool type
'bool' is defined in random places. This patch consolidates them into a
single header file include/linux/types.h, using stdbool.h introduced in C99.

All other #define, typedef and enum are removed. They are all consistent with
true = 1, false = 0.

Replace FALSE, False with false. Replace TRUE, True with true.
Skip *.py, *.php, lib/* files.

Signed-off-by: York Sun <yorksun@freescale.com>
2013-04-01 16:33:52 -04:00
Akshay Saraswat 4f3bfa97c4 Exynos5: config: enable time command
This patch enables time command.

Signed-off-by: Akshay Saraswat <akshay.s@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2013-04-01 14:02:07 +09:00
Tom Rini 5644369450 Merge branch 'agust@denx.de' of git://git.denx.de/u-boot-staging 2013-03-31 08:43:12 -04:00
Anatolij Gustschin d0f34f10f1 Merge branch 'for-v2013.04'
Conflicts:
	drivers/video/Makefile

Signed-off-by: Anatolij Gustschin <agust@denx.de>
2013-03-29 13:54:10 +01:00
Akshay Saraswat 2c6346c1be Exynos: config: Enable hash command
This enables hash command.

Tested with command "hash sha256 0x40008000 0x2B 0x40009000".
Used mm and md to write a standard string to memory location
0x40008000 and ran the above command to verify the output.

Signed-off-by: ARUN MANKUZHI <arun.m@samsung.com>
Signed-off-by: Akshay Saraswat <akshay.s@samsung.com>
Acked-by: Simon Glass <sjg@chromium.org>
2013-03-29 20:10:42 +09:00
Akshay Saraswat 1f9c92808a gen: Add sha h/w acceleration to hash
Adding H/W acceleration support to hash which can be used
to test SHA 256 hash algorithm.

Signed-off-by: ARUN MANKUZHI <arun.m@samsung.com>
Signed-off-by: Akshay Saraswat <akshay.s@samsung.com>
Acked-by: Simon Glass <sjg@chromium.org>
2013-03-29 20:10:42 +09:00
Akshay Saraswat 8e6ee2933c Exynos: config: Enable ACE HW for SHA 256 for Exynos
This enables SHA 256 for exynos.

Signed-off-by: ARUN MANKUZHI <arun.m@samsung.com>
Signed-off-by: Akshay Saraswat <akshay.s@samsung.com>
Acked-by: Simon Glass <sjg@chromium.org>
2013-03-29 20:10:42 +09:00
Pali Rohár d999398822 RX-51: Add support for bootmenu
* default bootmenu entries:
   attached kernel, internal eMMC memory, external SD card,
   u-boot boot order

 * in CONFIG_PREBOOT try load bootmenu.scr from first partition
   of internal eMMC memory (also known as MyDocs) which (should)
   overwrite default bootmenu entries

 * when keyboard slide is closed boot first menu entry

 * when keyborad slide is open show bootmenu

Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
Signed-off-by: Anatolij Gustschin <agust@denx.de>
2013-03-29 09:35:34 +01:00
Pali Rohár e7abe91967 New command bootmenu: ANSI terminal boot menu support
The "bootmenu" command uses U-Boot menu interfaces and provides
a simple mechanism for creating menus with several boot items.
When running this command the menu will be assembled as defined
by a set of environment variables which contain a title and
command key-value pairs. The "Up" and "Down" keys are used for
navigation through the items. Current active menu item is
highlighted and can be selected using the "Enter" key.

The command interprets and generates various ANSI escape
sequencies, so for proper menu rendering and item selection
the used terminal should support them.

Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
[agust: various fixes and documentation updates]
Signed-off-by: Anatolij Gustschin <agust@denx.de>
2013-03-29 09:35:34 +01:00
Anatolij Gustschin 6a3439fdad menu: export menu_default_choice() function
Checking the default menu item and obtaining its data can
be useful in custom menu code. Export menu_default_choice()
function which serves this purpose.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
2013-03-29 09:35:34 +01:00
Pali Rohár fc9d64ffcd menu: Add support for user defined item choice function
Selecting menu items is currently done in menu_interactive_choice()
by reading the user input strings from standard input.

Extend menu_interactive_choice() to support user defined function
for selecting menu items. This function and its argument can be
specified when creating the menu.

Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
Signed-off-by: Anatolij Gustschin <agust@denx.de>
2013-03-29 09:35:33 +01:00
Przemyslaw Marczak dc993a65f4 spl:falcon:trats: Fix SPL image size computing.
"spl_imgsize" was set as decimal variable by "setexpr"
and this causes wrong image size written by "ext4write".
Preset this val with "0x" prefix allow to fix this issue.

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Minkyu Kang <mk7.kang@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2013-03-29 11:42:35 +09:00
Albert ARIBAUD 009d75ccc1 Merge branch 'u-boot/master' into 'u-boot-arm/master'
Conflicts:
	drivers/spi/tegra20_sflash.c
	include/fdtdec.h
	lib/fdtdec.c
2013-03-28 18:50:01 +01:00
Steven Stallion 04d414090c image: Add support for Plan 9
Signed-off-by: Steven Stallion <sstallion@gmail.com>
Cc: Tom Rini <trini@ti.com>
Reviewed-by: Tom Rini <trini@ti.com>
2013-03-27 15:30:11 -04:00
Tom Rini 268d966dff env_callback: Mark find_env_callback as static
This is not called outside of env_callback.c so mark static, remove from
<env_callback.h>

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Tom Rini <trini@ti.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2013-03-27 15:30:11 -04:00
Ajay Kumar 1e4706a715 EXYNOS5: FDT: Add compatible strings for FIMD
Add required compatible information for FIMD.

Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2013-03-27 21:23:11 +09:00
Ajay Kumar d7377b5193 EXYNOS: FDT: Add compatible strings for FIMD
Add required compatible information for FIMD.

Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2013-03-27 21:17:23 +09:00
Ajay Kumar 29fd57046e video: exynos_fb: Remove callbacks from the driver
Replaced the functionality of callbacks by using a standard set of functions.
Instead of implementing and hooking up a callback, put the same code in one of
the standard set of functions by overriding it.

This patch is tested only on SMDK5250.
For Trats and universal_c210 board, it is only compile tested.

Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2013-03-27 21:17:12 +09:00
Albert ARIBAUD ebd749da69 Merge branch 'u-boot-tegra/master' into 'u-boot-arm/master' 2013-03-26 10:40:13 +01:00
Albert ARIBAUD 412665b461 Merge branch 'u-boot-samsung/master' into 'u-boot-arm/master' 2013-03-26 09:51:09 +01:00
Tom Warren f789be6086 Tegra114: MMC: Enable DT MMC driver support for Tegra114 Dalmore boards
Tested on my Dalmore E1611 board, eMMC and SD-Card work fine, can load
a kernel off of an SD card OK, card detect works, and the env is now
stored in eMMC (end of the 2nd 'boot' sector, same as Tegra20/30).

Signed-off-by: Tom Warren <twarren@nvidia.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
2013-03-25 09:56:08 -07:00
Allen Martin ec37b2b423 tegra114: dalmore: config: enable SPI
Turn on SPI in dalmore config file

Signed-off-by: Allen Martin <amartin@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
2013-03-25 09:56:07 -07:00
Allen Martin 77c42e80b9 tegra114: add SPI driver
Add driver for tegra114 SPI controller.  This controller is not
compatible with either the tegra20 or tegra30 controllers, so it
requires a new driver.

Signed-off-by: Allen Martin <amartin@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
2013-03-25 09:56:07 -07:00
Allen Martin c3bb3c8bb3 tegra114: fdt: add compatible string for tegra114 SPI ctrl
Add "nvidia,tegra114-spi" to represent t114 SPI controller hardware.

Signed-off-by: Allen Martin <amartin@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
2013-03-25 09:56:06 -07:00
Allen Martin 78f47b7353 spi: add common fdt SPI driver interface
Add a common interface to fdt based SPI drivers.  Each driver is
represented by a table entry in fdt_spi_drivers[].  If there are
multiple SPI drivers in the table, the first driver to return success
from spi_init() will be registered as the SPI driver.

Signed-off-by: Allen Martin <amartin@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
2013-03-25 09:56:06 -07:00
Allen Martin ff1da6fb5f tegra: spi: rename tegra SPI drivers
Rename tegra SPI drivers to tegra20_flash and tegra20_slink in
preparation for commonization and addition of tegra114_spi.

Signed-off-by: Allen Martin <amartin@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
2013-03-25 09:56:05 -07:00
Albert ARIBAUD b6379e15a7 Merge branch 'u-boot-ti/master' into 'u-boot-arm/master' 2013-03-24 17:52:22 +01:00
Matt Porter ea7b96b6aa ti814x_evm: add ti814x evm board support
Add TI814X EVM board directory, config file, and MAINTAINERS
entry. Enable build.

Signed-off-by: Matt Porter <mporter@ti.com>
Reviewed-by: Tom Rini <trini@ti.com>
[trini: Adapt to recent omap_hsmmc requirements, Matt re-tested]
Signed-off-by: Tom Rini <trini@ti.com>
2013-03-24 12:49:12 -04:00
Tom Rini 98f92001b3 am33xx: Add required includes to some omap/am33xx code
- In arch/arm/cpu/armv7/omap-common/timer.c,
  drivers/mtd/nand/omap_gpmc.c and drivers/net/cpsw.c add #include files
  that the driver needs but had been relying on <config.h> to bring in.
- In arch/arm/cpu/armv7/omap-common/lowlevel_init.S add <config.h>
- In am335x_evm.h and pcm051.h don't globally include
  <asm/arch/hardware.h> and <asm/arch/cpu.h> but just <asm/arch/omap.h>
  as that is the only include which defines things the config uses.

Cc: Lars Poeschel <poeschel@lemonage.de>
Signed-off-by: Tom Rini <trini@ti.com>
2013-03-24 12:49:11 -04:00
Enric Balletbo i Serra e284f88baf igep00x0: Enable CONFIG_CMD_BOOTZ
With v3.9 and later of the Linux Kernel defaulting to multi-platform
images with omap2plus_defconfig, uImage isn't builtable anymore by
default.  Add CONFIG_CMD_BOOTZ so that we can still boot something the
kernel spits out.

Signed-off-by: Enric Balletbo i Serra <eballetbo@iseebcn.com>
Reviewed-by: Javier Martinez Canillas <javier@dowhile0.org>
2013-03-24 12:49:11 -04:00
Stephen Warren 536121328e ARM: tegra: enable workaround for ARM erratum 716044
Tegra20 requires the workaround for this erratum. Enable it.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
2013-03-22 16:45:25 +01:00
Koen Kooi 951d582778 am335x_evm: Add more variables and switch to DT booting.
Make bootcmd run findfdt so that we know what dtb file to load.  Add a
loadfdt command to load this file in.  Make mmcboot pass in ${fdtaddr}
and make the mmc section of bootcmd run loadfdt.

Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Signed-off-by: Tom Rini <trini@ti.com>
Acked-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-03-22 11:02:31 -04:00
Koen Kooi 73a27a84e5 am335x_evm: Enable CMD_EXT4 and CMD_FS_GENERIC, add bootpart to env
The kernel is loaded from some form of ext[234] or FAT, depending on the
distribution used.  We add a bootpart variable to the environment so
that we can load from the correct mmc partition as well.  We leave
CONFIG_CMD_EXT2 for existing scripts that use ext2load.

Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Signed-off-by: Tom Rini <trini@ti.com>
Acked-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-03-22 10:58:04 -04:00
Koen Kooi 2077590644 am335x_evm: add support for BeagleBone Black DT name
Cc: Matt Porter <mporter@ti.com>
Cc: Nishanth Menon <nm@ti.com>
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Signed-off-by: Tom Rini <trini@ti.com>
Acked-by: Matt Porter <mporter@ti.com>
Acked-by: Peter Korsgaard <jacmet@sunsite.dk>
Acked-by: Nishanth Menon <nm@ti.com>
2013-03-22 10:57:00 -04:00
Nikita Kiryanov f35034fe16 cm-t35: add support for loading splash image from NAND
Add support for loading splash image from NAND

Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
2013-03-22 10:57:00 -04:00
Jeroen Hofstee a5796c51ce common/lcd.c: move the macro's to the c file
Hide the console macros since some reference global data which is
no longer present.

cc: Anatolij Gustschin <agust@denx.de>
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
2013-03-21 10:38:51 +01:00
Jeroen Hofstee 6b035141f6 common/lcd: cosmetic: clean up a bit
- Make the brackets of the function calls more consistent
 - Remove really unnecessary brackets
 - Removes the extern from the function definitions
 - Remove curly brackets from single line statements
 - Remove lcd_setmem proto since it is already in common.h
 - Cleanup comments, remove useless comments
 - Remove NOT_USED_SO_FAR ifdef
 - Cleanup coding style

cc: Anatolij Gustschin <agust@denx.de>
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
[agust: rebased the original patch]
Signed-off-by: Anatolij Gustschin <agust@denx.de>
2013-03-21 10:31:38 +01:00
Jeroen Hofstee 00a0ca5986 common/lcd.c: remove global lcd_base
lcd_base is available as gd->fb_base as well, there is no need
to keep a seperate copy.

For completeness the ack of Bo Shen is for the atmel part.
Cc: Alessandro Rubini <rubini@unipv.it>
Cc: Anatolij Gustschin <agust@denx.de>
Cc: Bo Shen <voice.shen@atmel.com>
Cc: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Marek Vasut <marek.vasut@gmail.com>
Cc: Minkyu Kang <mk7.kang@samsung.com>
Cc: Nikita Kiryanov <nikita@compulab.co.il>
Cc: Simon Glass <sjg@chromium.org>
Cc: Stelian Pop <stelian@popies.net>
Cc: Tom Warren <twarren@nvidia.com>
Acked-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
[agust: also fix cm_t35 board while rebasing]
Signed-off-by: Anatolij Gustschin <agust@denx.de>
2013-03-21 10:16:53 +01:00
Jeroen Hofstee f1d205a19c common/lcd.c: cleanup use of global variables
console_col, console_row, lcd_line_length, lcd_console_address had
to be declared in board / driver specific code, but were not actually
used there on many boards. Get rid of the global variables.

for completeness, the ack of Bo Shen is for the atmel part
Cc: Alessandro Rubini <rubini@unipv.it>
Cc: Anatolij Gustschin <agust@denx.de>
Cc: Bo Shen <voice.shen@atmel.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Marek Vasut <marek.vasut@gmail.com>
Cc: Minkyu Kang <mk7.kang@samsung.com>
Cc: Nikita Kiryanov <nikita@compulab.co.il>
Cc: Simon Glass <sjg@chromium.org>
Cc: Stelian Pop <stelian@popies.net>
Cc: Tom Warren <twarren@nvidia.com>
Acked-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
[agust: rebased and fixed cm_t35 board]
Signed-off-by: Anatolij Gustschin <agust@denx.de>
2013-03-21 10:11:17 +01:00
Jeroen Hofstee 0698095af6 lcd, pxafb: move the pxafb to drivers/video
Since the lcd code was compiled unconditionally for pxa also add
CONFIG_PXA_LCD to the boards using this framebuffer. Since
driver/video contains video and lcd drivers, add lcd to the name
to make clear it belongs to common/lcd.c.

cc: Anatolij Gustschin <agust@denx.de>
cc: Cliff Brake <cliff.brake@gmail.com>
cc: Marek Vasut <marek.vasut@gmail.com>
Acked-by: Marek Vasut <marex@denx.de>
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
2013-03-21 09:38:21 +01:00
Jeroen Hofstee 59155f4c50 lcd, mpc8xx: move the mpc8xx driver to drivers/video
Since the lcd code was compiled unconditionally in arch also
add CONFIG_MPC8XX_LCD to the boards using this driver.

cc: Anatolij Gustschin <agust@denx.de>
cc: Wolfgang Denk <wd@denx.de>
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
2013-03-21 09:17:39 +01:00
Wolfgang Denk 46d1d5dd43 common/lcd.c: cleanup use of global variables
lcd_color_fg and lcd_color_bg had to be declared in board specific
code, but were not actually used there; in addition, we have getter /
setter functions for these, which were not used either.

Get rid of the global variables, and use the getter function where
needed (so far no setter calls are needed).

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Alessandro Rubini <rubini@unipv.it>
Cc: Anatolij Gustschin <agust@denx.de>
Cc: Bo Shen <voice.shen@atmel.com>
Cc: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Marek Vasut <marek.vasut@gmail.com>
Cc: Minkyu Kang <mk7.kang@samsung.com>
Cc: Nikita Kiryanov <nikita@compulab.co.il>
Cc: Simon Glass <sjg@chromium.org>
Cc: Stelian Pop <stelian@popies.net>
Cc: Tom Warren <twarren@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
Acked-by: Jeroen Hofstee <jeroen@myspectrum.nl>
[agust: also fixed cm_t35 board while rebasing]
Signed-off-by: Anatolij Gustschin <agust@denx.de>
2013-03-21 09:05:08 +01:00
Tom Rini 8b906a9f0b Merge branch 'spi' of git://git.denx.de/u-boot-x86 2013-03-20 14:55:10 -04:00
Stephen Warren 131a1e603b ARM: rpi_b: enable SD controller, add related env/cmds
Enable the SD controller driver for the Raspberry Pi. Enable a number
of useful MMC, partition, and filesystem-related commands. Set up the
environment to provide standard locations for loading a kernel, DTB,
etc. Provide a boot command that loads and executes boot.scr.uimg from
the SD card; this is written considering future extensibilty to USB
storage.

Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
2013-03-20 15:32:16 +01:00
Stephen Warren 6be3c9fca2 video: add a driver for the bcm2835
The firmware running on the bcm2835 SoC's VideoCore CPU manages the
display controller. Add a simple "LCD" driver that communicates with the
firmware using the property mailbox protocol. This configures the
display and frame-buffer to match whatever physical resolution the
firmware chosen when booting, which is typically the native resolution
of the attached display device, presumably unless otherwise specified
in config.txt on the boot media.

Enable this driver in the Raspberry Pi board configuration.

Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
Acked-by: Anatolij Gustschin <agust@denx.de>
2013-03-20 15:30:00 +01:00
Stephen Warren 38baa4f6d6 ARM: rpi_b: disable rpi_b dcache explicitly
There appears to be no implementation of flush_dcache_range() for
ARM1176, so explicitly disable dcache support to avoid references to
that function from the LCD core in the next patch. This was presumably
not noticed before simply because no drivers for the rpi_b were
attempting DMA.

Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
2013-03-20 15:29:45 +01:00
Fabio Estevam e2d282a1b4 Add initial support for Wandboard dual lite and solo.
Wandboard is a development board that has two variants: one version based
on mx6 dual lite and another one based on mx6 solo.

For more details about Wandboard, please refer to: http://www.wandboard.org/

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
2013-03-20 11:47:37 +01:00
Eric Nelson 209b571064 i.MX6: mx6qsabrelite: discard override of CONFIG_ARP_TIMEOUT
Nothing on the SABRE Lite board warrants a shorter than normal
ARP timeout.

Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
2013-03-20 11:44:55 +01:00
Fabio Estevam a49db3df76 mx28evk: Disable CONFIG_CMD_I2C
When loading a Freescale 2.6.35 on a mx28evk the following issue is seen:

sgtl5000_hw_read: read reg error : Reg 0x00
Device with ID register 0 is not a SGTL5000

Disabling CONFIG_CMD_I2C makes the sgtl5000 probe to succeed.

Mainline kernel does not show this problem.

Until the real cause is not identified, disable 'CONFIG_CMD_I2C' for the
time being.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
2013-03-20 11:40:58 +01:00
Fabio Estevam 40f1daa0b7 configs: mx28evk: Use single-line comments
No need to use multi-line style comments for single-line contents.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Reviewed-by: Otavio Salvador <otavio@ossystems.com.br>
2013-03-20 11:28:51 +01:00
Simon Glass 363464f993 x86: Enable time command for coreboot
This command is useful for measuring SPI flash load times and the like.
Enable gettime as well to obtain absolute time tick values.

Signed-off-by: Simon Glass <sjg@chromium.org>
2013-03-19 08:45:37 -07:00
Simon Glass e30bd5cfee x86: Enable SPI flash support for coreboot
Turn on SPI flash support and related commands.

Signed-off-by: Simon Glass <sjg@chromium.org>
2013-03-19 08:45:37 -07:00
Simon Glass bb8215f437 sf: Enable FDT-based configuration and memory mapping
Enable device tree control of SPI flash, and use this to implement
memory-mapped SPI flash, which is supported on Intel chips.

Signed-off-by: Simon Glass <sjg@chromium.org>
2013-03-19 08:45:37 -07:00
Simon Glass 0c456cee95 spi: Add parameter for maximum write size
Some SPI controllers (e.g. Intel ICH) have a limit on the number of SPI
bytes that can be written at a time. Add this as a parameter so that
clients of the SPI interface can respect this value.

Signed-off-by: Simon Glass <sjg@chromium.org>
2013-03-19 08:45:36 -07:00
Simon Glass b5aec1424d sf: Add spi_flash_alloc() to create a new SPI flash struct
At present it is difficult to extend the SPI flash structure since
all devices allocate it themselves, and few of them zero all fields.
Add a new function spi_flash_alloc() which can be used by SPI devices
to perform this allocation, and thus ensure that all devices can
better cope with SPI structure changes.

Signed-off-by: Simon Glass <sjg@chromium.org>
2013-03-19 08:45:36 -07:00
Simon Glass ba6c3ce9bd spi: Add function to allocate a new SPI slave
At present it is difficult to extend the SPI structure since all
drivers allocate it themselves, and few of them zero all fields. Add
a new function spi_alloc_slave() which can be used by SPI drivers
to perform this allocation, and thus ensure that all drivers can
better cope with SPI structure changes.

Signed-off-by: Simon Glass <sjg@chromium.org>
2013-03-19 08:45:36 -07:00
Simon Glass 4397a2a80b fdt: Add fdtdec_get_addr_size() to read reg properties
It is common to have a "reg = <address size>" property in the FDT.
Add a function to handle this, similar to the existing
fdtdec_get_addr();

Signed-off-by: Simon Glass <sjg@chromium.org>
2013-03-19 08:45:36 -07:00