Commit Graph

7770 Commits

Author SHA1 Message Date
Eric Benard 71779d5b87 m28evk/mx28evk: fix nand_update_full
- since commit 418396e212 nand write.raw
can take the number of page to be written as an argument. nand_update_full
is passing the size (in bytes) to nand write.raw. This value was previously
ignored but now breaks the write.
- this patch updates the default environment of these boards to provide a
pagecount instead of a size to nand write.raw.
- tested on a mx28evk with a 4k page NAND and on a custom board with a
2k page NAND.

Signed-off-by: Eric Bénard <eric@eukrea.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Marek Vasut <marex@denx.de>
2012-12-14 16:04:06 -06:00
Tom Rini 6e9005bd96 omap3_evm: Let CONFIG_EFI_PARTITION be set for SPL
The #ifdef here is not enough to stop part_efi.c from being built, only
being unused.  And with recent changes this now leads to warnings.  The
easiest solution here is to just let the garbage collection at link time
do its job.

Signed-off-by: Tom Rini <trini@ti.com>
2012-12-13 13:58:27 -07:00
Joe Hershberger 1d6cd0a3f6 env: Handle write-once ethaddr and serial# generically
Use the variable access flags to implement the protection for ethaddr
and serial# instead of hard-coding them.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
2012-12-13 11:46:57 -07:00
Joe Hershberger 267541f776 env: Add support for access control to .flags
Add support for read-only, write-once, and change-default.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
2012-12-13 11:46:56 -07:00
Joe Hershberger fffad71bc4 env: Add a command to display details about env flags
Similar to the env callback command, this will show details about the
options available, the static list, and the currently active variables.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
2012-12-13 11:46:56 -07:00
Joe Hershberger 30fd4fadb3 tools/env: Add environment variable flags support
Currently just validates variable types as decimal, hexidecimal,
boolean, ip address, and mac address.  Call
env_acl_validate_setenv_params() from setenv() in fw_env.c.

If the entry is not found in the env .flags, then look in the static
one. This allows the env to override the static definitions, but prevents
the need to have every definition in the environment distracting you.

Need to build in _ctype for isdigit for Linux.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
2012-12-13 11:46:56 -07:00
Joe Hershberger 2598090b7e env: Add environment variable flags
Currently just validates variable types as decimal, hexidecimal,
boolean, ip address, and mac address.

If the entry is not found in the env ".flags", then look in the static
one. This allows the env to override the static definitions, but prevents
the need to have every definition in the environment distracting you.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
2012-12-13 11:46:56 -07:00
Joe Hershberger e080d545f8 env: Add a silent env handler
The silent variable now updates the global data flag anytime it is
changed as well as after the env relocation (in case its value is
different from the default env in such cases as NAND env)

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
2012-12-13 11:46:56 -07:00
Joe Hershberger 849d5d9cda env: Add a console env handler
Remove the hard-coded console handler and use a callback instead

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
2012-12-13 11:46:56 -07:00
Joe Hershberger 1cf0a8b2fb env: Add a loadaddr env handler
Remove the hard-coded loadaddr handler and use a callback instead

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
2012-12-13 11:46:56 -07:00
Joe Hershberger 32057717e0 env: Add a baudrate env handler
Remove the hard-coded baudrate handler and use a callback instead

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
2012-12-13 11:46:55 -07:00
Joe Hershberger a9f51c9b43 env: Add a bootfile env handler
Remove the hard-coded bootfile handler and use a callback instead

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
2012-12-13 11:46:55 -07:00
Joe Hershberger 170ab11075 env: Add support for callbacks to environment vars
Add support for per-variable callbacks to the "hashtable" functions.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>

!!!fix comment in callback
2012-12-13 11:46:55 -07:00
Joe Hershberger be11235ab8 env: Hide '.' variables in env print by default
When printing all variables with env print, don't print variables that
begin with '.'.  If env print is called with a '-a' switch, then
include variables that begin with '.' (just like the ls command).

Variables printed explicitly will be printed even without the -a.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
2012-12-13 11:46:55 -07:00
Joe Hershberger ec8a252cd4 env: Use getenv_yesno() more generally
Move the getenv_yesno() to env_common.c and change most checks for
'y' or 'n' to use this helper.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
2012-12-13 11:46:55 -07:00
Joe Hershberger 7afcf3a55b env: Refactor apply into change_ok
Move the read of the old value to inside the check function.  In some
cases it can be avoided all together and at the least the code is only
called from one place.

Also name the function and the callback to more clearly describe what
it does.

