summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* include: Move bulk of boot.h to bootm.hSascha Hauer2016-07-2617-130/+141
| | | | | | | | 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>
* boot: Call blspec_scan_directory() only on strings containing an absolute pathSascha Hauer2016-07-221-3/+6
| | | | | | Avoids an unnecessary "Nothing bootable found on..." warning. 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-223-95/+6
| | | | | | | | 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-222-32/+0
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mfd: syscon: Don't call request_iomem_region()Andrey Smirnov2016-07-191-6/+0
| | | | | | | | | | | | | | On platforms that mix dedicated IP block register space with miscellaneous registers it is necessary to share register window between syscon and dedicated IP block driver. Calling request_iomem_region() implies exclusive ownership of the region, which, in the case above could not happen. This change also makes this driver's behaviour to that of its Linux kernel counterpart. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Revert "syscon: Decrease driver registration priority"Andrey Smirnov2016-07-191-1/+1
| | | | | | | | | | | Fixing the i.MX6 specific issue this way breaks things on CLPS711x target. Better fix for the problem is to follow this patch. This reverts commit c203958f3bbf25fc3d612497057b962e96ad1c52. Reported-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Revert "mci: imx-esdhc: Remove excess function"Sascha Hauer2016-07-141-0/+9
| | | | | | | | | | | This reverts commit 8a6896971d093b9d8d1c36eb0d7af891b6ca5369. With this patch it's no longer possible to call detect on the physical device which is necessary for example to make environment on MMC work. Unlike the commit message for 8a6896971d claims mci_detect_card() is not called from mci_register(). Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/video'Sascha Hauer2016-07-1113-29/+530
|\
| * GUI: Add fbtest commandAndrey Smirnov2016-06-303-0/+211
| | | | | | | | | | | | | | | | Add 'fbtest' - a command to produce test patterns on a screen Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Andrey Gusakov <andrey.gusakov@cogentembedded.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * video/edid: Move int_sqrt() outAndrey Smirnov2016-06-304-29/+69
| | | | | | | | | | | | | | | | 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-304-0/+218
| | | | | | | | | | | | | | | | 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-302-0/+32
| | | | | | | | | | | | | | 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/ubi'Sascha Hauer2016-07-116-39/+178
|\ \
| * | ARM: am335x_defconfig: Enable ubi fastmap and ubifsTeresa Remmet2016-06-281-4/+8
| | | | | | | | | | | | | | | | | | | | | Enable support for ubifs and ubi fastmap. Signed-off-by: Teresa Remmet <t.remmet@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | commands: ubi: Add ubiupdatevol commandTeresa Remmet2016-06-281-0/+87
| | | | | | | | | | | | | | | | | | | | | | | | Add ubiupdatevol command. This is to update static and dynamic volumes. Signed-off-by: Teresa Remmet <t.remmet@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | mtd: UBI: Add support for updating static volumesTeresa Remmet2016-06-282-14/+54
| | | | | | | | | | | | | | | | | | | | | | | | Added support to update UBI static volumes in barebox. This is mainly realized with adding the ioctl UBI_IOCVOLUP. Signed-off-by: Teresa Remmet <t.remmet@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | commands: ubimkvol: Add option for static volumesTeresa Remmet2016-06-281-7/+25
| | | | | | | | | | | | | | | | | | | | | | | | Creating static volumes in barebox already works, only the option was missing. Signed-off-by: Teresa Remmet <t.remmet@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | mtd: ubi: actually do work in wear leveling codeSascha Hauer2016-06-281-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The actual work in the wear leveling code is done in a separate thread. Since we do not have threading so far we did not do any of the queued work. Change this by calling the worker function synchronously. With this barebox now can write a fastmap on a freshly ubiformated device. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | mtd: ubi: Fix endless loop when moving PEBTeresa Remmet2016-06-281-10/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When moving a PEB the leb_write_trylock() function is called. As the function never returns 0 UBI will end up in an endless loop. Noticed the issue when fastmap has been enabled and data is beeing copied several times to a UBI volume. When UBI tries to move the anchor PEB, the issue comes up. The leb_write_trylock() is now equal to the leb_write_lock(). But kept it for easier maintaince in future when syncing with kernel. Signed-off-by: Teresa Remmet <t.remmet@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/state'Sascha Hauer2016-07-1120-1788/+3455
|\ \ \
| * | | state: also append backend storage stridesizeMichael Grzeschik2016-07-083-0/+10
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | docs: Add/Update state documentationMarkus Pargmann2016-07-083-1/+53
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Markus Pargmann <mpa@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | state: Refactor state frameworkMarkus Pargmann2016-07-0815-1785/+3390
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-082-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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/omap'Sascha Hauer2016-07-118-95/+125
|\ \ \ \
| * | | | ARM: phytec-som-am335x: Add backup partition for bareboxTeresa Remmet2016-06-304-21/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a redundant barebox partition to improve nand safety at least a little bit. Signed-off-by: Teresa Remmet <t.remmet@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | OMAP: am33xx_bbu_nand: Extent barebox update handlerTeresa Remmet2016-06-303-25/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make it possible to write barebox image to multiple partitions like xload partitions. Signed-off-by: Teresa Remmet <t.remmet@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | OMAP: xload: nand: Check for redundant barebox partitionTeresa Remmet2016-06-303-1/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a support for a redundant barebox backup partition if loading barebox image from first barebox partitions fails. Signed-off-by: Teresa Remmet <t.remmet@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | OMAP: xload: Factor out reading image from mtd partitionTeresa Remmet2016-06-301-49/+22
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | Remove code duplication of reading images out of mtd partitions. Signed-off-by: Teresa Remmet <t.remmet@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | Merge branch 'for-next/nvdevvars'Sascha Hauer2016-07-114-24/+154
|\ \ \ \
| * | | | Introduce non volatile device variablesSascha Hauer2016-07-064-10/+154
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | | nvvar: Simplify by using dev_set_param()Sascha Hauer2016-07-061-6/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The combination of get_param_by_name()/param->set() can be replaced by using dev_set_param() Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | nvvar: Simplify by using nv_set()Sascha Hauer2016-07-061-11/+2
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | | Merge branch 'for-next/mtd'Sascha Hauer2016-07-112-10/+815
|\ \ \ \ \
| * | | | | mtd: nand_mxs: Setup timingSascha Hauer2016-06-241-4/+808
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | So far we relied on the default timing values which are rather slow. This patch adds the timing setup functions from the kernel. Tested on i.MX6 with a AMD/Spansion S34ML08G2 and a Micron MT29F32G08ABAAAWP. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | mtd: nand: Set ONFI function hooks earlierSascha Hauer2016-06-241-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make the ONFI function hooks available after nand_scan_ident() but before nand_scan_tail(). Based on the kernel commit: 4204ccc mtd: set ONFI nand's default hooks in nand_set_defaults() Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | | | Merge branch 'for-next/misc'Sascha Hauer2016-07-1117-39/+47
|\ \ \ \ \ \
| * | | | | | ARM: i.MX: iim: fix potential out of bounds array accessLucas Stach2016-07-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The check is off-by-one. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | | commands: menu: check return pointer properlyLucas Stach2016-07-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The called functions return error codes encoded in the pointer, so the NULL check will never be true. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | | 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>
| * | | | | | clk: fix misleading indentingLucas Stach2016-07-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | | USB: gadget: composite: avoid possible NULL ptr dereferenceLucas Stach2016-07-071-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Check if g is valid before trying to dereference it. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | | usb: ehci: honour timeout valueSascha Hauer2016-07-061-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | usb_control_msg() and usb_bulk_msg() have a timeout parameter. Honour this in the ehci driver instead of using a default timeout. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | | net: smc911x: Add parsing devicetree optionsAlexander Shiyan2016-07-052-3/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | | | | Do not rm the path from pbl-y target张忠山2016-07-051-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Whan add some obj in a subdir to lwl-y or pbl-y, like this: lwl-y += subdir/test.o other.o the make process failed: make[2]: *** No rule to make target 'arch/arm/boards/boardname/test.o', \ needed by 'arch/arm/boards/boardname/built-in-pbl.o'. Stop. Note, there are not the part "subdir" in the path of the test.o. this patch fix this Signed-off-by: 张忠山 <zzs213@126.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | | eeprom: at24: Use xasprintf for small allocationSascha Hauer2016-07-051-6/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The code for error checking shouldn't be bigger than the allocated string. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | | net: dm9k: Fix buswidth setting for platform data probeSascha Hauer2016-07-051-24/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | priv->buswidth expects IORESOURCE_MEM_* macros which are not identical to the integer byte bus width, so calling dm9000_setup_buswidth() for the platform_data case is wrong. fixes: d818f02 net: dm9k: add device tree support Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Reported by: 张忠山 <zzs213@126.com>
| * | | | | | Add more files to .gitignoreAlexander Shiyan2016-07-053-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | | | | mtd: nand: simplify nand_block_checkbadUwe Kleine-König2016-07-051-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | if (A) { if (!B) return C; return D; } return C; can be simplified to: if (A && B) return D; return C; Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>