9
0
Fork 0
Commit Graph

14848 Commits

Author SHA1 Message Date
Yegor Yefremov aadf261cd6 Add support for Baltos systems
OnRISC Baltos devices are based on a am335x SoC and can be booted
either from MMC or NAND.

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-10-07 10:15:59 +02:00
Sascha Hauer c9dbd886ef ARM: Fix calling of arm_mem_barebox_image()
arm_mem_barebox_image() is used to pick a suitable place where to
put the final image to. This is called from both the PBL uncompression
code and also from the final image. To make it work properly it is
crucial that it's called with the same arguments both times. Currently
it is called with the wrong image size from the PBL uncompression code.
The size passed to arm_mem_barebox_image() has to be the size of the
whole uncompressed image including the BSS segment size. The PBL code
calls it with the compressed image size instead and without the BSS
segment. This patch fixes this by reading the uncompressed image size
from the compressed binary (the uncompressed size is appended to the
end of the compressed binary by our compression wrappers). The size
of the BSS segment is unknown though by the PBL uncompression code,
so we introduce a maximum BSS size which is used instead.

The code before this patch worked by accident because the base address
of the final image was aligned down to a 1MiB boundary. The alignment
was sufficient already to make enough space. This breaks though when
the uncompressed image including BSS becomes bigger than 1MiB while
the compressed image is smaller.

Fixes: 65071bd0: arm: Clarify memory layout calculation

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-09-15 09:23:43 +02:00
Sascha Hauer 5e61dd3fb5 Add comp_copy function for use with CONFIG_IMAGE_COMPRESSION_NONE
The Makefile compression commands all append the size of the
uncompressed image. With CONFIG_IMAGE_COMPRESSION_NONE simply
'shipped' is used which does not append the size. Add and use
a special comp_copy function which adds the size. This helps
us to get the uncompressed image size in the startup code later.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-09-15 09:23:43 +02:00
Sascha Hauer 679ded1407 ARM: i.MX6: Sabrelite: Add PBL console support
Add PBL console support to allow for better debugging.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-09-15 09:23:43 +02:00
Sascha Hauer 80c55cb483 pbl: console: Let console pointer survive BSS clearing
The PBL console support may be configured before the BSS segment
is cleared. Put the pointer into the data section so that it is
not affected by the BSS clearing.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-09-15 09:23:43 +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
Sascha Hauer d3700c0e81 ARM: vector_table: Fix creation of second level page table
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>
2016-08-26 07:44:32 +02:00