summaryrefslogtreecommitdiffstats
path: root/common/misc.c
Commit message (Collapse)AuthorAgeFilesLines
* treewide: Add missing includesSascha Hauer2013-11-081-0/+1
| | | | | | | | A lot of files rely on include/driver.h including include/of.h (and this including include/errno.h. include the files explicitly so we can eventually get rid of including of.h from driver.h Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* export model as globalvarSascha Hauer2013-08-161-2/+9
| | | | | | | The model string is valuable information. Make it available to scripts with a globalvar. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Set model and hostname at boardlevelSascha Hauer2013-08-161-4/+1
| | | | | | | | | | | | With multiboard support the compiletime generated BOARDINFO string gets more and more meaningless. This removes it from Kconfig and replaces it with a variable that can be set at boardlevel. Also many boards have a standard setting for the hostname in the environment. This patch also moves the standard to C code by calling barebox_set_hostname(). Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Make hostname available to C CodeSascha Hauer2013-08-161-0/+34
| | | | | | | The boards often have a sane default for the hostname. Provide a C function for setting/getting it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* introduce barebox_set_modelSascha Hauer2013-08-161-8/+15
| | | | | | | | Instead of calling of_get_model() in barebox_get_model() add a barebox_set_model() and use it to set the boardinfo once it's available from the devicetree. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* remove remaining references of CONFIG_BOARDINFOSascha Hauer2013-08-161-10/+10
| | | | | | | | | | | With this all code uses barebox_get_model() and no longer a compile time generated string. Also this renames barebox_boardinfo() to barebox_get_model() since we are going to add the corresponding _set_ function and 'model' corresponds to the devicetree notion. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* add function to get boardinfo stringSascha Hauer2013-06-241-0/+17
| | | | | | | | When using devicetrees the boardinfo (or model) can be obtained from the devicetree. Add a function to get the boardinfo so that we have a chance to add information from the devicetree. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Treewide: remove address of the Free Software FoundationSascha Hauer2012-09-171-3/+0
| | | | | | | The FSF address has changed in the past. Instead of updating it each time the address changes, just drop it completely treewide. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Make errno a positive valueSascha Hauer2012-05-141-1/+1
| | | | | | | | | Normally errno contains a positive error value. A certain unnamed developer mixed this up while implementing U-Boot-v2. Also, normally errno is never set to zero by any library function. This patch fixes this. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: Allow to compile in thumb-2 modeSascha Hauer2012-03-061-0/+3
| | | | | | | | | This shrinks the resulting binary size by ~25%. Exceptions are still handled in arm mode, so we have to explicitely put .arm directives into the exception code. Thumb-2 mode has been tested on i.MX51 Babbage board. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* add string for -ETIMEDOUTSascha Hauer2012-02-191-1/+1
| | | | | | | -ETIMEDOUT is a common error value, so print the string rather than just the number. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* errno: add strings for network related error messagesSascha Hauer2010-06-171-3/+4
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Combine memory initialization with the main memory functions.Juergen Beisert2009-12-101-49/+0
| | | | | | | | | Memory allocation is very simple in u-boot-v2. So, it makes also sense to add the "operating system" emulation layer into the main memory management source file, to keep them at one place and simple. Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
* add strerror functionSascha Hauer2009-05-251-4/+11
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fix errno_str without text error messagesSascha Hauer2009-04-061-0/+2
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Print error numberSascha Hauer2008-11-101-6/+5
| | | | | | | When we do not have the appropriate error string compiled in, print at least the number Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* [general] Fixed crash in memory allocatorCarsten Schlote2008-02-201-1/+3
| | | | | | | | | | | | Fixed a bug in sbrk(). When the new mem_brk value returned by sbrk_no_zero() returns NULL to indicate 'out of memory', sbrk() still memset()s innocent memory at address NULL. For some architectures this memory might be empty, so this never causes a problem. Anyway on Coldfire I still have my vector table there. Nuking them isn't really a good idea :-) Signed-off-by: Carsten Schlote <c.schlote@konzeptpark.de>
* export symbolsSascha Hauer2007-10-071-0/+1
|
* export functionsSascha Hauer2007-10-041-0/+2
|
* display malloc space on startupSascha Hauer2007-09-261-9/+19
|
* svn_rev_706Sascha Hauer2007-07-051-0/+21
| | | | add file headers
* svn_rev_653Sascha Hauer2007-07-051-3/+3
| | | | restructure tree, add reginfo command
* svn_rev_603Sascha Hauer2007-07-051-5/+3
|
* svn_rev_532Sascha Hauer2007-07-051-4/+12
| | | | | | | | | - Do not zero memory in mem_malloc_init because it takes a long time with big memory. Instead zero it when we actually need the memory. - Add sbrk_no_zero() function to allocate memory without zeroing it. This is usefull for scratch mem devices which occupy large chunks of memory
* svn_rev_457Sascha Hauer2007-07-051-0/+3
|
* svn_rev_441Sascha Hauer2007-07-051-6/+16
| | | | add errno_str()
* svn_rev_370Sascha Hauer2007-07-051-1/+1
| | | | fixups for last commit
* svn_rev_369Sascha Hauer2007-07-051-1/+1
| | | | include asm-generic in errno.h instead of all other files
* svn_rev_332Sascha Hauer2007-07-051-3/+7
| | | | make errno messages optional
* svn_rev_267Sascha Hauer2007-07-051-1/+3
|
* svn_rev_262Sascha Hauer2007-07-051-1/+69
| | | | add errno strings
* svn_rev_181Sascha Hauer2007-07-051-2/+8
| | | | add perror function (which does not do much yet)
* svn_rev_173Sascha Hauer2007-07-051-1/+1
| | | | WIP
* svn_rev_167Sascha Hauer2007-07-051-0/+32
ppc startup cleaunup