summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Release v2017.06.2v2017.06.2stable/v2017.06Lucas Stach2017-07-141-1/+1
| | | | Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
* crypto: caam: use dma_alloc_coherent instead of dma_allocOleksij Rempel2017-07-141-3/+1
| | | | | | | | | | dma_alloc return non-coherent memory, but the driver does no cache maintenance on the buffer, causing memory corruption. Fix this by requesting coherent memory for the DMA transfer. Fixes: ef4144b4ab63 (crypto: caam - fix RNG buffer cache alignment) Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
* crypto: digest: Fix digesting over memory chunks > 4096 bytesUwe Kleine-König2017-07-141-0/+3
| | | | | | | | | | | | | | | | | | | There are two different cases that are handled in digest_file_window: a) the file to digest is memmappable (e.g. /dev/mem) b) it isn't (e.g. files in /) In both cases a file is digested in hunks of (up to) 4096 bytes. After each hunk in b) the buffer that is fed to digest_update() is then overwritten using read() to get the next hunk to digest. In case a) however it was forgotten to step forward in the buffer and instead the same data was handed to digest_update() again and again. So to fix that increase buffer by the number of bytes already digested for case a) which is characterized by flags == 0. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
* Release v2017.06.1v2017.06.1Sascha Hauer2017-06-281-1/+1
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Revert "nv: Do not create globalvars from nvvars"Sascha Hauer2017-06-131-21/+21
| | | | This reverts commit 35d8e858bea17ec4796069c9c27fd0b134125eaf.
* Revert "globalvar: remove code for unqualified globalvars"Sascha Hauer2017-06-132-1/+43
| | | | This reverts commit e4f81050e098074792730b61563538d9e394e3d6.
* Revert "globalvar: make globalvar functions more consistent"Sascha Hauer2017-06-1314-123/+55
| | | | This reverts commit 1b4a05c9263ae26083526acfabdea1ef96531a1d.
* Revert "param: remove unnecessary device_d * argument"Sascha Hauer2017-06-133-34/+35
| | | | This reverts commit 0071bacb4c7cab21c9fab8540f5aa9922a270a85.
* Revert "globalvar: don't use nv_device if CONFIG_NVVAR is disabled"Sascha Hauer2017-06-131-11/+1
| | | | This reverts commit b378e8c9427b45d856d052a6df4a879a2cee670c.
* Revert "globalvar: make nv_device static"Sascha Hauer2017-06-131-1/+1
| | | | This reverts commit f655902cfad63b9ba5cea7d0c9fc9c3632143e02.
* Revert "nv: Fix setting of nv.dev.<devname>.<param> variables"Sascha Hauer2017-06-131-23/+42
| | | | This reverts commit eaf884ba55def055fd81ff3291a1a534fc8bd8f9.
* Revert "globalvar: Fix value of new globalvar when nvvar exists"Sascha Hauer2017-06-131-2/+2
| | | | This reverts commit f8a177478c1b79e369ecc65501d9d15ff573339f.
* Release v2017.06.0v2017.06.0Sascha Hauer2017-06-131-1/+1
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* watchdog: i.MX: fix i.MX6 resetChristian Hemp2017-06-131-0/+4
| | | | | | | | | | | | According to the Errata ERR004346 (WDOG: WDOG SRS bit requires to be written twice), add another two writes to ensure there must be at least two writes happen in the same one 32kHz clock period. Without this two additional writes, the system will not reset always. Tested with i.MX6Quad and i.MX6 UltraLite Signed-off-by: Christian Hemp <c.hemp@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ratp: only allow bidirectional consolesAleksander Morgado2017-06-071-0/+3
| | | | | | | | | | | | | | | | | | | | Ignore requests to switch to RATP mode in input-only or output-only consoles. This actually also avoids segfaulting later on: #0 0x0000000000000000 in ?? () #1 0x000000000040b2a4 in console_send (r=<optimized out>, pkt=0x7fffffffd8ec, len=4) at common/ratp.c:102 #2 0x000000000042ab99 in ratp_behaviour_a (pkt=0x7ffff7298780, ri=0x7ffff72766d0) at lib/ratp.c:530 #3 ratp_state_machine (pkt=0x7ffff7298780, ri=0x7ffff72766d0) at lib/ratp.c:1384 #4 ratp_poll (ratp=0x7ffff7277ed8) at lib/ratp.c:1561 #5 0x000000000042b2ab in ratp_establish (ratp=ratp@entry=0x7ffff7277ed8, active=active@entry=false, timeout_ms=timeout_ms@entry=100) at lib/ratp.c:1645 #6 0x000000000040b888 in barebox_ratp (cdev=cdev@entry=0x7ffff7212bd0) at common/ratp.c:470 #7 0x00000000004046c3 in getc_raw () at common/console.c:416 ... Signed-off-by: Aleksander Morgado <aleksander@aleksander.es> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ratp: avoid using already freed memoryAleksander Morgado2017-06-061-2/+2
| | | | | | | | If ratp_establish() fails we would be accessing the ratp_internal struct after having disposed it. Signed-off-by: Aleksander Morgado <aleksander@aleksander.es> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* sandbox: Fix registering file/fifo consolesSascha Hauer2017-06-011-19/+19
| | | | | | | | barebox_register_console() uses xzalloc which requires the malloc pool to be initialized, so call it during the second option parsing when this is already done. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* sandbox: fix registering multiple consolesAleksander Morgado2017-06-014-7/+9
| | | | | | | | | | | | | | | | | | 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>
* Documentation: remote-control: fix typoAleksander Morgado2017-06-011-4/+3
| | | | | | | | Correctly reference `--port` instead of `--baudrate` when explaining how to specify the port. Signed-off-by: Aleksander Morgado <aleksander@aleksander.es> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Makefile: Speed up evaluation of ld optionsSascha Hauer2017-05-242-4/+2
| | | | | | | | | Since "333ff7b1e4 Fix linking with new ld, based on u-boot" the build with multiple images became unreasonable slow. This is because the ld-option macro was evaluated once for each image. Fix this by exporting and using LDFLAGS_barebox from the main Makefile. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* usb: imx: Only use clock when it existsSascha Hauer2017-05-231-4/+2
| | | | | | | | | | | | Fixes: bbe0df90b8e2463dd8db651e9f1dd57702985d2d I assumed all chipidea devices actually have a clock. This is true when looking at the device tree, but in barebox not all i.MX SoCs use the clocks provided by the device tree. Most instead use clkdev_add_physbase() to attach a clocks to devices. For these the chipidea device does not have a clock. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* xfuncs: fix format specifier in pr_emerg callIan Abbott2017-05-171-1/+1
| | | | | | | | `enomem_panic()` calls `pr_emerg()` using `%d` in the format specifier string to print a value of type `size_t`. Change it to `%zu`. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* video: select OFTREE from DRIVER_VIDEO_IMX_IPUV3Lucas Stach2017-05-171-0/+1
| | | | | | | | DRIVER_VIDEO_IMX_IPUV3 selects VIDEO_VPL, which has a hard dependency on OFTREE, so it is required to select this one, too. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* docs: render DIP switches as verbatim textStefan Lengfeld2017-05-171-3/+3
| | | | | | | | | | | | Render images of DIP switches as <pre> html tags/verbatim text. This fixes the sphinx errors: Documentation/boards/imx/Element14-WaRP7.rst:25: ERROR: Malformed table. Documentation/boards/imx/Element14-WaRP7.rst:36: ERROR: Malformed table. Documentation/boards/imx/Element14-WaRP7.rst:47: ERROR: Malformed table. Signed-off-by: Stefan Lengfeld <contact@stefanchrist.eu> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* docs: add file suffix rst for inclusion in sphinx documentationStefan Lengfeld2017-05-171-0/+0
| | | | | Signed-off-by: Stefan Lengfeld <contact@stefanchrist.eu> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* docs: fix hiding of chapter from imx.rstStefan Lengfeld2017-05-171-4/+4
| | | | | | | | | | | | | | | The files 'mxs.rst' and 'imx.rst' used the same chapter headline: Freescale i.MXs This confuses sphinx. It does not support having the same headline at the same level twice and hides the other chapter. Just rename the chapter heading to avoid that. And rename the subchapter headline to 'MXS boards' for clarity. Signed-off-by: Stefan Lengfeld <contact@stefanchrist.eu> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* imx-usb-loader: add prefix '0x' for hex valueStefan Lengfeld2017-05-171-1/+1
| | | | | Signed-off-by: Stefan Lengfeld <contact@stefanchrist.eu> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* images: clean *.imx-sram-img filesStefan Lengfeld2017-05-171-1/+1
| | | | | | | | | | | The command make ARCH=arm clean should also clean the *.imx-sram-img files. Signed-off-by: Stefan Lengfeld <contact@stefanchrist.eu> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Fix linking with new ld, based on u-bootAndrey Panov2017-05-173-1/+7
| | | | | | | | U-boot commit info: http://git.denx.de/?p=u-boot.git;a=commit;h=e391b1e64b0bd65709a28a4764afe4f32d408243 Signed-off-by: Andrey Panov <rockford@yandex.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mtd: only build mtdraw_raw_to_mtd_offset when write support is enabledLucas Stach2017-05-171-5/+5
| | | | | | | | | mtdraw_raw_to_mtd_offset() is only used from mtdraw_erase(), so will only be referenced when MTD write support is enabled. This fixes a harmless warning. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* param: fix stub prototype of dev_add_paramLucas Stach2017-05-171-2/+2
| | | | | Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: socfpga: fix QSPI platform data initLucas Stach2017-05-171-1/+1
| | | | | | | | The struct member has been renamed, fix it. Fixes: fddf254b8b9a (mtd: spi-nor: cadence: change devicetree bindings to upstream) Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: i.MX50: Kindle-MX50 DT fixesAlexander Kurz2017-05-164-8/+15
| | | | | | | | | | | * fix IOMUX for MAX14656 IRQ, it requires a pull-up to work * enable UART console for Model EY21 * set up IOMUX for EY21 GPIO lid-close hall sensor * remove IOMUX for non-existing EY21 GPIO keys * replace space indention with tabs Signed-off-by: Alexander Kurz <akurz@blala.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: i.MX50: Amazon Kindle: Model EY21 compatibility checkAlexander Kurz2017-05-162-2/+3
| | | | | | | Extend the compatibility check for i.MX50 based kindles also on model EY21. Signed-off-by: Alexander Kurz <akurz@blala.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* of: of_find_node_by_devpath: Fix offset in mtd devicesSascha Hauer2017-05-111-1/+4
| | | | | | | When a cdev is a mtd device the partition offset must be used from there, not from the cdev. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* PPC: request a consistent memory layoutJuergen Borleis2017-05-112-1/+18
| | | | | | | | | | | | | Using the memory test command will crash barebox, because it tests the area where the stack is located for the PPC architecture. On PPC the stack is below the barebox binary. Below the stack the malloc area is located. Until this change some routines used the macros from 'memory_layout.h', some other calculated their values by their own - which resulted into an unrequested and unprotected stack area. Signed-off-by: Juergen Borleis <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: i.MX50: Amazon Kindle: Add missing compatibility checksSascha Hauer2017-05-113-2/+21
| | | | | | | | | Add the checks to prevent Kindle specific code on other machines. This also adds compatible strings for the Kindle machines as they currently lack them. Reported-by: Stefan Riedmüller <S.Riedmueller@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* state: Fix example in documentationSascha Hauer2017-05-091-1/+1
| | | | | | | The backend property must contain a phandle, so use a phandle in the example. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* globalvar: Fix value of new globalvar when nvvar existsSascha Hauer2017-05-081-2/+2
| | | | | | | | | | | | | When a new globalvar with a value is created and the corresponding nvvar exists, then the globalvar gets the value of the nvvar, not from the newly assigned value as expected. nv quux=foo; global quux=bar; echo ${global.quux} Should give "bar", not "foo". Fix this. Reported-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* nv: Fix setting of nv.dev.<devname>.<param> variablesSascha Hauer2017-05-081-42/+23
| | | | | | | | | | | | | | | | | | nv variables with the form nv.dev.<devname>.<param> shall be mirrored to the device parameter <param> of the device named <devname>. This is broken since: | commit 35d8e858bea17ec4796069c9c27fd0b134125eaf | Author: Sascha Hauer <s.hauer@pengutronix.de> | Date: Thu Apr 6 15:23:56 2017 +0200 | | nv: Do not create globalvars from nvvars Fix this by attaching the setting of the mirror device parameter directly to the nv device rather than to the global device. Reported-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* clock: initialize dummy clocksource staticallySascha Hauer2017-05-051-6/+1
| | | | | | | | | | | | | | | | | | | | Assigning the dummy clocksource in a initcall has the problem that get_time_ns() crashes before that initcall is executed. This happens when dmesg support is enabled in conjunction with CONFIG_DEBUG_INITCALLS. In this case the dmesg code wants to have the timestamp of a log message. Solve this by setting the current clocksource to the dummy clock statically and not at runtime. This way we always have a dummy clock available. Fixes: commit 8972eb7ff17ad058a6c6018305bb912138ab0ca2 Author: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Date: Fri Mar 3 13:34:02 2017 +0100 clocksource: move dummy clock source to init_clock Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/state'Sascha Hauer2017-05-052-4/+32
|\
| * state: Create alias in of_state_fixup()Sascha Hauer2017-05-041-1/+12
| | | | | | | | | | | | | | | | When the kernel device tree is fixed up we assume that it doesn't have a state node, so we must also assume that it doesn't have a alias. Create it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * state: Make an alias mandatorySascha Hauer2017-05-042-2/+10
| | | | | | | | | | | | | | | | The userspace barebox-state utility gets confused when no alias exists. Make the alias mandatory, so that people make it right^tm without having to ask. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * state: warn when a state node will be overwrittenSascha Hauer2017-05-041-0/+9
| | | | | | | | | | | | | | | | | | People do not seem to know that a state node in the kernel device tree will be overwritten by barebox. Print a warning when this happens so that people can get an idea why changes in the kernel device tree state node do not have any effect. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * state: Binding: remove @0 from node nameSascha Hauer2017-05-041-1/+1
| | | | | | | | | | | | | | | | The '@0' suffix is for nodes which have a reg property, so do not use this suffix in the state example node which does not have a reg property. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/socfpga'Sascha Hauer2017-05-0577-296/+4894
|\ \
| * | ARM: socfpga: add arria10 defconfigSteffen Trumtrar2017-05-041-0/+89
| | | | | | | | | | | | | | | Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | ARM: socfpga: add support for reflex achilles boardSteffen Trumtrar2017-05-049-0/+341
| | | | | | | | | | | | | | | Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | clk: socfpga: add arria10 clk driversSteffen Trumtrar2017-05-036-1/+572
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Arria10 has a (slightly) different clock controller than the Cyclone5. Add new drivers for it. This driver only reads out the setup and builds the clocktree, it does not setup any clocks. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>