summaryrefslogtreecommitdiffstats
path: root/arch/sandbox
Commit message (Collapse)AuthorAgeFilesLines
* asm-generic: partially sync io.h with linux kernelOleksij Rempel2017-09-081-1/+2
| | | | | Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* sandbox: new --stdinout option to enable a bidirectional consoleAleksander Morgado2017-06-061-11/+42
| | | | | | | | | In addition to allowing read-only and write-only consoles with --stdin and --stdout, we now allow bidirectional read/write consoles with FIFO files. This is e.g. to allow doing RATP over the FIFO based consoles. Signed-off-by: Aleksander Morgado <aleksander@aleksander.es> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* sandbox: Fix registering file/fifo consolesSascha Hauer2017-06-011-19/+19
| | | | | | | | barebox_register_console() uses xzalloc which requires the malloc pool to be initialized, so call it during the second option parsing when this is already done. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* sandbox: fix registering multiple consolesAleksander Morgado2017-06-013-7/+6
| | | | | | | | | | | | | | | | | | Consoles need to be registered with the "console" device name so that they are probed by the correct driver. The barebox_register_console() was already forcing this as it was overwriting the name that was being passed as argument, but it was failing to provide a unique id for each new console, so the underlying register_device() would just return an error when wanting to re-register a device with device name "console" and id 0. We remove the unused name parameter from barebox_register_console() as it is really nowhere used, and also specify DEVICE_ID_DYNAMIC as id, so that a new unique device id is given to each newly registered console device. Signed-off-by: Aleksander Morgado <aleksander@aleksander.es> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/ofpart'Sascha Hauer2017-04-071-4/+2
|\
| * treewide: Use of_property_write_string() where appropriateSascha Hauer2017-03-301-4/+2
| | | | | | | | | | | | | | Replace users which use of_set_property() to set a property to a string with of_property_write_string(). Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | sandbox_defconfig: enable squashfs supportAntony Pavlov2017-04-061-0/+1
|/ | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/misc'Sascha Hauer2016-11-144-33/+1
|\
| * sandbox: eliminate sdl_init()Antony Pavlov2016-10-192-7/+1
| | | | | | | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * sandbox: drop unused header filesAntony Pavlov2016-10-122-26/+0
| | | | | | | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | arch: refresh defconfigsSascha Hauer2016-10-121-6/+0
|/ | | | | | | | | | | | | | | | | | | | | | The defconfig files are long untouched and a make xy_defconfig; make savedefconfig usually generates quite a different looking file. Refresh them to make it easier to generate patches against the configs using make xy_defconfig; make menuconfig; make savedefconfig This has been done with the following script. for a in arch/*; do arch=$(basename $a) for c in $a/configs/*; do config=$(basename $c) export ARCH=$arch make $config && make savedefconfig && mv defconfig $c done done Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* sandbox: Makefile: drop unused SUBARCH stuffAntony Pavlov2016-10-041-5/+0
| | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* rework remap_rangeSascha Hauer2015-11-031-13/+1
| | | | | | | | | | | | | | | | | | remap_range is for remapping regions with different cache attributes. It is implemented for ARM and PowerPC only, the other architectures only provide stubs. Currently the new cache attributes are passed in an architecture specific way and the attributes have to be retrieved by calls to mmu_get_pte_cached_flags() and mmu_get_pte_uncached_flags(). Make this simpler by providing architecture independent flags which can be directly passed to remap_range() Also provide a MAP_ARCH_DEFAULT flag and a arch_can_remap() function. The MAP_ARCH_DEFAULT defaults to whatever caching type the architecture has as default. the arch_can_remap() function returns true if the architecture can change the cache attributes, false otherwise. This allows the memtest code to better find out what it has to do. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* restart: replace reset_cpu with registered restart handlersSascha Hauer2015-08-274-3/+22
| | | | | | | | | | | | | | | | | | | | | | 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>
* Merge branch 'for-next/misc'Sascha Hauer2015-08-061-0/+63
|\
| * sandbox: Update defconfigSascha Hauer2015-07-201-0/+63
| | | | | | | | | | | | | | The sandbox defconfig hasn't been updated for a long time. This enables tons of features since the binary size is not relevant at all for sandbox. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | exitcall: Add exitcall infrastructureHerve Codina2015-07-131-0/+5
|/ | | | | | | | exitcall infrastructure is based on initcall infrastructure. It allows to have and use exit call hooks on barebox shutdown. Signed-off-by: Herve Codina <Herve.CODINA@celad.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* sandbox: asm/byteorder.h: fix guard macro nameAntony Pavlov2015-07-021-3/+3
| | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* sandbox: use generic posix_types.hSascha Hauer2015-06-031-93/+1
| | | | | | | Use generic asm-generic/posix_types.h instead of repeating the typedefs. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* introduce bitsperlong.h for remaining architecturesSascha Hauer2015-06-032-1/+11
| | | | | | | | This introduces the bitsperlong.h file for the remaining architectures. It's purpose is to define BITS_PER_LONG which in the next step can be used by a generic posix_types.h file. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* dma: Use generic place for dma_addr_t typedefSascha Hauer2015-05-221-4/+0
| | | | | | | | | Instead of letting all architectures define their own dma_addr_t use a common place in include/linux/types.h and use a Kconfig symbol that architectures can select to define the width of dma_addr_t. The same is done in the Kernel. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* sandbox: hostfile: completely switch to OF based probingMarc Kleine-Budde2015-03-063-34/+70
| | | | | 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: use the memory resource to determine the size not the ↵Marc Kleine-Budde2015-03-061-1/+7
| | | | | | | platform_data Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* sandbox: hostfile: probe driver earlierMarc Kleine-Budde2015-03-061-1/+1
| | | | | | | | This patch convert from device_platform_driver to coredevice_platform_driver, so that the driver is initialzied before the state framework is probed. Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* sandbox: hostfile: move fd from platform data to privMarc Kleine-Budde2015-03-061-5/+7
| | | | | Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* sandbox: hostfile: remove struct hf_platform_data from hf_privMarc Kleine-Budde2015-03-061-3/+0
| | | | | Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* sandbox: hostfile: probe(): add missing pointer from cdev.dev to devMarc Kleine-Budde2015-03-061-0/+1
| | | | | | | | Without this pointer the cdev will not be associated with the dev, of_find_path() relies on this. 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-063-10/+10
| | | | | | | | 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: activate OF support in defconfigMarc Kleine-Budde2015-03-061-12/+23
| | | | | Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* sandbox: add sample dtsMarc Kleine-Budde2015-03-065-0/+34
| | | | | 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-065-1/+117
| | | | | 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-212-1/+3
| | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* kbuild: add KBUILD_DEFCONFIGMasahiro Yamada2015-01-141-0/+1
| | | | | | | | | | This allows "make ARCH=... defconfig". Fox example, you can type "make defconfig" instead of "make sandbox_defconfig". Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* kbuild: move asm-offsets.h rule to ./KbuildMasahiro Yamada2015-01-081-0/+12
| | | | | | | | | | | | | | | Currently, MIPS is the only architecture that needs include/generated/asm-offsets.h, but we have got ./Kbuild file now. It is a good reason to move asm-offsets.h rule from arch/mips/Makefile to ./Kbuild and add dummy asm-offsets.c for the other architectures. asm-offsets.h would be useful for all the architectures. This commit does not implement include/generated/bounds.h, but if necessary, it is easy to implement it. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* treewide: Reuse init_clock() return value for clocksource driversAlexander Shiyan2014-11-101-3/+1
| | | | | Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* sandbox: avoid symbol conflict for fstatJan Luebbe2014-11-071-1/+1
| | | | | | | | | Recently, a fstat function was added to barebox. Redefine it as usual to avoid problems for the sandbox. This fixes loading files into the sandbox. Signed-off-by: Jan Luebbe <jlu@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* consistently use the same bitops.h fileSascha Hauer2014-07-171-6/+19
| | | | | | | | | | | | | | | | We have many variants of the same bitops.h file. Consistently use the same file for all architectures which completely use the generic bitops versions. Some architectures had static inline versions of functions identically to the generic versions, these are removed and the generic versions are used directly now. Also several architectures depend on the generic find_*_bit functions but didn't have the GENERIC_FIND_NEXT_BIT Kconfig option selected. This is added where needed. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/misc'Sascha Hauer2014-07-041-0/+7
|\ | | | | | | | | | | | | | | Conflicts: arch/arm/boards/chumby_falconwing/falconwing.c arch/arm/boards/imx233-olinuxino/imx23-olinuxino.c arch/x86/mach-x86.dox scripts/setupmbr/setupmbr.c
| * sandbox: add bit manipulation stuffHolger Schurig2014-06-261-0/+7
| | | | | | | | | | | | | | | | The functions are already in the sandbox, just the #defines are missing. Signed-off-by: Holger Schurig <holgerschurig@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>
* commands: NET_DHCP -> CMD_DHCPHolger Schurig2014-05-141-1/+1
| | | | | | | | | | | * this compile option actually turns on a command, so name it accordingly * also move the Kconfig definition into commands/Kconfig, thus placing getopt into the "Network commands" section * while at it, improve Kconfig documention Signed-off-by: Holger Schurig <holgerschurig@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* commands: NET_PING -> CMD_PINGHolger Schurig2014-05-141-1/+1
| | | | | | | | | | | * this compile option actually turns on a command, so name it accordingly * also move the Kconfig definition into commands/Kconfig, thus placing getopt into the "Network commands" section * while at it, improve Kconfig documention Signed-off-by: Holger Schurig <holgerschurig@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* common: Allow for I/O mapped I/OMichel Stam2014-04-081-0/+1
| | | | | | | | Rework the current framework so that I/O mapped I/O resources are also possible. Signed-off-by: Michel Stam <michel@reverze.net> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* sandbox: update to new environmentMichael Grzeschik2014-02-033-15/+11
| | | | | Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* sandbox: update defconfig to use new environmentMichael Grzeschik2014-02-031-4/+5
| | | | | Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* console: drop f_caps and check the function pointer getc/putc insteadJean-Christophe PLAGNIOL-VILLARD2013-09-212-6/+0
| | | | | | | | | | None of the driver make the difference between STDOUT and STDERR. So we just need to check if putc or getc are filled in the console_device save 32 bytes on versatilepb Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>