Pass the ENTRY instead of just the name for direct access to the whole
data structure.

Pass an enum to the callback that specifies the operation being approved.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
2012-12-13 11:46:55 -07:00
Joe Hershberger c4e0057fa7 env: Refactor do_apply to a flag
Use a flag in hsearch_r for insert mode passed from import to allow the
behavior be different based on use.

Now that "do_check" is called for all imports, ensure console init is
complete before updating the console on relocation import

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
2012-12-13 11:46:54 -07:00
Joe Hershberger e772cb30f6 Make linux kernel string funcs available to tools
isspace() and strim() are not in the typical user-mode string.h, so
put them in a separate compilation unit so that they can be built into
tools that need them independent of the other common string functions.

This allows code shared by u-boot and the linux user-mode tools to link.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
2012-12-13 11:46:07 -07:00
Lukasz Majewski 9960d9a8bc gpt: Enable support for GPT partition table restoration at Samsung's Trats
Enable support for GPT partition table restoration at Samsung's Trats
development board.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
CC: Minkyu Kang <mk7.kang@samsung.com>
2012-12-13 11:46:03 -07:00
Lukasz Majewski 40684ddb83 gpt: Support for GPT (GUID Partition Table) restoration
The restoration of GPT table (both primary and secondary) is now possible.
Function 'gpt_restore' presents example of partition restoration process.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Piotr Wilczek <p.wilczek@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
2012-12-13 11:46:02 -07:00
Chang Hyun Park fae2bf22a2 gpt: The leXX_to_int() calls replaced with ones defined at <compiler.h>
Custom definitions of le_XX_to_int functions have been replaced with
standard ones, defined at <compiler.h>

Replacement of several GPT related structures members with ones
indicating its endianness and proper size.

Signed-off-by: Chang Hyun Park <heartinpiece@outlook.com>
Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
2012-12-13 11:46:02 -07:00
Lukasz Majewski 9386f96ca9 part:efi: Move part_efi.h file to ./include
This move is necessary to export gpt header and GPT partition entries to be
used with other commands or subsystems.
Additionally the part_efi.h file has been cleaned-up to supress checkpatch's
warnings.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
2012-12-13 11:46:02 -07:00
Lukasz Majewski 3ec44111aa vsprintf:fix: Change type returned by ustrtoul
The ustrtoul shall convert string defined size (e.g. 1GiB) to unsigned
long type (as its name implies).

Up till now it had returned int, which might cause problems with large
numbers (GiB range), when interpreted as U2 signed numbers.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
2012-12-13 11:46:02 -07:00
Fabio Estevam b874df74af mx25pdk: Allow booting a device tree kernel
Select CONFIG_OF_LIBFDT so that a device tree kernel can be launched.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
2012-12-13 09:23:59 +01:00
Simon Glass 23b479b25c exynos: Enable hashing functions and EDID for smdk5250
Enable SHA1/SHA256 hashing and the hash command. Also enable EDID
support for reading from an LCD.

Signed-off-by: Simon Glass <sjg@chromium.org>
2012-12-11 13:18:14 -07:00
Vadim Bendebury 9ad557be2f Add console command to access io space registers
Provide u-boot console functions to access IO space registers. A no
thrills implementation, accessing one register at a time.

For example:
    boot > iod 80
    0080: 00000094
    boot > iod.w 80
    0080: 0094
    boot > iod.b 80
    0080: 94
    boot > iow.b 0x80 12
    boot > iod 0x80
    0080: 00000012

Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
2012-12-11 13:17:35 -07:00
Tom Wai-Hong Tam d46b5f7dcb edid: Library of EDID decode and print
This implements a library for accessing EDID data from an LCD panel.
This is used to obtain information about the panel such as its
resolution and type.

This is a tidied-up version of the original code pulled from
https://github.com/ynezz/u-boot-edid.

The changes we made are:
 - removed bit fields in the struct;
 - removed endianness cases in the struct;
 - fixed some wrong definitions;
 - fixed to fit 80 columns;
 - fixed some code styles.

Signed-off-by: Tom Wai-Hong Tam <waihong@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
2012-12-11 13:17:34 -07:00
Simon Glass bf36c5d521 Add hash command to perform hashing using various algorithms
This new command supports hashing SHA1 and SHA256. It could be extended
to others such as MD5 and the CRC algorithms. The syntax is modeled on
those:

   hash <algorithm> <address> <length> [*<dest_addr> | <dest_envvar>]

to calculate a hash, and:

   hash -v <algorithm> <address> <length> [*<verify_addr> | <verify_envvar>]

to verify a hash.

