summaryrefslogtreecommitdiffstats
path: root/examples/api/libgenwrap.c
Commit message (Collapse)AuthorAgeFilesLines
* lib/tiny-printf.c: Add tiny printf function for space limited environmentsStefan Roese2015-11-231-36/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds a small printf() version that supports all basic formats. Its intented to be used in U-Boot SPL versions on platforms with very limited internal RAM sizes. To enable it, just define CONFIG_USE_TINY_PRINTF in your defconfig. This will result in the SPL using this tiny function and the main U-Boot still using the full-blown printf() function. This code was copied from: http://www.sparetimelabs.com/printfrevisited With mostly only coding style related changes so that its checkpatch clean. The size reduction is about 2.5KiB. Here a comparison for the db-mv784mp-gp (Marvell AXP) SPL: Without this patch: 58963 18536 1928 79427 13643 ./spl/u-boot-spl With this patch: 56542 18536 1956 77034 12cea ./spl/u-boot-spl Note: To make it possible to compile tiny-printf.c instead of vsprintf.c when CONFIG_USE_TINY_PRINTF is defined, the functions printf() and vprintf() are moved from common/console.c into vsprintf.c in this patch. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Simon Glass <sjg@chromium.org> Cc: Hans de Goede <hdegoede@redhat.com> Cc: Tom Rini <trini@konsulko.com> Cc: Albert Aribaud <albert.u.boot@aribaud.net>
* Add GPL-2.0+ SPDX-License-Identifier to source filesWolfgang Denk2013-07-241-19/+1
| | | | | | Signed-off-by: Wolfgang Denk <wd@denx.de> [trini: Fixup common/cmd_io.c] Signed-off-by: Tom Rini <trini@ti.com>
* examples: update do_reset prototypeMike Frysinger2011-01-091-1/+2
| | | | | | One more place that was missed during the do_reset() unification. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Make *printf() return "int" instead of "void"Wolfgang Denk2010-07-041-2/+4
| | | | | | | | | | Change the return type of the *printf() functions to the standard "int"; no changes are needed but returning the already available length count. This will save a few additional strlen() calls later... Signed-off-by: Wolfgang Denk <wd@denx.de>
* Rename lib_generic/ to lib/Peter Tyser2010-04-131-1/+1
| | | | | | | | Now that the other architecture-specific lib directories have been moved out of the top-level directory there's not much reason to have the '_generic' suffix on the common lib directory. Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
* Generic udelay() with watchdog supportIngo van Lil2009-12-051-1/+1
| | | | | | | | | | | | | According to the PPC reference implementation the udelay() function is responsible for resetting the watchdog timer as frequently as needed. Most other architectures do not meet that requirement, so long-running operations might result in a watchdog reset. This patch adds a generic udelay() function which takes care of resetting the watchdog before calling an architecture-specific __udelay(). Signed-off-by: Ingo van Lil <inguin@gmx.de>
* Move api_examples to examples/apiPeter Tyser2009-07-211-0/+95
Also add a rule to remove demo.bin which was previously leftover after a "make clean" Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
OpenPOWER on IntegriCloud