- Dec 13, 2012
-
-
Joe Hershberger authored
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>
-
Łukasz Majewski authored
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>
-
- Dec 11, 2012
-
-
Simon Glass authored
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>
-
Simon Glass authored
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>
-
Simon Glass authored
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>
-
- Dec 06, 2012
-
-
Gabe Black authored
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>
-
Stefan Reinauer authored
Updated code taken from latest lzma sdk release 9.20 at http://downloads.sourceforge.net/sevenzip/lzma920.tar.bz2 This generates quite a lot of checkpatch warnings, but I guess we need to keep the code style as is to avoid a massive job each time we update this. Signed-off-by:
Stefan Reinauer <reinauer@google.com> Signed-off-by:
Simon Glass <sjg@chromium.org>
-
- Nov 13, 2012
-
-
Simon Glass authored
This function is not needed, since fdt_path_offset() performs the same service. Remove it. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Sean Paul authored
Add get and set gpio functions to fdtdec that take into account the polarity field in fdtdec_gpio_state.flags. Signed-off-by:
Sean Paul <seanpaul@chromium.org> Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Che-Liang Chiou authored
It decodes a 64-bit value from a property that is at least 8 bytes long. Signed-off-by:
Che-Liang Chiou <clchiou@chromium.org> Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Gabe Black authored
Signed-off-by:
Vincent Palatin <vpalatin@chromium.org> Commit-Ready: Vincent Palatin <vpalatin@chromium.org> Commit-Ready: Gabe Black <gabeblack@chromium.org> Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Gerald Van Baren authored
The name of this function is not consistent, so fix it, and export the function for external use. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Abhilash Kesavan authored
Samsung's SDHCI bindings require multiple gpios to be parsed and configured at a time. Export the already available fdtdec_decode_gpios for this purpose. Signed-off-by:
Abhilash Kesavan <a.kesavan@samsung.com> Commit-Ready: Che-Liang Chiou <clchiou@chromium.org> Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
A memory region has a start and a size and is often specified in a node by a 'reg' property. Add a function to decode this information from the fdt. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
Add a function to look up a configuration string such as board name and returns its value. We look in the "/config" node for this. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Abhilash Kesavan authored
Add a function to look up a configuration item such as machine id and return its value. Note: The code has been taken as is from the Chromium u-boot development tree and needs Simon Glass' sign-off. Signed-off-by:
Abhilash Kesavan <a.kesavan@samsung.com> Signed-off-by:
Simon Glass <sjg@chromium.org>
-
- Nov 04, 2012
-
-
Kim Phillips authored
vsprintf.c:31:12: warning: symbol 'hex_asc' was not declared. Should it be static? vsprintf.c:398:18: warning: Using plain integer as NULL pointer Signed-off-by:
Kim Phillips <kim.phillips@freescale.com>
-
Kim Phillips authored
define Z_NULL to (void *)0 include/u-boot/zlib.h to get rid of most of the NULL pointer warnings. inflate.c:942:1: warning: non-ANSI definition of function 'inflateEnd' inflate.c:9:1: warning: non-ANSI definition of function 'inflateReset' inflate.c:12:17: warning: Using plain integer as NULL pointer inflate.c:12:42: warning: Using plain integer as NULL pointer inflate.c:15:17: warning: Using plain integer as NULL pointer inflate.c:21:19: warning: Using plain integer as NULL pointer inflate.c:35:1: warning: non-ANSI definition of function 'inflateInit2_' inflate.c:38:20: warning: Using plain integer as NULL pointer inflate.c:41:17: warning: Using plain integer as NULL pointer inflate.c:42:17: warning: Using plain integer as NULL pointer inflate.c:50:18: warning: Using plain integer as NULL pointer inflate.c:65:23: warning: Using plain integer as NULL pointer inflate.c:69:21: warning: Using plain integer as NULL pointer inflate.c:78:1: warning: non-ANSI definition of function 'inflateInit_' inflate.c:86:1: warning: non-ANSI definition of function 'fixedtables' inflate.c:108:26: warning: Using plain integer as NULL pointer inflate.c:109:1: warning: non-ANSI definition of function 'updatewindow' inflate.c:112:30: warning: Using plain integer as NULL pointer inflate.c:339:1: warning: non-ANSI definition of function 'inflate' inflate.c:349:17: warning: Using plain integer as NULL pointer inflate.c:349:42: warning: Using plain integer as NULL pointer inflate.c:350:27: warning: Using plain integer as NULL pointer inflate.c:369:42: warning: Using plain integer as NULL pointer inflate.c:376:32: warning: Using plain integer as NULL pointer inflate.c:401:54: warning: Using plain integer as NULL pointer inflate.c:419:32: warning: Using plain integer as NULL pointer inflate.c:426:32: warning: Using plain integer as NULL pointer inflate.c:433:32: warning: Using plain integer as NULL pointer inflate.c:444:36: warning: Using plain integer as NULL pointer inflate.c:449:37: warning: Using plain integer as NULL pointer inflate.c:450:38: warning: Using plain integer as NULL pointer inflate.c:457:40: warning: Using plain integer as NULL pointer inflate.c:458:47: warning: Using plain integer as NULL pointer inflate.c:480:40: warning: Using plain integer as NULL pointer inflate.c:481:50: warning: Using plain integer as NULL pointer inflate.c:491:37: warning: Using plain integer as NULL pointer inflate.c:492:37: warning: Using plain integer as NULL pointer inflate.c:501:40: warning: Using plain integer as NULL pointer inflate.c:502:53: warning: Using plain integer as NULL pointer inflate.c:512:37: warning: Using plain integer as NULL pointer inflate.c:513:40: warning: Using plain integer as NULL pointer inflate.c:525:32: warning: Using plain integer as NULL pointer inflate.c:529:52: warning: Using plain integer as NULL pointer inflate.c:543:54: warning: Using plain integer as NULL pointer inflate.c:932:17: warning: Using plain integer as NULL pointer inflate.c:932:42: warning: Using plain integer as NULL pointer inflate.c:935:26: warning: Using plain integer as NULL pointer inflate.c:940:19: warning: Using plain integer as NULL pointer adler32.c:58:5: warning: non-ANSI definition of function 'adler32' adler32.c:81:16: warning: Using plain integer as NULL pointer zutil.c:53:9: warning: non-ANSI definition of function 'zcalloc' zutil.c:64:9: warning: non-ANSI definition of function 'zcfree' inffast.c:70:1: warning: non-ANSI definition of function 'inflate_fast' inftrees.c:33:1: warning: non-ANSI definition of function 'inflate_table' Signed-off-by:
Kim Phillips <kim.phillips@freescale.com>
-
- Nov 02, 2012
-
-
Wolfgang Denk authored
The %p format of printf() would print a pointer to address null as "(null)". This makes sense in a real OS where a NULL pointer must never be dereferenced, but this is a bootloader, and there are cases where accessing the data at address null makes perfect sense. Remove the special case in lib/vsprintf.c using "#if 0" with a comment to make clear this was an intentional change and to stop re-adding this code. Signed-off-by:
Wolfgang Denk <wd@denx.de> Acked-by:
Joe Hershberger <joe.hershberger@ni.com>
-
- Oct 16, 2012
-
-
Gerald Van Baren authored
The libfdt read/write functions are now usable enough that it's become a moderately common pattern to use them to build and manipulate a device tree from scratch. For example, we do so ourself in our rw_tree1 testcase, and qemu is starting to use this model when building device trees for some targets such as e500. However, the read/write functions require some sort of valid tree to begin with, so this necessitates either having a trivial canned dtb to begin with or, more commonly, creating an empty tree using the serial-write functions first. This patch adds a helper function which uses the serial-write functions to create a trivial, empty but complete and valid tree in a supplied buffer, ready for manipulation with the read/write functions. Signed-off-by:
David Gibson <david@gibson.dropbear.id.au> From git://git.jdl.com/software/dtc.git patch hash be6026838 with adaptations to include/libfdt.h and lib/libfdt/Makefile for the U-Boot environment. Signed-off-by:
Gerald Van Baren <vanbaren@cideas.com>
-
- Oct 15, 2012
-
-
Minghuan Lian authored
Some properties may contain multiple values, these values may need to be added to the property respectively. this patch provides this functionality. The main purpose of fdt_append_prop() is to append the values to a existing property, or create a new property if it dose not exist. Signed-off-by:
Minghuan Lian <Minghuan.Lian@freescale.com> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
Daniel Schwierzeck authored
This fixes warnings when compiling with ELDK-5.2.1 for MIPS64: vsprintf.c: In function 'put_dec': vsprintf.c:258:9: warning: comparison of distinct pointer types lacks a cast [enabled by default] vsprintf.c:258:3: warning: passing argument 1 of '__div64_32' from incompatible pointer type [enabled by default] include/div64.h:22:17: note: expected 'uint64_t *' but argument is of type 'long long unsigned int *' Signed-off-by:
Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
-
Daniel Schwierzeck authored
Signed-off-by:
Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
-
Albert ARIBAUD authored
Under option -munaligned-access, gcc can perform local char or 16-bit array initializations using misaligned native accesses which will throw a data abort exception. Fix files where these array initializations were unneeded, and for files known to contain such initializations, enforce gcc option -mno-unaligned-access. Signed-off-by:
Albert ARIBAUD <albert.u.boot@aribaud.net> [trini: Switch to usign call cc-option for -mno-unaligned-access as Albert had done previously as that's really correct] Signed-off-by:
Tom Rini <trini@ti.com>
-
- Oct 01, 2012
-
-
Ilya Yanok authored
This patch adds support for networking in SPL. Some devices are capable of loading SPL via network so it makes sense to load the main U-Boot binary via network too. This patch tries to use existing network code as much as possible. Unfortunately, it depends on environment which in turn depends on other code so SPL size is increased significantly. No effort was done to decouple network code and environment so far. Signed-off-by:
Ilya Yanok <ilya.yanok@cogentembedded.com> Acked-by:
Joe Hershberger <joe.hershberger@ni.com> Signed-off-by:
Tom Rini <trini@ti.com>
-
- Sep 29, 2012
-
-
Lei Wen authored
Signed-off-by:
Lei Wen <leiwen@marvell.com>
-
Lei Wen authored
We often need the requirement that compressing those memory range start from 0, but the default deflate code in zlib prevent us to do this. Considering the special case of uboot, that it could access all memory range, it is reasonable to be able to also take the address space from 0 into compression. Signed-off-by:
Lei Wen <leiwen@marvell.com>
-
Lei Wen authored
Add a new config CONFIG_GZIP_ENABLED, if enabled, the uboot bin would include zlib's deflate method which could be used for compressing. Signed-off-by:
Lei Wen <leiwen@marvell.com>
-
Lei Wen authored
Signed-off-by:
Lei Wen <leiwen@marvell.com>
-
Lei Wen authored
Signed-off-by:
Lei Wen <leiwen@marvell.com>
-
- Sep 21, 2012
-
-
Simon Glass authored
The new debugging shows the value of integers and addresses read from the device tree and tidy up GPIO output. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
- Sep 18, 2012
-
-
Gerlando Falauto authored
When variables explicitly specified on the command line are not present in the imported env, delete them from the running env. If the variable is also missing from the running env, issue a warning. Signed-off-by:
Gerlando Falauto <gerlando.falauto@keymile.com> Reviewed-by:
Marek Vasut <marex@denx.de>
-
Gerlando Falauto authored
Signed-off-by:
Gerlando Falauto <gerlando.falauto@keymile.com> Reviewed-by:
Marek Vasut <marex@denx.de>
-
Gerlando Falauto authored
Change hashtable so that a callback function will decide whether a variable can be overwritten, and possibly apply the changes. So add a new field to struct hsearch_data: o "apply" callback function to check whether a variable can be overwritten, and possibly immediately apply the changes; when NULL, no check is performed. And a new argument to himport_r(): o "do_apply": whether to call the apply callback function NOTE: This patch does not change the current behavior. Signed-off-by:
Gerlando Falauto <gerlando.falauto@keymile.com> Reviewed-by:
Marek Vasut <marex@denx.de>
-
Gerlando Falauto authored
Add 2 new arguments to himport_r(): o "nvars", "vars": number and list of variables to take into account (0 means ALL) NOTE: This patch does not change the current behaviour. Signed-off-by:
Gerlando Falauto <gerlando.falauto@keymile.com> Reviewed-by:
Marek Vasut <marex@denx.de>
-
- Sep 07, 2012
-
-
Jim Lin authored
A device tree is used to configure the NAND, including memory timings and block/pages sizes. If this node is not present or is disabled, then NAND will not be initialized. Signed-off-by:
Jim Lin <jilin@nvidia.com> Signed-off-by:
Simon Glass <sjg@chromium.org> Signed-off-by:
Tom Warren <twarren@nvidia.com>
-
- Aug 10, 2012
-
-
Michal Simek authored
Include arch specific gpio.h instead of asm-generic/gpio.h because several architectures (Microblaze, Blackfin, Nios2, OpenRISC) define gpio functions in header file. asm-generic/gpio.h can be included in arch specific gpio.h (For example: ARM) Signed-off-by:
Michal Simek <monstr@monstr.eu> CC: Simon Glass <sjg@chromium.org> Acked-by:
Mike Frysinger <vapier@gentoo.org> Acked-by:
Simon Glass <sjg@chromium.org>
-
- Jul 07, 2012
-
-
Stefan Roese authored
This is needed for the SPEAr SPL support, as SPEAr uses the mkimage header to wrap and validate the images (SPL & U-Boot). Signed-off-by:
Stefan Roese <sr@denx.de>
-
Michael Walle authored
Replace rand() with the functions from lib/. The link-local network code stores its own seed, derived from the MAC address. Thus making it independent from calls to srand() in other modules. Signed-off-by:
Michael Walle <michael@walle.cc> Acked-by:
Joe Hershberger <joe.hershberger@ni.com>
-
Michael Walle authored
It's a PRNG using the simple and fast xorshift method. Signed-off-by:
Michael Walle <michael@walle.cc> Cc: Wolfgang Denk <wd@denx.de>
-