Commit graph

14976 commits

Author SHA1 Message Date
Sascha Hauer
75ee6ab076 mtd: ubi: enable thread earlier
Since "57cebc4 mtd: ubi: Fix scrubbing during attach" we make sure
that the wear level worker does not start too early. However, now
there are cases when the worker starts too late. When a ubi image is
freshly written a volume may be autoresized. This has to be done
after the wear level worker is started because otherwise the initial
fastmap update will not be able to find any anchor PEBs.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-10-19 14:49:10 +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
Yegor Yefremov
ee5e6c0115 boot: add '-w' parameter to usage help text
Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-10-12 08:47:57 +02:00
Sascha Hauer
57cebc46f7 mtd: ubi: Fix scrubbing during attach
ensure_wear_leveling() is called at the end of ubi_wl_init() and may
come to the decision to scrub some blocks. In the Kernel this is done
in a separate thread, but in barebox we do this synchronously. The
problem is that during ubi_wl_init() the EBA system is not yet
initialized (ubi_eba_init() is not yet called), so the wear level worker
hits a NULL pointer deref when the fastmap needs to be updated and
ubi_write_fastmap() accesses vol->eba_tbl.

Solve this by honoring the ubi->thread_enabled flag which is only set
to true when UBI is sufficiently initialized. This means we now can
have multiple works queued, so we can no longer simply do one work when
queued, but instead have to continue to do work until all work is done.
The best place to do so is a ubi_thread() function which behaves similar
to the Kernel function with the same name, but is called synchronously
in barebox. To make sure that the initially queued works are done, the
call to (no-op) wake_up_process() at the end of ubi_attach_mtd_dev()
is replaced with a call to ubi_thread().

While at it also honor the ubi->ro_mode flag to make sure we do not do
any wear leveling work on readonly UBI devices.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-10-11 08:44:12 +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
385c95c60b Merge branch 'for-next/ubi' 2016-10-10 08:31:08 +02:00
Sascha Hauer
179d4060e8 Merge branch 'for-next/state' 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
b85e0cba7d Merge branch 'for-next/mtd' 2016-10-10 08:31:07 +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
a620e015e1 Merge branch 'for-next/dts' 2016-10-10 08:31:06 +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
Sascha Hauer
23aa3d6ffb Release v2016.10.0
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-10-10 08:24:57 +02:00
Uwe Kleine-König
d66e242213 ARM: mvebu: document some general mvebu stuff and the rn2120 board
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
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
Sascha Hauer
e4a45c0961 completion: Fix completion for devices with a dot in the name
Devices can have a dot in the name, so do not expect the full
device name before the first dot.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-10-07 09:09:01 +02:00
Sascha Hauer
f5d77d80f5 Allow device parameters for devices with dots in name
Devices can have a dot in the name, so we can't expect to find the
full device name before the first dot. Currently parameters of devices
with a dot in the name are inaccessible from the shell.
Fix this by iterating over the possible device name / parameter name
combinations to find a existing combination.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-10-07 09:07:41 +02:00
Uwe Kleine-König
8aed8106c2 pinctrl: mvebu: armada-370 fix gpio name for mpp63
It was found that pin 63 also works as input and so the respective function
is renamed from "gpo" to "gpio". The respective commit in Linux is:

	a526973e0291 ("pinctrl: mvebu: Fix mapping of pin 63 (gpo -> gpio)")

which appeared in v4.1-rc3. The devicetrees are fixed accordingly since
commit

	ce5cad51f381 ("ARM: dts: armada-370: Update the mpp63 function in the device tree on Armada 370")

which appeared in v4.6-rc1.

This fixes a runtime warning on the affected machines
(globalscale-mirabox and netgear-rn104) and makes the pin functional
again.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-10-04 21:14:20 +02:00
Uwe Kleine-König
44eeb85eb1 pinctrl: mvebu: add newline to error message
Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-10-04 21:14:20 +02:00
Uwe Kleine-König
9cdfd7ab97 images: mvebu: don't generate uart images
kwboot knows how to work with an image for a different boot medium now.
So there is no reason to generate a dedicated UART image any more.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-10-04 21:14:20 +02:00
Uwe Kleine-König
481274a935 scripts: kwboot: set boot source to UART before sending
Sending an image that specifies one of the alternative boot sources doesn't
make sense. So change the boot source to UART on the fly.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-10-04 21:14:20 +02:00
Uwe Kleine-König
90184dbc36 scripts: kwboot: simplify kwboot_mmap_image
There was only a single caller who passes prot=PROT_READ unconditionally.
So drop this parameter and simplify accordingly.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-10-04 21:14:19 +02:00
Uwe Kleine-König
ebec445092 scripts: kwboot: shorten delay between two boot messages
Together with the previous changes that allow to handle the scenario where
too many messages were sent, this greatly improves the probability to hit
the time window during which the CPU accepts a boot message.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-10-04 21:14:19 +02:00
Uwe Kleine-König
1a64dd3854 scripts: kwboot: improve diagnostic output
After entering uart boot mode the CPU prints some diagnostic messages.
Showing them to the user helps her to notice when the message window was
missed or there is an other problem.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-10-04 21:14:19 +02:00
Uwe Kleine-König
446ff0216e scripts: kwboot: flush input and output only once
When flushing input before sending of a boot message the acknowledging
reply for the previous message from the CPU might be discarded and so
missed.

So only flush once before sending boot messages in a loop.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-10-04 21:14:19 +02:00
Uwe Kleine-König
331391d686 scripts: kwboot: try to resync on packet boundary after receiving a NAK
If we sent the boot message too often the CPU might already have started
to interpret this as an xmodem packet. As sender and receiver are not in
sync it's impossible to transfer a packet successfully.

So when we get a NAK send '\xff' bytes until the receiver reaches the
packet boundary. When we send too many the SoC replies with a NAK for
each byte and doesn't interpret it as the start of a new package (which
must start with SOH == '\x01').

A slower alternative would be to wait for another NAK which is sent when
reception of the already started packet times out.

This was tested on an Armada XP based machine with bootrom version 1.20.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-10-04 21:13:54 +02:00
Antony Pavlov
098635daba sandbox: Makefile: drop unused SUBARCH stuff
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-10-04 08:15:46 +02:00
Uwe Kleine-König
84a4369d33 net/phy: marvell: fix error handling
Without first assigning to ret it doesn't make sense to check it.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-10-04 08:15:01 +02:00
Lucas Stach
38c0c1105a arm64: don't allow to build relocatable image
The current ARM64 implementation is lacking the lowlevel functions
to do the relocation. Don't allow to select it.

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
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
Lucas Stach
efe3b512e5 video: tc358767: depend on EDID helpers
The eDP part need to be able to read the panel EDID.

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
5d60df68a0 mfd: syscon: drop EXPORT_SYMBOL for static function
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-10-04 08:12:18 +02:00
Lucas Stach
166709ab51 serial: arm_dcc: depend on !CPU_V8
The DCC console uses coprocessor registers registers accesses, the
implementation of those for ARMv8 is currently missing.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-10-04 08:12:18 +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
9458b491a4 dts: update to v4.8-rc8
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-09-29 14:38:38 +02:00