Use CONFIG_CMD_HASH to enable the command, CONFIG_SHA1 to enable SHA1 and
CONFIG_SHA256 to enable SHA256.

The existing sha1sum command remains.

Signed-off-by: Simon Glass <sjg@chromium.org>
2012-12-11 13:17:34 -07:00
Simon Glass 460408ef9a Add generic hash API
We have a SHA1 command and want to add a SHA256 command also. Instead of
duplicating the code, create a generic hash API which can process
commands for different algorithms.

Signed-off-by: Simon Glass <sjg@chromium.org>
2012-12-11 13:17:34 -07:00
Simon Glass b1f17bf5ff Add strcasecmp() and strncasecmp()
strncasecmp() is present as strnicmp() but disabled. Make it available
and define strcasecmp() also. There is a only a small performance penalty
to having strcasecmp() call strncasecmp(), so do this instead of a
standalone function, to save code space.

Update the prototype in arch-specific headers as needed to avoid warnings.

Signed-off-by: Simon Glass <sjg@chromium.org>
2012-12-11 13:17:34 -07:00
Simon Glass ec7381fbf6 sha256: Use const where possible and add watchdog function
In preparation for making the hash function common, we may as well use
const where we can.

Also add a watchdog version of the hashing function.

Signed-off-by: Simon Glass <sjg@chromium.org>
2012-12-11 13:17:33 -07:00
Simon Glass a7d1d76579 sha1: Use const where possible, and unsigned for input len
In preparation for making the hash function common, we may as well use
const where we can. Also the input length cannot be negative, but may
be very large, so use unsigned.

Signed-off-by: Simon Glass <sjg@chromium.org>
2012-12-11 13:17:33 -07:00
Kenneth Waters ff048ea916 Add a command to read raw blocks from a partition
Sometimes data is on a block device and within a partition, but not in a
particular filesystem.

This commands permits reading raw data from a partition.

Signed-off-by: Kenneth Waters <kwaters@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
2012-12-11 13:17:33 -07:00
Anton Staaf 53fdc7ef2e Add gettime command
Gettime returns the current timer value.  If CONFIG_SYS_HZ is defined
then the timer value is also converted to seconds.

Tegra20 (SeaBoard) # gettime
Timer val: 7754
Seconds : 7
Remainder : 754
sys_hz = 1000

There has been some discussion about whether this is useful enough to
be included in U-Boot. The following boards do not have CONFIG_SYS_HZ
defined:

M52277EVB
M52277EVB_stmicro
M53017EVB
M54418TWR
M54418TWR_nand_mii
M54418TWR_nand_rmii
M54418TWR_nand_rmii_lowfreq
M54418TWR_serial_mii
M54418TWR_serial_rmii

Signed-off-by: Anton Staaf <robotboy@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
2012-12-11 13:17:33 -07:00
Nikita Kiryanov 94740e4739 gpio: remove duplicate function signature
gpio_request() appears twice in asm-generic/gpio.h
Remove one of the definitions.

Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
2012-12-11 13:17:32 -07:00
Fabio Estevam cabe240b59 mx25pdk: Adapt it for the new PMIC framework
Make the necessary adaptions for the new PMIC framework, so that mx25pdk can
be built again.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Stefano Babic <sbabic@denx.de>
2012-12-11 17:41:19 +01:00
Rajeshwari Shinde 211e8438cf SMDK5250: Enable pmic MAX77686
Enabled pmic MAX77686 for SMDK5250.

Signed-off-by: Rajeshwari Shinde <rajeshwari.s@samsung.com>
Reviewed-by: Lukasz Majewski <l.majewski@samsung.com>
Acked-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2012-12-11 12:59:59 +09:00
Rajeshwari Shinde 857765e9aa POWER: MAX77686: Modified as per the latest Implementation
Moved the pmic_max77686.c max77686_pmic.h to drivers/power
and made required changes accordingly

Signed-off-by: Rajeshwari Shinde <rajeshwari.s@samsung.com>
Reviewed-by: Lukasz Majewski <l.majewski@samsung.com>
Acked-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2012-12-11 12:59:55 +09:00
Nikita Kiryanov 9bd5c1ad0d cm-t35: enable zero bootdelay check
Enable zero bootdelay check to make it possible to abort autoboot even if
bootdelay == 0

Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
2012-12-10 12:45:35 -07:00
Vincent Stehlé ce851c8b3c power: twl6035: complain on LDO9 error
We handle i2c_write return code and complain in case of error. We propagate the
error, too, to allow better handling at the upper level in the future.

