summaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* sha1/sha256: use be32_to_cpu and cpu_to_be32Jean-Christophe PLAGNIOL-VILLARD2010-09-222-33/+6
| | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* sha1: use unit32_t and uint8_tJean-Christophe PLAGNIOL-VILLARD2010-09-221-26/+26
| | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* driver: use id as -1 for auto assigned idJean-Christophe PLAGNIOL-VILLARD2010-09-201-1/+1
| | | | | | | | before if you specify id = 0 the next available id will be taken otherwise fail if already registered now as in linux we use -1 Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* add sha256 supportJean-Christophe PLAGNIOL-VILLARD2010-09-203-0/+323
| | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* add sha1 supportJean-Christophe PLAGNIOL-VILLARD2010-09-203-0/+400
| | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* add md5 supportJean-Christophe PLAGNIOL-VILLARD2010-09-203-0/+321
| | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* add digest frameworkJean-Christophe PLAGNIOL-VILLARD2010-09-201-0/+7
| | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* device: fix dev_nameJean-Christophe PLAGNIOL-VILLARD2010-09-201-8/+6
| | | | | | | | | | | | dev_name is supposed to return the name of the device plus the id currently we use %s%d format where in the kernel the use %s.%d we may think to switch to this format for the device name and keeping the %s%d for the devfs this will be usefull to not modify the clock device name as example Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* driver: allow register device with specific idJean-Christophe PLAGNIOL-VILLARD2010-09-171-4/+22
| | | | | | | | | if you specify id = 0 the next available id will be taken otherwise fail if already registered before if you specify one it will have use the next free id anyway Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* vsprintf: fix wrong EXPORT_SYMBOLSascha Hauer2010-09-161-1/+1
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* arm: add common clkdevJean-Christophe PLAGNIOL-VILLARD2010-08-061-0/+25
| | | | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Cc: Andrea GALLO <andrea.gallo@stericsson.com> Cc: Gael SALLES <gael.salles@stericsson.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* string: add strlcpy supportJean-Christophe PLAGNIOL-VILLARD2010-08-061-0/+26
| | | | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Cc: Andrea GALLO <andrea.gallo@stericsson.com> Cc: Gael SALLES <gael.salles@stericsson.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* add rbtree support (needed for ubi)Sascha Hauer2010-07-052-0/+390
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* crc32: activate crc32_no_comp (needed for jffs2 and UBI)Sascha Hauer2010-07-051-5/+6
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* add progression bar functionSascha Hauer2010-06-282-0/+63
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* include support for a simple pseudo number generatorSascha Hauer2010-06-222-0/+27
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* rework device parametersSascha Hauer2010-06-172-79/+128
| | | | | | | | Change device parameters so that the memory management is in generic code. This also removes the need of storing statically initialized parameters as they are stored in a struct list_head for each device. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* make panic and hang __noreturn functionsSascha Hauer2010-03-301-1/+1
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* add process_escape_sequence functionSascha Hauer2010-03-303-0/+82
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* add snprintf functionSascha Hauer2010-03-301-0/+12
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* add unlzo supportSascha Hauer2010-03-309-0/+731
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* remove typedef cmd_tbl_t and replace it with struct commandSascha Hauer2010-02-011-1/+1
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Remove obsolete comment referring to CFG_CMD_JFFS2.Robert P. J. Day2009-12-211-1/+1
| | | | | Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* vsprintf: Only define PAGE_SIZE if not already definedSascha Hauer2009-12-181-0/+2
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Remove unnecessary casts in key definesSascha Hauer2009-12-182-4/+4
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* read_key: Use ARRAY_SIZE instead of hardcoded valueSascha Hauer2009-12-181-1/+1
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* rename U-Boot-v2 project to bareboxSascha Hauer2009-12-157-16/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | This has been done with the following script: find -path ./.git -prune -o -type f -print0 | xargs -0 -r sed -i \ -e 's/u2boot/barebox/g' \ -e 's/U2Boot/barebox/g' \ -e 's/U-boot V2/barebox/g' \ -e 's/u-boot v2/barebox/g' \ -e 's/U-Boot V2/barebox/g' \ -e 's/U-Boot-v2/barebox/g' \ -e 's/U_BOOT/BAREBOX/g' \ -e 's/UBOOT/BAREBOX/g' \ -e 's/uboot/barebox/g' \ -e 's/u-boot/barebox/g' \ -e 's/u_boot/barebox/g' \ -e 's/U-Boot/barebox/g' \ -e 's/U-boot/barebox/g' \ -e 's/U-BOOT/barebox/g' find -path ./.git -prune -o \( -name "*u-boot*" -o -name "*uboot*" -o -name "*u_boot*" \) -print0 | \ xargs -0 -r rename 's/u[-_]?boot/barebox/' It needs some manual fixup following in the next patch Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Fix some exported namesJuergen Beisert2009-12-111-2/+2
| | | | | | | Unsure if this is the/a correct fix, but without it, my build fails. Signed-off-by: Juergen Beisert <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* list: remove duplicated list.hSascha Hauer2009-11-032-2/+2
| | | | | | | | We accidently have two list implementations in the tree: include/list.h and include/linux/list.h. This patch moves the latter (newer one) to include/linux/list.h. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* commands: remove maxargsSascha Hauer2009-10-191-1/+0
| | | | | | | No need to check for maximum argument counts. The commands are safe to be called with more arguments, so lets safe some bytes. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* stringlist: Fix printing on smaller consolesSascha Hauer2009-10-151-3/+4
| | | | | | | Do not add additional space between strings, we already did this by adding 4 to the string length. Signed-off-by: Sascha Hauer <sha@pengutronix.de>
* readline: Allow only ascii and printable charactersSascha Hauer2009-09-291-2/+4
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* add xstrdup functionSascha Hauer2009-09-251-0/+10
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* make copy_file() globally availableSascha Hauer2009-09-252-1/+59
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Move the parameter's documentation where it belongs toJuergen Beisert2009-07-311-0/+67
| | | | Signed-off-by: Juergen Beisert <j.beisert@pengutronix.de>
* get rid of device idsSascha Hauer2009-07-211-54/+27
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Get rid of DEVICE_TYPE_FS usageSascha Hauer2009-07-211-4/+0
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* introduce cdevSascha Hauer2009-07-211-71/+23
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* vsprintf: Update to latest kernel versionSascha Hauer2009-06-101-156/+366
| | | | | | This adds a function to print into a malloced string Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Add notifier frameworkSascha Hauer2009-05-132-0/+61
| | | | | | | This is loosely based on the Linux notifier framework, but stripped down to the bare minimum. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* use bus remove functionSascha Hauer2009-04-071-1/+1
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* driver: do not match for devices which already have a driverSascha Hauer2009-04-071-0/+3
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fix compiler warningSascha Hauer2009-04-071-2/+2
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* we need different bus typesSascha Hauer2009-04-073-7/+79
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* driver.c: set errnoSascha Hauer2009-04-061-0/+1
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Shutdown U-Boot before starting an OSSascha Hauer2009-03-191-0/+14
| | | | | | | | Some devices, especially the ones doing DMA should be disabled before giving control to an OS. We take the simple approach here: Just shutdown the devices in the reverse order they were activated. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Introduce dev_* and pr_* functionsSascha Hauer2008-10-311-0/+12
| | | | | | | | Proven to be useful in linux kernel, U-Boot should have such a thing aswell. We do not distinguish between the various print levels others than debug and not debug. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* string: add typechecking for strchr, strrchr, strstrSascha Hauer2008-08-201-4/+4
| | | | | | | These functions offered an excellent possibility to bypass compiler type checking. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Fix string_to_ipSascha Hauer2008-08-201-1/+6
| | | | | | | | Use a pointer to an ip address instead of the return value in string_to_ip and use the return value for error indication only. 0.0.0.0 can be a valid ip address Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* parameter: set errno in dev_set_paramSascha Hauer2008-08-201-2/+4
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>