9
0
Fork 0
Commit Graph

14849 Commits

Author SHA1 Message Date
Ulrich Ölmann bfe946c959 blspec: fix return value of entry_is_of_compatible()
The function returns a boolean and not an integer. Hence the former
explicit/implicit cast of an ERR_PTR to a boolean has led to a return value of
true although a bootspec entry with a faulty devicetree is not compatible.

Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-09-28 08:28:49 +02:00
Ulrich Ölmann 71f6328d00 blspec: fix erroneus free in entry_is_of_compatible()
Whenever of_unflatten_dtb() encountered an error it already released the memory
before returning the error code. Make this apparent by setting the pointer to
NULL to avoid an erroneus free.

Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-09-27 08:22:17 +02:00
Sascha Hauer c42e8262c8 nv: Fix variable removal in nvvar_save()
When nv variables are removed during runtime then they are
present again when saved with nvvar_save(). This is because nvvar_save()
does not delete variables that exist on the saved environment. Delete
/nv on the saved environment before saving the new variables.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-09-22 10:10:18 +02:00
Antony Pavlov d549e5d498 Documentation: imd: fix sphinx warning
The patch fixes this sphinx warnings:

    barebox/Documentation/user/imd.rst:27: WARNING: Could not lex literal_block as "c". Highlighting skipped.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-09-21 10:12:28 +02:00
Enrico Jorns 9cd9d98300 commands: exit on invalid option
Barebox commands should not perform any action and return 0 if an
invalid parameter was given. This might cause undetected unintended
behvaior when calling commands with wrong options, either manually or
from a script.

Signed-off-by: Enrico Jorns <ejo@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-09-16 09:36:26 +02:00
Uwe Kleine-König a38b7017b3 ARM: imx6: reset PLL2's PFD2 on i.MX6D
The check for is_imx6q was introduced initially in

	f1f6d76370 ("ARM: i.MX6: correct work flow of PFDs from uboot-sources")

to differentiate between i.MX6DL+i.MX6SL and i.MX6Q. The i.MX6D must be
handled like the latter, so drop the check. i.MX6DL+i.MX6SL can be
ignored here since since

	a665962824 ("imx6: lowlevel_init: Fix workaround for new i.MX6s chips")

the PFD handling is only done for i.MX6DQ.

Update the comment to be not only logically correct but also helpful.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-09-15 10:01:04 +02:00
Sascha Hauer 7dc3354ac8 ARM: i.MX6: Enable parent propagation for clk_gate2
Enable parent rate propagation for clk_gate2 to allow the
clock consumers to adjust their rates.
One effect of this is that the i.MX6 NAND controller now can adjust
its rate. It already called a clk_set_rate(rate, 96000000), but this
had no effect, so the clock stayed at reset default 24MHz resulting
in a rather slow timing. This became a problem when commit
"1daa3bc mtd: nand_mxs: Setup timing" introduced EDO timing mode for
faster NAND chips. EDO mode can only work properly for cycle times
< 30ns (at least that's specified in the ONFI spec). 1daa3bc resulted
in sporadic NAND read errors on some boards.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Tested-by: Sam Ravnborg <sam@ravnborg.org>
2016-09-14 14:39:57 +02:00
Sascha Hauer 47f72a3b78 ARM: karo-tx6: Include correct device tree
As a i.MX6dl board dts imx6dl-tx6u.dts should include imx6dl.dtsi, not
the i.MX6q variant. This fixes various pinctrl problems.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-09-14 10:31:23 +02:00
Sascha Hauer 2463a2af32 Merge branch 'for-next/dts' 2016-09-13 14:58:48 +02:00
Sascha Hauer a1ddbbae52 dts: update to v4.7
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-09-13 14:58:07 +02:00
Sascha Hauer 1e82b24904 dts: update to v4.7-rc6
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-09-13 14:57:47 +02:00
Sascha Hauer f4714e5f6a Merge branch 'for-next/video' 2016-09-13 14:56:07 +02:00
Sascha Hauer 074a8fdc92 Merge branch 'for-next/socfpga' 2016-09-13 14:56:06 +02:00
Sascha Hauer 0e1892b2e9 Merge branch 'for-next/rockchip' 2016-09-13 14:56:05 +02:00
Sascha Hauer dd534571bd Merge branch 'for-next/misc' 2016-09-13 14:56:05 +02:00
Sascha Hauer ebe2e918c2 Merge branch 'for-next/mips' 2016-09-13 14:56:05 +02:00
Sascha Hauer 6b8ae8f2e1 Merge branch 'for-next/menu' 2016-09-13 14:56:05 +02:00
Sascha Hauer b2c398f440 Merge branch 'for-next/imx' 2016-09-13 14:56:04 +02:00
Sascha Hauer 0a12c71568 Merge branch 'for-next/defenv-2' 2016-09-13 14:56:03 +02:00
Sascha Hauer 7e6b762f44 Release v2016.09.0
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-09-13 14:43:15 +02:00
Alexander Kurz b12f38097b ARM i.MX50: Add iomux definitions for non-DT board implementations
Add non-DT IOMUX definitions for the i.MX50 SOC by converting linux
dts/imx50-pinfunc.h by script.
perl -we 'while(<>) {
 next unless /^#define MX50_PAD/;
 @in=split "[[:space:]]+", uc($_);
 @out=();
 @out[0..4]=@in[3, 2, 5, 4, 6];
 $out[2] =~ s/0X//;
 $out[4] =~ s/0X//;
 $out[3] = "__NA_" if $out[3] eq "0X000";
 push @out, $in[1] =~ /__UART/? "MX50_UART_PAD_CTRL": "NO_PAD_CTRL";
 $out=join(", ", @out);
 $out =~ s/0X/0x/g;
 print "#define $in[1]\t\t\tIOMUX_PAD($out)\n";
}' < dts/src/arm/imx50-pinfunc.h

