9
0
Fork 0
Commit Graph

4695 Commits

Author SHA1 Message Date
Sascha Hauer 6ad62ff6db ARM: i.MX6 gpt: Add i.MX6ul support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-11-08 14:43:42 +01:00
Sascha Hauer 9be6e1db5a ARM: i.MX6ul: Add clock support
Nearly identical to Linux-4.8 clock support, only some unnecessary
clocks skipped.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-11-08 14:43:42 +01:00
Sascha Hauer e73608ca3d ARM: i.MX: beginning i.MX6ul support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-11-08 14:43:42 +01:00
Sascha Hauer ce864aa5a4 ARM: i.MX: OCOTP: Add functions to access fuses field wise
Add functions to access the OCOTP fuses field wise, similar to what has
been done for the IIM. Also add a i.MX6 fusemap header file.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-11-08 14:43:26 +01:00
Sascha Hauer 047ee22b89 ARM: Fix appended device tree when CONFIG_OFTREE is enabled
When CONFIG_OFTREE is enabled the appended device tree is unflattened
and put into data->of_root_node, but there it is never used again.
To actually use the appended device tree put it into data->oftree
instead.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-11-08 08:27:22 +01:00
Alexander Kurz a3390e16ed mfd: mc13892: more descriptive charger register defines
Make access to the mc13892 charger parameter voltage, current and max power
dissipation readable in terms of millivolts, milliamps and milliwatts.

Signed-off-by: Alexander Kurz <akurz@blala.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-11-07 08:54:31 +01:00
Steffen Trumtrar c93b21178d ARM: socfpga: dtsi: add dw-wdt reset lines
Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-11-03 07:13:19 +01:00
Lucas Stach 037fa2fedb ARM: riotboard: fix barebox partition size
This was missed when updating all the partition sizes. The
environment partition has been moved to the correct location,
but the barebox partition size remained unchanged.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-11-03 07:10:00 +01:00
Teresa Remmet 91a55bc00f ARM: dts: am33xx.dtsi: Add spi aliases
We need to add the spi aliases to set the bus number correct in
the driver.

Delete the spi1 alias again in the am33xx-strip.dtsi for MLO as
the node is deleted there also.

Signed-off-by: Teresa Remmet <t.remmet@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-10-28 08:52:48 +02:00
Yegor Yefremov b4746e29ad arm: Baltos: don't invoke baltos_read_eeprom in MLO
EEPROM information is needed in barebox.bin in order to setup MACs and
select appropriate DTB from kernel-fit.itb, so disable this initcall
in MLO.

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-10-21 08:53:43 +02:00
Yegor Yefremov 1bed248f20 arm: Baltos: setup MPU PLL to run at 600MHz
Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-10-19 12:07:42 +02:00
Sascha Hauer 834f6bf5e5 ARM: bootm: Fix free_mem calculation when initrd is given
When a initrd is given we calculate the next free memory position
as:
free_mem = PAGE_ALIGN(initrd_end);
This is wrong when initrd_end exactly falls on a page boundary.
In this case PAGE_ALIGN() does nothing and free_mem becomes
initrd_end and the following bootm_load_devicetree() and thus
booting fails with -ENOMEM.

Fix this by correctly advancing to the next free memory position.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-10-18 09:42:52 +02:00
Sascha Hauer 3c4cb21e75 ARM: i.MX Freescale Sabrelite: Use correct device tree for dl variant
The i.MX6dl variant also uses the i.MX6q device tree which is wrong.
Use the correct one.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-10-17 08:24:18 +02:00
Sascha Hauer 221d6f5d79 arch: refresh defconfigs
The defconfig files are long untouched and a
make xy_defconfig; make savedefconfig usually generates quite
a different looking file. Refresh them to make it easier to generate
patches against the configs using
make xy_defconfig; make menuconfig; make savedefconfig

This has been done with the following script.

