summaryrefslogtreecommitdiffstats
path: root/arch
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'for-next/socfpga'Sascha Hauer2019-09-123-53/+72
|\
| * ARM: achilles: add bbu handlerSteffen Trumtrar2019-08-191-0/+26
| | | | | | | | | | Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ARM: Arria10: achilles: add named partitionsSteffen Trumtrar2019-08-191-0/+32
| | | | | | | | | | | | | | Add labels for the barebox1/2 and bitstream1/2 partitions. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ARM: Arria10: achilles: fix offsets in node namesSteffen Trumtrar2019-08-191-2/+2
| | | | | | | | | | | | | | | | The node names do not match the actual reg values. Fix this up. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ARM: socfpga: fix xload on arria10Steffen Trumtrar2019-08-191-51/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | Since the commit 5a1a5ed2537d7d12f851f3778707681d6c08d6e8 ARM: images: use piggydata the loading mechanism in the arria10 xload is neither functional nor needed. Now, barebox has/can be loaded like a normal image, so the filesize, that is written to the barebox header, can be evaluated. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/sandbox'Sascha Hauer2019-09-1210-9/+112
|\ \
| * | hwrng: add sandbox driver interface to host /dev/randomAhmad Fatoum2019-09-094-0/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Linux as well as other operating systems can provide /dev/random and /dev/urandom device to service userspace need for randomness. Add a driver to use /dev/random for blocking and /dev/urandom for non-blocking barebox random numbers. Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | sandbox: dts: add example for barebox, hostfile backed stateAhmad Fatoum2019-09-091-0/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previous commit now allows probing barebox,hostfile to be probed from device tree. Add a barebox state node that shows how to use it. It's not included by default, same as barebox-libftdi-example.dtsi in the same directory. Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | sandbox: hostfile: allow probing from device treeAhmad Fatoum2019-09-093-4/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | When testing things like barebox state in sandbox, it's nice to be able to refer to a partition on a hostfile by phandle. Support this by checking for reading the barebox,filename property. Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | sandbox: compile with symbol -fvisibility=hiddenAhmad Fatoum2019-08-281-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | barebox defines many symbols that are reserved for the C implementation. This collides with the libc, when building barebox for ARCH=sandbox. Specify -fvsibility-hidden, so libraries barebox is linked against don't inadvertently use barebox' functions. This fixes a heap corruption occurring when issuing fb0.enable=1 on my system, because X11 used strdup out of barebox, but free out of glibc[1]: binding file /lib/x86_64-linux-gnu/libX11.so.6 [0] to ./barebox [0]: normal symbol l `strdup' [GLIBC_2.2.5] [...] binding file /lib/x86_64-linux-gnu/libc.so.6 [0] to /lib/x86_64-linux-gnu/libc.so.6 [0]: normal symbol `free' [GLIBC_2.2.5] [1]: cf. CFLAGS +=-Dfree=barebox_free in arch/sandbox/Makefile Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | sandbox: redefine optarg and optind to avoid collisionsAhmad Fatoum2019-08-281-1/+2
| | | | | | | | | | | | | | | | | | | | | If we don't do this, the barebox main may fail to parse arguments. Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | sandbox: remove unused ARCH_LINUX Kconfig symbolAhmad Fatoum2019-08-281-3/+0
| | | | | | | | | | | | | | | | | | | | | It's not referenced anywhere anymore, so drop it. Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | sandbox: include header to provide missing prototypeAhmad Fatoum2019-08-281-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | sandbox_add_device lacks a prototype. Include the appropriate header to fix this. Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/reset-source'Sascha Hauer2019-09-121-3/+1
|\ \ \
| * | | reset_source: drop reset_source_set_instance()Uwe Kleine-König2019-08-281-3/+1
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The semantic of reset_source_set_instance() required a separate call to reset_source_set() (or reset_source_set_priority()) and checked right usage only using the type. Make the set of functions a bit easier to use by dropping reset_source_set_instance() and instead introduce a function that can set all relevant parameters (source, priority and instance) in one go. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/qemu'Sascha Hauer2019-09-126-1/+176
|\ \ \
| * | | ARM: i.MX: When generic DT image is enabled do not hardcode SoCSascha Hauer2019-08-191-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When only a single i.MX SoC is selected the cpu_is_mx?() macros expand to static 0 or 1. With the generic DT image enabled it could be though that the SoC is not a i.MX at all, so make sure that with the generic DT image enabled the cpu_is_mx?() macros always compare against __imx_cpu_type Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | ARM: i.MX: Do not hang() on unknown SoCsSascha Hauer2019-08-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The generic DT image built with CONFIG_ARCH_IMX has nothing really i.MX specific except that it has support for i.MX features. The DT image could be started with a non i.MX device tree which works as expected. imx_init() panics though when started with a non i.MX device tree. Remove the hang() so that we can just continue. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | ARM: Add generic device tree 2nd stage supportSascha Hauer2019-08-194-0/+166
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds support for building a barebox image that boots with the Linux ARM Kernel booting convention. Support for this image can be enabled in Kconfig. It picks up a device tree passed in r2. This new image helps for example with qemu. It can be started with: qemu-system-aarch64 -m 2G -M virt -kernel images/barebox-dt-2nd.img -cpu cortex-a57 -serial stdio or: qemu-system-arm -m 1G -M sabrelite -kernel images/barebox-dt-2nd.img -nographic -dtb arch/arm/dts/imx6q-sabrelite.dtb Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/omap'Sascha Hauer2019-09-124-1/+154
|\ \ \
| * | | ARM: OMAP: bbu: Add an all-in-one NAND update handlerSascha Hauer2019-08-282-0/+152
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a NAND update handler which automatically detects on the filetype which stage shall be updated. It takes a single partition for both the xload images and the barebox images. It uses a fixed layout on this partition, so there's no need to configure anything on the board side. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | mtd: nand: gpmc: Add BCH16 supportSascha Hauer2019-08-281-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds support for BCH16 ECC encoding. The support is mostly taken from Linux-5.3-rc6. One major change is the different wrap mode used. The Kernel uses wrapmode 1, which means "pass all data through the BCH engine". Still the Kernel has to skip the OOB marker which is done by reading all user data, then use NAND_CMD_RNDOUT to position right behind the OOB marker and then read the ECC data. Instead of doing this we use wrap mode 4 which allows us to bypass the OOB marker from the BCH engine automatically. This explains bch_wrapmode = 1, eccsize0 = 0, eccsize1 = 52 vs. bch_wrapmode = 4, eccsize0 = 4, eccsize1 = 52 Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | ARM: omap: am35xx_emif4: Fix bit pollingSascha Hauer2019-08-281-1/+1
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | ((x & (1 << 10)) == 0x1) can never be true as the compiler mourns about. Fix this to actually do what the comment says: Wait till bit 10 is cleared. Looking at the corresponding U-Boot code also suggests that this is the right thing to do. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/misc'Sascha Hauer2019-09-124-5/+16
|\ \ \
| * | | mips: bootm: Cast elf entry into unsigned longClement Leger2019-09-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since elf entry type is now a u64 to accomodate both type of elf files (64 and 32 bits), we need to cast it to the pointer length before casting it to the pointer type. Signed-off-by: Clement Leger <cleger@kalray.eu> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | ARM: zii-vf610-dev: Use CTRL-C as autoboot abortCory Tusar2019-09-021-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This brings the various VF610-based units in line with other ZII platforms. Signed-off-by: Cory Tusar <cory.tusar@zii.aero> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | ARM: dts: vf610-zii-cfu1: Fix indentationCory Tusar2019-09-021-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Whitespace only - no functional changes. Signed-off-by: Cory Tusar <cory.tusar@zii.aero> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | ARM: i.MX: bbu: early exit when partition too smallAhmad Fatoum2019-08-301-0/+10
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | So far, writing a barebox image exceeding the partition size aborts with EPERM as truncate isn't implemented: ERROR: writing to /dev/flash-boot.barebox failed with Operation not permitted update failed ERROR: fastboot: update barebox: Operation not permitted This is unfortunate because by the time the truncation fails, erasing the partition had already occurred. Avoid this by checking prior to the pwrite_all whether the file to be written is big enough. This is valid here because barebox update wouldn't be called on a regular file. While at it, present callers with a more helpful ENOSPC error. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/mips'Sascha Hauer2019-09-122-0/+11
|\ \ \
| * | | MIPS: ath79: enable gpio key support.Oleksij Rempel2019-08-281-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Most of ath79 devices have at least one gpio key. Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | MIPS: dts: dpt-module: fix gpio buttonOleksij Rempel2019-08-281-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GPIO11 is set to 0 by default and there is no internal pull ups to set a different configuration. To fix the system with gpio-key activated we need to fix devicetree first. Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | MIPS: ath79: enable watchdog supportOleksij Rempel2019-08-281-0/+4
| | |/ | |/| | | | | | | | | | | | | | | | all ath79 based SoCs have watchdog. Make sure, it can be used. Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/imx'Sascha Hauer2019-09-126-3/+117
|\ \ \
| * | | ARM: zii-vf610-dev: Re-align SCU4's hostname with upstream kernelAndrey Smirnov2019-09-091-1/+1
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | ARM: dts: imx8mq-zii-ultra: Add switch EEPROM aliasAndrey Smirnov2019-09-091-0/+9
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | ARM: dts: vf610-zii-scu4-aib: Expose fiber EEPROM modulesAndrey Smirnov2019-09-091-0/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | EEPROM on a fiber optic modules present on SCU4 can be exposed as a AT24 compatible device. Add corresponding DT node needed for that. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | ARM: dts: vf610-zii-cfu1: Expose fiber optic module EEPROMAndrey Smirnov2019-09-091-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | EEPROM on a fiber optic module present on CFU1 can be exposed as a AT24 compatible device. Add corresponding DT node needed for that. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | ARM: dts: vf610-zii-cfu1: Configure "STATUS" LED as heartbeatAndrey Smirnov2019-09-091-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Configure "STATUS" LED as heartbeat in addition to "DEBUG" LED not exposed on the front panel. This way it becomes a bit easier to see what part of the boot process the device is at. Suggested-by: Chris Healy <cphealy@gmail.com> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | ARM: dts: vf610-zii-dev-rev-c: Fix DSPI flash node nameAndrey Smirnov2019-09-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Latest upstream DTS renamed the node to flash@0, so we need to follow suit. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | ARM: dts: vf610-zii-dev-rev-b: Fix SPI flash node nameAndrey Smirnov2019-09-091-1/+1
| |/ / | | | | | | | | | | | | | | | | | | | | | Latest upstream DTS renamed the node to flash@0, so we need to follow suit. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/fsanitize'Sascha Hauer2019-09-1217-125/+36
|\ \ \
| * | | sandbox: support Address and UndefinedBehavior sanitizersAhmad Fatoum2019-09-092-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For the hosted implementation, we just need to pass the appropriate options at compile and link time. No further arch-specific code needed. Because we define our own handlers in lib/ubsan.c, linking against libubsan isn't strictly required. We do it anyway on sandbox, so we can use the backtrace functionality within. Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | sandbox: use sanitizer unwind for dump_stack if availableAhmad Fatoum2019-09-094-1/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The sanitize unwind looks pretty and is just a function call away if we are compiling with KASAN or UBSAN. Use it if available. Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | Kconfig: retire empty <asm/barebox.h>Ahmad Fatoum2019-08-3010-91/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | With the latest changes, this file is empty on all archs. Drop it. Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | blackfin: delete unused <asm/barebox.h> definitionsAhmad Fatoum2019-08-301-18/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The file currently defines struct bd_info, bd_t, bi_env_data and bi_env_crc, no of which is used anywhere. Delete them in preparation for getting rid of <asm/barebox.h> altogether. Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | Kconfig: create Kconfig symbol for ARCH_HAS_DATA_ABORT_MASKAhmad Fatoum2019-08-304-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Other arch-specific features are exposed in Kconfig too, so do here likewise. Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | Kconfig: create Kconfig symbol for ARCH_HAS_STACK_DUMPAhmad Fatoum2019-08-303-8/+2
| |/ / | | | | | | | | | | | | | | | | | | | | | Other arch-specific features are exposed in Kconfig too, so do here likewise. Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/arm'Sascha Hauer2019-09-1268-82/+82
|\ \ \ | |/ / |/| |
| * | ARM: Cleanup stack offset cargo cultSascha Hauer2019-09-0968-82/+82
| |/ | | | | | | | | | | | | | | | | Most callers of arm_setup_stack substract a fixed offset of 8, 12 or 16 bytes from the stack top. This is unnecessary as on ARM we have a stack that decrements before storing values. Substracting this offset probably goes back to the U-Boot version we forked from. Stop this now. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | ARM: nxp-imx8mq-evk: Update commentsSascha Hauer2019-08-231-5/+4
| | | | | | | | | | | | | | | | The comments mention contents of register r0, this is outdated. We base our decisions on the current EL. Update the comments. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Reviewed-by: Rouven Czerwinski <r.czerwinski@pengutronix.de>