Additional changes:
* typical PAD settings for UART, SPI, I2C and ESDHC
* SION bits set for all I2C MUX options

Signed-off-by: Alexander Kurz <akurz@blala.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-09-12 08:23:09 +02:00
Alexander Kurz f6ebdf2194 Add i.MX50 support
Signed-off-by: Alexander Kurz <akurz@blala.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-09-12 08:23:09 +02:00
Alexander Kurz 25be41232b ARM: i.MX drivers: enable i.MX50 where already supported
The i.MX50 SOC includes one ESDHCv3, three ESDHCv2, one cspi and
two ecspi instances which are supported by existing drivers.

Signed-off-by: Alexander Kurz <akurz@blala.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-09-12 08:23:09 +02:00
Alexander Kurz ed014ce301 ARM: i.MX clock: cleanup imx50 incompatibilities
Move all MX5 clock functionality which does not apply to i.MX50 to
a new mx51_mx53 related function.

Signed-off-by: Alexander Kurz <akurz@blala.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-09-12 08:23:09 +02:00
Alexander Kurz 2f9ff8a8f7 scripts: imx: add support for i.MX50
Add imximg support for i.MX50 processors which use the i.MX flash
header v2 format.

Signed-off-by: Alexander Kurz <akurz@blala.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-09-12 08:23:09 +02:00
Alexander Kurz cf4414f7a2 ARM: add common definitions for i.MX50 SOC
Signed-off-by: Alexander Kurz <akurz@blala.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-09-12 08:23:09 +02:00
Uwe Kleine-König bf6ddd6c4d xstrdup: don't panic on xstrdup(NULL)
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>
2016-09-12 08:15:47 +02:00
Antony Pavlov fd1ddfa891 Documentation: aarch64-qemu-virt: fix sphinx issues
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>
2016-09-09 08:19:39 +02:00
Antony Pavlov edeeec5adb Documentation: usb: fix sphinx warning
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>
2016-09-09 08:19:13 +02:00
Ulrich Ölmann fbdfa76ccf commands: ubiupdatevol: confirm success with return value 0
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>
2016-09-06 16:21:22 +02:00
Ulrich Ölmann 90494c6f7e commands: ubiupdatevol: store return value of read() in a signed int
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>
2016-09-06 16:20:53 +02:00
Michael Olbrich faf2ec64e7 mci: mmci: Fix read FIFO handling
According to the Linux kernel and the qemu code, the MMCIFIFOCNT contains
the remaining number of words to read, excluding those that are already in
the FIFO. So the current number of bytes in the FIFO is
host_remain - (readl(base + MMCIFIFOCNT) << 2).

Also writing to MMCIDATACTRL will reset the read counter. As a result,
MCI_DATABLOCKEND is never set and read_bytes() waits forever.

