summaryrefslogtreecommitdiffstats
path: root/include
Commit message (Collapse)AuthorAgeFilesLines
...
| * watchdog: add watchdog pollerOleksij Rempel2018-03-261-0/+4
| | | | | | | | | | | | | | | | | | | | In some cases it is practical to supervise as much as possible of the barebox execution with a watchdog (or multiple watchdogs). This patch provides an async poller for watchdog core framework which can be enabled by the user and stores this configuration to nv. Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * watchdog: provide timeout_cur valueOleksij Rempel2018-03-231-0/+1
| | | | | | | | | | | | | | | | | | | | timeout_cur will be used for watchdog poller. Provided values should be good enough for most users and still can be changed for separate projects and fit to needed requirements. Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * watchdog: move max timeout test in to wd_coreOleksij Rempel2018-03-231-0/+1
| | | | | | | | | | | | | | this also will be needed for watchdog poller as well Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * watchdog: register watchdog virtual device with short name wdogOleksij Rempel2018-03-231-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | the watchdog hwdev is usually named with devicetree schema which is not practical for CLI. On device registration "wdog" will be extended with some index number extracted from devicetree (if awailable) or automatically assigned first available number. End result will be "wdog0" .. etc. Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * watchdog: rename dev to hwdevSascha Hauer2018-03-221-1/+1
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/mtd'Sascha Hauer2018-04-061-0/+1
|\ \
| * | mtd: nand: Add Winbond manufacturer IDStefan Riedmueller2018-03-221-0/+1
| |/ | | | | | | | | | | | | | | Add Winbond 0xef manufacturer ID for NAND flashes to support Winbond as an additional manufacturer. Signed-off-by: Stefan Riedmueller <s.riedmueller@phytec.de> Signed-off-by: Christian Hemp <c.hemp@phytec.de>
* | Merge branch 'for-next/misc'Sascha Hauer2018-04-062-1/+24
|\ \
| * | aiodev: Constify 'unit' in 'struct aiodev'Andrey Smirnov2018-04-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | The way it is currently used, there's no reason for 'uint' field to be mutable, so constify it in order to allow 'aiodev' drivers to pass sting literals in that field. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | lib: Port CRC-CCITT functions from Linux kernelAndrey Smirnov2018-04-031-0/+23
| |/ | | | | | | | | | | | | | | Port CRC-CCITT implemenation in order to support porting MFD driver for RAVE SP. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/imx'Sascha Hauer2018-04-061-0/+1
|\ \
| * | clk: Forward declare struct of_device_id in linux/clk.hAndrey Smirnov2018-04-031-0/+1
| |/ | | | | | | | | | | | | | | | | | | | | | | | | Forward declare struct of_device_id in linux/clk.h in order to avoid warnings like the following: warning: 'struct of_device_id' declared inside parameter list will not be visible outside of this definition or declaration int of_clk_init(struct device_node *root, const struct of_device_id *matches); ^~~~~~~~~~~~ Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/fs'Sascha Hauer2018-04-064-4/+9
|\ \
| * | fs: Add super_operationsSascha Hauer2018-04-061-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | Add a struct super_operations we can use later when we get a fs implementation closer to Linux. Only add the functions we'll likely need though. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | rename file_operations -> cdev_operationsSascha Hauer2018-04-063-4/+4
| |/ | | | | | | | | | | | | | | 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>
* | bootm: provide handlers the start of the OS imageSascha Hauer2018-04-041-0/+7
| | | | | | | | | | | | | | | | | | The bootm code needs to read the beginning of the OS image in order to determine the filetype. If it does so already, then we can provide the handlers the buffer. This can help the handlers to find some image metadata before loading the full image. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | common: Add functions to find free RAMSascha Hauer2018-04-041-0/+5
| | | | | | | | | | | | | | The bootm code needs to put the Kernel image and initrd into free RAM. Add some functions to find free RAM chunks to help this code. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | filetype: Detect ARM aarch64 Linux imagesSascha Hauer2018-04-041-0/+1
| | | | | | | | | | | | ARM aarch64 Linux image have a special type. Allow to detect them. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | dt-bindings: Drop unused filesSascha Hauer2018-03-293-342/+0
| | | | | | | | | | | | | | include/dt-bindings is not included in device tree builds anymore since 2014. Since then this directory is unused, so remove the files in it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | dma: Add prototypes for dma mapping functionsSascha Hauer2018-03-291-0/+12
| | | | | | | | | | | | | | | | | | | | | | Right now we only have the dma_sync_single_* functions, but no functions for actually mapping a pointer. The mapping functions become necessary when casting a pointer to unsigned long to get a dma address is not enough. (I'm not even going so far that we'll add IOMMU support, but on some architectures we need a place where we can check if a pointer is DMA mappable at all) Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | dma: Use dma_addr_t as type for DMA addressesSascha Hauer2018-03-291-2/+2
| | | | | | | | | | | | | | DMA addresses are not necessarily the same as unsigned long. Fix the type for the dma_sync_single_* operations. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | debug_ll: support 64bit longsSascha Hauer2018-03-211-1/+1
|/ | | | | | | puthex_ll outputs an unsigned long, so print all digits in case unsigned long is 64bit. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/ratp'Sascha Hauer2018-03-052-0/+54
|\
| * ratp: new reset commandAleksander Morgado2018-03-011-0/+1
| | | | | | | | | | | | | | | | E.g.: $ ./bbremote -v --port /dev/ttyUSB2 reset Signed-off-by: Aleksander Morgado <aleksander@aleksander.es> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ratp: new md and mw commandsAleksander Morgado2018-03-011-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit introduces support for running the md and mw commands using the binary interface provided by RATP. This allows clients to read and write memory files without needing to do custom string parsing on the data returned by the console 'md' and 'mw' operations. The request and response messages used for these new operations are structured in the same way: * An initial fixed-sized section includes the fixed-sized variables (e.g. integers), as well as the size and offset of the variable-length variables. * After the initial fixed-sized section, the buffer is given, which contains the variable-length variables in the offsets previously defined and with the size previously defined. The message also defines separately the offset of the buffer w.r.t. the start of the message. The endpoint reading the message will use this information to decide where the buffer starts. This allows to extend the message format in the future without needing to break the message API, as new fields can be appended to the fixed-sized section as long as the buffer offset is also updated to report the new position of the buffer. E.g.: $ ./bbremote --port /dev/ttyUSB2 md /dev/pic_eeprom_rdu 0x107 5 0000000000 $ ./bbremote --port /dev/ttyUSB2 mw /dev/pic_eeprom_rdu 0x107 0102030405 5 bytes written $ ./bbremote --port /dev/ttyUSB2 md /dev/pic_eeprom_rdu 0x107 5 0102030405 $ ./bbremote --port /dev/ttyUSB2 mw /dev/pic_eeprom_rdu 0x107 0000000000 5 bytes written $ ./bbremote --port /dev/ttyUSB2 md /dev/pic_eeprom_rdu 0x107 5 0000000000 Signed-off-by: Aleksander Morgado <aleksander@aleksander.es> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ratp: implement generic command supportAleksander Morgado2018-03-012-0/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge branch 'for-next/misc'Sascha Hauer2018-03-051-0/+2
|\ \
| * | console: move global.allow_color handling to C codeSascha Hauer2018-02-221-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | We have global.allow_color, but this is limited to the environment only. Move creation and handling of this variable to C code so that we can add support for colored output to commands/console controlled by the same variable. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/fastboot'Sascha Hauer2018-03-052-0/+24
|\ \ \ | |_|/ |/| |
| * | usb: gadget: fastboot: Add external command execution supportSascha Hauer2018-02-091-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Custom projects may need vendor specific expansions to the fastboot command execution. Allow these to be implemented without messing in the fastboot code directly. We have a hook for all commands and also one for the "flash" command. Each hook can decide if the generic command parser is executed afterwards (return value FASTBOOT_CMD_FALLTHROUGH) or if the generic parser shall be skipped (return value 0 or negative error code). This allows board code to implement vendor specific "oem" commands or to handle the downloaded image in a special way (i.e. do signature checks on them) Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | ubiformat: Allow to ubiformat with a buffer givenSascha Hauer2018-02-091-0/+7
| |/ | | | | | | | | | | | | So far ubiformat can only handle files. Make it possible to pass a buffer into ubiformat. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* / state: remove unused arguments from state_new_from_node()Sascha Hauer2018-02-221-2/+1
|/ | | | | | | | state_new_from_node() has arguments describing the backend path. These are never used in barebox, the backend path is always derived from the device nodes backend description. Remove these arguments. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/zstd'Sascha Hauer2018-02-083-0/+1395
|\
| * lib: Add zstd decompression modulePhilipp Zabel2018-02-051-0/+1157
| | | | | | | | | | | | | | Based on kernel commit 73f3d1b48f50 ("lib: Add zstd modules"). Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * lib: Add xxhash modulePhilipp Zabel2018-02-051-0/+236
| | | | | | | | | | | | | | Based on kernel commit 5d2405227a9e ("lib: Add xxhash module"). Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * include linux/compiler.h in linux/unaligned/generic.hPhilipp Zabel2018-02-051-0/+2
| | | | | | | | | | | | | | | | Without this include, the __force macro used in this header may be undefined. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/tftp-workaround'Sascha Hauer2018-02-084-17/+12
|\ \
| * | fs: remove now unused function can_lseek_backward()Sascha Hauer2018-01-251-20/+0
| | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | fs/uimagefs: Use is_tftp_fs() and cache_file() to ease TFTP workaroundSascha Hauer2018-01-251-1/+1
| | | | | | | | | | | | | | | | | | | | | We have helper functions now to ease file caching when a file is on TFTP. Use them. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | uimage: Use is_tftp_fs() and cache_file() to ease TFTP workaroundSascha Hauer2018-01-251-0/+1
| | | | | | | | | | | | | | | | | | | | | We have helper functions now to ease file caching when a file is on TFTP. Use them. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | libfile: implement a function to cache a fileSascha Hauer2018-01-251-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Due to the nature of TFTP which can't lseek and due to the silliness of our filesystem implementation which can't cache accesses we have to manually cache files on TFTP filesystems sometimes. Make it easier for them by providing a cache_file() function which copies the file from TFTP to RAM. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | libfile: implement make_tempSascha Hauer2018-01-251-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Create a make_temp() function which creates a name for a temporary file. Since we do not have any concurrency in barebox we do not need to create the file right away and can leave that to the caller. Unlike unix mktemp the resulting filename is dynamically allocated and must be freed by the caller. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | fs: implement is_tftp_fs()Sascha Hauer2018-01-251-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some commands need files in which they can lseek backwards which is particularly not possible on TFTP. Instead of hiding this behind can_lseek_backward() create a function for it which tests if the file is on TFTP directly rather than using different lseek operations. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/ratp'Sascha Hauer2018-02-082-7/+4
|\ \ \
| * | | ratp: remove unused list pointer from ratp_bb_pktAleksander Morgado2018-01-301-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This struct type is used in the RATP FS implementation, but was never used as a list element anywhere. Signed-off-by: Aleksander Morgado <aleksander@aleksander.es> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | ratp: move barebox-specific command to ratp_bb.hAleksander Morgado2018-01-302-5/+4
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | The ratp_run_command() is really an implementation detail of the barebox ratp 'command' operation support. Move it to the barebox specific header and rename it with the correct prefix. Signed-off-by: Aleksander Morgado <aleksander@aleksander.es> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/of'Sascha Hauer2018-02-081-0/+5
|\ \ \
| * | | of: fdt: add of_unflatten_dtb_constSascha Hauer2018-01-311-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a variant of of_unflatten_dtb() which uses the property data directly from the input tree rather than copying it. This is mainly useful for a single user: FIT images. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | of: Allow for const propertiesSascha Hauer2018-01-311-0/+4
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds support for const properties. We add a const void *value_const to struct property which will not be modified. The value of a property should no longer be used directly, but with the of_property_get_value() accessor which picks the right value. With this we can unflatten dtbs and use the property values directly from the dtb instead of copying them. This is useful for device trees which (ab)use properties to store huge data files, aka FIT images. To create a property whose value is not copied but used from the original input data we introduce of_new_property_const(). Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/misc'Sascha Hauer2018-02-083-1/+4
|\ \ \