summaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* param: Add helpers to provide an enum parameterSascha Hauer2013-05-231-0/+104
| | | | | | | | We recently gained helper functions for different types of device parameters. One thing missing was a helper for an enum type parameter. This patch adds this. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/param'Sascha Hauer2013-05-061-39/+263
|\ | | | | | | | | Conflicts: drivers/mci/mci-core.c
| * param: pass param to dev_remove_paramSascha Hauer2013-04-111-11/+6
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * param: remove now unused dev_[gs]et_param_ipSascha Hauer2013-04-111-17/+0
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * param: Add ip address convenience functionSascha Hauer2013-04-111-8/+87
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * param: Add integer and boolean parameter helpersSascha Hauer2013-04-111-0/+161
| | | | | | | | | | | | | | | | | | | | This adds convenience functions for directly registering integers and bools as device parameter. This way driver no longer have to fiddle with string handling. The format used to print the parameter is passed to the functions to be able to print parameters in a flexible way. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * param: refactor __dev_add_paramSascha Hauer2013-04-071-13/+18
| | | | | | | | | | | | | | | | Let __dev_add_param take a previously allocated struct param_d. This helps when later other users wish to embed a struct param_d in a bigger struct. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * param: Add dev member to struct param_dSascha Hauer2013-04-061-0/+1
| | | | | | | | | | | | This will make it unnecessary to pass the dev pointer around later. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Use a common define for RW_BUF_SIZESascha Hauer2013-04-171-2/+0
|/ | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* of: remove unused libfdtSascha Hauer2013-03-0611-1835/+0
| | | | | | | Now that we are completely independent of libfdt remove the unused code. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* of: move OFTREE Kconfig option to drivers/of/Sascha Hauer2013-03-061-4/+0
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* libubi: Use global mtd_all_ff functionSascha Hauer2013-03-041-12/+1
| | | | | | We introduced a global function for this, so use it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/mtd'Sascha Hauer2013-03-042-8/+8
|\ | | | | | | | | | | Conflicts: arch/arm/configs/eukrea_cpuimx27_defconfig drivers/mtd/core.c
| * libmtd: rename functions from mtd_* to libmtd_*Sascha Hauer2013-02-142-8/+8
| | | | | | | | | | | | | | | | | | | | The kernel nowadays has mtd_read/write and other functions. In barebox we also have these functions, but with a different prototype, namely they correspond to the libmtd userspace functions. Rename these functions to libmtd_* to avoid name clashes with future mtd updates. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | getopt: change optstring to const char*Alexander Aring2013-02-111-2/+2
|/ | | | | | | | | Change getopt optstring parameter type to const char *. Also change type to const char * of tmp variable which pointed to optstring. This will only handle readonly. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* pbl: fix IMAGE_COMPRESSION_LZO-enabled build on MIPSAntony Pavlov2013-02-051-1/+3
| | | | | | | | | | | | | | | | | | | Here's the error message: LD arch/mips/pbl/zbarebox pbl/built-in-pbl.o: In function `decompress_unlzo': /home/antony/barebox.git.rebased.isp/pbl/decomp.c:35: undefined reference to `free' pbl/built-in-pbl.o: In function `pbl_barebox_uncompress': (.text.pbl_barebox_uncompress+0x6d0): relocation truncated to fit: R_MIPS_26 against `free' pbl/built-in-pbl.o: In function `pbl_barebox_uncompress': (.text.pbl_barebox_uncompress+0x6e0): undefined reference to `free' pbl/built-in-pbl.o: In function `pbl_barebox_uncompress': (.text.pbl_barebox_uncompress+0x6e0): relocation truncated to fit: R_MIPS_26 against `free' make[1]: *** [arch/mips/pbl/zbarebox] Error 1 make: *** [zbarebox.bin] Error 2 Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/compile-log-level'Sascha Hauer2013-02-042-3/+3
|\ | | | | | | | | Conflicts: drivers/usb/host/ehci-hcd.c
| * treewide: fix format specifiersSascha Hauer2013-01-272-3/+3
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/commands'Sascha Hauer2013-02-042-0/+796
|\ \
| * | commands: add let command which supports proper arithmeticJan Luebbe2013-01-092-0/+796
| | | | | | | | | | | | | | | | | | | | | | | | This command works like the corresponding Unix shell command and is used for adding, multiplying and much more. Signed-off-by: Jan Luebbe <jlu@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | introduce common bootstrap codeJean-Christophe PLAGNIOL-VILLARD2013-01-227-0/+198
| |/ |/| | | | | | | | | | | | | | | | | | | This will allow to have a generic code to create different bootstrap As example Barebox as TI Xloader Barebox as AT91 Bootstrap Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | graphic_utils/fb_open: fix fbsizeJean-Christophe PLAGNIOL-VILLARD2013-01-161-1/+1
| | | | | | | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | lib: add barebox version of libmtdWolfram Sang2012-12-193-0/+372
| | | | | | | | | | | | | | | | Based on mtd-utils and stripped down to needed functionality and reworked to barebox interfaces. Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | lib: add libubigenWolfram Sang2012-12-193-0/+316
| | | | | | | | | | | | | | Imported from mtd-utils and stripped down to needed functionality. Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | lib: add libscanWolfram Sang2012-12-193-0/+223
| | | | | | | | | | | | | | | | Imported from mtd-utils and stripped down to needed functionality. Add prefix to functions so we have a clean namespace. Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | lib: update size_human_readable to latest versionWolfram Sang2012-12-191-16/+31
| | | | | | | | | | | | | | | | Copy over the latest version from u-boot which handles bigger sizes now and does arithmetic with shifts instead of divisions. Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | lib: misc: add 'iB' suffixes to strtoull_suffixWolfram Sang2012-12-191-1/+4
|/ | | | | | | Since this is the 'official' notation, we should support it. Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'kconfig'Sascha Hauer2012-12-082-4/+4
|\
| * Cleanup Kconfig filesAlexander Shiyan2012-12-082-4/+4
| | | | | | | | | | | | | | | | | | This patch provides a global cleanup barebox Kconfig files. This includes replacing spaces to tabs, formatting in accordance format, removing extraneous lines and spaces. No functional changes. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/ext4'Sascha Hauer2012-12-072-5/+5
|\ \
| * | filetype: Pass bufsizeSascha Hauer2012-12-032-5/+5
| |/ | | | | | | | | | | | | | | | | | | Pass the buffer size to the file detection code. This makes sure we do not read past the buffer. This is especially useful for ext filesystem detection as the magic is at byte offset 1080. Also introduce a FILE_TYPE_SAFE_BUFSIZE define which is set to the minimum bufsize the detection code needs to detect all known filetypes. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* / rm: implement -rSascha Hauer2012-11-293-1/+57
|/ | | | | | To recursively remove files and directories. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* xymodem.c: fix compiler warningAntony Pavlov2012-11-261-1/+1
| | | | | | | | | | | Fixes: lib/xymodem.c:558: warning: no previous prototype for ‘do_load_serial_xmodem’ lib/xymodem.c:572: warning: no previous prototype for ‘do_load_serial_ymodem’ lib/xymodem.c:586: warning: no previous prototype for ‘do_load_serial_ymodemg’ Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Acked-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* bmp: specify we need to keep the data read from the fileJean-Christophe PLAGNIOL-VILLARD2012-11-211-0/+1
| | | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Tested-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/ymodem'Sascha Hauer2012-11-163-0/+601
|\
| * commands: change Y-Modem implementationRobert Jarzmik2012-11-123-0/+601
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current Y-Modem implementation has some limitations: - Y-Modem/G protocol is not supported - Multiple files (aka. batch) transfers are not supported - Transfer speed over fast lines (USB console) is slow - Code is not trivial to maintain (personnal opinion) This implementation tries to address all these points by introducing loady2 command. The effects are : - transfer speed for Y-Modem over USB jumps from 2kBytes/s to 180kBytes/s - transfer speed for Y-Modem/G jumps to 200kBytes/s - multiple file transfers are possible This command was tested on a USB console and UART 9600bps serial line : - NAKs (and retransmissions) were tested for faulty serial lines - multiple file transfers were tested - Y-Modem, Y-Modem/G and X-Modem transfers were tested Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Tested-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/readline'Sascha Hauer2012-11-161-11/+23
|\ \
| * | readline: fix the 'new blank line at EOF' typoAntony Pavlov2012-10-291-1/+0
| | | | | | | | | | | | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | readline: add ctrl-w handling (cut-the-last-word)Antony Pavlov2012-10-291-0/+10
| | | | | | | | | | | | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | readline: move backspace key handling to the DO_BACKSPACE macroAntony Pavlov2012-10-291-10/+13
| |/ | | | | | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/misc'Sascha Hauer2012-11-162-1/+20
|\ \ | |/ |/| | | | | | | | | Conflicts: commands/Makefile Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * progressbar: use __stringify in format stringAlexander Aring2012-10-301-1/+2
| | | | | | | | | | | | | | Use stringify in format string for HASH_PER_LINE. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * parameter: support removing named parametersJan Luebbe2012-10-121-0/+18
| | | | | | | | | | Signed-off-by: Jan Luebbe <jlu@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | parameter: fix memory leakJan Luebbe2012-10-121-0/+1
|/ | | | | | | | In __dev_add_param, the name string is allocated using strdup. Free it when removing the parameter. Signed-off-by: Jan Luebbe <jlu@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* gui: blit the surface on demandJean-Christophe PLAGNIOL-VILLARD2012-10-043-6/+8
| | | | | | | | Do not blit the surface everytime we write an image As we want to able to render multiple image this will cause 1 blit per image; Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* graphic_utils: introduce common fb_open/closeJean-Christophe PLAGNIOL-VILLARD2012-10-043-9/+56
| | | | | | | To open, memmap, get the fb_info and if needed allocate the offscreen buffer Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* gui: introduce screen and surface to factorize and simplify codeJean-Christophe PLAGNIOL-VILLARD2012-10-043-41/+48
| | | | | | | | | | Instead of passing hundreds of parameter, just pass the right structure. struct screen represent the screen with a without double buffering. struct surface represent the part of the screen we want to render. Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* graphic_utils: pass image so we can draw only the visible part of the imageJean-Christophe PLAGNIOL-VILLARD2012-10-042-4/+5
| | | | | | | This is needed if the image is bigger than the screen. Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* gui: move gui file to include/gui and lib/guiJean-Christophe PLAGNIOL-VILLARD2012-10-0416-50/+56
| | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* image_renderer: fix size typeJean-Christophe PLAGNIOL-VILLARD2012-10-041-1/+1
| | | | | | | | | | /opt/work/barebox/lib/image_renderer.c: In function 'image_renderer_open': /opt/work/barebox/lib/image_renderer.c:37:2: warning: passing argument 2 of 'read_file' from incompatible pointer type [enabled by default] In file included from /opt/work/barebox/lib/image_renderer.c:11:0: /opt/work/barebox/include/fs.h:167:7: note: expected 'size_t *' but argument is of type 'int *' Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>