9
0
Fork 0
Commit Graph

4670 Commits

Author SHA1 Message Date
Jan Luebbe 1fce712aa7 phytec-phycore: partially move partition setup from dtsi to dts
The partition layout is board-specific, so only the barebox partitions
need to be in the fixed location expected by the MLO code.

Signed-off-by: Jan Luebbe <jluebbe@debian.org>
2017-03-30 20:23:47 +02:00
Holger Hans Peter Freyther 5b7fa7b059 odu: Send a LLDP frame on boot
We need to wait some time between activating the ethernet and
being able to send the first frame. I have not investigated why
that is the case.

Fixes: SYS#488
2017-03-30 20:23:47 +02:00
Jan Luebbe d56b407d86 sysmobts: add support for the sysmobts v2 2017-03-30 20:23:46 +02:00
Jan Luebbe 05ae0684e0 arm: davinci: add dm644x clock and PSC support 2017-03-30 20:23:46 +02:00
Lucas Stach 26a1aedb1b ARM: mvebu: only build kwbootimage support if BOOTM is enabled
As this is the bootm image handler implementation for the kwbootimage
it is of no use if BOOTM is missing and fails to link.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-03-22 07:59:25 +01:00
Lucas Stach ac0c067f2b ARM: add AFLAGS for secure monitor files
The instructions used in those files are only supported on ARMv7.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-03-22 07:59:25 +01:00
Alexander Kurz 82c065d276 ARM: dts: i.MX7 WaRP7: remove wdog1 pinctrl workaround
The wdog1 pinctrl got fixed with linux upstream commit 213e51ca8df1 ("ARM:
dts: imx7: Add "LPSR" to LPSR iomux pin names").
Remove the old workaround, since it triggers a build error.

Signed-off-by: Alexander Kurz <akurz@blala.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-03-20 08:33:00 +01:00
Alexander Kurz d711adeec8 ARM: i.MX7: Kconfig: ARCH_IMX7 selects PINCTRL_IMX_IOMUX_V3
fsl,imx7d-iomuxc is provided by selecting PINCTRL_IMX_IOMUX_V3. Select it
since a system without it will not be very usefull.

Signed-off-by: Alexander Kurz <akurz@blala.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-03-20 08:30:27 +01:00
Yegor Yefremov 2846e53d2d arm: baltos: define baltos_sram_init() return type as void
As stated in the routine's description this routine is to return void,
hence fix its declaration to remove compiler warning.

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-03-13 09:13:17 +01:00
Sascha Hauer a2e3bad25f Merge branch 'for-next/rpi' 2017-03-13 08:16:44 +01:00
Sascha Hauer 6134116686 Merge branch 'for-next/mvebu' 2017-03-13 08:16:44 +01:00
Sascha Hauer 4e11672653 Merge branch 'for-next/imx' 2017-03-13 08:16:44 +01:00
Sascha Hauer 56d9a9815a Merge branch 'for-next/at91' 2017-03-13 08:16:38 +01:00
Andrey Smirnov a76714f7f9 clocksource: at91: Move to 'drivers/clocksource'
Move PIT driver code to 'drivers/clocsource' and accomodate it by
adjusting Kconfig variables. Rename the file to 'timer-atmel-pit.c' to
re-align the driver with code in Linux kernel.

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-03-09 11:51:28 +01:00
Andrey Smirnov 2574148ad9 at91: Fix bug/typo in debug_ll.h
Correct "COFNIG" to "CONFIG".

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-03-09 08:13:38 +01:00
Oleksij Rempel 19d5f3a77f ARM: imx233-olinuxino: add CONFIG_CONSOLE_ACTIVATE_ALL
if not set, barebox will use first console by default.
On this board first console is KEYBOARD_GPIO, so we will end
in unusable state.

Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-03-09 08:02:18 +01:00
Oleksij Rempel 3ca576cc4a scripts: imx/mxs remove mxs-usb-loader
... and use imx-usb-loader instead

Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-03-09 07:57:52 +01:00
Lucas Stach 7497685b05 ARM: execute DMB before trying to flush cache
The CPU write buffer needs to be coherent with the cache, otherwise
we might flush stale entries with the actual data stuck in the cache.

This is really important on newer CPU core with bigger write buffers.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-03-03 07:06:06 +01:00
Lucas Stach d92ce9b36a ARM: correctly identify ARMv6 K/Z
The ARMv6 K/Z derivatives have a v7 compatible MMU, but all other parts
(including the cache handling) is still at v6. As we don't make use of
the more advanced features of the v7 MMU in Barebox, it's okay to just
override this to properly identify the CPU as ARMv6.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-03-03 07:06:06 +01:00
Lucas Stach 0d0b426a67 ARM: align exception vectors to 32 byte
On ARMv7 the exception vectors inside the barebox binary are used directly
by remapping the vectors base through the VBAR register. While VBAR allows
to remap the exception vectors freely, it still imposes a minimum alignment
of 32 byte, as the lower bits are treated as the exception vector offset.
Enforce this alignment inside the barebox binary.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-03-03 07:06:06 +01:00
Uwe Kleine-König 222078a38c mvebu: netgear-rn2120: make use of mvebu_get_initial_int_reg_base
This is necessary to make second stage booting work when the register
window is already moved.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2017-03-02 14:03:43 +01:00
Uwe Kleine-König 823d08e3e2 kwbimage_v1: add support to boot a mvebu image
This just starts the main image of the mvebu image assuming that the
header images just setup the RAM. The position of the internal register
window is provided in the header as introduced in the previous commit.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2017-03-02 14:03:43 +01:00
Uwe Kleine-König f15bb506aa mvebu: get initial position of register window from image header
A problem when using 2nd stage booting on mvebu is that the first bootloader
already switched the register window location from 0xd0000000 to
0xf1000000 by writing to 0xd0000080. When the second bootloader also
tries to do this switch it writes to the wrong location resulting in an
exception and so a boot failure.

For this reason the base address of the register window is passed in the
barebox header and picked up from there by early code. In a further
patch bootm is taught to put the actual position of the window there for
the second bootloader to finally make second stage booting work.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2017-03-02 14:03:43 +01:00
Uwe Kleine-König 7ada71351b mvebu: rn2120: Make available all RAM
binary.0 sets up all RAM but the address decoding isn't adapted accordingly
which makes barebox assume that there are only 512 MiB of RAM on a single
bank instead of two banks with 1 GiB each.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2017-03-02 14:03:43 +01:00
Uwe Kleine-König 59cce42f38 mvebu: kirkwood: simplify soc init code flow
Similar to the two previous commits, this gets rid of a of-fixup which
is strange because the soc init stuff is rerun then when a new dt for
booting into Linux is loaded.

The initcall must be postponed to post-core to ensure
of_machine_is_compatible is working correctly.

The call to mvebu_mbus_add_range is moved to drivers/bus/mvebu-mbus.c to
ensure it's registered early enough.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-03-02 14:03:43 +01:00
Uwe Kleine-König f8d4f622c9 mvebu: dove: simplify soc init code flow
Similar to the previous commit, this gets rid of a of-fixup which is
strange because the soc init stuff is rerun then when a new dt for
booting into Linux is loaded.

The initcall must be postponed to post-core to ensure
of_machine_is_compatible is working correctly.

The call to mvebu_mbus_add_range is moved to drivers/bus/mvebu-mbus.c to
ensure it's registered early enough.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-03-02 14:03:43 +01:00
Uwe Kleine-König 8a5edc9e99 mvebu: armada-370-xp: simplify soc init code flow
This gets rid of a of-fixup which is strange because the soc init stuff
is rerun then when a new dt for booting into Linux is loaded.

The initcall must be postponed to post-core to ensure
of_machine_is_compatible is working correctly.

The call to mvebu_mbus_add_range is moved to drivers/bus/mvebu-mbus.c to
ensure it's registered early enough.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-03-02 14:03:43 +01:00
Lucas Stach e8fab18835 ARM: rpi: switch to DT probe and multi-image build
This commit switches the RaspberryPi arch over to probe Barebox
from the builtin DT and enables multi-image builds.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-03-02 09:11:24 +01:00
Lucas Stach e0e2a4d8cc ARM: rpi: move debug UART base selection to Kconfig
To let the user select the right base, when building multi-image.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-03-02 09:11:24 +01:00
Lucas Stach cf2448a584 ARM: rpi: always build relocatable image
Makes more space available for the malloc area and will allow
to switch to multi-image later on.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-03-02 09:11:24 +01:00
Lucas Stach 26bf828036 ARM: rpi: convert watchdog/reset to regular driver
This way it can be probed from DT later on.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-03-02 09:11:23 +01:00
Lucas Stach 63e67a9633 ARM: rpi: convert mailbox interface to regular driver
In prepareation for devicetree probing.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-03-02 09:11:23 +01:00
Lucas Stach fe506e132c ARM: rpi: move model detection before console init
This way we can print the correct model in the Barebox banner.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-03-02 09:11:23 +01:00
Enrico Joerns 5d5e1c112a ARM: rpi: move model initialisation to rpi-common
The Raspberry PIs use different versions schemes for the older and newer
variants. The decoding arrays for these schemes were split up in rpi.c
and rpi2.c. This is not required, as the appropriate versioning scheme
can be determined programmatically.

Signed-off-by: Enrico Joerns <ejo@pengutronix.de>
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-03-02 09:11:23 +01:00
Daniel Schultz 6d76aaf1bc arm: boards: phytec-som-am335x: Remove 1GB RAM type
This machine was a prototype and was never shipped to customers.

Since it has no dependencies to any image, it can be removed.

Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-03-01 16:08:40 +01:00
Alexander Kurz a02e9d5082 ARM: i.MX50: do not pass base address to imx53_boot_save_loc
This is a follow-up on commit cf3dfafff4.

Signed-off-by: Alexander Kurz <akurz@blala.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-02-22 09:14:17 +01:00
Uwe Kleine-König 8175ff1df4 arm: imx: don't let MACH_SABRELITE select HAVE_PBL_MULTI_IMAGES
MACH_SABRELITE is only selectable if IMX_MULTI_BOARDS is enabled. The latter
already selects HAVE_PBL_MULTI_IMAGES.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-02-16 08:17:20 +01:00
Uwe Kleine-König f05c6e095c mvebu: rework how memory is detected
Status quo is that initially a size of 64 MiB is assumed (which is also
used to determine the size of the malloc area) and then later the dtb
is fixed up with the actually available RAM which is then used.

Instead detect the real RAM size earlier and don't fixup the device tree.
The device tree is fixed up instead by generic code. This way the malloc
area is more appropriately sized and RAM detection is more similar to mach-imx
which is both nice.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-02-16 08:16:27 +01:00
Uwe Kleine-König dc90472055 mvebu: remove unused function barebox_arm_reset_vector
This isn't needed since mvebu was converted to multi-pbl

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-02-16 08:15:47 +01:00
Uwe Kleine-König 708af51dce mvebu: simplify detection and fixup of MV78230-A0
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-02-16 08:15:47 +01:00
Peter Rosin 31e16d1769 at91: serial: pullup RX pins, do not pullup TX pins
We have a number of sama5d3 devices that sometimes hangs at the
barebox prompt during boot due to floating RX pins. This patch
fixes the problem for us (and probably others). It is similar in
nature to linux kernel commit 138c2b2f175b ("ARM: dts: at91: fixes
dbgu pinctrl, set pullup on rx, clear pullup on tx")

While at it, remove pointless waste of power that the pullup of
the TX pins causes and fix the signal comments for SAMA5D4.

Signed-off-by: Peter Rosin <peda@axentia.se>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-02-14 08:54:59 +01:00
Sascha Hauer 497671d31b ARM: i.MX: iim: Only register actually equipped fuses
The IIM unit in defferent i.MX SoCs is always the same, but the
number of actually equipped fuses differs between the SoCs.
Reading nonexistent fuses oopses, so only register the fuses
we can actually read.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-02-14 08:51:28 +01:00
Sascha Hauer 30139163b7 Merge branch 'for-next/imx' 2017-02-13 09:26:04 +01:00
Sascha Hauer 19df384cec ARM: i.MX7: Add PSCI support
This adds the SoC specific PSCI bits for i.MX7. Based on the
corresponding U-Boot code.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-02-13 08:35:42 +01:00
Sascha Hauer cc407b4113 ARM: Add PSCI support
This patch contains the barebox implementation for the ARM
"Power State Coordination Interface" (PSCI).

The interface is aimed at the generalization of code in the following
power management scenarios:
* Core idle management.
* Dynamic addition and removal of cores, and secondary core boot.
* big.LITTLE migration.
* System shutdown and reset.

In practice, all that's currently implemented is a way to enable the
secondary core one some SoCs.

With PSCI the Kernel is either started in nonsecure or in Hypervisor
mode and PSCI is used to apply power to the secondary cores.

The start mode is passed in the global.bootm.secure_state variable. This
enum can contain "secure" (Kernel is started in secure mode, means no
PSCI), "nonsecure" (Kernel is started in nonsecure mode, PSCI available)
or "hyp" (Kernel is started in hyp mode, meaning it can support
virtualization).

We currently only support putting the secure monitor code into SDRAM,
which means we always steal some amount of memory from the Kernel.
To keep things simple for now we simply keep the whole barebox binary in
memory

The PSCI support has been tested on i.MX7 only so far. The only
supported operations are CPU_ON and CPU_OFF.

The PSCI and secure monitor code is based on the corresponding U-Boot
code.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-02-13 08:35:42 +01:00
Wadim Egorov 436fb44220 config: Set UART port 2 as debug port
Signed-off-by: Wadim Egorov <w.egorov@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-02-10 13:19:40 +01:00
Wadim Egorov 14c6fc99e1 ARM: phycore-rk3288: Use UART2 as debug output
RK3288's UART2 is the default debug uart interface.

Signed-off-by: Wadim Egorov <w.egorov@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-02-10 13:19:40 +01:00
Sascha Hauer 857f69ba8c ARM: start: Fix image size calculation
In barebox_non_pbl_start() we do not run at the address we are linked
at, so we must read linker variables using ld_var(). Since ld_var()
current is not available on arm64 we create two zero sized arrays,
one at the begin of the image and one at the end. The difference
between both is the image size we are looking for.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-02-08 12:03:20 +01:00
Sascha Hauer cdf33e6ecf ARM: Add smc call support
Taken from the Kernel: A wrapper to make a smc call from C.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-02-08 09:18:57 +01:00
Sascha Hauer b94205dc97 ARM: Add UNWIND macro
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-02-08 09:18:53 +01:00