summaryrefslogtreecommitdiffstats
path: root/include
Commit message (Collapse)AuthorAgeFilesLines
* include: Move bulk of boot.h to bootm.hSascha Hauer2016-07-263-121/+126
| | | | | | | | The majority of the stuff currently in include/boot.h is about bootm code implemented common/bootm.c. To be more consistent move it to a new file include/bootm.h. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* blspec: remove unused function prototypeSascha Hauer2016-07-221-2/+0
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* blspec: Remove once/default handlingSascha Hauer2016-07-221-11/+0
| | | | | | | | This is widely unused and in the way of subsequent cleanups. If you are indeed using it please complain on the list, we'll find a solution to add it back in a different way. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* blspec: remove unused blspec_boot_devicenameSascha Hauer2016-07-221-2/+0
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/video'Sascha Hauer2016-07-113-0/+40
|\
| * video/edid: Move int_sqrt() outAndrey Smirnov2016-06-301-0/+22
| | | | | | | | | | | | | | | | Move int_sqrt() out of drivers/video/edid.c so that it is availible to other parts of Barebox. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * GUI: Add code to draw simple graphicsAndrey Smirnov2016-06-301-0/+15
| | | | | | | | | | | | | | | | Add code to draw simple graphics, namely lines(solid or dashed) and circles. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * GUI: Add a function to draw vertical/horizontal barsAndrey Smirnov2016-06-301-0/+3
| | | | | | | | | | | | | | Add a function to draw solid vertical or horizontal bars. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/state'Sascha Hauer2016-07-112-2/+4
|\ \
| * | state: Refactor state frameworkMarkus Pargmann2016-07-081-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The state framework grew organically over the time. Unfortunately the architecture and abstractions disappeared during this period. This patch refactors the framework to recreate the abstractions. The main focus was the backend with its storage. The main use-case was to offer better NAND support with less erase cycles and interchangeable data formats (dtb,raw). The general architecture now has a backend which consists of a data format and storage. The storage consists of multiple storage buckets each holding exactly one copy of the state data. A data format describes a data serialization for the state framework. This can be either dtb or raw. A storage bucket is a storage location which is used to store any data. There is a (new) circular type which writes changes behind the last written data and therefore reduces the number of erases. The other type is a direct bucket which writes directly to a storage offset for all non-erase storage. Furthermore this patch splits up all classes into different files in a subdirectory. This is currently all in one patch as I can't see a good way to split the changes up without having a non-working state framework in between. The following diagram shows the new architecture roughly: .----------. | state | '----------' | | v .----------------------------. | state_backend | |----------------------------| | + state_load(*state); | | + state_save(*state); | | + state_backend_init(...); | | | | | '----------------------------' | | The format describes | | how the state data | '-------------> is serialized | .--------------------------------------------. | | state_backend_format <INTERFACE> | | |--------------------------------------------| | | + verify(*format, magic, *buf, len); | | | + pack(*format, *state, **buf, len); | | | + unpack(*format, *state, *buf, len); | | | + get_packed_len(*format, *state); | | | + free(*format); | | '--------------------------------------------' | ^ ^ | * * | * * | .--------------------. .--------------------. | | backend_format_dtb | | backend_format_raw | | '--------------------' '--------------------' | | | v .----------------------------------------------------------. | state_backend_storage | |----------------------------------------------------------| | + init(...); | | + free(*storage); | | + read(*storage, *format, magic, **buf, *len, len_hint); | | + write(*storage, *buf, len); | | + restore_consistency(*storage, *buf, len); | '----------------------------------------------------------' | The backend storage is responsible to manage multiple data copies and distribute them onto several buckets. Read data is verified against the given format to ensure that the read data is correct. | | | | | v .------------------------------------------. | state_backend_storage_bucket <INTERFACE> | |------------------------------------------| | + init(*bucket); | | + write(*bucket, *buf, len); | | + read(*bucket, **buf, len_hint); | | + free(*bucket); | '------------------------------------------' ^ ^ ^ * * * * * * A storage bucket represents*exactly one data copy at one data location. A circular b*cket writes any new data to the end of the bucket (for *educed erases on NAND). A direct bucket directly writ*s at one location. * * * * * * * * * .-----------------------. * .-------------------------. | backend_bucket_direct | * | backend_bucket_circular | '-----------------------' * '-------------------------' ^ * ^ | * | | * | | * | | .-----------------------. | '--| backend_bucket_cached |---' '-----------------------' A backend_bucket_cached is a transparent bucket that directly uses another bucket as backend device and caches all accesses. Signed-off-by: Markus Pargmann <mpa@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | libfile: Change write_full to be have const bufMarkus Pargmann2016-07-081-1/+1
| |/ | | | | | | | | | | | | write() uses a const pointer so write_full should do the same. Signed-off-by: Markus Pargmann <mpa@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/nvdevvars'Sascha Hauer2016-07-111-0/+6
|\ \
| * | Introduce non volatile device variablesSascha Hauer2016-07-061-0/+6
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | Non volatile device variables are used to make device parameters persistent. They are like normal non volatile variables, but set the values of the device parameters with the corresponding name. Every nv variable beginning with nv.dev is a non volatile device variable. They have the form nv.dev.<devname>.<paramname> and act on the parameter <paramname> of the device named <devname>. The non volatile device variables are designated for example for video modes, ethernet device ip addresses or mtd partitioning. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/misc'Sascha Hauer2016-07-113-3/+4
|\ \
| * | compiler: avoid redefining symbols when running with checkerLucas Stach2016-07-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Avoid redefining __user and __kernel if running with a checker enabled. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | net: smc911x: Add parsing devicetree optionsAlexander Shiyan2016-07-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds parsing basic devicetree options for the smc911x driver: reg-io-width, reg-shift and smsc,force-(in/ex)ternal-phy, which makes driver usable for most DTS-based boards. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | Add more files to .gitignoreAlexander Shiyan2016-07-051-0/+1
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds more generated files to ignore list. ... shc@shc /home/git/barebox-github $ git status На ветке imx51 Неотслеживаемые файлы: (используйте «git add <файл>…», чтобы добавить в то, что будет включено в коммит) common/barebox_default_env common/barebox_default_env.h include/asm scripts/basic/docproc ничего не добавлено в коммит, но есть неотслеживаемые файлы (используйте "git add", чтобы отслеживать их) Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/mips'Sascha Hauer2016-07-111-0/+10
|\ \
| * | of: base: import of_get_cpu_node() from linux-v4.7-rc2Antony Pavlov2016-07-071-0/+10
| |/ | | | | | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/imx'Sascha Hauer2016-07-111-14/+14
|\ \
| * | mfd: mc13xxx: VGEN1 and VGEN2 voltage bits positioned in "Regulator Setting ↵Alexander Shiyan2016-07-071-14/+14
| |/ | | | | | | | | | | | | | | | | | | | | 0" register The bits VGEN10-11 and VGEN20-22 is positioned in the Regulator Setting 0 register. This patch fixes these definitions and board (Efika MX), which uses this voltages. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* / uimage: add define for ARM64 architectureRaphael Poggi2016-07-061-0/+5
|/ | | | | Signed-off-by: Raphael Poggi <poggi.raph@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/mtd'Sascha Hauer2016-06-141-2/+2
|\
| * mtd: nand: Enable subpage readsSascha Hauer2016-05-101-1/+1
| | | | | | | | | | | | | | | | Until now we did not support subpage reads for smaller binary sizes. Scanning UBI volumes on large page NANDs can be painfully slow, subpage reads can speed this up significantly, so enable subpage reads. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * mtd: nand: Pass page argument to read_subpage hookSascha Hauer2016-05-101-1/+1
| | | | | | | | | | | | | | Similar to what the kernel does in e004debda (mtd: nand: add "page" argument for read_subpage hook). Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/misc'Sascha Hauer2016-06-143-1/+23
|\ \
| * | mci: Fix version numbers againTrent Piepho2016-06-071-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The SD and eMMC version numbers are a pain to print and sort, since they are inconsistent in if a two digit minor version shdoulde be treated as a single number or as minor and micro version numbers. This allows version 1.10 and 4.5 and 4.41, where 41 is less than 5. Signed-off-by: Trent Piepho <tpiepho@kymetacorp.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | crypto: add CRC32 digestYegor Yefremov2016-05-252-0/+17
| |/ | | | | | | | | | | | | CRC32 digest can be used to check CRC32 hashes in FIT images etc. Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/mips'Sascha Hauer2016-06-141-22/+0
|\ \
| * | MIPS: ath79: dts: sync clk stuff with linux v4.7-rc2Antony Pavlov2016-06-141-22/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Please see these linux kernel ath79 commits: commit 1e6a3492e7bb12aa8ee26050ff6829c39ebaa152 Author: Antony Pavlov <antonynpavlov@gmail.com> Date: Thu Mar 17 06:34:17 2016 +0300 MIPS: dts: qca: introduce AR9331 devicetree commit 5ae5c452e3361612cd8182eb8bdfecf0ebf42288 Author: Antony Pavlov <antonynpavlov@gmail.com> Date: Thu Mar 17 06:34:18 2016 +0300 MIPS: ath79: update devicetree clock support for AR9331 Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/bootm'Sascha Hauer2016-06-142-2/+3
|\ \ \
| * | | bootm: Add verify mode "available"Sascha Hauer2016-05-101-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The verify "available" mode checks whatever is available in the booted image, so when an image has a signature, it is checked and must be correct and when an image is hashed, it is also checked for correctness. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | bootm: Move bootm options to common/KconfigSascha Hauer2016-05-102-2/+2
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bootm has a C API, so the bootm options have to depend on the option providing the bootm code (CONFIG_BOOTM), not on the option providing the command (CONFIG_CMD_BOOTM). Fixing the dependencies makes it possible to fully use bootm from C without enabling the bootm command support. This also removes the CMD_ prefix from the options which means we have to update the defconfigs aswell. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/aiodev'Sascha Hauer2016-06-142-2/+61
|\ \ \ | |_|/ |/| |
| * | syscon: Do not return NULL when driver is not selectedAndrey Smirnov2016-05-181-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Both syscon_base_lookup_by_pdevname() and syscon_base_lookup_by_phandle(), when implemented, do not return NULL, so none of the code using those function is written to check for that. Change returns to ERR_PTR(-ENOSYS), to avoid having that problem. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | drivers: Introduce AIODEV subsystemSascha Hauer2016-05-181-0/+59
| |/ | | | | | | | | | | | | | | | | | | | | AIODEV/Aiodevice is a analog I/O framework that can be thought of as a simplified hybrid between 'hwmon' and 'IIO' subsystems of Linux kernel This commit is very heavily based on 'iodevice' framework proposal written by Sascha Hauer. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | nvvar: add missing static inline stubsLucas Stach2016-05-301-0/+12
| | | | | | | | | | Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | globalvar: add missing static inline stubsLucas Stach2016-05-301-0/+4
|/ | | | | Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/ubiformat'Sascha Hauer2016-05-091-0/+23
|\
| * commands: ubiformat: move code to common/Sascha Hauer2016-04-261-0/+23
| | | | | | | | | | | | | | This is the final step to separate the ubiformat code from the command. With this the ubiformat code gains a C API. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/pci'Sascha Hauer2016-05-092-0/+49
|\ \
| * | PCI: imx6: Add proper i.MX6+ reset sequenceAndrey Smirnov2016-04-281-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I.MX6+ version of the silicon exposed PCIe core's reset signal as a bit in one of the control registers. As a result using old, pre-i.MX6+, reset sequence on i.MX6+ leads to Barebox hanging during startup. Using exposed reset bit instead solves the problem. This commit is based on portions of commit c34068d48273e24d392d9a49a38be807954420ed in http://git.freescale.com/git/cgit.cgi/imx/linux-2.6-imx.git Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Acked-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | OF: Port of_match_device() and of_device_get_match_data()Andrey Smirnov2016-04-281-0/+48
| |/ | | | | | | | | | | | | | | | | Port of_match_device() and of_device_get_match_data() from Linux kernel code. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Acked-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/misc'Sascha Hauer2016-05-098-13/+11
|\ \
| * | net: phy: Add fixed link supportSascha Hauer2016-05-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some network devices, especially when connected to a switch, are connected via a fixed link. This patch adds support for a fixed phy configured through device tree. TODO: Add support for the "speed" and "full-duplex" properties. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Tested-by: Wjatscheslaw Stoljarski <wjatscheslaw.stoljarski@kiwigrid.com>
| * | whole tree: remove trailing whitespacesDu Huanpeng2016-04-214-6/+6
| | | | | | | | | | | | | | | Signed-off-by: Du Huanpeng <u74147@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | wchar_t: wchar_t should go to stddef.hDu Huanpeng2016-04-142-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | according to C99 standard, the definition of wchar_t should go stddef.h this patch also remove wchar_t local definition and use stddef.h instead. Signed-off-by: Du Huanpeng <u74147@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | NULL: keep NULL definition in stddef.h onlyDu Huanpeng2016-04-141-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | remove other local definition of NULL, use #include <linux/stddef.h> instead. I use this command to search NULL definition, grep -R "define\s*\<NULL\>" hope there are no more definition of NULL. from ISO/IEC 9899:TC3: The macros are NULL which expands to an implementation-defined null pointer constant; Signed-off-by: Du Huanpeng <u74147@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/include-pdata'Sascha Hauer2016-05-099-0/+0
|\ \ \
| * | | include: Move ide platform_data to include/platform_dataSascha Hauer2016-04-151-0/+0
| | | | | | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>