Signed-off-by: Vincent Stehlé <v-stehle@ti.com>
2012-12-10 12:45:35 -07:00
Thomas Weber abcbe2eb00 OMAP3: Remove unused PHYS_SDRAM_1_SIZE
Remove the unused PHYS_SDRAM_1_SIZE from OMAP3 config files.

Signed-off-by: Thomas Weber <thomas@tomweber.eu>
2012-12-10 12:45:34 -07:00
Yegor Yefremov cdd0729ead am335x: cpsw: make phy address configurable
Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
2012-12-10 08:56:38 -07:00
Stefano Babic 31f5b651fa OMAP3: TAM3517: add macros for reading eeprom
Added macros to read SOM information from the I2C
EEPROM.

Signed-off-by: Stefano Babic <sbabic@denx.de>
2012-12-10 08:56:38 -07:00
Robert P. J. Day d7aff44a00 omap3_beagle.h: Fix comment for true/false return value.
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
2012-12-10 08:54:02 -07:00
Ilya Yanok b4606c6cea am335x_evm: enable SPL NAND support
Enable booting from NAND support from AM335x boards as well as
environment in NAND.

Signed-off-by: Ilya Yanok <ilya.yanok@cogentembedded.com>
2012-12-10 08:54:02 -07:00
Ilya Yanok 98b5c26943 am335x_evm: enable NAND support
Enable NAND support for AM335X boards.

Signed-off-by: Ilya Yanok <ilya.yanok@cogentembedded.com>
2012-12-10 08:54:02 -07:00
Minkyu Kang 2c601c7208 Merge branch 'master' of git://git.denx.de/u-boot into resolve
Conflicts:
	README
	board/samsung/universal_c210/universal.c
	drivers/misc/Makefile
	drivers/power/power_fsl.c
	include/configs/mx35pdk.h
	include/configs/mx53loco.h
	include/configs/seaboard.h
2012-12-10 14:13:27 +09:00
Richard Genoud b030e73173 at91sam9x5ek: add USB configuration
Signed-off-by: Richard Genoud <richard.genoud@gmail.com>
Acked-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
2012-12-09 22:39:47 +01:00
Richard Genoud 419fba0c68 at91sam9x5ek: regroup FAT/DOS features
Signed-off-by: Richard Genoud <richard.genoud@gmail.com>
Acked-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
2012-12-09 22:38:50 +01:00
Stefano Babic 05a860c228 Merge branch 'master' of git://git.denx.de/u-boot into master
Conflicts:
	drivers/power/power_fsl.c
	include/configs/mx35pdk.h
	include/configs/mx53loco.h
	include/configs/woodburn_common.h
	board/woodburn/woodburn.c

These boards still use the old old PMIC framework, so they
do not merge properly after the power framework was merged into
mainline.

Fix all conflicts and update woodburn to use Power Framework.

Signed-off-by: Stefano Babic <sbabic@denx.de>
2012-12-08 12:02:45 +01:00
Tom Rini fd4d564b3c Merge branch 'master' of git://git.denx.de/u-boot-x86 2012-12-07 08:47:59 -07:00
Luka Perkov 3fdf7596df Change e-mail address of Luka Perkov
Change e-mail address of Luka Perkov.

Signed-off-by: Luka Perkov <luka@openwrt.org>
CC: Luka Perkov <uboot@lukaperkov.net>
2012-12-07 08:47:52 -07:00
Simon Glass ac426b7290 x86: Fix coreboot config to boot on Chromebook
The config is current broken. It compiles but does not boot because IDE is
enabled. Remove all IDE options, and enable SCSI instead.

Also add a working boot command and Linux bootargs, and enable command
line editing to make it easier to work with.

Signed-off-by: Simon Glass <sjg@chromium.org>
2012-12-06 14:30:45 -08:00
Gabe Black d954a431ec x86: Turn on support for EFI's GPT in the coreboot config
This allows u-boot to figure out the partitions of a chrome-os install.

Signed-off-by: Gabe Black <gabeblack@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
2012-12-06 14:30:44 -08:00
Simon Glass cbca883c46 x86: coreboot: Enable video display
Enable the display on coreboot, using CFB.

Signed-off-by: Simon Glass <sjg@chromium.org>
2012-12-06 14:30:44 -08:00
Stefan Reinauer 300081aa68 x86: Emit port 80 post codes in show_boot_progress()
This helps us monitor boot progress and determine where U-Boot dies if
there are any problems.

Signed-off-by: Stefan Reinauer <reinauer@google.com>