With this change, SD-Card support on qemu vexpress works correctly.

Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-09-05 08:53:24 +02:00
Sam Van Den Berge a1109d78dd Fix small typo in common/Kconfig
Fix small typo frendly -> friendly

Signed-off-by: Sam Van Den Berge <sam.van.den.berge@telenet.be>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-09-05 08:53:24 +02:00
Enrico Jorns 958b3a5201 commands: saveenv: exit on invalid option
Saveenv should not perform any actions if an invalid parameter was
given.

Signed-off-by: Enrico Jorns <ejo@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-09-05 08:53:24 +02:00
Sascha Hauer b5952e8304 usb: i.MX chipidea: Enable VBUS regulator when needed
We should enable VBUS only in host mode, not unconditionally
during probe(). Fix that.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-09-05 08:52:56 +02:00
Andrey Smirnov f7a2e37fcd i.MX: scripts: Fix a bug in imx-image
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>
2016-09-05 08:43:29 +02:00
Alexander Kurz c973b3adbf scripts: imx-usb-loader: cleanup DCD v2 processing
Re-Implement the DCD v2 processing.
Processing for the DCD write command went into a separate function enabling
the over-all DCD processing to handle check, nop and unlock commands as well.
The trivial NOP command is supported right away.
Further changes: put in some data consistancy checks and error handling, do
structured member access and proper endianess handling and direct error
messages to stderr.

Signed-off-by: Alexander Kurz <akurz@blala.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-09-05 08:37:32 +02:00
Andrey Smirnov da1f91422c of_unflatten_dtb(): Check return value with IS_ERR
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>
2016-09-05 08:29:12 +02:00
Philipp Zabel 6ed5b755ba video/edid: Fix edid_to_display_timings error path
edid_to_display_timings is called in drivers/video/imx-ipu-v3/imx-hdmi.c,
drivers/video/simple-panel.c, and drivers/video/edid.c with the struct
display_timings *timings parameter pointing to an embedded struct
display_timings inside a struct fb_info. The timings pointer is not to
be freed in the error path.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-09-05 08:27:02 +02:00
Aleksey Kuleshov bf2abf9050 rework menu so that it can support multiline titles
Signed-off-by: Aleksey Kuleshov <rndfax@yandex.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-09-05 08:26:47 +02:00
Wadim Egorov ff694ddc51 doc: Add RK3288 Documentation
Signed-off-by: Wadim Egorov <w.egorov@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-09-01 09:15:22 +02:00
Wadim Egorov 2035fe2d6b configs: Add RK3288 defconfig
Signed-off-by: Wadim Egorov <w.egorov@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-09-01 09:15:15 +02:00
Wadim Egorov c13c4e4332 ARM: Add phyCORE-RK3288 SOM support
The phyCORE-RK3288 aka PCM-059 is a SoM (System on Module)
containing a RK3288 SoC. The module can be connected to different
carrier boards.

Signed-off-by: Wadim Egorov <w.egorov@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-09-01 09:15:01 +02:00
Sascha Hauer d30d0e4bf6 ARM: i.MX6 Santaro: Add PBL console support
To be able to use PBL console do the usual
relocate_to_current_adr()/setup_c() dance and call pbl_set_putc() to
tell the PBL console where the UART is.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-08-29 17:38:04 +02:00
Sascha Hauer 180b8b6bc1 ARM: i.MX6 Santaro: Add USB support
Enable usbotg and usbh1 devices to gain USB support.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-08-29 17:37:59 +02:00
Sascha Hauer 8f39bf5390 ARM: i.MX6 Santaro: Add enable-delay for the display
The display needs a time to settle, set an enable-delay
of 200ms to avoid flickering.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-08-29 17:37:53 +02:00
Sascha Hauer b82ae64e47 usb: chipidea i.MX: Do not return unnecessary error
We only allow to setup the host/peripheral role once, when it's already
set then we return -EBUSY.
Return 0 instead when we set the same role again and only return -EBUSY
when we actually try to change the role.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-08-29 17:37:41 +02:00
Sascha Hauer 79a2cc9fe6 blspec: Handle nfs:// pathes from boot
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>
2016-08-29 17:37:12 +02:00
Sascha Hauer 438956c6e0 commands: usbgadget: Fix -d option help text
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>
2016-08-29 17:36:58 +02:00
Sascha Hauer ac20c4f03b video: backlight: fix the value of 'brightness_max'
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>
2016-08-29 17:36:36 +02:00