summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* 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>
| * | ARM: socfpga: add arria10 supportSteffen Trumtrar2017-05-0324-201/+3554
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Arria10 is a SoC + FPGA like the Cyclone5 SoCFPGA that is already supported in barebox. Both a the same in some parts, but totaly different in others. Most of the hardware blocks are the same in the SoC parts. The OCRAM is larger on the Arria10 and the SDRAM controller is different. The serial core only supports 32bit accesses (different to the 8bit accesses on the Cyclone5). As Arria10 has 256KB of OCRAM, it is possible to fit a larger barebox (and/or use PBL) instead of the two stage bootprocess used on the Cyclone5 and its 64KB OCRAM. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | ARM: socfpga: make debug_ll configurableSteffen Trumtrar2017-05-032-25/+64
| | | | | | | | | | | | | | | | | | | | | | | | Allow configuring the serial port and clock rate instead of hardcoding it. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | net: designware: add dwmac-3.72a compatibleSteffen Trumtrar2017-05-031-0/+3
| | | | | | | | | | | | | | | | | | | | | This compatible will be needed for Arria10. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | clk: socfpga: move driver to subdirectorySteffen Trumtrar2017-05-033-1/+2
| | | | | | | | | | | | | | | | | | | | | Prepare for Arria10 clock driver. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | ARM: socfpga: rename socfpga->cyclone5Steffen Trumtrar2017-05-0340-70/+271
| |/ | | | | | | | | | | | | | | Prepare the SoCFPGA code base for different system types (Arria10, Stratix10,...). Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/parameter-types'Sascha Hauer2017-05-0543-336/+543
|\ \
| * | param: remove unnecessary device_d * argumentSascha Hauer2017-04-113-35/+34
| | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | globalvar: make globalvar functions more consistentSascha Hauer2017-04-1114-55/+123
| | | | | | | | | | | | | | | | | | | | | | | | | | | Similar to the device parameter functions also make the globalvar functions more consistent. This also adds support for readonly globalvars and changes several existing globalvars which should really be readonly to readonly. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | param: make parameter functions more consistentSascha Hauer2017-04-1120-200/+261
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch creates a consitent set of device parameter functions. With this we have: dev_add_param_<type><access> "type" is one of: int32, uint32, int64, uint64, string, mac, ipv4, enum, bitmask The improvement here is that we now can exactly specify the width of the int type parameters and also correctly distinguish between signed and unsigned variables which means that a variable no longer ends up with INT_MAX when it's assigned -1. "access" can be empty for regular read/write parameter, "_ro" for readonly parameters which get their value from a variable pointer in the background or "_fixed" for parameters which are set to a fixed value (without a pointer in the background). Some more exotic types are not (yet) implemented, like dev_add_param_ip_ro. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | net: use dev_add_param_stringSascha Hauer2017-04-111-2/+9
| | | | | | | | | | | | | | | | | | | | | dev_add_param_string allows to pass a priv * so that the device_d * argument is not needed and can be removed later. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | mtd: use dev_add_param_stringSascha Hauer2017-04-112-11/+12
| | | | | | | | | | | | | | | | | | | | | dev_add_param_string allows to pass a priv * so that the device_d * argument is not needed and can be removed later. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | mtd: nand: use dev_add_param_enumSascha Hauer2017-04-112-8/+27
| | | | | | | | | | | | | | | | | | | | | dev_add_param_enum allows to pass a priv * so that the device_d * argument is not needed and can be removed later. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>