Signed-off-by: Simon Glass <sjg@chromium.org>
2012-12-06 14:30:43 -08:00
Gabe Black 40fef04906 Introduce arch_phys_memset which works like memset but on physical memory
The default implementation of this function is just memset, but other
implementations will be needed when physical memory isn't accessible by
U-Boot using normal addressing mechanisms.

Signed-off-by: Gabe Black <gabeblack@chromium.org>
Signed-off-by: Che-Liang Chiou <clchiou@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
2012-12-06 14:30:40 -08:00
Simon Glass 34d6057be1 x86: Enable CONFIG_CMD_ZBOOT for coreboot
Enable this option to support booting a zImage.

Signed-off-by: Simon Glass <sjg@chromium.org>
2012-12-06 14:30:40 -08:00
Simon Glass a7e6d5496c x86: Enable ICH6 GPIO controller for coreboot
Coreboot uses this controller to implement GPIO access.

Signed-off-by: Simon Glass <sjg@chromium.org>
2012-12-06 14:30:38 -08:00
Bill Richardson 55ae10f8db x86: gpio: Add GPIO driver for Intel ICH6 and later.
Implement <asm-generic/gpio.h> functions for Intel ICH6 and later.
Only GPIOs 0-31 are handled by this code.

Signed-off-by: Bill Richardson <wfrichar@chromium.org>

Signed-off-by: Simon Glass <sjg@chromium.org>
2012-12-06 14:30:38 -08:00
Simon Glass e3ff797cdb cbfs: Add docbook template
This adds a docbook template for fs, and makes CBFS use it.

Signed-off-by: Simon Glass <sjg@chromium.org>
2012-12-06 13:56:39 -07:00
Simon Glass 2592075776 cbfs: Remove mention of CREDITS files
As requested by Wolfgang, remove references to CREDITS in the CBFS
files.

Signed-off-by: Simon Glass <sjg@chromium.org>
2012-12-06 13:56:38 -07:00
Matthias Fuchs 468ebf190a 4xx: Fix PCI memory mapping on CPCI405 boards
This patch fixes an issue with overlapping PCI regions
on boards with more than 64MB RAM.

Signed-off-by: Matthias Fuchs <matthias.fuchs@esd.eu>
Signed-off-by: Stefan Roese <sr@denx.de>
2012-12-06 15:53:04 +01:00
Stefan Roese 13b4f63949 mpc5200: Add a3m071 board support
This patch adds support for the a3m071 board based on the
MPC5200.

Signed-off-by: Stefan Roese <sr@denx.de>
2012-12-05 17:31:23 +01:00
Tom Rini ce12a8c1a9 Merge branch 'master' of git://git.denx.de/u-boot-x86 2012-12-03 06:47:05 -07:00
Simon Glass a78d49473c x86: Define CONFIG_SYS_VSNPRINTF for coreboot
This option protects the printf() functions from overflow.

Signed-off-by: Simon Glass <sjg@chromium.org>
2012-11-30 13:44:05 -08:00
Simon Glass 420a2ca73f x86: Select stdio devices for coreboot
We want to support VGA, serial, USB keyboard and the Coreboot memory
console buffer.

Signed-off-by: Simon Glass <sjg@chromium.org>
2012-11-30 13:44:03 -08:00
Vadim Bendebury 98ab435f73 x86: Add CBMEM console driver for coreboot
This patch builds upon the recently introduced CBMEM console
feature of coreboot.

CBMEM console uses a memry area allocated by coreboot to store
the console output. The memory area has a certain structure,
which allows to determine where the buffer is, the buffer size
and the location of the pointer in the buffer. This allows
different phases of the firmware (rom based coreboot, ram based
coreboot, u-boot after relocation with this change) to keep
adding text to the same buffer.

Note that this patch introduces a new console driver and adds the
driver to the list of drivers to be used for console output, i.e.
it engages only after u-boot relocates. Usiong CBMEM console for
capturing the pre-relocation console output will be done under a
separate change.

>From Linux, run the cbmem.py utility (which is a part of the coreboot
package) to see the output, e.g.:

vvvvvvvvvvvvvvvvv
SCSI:  AHCI 0001.0300 32 slots 6 ports ? Gbps 0xf impl SATA mode
flags: 64bit ilck stag led pmp pio
...
Magic signature found
Kernel command line: "cros_secure  quiet loglevel=1 console=tty2...
^^^^^^^^^^^^^^^^^

