aboutsummaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)Author
2013-01-09km/common: drop unneeded std* environment variablesHolger Brunck
These variables are only used if CONFIG_SYS_CONSOLE_IS_IN_ENV is set. This isn't the case, so we can drop them safely. Signed-off-by: Holger Brunck <holger.brunck@keymile.com> cc: Valentin Longchamp <valentin.longchamp@keymile.com> cc: Prafulla Wadaskar <prafulla@marvell.com>
2013-01-08Merge branch 'u-boot-imx/master' into 'u-boot-arm/master'Albert ARIBAUD
2013-01-08Merge branch 'u-boot-ti/master' into 'u-boot-arm/master'Albert ARIBAUD
This required manual merging drivers/mtd/nand/Makefile and adding am335x_evm support for CONFIG_SPL_NAND_DRIVERS
2013-01-05tools: imximage: Load a size that is multiple of 512Fabio Estevam
In order to mx53 ROM to properly load the U-boot image, its header size should be multiple of 512 bytes. This issue was observed with gcc 4.6.2/4.7.3, which caused data aborts: U-Boot 2013.01-rc2-00172-gf8cfcf1-dirty (Dec 26 2012 - 13:13:28) Board: MX53 LOCO I2C: ready DRAM: 1 GiB MMC: FSL_SDHC: 0, FSL_SDHC: 1 In: serial Out: serial Err: serial CPU: Freescale i.MX53 family rev2.1 at 1000 MHz Reset cause: WDOG Net: FEC Warning: FEC using MAC address from net device Hit any key to stop autoboot: 0 data abort MAYBE you should read doc/README.arm-unaligned-accesses pc : [<aff72220>] lr : [<aff721fc>] sp : af565e20 ip : af566918 fp : 00000000 r10: 00000003 r9 : affabb5b r8 : af565f58 r7 : 00000000 r6 : 36747fff r5 : af5668e8 r4 : 36747fff r3 : af5668ec r2 : af5668eb r1 : 00000000 r0 : af5668e8 Flags: NzcV IRQs off FIQs off Mode SVC_32 Resetting CPU ... resetting ... ,and this patch fixes it. Also, even though the ROUND macro is already defined in common.h, the reason for redefining it in image.h is explained by Stefano Babic: "I will remark a previous comment - even if including common.h seems a good idea to avoid duplications, it makes tools like mkimage to depend on the selected board, because <board>_config must run. Even if this is not a problem for us u-boot developers, it becomes an issue when these tools are included in distros (like u-boot-tools in Ubuntu) and cannot be packaged." Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
2013-01-05mx51evk: Remove unneeded commentFabio Estevam
Looks like the original comment came from a copy and paste from mx31ads.h. It does not have a context on mx51evk anymore, so delete it. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
2013-01-05mx6qsabresd: use on-board eMMC to store environmentShawn Guo
It makes more sense to use on-board eMMC to store environments. The boot partition 1 is selected by default. Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2013-01-05mx6qsabresd: add usdhc2 and usdhc4 supportShawn Guo
The on-board number of available usdhc devices is something board specific. The patch moves CONFIG_SYS_FSL_USDHC_NUM out of mx6qsabre_common.h and adds usdhc2 and usdhc4 support for mx6qsabresd board. To keep the default mmc device for environment same as before (usdhc3), it moves CONFIG_SYS_MMC_ENV_DEV out of mx6qsabre_common.h and changes it to 1 for mx6qsabresd. Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2013-01-05mxs: Add NAND fdt and ramdisk partition to m28evkMarek Vasut
Adjust the NAND partitioning layout so that there is a separate partition for the ramdisk and fdt blob on the NAND. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Detlev Zundel <dzu@denx.de> Cc: Stefano Babic <sbabic@denx.de> Cc: Wolfgang Denk <wd@denx.de>
2012-12-27mx53loco: Call PMIC related functions from board_late_init()Fabio Estevam
Since commit c733681 (pmic: Extend PMIC framework to support multiple instances of PMIC devices) mx53loco fails to allocate the memory for PMIC: U-Boot 2013.01-rc2-dirty (Dec 20 2012 - 15:55:01) Board: MX53 LOCO I2C: ready DRAM: 1 GiB pmic_alloc: No available memory for allocation! pmic_init: POWER allocation error! CPU: Freescale i.MX53 family rev2.0 at 800 MHz Reset cause: POR MMC: FSL_SDHC: 0, FSL_SDHC: 1 Calling the PMIC related functions at a later stage, ie, from board_late_init() fixes the issue. Reported-by: Robert Nelson <robertcnelson@gmail.com> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Tested-by: Stefano Babic <sbabic@denx.de>
2012-12-26mx6qsabre_common: Change default loadaddr to 0x12000000Otavio Salvador
This allow use of mainline and Freescale BSP Linux kernel with same environment. Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
2012-12-26mx6qsabrelite: Change default loadaddr to 0x12000000Otavio Salvador
This allow use of mainline and Freescale BSP Linux kernel with same environment. Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
2012-12-26mx53loco: Change default loadaddr to 0x72000000Otavio Salvador
This allow use of mainline and Freescale BSP Linux kernel with same environment. Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
2012-12-26mx53loco: We shouldn't hardcode a rootfs filesystem typeOtavio Salvador
For a generic environment, we shouldn't have a fixed rootfs filesystem so we drop it from env. Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
2012-12-26mx35pdk: Allow booting of a device tree kernelFabio Estevam
Select CONFIG_OF_LIBFDT, so that a dt kernel can be launched. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
2012-12-22Merge samsung, imx, tegra into u-boot-arm/masterAlbert ARIBAUD
This commit merges branches from samsung, imx and tegra meant to fix merge issues between u-boot/master and u-boot-arm/master, as well as a few manual merge fixes.
2012-12-19Merge remote-tracking branch 'u-boot/master' into u-boot-arm-mergedAllen Martin
Conflicts: README arch/arm/cpu/armv7/exynos/clock.c 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-17Merge branch 'master' of git://git.denx.de/u-boot-netTom Rini
2012-12-15powerpc: remove not used CONFIG_SYS_TFTP_LOADADDRtrem
CONFIG_SYS_TFTP_LOADADDR is defined on severals boards, but it's never used. So we can safely removed it. Signed-off-by: Philippe Reynes <tremyfr@yahoo.fr>
2012-12-14m28evk/mx28evk: fix nand_update_fullEric Benard
- since commit 418396e212b59bf907dbccad997ff50f7eb61b16 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-13omap3_evm: Let CONFIG_EFI_PARTITION be set for SPLTom Rini
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-13env: Handle write-once ethaddr and serial# genericallyJoe Hershberger
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-13env: Add support for access control to .flagsJoe Hershberger
Add support for read-only, write-once, and change-default. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
2012-12-13env: Add a command to display details about env flagsJoe Hershberger
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-13tools/env: Add environment variable flags supportJoe Hershberger
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-13env: Add environment variable flagsJoe Hershberger
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-13env: Add a silent env handlerJoe Hershberger
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-13env: Add a console env handlerJoe Hershberger
Remove the hard-coded console handler and use a callback instead Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
2012-12-13env: Add a loadaddr env handlerJoe Hershberger
Remove the hard-coded loadaddr handler and use a callback instead Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
2012-12-13env: Add a baudrate env handlerJoe Hershberger
Remove the hard-coded baudrate handler and use a callback instead Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
2012-12-13env: Add a bootfile env handlerJoe Hershberger
Remove the hard-coded bootfile handler and use a callback instead Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
2012-12-13env: Add support for callbacks to environment varsJoe Hershberger
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-13env: Hide '.' variables in env print by defaultJoe Hershberger
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-13env: Use getenv_yesno() more generallyJoe Hershberger
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-13env: Refactor apply into change_okJoe Hershberger
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-13env: Refactor do_apply to a flagJoe Hershberger
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-13Make linux kernel string funcs available to toolsJoe Hershberger
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-13gpt: Enable support for GPT partition table restoration at Samsung's TratsLukasz Majewski
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-13gpt: Support for GPT (GUID Partition Table) restorationLukasz Majewski
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-13gpt: The leXX_to_int() calls replaced with ones defined at <compiler.h>Chang Hyun Park
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-13part:efi: Move part_efi.h file to ./includeLukasz Majewski
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-13vsprintf:fix: Change type returned by ustrtoulLukasz Majewski
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-13mx25pdk: Allow booting a device tree kernelFabio Estevam
Select CONFIG_OF_LIBFDT so that a device tree kernel can be launched. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
2012-12-11exynos: Enable hashing functions and EDID for smdk5250Simon Glass
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-11Add console command to access io space registersVadim Bendebury
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-11edid: Library of EDID decode and printTom Wai-Hong Tam
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-11Add hash command to perform hashing using various algorithmsSimon Glass
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-11Add generic hash APISimon Glass
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-11Add strcasecmp() and strncasecmp()Simon Glass
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-11sha256: Use const where possible and add watchdog functionSimon Glass
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-11sha1: Use const where possible, and unsigned for input lenSimon Glass
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>