for a in arch/*; do
	arch=$(basename $a)
	for c in $a/configs/*; do
		config=$(basename $c)

	export ARCH=$arch
	make $config && make savedefconfig && mv defconfig $c
	done
done

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-10-12 08:58:31 +02:00
Lucas Stach d8c2022d5d ARM: imx6: add support for Auvidea H100
The Auvidea H100 is a baseboard for the SolidRun MicroSOM, which
provides HDMI IN/OUT capabilities.

Currently supported is only a combination of the H100 baseboard
with a i2eX MicroSOM.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-10-11 06:59:55 +02:00
Lucas Stach 180afb6d52 ARM: microsom: use imx6q_barebox_entry
Instead of hardcoding the different RAM sizes.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-10-11 06:59:55 +02:00
Sascha Hauer 440783f886 Merge branch 'for-next/usb' 2016-10-10 08:31:08 +02:00
Sascha Hauer 64b164356a Merge branch 'for-next/mvebu' 2016-10-10 08:31:08 +02:00
Sascha Hauer bfdb14c7da Merge branch 'for-next/misc' 2016-10-10 08:31:07 +02:00
Sascha Hauer df75f19871 Merge branch 'for-next/imx' 2016-10-10 08:31:07 +02:00
Sascha Hauer db9c78d579 Merge branch 'for-next/defenv' 2016-10-10 08:31:06 +02:00
Sascha Hauer c80ba33cbe Merge branch 'for-next/bootchooser' 2016-10-10 08:31:06 +02:00
Sascha Hauer c5fc5de3fe Merge branch 'for-next/arm' 2016-10-10 08:31:06 +02:00
Sascha Hauer 790980bf18 Make generic default environment type a use choice
So far it was hardcoded for each board if defenv-1 or defenv-2 is used.
Make this a user choice so that a particular board no longer enforces
a defenv type.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-10-10 08:30:36 +02:00
Sascha Hauer 4d9734c8a2 defaultenv: add defaultenv-1 in boards via defaultenv_append_directory()
Currently it's hardcoded for each board which defaultenv version is
used. This is unfortunate since some people like the other defaultenv
version better and may want to select it.

This patch removes the board specific environment path
CONFIG_DEFAULT_ENVIRONMENT_PATH and instead adds it via:

	if (IS_ENABLED(CONFIG_DEFAULT_ENVIRONMENT_GENERIC))
		defaultenv_append_directory(defaultenv_<board>);

This way we can make sure that the defaultenv-1 board specific bits are
only compiled in when defaultenv-1 is actually in use.

The next step is to make the defaultenv version selection a user visible
choice.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-10-10 08:30:26 +02:00
Uwe Kleine-König 81cabf1274 ARM: mvebu: add support for Netgear RN2120
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-10-07 10:18:19 +02:00
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
Lucas Stach 0201dedc10 arm64: drop unneeded files from Makefile
ARM64 has native instructions for division and thus doesn't need the
helper functions implemented in those files.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-10-04 08:12:19 +02:00
Lucas Stach c60db96e67 arm64: include correct setupc file in ARM64 PBL
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-10-04 08:12:19 +02:00
Lucas Stach 51b320b4e1 arm: semihosting support is not implemented for ARM64
Don't allow it to be selected in a ARM64 build.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-10-04 08:12:19 +02:00
Lucas Stach 90af40f962 arm(64): don't advertise stack_dumping capabilities for ARM64
The unwind code to support this feature is not there yet.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-10-04 08:12:19 +02:00
Lucas Stach 5220eee793 arm(64): move HAS_DMA and HAS_MODULES to CPU_32
We don't yet have an implementation for those two features on ARM64, so move
them to a place where they are only selected for a 32bit barebox.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-10-04 08:12:19 +02:00
Lucas Stach 725d4474e1 arm64: select ARM_EXCEPTIONS
The current ARM64 lowlevel code needs the exception vector to set
up all the ELs. Select ARM_EXCEPTIONS to make sure this is always
present.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-10-04 08:12:19 +02:00
Andrey Smirnov 16176f2183 i.MX: Register imx6_fixup_cpus() for MX6Q+ as well
Register imx6_fixup_cpus() for MX6Q+ as well as for MX6Q and MX6DL.

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-10-04 08:09:42 +02:00
Andrey Smirnov 916e79ceec i.MX: Introduce imx6_cpu_revision()
Factor out CPU revision identification code from imx6_init() into a
standalone inline function (similar to imx6_cpu_type()), so that it
would be possible to use that functionality in PBL code.

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-10-04 08:09:34 +02:00
Sascha Hauer a44f222e09 usb: imx-us-phy: Convert driver to generic phy support
The generic phy layer now supports USB phys, so convert
the driver over to use it.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-09-29 14:29:16 +02:00
Sascha Hauer 62ae0274df global: Make 'global' command behaviour consistent to 'nv'
The 'nv' command can add/remove multiple variables. Implement that
for the 'global' command aswell. Also with the 'nv' command the -r
option is for removal of variables, not for "set match". Looking at
the users of "global -r" the only user uses the command for removal
of variables and not for "Setting multiple variables to the same value"
as stated in the command help text. Let "global -r" remove variables
aswell.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-09-22 11:31:21 +02:00
Sascha Hauer d60230bded convert users to %pI4
Convert users of ip_to_string() and print_IPaddr() to %pI4 and
remove the now unused functions.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-09-22 11:30:38 +02:00
Jan Luebbe ced7560528 ARM: i.MX6: gate PCIe when unused
Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-09-22 11:22:03 +02:00
Jan Luebbe 17bdd2341e ARM: i.MX6: fix clock gating
Since ce6755ca1c, both IPU and OpenVG are
enabled if CONFIG_DRIVER_VIDEO_IMX_IPUV3 is true, but in the other case,
only OpenVG was disabled.

Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-09-22 11:22:03 +02:00
Jan Luebbe c29a58e273 ARM: i.MX6: remove duplicate clock initialization
These registers are already set by imx6_ccm_probe (in clk-imx6.c) during
core_initcall, while imx6_init_lowlevel is only called during
postcore_initcall via imx_init in imx.c.

Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-09-22 11:22:03 +02:00
Lucas Stach b997cc26c2 ARM: imx6qp: set NoC regulator to bypass
The NoC regulator only passes the QoS signals through if it is
in bypass mode. This is a safe setting to give the IPU priority
over other requests. The kernel may change it to some other setting
once it knows the bandwidth requirements of the use-case.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-09-22 11:20:52 +02:00
Lucas Stach 4e6e8f73e9 ARM: imx6: don't execute IPU QoS setup on MX6 SX/SL
SX and SL variants only include the PXP and have no IPU, so
skip any IPU related QoS setup.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-09-22 11:20:52 +02:00
Lucas Stach 3386e25f2d ARM: imx6: split out IPU QoS setup
Split into separate function and only call it after the chip type
and revision is known.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-09-22 11:20:52 +02:00
Sascha Hauer 8f90ab6af5 ARM: vincell_defconfig: make smaller
The image built with vincell_defconfig has become too big to fit
into the SoC internal SRAM. Make it smaller by disabling UBIFS
support.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-09-22 11:20:52 +02:00
Sascha Hauer bebe3aca79 ARM: imx_v7_defconfig: Enable Vincell support
Now that we can start images bigger than internal SRAM size we can
enable the Vincell support in the imx_v7_defconfig.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-09-22 11:20:52 +02:00
Sascha Hauer 8840b3ecbb ARM: i.MX53 Vincell: Add NAND xload support
The Vincell boards do the SDRAM setup from board init code, so the
image size is limited to the internal SRAM size. To overcome this
limitation use the NAND xload support.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-09-22 11:20:52 +02:00
Sascha Hauer 509d2228f9 ARM: i.MX53: Implement NAND xload
Some i.MX53 want to setup the SDRAM from C code rather than
from DCD tables. The image size for these boards is limited
to the internal SRAM size. To overcome this limitation for
i.MX53 boards booting from NAND implement an xload mechanism
to load only the PBL to SRAM and let barebox load the rest
of the image itself after SDRAM has been initialized.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-09-22 11:20:52 +02:00
Sascha Hauer 3209e4eaa8 mtd: imx-nand: Move v3 register definitions to include file
Move v3 register definitions to include file so that they can
be reused for the early nand boot code.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-09-22 11:20:52 +02:00
Sascha Hauer ff986b16ad ARM: i.MX53: Detect booting from USB
The USB download mode can be detected by reading the BMOD[0|1]
bits. Add support for it.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-09-22 11:20:52 +02:00
Sascha Hauer 0b47f95340 ARM: i.MX: Provide bootsource functions for early boot code
The regular bootsource functions only work in a running barebox,
provide functions for early code. This has already been done for
i.MX6, this patch adds the same functions for the other SoCs.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-09-22 11:20:52 +02:00
Sascha Hauer cf3dfafff4 ARM: i.MX53: do not pass base address to imx*_boot_save_loc
The functions can determine the necessary base addresses
themselves since they are SoC specific anyway.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-09-22 11:20:52 +02:00
Sascha Hauer 712a7de9b4 ARM: i.MX53 Vincell: Add PBL console support
PBL console support is more useful than debug_ll. Add support
for it to the Vincell Board.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-09-22 11:20:52 +02:00
Sascha Hauer 8b4bbbbd13 ARM: i.MX53 Vincell: Adjust bbu handler partition size to real partition size
The bootloader partition size was increased to 0xe0000, so adjust
the barebox update handler partition size accordingly.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-09-22 11:20:52 +02:00
Sascha Hauer 45325c21d7 ARM: i.MX53 Vincell: Reset phy consistently from device tree
The phy reset for the Vincell board is done from device tree whereas
the Vincell-LT resets the phy from board init code. Since both boards
share the same code base the regular Vincell board ends up with a
duplicated phy reset, with the second reset being done after the
FEC has been initialized.
Fix this by removing the phy reset from the board code and adding the
phy reset to the Vincell-LT dts file.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-09-22 11:20:52 +02:00
Sascha Hauer 6cd4fee050 ARM: i.MX53: Add uart5 clock support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-09-22 11:20:52 +02:00
Uwe Kleine-König 2b7823e7de ARM: mvebu: select HAVE_DEFAULT_ENVIRONMENT_NEW
None of the available boards for mvebu has any environment additions, so
this is safe.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-09-16 09:35:34 +02:00
Uwe Kleine-König c786a87639 ARM: mvebu_defconfig: enable all machines, AEABI, nand and net driver
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-09-16 09:35:34 +02:00
Uwe Kleine-König 91d1d7c75b ARM: mvebu_defconfig: oldconfig
This is the result of
	make mvebu_defconfig
	make savedefconfig
	mv defconfig arch/arm/configs/mvebu_defconfig
.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-09-16 09:35:34 +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 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 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 7791ad2d59 defenv-1: remove unused variable kernelimage_type
kernelimage_type is used nowwhere, remove it.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-09-14 10:27: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 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
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 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 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
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
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 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
Sascha Hauer 71df6f5bf1 defaultenv-2: remove unused *-menu-add-entry calls
The *-menu-add-entry functions no longer exist in defaultenv-2, so
remove the calls to these functions.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-08-26 07:35:49 +02:00
Sascha Hauer 2086c79289 defaultenv-2: remove ps1 duplicates
Some boards duplicate the PS1 initialization to add a '#' at the end
of the prompt. It's not worth duplicating this for this purpose. Remove
them.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-08-26 07:34:06 +02:00
Wadim Egorov 4372a3ed06 ARM: rockchip: Add early debug support for RK3288
Signed-off-by: Wadim Egorov <w.egorov@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-08-26 07:28:31 +02:00
Wadim Egorov 413a35395a clocksource: Add rk3288 timer driver
This driver comes from the u-boot (v2016.01).

Signed-off-by: Wadim Egorov <w.egorov@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-08-26 07:28:31 +02:00
Wadim Egorov b9c57abc8c ARM: rockchip: Add basic RK3288 support
The RK3288 SoC is a low power, high performance processor for mobile phones,
personal mobile internet devices and other digital multimedia applications.
It has an integrated quad-core cortex-A17 with separate NEON coprocessor.

Prepare mach-rockchip infrastructure for Rockchip RK3288 support.
Let's seperate the RK3188 and RK3288 SoCs. Later we will have two different
configs.

Signed-off-by: Wadim Egorov <w.egorov@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-08-26 07:28:31 +02:00
Andrey Smirnov b65b137453 arm: Add both .lds files to CLEAN_FILES unconditionally
'clean' target is listed on 'no-dot-config-targets' list in main
Makefile so that conditional statement would yeild the same result
every time. Given how CLEAN_FILES are rm'ed with -f there should be no
harm in specifying them both unconditionally.

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-08-24 14:02:14 +02:00
Sascha Hauer 32570fd027 ARM: i.MX25: Provide a clock for the nand controller
The clock is needed to configure optimized timings, so provide
one.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-08-18 16:17:04 +02:00
Steffen Trumtrar a308f2eb31 ARM: socfpga: socrates: register bbu handlers
Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-08-18 08:19:25 +02:00
Steffen Trumtrar c926a121c0 ARM: socfpga: socrates: add qspi partitions
Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-08-18 08:19:25 +02:00
Steffen Trumtrar 55652c147d ARM: socfpga: socrates: set alias for ethernet0
Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-08-18 08:19:25 +02:00
Steffen Trumtrar 8a3aed7ef4 socfpga: remove dt entries that are upstream
Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-08-18 08:19:25 +02:00
Ulrich Ölmann 80a2e48b49 ARM: socfpga: xload: support more qspi partitions
Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de>
Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-08-18 08:19:25 +02:00
Vicente Bergas 2fb0ef2053 fix ARMv8 interference with ARMv7
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>
2016-08-15 11:16:23 +02:00
Sascha Hauer 14e04d019b Merge branch 'for-next/imx' 2016-08-03 08:08:23 +02:00
Sascha Hauer a253879abb Merge branch 'for-next/clps711x' 2016-08-03 08:08:23 +02:00
Uwe Kleine-König 74102fdf73 ARM: i.MX: pcm043: add a flash-header.imxcfg
This creates an image that can be booted via USB.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-08-03 07:32:43 +02:00
Alexander Kurz 0443a43aa0 ARM i.MX31: Add i2c register convenience functions
Signed-off-by: Alexander Kurz <akurz@blala.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-08-03 07:30:41 +02:00
Alexander Kurz 28a0baffb9 ARM i.MX31: add SPI support
The i.MX31 SPI interface was refered by freescale as spi_ver_0_4 in one
of their older vendor extended linux releases. spi_ver_0_4 differs only
in minor aspects to spi_ver_0_7 (i.MX35) which is already supported by
barebox.
Regarding barebox, the differences boil down to the location and length
of the CHIP SELECT and BIT COUNT/BURST LENGTH elements of CONREG. The
spi_ver_0_4 variant is limited to single word bursts with a maximum of
32 bits_per_word.

Add support for the i.MX31 SPI interface to the barebox spi_ver_0_7
implementation.

Signed-off-by: Alexander Kurz <akurz@blala.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-08-03 07:30:41 +02:00
Lucas Stach 0c61905025 ARM: nitrogen: rename to nitrogen6
Now that the MAX variant of the board is also supported by the
same code, rename the board directory to the more generic nitrogen6.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-08-03 07:30:41 +02:00
Lucas Stach b82e9f62d9 ARM: add support for Nitrogen6MAX QP variant
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-08-03 07:30:41 +02:00
Lucas Stach 550442a1a4 ARM: nitrogen6x: disable address mirroring
The Nitrogen boards don't need it and it's actively wrong
on the 4GB variants of those boards.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-08-03 07:30:41 +02:00
Lucas Stach ab3697d1de ARM: nitrogen6x: use imx6q_barebox_entry
Saves some boilerplate code by calculating the DRAM size
automatically.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-08-03 07:30:41 +02:00
Lucas Stach 470c90aa21 ARM: nitrogen6x: use upstream DTs
This gets rid of the (mostly) stub top level DTs in barebox
and switches the compatible to the proper "boundary" one.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-08-03 07:30:41 +02:00
Lucas Stach 4154abe271 ARM: imx: add QP as supported i.MX6 variant
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-08-03 07:30:41 +02:00
Ulrich Ölmann ea31b22e2e ARM: dts: i.MX6: update RIoTboard device tree
Barebox and kernel version diverged therefore bring the device tree up to date
with respect to the kernel being the reference.

Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de>
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-08-03 07:30:40 +02:00
Sascha Hauer 4d85cb974a include: Move bulk of boot.h to bootm.h
The majority of the stuff currently in include/boot.h is about bootm
code implemented common/bootm.c. To be more consistent move it to a
new file include/bootm.h.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-26 08:31:31 +02:00
Andrey Smirnov 80c91b67cc i.MX: ocotp: Register regmap against orignal device
Register regmap against orignal device passed to probe, this way further
in the code/call-chain cdev's device_node will be correctly populated
and it will be discoverable via cdev_by_device_node()

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-19 06:50:34 +02:00
Alexander Shiyan 30f03f8b09 ARM: clps711x: clep7212: Register board env during runtime
Register the board specific environment during runtime using
defaultenv_append_directory(). Also this patch updates default config.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-18 08:15:45 +02:00
Alexander Shiyan c0eb6dbb94 ARM: clps711x: Sync CLK susbsystem with kernel
Refactoring of CLPS711X CLK driver code to be compatible with
the current kernel. This change a bit makes easy of initializing
devices using CLKs.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-18 08:15:45 +02:00
Alexander Shiyan 3ef2d78de6 ARM: clps711x: clep7212: Increase the wait state for chip select 3
CS3 is used for a variety of external bus devices.
Increase the wait state for this chip select for the possibility
of more widespread use.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-18 08:15:45 +02:00
Teresa Remmet a78f42079b ARM: phytec-som-am335x: Remove kernel and oftree partiton in NAND
We store kernel and oftree in static UBI volumes now. No need
for seperate partitions any more.

Signed-off-by: Teresa Remmet <t.remmet@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-13 07:22:39 +02:00
Sascha Hauer 50543054eb Merge branch 'for-next/ubi' 2016-07-11 07:58:34 +02:00
Sascha Hauer 4daa7a20c9 Merge branch 'for-next/omap' 2016-07-11 07:58:34 +02:00
Sascha Hauer f64075972b Merge branch 'for-next/misc' 2016-07-11 07:58:33 +02:00
Sascha Hauer e2da792a52 Merge branch 'for-next/imx' 2016-07-11 07:58:33 +02:00
Sascha Hauer 3203cdfa7b Merge branch 'for-next/arm64' 2016-07-11 07:58:32 +02:00
Sascha Hauer 28d7f7878c Merge branch 'for-next/arm' 2016-07-11 07:58:32 +02:00
Alexander Kurz 4f0abb8db0 ARM i.MX35: Add support for the Amazon Kindle3
The Amazon Model No. D00901 Kindle3 is an E-Book reader based on the
i.MX35 SOC. The device boots in internal boot mode from a build-in eMMC,
alternatively the device may be set into USB-downloader mode when the
Vol+ key is pressed on startup.

Add support for this device and make barebox a drop-in replacement for
the factory shipped u-boot image.
Constraints for the use as drop-in replacement:
- imximg header (offset 0x400) has a maximum size of 2kB minus 16 byte
  since the last 16 bytes are used to store a vendor specific hardware
  desctription identifier
- the bootloader space (application plus env) is limited to 256kB minus
  16 bytes when installed with offset of 4kB (the u-boot offset was 3kB).
  A vendor specific device identifier is stored in the gap between
  application and kernel. The vendor specific identifiers should not
  be overwritten.

Notable features:
- Support for eMMC, USB, UART, I2C, SPI and Keys (except keyboard)
- Full support for vendor specific ATAGs
- usbserial barebox console access by pressing Select button at startup,
  alternatively full console support on connector J14.

Signed-off-by: Alexander Kurz <akurz@blala.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-11 07:51:44 +02:00
Uwe Kleine-König a157195b73 ARM: imx_defconfig: enable NAND_IMX_BBM and NAND_ALLOW_ERASE_BAD
The first is important for imx systems with NAND. The second is a useful
debug aid that doesn't change behaviour without being explicitly enabled
at runtime. So both should be safe.

The other changes result from MFD_MC13XXX and SPI_IMX being selected by
MACH_PCM038 since 4bd07a1039 ("arm: imx: select MFD_MC13XXX for all
boards that need it") and a move of a few Kconfig definitions in
7839011f61 ("bootm: Move bootm options to common/Kconfig").

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-11 07:49:23 +02:00
Alexander Shiyan 9d7abf2792 mfd: mc13xxx: VGEN1 and VGEN2 voltage bits positioned in "Regulator Setting 0" register
The bits VGEN10-11 and VGEN20-22 is positioned in the Regulator Setting 0
register. This patch fixes these definitions and board (Efika MX), which
uses this voltages.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-07 09:48:58 +02:00
Lucas Stach b06ecabed9 ARM: i.MX: iim: fix potential out of bounds array access
The check is off-by-one.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-07 09:44:46 +02:00
Sascha Hauer 8c8b38efbb ARM: i.MX: karo-tx6: Add support for the 512MiB i.MX6s variant
This adds support for the TX6S-8x35 board variant.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-06 16:27:20 +02:00
Raphael Poggi 10bf671754 arm: include: swab: use rigth assembly for armv8
Signed-off-by: Raphael Poggi <poggi.raph@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-06 11:23:50 +02:00
Raphael Poggi ac04e93326 arm: boards: add mach-qemu and virt64 board
Introduce mach-qemu and add qemu virt64 board which emulates arm64 board.

Signed-off-by: Raphael Poggi <poggi.raph@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-06 11:23:49 +02:00
Raphael Poggi 7cc98fbb61 arm: cpu: add basic arm64 mmu support
This commit adds basic mmu support, ie:
        - DMA cache handling is not supported
        - Remapping memory region also

The current mmu setting is:
        - 4KB granularity
        - 3 level lookup (skipping L0)
        - 33 bits per VA

This is based on coreboot and u-boot mmu configuration.

Signed-off-by: Raphael Poggi <poggi.raph@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-06 11:23:49 +02:00
Raphael Poggi ada79ea079 arm: cpu: disable code portion in armv8 case
Enclosed by #if directive OMAP specific code
and mmu_disable (ARMv8 code will implemented it somewhere else).

Signed-off-by: Raphael Poggi <poggi.raph@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-06 11:23:49 +02:00
Raphael Poggi 9159f08ae7 arm: cpu: cpuinfo: add armv8 support
Signed-off-by: Raphael Poggi <poggi.raph@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-06 11:23:49 +02:00
Raphael Poggi c606a266b7 arm: include: system_info: add armv8 identification
Signed-off-by: Raphael Poggi <poggi.raph@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-06 11:23:49 +02:00
Raphael Poggi 9ff1fbde76 arm: include: bitops: arm64 use generic __fls
Signed-off-by: Raphael Poggi <poggi.raph@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-06 11:23:49 +02:00
Raphael Poggi a5501914e6 arm: include: system: add arm64 helper functions
Signed-off-by: Raphael Poggi <poggi.raph@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-06 11:23:49 +02:00
Raphael Poggi 928cc6f4ee arm: cpu: add arm64 specific code
This patch adds arm64 specific codes, which are:
	- exception support
	- cache support
	- rework Makefile to support arm64

Signed-off-by: Raphael Poggi <poggi.raph@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-06 11:23:48 +02:00
Raphael Poggi e1287b1a8b arm: rework lib directory to support arm64
This commit create a common directory, lib/,
for arm and arm64 common code.

It also create lib32/ and lib64/ for 32bit
and 64bit code respectively.

Signed-off-by: Raphael Poggi <poggi.raph@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-06 11:23:48 +02:00
Raphael Poggi 375170a3c9 arm: Makefile: rework makefile to handle armv8
Signed-off-by: Raphael Poggi <poggi.raph@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-06 10:21:16 +02:00
Raphael Poggi 053957b306 arm64: add armv8 Kconfig entries
Signed-off-by: Raphael Poggi <poggi.raph@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-06 10:21:16 +02:00
Sascha Hauer e9edf7f61b ARM: bootm: Fix compiler warning
fixes:
arch/arm/lib/bootm.c:92:137: warning: comparison of distinct pointer
types lacks a cast

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-05 21:29:38 +02:00
Alexander Kurz 3f9c7ea2d8 ARM i.MX31 iomux: remove duplicates with alternate name
Three iomux were accessinble with two distinct names, typo?
Remove the unused duplicates.

Signed-off-by: Alexander Kurz <akurz@blala.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-04 11:48:03 +02:00
Alexander Kurz 492ce4431d ARM i.MX31 iomux: remove obvious duplicates
No need to define some of the iomux twice, remove the duplicates.

Signed-off-by: Alexander Kurz <akurz@blala.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-04 11:48:03 +02:00
Alexander Kurz ca07b91eff imx35-regs: add and use common CGR element shifters
Add some missing Clock Gate Register element shifters which were implemented
as magic numbers in the arm/boards directory. Use the new shifters for
inproved code readability.

Signed-off-by: Alexander Kurz <akurz@blala.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-04 11:47:58 +02:00
Stefan Müller-Klieser 6a218d456c ARM: bootm: recalculate decompression space
According to the kernel documentation it is recommended to place the
compressed image between 32 MiB and 128 MiB. The DTB and initrd should
be placed above 128 MiB. We will follow the recommendation as long as we
have enough RAM. If this is not the case, we fall back to the scheme.
This change is required because of the ARM default kernel config changes
regarding RODATA layout, which lead to an increased compression factor
of the kernel image.
This should be regarded as an intermediate solution until there is a
mechanism for the kernel image to report the decompressed layout
requirements to the bootloader.

Signed-off-by: Stefan Müller-Klieser <s.mueller-klieser@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-04 11:31:05 +02:00
Alexander Kurz 59a2582df5 eukrea-cpuimx35: Fix wrong clock gating for ESDHC1
With commit 962d8b89d2 ("imx35-regs: add defines for USB and SD") the
shifter argument for the iMX35 ESDHC1 CGR instance has been erroneously
assigned to CGR1 instead of CGR0. Fix this for the eukrea-cpuimx35 board.

Signed-off-by: Alexander Kurz <akurz@blala.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-04 09:32:56 +02:00
Alexander Kurz 2a760a7c1e ARM i.MX: de-duplicate PLL initializer macros
Macros for three PLL setups got cloned in different board specific subdirs.
Re-unify those macros into a common place and avoid checkpatch 80-char
warnings when creating a new board subdir.

Signed-off-by: Alexander Kurz <akurz@blala.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-04 09:31:41 +02:00
Alexander Kurz 7e97af8858 ARM: i.MX: central SOC type definition
Move the definition of iMX CPU types to an individual file to allow
on-purpose inclusion. Eliminate magic number CPU type encoding in the
scripts/imx subdir using the new include file.

Signed-off-by: Alexander Kurz <akurz@blala.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-04 09:30:56 +02:00
Alexander Shiyan 22247f0976 ARM: i.MX clk-pllv1: Do not use a negative value for the unsigned variable
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-06-30 08:45:59 +02:00
Alexander Shiyan 65a12abb52 ARM: i.MX clk-pllv2: Do not use a negative value for the unsigned variable
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-06-30 08:45:46 +02:00
Teresa Remmet 53bad16e00 ARM: phytec-som-am335x: Add backup partition for barebox
Add a redundant barebox partition to improve nand safety at
least a little bit.

Signed-off-by: Teresa Remmet <t.remmet@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-06-30 08:37:24 +02:00
Teresa Remmet 3368a42e72 OMAP: am33xx_bbu_nand: Extent barebox update handler
Make it possible to write barebox image to multiple partitions
like xload partitions.

Signed-off-by: Teresa Remmet <t.remmet@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-06-30 08:37:24 +02:00
Teresa Remmet 7bfb94f978 OMAP: xload: nand: Check for redundant barebox partition
Add a support for a redundant barebox backup partition if loading
barebox image from first barebox partitions fails.

Signed-off-by: Teresa Remmet <t.remmet@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-06-30 08:37:24 +02:00
Teresa Remmet 3280bc6331 OMAP: xload: Factor out reading image from mtd partition
Remove code duplication of reading images out of mtd partitions.

Signed-off-by: Teresa Remmet <t.remmet@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-06-30 08:37:24 +02:00
Alexander Kurz 0544df5be6 ARM: boot: add prepend option for board specific ATAGs
Board specific ATAGs might be passed to vendor provided kernels via the
ARM_BOARD_APPEND_ATAG option. In this case, the board specific ATAGs will
be appended to the end of the ATAG list.
Anyway, some vendor provided kernels might crop the ATAG list at ATAG_MEM,
also chopping off the board specific ATAGs, see linux squash_mem_tags() as
reference. The Kindle-3 kernel is one example.

This conflict might be solved by a) making ATAG_MEM optional which might break
the existing behavour around squash_mem_tags() or b) by allowing the insertion
of board specific ATAGs in front of ATAG_MEM which violates the requirement
from Documentation/arm/Booting to order ATAGs by increasing address.

Add option to insert board specific ATAGs in front of ATAG_MEM.

Signed-off-by: Alexander Kurz <akurz@blala.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-06-29 08:20:28 +02:00
Teresa Remmet 2c310bd8a9 ARM: am335x_defconfig: Enable ubi fastmap and ubifs
Enable support for ubifs and ubi fastmap.

Signed-off-by: Teresa Remmet <t.remmet@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-06-28 07:34:27 +02:00
Alexander Kurz db77cf3486 ARM iMX53: avoid magic number addressing for internal RAM
The imx53 SOC features 128kB of internal SRAM which is commonly used in
early stages of barebox to store the stack. Avoid magic numbers while
addressing this RAM.

Signed-off-by: Alexander Kurz <akurz@blala.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-06-27 11:04:14 +02:00
Alexander Kurz 02ac9feb3d ARM: imx_v7_defconfig: enable LED_GPIO_OF
GPIO leds are widely used in imx_v7 related dts files. Enable support
to parse this data and enable blinking LED by defconfig on e.g. iMX53qsb.

Signed-off-by: Alexander Kurz <akurz@blala.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-06-27 11:01:45 +02:00
Alexander Shiyan 34e6fd9189 ARM: i.MX: Remove unused procedure imx25_setup_weimcs
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-06-27 08:52:35 +02:00
Alexander Shiyan 6de2627a41 ARM: boards: variscite-mx6: Remove the excess assignment
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-06-20 08:34:16 +02:00
Sascha Hauer 849cd5cdb4 ARM: start: drop unnecessary variable
No need anymore to store arm_head_bottom globally as it's only used
in barebox_non_pbl_start(). Also rename the variable to malloc_end
which is more meaningful.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-06-20 08:30:34 +02:00
Sascha Hauer 0aa0bfc944 ARM: start: simplify board_data sdram allocation
We already have a pointer for barebox_boarddata, so use it to
request the corresponding SDRAM region instead of calculating
it again.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-06-20 08:30:34 +02:00
Sascha Hauer 1e992a195c ARM: start: do not change barebox_boarddata
barebox_boarddata should stay the original boarddata and not
be modified. Keep a local pointer in barebox_arm_boot_dtb()
instead.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-06-20 08:30:34 +02:00
Sascha Hauer 22d7d604f1 ARM: start: Fix arm_mem_barebox_image for !CONFIG_RELOCATABLE
Fixes: 65071bd arm: Clarify memory layout calculation

arm_mem_barebox_image() shall return the beginning of the barebox
image (and thus the end of the malloc region). For relocatable
images we can return a suitable location, but for non relocatable
images we do not have a choice: We must return TEXT_BASE. If TEXT_BASE
happens to be outside the memory region between membase and endmem
we can return the base of the ramoops area.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Markus Pargmann <mpa@pengutronix.de>
2016-06-20 08:30:22 +02:00
Sascha Hauer d395a2d561 Merge branch 'for-next/mxs' 2016-06-14 09:13:41 +02:00
Sascha Hauer 0fcd7fdbb9 Merge branch 'for-next/imx' 2016-06-14 09:13:40 +02:00
Sascha Hauer 8b9a7f6dd9 Merge branch 'for-next/dts' 2016-06-14 09:13:39 +02:00
Sascha Hauer 2b948a834c Merge branch 'for-next/bootm' 2016-06-14 09:13:35 +02:00
Sascha Hauer bfcdde1553 Merge branch 'for-next/arm' 2016-06-14 09:13:26 +02:00
Sascha Hauer 86186c2322 dts: update to v4.7-rc1
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-06-13 12:43:53 +02:00
Lucas Stach 688c3035eb ARM: mba53: include barebox TQMa53 overlay DT
The barebox specific properties have not been applied as
the TQMa53 overlay DT has not been included. Fix this.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-06-01 09:28:09 +02:00
Alexander Shiyan fd5f9fc3ab MCI: imx-esdhc: Allow to use 1-bit bus width in board files
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-05-31 08:23:45 +02:00
Alexander Shiyan 268e2cee78 ARM: clps711x: Simplify clock initialization
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-05-23 09:51:13 +02:00
Alexander Shiyan 1b47607e89 ARM: imx51: Remove stale comment
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-05-23 09:49:41 +02:00
Sascha Hauer f2b07274d5 ARM: i.MX: iim: Remove debug printk
The dev_info is a debug leftover that was never intended to go upstream.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-05-20 07:59:35 +02:00
Andrey Smirnov ccebda1d4c aiodev: Add TEMPMON driver
Port TEMPMON driver from U-Boot

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-05-18 07:48:09 +02:00
Sascha Hauer daa1c4d511 ARM: i.MX: HABv3: Set to production mode
The HABv3 images for engineering mode do not work on a production device
and the images for production mode do not work on an engineering device.

When in engineering mode the ROM checks the images, but does not stop
booting when the signatures are wrong. This means a production image
can still be booted on an engineering device. This device can be
temporarily put into production mode by writing to the HAB_TYPE shadow
fuse register. After a reset the device will come up in production mode
and the image can be tested for validity. This means that if we have to
decide between production mode images and engineering images, the
production images are a better decision. Change this accordingly.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-05-17 11:04:06 +02:00
Sascha Hauer aee7f5c561 ARM: i.MX: IIM: Add function to enable permanent write
This adds a function to enable/disable permanent write for the IIM
module so that C users no longer have to fiddle with device parameters.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-05-17 11:03:59 +02:00
Sascha Hauer 11e32a5a46 ARM: i.MX: IIM: Add functions to access fuses field wise
Accessing the IIM registers is cumbersome. The fuses are documented with
different register strides and there is no header file available, so the
different fields have to be read in the datasheets and translated into
the barebox format over and over again. This patch adds a header file
which has defines for the various fuses (for i.MX25 only so far, but
others can be added later) along with C functions to read/write the
fields.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-05-17 11:03:54 +02:00
Sascha Hauer 7839011f61 bootm: Move bootm options to common/Kconfig
bootm has a C API, so the bootm options have to depend on the
option providing the bootm code (CONFIG_BOOTM), not on the
option providing the command (CONFIG_CMD_BOOTM). Fixing the
dependencies makes it possible to fully use bootm from C without
enabling the bootm command support.
This also removes the CMD_ prefix from the options which means
we have to update the defconfigs aswell.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-05-10 14:51:58 +02:00
Uwe Kleine-König 5399f211e6 ARM: mxs: add parameter to mx28_mem_init to allow custom memory config
Rename the already global array of default memory settings to make the
intended usage more obvious.

Also make generous use of the const keyword.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-05-10 08:13:48 +02:00
Sascha Hauer fd2f990204 Merge branch 'for-next/mtd' 2016-05-09 08:49:43 +02:00
Sascha Hauer 4cb8e17aa3 Merge branch 'for-next/misc' 2016-05-09 08:49:43 +02:00
Sascha Hauer 854df603da Merge branch 'for-next/include-pdata' 2016-05-09 08:49:42 +02:00
Sascha Hauer 55aca0a48c Merge branch 'for-next/include-cleanup' 2016-05-09 08:49:42 +02:00
Sascha Hauer 216f412ede Merge branch 'for-next/imx6-phytec' 2016-05-09 08:49:42 +02:00
Sascha Hauer 21981dbe6c Merge branch 'for-next/imx' 2016-05-09 08:49:42 +02:00
Sascha Hauer 23debc6fd9 Merge branch 'for-next/arm' 2016-05-09 08:49:42 +02:00
Stefan Christ 07511ba347 ARM: phytec-som-imx6: add automount for first partition on eMMC
For the phyCORE-i.MX6 add an automount command for the first partition
on the eMMC device.

Signed-off-by: Stefan Christ <s.christ@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-05-04 15:00:45 +02:00
Stefan Christ 95e1132633 ARM: phytec-som-imx6: add NOR for phycore-imx6 emmc
Enable NOR for phyCORE-i.MX6 DualLite and Quad eMMC variants.

Furthermore add an extra 'status = "disabled"' in the flash node.  It
has no functional effect, because the SPI bus node 'ecspi1' is disabled,
too.

Signed-off-by: Stefan Christ <s.christ@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-05-02 08:14:15 +02:00
Stefan Christ a6ec1b51a9 ARM: phytec-som-imx6: adapt main update handler for eMMC
Some phyCORE-i.MX6 variants have eMMC instead of a NAND chip. Provide an
update_handler for them.

Signed-off-by: Stefan Christ <s.christ@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-05-02 08:14:14 +02:00
Stefan Christ ac02c15b89 ARM: phytec-som-imx6: rename environment folder
The extra environment folder for the phyCORE-i.MX6 had the suffix
'-mira'. That's the name of a baseboard. Since the bootloader is generic
for all baseboards, use a generic suffix for the environment folder.

Signed-off-by: Stefan Christ <s.christ@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-05-02 08:14:12 +02:00
Stefan Christ da3938fbb8 ARM: phytec-som-imx6: update RAM calibration for phycore-imx6dl
Update RAM calibration values in the flashheader file for phyCORE-i.MX6
DualLite/Solo. These are verified and tested in the climatic chamber for
commercial, extended commercial, industrial and automotive i.MX6
variants.

Signed-off-by: Stefan Christ <s.christ@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-05-02 08:13:00 +02:00
Stefan Christ 313e01f83f ARM: phytec-som-imx6: add phyCORE-i.MX6 DualLite
Add Phytec phyCORE-i.MX6 SOM.
  Support:
   - imx6dl-phytec-phycore-som-emmc:
      - 1GB RAM on 1 Bank with 64Bit
      - 10/100MBit Ethernet
      - SPI NOR
      - eMMC
      - SD
      - UART

Signed-off-by: Stefan Christ <s.christ@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-05-02 08:13:00 +02:00
Christian Hemp cb3fc0d022 ARM: phytec-som-imx6: add phyCORE-i.MX6 Quad 2GiB RAM
Add new Phytec phyCORE-i.MX6 SOM:
  Support:
    - imx6q-phytec-phycore-som-emmc:
       - 2GiB RAM on 1 Bank with 64Bit
       - 1GBit Ethernet
       - SPI NOR
       - eMMC
       - SD
       - UART

Signed-off-by: Christian Hemp <c.hemp@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-05-02 08:13:00 +02:00
Stefan Christ c3318ae77f ARM: phytec-som-imx6: fix bootsource for phyCORE-i.MX6
The phyCORE-i.MX6 has either a NAND or EMMC storage device and an
external SD-Card interface. The automatic bootsource detection in the
barebox environment should reflect that.

- If the board was booted from the external SD-Card interface, it should
  continue loading the kernel and device tree from it.

- If the board was booted from EMMC, it should load kernel and device
  tree from the boot partition on the EMMC.

Signed-off-by: Stefan Christ <s.christ@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-05-02 08:13:00 +02:00
Stefan Christ 0a7a5e73aa ARM: phytec-som-imx6: add barebox partitions for MMC
Add missing MMC barebox environment partitions for the phyCORE-i.MX6
with EMMC. Otherwise the barebox cannot find the environment, when the
board is boot from sd-card.

Signed-off-by: Stefan Christ <s.christ@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-05-02 08:10:15 +02:00
Stefan Christ 52fdd510de ARM: dts: pfla02: use long enough reset for ethernet phy
Use a longer reset time for ethernet phy Micrel KSZ9031RNX.  Otherwise a
small percentage of modules have 'transmission timeouts' errors like

   barebox@Phytec phyFLEX-i.MX6 Quad Carrier-Board:/ ifup eth0
   warning: No MAC address set. Using random address 7e:94:4d:02:f8:f3
   eth0: 1000Mbps full duplex link detected
   eth0: transmission timeout
   T eth0: transmission timeout
   T eth0: transmission timeout
   T eth0: transmission timeout
   T eth0: transmission timeout

Signed-off-by: Stefan Christ <s.christ@phytec.de>
Signed-off-by: Christian Hemp <c.hemp@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-05-02 08:10:15 +02:00
Stefan Christ 90b2fa7e38 ARM: dts: imx6: phyboards: reduce clock speed for usdhc3
Due to hardware issues the usdhc3 interface on phyBOARD-ALCOR i.MX6 and
phyBOARD-SUBRA i.MX6 doesn't work reliable at 50Mhz.  You get
communication errors like

    barebox@Phytec phyBOARD SUBRA:/ ls /mnt/mmc/
    mmc2: detected SD card version 2.0
    mmc2: registered mmc2
    imx-esdhc 2198000.usdhc: timeout 2
    mmc2: Cannot read MBR/partition table

Therefore reduce the maximum clock speed to avoid these problems.

Signed-off-by: Stefan Christ <s.christ@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-05-02 08:10:15 +02:00
Jan Remmet 6444998184 imx6qdl-phytec-pfla02.dtsi: add i2c eeprom
add atmel,24c32 mounted on module

Signed-off-by: Jan Remmet <j.remmet@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-05-02 08:10:15 +02:00
Stefan Christ ca5964bf0b ARM: imx6q: add support for phyBOARD-SUBRA-i.MX6 Quad
Add support for phyBOARD-SUBRA-i.MX6 with phyFLEX-i.MX6 Quad 1GiB on one
bank. This patch factors out the common device tree nodes for the Quad
and Solo variant into 'imx6qdl-phytec-phyboard-subra.dtsi'.

Signed-off-by: Stefan Christ <s.christ@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-05-02 08:10:01 +02:00
Stefan Christ 8b0a448300 ARM: imx_v7_defconfig: add command mmc_extcsd
Enable the mmc_extcsd command to read and write MMC/eMMC registers.

Signed-off-by: Stefan Christ <s.christ@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-05-02 08:10:01 +02:00
Stefan Christ 075de1e537 ARM: imx_v7_defconfig: enable NANDTEST command
Signed-off-by: Stefan Christ <s.christ@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-05-02 08:10:01 +02:00
Sascha Hauer 9d5cf8d427 ARM: i.MX: karo-tx6: Add support for the 2GiB i.MX6q+ board variant
Different SDRAM setup, but same board otherwise.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-04-28 16:15:54 +02:00