summaryrefslogtreecommitdiffstats
path: root/include
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'for-next/serdev'Sascha Hauer2018-05-092-0/+155
|\
| * serdev: Add trivial blocking read functionAndrey Smirnov2018-04-171-0/+8
| | | | | | | | | | | | | | | | | | | | | | Add example implementation of a trivial blocking read function as a part of Barebox's serdev API. NOTE: This code has not been tested against real devices, so use it at your own risk. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * console: Add simplified 'serdev' framework from Linux kernelAndrey Smirnov2018-04-172-0/+63
| | | | | | | | | | | | | | | | | | Port 'serdev' UART-slave deivce framework found in recent Linux kernels (post 4.13) in order to be able to port 'serdev' slave drivers from Linux. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * console: Introduce console_drain()Andrey Smirnov2018-04-171-0/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Generalize high baud rate UART polling code found in lib/xmodem.c and expose it as a generic function in console API. The usecase for this -- besides X/Y-mode data transfers where the code originated -- is command/reply type of serial exchages at high baud rates (~1Mbaud) with payloads exceeding inernal UART FIFOs in size. Such interactions are not uncommon in serdev device and this patch is done in preparation for serdev support code that will follow. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/misc'Sascha Hauer2018-05-091-0/+78
|\ \
| * | mfd: Port RAVE SP driver from Linux kernelAndrey Smirnov2018-05-041-0/+78
| |/ | | | | | | | | | | | | Port MFD driver for RAVE SP from Linux kernel. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/imx-reset-reason'Sascha Hauer2018-05-091-0/+17
|\ \
| * | common: reset_source: Introduce reset_source_name()Andrey Smirnov2018-05-081-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | Introduce reset_source_name() to get string representation of current reset source. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | common: reset_source: Add the notion of "reset source instance"Andrey Smirnov2018-04-261-0/+11
| |/ | | | | | | | | | | | | | | | | In order to accomodate SoCs that come with multiple watchdogs (or any other reset sources of the same kind) add a notion of "reset source instance", similar to what we already have for bootsource API. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/imx-bootsource'Sascha Hauer2018-05-094-24/+237
|\ \
| * | bootsource: Add BOOTSOURCE_CANAndrey Smirnov2018-04-171-0/+1
| | | | | | | | | | | | | | | | | | | | | Add BOOTSOURCE_CAN for SoCs that can boot from CAN interface. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | include: Port linux/bitfield.h from Linux kernelAndrey Smirnov2018-04-171-0/+152
| | | | | | | | | | | | | | | Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | include: Port linux/build_bug.h from Linux kernelAndrey Smirnov2018-04-172-24/+84
| |/ | | | | | | | | | | | | Port linux/build_bug.h needed by some of more recent kernel code. 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-05-092-16/+13
|\ \
| * | serial/lpuart: Do not enable UART FIFOAndrey Smirnov2018-04-161-16/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using FIFO in LPUART results in subtle serial input draining issues which are quite difficult to reproduce and troubleshoot. Since the change offered only moderate performance gain revert the code to operate in no-FIFO mode to avoid FIFO-related problems alltogether. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | ARM: i.MX: esdctl: Introduce memory_sdram_size()Andrey Smirnov2018-04-121-0/+8
| |/ | | | | | | | | | | | | | | | | Introduce memory_sdram_size() - subroutine to calculate size of SDRAM chip base on its parameters such as # or rows, columns, banks and bus width. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | aiodev: mc13xxx: add adc supportAndrey Gusakov2018-04-101-0/+9
| | | | | | | | | | Signed-off-by: Andrey Gusakov <andrey.gusakov@cogentembedded.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | mfd: mc13xxx: add function returning mc13xxx typeAndrey Gusakov2018-04-101-0/+10
|/ | | | | Signed-off-by: Andrey Gusakov <andrey.gusakov@cogentembedded.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/watchdog'Sascha Hauer2018-04-061-1/+8
|\
| * 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>