summaryrefslogtreecommitdiffstats
path: root/arch
Commit message (Collapse)AuthorAgeFilesLines
* ARM: protonic: disable on-die termination to fix PHY bootstrappingOleksij Rempel2020-10-095-5/+2
| | | | | | | | | | | | | | | | | If on-die termination is enabled, the RXC pin of iMX6 will be pulled high. Since we already have an 10K pull-down on board, the RXC level on PHY reset will be ~800mV, which is mostly interpreted as 1. On some reboots we get 0 instead and kernel can't detect the PHY properly. Since the default 0x020e07ac value is 0, it is sufficient to remove this entry from the affected imxcfg files. Since we get stable 0 on pin PHYADDR[2], the PHY address is changed from 4 to 0. Fixes: 00adc1e33ef8 ("ARM: add imx6 based Protonic boads") Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: cm-fx6: fix build dependencyMarco Felsch2020-10-051-0/+1
| | | | | | | | The cm-fx6 board uses the edhc-pbl function during lowlevel init. So we need to select it. Signed-off-by: Marco Felsch <m.felsch@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: layerscape: ppa: fix wrong return values on some errorsAhmad Fatoum2020-10-021-1/+1
| | | | | | | | Coccinelle detected that the IS_ERR and ERR_PTR are mismatched. Fix it. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: psci: fix NULL pointer dereference on CPU idleAhmad Fatoum2020-10-021-1/+1
| | | | | | | | We guard against cpu_off being NULL, but dereference cpu_suspend instead. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/protonic' into masterSascha Hauer2020-09-259-36/+1192
|\
| * ARM: dts: protonic: lanmcu: add uart-has-rtscts to enable rs485 functionalityOleksij Rempel2020-08-241-0/+2
| | | | | | | | | | | | | | | | Without this flag the kernel was ignoring linux,rs485-enabled-at-boot-time property. Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ARM: dts: protonic: properly define PHY nodes on lanmcu and plym2m boardsOleksij Rempel2020-08-242-2/+28
| | | | | | | | | | Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ARM: dts: protonic: lanmcu: use UART_CTS instead of GPIO based CTSOleksij Rempel2020-08-241-4/+2
| | | | | | | | | | | | | | | | Sync it with Protonic PLYBAS board to have same, reproducible behavior on all boards. Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ARM: dts: protonic: add fixed clock for the FEC nodeOleksij Rempel2020-08-242-4/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add fixed clock for the FEC nodes to workaround HW TX checksum issues in case a PHY is used as the clock source for RMII connection. By default the FEC node is using 3 clock sources, one of which is named "ptp" clock. If ptp clock has same source as "enet_ref" clock, then the ENET_REF_CLK input will become output. See [1]. The default configuration will work only if iMX is the clock provider for the PHY chip. In case PHY has own XTAL, then the PHY should be used as clock provider for the iMX/FEC. In case "ptp" clock is removed, the PHY clock will be used and most of communication will work as expected. But will trigger other issue - the HW generated checksums for UDP and TCP packets will be zero. It is kernel specific issue, not reproducible on barebox. Since, currently, most of PHY drivers are not defined as clock provider, we should define dummy fixed clock and use it. This workaround is used in some other devicetrees [2]. But it may imply the next hidden issue - the PHY can be suspended, reseted or reconfigured any time and this may add clock glitches on the ENET_REF_CLK line and put FEC in undefined state. [1] https://elixir.bootlin.com/linux/latest/source/arch/arm/mach-imx/mach-imx6q.c#L164 [2] https://elixir.bootlin.com/linux/latest/source/arch/arm/boot/dts/imx6dl-eckelmann-ci4x10.dts#L300 Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ARM: dts: protonic: lanmcu: add eMMC partition tableOleksij Rempel2020-08-241-3/+13
| | | | | | | | | | | | | | | | | | Since this board do not including imx6qdl-prti6q.dtsi, it will not get partition table which was added for other Protonic boards. So, add it separately. Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ARM: dts: imx6q-prti6q: add pstore/ramoops nodeOleksij Rempel2020-08-241-0/+11
| | | | | | | | | | Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ARM: dts: unify barebox and barebox, env partitions for all Protonic boardsOleksij Rempel2020-08-246-23/+83
| | | | | | | | | | Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ARM: protonic-imx6: port Protonic specific board codeOleksij Rempel2020-08-242-0/+1035
| | | | | | | | | | Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/powerpc' into masterSascha Hauer2020-09-2524-118/+58
|\ \
| * | powerpc: Add function prototypes for exception handlersSascha Hauer2020-09-151-0/+8
| | | | | | | | | | | | | | | | | | | | | The exception handlers lead to -Wmissing-prototypes warnings. Add prototypes for them to avoid these warnings. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | powerpc: Remove unused functionsSascha Hauer2020-09-154-90/+0
| | | | | | | | | | | | | | | | | | | | | Some functions are unused in the code base and do not have a prototype in any header file. Remove them. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | powerpc: Add prototypes for functions called from assemblySascha Hauer2020-09-154-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | Some functions are called from assembly only. There's no prototype for them so this leads to -Wmissing-prototypes warnings. Add a prototype right aboce the functions to avoid these warnings. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | powerpc: Make locally used functions staticSascha Hauer2020-09-158-18/+19
| | | | | | | | | | | | | | | | | | | | | Make only locally used functions static to avoid -Wmissing-prototypes warnings. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | powerpc: Add missing includesSascha Hauer2020-09-157-0/+9
| | | | | | | | | | | | | | | | | | Add missing includes to avoid -Wmissing-prototypes warnings. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | powerpc: Add prototypes to header fileSascha Hauer2020-09-154-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds prototypes of the board specific functions fsl_ddr_board_options() and fsl_ddr_board_info() to a header file. Including this header file from the board files reveals that the prototypes are different across the different implementations, so harmonize them. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/misc' into masterSascha Hauer2020-09-2588-243/+357
|\ \ \
| * | | x86/config/efi: drop DRIVER_SERIAL_NS16550Uwe Kleine-König2020-09-231-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For most machines having DRIVER_SERIAL_NS16550 and DRIVER_SERIAL_EFI_STDIO both enabled results in the output appearing twice on the serial output. So remove disable the lowlevel driver and rely on the EFI bios for serial. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | Regenerate defconfig filesUwe Kleine-König2020-09-2315-23/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Done with the same script used to generate commit d952a0eeba37 ("Regenerate defconfig files"). Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | bootm: Allow loading OP-TEE from FIT imageAlbert Schwarzkopf2020-09-181-5/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, TEE binaries can only be loaded if CONFIG_BOOTM_FORCE_SIGNED_IMAGES is not set. No signature check is being performed on them. Allow loading OP-TEE from FIT images. Therefore, now it's possible to ensure that only trusted OP-TEE binaries will be loaded by using signed FIT images. Signed-off-by: Albert Schwarzkopf <a.schwarzkopf@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | ARM: dts: stm32mp: drop no longer needed PSCI version overrideAhmad Fatoum2020-09-151-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 52cc061f50aa ("ARM: dts: stm32mp: report psci v0.2 at least") adds a barebox override, because the upstream device tree's compatible was outdated. Since abef60363d8e ("dts: update to v5.8-rc1"), the upstream device tree has &{/psci} { compatible = "arm,psci-1.0"; }; , so now we can drop our override again without adverse effect. Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | sandbox: unwind: fix indentationAhmad Fatoum2020-09-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Indentation was unintentionally doubled. Fix this. Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | restart: give all restart handlers a descriptive nameAhmad Fatoum2020-09-1542-42/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With incoming changes to choose a specific reset method, give all currently unnamed "default" reset handlers a name: - soc reset via SoC-specific means - soc-wdt reset via SoC watchdog timer - vector reset via jump to reset vector - efi reset via EFI firmware Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | openrisc: Make locally used functions staticSascha Hauer2020-09-152-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Make only locally used functions static to avoid -Wmissing-prototypes warnings. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | openrisc: Add missing includesSascha Hauer2020-09-152-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | Add missing includes to avoid -Wmissing-prototypes warnings. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | ARM: versatile: Remove unused functionSascha Hauer2020-09-151-13/+0
| | | | | | | | | | | | | | | | | | | | | | | | vpb_clk_create() is unused in the codebase. Remove it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | ARM: tegra20-colibri-iris: drop regulators nodeSascha Hauer2020-09-151-20/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Grouping the fixed regulators in an extra regulators node is deprecated. Move the regulators up one level and drop the reg properties to avoid dtc warnings. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | ARM: tx28: provide header file with function prototypeSascha Hauer2020-09-153-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | base_board_init() doesn't have a prototype anywhere, add a header file for it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | openrisc: Add prototypes for functions called from assemblySascha Hauer2020-09-152-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some functions are called from assembly only. There's no prototype for them so this leads to -Wmissing-prototypes warnings. Add a prototype right aboce the functions to avoid these warnings. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | arm: Add prototypes for functions called from assemblySascha Hauer2020-09-154-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some functions are called from assembly only. There's no prototype for them so this leads to -Wmissing-prototypes warnings. Add a prototype right aboce the functions to avoid these warnings. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | ARM: dts: beaglebone: Remove unnecessary tps65217.dtsiSascha Hauer2020-09-151-56/+0
| | | | | | | | | | | | | | | | | | | | | | | | tps65217.dtsi should be used from the upstream dts sources instead. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | sandbox: hostfile: support registering images as barebox block devicesAhmad Fatoum2020-09-154-26/+109
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While we can mount file systems on cdevs in barebox, partition table parsing only works for block devices. Allow for --image=argument,blkdev to try to mount an image as block device. This will fail for files that aren't of a multiple of the 512 byte block size. Host OS block devices are suitable for use as barebox block devices always, so that's the default unless overridden with a ,cdev suffix. The initcall level has been changed to occur after fs initcall level. This is required, because we can't have automounts without / mounted. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | sandbox: implement actual sandbox reset via exec(2)Ahmad Fatoum2020-09-156-11/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On Linux, /proc/self/exe is a symlink to the originally exec(2)d executable. We can exec that with the original argv to simulate a reset. This is useful for shorter development cycles on sandbox and in future, could be used to test barebox behavior around resets (e.g. reset reason can be passed through via libc environment). We leave the original hanging reset in place though, because: - Many boards have multiple reset providers and incoming patches will allow users to select a specific one. Having this on sandbox as well makes testing easier. - /proc/self/exe is Linux-specific and wouldn't work when being run on e.g. BSDs or macOS Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | arm/cpu/*.S: Replace license and copyright boilerplate by SPDX identfiersUwe Kleine-König2020-09-152-26/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit ed2f892a1ba7 ("arm/cpu: Replace license and copyright boilerplate by SPDX identfiers") my script learned to detect .S files, too. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | sandbox: implement simple, ^C-interruptible, restart handlerAhmad Fatoum2020-09-143-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Typing reset in sandbox results in hang() while the terminal is not cooked and ^C is ineffective. Only way to terminate barebox then is via kill. Reinstate cooked mode on reset, so ^C termination is possible. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | sandbox: fix SANDBOX_UNWIND dependency to be KASAN onlyAhmad Fatoum2020-09-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gcc v9.3.0's libubsan does not export a __sanitizer_print_stack_trace symbol. Play it safe and avoid possible linker errors by having the optional SANDBOX_UNWIND depend only on CONFIG_KASAN. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | sandbox: support escaping commas in --image filenamesAhmad Fatoum2020-09-141-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some tools like afl-fuzz generate file names containing commas. Allow escaping the commas in the file names, so they can be passed to barebox. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | sandbox: add_image: support mmaping block devices on 32-bit hostsAhmad Fatoum2020-09-146-8/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | BLKGETSIZE64 writes 64-bit to the address pointed at by the ioctl argument. As hf->size is a 32-bit size_t on 32-bit systems, on such systems, the adjacent member might be corrupted. Fix this. Fixes: 8d6da6462b12 ("sandbox: add_image: mmap block devices") Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | sandbox: hostfile: error out if file couldn't be openedAhmad Fatoum2020-09-141-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The file descriptor is mandatory for doing anything useful. Error out if we don't have one. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | ARM: stm32mp: enable mmc_extcsd in defconfigAhmad Fatoum2020-09-141-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The documentation suggests use of mmc_extcsd for configuring the boot ack bit needed to boot from eMMC, thus have it enabled in the defconfig. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | sandbox: add a minimal defconfig to build only the host toolsRoland Hieber2020-08-281-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For distro packaging, make it possible to build all host tools in one go (and a very minimal barebox image as an unimportant side artifact). Signed-off-by: Roland Hieber <rhi@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | Merge branch 'for-next/license' into masterSascha Hauer2020-09-2532-434/+91
|\ \ \ \
| * | | | arch/x86: Replace license and copyright boilerplate by SPDX identfiersUwe Kleine-König2020-09-2132-434/+91
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | Converts the files that licensecheck can determine the license for. Additionally some minor code reformatting is done. 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/kbuild' into masterSascha Hauer2020-09-253-6/+1
|\ \ \ \
| * | | | sandbox: add sandbox.dtb to always-yMasahiro Yamada2020-08-191-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unlike Linux, Barebox does not support 'make dtbs_install'. There is no good reason to use dtb-y, which is not natively supported by the Barebox build system. Sandbox is the special architecture that compiles DTB as a separate file. Add .dtb to always-y directly. CONFIG_OFTREE is a bool option. Use a more Kbuild-ish style instead of ifeq ($(CONFIG_OFTREE),y). Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | kvx,riscv: remove unused $(dtb-y) assignmentMasahiro Yamada2020-08-192-2/+0
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | dtb-y is not defined in these Makefiles. Remove the meaningless code. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>