9
0
Fork 0
Commit Graph

5220 Commits

Author SHA1 Message Date
Andrey Smirnov ce20b192f1 i.MX6: PL310: Adjust settings for performance
According to commit f6b6f3c7b2bb7d6277801882afdced6f2b10fc17 from
git://git.freescale.com/imx/uboot-imx.git:

	Also set Prefetch offset to 15, since it improves
	memcpy performance by 35%. Don't enable Incr double
	Linefill enable since it adversely affects memcpy
	performance by about 32MB/s and reads by 90MB/s. Tested
	with 4K to 16MB sized src and dst aligned buffer.

This commit ports those chagnes from U-Boot.

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-03-17 08:23:05 +01:00
Andrey Smirnov 5127d80137 i.MX6: Apply PL310 errata base on PL310's revision
I.MX6Q Plus parts have r3p2 revision of PL310 so double linefill
errata no longer applies for all of the i.MX6Q SoCs. Change the code to
use PL310's revision inforation to determine if workaround needs to be
applied.

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-03-17 08:23:05 +01:00
Andrey Smirnov 1414c55f82 L2x0: i.MX6: Replace magic numbers with constants
Use constants instead of magic numbers for PL301 registers bits in
imx6_mmu_init()

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-03-17 08:23:05 +01:00
Andrey Smirnov f65c093abc i.MX6: Apply errata 845369 workaround
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-03-17 08:23:05 +01:00
Andrey Smirnov 1d6283d6c1 ARM: Add errata 845369 workaround
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-03-17 08:23:05 +01:00
Andrey Smirnov 9791ea8f11 i.MX: Add revision detection for i.MX6D/Q Plus
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-03-17 08:23:05 +01:00
Sascha Hauer 0832e4008f ARM: i.MX27: Fix gpt compatible for latest device trees
In v4.2-rc3 the "fsl,imx1-gpt" compatible was replaced with
"fsl,imx21-gpt" so i.MX27 currently ends up without clocksource. Fix
this.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-03-16 09:29:33 +01:00
Andrey Smirnov f88e78572b clk-imx6: Call clk_enable on mmdc_ch0_axi_podf
Call clk_enable on mmdc_ch0_axi_podf in order to properly increase
reference counters for all of the nodes in this particular clock
path. Otherwise it becomes possible for peripherals, located on other
branches stemming from "periph", to shut down the whole clock tree (up
to "pll2_bus") when they try to manage their own local clocks.

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-03-16 08:23:46 +01:00
Andrey Smirnov 4249f24e2c i.MX6: dts: Include local .dtsi's last
Make sure that Barebox specific .dtsi files are included after .dtsi
files imported from Linux kernel. This way those local .dtsi files can
reference phandles defined in Linux kernel files.

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-03-16 08:23:46 +01:00
Sascha Hauer 034d4ddcb6 Merge branch 'for-next/misc' 2016-03-11 10:49:50 +01:00
Sascha Hauer 7991fe1b8e Merge branch 'for-next/mips' 2016-03-11 10:49:49 +01:00
Sascha Hauer 66037e9ed9 Merge branch 'for-next/imx' 2016-03-11 10:49:49 +01:00
Sascha Hauer 690ec1804c Merge branch 'for-next/driver' 2016-03-11 10:49:48 +01:00
Sascha Hauer c41f840f4b Merge branch 'for-next/caam' 2016-03-11 10:49:35 +01:00
Sascha Hauer aaad4dad23 Merge branch 'for-next/arm' 2016-03-11 10:49:34 +01:00
Sascha Hauer e809777b95 Merge branch 'for-next/am335x' 2016-03-11 10:49:34 +01:00
Antony Pavlov 559dac9268 MIPS: tplink-mr3020: fix "WPS" and "3G" LEDs
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-03-10 09:39:15 +01:00
Antony Pavlov e2f0f35d2b MIPS: black-swift_defconfig: enable gpio-related stuff
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-03-10 09:39:14 +01:00
Antony Pavlov 550c66ee8e MIPS: black-swift: enable GPIO key
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-03-10 09:39:12 +01:00
Antony Pavlov 8ad12bb132 MIPS: black-swift: enable GPIO LED
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-03-09 19:58:51 +01:00
Antony Pavlov d752908d28 MIPS: ath79: pbl: add pbl_ar9331_mdio_gpio_enable macro
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-03-09 19:58:51 +01:00
Antony Pavlov 30f171a94c MIPS: black-swift_defconfig: use cached memory region
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-03-09 19:58:51 +01:00
Antony Pavlov ff1d2fda11 MIPS: tplink-mr3020_defconfig: use cached memory region
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-03-09 19:58:51 +01:00
Peter Mamonov 1e838c4fb0 MIPS: dtb: register only one memory bank
Signed-off-by: Peter Mamonov <pmamonov@gmail.com>
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-03-09 19:58:50 +01:00
Peter Mamonov 28e71b932d MIPS: implement dma_sync_* functions
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Peter Mamonov <pmamonov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-03-09 19:58:50 +01:00
Antony Pavlov 0076383a13 MIPS: flush cache on shutdown
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Peter Mamonov <pmamonov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-03-09 19:58:50 +01:00
Antony Pavlov e3fbe5e85d MIPS: add initial R4000-style cache support
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Peter Mamonov <pmamonov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-03-09 19:58:50 +01:00
Antony Pavlov 6d352cacb8 MIPS: tplink-mr3020: pbl: init cache
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-03-09 08:29:42 +01:00
Antony Pavlov 1d974f501f MIPS: black-swift: pbl: init cache
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-03-09 08:29:42 +01:00
Antony Pavlov 5668487525 MIPS: pbl: import cache init code from U-Boot v2016.01-212-ga3ab2ae
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-03-09 08:29:42 +01:00
Antony Pavlov 633caaa51a MIPS: probe_scache(): use MIPS_CONF_M linux kernel macro
We already have MIPS_CONF_M macro in <asm/mipsregs.h> so
we have no need in homebrew CONFIG_M macro.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Cc: Peter Mamonov <pmamonov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-03-09 08:29:42 +01:00
Sascha Hauer 43ab267ee0 ARM: i.MX: karo-tx6: add pr_fmt
Add pr_fmt to print tx6 specific messages with a proper prefix.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-03-07 09:07:17 +01:00
Sascha Hauer 2f5fa777cf ARM: i.MX: karo-tx6: disable power button
The power button is not part of the CPU module and can be triggered
wrongly on other baseboards. Disable it since we do not need it
currently.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-03-07 09:07:17 +01:00
Sascha Hauer 5f1b877591 ARM: i.MX: karo-tx6: Setup other PMICs
The TX6 boards come with 3 different PMIC variants from which we
currently only support the ltc3673. Detect the other two by i2c
address and set them up correctly. The code is based on the karo
U-Boot port.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-03-07 09:07:17 +01:00
Sascha Hauer 3bd69ad077 driver: replace dev_request_mem_region with dev_request_mem_resource
dev_request_mem_region doesn't work properly one some SoCs on which
PTR_ERR() values clash with valid return values from dev_request_mem_region.
Replace them with dev_request_mem_resource where possible.

