summaryrefslogtreecommitdiffstats
path: root/arch/sandbox/board
Commit message (Collapse)AuthorAgeFilesLines
* devfs: Drop dev_lseek_default()Andrey Smirnov2019-01-291-1/+0
| | | | | | | | | | | | | | | | | | | | | Only the following cdevs do not declare an .lseek() operation: - Console devices in common/console.c - Firmware framework in common/firmware.c - JTAG driver in drivers/misc/jtag.c - UBI in drivers/mtd/ubi/barebox.c Of those four, first two are marked DEVFS_IS_CHARACTER_DEV and implement only .write() operation and the last two don't implement anything but .ioctl(). While there's probably no meaningful way to use lseek() against any of those devices, there doesn't seem to be any harm in allowing it either. Change devfs_lseek() to ignore absense of .lseek() callback and drop dev_lseek_default() and all references to it in the codebase. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* drivers: Introduce dev_set_name()Andrey Smirnov2018-10-181-1/+1
| | | | | | | | Introduce dev_set_name() in order to hide implementation details of setting device's name so it'd be easier to change it. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* rename file_operations -> cdev_operationsSascha Hauer2018-04-061-1/+1
| | | | | | | | Linux also has struct file_operations which are something different. Rename our file_operations to cdev_operations which better matches what we have. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ratp: implement generic command supportAleksander Morgado2018-03-011-0/+5
| | | | | | | | | | | | | | | | | | | The RATP implementation now allows executing generic commands with a binary interface: binary requests are received and binary responses are returned. Each command can define its own RATP request contents (e.g. to specify command-specific options) as well as its own RATP response contents (if any data is to be returned). Each command is associated with a pair of numeric unique request and response IDs, and for easy reference these IDs are maintained in the common ratp_bb header. Modules may override generic implemented commands or include their own new ones (as long as the numeric IDs introduced are unique). Signed-off-by: Aleksander Morgado <aleksander@aleksander.es> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* sandbox: use 'poweroff' command for exitAntony Pavlov2018-01-253-18/+18
| | | | | | | | The 'poweroff' command is more appropriate for exit barebox than 'reset'. Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* sandbox: fix registering multiple consolesAleksander Morgado2017-06-011-3/+2
| | | | | | | | | | | | | | | | | | 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>
* 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>
* restart: replace reset_cpu with registered restart handlersSascha Hauer2015-08-272-0/+18
| | | | | | | | | | | | | | | | | | | | | | 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>
* 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: hostfile: completely switch to OF based probingMarc Kleine-Budde2015-03-061-27/+64
| | | | | 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-061-1/+1
| | | | | | | | 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-062-0/+68
| | | | | Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> 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: 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>
* console: drop f_caps and check the function pointer getc/putc insteadJean-Christophe PLAGNIOL-VILLARD2013-09-211-5/+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>
* Set model and hostname at boardlevelSascha Hauer2013-08-161-0/+3
| | | | | | | | | | | | 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>
* driver: Attach info callback to device, not to driverSascha Hauer2013-05-301-2/+3
| | | | | | | | Since the info is device specific and not driver specific, attach the callback to the device. This makes it possible to have a info callback for a device which does not have a driver attached. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Remove unused config.hAlexander Shiyan2013-04-091-4/+0
| | | | | Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Use new device_platform_driver() macro for driversAlexander Shiyan2013-02-131-7/+1
| | | | | Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* switch all platform_bus device/driver registering to ↵Jean-Christophe PLAGNIOL-VILLARD2012-10-043-4/+4
| | | | | | | | platform_driver/device_register now register_driver and register_device are for bus only usage. Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* Merge branch 'for-next/sandbox'Sascha Hauer2012-10-031-0/+21
|\ | | | | | | | | Conflicts: arch/sandbox/mach-sandbox/include/mach/linux.h
| * sandbox: add sdl video supportJean-Christophe PLAGNIOL-VILLARD2012-09-251-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge branch 'for-next/remove-fsf-address'Sascha Hauer2012-10-034-12/+0
|\ \ | | | | | | | | | | | | | | | Conflicts: drivers/net/miidev.c include/miidev.h
| * | Treewide: remove address of the Free Software FoundationSascha Hauer2012-09-174-12/+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: do not register device before barebox is startedJean-Christophe PLAGNIOL-VILLARD2012-09-204-3/+52
|/ | | | | | | This will crash when use registered bus with device registered to it. Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* sandbox: fix whitespaces in board fileAlexander Aring2012-09-031-1/+1
| | | | | | | Fix whitespaces in board file. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* use loff_t for file offsetsSascha Hauer2012-06-301-2/+2
| | | | | | | This is a first step for 64bit file support: Make the file sizes/offsets 64bit. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Use DEVICE_ID_DYNAMIC where applicableSascha Hauer2012-04-162-2/+2
| | | | | | | We now have DEVICE_ID_DYNAMIC for dynamic allocation of device ids, Use it where applicable. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* add magicvar commandSascha Hauer2011-11-291-0/+5
| | | | | | | The magicvar command gives an overview about all environment variables with a special meaning. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* sandbox: simplify linker scriptJean-Christophe PLAGNIOL-VILLARD2011-10-232-225/+9
| | | | | | | | | let the linker to provide the basic linker script just insert the commands and initcalls before the .rodata section Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* sandbox: move __SANDBOX__ to MakefileJean-Christophe PLAGNIOL-VILLARD2011-10-231-2/+0
| | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* sandbox: switch to resourceJean-Christophe PLAGNIOL-VILLARD2011-07-301-12/+2
| | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* Merge branch 'next'Sascha Hauer2011-06-061-0/+1
|\
| * sandbox: allow lseek on host filesPeter Korsgaard2011-05-171-0/+1
| | | | | | | | | | Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | sandbox: Fix another uninitialized dev->id caseSascha Hauer2011-04-251-0/+1
|/ | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* clocksource: switch mask to CLOCKSOURCE_MASKJean-Christophe PLAGNIOL-VILLARD2010-11-291-1/+1
| | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* sandbox: use devfs functions only if definedRobert Schwebel2010-11-011-0/+2
| | | | | | | | arch/sandbox/board/built-in.o: In function `hf_probe': hostfile.c:(.text+0xac): undefined reference to `devfs_create' Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* driver: use id as -1 for auto assigned idJean-Christophe PLAGNIOL-VILLARD2010-09-201-0/+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>
* move boards to arch/<architecure>/boardsJean-Christophe PLAGNIOL-VILLARD2010-07-2310-0/+516
| | | | | | | | | | | | this will allow each arch to handle the boards more simply and depending on there need the env var BOARD will refer to the current board dirent for sandbox as we have only one board the board dirent is arch/sandbox/board Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* [general] Move include/configs/* to board/*/config.hSascha Hauer2008-04-075-248/+0
|
* improved codingstyleMarc Kleine-Budde2007-11-291-1/+1
| | | | | | this patch improves the codingstyle Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
* [sparse] declare functions staticMarc Kleine-Budde2007-11-291-1/+1
| | | | | | | this fixes: arch/sandbox/board/clock.c:28:10: warning: symbol 'linux_clocksource_read' was not declared. Should it be static? Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
* [sparse] declare functions staticMarc Kleine-Budde2007-11-291-2/+2
| | | | | | | | this fixes: arch/sandbox/board/hostfile.c:32:9: warning: symbol 'hf_read' was not declared. Should it be static? arch/sandbox/board/hostfile.c:43:9: warning: symbol 'hf_write' was not declared. Should it be static? Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
* arch/linux -> arch/sandboxSascha Hauer2007-07-125-0/+248