Note that the entire u-boot output fits into the buffer only if
the coreboot log level is reduced from the most verbose. Ether
the buffer size will have to be increased, or the coreboot
verbosity permanently reduced.

Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
2012-11-30 13:44:03 -08:00
Nobuhiro Iwamatsu f3269ad4e8 include/linux/byteorder: Always defines __fswab64, __swab64p and __swab64s
When __BYTEORDER_HAS_U64__ is not defined, we got warning following:

-----
/tmp/include/linux/byteorder/little_endian.h: In function ‘__cpu_to_be64p’:
/tmp/include/linux/byteorder/little_endian.h:71:2: warning: implicit declaration of function ‘__swab64p’
		[-Wimplicit-function-declaration]
-----

Usually, __arch__swab64* required for __fswab64,  __swab64p and __swab64s
is defined.  Therefore, __BYTEORDER_HAS_U64__ is unnecessary.
This removes __BYTEORDER_HAS_U64__.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
CC: Kim Phillips <kim.phillips@freescale.com>
Reviewed-by: Kim Phillips <kim.phillips@freescale.com>
2012-11-30 07:15:04 -07:00
Tom Rini e57d9d15ee Merge branch 'master' of git://www.denx.de/git/u-boot-x86 2012-11-28 13:44:40 -07:00
Simon Glass d02a568e9a x86: coreboot: Enable LPC TPM
Coreboot boards have an LPC TPM connected, so enable this.

Signed-off-by: Simon Glass <sjg@chromium.org>
2012-11-28 11:40:05 -08:00
Simon Glass cd23e6923f x86: Remove coreboot start16 code
Now that coreboot doesn't need the start16 code, remove it. We need
to remove the CONFIG_SYS_X86_RESET_VECTOR option from coreboot.h also.

Signed-off-by: Simon Glass <sjg@chromium.org>
2012-11-28 11:40:05 -08:00
Graeme Russ 8d61625d6a x86: Put global data on the stack
Putting global data on the stack simplifies the init process (and makes it
slightly quicker). During the 'flash' stage of the init sequence, global
data is in the CAR stack. After SDRAM is initialised, global data is copied
from CAR to the SDRAM stack

Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
2012-11-28 11:40:03 -08:00
Tom Rini a86fcff695 Merge branch 'master' of git://www.denx.de/git/u-boot-mpc85xx 2012-11-28 08:30:21 -07:00
Zang Roy-R61911 9760b274df powerpc/corenet_ds: move SATA config to board configuration
board configuration file is included before asm/config_mpc85xx.h.
however, CONFIG_FSL_SATA_V2 is defined in asm/config_mpc85xx.h.
it will never take effective in the board configuration file for
this kind of code :

 #ifdef CONFIG_FSL_SATA_V2
 ...
 #endif

To solve this problem, move CONFIG_FSL_SATA_V2 to board
configuration header file.

This patch reverts Timur's
commit:3e0529f742e893653848494ffb9f7cd0d91304bf

Signed-off-by: Roy Zang <tie-fei.zang@freescale.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
2012-11-27 18:28:07 -06:00
York Sun ca1b0b8956 powerpc/P2041RDB: Fix Flash address LAW address
P2041RDB uses common corenet TLB and LAW. However it doesn't have promjet
connector. It is necessary to use the same base address for correct LAW
address. An offset is added for NOR flash.

Signed-off-by: York Sun <yorksun@freescale.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
2012-11-27 18:28:06 -06:00
Timur Tabi d31e53b42c powerpc/85xx: add support for the Freescale P5040DS Superhydra reference board
The P5040DS reference board (a.k.a "Superhydra") is an enhanced version of
P3041DS/P5020DS ("Hydra") reference board.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
2012-11-27 18:28:06 -06:00
York Sun 021382cad2 powerpc/qoriq: Move FMAN microcode location
Move FMAN microcude from 0xEF000000 to 0xEFF40000 to free up the beginning
of this virtual bank so that this bank can store RCW or be used together
with other banks to store large images.

Signed-off-by: York Sun <yorksun@freescale.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
2012-11-27 18:25:55 -06:00
Stephen Warren 1981539914 mmc: tegra: use bounce buffer APIs
Tegra's MMC driver does DMA, and hence needs cache-aligned buffers. In
some cases (e.g. user load commands) this cannot be guaranteed by callers
of the MMC APIs. To solve this, modify the Tegra MMC driver to use the
new bounce_buffer_*() APIs.

