summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Release v2016.09.0v2016.09.0Sascha Hauer2016-09-131-1/+1
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* xstrdup: don't panic on xstrdup(NULL)Uwe Kleine-König2016-09-121-1/+6
| | | | | | | | | | | | Instead return just NULL. This matches the behaviour of kstrdup in the kernel and xstrdup in busybox. This fixes a panic with CONFIG_CMD_MAGICVAR=y and CONFIG_CMD_MAGICVAR_HELP unset in magicvar_add() where description is always NULL. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Documentation: aarch64-qemu-virt: fix sphinx issuesAntony Pavlov2016-09-091-3/+4
| | | | | | | | | | | | | | The patch fixes these sphinx issues: barebox/Documentation/boards/aarch64-qemu-virt.rst:7: WARNING: Title underline too short. Running barebox on QEMU aarch64 virt machine ^^^^^^^^^^^^^^^^^^^^^^^ barebox/Documentation/boards/aarch64-qemu-virt.rst:1: ERROR: Document or section may not begin with a transition. Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Cc: Raphael Poggi <poggi.raph@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Documentation: usb: fix sphinx warningAntony Pavlov2016-09-091-1/+3
| | | | | | | | | | The patch fixes this sphinx warnings: barebox/Documentation/user/usb.rst:61: WARNING: Could not lex literal_block as "c". Highlighting skipped. Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Cc: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* commands: ubiupdatevol: confirm success with return value 0Ulrich Ölmann2016-09-061-2/+3
| | | | | | | | | Treat the write() case analogously to the read() case and do not return the number of most recently written bytes as the status of sucessful command execution. Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* commands: ubiupdatevol: store return value of read() in a signed intUlrich Ölmann2016-09-061-2/+1
| | | | | | | With an unsigned int test for errors from read() can never become true. Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* i.MX: scripts: Fix a bug in imx-imageAndrey Smirnov2016-09-051-1/+1
| | | | | | | | | | In order to clear a bitmask, "Set" bit has to be '0' and "Mask" bit '1'. Since "Set" is bit 4 and "Mask" is bit 3 this leaves us with a overal or-mask of 1 << 3. Orginal code was doing the inverse and setting bit #4 to '1' bit #3 to '0'. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* of_unflatten_dtb(): Check return value with IS_ERRAndrey Smirnov2016-09-056-6/+10
| | | | | | | | Of_unflatten_dtb returns a ERR_PTR value so checking it against NULL is incorrect. Fix it in all of the places where this was happening. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* blspec: Handle nfs:// pathes from bootSascha Hauer2016-08-291-1/+2
| | | | | | | | | | Fixes: cb47dde boot: Call blspec_scan_directory() only on strings containing an absolute path This commit introduced a check if the path contains a '/' at the beginning. For booting a bootloader spec entry from NFS we have to test the path for starting with "nfs://" aswell. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* commands: usbgadget: Fix -d option help textSascha Hauer2016-08-291-1/+1
| | | | | | | The -d option disables any currently active gadget, it does not necessarily have to be a serial gadget. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* video: backlight: fix the value of 'brightness_max'Sascha Hauer2016-08-291-1/+3
| | | | | | | | | Fixes: 87c6a88 video/backlight-pwm: fix the value of 'brightness_max'. brightness_max should really contain the number of brightness steps, so the number of elements in the brightness array. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: vector_table: Fix creation of second level page tableSascha Hauer2016-08-261-1/+1
| | | | | | | | | | | | | | | | | The second level page tables can only start at a 1MiB section boundary, so instead of calling arm_create_pte() with the high vector address (which is 0xffff0000, not 1MiB aligned) we have to call it with 0xfff00000 to correctly create a second level page table. The old values broke SoCs which have peripherals in the upper 1MiB area, like for example the Atmel AT91RM9200. On these Socs we correctly created the vector page, but the pages around it did not have a 1:1 mapping anymore which led to unreachable peripherals. Fixes: f6b77fe9: ARM: Rework vector table setup Reported-by: Peter Kardos <kardos.peter.sk@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Tested-by: Peter Kardos <kardos.peter.sk@gmail.com>
* scripts: socfpga_get_sequencer: convert potential CRLF to LFSteffen Trumtrar2016-08-181-0/+2
| | | | | | | | | | If u-boot was generated under a DOS system, the sequencer files will have CRLF linebreaks. The indent-tool has problems with this and as a result the code will not compile anymore. Fix up any CRLFs prior with the dos2unix tool. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* bbu: parameters are inverted in error messageRenaud Barbier2016-08-181-2/+2
| | | | | | | | | The error message warning the user that the image is too big for the device has its parameters in the wrong order. Swap the two parameters so that the output makes sense. Signed-off-by: Renaud Barbier <renaud.barbier@ge.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Documentation: variables: fix error in "code-block" directiveAntony Pavlov2016-08-151-0/+1
| | | | | | | | | | | | | | | | | | The patch fixes this sphinx error: barebox/Documentation/user/variables.rst:79: ERROR: Error in "code-block" directive: maximum 1 argument(s) allowed, 15 supplied. .. code-block:: sh barebox@Phytec phyCARD-i.MX27:/ nv dev.nand0.partitions: 4M(barebox),1M(barebox-environment),-(root) barebox@Phytec phyCARD-i.MX27:/ devinfo nand0 Parameters: [...] partitions: 4M(barebox),1M(barebox-environment),8M(kernel),1011M(root) [...] Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Documentation: barebox: fix 'Could not lex literal_block as "c"' warningAntony Pavlov2016-08-151-15/+45
| | | | | | | | | | | | The patch fixes these sphinx warnings: barebox/Documentation/user/barebox.rst:19: WARNING: Could not lex literal_block as "c". Highlighting skipped. barebox/Documentation/user/barebox.rst:33: WARNING: Could not lex literal_block as "c". Highlighting skipped. barebox/Documentation/user/barebox.rst:186: WARNING: Could not lex literal_block as "c". Highlighting skipped. barebox/Documentation/user/barebox.rst:205: WARNING: Could not lex literal_block as "c". Highlighting skipped. Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Documentation: tplink-mr3020: fix 'Could not lex literal_block as "c"' warningAntony Pavlov2016-08-151-3/+9
| | | | | | | | | | The patch fixes these sphinx warnings: barebox/Documentation/boards/mips/tplink-mr3020.rst:31: WARNING: Could not lex literal_block as "c". Highlighting skipped. barebox/Documentation/boards/mips/tplink-mr3020.rst:40: WARNING: Could not lex literal_block as "c". Highlighting skipped. Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fix ARMv8 interference with ARMv7Vicente Bergas2016-08-151-1/+1
| | | | | | | | | | | CONFIG_CPU_V8 is checked against 'y' and 'n', but the case when the variable is unset is not considered. This patch only checks the variable against a single value 'y' so the logic is always coherent even when the variable is unset. Signed-off-by: Vicente Bergas <vicencb@gmail.com> Tested-by: Vicente Bergas <vicencb@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/video-backlight'Sascha Hauer2016-08-031-13/+18
|\
| * video/backlight-pwm: properly handle the case of an empty ↵iw3gtf@arcor.de2016-07-151-7/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'brightness-levels' in the device tree. In case of an empty 'brightness-levels' array in the device tree or a non empty one but containing only zeros the value of 'pwm_backlight->scale' would remain 0 possibly causing a division by zero in the function compute_duty_cycle(). To fix it we check the computed value in case we actually have a 'brightness-levels' array in the device tree otherwise we implicitly assume a simple array of the form { 0, 1, 2, ..., 100 } and set the scale to 100. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * video/backlight-pwm: code readability improvement.iw3gtf@arcor.de2016-07-151-6/+5
| | | | | | | | | | | | | | We use the local variable 'length' instead of the lengthy 'pwm_backlight->backlight.brightness_max' within pwm_backlight_parse_dt(). Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * video/backlight-pwm: fix the value of 'brightness_max'.iw3gtf@arcor.de2016-07-151-1/+1
| | | | | | | | | | | | | | | | The field pwm_backlight->backlight.brightness_max should be the maximum allowed brightness value for the backlight, not the max index of the array 'pwm_backlight->levels[]'. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * video/backlight-pwm: fixed a loop index going out of range.iw3gtf@arcor.de2016-07-151-1/+1
| | | | | | | | | | | | | | | | In the function pwm_backlight_parse_dt() the last iteration of the for loop accessed memory past the end of the array 'pwm_backlight->levels[]' because of a wrong test ( '<=' instead of '<'). Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/syscon'Sascha Hauer2016-08-031-21/+62
|\ \
| * | mfd: syscon: Use IOMEM instead of explicit castAndrey Smirnov2016-07-191-1/+1
| | | | | | | | | | | | | | | Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | mfd: syscon: Don't check xzalloc return for NULLAndrey Smirnov2016-07-191-2/+0
| | | | | | | | | | | | | | | | | | | | | Xzalloc never returns NULL, so this check does not bring any value. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | mfd: syscon: Decouple syscon interface from platform devicesAndrey Smirnov2016-07-191-18/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Follow Linux Kernel change introduced in bdb0066df96e74a4002125467ebe459feff1ebef and avoid device/driver model for DT-based platforms. See the original kernel commit for the rationale. Also make syscon_base_lookup_by_pdevname() behave the same way as its kernel counterpart in the case whern "property" argument is NULL. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/nv'Sascha Hauer2016-08-037-36/+155
|\ \ \
| * | | nv: Allow wildcards when removing NV varsSascha Hauer2016-07-252-8/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | With this patch 'nv -r' can also take "*" and "?" wildcards for nv variables. This makes it easier to remove multiple nv variables. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | lib: Add Kconfig symbol for FNMATCHSascha Hauer2016-07-253-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | fnmatch is useful on its own, so make a separate Kconfig symbol and select it from GLOB. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | nv: Use dev_remove_param to delete nv variableSascha Hauer2016-07-221-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dev_remove_param() is exactly for the purpose of removing a device parameter, so use this function instead of open coding the functionality. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | nv: Allow to set/remove multiple variables with one commandSascha Hauer2016-07-221-13/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's convenient to set/remove multiple nv variables in one go. With this patch we iterate over the remaining nonopts instead of expecting exactly one nonopt. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | nv: Add option to explicitly save nv variablesSascha Hauer2016-07-221-4/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We now have code to save the nv variables without saving the rest of the environment. This gives us the possibility to explicitly save the nv variables. This patch adds an option to the 'nv' command for this. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | nv: Save nv variables on shutdownSascha Hauer2016-07-223-3/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With this patch nv variables are automatically saved whenever barebox shuts down (that is 'reset' is executed or a kernel is started). With this the additional 'saveenv' step becomes unnecessary. The nv variables are stored in the environment and the estasblished behaviour is that files in the environment must be manually saved using 'saveenv'. This behaviour shall be kept for now, so this patch cannot just call 'saveenv' since that would save the modified environment files aswell. Instead we read the environment from the device, modifiy the nv variables and save the environment back. Since this changes a long existing behaviour messages are printed the first time a nv variable is modified and during shutdown when the variables are actually saved. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | nv: Do not save nv variables while loadingSascha Hauer2016-07-221-5/+27
| |/ / | | | | | | | | | | | | | | | | | | | | | When reading nv variables from the storage in /env/nv we do not need to write back the value to the file we just read from. Optimize this a bit and make it unnecessary. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/net'Sascha Hauer2016-08-034-17/+28
|\ \ \
| * | | net: Pass network device to net_answer_arp()Sascha Hauer2016-07-141-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The caller already has the correct network device, so pass it to net_answer_arp() rather than using eth_get_current() there. This is a step towards making a global current network device unnecessary. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | net: eth: add name to struct eth_deviceSascha Hauer2016-07-142-5/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using dev_name often is not a good idea since it's a statically allocated string which gets overwritten by later calls to dev_name. Add a devname string to struct eth_device to have the name available for later use. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | net: introduce for_each_netdev iteratorSascha Hauer2016-07-142-7/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | for_each_netdev is nicer to read. Also export the list of network devices since it will be used by code outside of net/eth.c in later patches. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | net: eth: open correct edev in eth_check_openSascha Hauer2016-07-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | eth_check_open gets the network device to check as parameter, so use it rather than using eth_current. Currently both are the same, so this currently does not fix anything. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | net: usb: use minimum timeout when polling for new packetsSascha Hauer2016-07-141-1/+1
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | When no new packets have arrived we want to return to the caller as soon as possible to give other network controllers the chance to receive packets. With the current USB bulk message timeout of one second other network controllers do not work properly whenever the USB network controller is active. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/misc'Sascha Hauer2016-08-039-5/+40
|\ \ \
| * | | defaultenv: Unblank cursor at startupAlexander Shiyan2016-08-032-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In some cases, the user program can disable the cursor, for example, Qt4 library do this, so the cursor remains invisible after the restart. The patch adds a command to activate the cursor, by sending DECTECM command to the terminal. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | mtd: spi-nor: add new variantsAlexander Kurz2016-08-031-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Read access tested on W25Q20BW and MX25U4035. Signed-off-by: Alexander Kurz <akurz@blala.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | getopt: Add support for '--' to stop option parsingSascha Hauer2016-07-251-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In some cases when commands have optional arguments it is necessary to explicitly stop option parsing after the last nonpositonal option. Add support for '--' to accomplish this as done in getopt(3) aswell. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | state: Save on shutdownSascha Hauer2016-07-222-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The state framework is meant for storing persistent variables. To make the state more persistent automatically save it on shutdown. This is now the default behaviour, but can be disabled using a 'save_on_shutdown' variable attached to the state. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | printk: Fix pr_contSascha Hauer2016-07-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | pr_cont is meant to continue a line, so do not printf the prefix given with pr_fmt() again. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | fs: Check for correct open modeSascha Hauer2016-07-221-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Check that readonly openen files is not written to and writeonly files is not read from. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | imx_thermal: Remove leftover debug outputAndrey Smirnov2016-07-151-2/+0
| |/ / | | | | | | | | | | | | Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/imx'Sascha Hauer2016-08-0342-652/+524
|\ \ \