summaryrefslogtreecommitdiffstats
path: root/arch/sandbox/os/common.c
Commit message (Collapse)AuthorAgeFilesLines
* restart: replace reset_cpu with registered restart handlersSascha Hauer2015-08-271-3/+3
| | | | | | | | | | | | | | | | | | | | | | This replaces the reset_cpu() function which every SoC or board must provide with registered handlers. This makes it possible to have multiple reset functions for boards which have multiple ways to reset the machine. Also boards which have no way at all to reset the machine no longer have to provide a dummy reset_cpu() function. The problem this solves is that some machines have external PMICs or similar to reset the system which have to be preferred over the internal SoC reset, because the PMIC can reset not only the SoC but also the external devices. To pick the right way to reset a machine each handler has a priority. The default priority is 100 and all currently existing restart handlers are registered with this priority. of_get_restart_priority() allows to retrieve the priority from the device tree which makes it possible for boards to give certain restart handlers a higher priority in order to use this one instead of the default one. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* sandbox: hostfile: completely switch to OF based probingMarc Kleine-Budde2015-03-061-1/+1
| | | | | Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* sandbox: hostfile: improve --image parameter to support "dev=file"Marc Kleine-Budde2015-03-061-3/+12
| | | | | | | | | | | | This patch makes it possible to specify the device name of a file added to the sandbox via the --image paramter, e.g.: barebox --image foo=bar.image This means the file "bar.image" is added as "/dev/foo" to the sandbox. Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* sandbox: move device name generation for image/env into add_image()Marc Kleine-Budde2015-03-061-10/+11
| | | | | Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* sandbox: hostfile: is always mmpad'edMarc Kleine-Budde2015-03-061-10/+6
| | | | | | | ...so remove conditional code. Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* sandbox: hostfile: clarify variable namesMarc Kleine-Budde2015-03-061-8/+8
| | | | | | | | Use "filename" for the name of the file in the host system, while "devname" for the device in the sandbox. Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* sandbox: add support to pass dtb to bareboxMarc Kleine-Budde2015-03-061-1/+46
| | | | | Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* sandbox: fix indention in help textMarc Kleine-Budde2015-03-031-1/+1
| | | | | Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* sandbox: get malloc_size from .configAntony Pavlov2015-01-211-1/+1
| | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Documentation: remove doxygen documentationSascha Hauer2014-06-261-55/+0
| | | | | | | The doxygen documentation is long outdated. Remove it. It will be replaced with sphinx based documentation later. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* documentation: add sandbox malloc argumentAlexander Aring2012-10-131-0/+4
| | | | | | | Add malloc argument in doxygen comment. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* sandbox: fix malloc argument stringAlexander Aring2012-10-131-1/+1
| | | | | | | Fix malloc argument string. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* sandbox: move add_image for env in second getoptAlexander Aring2012-10-131-5/+7
| | | | | | | | Function add_image needs a allocated malloc space. This is only available in the second getopt loop. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/sandbox'Sascha Hauer2012-10-031-3/+30
|\ | | | | | | | | Conflicts: arch/sandbox/mach-sandbox/include/mach/linux.h
| * sandbox: add sdl video supportJean-Christophe PLAGNIOL-VILLARD2012-09-251-2/+23
| | | | | | | | | | | | | | | | | | | | | | | | This will allow speed up the dev on framebuffer. By default the resolution is VGA but this can be changed via cmdline. We use a pthread to Flip the screen every 100ms as we can not detect when barebox update it as barebox simpliy write in a buffer. Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * sandbox: add missed case statementAlexander Aring2012-09-111-1/+7
| | | | | | | | | | | | | | | | Add missed case statement to ignore 'i' parameter in first getopt loop. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/remove-fsf-address'Sascha Hauer2012-10-031-3/+0
|\ \ | | | | | | | | | | | | | | | Conflicts: drivers/net/miidev.c include/miidev.h
| * | 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>
* / sandbox: check only image option in the second getoptJean-Christophe PLAGNIOL-VILLARD2012-09-201-11/+1
|/ | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* sandbox: fix malloc argumentAlexander Aring2012-09-031-30/+57
| | | | | | | Fix malloc argument for sandbox system. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* sanbox: add linux_execve and linux_exec commandJean-Christophe PLAGNIOL-VILLARD2011-12-071-0/+22
| | | | | | | this will allow to execute a program of the host from barebox Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fix malloc space sizesSascha Hauer2011-12-031-1/+1
| | | | | | end is start + size - 1, not start + size. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* remove irq support fragmentsSascha Hauer2011-11-281-8/+0
| | | | | | | | We never had interrupt support in barebox and we have no plans to add interrupt support. Even if we do I doubt the current fragments of irq support are helpful, so remove them. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* sandbox: switch to resourceJean-Christophe PLAGNIOL-VILLARD2011-07-301-2/+2
| | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* sandbox: remove non used functions linux_getc/putcJean-Christophe PLAGNIOL-VILLARD2011-02-031-20/+0
| | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* reset_cpu: unify declarationRobert Schwebel2010-10-221-1/+1
| | | | | | | | include/common.h declares this as "unsigned long addr", so we unify it. This also silences a doxygen warning. Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* remove strange flush_cache functionsSascha Hauer2010-10-211-5/+0
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* sandbox: add longopts and fix segfaultRobert Schwebel2010-09-211-14/+32
| | | | | | | | | | | | | | | Until now, the main function of the sandbox port wants to use the libc getopt(), but as we have a getopt() implementation in barebox as well, it is silently used instead. This works in the usual case, but if an error occurs (i.e. by using an unknown argument) in getopt(), the implementation tries to write to the console, which is not initialized and thus breaks with a null pointer exception. This patch changes the main function to use getopt_long() instead of getopt(). This makes us use the implementation in glibc and while being there, we get long options, which makes us look more professional... Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
* make reset_cpu a __noreturn functionSascha Hauer2010-03-301-1/+1
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* sandbox: common: fix device names for environment files (-e)Peter Korsgaard2009-12-161-1/+1
| | | | | | | | The env%d string got created, but the the hardcoded "env" string was always used instead, causing errors with loading the env. Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* rename U-Boot-v2 project to bareboxSascha Hauer2009-12-151-24/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* [SANDBOX] Move include/asm-sandbox/arch-* to arch/sandbox/*/include/machJean-Christophe PLAGNIOL-VILLARD2009-10-221-2/+2
| | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* get rid of device idsSascha Hauer2009-07-211-4/+10
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Sandbox: Fix make systemSascha Hauer2008-09-301-0/+414
Sandbox compilation failed with: gcc -Wp,-MD,arch/sandbox/lib/.tap.o.d -nostdinc -isystem /usr/lib/gcc/x86_64-linux-gnu/4.3.1/include -I/usr/include -Iinclude -P -Wall -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(tap)" -D"KBUILD_MODNAME=KBUILD_STR(tap)" -c -o arch/sandbox/lib/tap.o arch/sandbox/lib/tap.c In file included from /usr/include/bits/socket.h:32, from /usr/include/sys/socket.h:36, from arch/sandbox/lib/tap.c:29: /usr/include/limits.h:125:26: error: limits.h: No such file or directory /usr/include/limits.h uses the next_include directive This was because of the -nostdinc Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>