This patch has been generated with the following semantic patch:

// <smpl>
@@
expression d;
expression n;
expression io;
identifier func;
@@
func(...) {
+struct resource *iores;
<+...
-io = dev_request_mem_region(d, n);
-if (IS_ERR(io)) {
+iores = dev_request_mem_resource(d, n);
+if (IS_ERR(iores)) {
...
-	return PTR_ERR(io);
-}
+	return PTR_ERR(iores);
+}
+io = IOMEM(iores->start);
...+>
}

@@
expression d;
expression n;
expression io;
identifier func;
@@
func(...) {
+struct resource *iores;
<+...
-io = dev_request_mem_region(d, n);
-if (IS_ERR(io)) {
+iores = dev_request_mem_resource(d, n);
+if (IS_ERR(iores))
-	return PTR_ERR(io);
-}
+	return PTR_ERR(iores);
+io = IOMEM(iores->start);
...+>
}

@@
expression d;
expression n;
expression io;
identifier func;
@@
func(...) {
+struct resource *iores;
<+...
-io = dev_request_mem_region(d, n);
-if (IS_ERR(io)) {
-	ret = PTR_ERR(io);
+iores = dev_request_mem_resource(d, n);
+if (IS_ERR(iores)) {
+	ret = PTR_ERR(iores);
...
}
+io = IOMEM(iores->start);
...+>
}

@@
expression d;
expression n;
expression io;
identifier func;
@@
func(...) {
+struct resource *iores;
<+...
-io = dev_request_mem_region(d, n);
+iores = dev_request_mem_resource(d, n);
+if (IS_ERR(iores))
+	return PTR_ERR(iores);
+io = IOMEM(iores->start);
...+>
}

@@
identifier func;
@@
func(...) {
<+...
struct resource *iores;
-struct resource *iores;
...+>
}
// </smpl>

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-03-07 08:57:56 +01:00
Alexander Kurz 7fb798c2d3 arm/cpu/lowlevel: fix: possible processor mode change
This is a re-application of fix 17644b55.
arm_cpu_lowlevel_init() will set the processor mode to 0x13 (supervisor).
When this function is entered via a different processor mode, register
banking will happen to lr (r14), resulting in an invalid return address.
This fix will preserve the return address manually.

Signed-off-by: Alexander Kurz <akurz@blala.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-03-04 07:58:48 +01:00
Lucas Stach 93b5fca095 efi: fix memory leak in error path
Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-03-04 07:54:58 +01:00
Sascha Hauer 0fef066433 ARM: i.MX: bbu-internal: detect device before writing to it
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Tested-by: Stefan Christ <s.christ@phytec.de>
2016-03-02 19:51:23 +01:00
Sascha Hauer c46988f380 ARM: i.MX: karo-tx6: Generalize 801x support
The device tree for the 801x variant only contains displays. The
displays are not part of the SoM, but instead of the baseboard,
so they should be described in a baseboard dts. With this patch
we rather include the common tx6x dtsi file and drop 801x from
the barebox device tree names.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-03-02 16:11:31 +01:00
Sascha Hauer bb0d5080d5 ARM: i.MX: karo-tx6: Add support for the i.MX6q 1GiB variant
The i.MX6q variant is basically the same as the i.MX6dl variant, just
with another SoC and the usual i.MX6q/i.MX6dl adjustments.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-03-02 16:07:27 +01:00
Sascha Hauer 572cfe6b52 ARM: i.MX: karo-tx6: Support eMMC board variants
The TX6 board come with either NAND flash or eMMC as primary
storage medium. This adds support for the eMMC variants.
We can detect if we have NAND or eMMC by looking at the
bootsource which will be configured accordingly. This
way we can modify the device tree during runtime and do
not have to create a new image.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-03-02 15:59:23 +01:00
Sascha Hauer 294beb87b1 ARM: i.MX: karo-tx6: Factor out a common tx6 dtsi file
The stuff we currently have in the i.MX6q dts file can be reused for
the i.MX6dl variants, so factor out a common dtsi file.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-03-02 15:57:39 +01:00
Lucas Stach c44669e2b2 ARM: tegra: use dynamic malloc area size
Remove the fixed malloc area size from the defconfig and allow
barebox to calculate the size dynamically.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-03-01 10:14:42 +01:00
Lucas Stach cc4aa4e200 ARM: tegra: beaver: add missing serial alias
Upstream has dropped those from the base dtsi, as long as we can't
fully switch to the upstream board DT add the correct alias to the
barebox copy.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-03-01 10:14:42 +01:00
Tim Sander f3b493750a Terasic DE0-Nano-SoC: add support
v7: eof whitespace fixes

A Patch for supporting the Terasic DE0 NANO-SoC with barebox.
The pretty similar Socrates Board was taken as a starting point with pulling
in the memory timings/pinmux from
http://rocketboards.org/foswiki/view/Documentation/AtlasSoCCompileHardwareDesign

Signed-off-by: Tim Sander <tim@krieglstein.org>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-03-01 10:13:47 +01:00
Teresa Remmet a4bffb2313 ARM: am335x_defconfig: Enable the of_fixup_status command
Signed-off-by: Teresa Remmet <t.remmet@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-03-01 08:25:48 +01:00
Sascha Hauer 3838a998c1 ARM: i.MX53-qsb: Fix gpio button polarity
Since 253fb33 (input: gpio-keys: convert to input framework) the
gpio-buttons are registered with the input framework which has the
side effect that they are activated during boot and no longer have
to be activated manually by activating the input device console.
This reveals that the gpio-button polarities are wrong: The autoboot
is no longer running through since a gpio button press is wrongly
detected.
Fix the polarities in the barebox dts for now to get back a working
board. A proper fix has been sent upstream to the kernel. Once this
has landed and propagated back to barebox this patch can be reverted.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-03-01 08:14:49 +01:00
Lucas Stach b731a61ab5 arm: bootm: be more clever about kernel spacing
When the kernel load address is chosen by the user/image we need
to check if the kernel needs to relocate itself before decompression.
If that's the case the spacing behind the kernel must allow for this
relocation without overwriting anything placed behind the kernel.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-03-01 07:32:13 +01:00
Lucas Stach a324fb5ace arm: bootm: unify kernel load address calculation
Instead of having the same logic for uImage and zImage types duplicated
in the code, split it out into a separate function. This does not change
the behavior of the calculation.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-03-01 07:32:13 +01:00
Antony Pavlov 380a2a5dbe MIPS: black-swift: pbl: use more lowlevel init code from U-Boot_mod
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Reviewed-by: Yegor Yefremov <yegorslists@googlemail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-02-26 07:51:07 +01:00
Antony Pavlov 7b702216db MIPS: tplink-mr3020: pbl: use more lowlevel init code from U-Boot_mod
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Reviewed-by: Yegor Yefremov <yegorslists@googlemail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-02-26 07:51:03 +01:00
Antony Pavlov 41e4334fcc MIPS: ath79: pbl: import hornet_1_1_war routine from U-Boot_mod
U-Boot_mod is a popular bootloader for Atheros AR93xx chips,
please see https://github.com/pepe2k/u-boot_mod for details.

It's reasonable to import some lowlevel AR9331 initialization
code from U-Boot_mod.

AR9331 (Hornet) 1.1 currently needs an additional
reset at 1st boot. This patch imports necessary code
from u-boot_mod/u-boot/cpu/mips/start_bootstrap.S.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Reviewed-by: Yegor Yefremov <yegorslists@googlemail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-02-26 07:50:57 +01:00
Antony Pavlov 8dc07d4792 MIPS: ath79: pbl: import AR9331 CP0 init routine from U-Boot_mod
U-Boot_mod is a popular bootloader for Atheros AR93xx chips,
please see https://github.com/pepe2k/u-boot_mod for details.

It's reasonable to import some lowlevel AR9331 initialization
code from U-Boot_mod.

This patch imports AR9331 MIPS24K coprocessor0 initialization
code from u-boot_mod/u-boot/cpu/mips/start_bootstrap.S.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Reviewed-by: Yegor Yefremov <yegorslists@googlemail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-02-26 07:50:42 +01:00
Antony Pavlov f36700bc6c MIPS: dts: ar9331.dtsi: fix whitespace
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-02-25 09:50:48 +01:00
Alexander Kurz c8db6508d8 Kconfig: avoid tabs in help text
Tabs in kconfig help text will create unwanted indention artefacs when
the help text is scrolled horizontally. Replacing tabs with spaces.

Signed-off-by: Alexander Kurz <akurz@blala.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-02-25 09:45:05 +01:00
Alexander Kurz f4594878f5 edb9302 eth: provide proper phy config
The evaluation boards EDB9302 and  Olimex-CS-E9302 both use a
KS8721BL transceiver in default strapping which is phy_addr=1

Signed-off-by: Alexander Kurz <akurz@blala.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-02-25 09:42:48 +01:00
Sascha Hauer 68a5d9c0eb ARM: socfpga: terasic sockit: Make locally used sys_mgr_init_table static
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-02-18 16:40:40 +01:00
Teresa Remmet 48921a46eb ARM: AM335x: Make use of ARM_USE_COMPRESSED_DTB
Use ARM_USE_COMPRESSED_DTB for all AM335x based board,
to reduce the image size even more.

Saves about 9kB in MLO image and 20kB in barebox image.

Signed-off-by: Teresa Remmet <t.remmet@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-02-17 08:20:59 +01:00
Teresa Remmet 49376db41d ARM: dts: beaglebone: Strip clocks in MLO device tree
Reduce even more size of beaglebone MLO device tree with stripping
the clocks.

Signed-off-by: Teresa Remmet <t.remmet@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-02-17 08:20:59 +01:00
Teresa Remmet b522f515f8 ARM: boards: phytec-som-am335x: New RAM Timings for phyCORE-AM335x-R2
Add RAM timings for phyCORE-AM335x-R2 256MB RAM.

Signed-off-by: Teresa Remmet <t.remmet@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-02-17 08:20:59 +01:00
Arnd Beuscher b8755c1362 ARM: board: phytec-som-am335x: RAM timings for phyCORE-AM335x-R2
Add RAM Timings for new phyCORE-AM335x-R2 SoM with
512MB (MT41K256M16TW107IT).

Signed-off-by: Arnd Beuscher <a.beuscher@phytec.de>
Sigend-off-by: Teresa Remmet <t.remmet@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-02-17 08:20:59 +01:00
Jan Remmet 9d8c6bbc7d ARM: dts: am335x-phytec: eeprom name
use eeprom as name like in the kernel. This is needed if you use the
state framework.
phycard: also fix index, it has address 0x54

Signed-off-by: Jan Remmet <j.remmet@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-02-17 08:20:59 +01:00
Teresa Remmet 1061650b26 ARM: am335x_defconfig: Enable watchdog support
Enable wdt driver and command.

Signed-off-by: Teresa Remmet <t.remmet@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-02-17 08:20:59 +01:00
Wadim Egorov b93b636c83 ARM: am335x_defconfig: Enable NANDTEST command
Signed-off-by: Wadim Egorov <w.egorov@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-02-17 08:20:59 +01:00
Stefan Christ 233a2fbd9f ARM: imx6: physom: fix phyflex workaround on Dual and Solo
Since commit 764ae1647c ("ARM: i.MX: Add correct SoC type detection
for i.MX6") the definition of the function cpu_is_mx6q and cpu_is_mx6dl
has changed.  Before that change they match the SoM family Quad/Dual and
DualLite/Solo. After that change they are SoM specific. They match only
Quad and DualLite. There are extra functions cpu_is_mx6d and cpu_is_mx6s
for SoM Dual and Solo.

We have not seen any real world consequences of this problem yet.

Signed-off-by: Stefan Christ <s.christ@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-02-17 08:06:53 +01:00
Stefan Christ 41305f025e ARM: imx: clocksource: add new DT compatible
Since commit 0ff58575c9 ("dts: update to v4.5-rc1") the compatible
"fsl,imx6q-gpt" was removed from imx6dl.dtsi. Now there is only the
Solo/DualLite specific compatible "fsl,imx6dl-gpt".  Adapt the driver
for that change.

Signed-off-by: Stefan Christ <s.christ@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-02-17 08:06:53 +01:00
Stefan Christ 113e230d68 ARM: i.MX6: add function cpu_is_mx6s()
The cpu_is_mx6* function for the i.MX6 Solo was missing. All other
functions are already defined.

Signed-off-by: Stefan Christ <s.christ@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-02-17 08:06:53 +01:00
Steffen Trumtrar 1bfe0f66d7 ARM: imx6: add caam clks
Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-02-12 15:55:55 +01:00
Sascha Hauer 7482ab4de1 Merge branch 'for-next/regmap' 2016-02-08 08:27:03 +01:00
Sascha Hauer 79606b51ed Merge branch 'for-next/linux-headers' 2016-02-08 08:26:36 +01:00
Sascha Hauer 05261801e9 Merge branch 'for-next/input' 2016-02-08 08:26:35 +01:00
Sascha Hauer 6435fb09d8 Merge branch 'for-next/hab' 2016-02-08 08:26:35 +01:00
Sascha Hauer 129fb7d893 Merge branch 'for-next/fit' 2016-02-08 08:26:35 +01:00
Sascha Hauer e229ce086c Merge branch 'for-next/dts' 2016-02-08 08:26:32 +01:00
Sascha Hauer 6f04ca2d07 Merge branch 'for-next/arm' 2016-02-08 08:26:31 +01:00
Sascha Hauer 2ee6bb3504 ARM: i.MX: ocotp: Switch to regmap support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-02-05 15:13:29 +01:00
Sascha Hauer 09db5f43f9 ARM: i.MX: ocotp: Fix error bit handling
Instead of returning an error when a locked region is read, fill
the result with 0xbadabada to indicate a locked region is read.
This way a md -s /dev/imx-ocotp does not abort when it encounters
locked regions.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-02-05 15:13:28 +01:00
Sascha Hauer 01cf83ba9c ARM: i.MX: ocotp: make priv the first argument of functions
Throughout our codebase the private context pointer is the first
argument to a function. Do this for the ocotp driver aswell.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-02-05 15:13:28 +01:00
Sascha Hauer 07d45903e3 ARM: i.MX: ocotp: Explicitly access control register
Even when the control register has offset 0x0 it's still nice
to use a register define for it. Accessing priv->base directly
just looks wrong.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-02-05 15:13:28 +01:00
Sascha Hauer a17adf3369 ARM: i.MX: ocotp: Fix fusebox size
All i.MX6 SoCs except the i.MX6SL have 4kbit fuses. The i.MX6SL has
2kbit fuses. Fix the device size accordingly.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-02-05 15:13:28 +01:00
Sascha Hauer 9064a935cd ARM: i.MX: iim: Switch to regmap support
To provide consumers easier access to the IIM.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-02-05 15:13:28 +01:00
Sascha Hauer 796694c0b2 Make: i.MX: Allow to pass config file to cmd_imx_image
Pass the config file to cmd_imx_image as arguments to make it more
flexible. Also add the possibility for another arg containing additional
options.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-02-04 14:38:29 +01:00
Steffen Trumtrar c07b5e5964 ARM: i.MX25: fixup broken DryIce GPR
Fixup the DryIce Non-Non-Volatile-Memory GPR register.

Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-02-04 08:45:16 +01:00
Sascha Hauer 73b35531b7 ARM: i.MX53: CCXMX53: Move device tree out of dts/
The dts files accidently have been added to dts/. Move them to a proper
place.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-02-04 08:39:47 +01:00
Sascha Hauer 3fc80b8d3d scripts: imx: Generate signed images with imx-image
The imx-image tool can now generate signed images itself, so we can
switch to this mechanism:

- Move the CSF templates to header files which can be included by the
  flash config files
- remove images/Makefile.imxhabv4 which is no longer necessary.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-02-04 08:29:17 +01:00
Sascha Hauer 0b57bfb12f scripts: imx-image: Support adding a Super Root Key to the image
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-02-04 08:29:16 +01:00
Sascha Hauer 2ff23512d9 imx: hab: rename driver dir to hab/
There's not only HABv4 but also HABv3. No need to put the corresponding
code in separate directories, so rename the habv4 directory to hab.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-02-02 15:41:04 +01:00
Sascha Hauer 341d550c50 ARM: i.MX: Add HABv3 Kconfig variables
For signing i.MX images with HABv3 we need several certificates. Add
their pathes to Kconfig variables to make them available to the build
system.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-02-02 15:41:04 +01:00
Sascha Hauer 3c0e5afc5a x86: Add missing typedef for umode_t
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-02-01 09:16:12 +01:00
Sascha Hauer 607496b38c nios2: Add missing typedef for umode_t
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-02-01 09:14:28 +01:00
Jan Luebbe ac55adb321 bootm: add initial FIT support
This implementation is inspired by U-Boot's FIT support. Instead of
using libfdt (which does not exist in barebox), configuration signatures
are verified by using a simplified DT parser based on barebox's own
code.

Currently, only signed configurations with hashed images are supported,
as the other variants are less useful for verified boot. Compatible FIT
images can be created using U-Boot's mkimage tool.

Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-01-26 22:45:42 +01:00
Sascha Hauer fedba5aaef crypto: add digest_alloc_by_algo()
In barebox the function digest_alloc() allocates a digest based on a string.
When a subsystem already uses an integer value to identify a digest it makes no
sense to create a string and pass it to digest_alloc(), where it is parsed
again. This patch adds the possibility to get a digest by an enum.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-01-26 22:45:41 +01:00
Sascha Hauer aded35ece4 bootm: move initrd code together
The initrd code is distributed in several places in the bootm code.
Move it all together in bootm_load_initrd().

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-01-26 22:45:40 +01:00
Sascha Hauer 3f0835e074 bootm: Push dryrun to handlers
We can make the dryrun option more useful by calling into the handlers.
With this we can detect more cases that can go wrong during boot.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-01-26 22:45:36 +01:00
Enrico Jorns ba24403f24 arm: imx53-guf-vincell-lt: dts: do not specfiy fixed memory information
Setting a fixed memory size prevents from using the different board
variants with different memories equipped.

barebox is able to read RAM size informations from the imx53 RAM
controller and thus does not require this information passed via dts.

Signed-off-by: Enrico Jorns <ejo@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-01-26 08:05:27 +01:00
Daniel Schultz 64a8df2f6d arm: am33xx: Master Osc clock speed handling
Setup the plls with Master Osc. clock speed from the SYSBOOT
Configuration Pin.

Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
Signed-off-by: Teresa Remmet <t.remmet@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-01-26 08:01:06 +01:00
Daniel Schultz a4a28df47d arm: am33xx: Move function to read from Master OSC
Move the function to read the Master OSC speed from
the SYSBOOT Configuration Pin for reuse.

Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
Signed-off-by: Teresa Remmet <t.remmet@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-01-26 08:01:06 +01:00
Uwe Kleine-König a03a3915d9 Add initial support for Netgear ReadyNAS 104
Currently only second stage booting from the vendor U-Boot is tested. I
don't want to flash barebox into NAND yet because UART-booting for
recovery doesn't work for me.

Working so far are:

 - UART
 - networking
 - nand flash

Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-01-22 08:43:19 +01:00
Philipp Zabel 3fb0605542 ARM: cm-fx6: set proper hostname
Set the hostname to "utilite" or "cm-fx6".

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-01-22 08:40:44 +01:00
Sascha Hauer 80f6d5db30 ARM: bootm: Use kernel handler to start barebox image
barebox can be called with the kernel calling convention, so
we can reuse the handler instead of creating a barebox specific
handler.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-01-22 08:15:15 +01:00
Sascha Hauer 0bb6e4c533 bootm: introduce bootm_get_os_size
ARM do_bootm_linux is not only called with uImages but also with
raw images, so we can't use uimage_get_size() here. Introduce
bootm_get_os_size() which handles the different image types.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-01-22 08:15:15 +01:00
Sascha Hauer 777060edcb ARM: zImage: add missing free() in appended device tree code
oftree must be freed when the tree is successfully unflattened.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-01-22 08:15:14 +01:00
Lucas Stach 62c9a8c000 ARM: PXA: move HAVE_CLK select
Claiming that all of PXA has CLK implemented, while only PXA3XX
selects the relevant clock implementations causes lots of build
failures for the other PXA architectures.

Fix it by moving the HAVE_CLK select to the one PXA arch, that
actually has it.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-01-19 17:23:00 +01:00
Lucas Stach 20ce1814bf ARM: tegra: clean up lowlevel entry
The lowlevel startup function jumps directly to the main
cluster if we are already running there. This allows for a
significant cleanup of the board startup code by directly
using the FDT address available there.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-01-18 08:22:23 +01:00
Sascha Hauer 30b7c5ead3 input: gpio-keys: Use KEY_* keycodes
The gpio-keys driver takes ascii key codes from platform_data and Linux
keycodes from device tree. Convert the ascii keys over to Linux
keycodes to get rid of the special cases in the driver.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-01-13 16:28:08 +01:00
Sascha Hauer 6639c98acc input: move matrix_keypad_build_keymap() to C file
Future additions will make the function too big to live as a static
inline function. Move to a C file and while at it, move matrix_keypad.h
to include/input/ where it belongs to.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-01-13 16:28:06 +01:00
Fabio Estevam 53a573c014 imx233-olinuxino: Fix mx23_power_init() arguments
Commit 4d70da6 ("ARM: MXS: power-init: Add parameters to
mx28_power_init()") causes imx233-olinuxino to not boot anymore.

imx233-olinuxino is commonly powered from external input supply,
so adjust the mx23_power_init() arguments to reflect that.

Reported-by: Peter Mamonov <pmamonov@gmail.com>
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Tested-by: Peter Mamonov <pmamonov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-01-12 09:41:37 +01:00
Sascha Hauer 96b115be94 Merge branch 'for-next/socfpga' 2016-01-11 13:11:08 +01:00
Sascha Hauer 70ef1cef5c Merge branch 'for-next/pstore' 2016-01-11 13:11:07 +01:00
Sascha Hauer b9a2512aaa Merge branch 'for-next/misc' 2016-01-11 13:11:06 +01:00
Sascha Hauer b1ebbe76eb Merge branch 'for-next/imx' 2016-01-11 13:11:06 +01:00
Sascha Hauer a7964180e1 Merge branch 'for-next/gcc5' 2016-01-11 13:11:06 +01:00
Sascha Hauer ae33625512 Merge branch 'for-next/dts' 2016-01-11 13:11:05 +01:00
Andrey Smirnov dba6b4919e ARM: Fix exception table setup in MMU-less mode
Add code necessary for correct initialization of exception vector
table when MMU is disabled.

Note: Only ARMv7 support is implemented

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-01-11 11:48:40 +01:00
Andrey Smirnov 5e246885da ARM: mmu: Add VBAR setup
Add code to make sure that normal vector exception table, when it is
used due to unavailability of the high vector table, was not re-mapped
from 0x0 via VBAR by someone else before us.

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-01-11 11:43:07 +01:00
Andrey Smirnov 78bca28702 ARM: asm: Add convenience fucntions to access VBAR
Add two functions to get/set VBAR register.

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-01-11 11:43:07 +01:00
Trent Piepho 85464314b1 OF: Fix fixups to fix Linux DT instead of Barebox DT
OF fixups cm_cogent_fixup() and hb_fixup() are supposed to modify the
Linux device tree.  And they did originally, but commit
e520a8cc46 changed them to use
for_each_compatible_node(), which iterates through the Barebox DT.
Use new for_each_compatible_node_from() to specify the Linux DT root
as the start point.

Signed-off-by: Trent Piepho <tpiepho@kymetacorp.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-01-08 08:30:56 +01:00
Trent Piepho 76b059f311 socfpga: Find partition with environment via device tree
socfpga would load the environment from a file named "barebox.env"
located on the device "/dev/mmc0.1".  Both those names are hard-coded
in the socfpga code and can't be changed.

Barebox supports selecting the location of the environment using a
"barebox,environment" node in device tree's "chosen" node.  And
recently supports specifying that the env should come from a file on
this device.

Change socfpga to use this mechanism by adding the appropriate device
node.

Signed-off-by: Trent Piepho <tpiepho@kymetacorp.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-01-08 08:30:56 +01:00
Trent Piepho 94a4dc04d4 cdev: When creating a new cdev, initialize device_node
If a new cdev doesn't have a device_node defined when passed to
devfs_create(), set it to the device_node of the parent device, if one
exists.

For non-partitions, like ocotp or eeprom devices, this is the correct
thing to do.  Partitions need to use, and do use, a different node.

The code from commit 274e0b8dc4 to set
device_node in ocotp can be removed.

Signed-off-by: Trent Piepho <tpiepho@kymetacorp.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-01-08 08:30:55 +01:00
Alexander Aring 3a0f397e9c arm: bcm283x: add rpi2 support
This patch adds Raspberry Pi 2 support in barebox. The features should
be the same like the current RPi status in barebox.

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-01-07 12:35:25 +01:00
Alexander Aring 8430b90330 rpi: sync revision detection with u-boot
This patch adds parts from u-boot code for doing RPi revision detection
and take care about the "warranty bit". I got this bit on my RPi2.

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-01-04 09:38:12 +01:00
Alexander Aring 801a8d40c1 bcm283x: mbox: align to cachesize
This patch change the align of mbox stack resource to 32. The reason is
that I had some experience with bcm2836 and the mbox implementation,
after setting the align to 64(on bcm2836) the issues was gone.

I found these values inside the u-boot implementation, they use 32
(bcm2835) and 64 (bcm2836).

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-01-04 09:38:12 +01:00
Alexander Aring 295d6763bf bcm2835: introduce mach-bcm283x
This patch changes the most part of mach-bcm2835 to mach-bcm283x. This
prepares to add RPi2 support which is a bcm2836. This patch changes the
Kconfig entry namens to BCM283X for drivers only. These drivers should
working the same in bcm2836.

While updating defconfig I added LED support/trigger option.

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-01-04 09:38:12 +01:00
Alexander Aring 9bdfe1ff7f arm: bcm2835: fix indentation
This patch fix indentation in core.h of mach-bcm2835.

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-01-04 09:38:12 +01:00
Trent Piepho c44e12f0bd socfpga: Allow setting partition xloader boots from for mmc
The xloader boots the 2nd stage barebox from socfpga_barebox_part when
using NOR.  But when using MMC it boots from a hardcoded "disk0.1".
Add the mmc device name to the partition description and use it for
mmc booting.

Add an extern declaration of socfpga_barebox_part to the socfpga
header so that a board can change it to use a different partition.

Initialize socfpga_barebox_part to the default value instead of NULL to
avoid the NULL check later.

Signed-off-by: Trent Piepho <tpiepho@kymetacorp.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-12-14 11:32:30 +01:00
Trent Piepho 1d31baf145 bootstrap: Boot barebox with kernel calling convention
In commit 8e3ddc13eb the bootm code was
changed to boot barebox using the same calling convention as the
kernel.  Which on ARM is to pass three arguments which are zero, an
architecture code, and a params pointer.

A 2nd stage barebox can be booted using lib/bootstrap, which is
different code from bootm.  This code just leaves garbage in the first
three parameters and so doesn't follow the convention.

Change it to be compatible with the ARM kernel booting convention.
This just sends a zero for the architecture, since the code for
architectures depends on boot[zmu] and something using bootstrap
wouldn't have those too.  And it just passes NULL for the params since
we don't have a way to pass a device tree from the preloader.

All users of bootstrap are ARM based, but the code is in lib so a
non-ARM board might someday make use of it.  If the current code would
work for them, then the change here will be ok too.

Signed-off-by: Trent Piepho <tpiepho@kymetacorp.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-12-14 11:13:32 +01:00
Andrey Panov 0c348c3f44 ARM: i.MX6Q: Embedsky E9: Convert environment paths in DTS to a new bindings
Signed-off-by: Andrey Panov <rockford@yandex.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-12-11 08:06:17 +01:00
Sascha Hauer a9e7e68279 ARM: dts: Add *.dtb.lzo to clean files
*.dtb.lzo are generated during compilatiion, delete them.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-12-11 08:02:04 +01:00
Sascha Hauer 5e11907b7b ARM: Omap3: Remove useless inline
Silences gcc5 warning:

In file included from arch/arm/mach-omap/gpmc.c:31:0:
arch/arm/mach-omap/include/mach/sys_info.h:93:83:
warning: inline function 'get_sysboot_value' declared but never defined

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-12-10 11:05:49 +01:00
Lucas Stach 21854348c8 ARM: ccxmx53: properly guard initcall for multiimage
Make sure to not run this board specific initcall on any
other board.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-12-10 08:50:56 +01:00
Markus Pargmann 6c42710ae0 arm: Add RAMOOPS memory area
RAMOOPS is a driver that uses a reserved static memory region to store
the data from the last panic or boot. This helps to debug crashes at the
next boot while preserving the boot messages.

To guarantee a memory area that is not altered by barebox or the kernel,
this area is located at the end of the RAM right after barebox and
before the STACK. This ensures that changing barebox sizes do not
interfere with RAMOOPS.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-12-10 08:49:52 +01:00
Markus Pargmann 9280600522 arm: start: Add visible sdram region for barebox board data
This helps to understand and find problems with the memory layout of
barebox. It adds another entry for the board data that barebox
allocated.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-12-10 08:49:52 +01:00
Markus Pargmann 65071bd091 arm: Clarify memory layout calculation
The memory calculations used are all hardcoded into three different
files, start-pbl.c, uncompress.c and start.c. To make this more readable
and reliable, this patch gathers these information in barebox-arm.h with
static inline functions for the calculation of the memory offsets.

This patch also adds proper handling of different barebox/board data
sizes. Currently only 1MB+Alignment of RAM is reserved for Barebox and
board data. This could be too small for bigger devicetrees and barebox.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-12-10 08:49:52 +01:00
Markus Pargmann 2ab52a7b67 arm: boards: karo-tx6x remove definition of DIV_ROUND_UP
DIV_ROUND_UP is defined in include/linux/kernel.h. Use that instead.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-12-10 08:49:52 +01:00
Sascha Hauer a05d5c206c dts: update to v4.3-rc1
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-12-10 08:48:39 +01:00
Sascha Hauer fab8198323 Merge branch 'for-next/socfpga' 2015-12-08 08:28:58 +01:00
Sascha Hauer 9fdf56c8d4 Merge branch 'for-next/omap' 2015-12-08 08:28:41 +01:00
Sascha Hauer d10a05b410 Merge branch 'for-next/mtd' 2015-12-08 08:28:27 +01:00
Sascha Hauer 4b1430b653 Merge branch 'for-next/mmc' 2015-12-08 08:28:20 +01:00
Sascha Hauer 3cdcff4979 Merge branch 'for-next/mips' 2015-12-08 08:27:59 +01:00
Sascha Hauer 29ac6ac467 Merge branch 'for-next/imx' 2015-12-08 08:27:47 +01:00
Sascha Hauer fe68ba4526 Merge branch 'for-next/arm' 2015-12-08 08:27:08 +01:00
Andrey Smirnov 274e0b8dc4 imx: ocotp: Add code to initialize 'cdev->device_node'
In order for cdev_by_device_node() to be able to return approprate
character device for <&ocotp> phandle cdev->device_node needs to be
initialized with dev->device_node. This patche takes care of that

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-12-07 10:59:13 +01:00
Robert Jarzmik a964acd625 ARM: pxa: pxa2xx use PSPR for resume address
Both lubbock and mainstone suspend to RAM were broken by the same
typo. The linux kernel saves the resume address to PSPR, ie. the scratch
pad register, while it was PSSR which was checked in barebox.

Fixing this typo was tested on mainstone where resume from S3 works.

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-12-07 10:48:11 +01:00
Trent Piepho a2b3a25417 ARM: Remove do_execute and thumb2_execute
In commit 104a6a7ccf support was added
for Thumb2.  It added do_execute() as a way to provide arch dependent
calling veneers for use in "go" and thumb2_execute() as the thumb2 to
arm veneer.

But thumb2_execute() isn't necessary as gcc generates a proper calling
sequence from a standard function pointer call.  Thumb2 barebox is
compiled with the AAPCS ABI which requires this.

It also had a bug and didn't pass the arguments properly, but code
execute via "go" rarely uses arguments so this wasn't very noticeable.

Since thumb2 was always the only user of do_execute(), go ahead and
delete that too.

Signed-off-by: Trent Piepho <tpiepho@kymetacorp.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-12-07 10:44:45 +01:00
Trent Piepho de7a09bb43 ARM: Remove kernel booting call for thumb2 mode
The asm code to do the actual call into the kernel (or another
barebox) when compiled in thumb2 mode isn't necessary.  gcc generates
a perfectly good calling sequence from a normal function pointer call.
If it didn't, the code in bootstrap_boot() that uses a function
pointer to jump to the 2nd stage barebox from an xloader wouldn't
work.

It appears to be allowed that the call to kernel() could return, as
neither start_linux() nor kernel() are marked noreturn, and there is
code after calls to start_linux().

The asm code has a bug in this case, as it uses bx and not blx, and
thus doesn't set the link register.  Since it's a tail call, this
would be okay, but only if the LR value from the start of
start_linux() (and the callee-saved registers) are restored
beforehand, which isn't done.  The gcc generated call sequence will do
this.

Signed-off-by: Trent Piepho <tpiepho@kymetacorp.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-12-04 08:15:23 +01:00
Florian Vallee 839aebc4fe eukrea-cpuimx35: update defconfig
enable chipidea usb driver

Signed-off-by: Florian Vallee <fvallee@eukrea.fr>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-12-02 07:55:26 +01:00
Florian Vallee b4368c7437 eukrea-cpuimx35: setup usb through chipidea-imx driver
OTG and HOST port are tested with a mass storage device.

Signed-off-by: Florian Vallee <fvallee@eukrea.fr>
Signed-off-by: Eric Bénard <eric@eukrea.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-12-02 07:55:26 +01:00
Florian Vallee 3958e366fe imx35: register usb-misc by default
Signed-off-by: Florian Vallee <fvallee@eukrea.fr>
Signed-off-by: Eric Bénard <eric@eukrea.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-12-02 07:55:26 +01:00
Sascha Hauer 7da99e58bd video: i.MX IPUv3: Set ldb clocks correctly
The clocks for the LVDS display bridge have a fixed /3.5 and a
configurable /1,/2 divider in their path. The configurable divider has
to be explicitly configured for single/dual channel support, so we can't
rely on clock rate parent propagation here. Clear the
CLK_SET_RATE_PARENT flag for the configurable divider and configure the
clock explicitly in the ldb driver.
Tested on a custom i.MX6 board, currently untested on i.MX53.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-30 08:22:31 +01:00