Note: Ideally, all U-Boot code will always provide address- and size-
aligned buffers, so a bounce buffer will only ever be needed for user-
supplied buffers (e.g. load commands). Ensuring this removes the need
for performance-sucking bounce buffer cache management and memcpy()s.
The one known exception at present is the SCR buffer in sd_change_freq(),
which is only 8 bytes long. Solving this requires enhancing struct
mmc_data to know the difference between buffer size and transferred data
size, or forcing all callers of mmc_send_cmd() to have allocated buffers
using ALLOC_CACHE_ALIGN_BUFFER(), which while true in this case, is not
enforced in any way at present, and so cannot be assumed by the core MMC
code.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Andy Fleming <afleming@freescale.com>
2012-11-27 17:26:49 -06:00
Stephen Warren 84d35b2863 common: rework bouncebuf implementation
The current bouncebuf API requires all parameters to be passed to both
bounce_buffer_start() and bounce_buffer_stop(). Modify the bouncebuf
start function to accept a state structure as a parameter, and only
require that state struct to be passed to the stop function. This
simplifies usage of the bounce buffer by clients.

Don't modify the data pointer, but rather store the temporary buffer in
this state struct. The bouncebuf code ensures that client code can
always use a single buffer pointer in the state structure, irrespective
of whether a bounce buffer actually had to be allocated.

Move cache management logic into the bounce buffer code, so that each
client doesn't have to duplicate this. I believe there's no need to
invalidate the buffer before a DMA operation, since flushing the cache
should prevent any write-backs.

Update the MXS MMC driver for this change.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Andy Fleming <afleming@freescale.com>
2012-11-27 17:26:48 -06:00
Stephen Warren 4ea7a09faf bouncebuf: remove dummy implementation
If any driver ever needs to use the bounce buffer API, it always needs
to use it. As such, providing a dummy implementation of those APIs when
CONFIG_BOUNCE_BUFFER isn't defined does not make sense. Remove the dummy
implementation.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Andy Fleming <afleming@freescale.com>
2012-11-27 17:26:48 -06:00
Stephen Warren 640fb60784 Replace CONFIG_MMC_BOUNCE_BUFFER with CONFIG_BOUNCE_BUFFER in configs
Commits 6dc71c8 "MMC: MXS: Toggle the generic bounce buffer on the
boards" and 49a627f "MMC: Remove the MMC bounce buffer" replaced
CONFIG_MMC_BOUNCE_BUFFER with CONFIG_BOUNCE_BUFFER, but missed
converting a few boards over to the new option. Fix this.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Andy Fleming <afleming@freescale.com>
2012-11-27 17:26:48 -06:00
Mela Custodio 688c2d140b mmc: add no simultaenous power and vdd
Bring in the code from Linux kernel.

Added to Linux kernel by:
commit e08c1694d9e2138204f2b79b73f0f159074ce2f5
Author: Andres Salomon <dilinger@queued.net>
Date:   Fri Jul 4 10:00:03 2008 -0700

Some HW balks when writing both voltage setting and power up at the same
time to SDHCI_POWER_CONTROL register.

Signed-off-by: Rommel G Custodio <sessyargc@gmail.com>
CC: Andy Fleming <afleming@freescale.com>

v2: fix attribution and SOB
Signed-off-by: Andy Fleming <afleming@freescale.com>
2012-11-27 17:26:48 -06:00
Wu, Josh b7e3129e55 mmc: at91sam9x5: support to save environment in mmc
Signed-off-by: Josh Wu <josh.wu@atmel.com>
Acked-by: Andreas Bießmann <andreas.devel@googlemail.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
2012-11-27 17:26:47 -06:00
Pantelis Antoniou 66dc452bfe Remove obsolete header file
usbdescriptors.h conflicts with linux/usb/ch9.h
Remove it.

Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
2012-11-27 09:41:10 -07:00
Tom Rini dfe161032d Merge branch 'master' of git://git.denx.de/u-boot-nand-flash 2012-11-26 14:53:33 -07:00
Benoît Thébaudeau 3287f6d385 nand: Add torture feature
This patch adds a NAND Flash torture feature, which is useful as a block stress
test to determine if a block is still good and reliable (or should be marked as
bad), e.g. after a write error.

This code is ported from mtd-utils' lib/libmtd.c.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Cc: Scott Wood <scottwood@freescale.com>
[scottwood@freescale.com: removed unnec. ifdef and unwrapped error strings]
Signed-off-by: Scott Wood <scottwood@freescale.com>
2012-11-26 15:41:29 -06:00
Joe Hershberger c788ecfdc3 nand: Move the sub-page read support enable to a flag
Use a flag instead of a hard-coded macro so that sub-page reads can be
enabled in other cases (such as on-die ecc).

This is the same as a5ff4f102937a3492bca4a9ff0c341d78813414c in Linux

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
2012-11-26 15:41:28 -06:00
Scott Wood 13d1143ffb powerpc/mpc85xx/p2020rdb-pca: Use L2 SRAM for SPL boot
This allows DDR configuration to be deferred to the final U-Boot image,
which is able to make use of SPD data.  The SPL itself cannot use SPD due
to code size constraints.  It previously used fixed register values for
DDR configuration, and those values did not work on the p2020rdb-pca
board I tested with.  It's possible that different revisions of the board
require different settings.  Using SPD eliminates that problem.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Cc: Andy Fleming <afleming@freescale.com>
2012-11-26 15:41:27 -06:00
Scott Wood d674bccf73 powerpc/mpc85xx/p1_p2_rdb_pc: clean up memory map
- Sort by address, and fix column alignment

- Don't label things as localbus that aren't.  Instead, put chipselect
  info at the end of the description for localbus windows.  Note that
  NAND/NOR have their chipselects swapped when booting from NAND, and CS2
  can be either PMC or VSC7385 depending on hwconfig.

- Shrink NAND to the 32K that's actually mapped in the localbus

- Assign an address and size to L2 SRAM.  Remove the similarly named
  but unintelligible "L2 SDRAM(REV.)".

- Remove the untrue comment about L1 stack being mapped with TLB0.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Cc: Andy Fleming <afleming@freescale.com>
2012-11-26 15:41:26 -06:00
Scott Wood a796e72c78 powerpc/mpc85xx/p1_p2_rdb_pc: convert from nand_spl to new spl
Signed-off-by: Scott Wood <scottwood@freescale.com>
Cc: Andy Fleming <afleming@freescale.com>
2012-11-26 15:41:26 -06:00
Scott Wood 6f2f01b9f3 spl/nand: introduce CONFIG_SPL_NAND_DRIVERS, _BASE, and _ECC.
Some small SPLs do not use nand_base.c, and a subset of those also
require a special driver.  Some SPLs need software ECC but others can't
fit it.

All existing boards that specify CONFIG_SPL_NAND_SUPPORT have these
symbols added to preserve existing behavior.

Signed-off-by: Scott Wood <scottwood@freescale.com>
--
v2: use positive logic for including bits of NAND, rather than
a MINIMAL symbol that excludes things.
2012-11-26 15:41:25 -06:00
Albert ARIBAUD b8a7c46796 Merge branch 'u-boot-imx/master' into 'u-boot-arm/master' 2012-11-25 13:01:58 +01:00
Tom Rini d6bc7dcc03 Merge branch 'master' of git://git.denx.de/u-boot-fdt 2012-11-20 10:46:30 -07:00
Gerald Van Baren 2a7abdd3d3 Merge branch 'next' 2012-11-19 19:26:35 -05:00
Ilya Yanok c2af345ed5 omap3_beagle: use new MUSB intstead of the old one
Enable using of new MUSB framework on Beagle.

NOTE! This is not just a change of backend code: top-level behavior
is also changed, we now use USB device port for USB Ethernet instead
of serial.

Signed-off-by: Ilya Yanok <ilya.yanok@cogentembedded.com>
2012-11-20 00:16:08 +01:00
Ilya Yanok c642b151f3 omap3_beagle: add musb-new init
Add initialization for new MUSB framework.

Signed-off-by: Ilya Yanok <ilya.yanok@cogentembedded.com>
2012-11-20 00:16:08 +01:00
Ilya Yanok 673a524b6a musb-new: omap2plus backend driver
Backend driver for MUSB OTG controllers found on TI OMAP2/3/4
(tested only on OMAP3 Beagle).

Signed-off-by: Ilya Yanok <ilya.yanok@cogentembedded.com>
2012-11-20 00:16:08 +01:00
Ilya Yanok 88919ff7bf am3517_evm: switch to musb-new
Use new musb framework instead of the old one on AM3517_EVM.

Signed-off-by: Ilya Yanok <ilya.yanok@cogentembedded.com>
2012-11-20 00:16:07 +01:00
Ilya Yanok 833a53c627 musb-new: am35x backend driver
Backend driver for MUSB OTG controllers found on TI AM35x.

It seems that on AM35X interrupt status registers can be updated
_before_ core registers. As we don't use true interrupts in U-Boot
and poll interrupt status registers instead this can result in
interrupt handler being called with non-updated core registers.
This confuses the code and result in hanged transfers.
Add a small delay in am35x_interrupt as a workaround.

Signed-off-by: Ilya Yanok <ilya.yanok@cogentembedded.com>
2012-11-20 00:16:07 +01:00