summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* dts: update to v5.5-rc7Sascha Hauer2020-01-2829-850/+109
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: imx6: properly check for IPU presenceLucas Stach2020-01-271-2/+11
| | | | | | | | | | | | | Since a73850bd76d0 (ARM: imx: disable IPU QoS setup for correct SoCs), which fixed the condition to not execute the IPU QoS fixups on SoCs that don't have a IPU, the fixups aren't applied on i.MX6Q/DP anymore, since those SoCs were missing from the whitelist. Add a function to make it a bit more clearer what we are checking here and add the Q/DP SoCs. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* net: designware: eqos: don't funnel all MDIO writes to register 0Ahmad Fatoum2020-01-201-3/+3
| | | | | | | | | | | | | | | | eqos_mdio_write ended up using the addr parameter instead of the computed miiaddr variable, which would've factored in the reg parameter. This had the effect that all writes went to PHY register 0, which was fine as long as there were only register 0 writes. As soon there are more writes, e.g. because a PHY driver was enabled, register 0 became clobbered and erratic behavior ensued. Fix the typo and while at it rename the val parameter to a more descriptive name. Fixes: a4f709bbb ("net: add Designware Ethernet QoS for STM32MP") Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* MIPS: actually use CONFIG_MIPS_RELOCATION_TABLE_SIZEAntony Pavlov2020-01-161-1/+1
| | | | | | | | | The commit 28ed10d6a67c9 ("MIPS: relocation: add relocation support") introduce the Kconfig CONFIG_MIPS_RELOCATION_TABLE_SIZE parameter but it is never used. Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Revert "clocksource: ARMv8 timer can only be built on ARMv8"Ahmad Fatoum2020-01-162-2/+5
| | | | | | | | | | | | | | | | This reverts commit 33ec8cb5872617fa95aea08d9f7f2b684d95b6de, so that barebox can once again match against "arm,armv7-timer" compatibles. The reverted commit restricted the timer to CPU_V8, because in i.MX multi-image configuration with MACH_SCB9328 set, we can have both CPU_32v7 and CPU_32v4T in the same build. To avoid this issue properly, force use of -march=armv7-a for non-CONFIG_CPU_V8 targets. This is acceptable as we don't expect non-ARMv7 device trees to have the architected arm,armv7-timer. Suggested-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: qemu-virt64: convert to assembly entryLucas Stach2020-01-163-2/+16
| | | | | | | | | | The C entry function isn't naked, so tries to push to the stack in the function prologue. This doesn't work on QEMU where there is no valid SP on entry. Convert the lowlevel entry to the assembly facilities provided for this case. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/zynq'Sascha Hauer2020-01-1516-99/+938
|\
| * ARM: zynq: zedboard: add PBL console supportLucas Stach2020-01-141-0/+16
| | | | | | | | | | | | | | Allows for significantly easier debugging of PBL functions. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * serial: cadence: add lowlevel init and putc functionsLucas Stach2020-01-141-0/+55
| | | | | | | | | | | | | | This allows to use the Cadence serial as a PBL console. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * serial: cadence: move register definitions into header fileLucas Stach2020-01-142-36/+42
| | | | | | | | | | Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ARM: zynq: zed: partially revert zynq_cpu_lowlevel_init() chnagesLucas Stach2020-01-142-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Calling arm_cpu_lowlevel_init() from zynq_cpu_lowlevel_init() adds a stack push/pop to the latter function which doesn't work this early in the boot. As the BootROM apparently hands proccessor control to us in abort(!?!) mode, setting up a stack requires duplicating most of arm_cpu_lowlevel_init(). To get around this catch-22 move the call to arm_cpu_lowlevel_init back into the board lowlevel start function, so we don't need a stack at all. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ARM: zynq: zed: use zynq_cpu_lowlevel_init()Lucas Stach2020-01-081-1/+2
| | | | | | | | | | | | | | Make sure the required workarounds for CPU errata are applied. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ARM: zynq: add Zynq specific lowlevel CPU init functionLucas Stach2020-01-083-0/+24
| | | | | | | | | | | | | | | | This adds a Zynq specific CPU lowlevel init function, which applies the required workarounds for the Cortex A9 r3p0 core. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ARM: zynq: zed: add QSPI flash supportLucas Stach2019-12-202-0/+27
| | | | | | | | | | Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ARM: zynq: add QSPI DT nodeLucas Stach2019-12-201-0/+15
| | | | | | | | | | | | | | | | The node is not available in the upstream DT, yet. Add it to the Barebox DT extensions. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * spi: add Zynq QSPI controller driverLucas Stach2019-12-203-0/+621
| | | | | | | | | | | | | | | | This adds the driver for the QSPI controller found on the Xilinx Zynq SoCs. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * clk: zynq: add QSPI reference clockLucas Stach2019-12-201-0/+3
| | | | | | | | | | Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ARM: zynq: add Zynq image bootm handlerLucas Stach2019-12-112-1/+50
| | | | | | | | | | | | | | | | This adds a bootm handler for the Zynq image, to allow second stage booting of a unchanged Zynq boot image. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * filetype: add Zynq image typeLucas Stach2019-12-112-0/+5
| | | | | | | | | | | | | | | | Use the 2 invariant words (width detection and image identification) from the Zynq image header to detect the filetype. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ARM: zynq: zedboard: allow lowlevel init to be called as second stageLucas Stach2019-12-111-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the code is already executing in DRAM, the PS7 init must not be executed, as it initializes the DRAM controller. As the OCM can be configured to an address which aliases with the DRAM address space we can't reliably infer if we are running from OCM or DRAM from the execution address. So instead of using the address, look at the OCM mapping, as the BootROM leaves a quite unique mapping behind with 192KB OCM mapped at the low address and 64KB mapped to the high address. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ARM: zynq: zedboard: split out PS7 initLucas Stach2019-12-111-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | Move the PS7 inititalization into its own function. This helps readability and logically splits the FPGA toolchain generated setup from the reset of the board init. Also execute the PS7 setup after the lowlevel CPU init, as this is the regular order used in the Barebox codebase. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * firmware: zynqmp-fpga: drop example bin format headerMichael Tretter2019-12-111-59/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoid the example bitstream header to validate the bitstream that should be loaded into the FPGA. The header is mostly 0xFFFFFFFF with a few special values at a certain offsets and can be better described with the offsets and their magic values. As a drive by, this fixes/removes a broken check in the header validation. The != operator has a higher precedence than ?: and this check should have had parenthesis around the ?: expression: bin_header[i] != (byte_order == XILINX_BYTE_ORDER_BIT) ? bin_format[i] : __swab32(bin_format[i]) Signed-off-by: Michael Tretter <m.tretter@pengutronix.de> Reviewed-by: Thomas Haemmerle <thomas.haemmerle@wolfvision.net> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/rpi'Sascha Hauer2020-01-1526-65/+2658
|\ \
| * | ARM: rpi_defconfig: Enable more featuresSascha Hauer2020-01-081-2/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This enabled more features for the rasperrypi boards: - DWC2 USB driver - Networking support - GPIO EXP driver - LED support - more commands Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | ARM: rpi mailbox: Use non interruptible timeoutSascha Hauer2020-01-081-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes sure that during a mailbox transfer no other mailbox transfer is started. This happens on a raspberrypi3 where one GPIO on the firmware GPIO controller (which is controlled via mailbox) is registered as a heartbeat LED. With this it can happen that during a mailbox transfer the poller which drives the heartbeat LED is triggered in is_timeout() which results in corrupted transfers. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | ARM: rpi_defconfig: Enable raspberry GPIO exp driverSascha Hauer2020-01-081-0/+1
| | | | | | | | | | | | | | | | | | Enable the recently introduced GPIO exp driver. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | ARM: bcm2835 mbox: use pr_* to print messagesSascha Hauer2020-01-081-17/+19
| | | | | | | | | | | | | | | | | | To give the user an idea where the messages come from. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | gpio: Add raspberrypi exp gpio driverSascha Hauer2020-01-084-0/+284
| | | | | | | | | | | | | | | | | | Taken from the kernel adopted to barebox. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | ARM: bcm2835 mbox: Remove response valid checkSascha Hauer2020-01-081-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | Not all messages return a valid response as they do not send a response at all. This is at least true for the SET_GPIO_STATE and SET_GPIO_CONFIG messages. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | usb: Add dwc2 host driverSascha Hauer2019-12-204-0/+1914
| | | | | | | | | | | | | | | | | | | | | This adds a driver for the dwc2 controller in host mode. The driver is taken from U-Boot-2019.10 and tested on a Raspberry Pi 3. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | usb: Forward error code from usb_set_configurationSascha Hauer2019-12-201-4/+6
| | | | | | | | | | | | | | | | | | | | | Instead of returning -1 forward the error code and take the opportunity to print the error string. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | rpi: Enable USB Power domain during startupSascha Hauer2019-12-201-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | Enable the USB Power domain during startup. The power domain is abstracted as a regulator in barebox, but modelled as a power domain in the device tree. Until this is sorted out just enable the power domain or regulator in the board code. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | regulator: add function to get regulator by its nameSascha Hauer2019-12-202-1/+30
| | | | | | | | | | | | | | | | | | | | | Useful for getting regulators that are not correctly associated with a device. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | usb: Add usbroothubdes.hSascha Hauer2019-12-201-0/+128
| | | | | | | | | | | | | | | | | | Taken from U-Boot, needed for the upcoming dwc2 driver. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | of: Read dma_offset from device treeSascha Hauer2019-12-203-0/+136
| | | | | | | | | | | | | | | | | | | | | | | | | | | This reads the dma-ranges property from the device tree and sets dma_offset in the devices accordingly. The code is mostly taken from the Kernel as of v5.5-rc1. of_dma_configure() is trimmed down to the cases we want to support currently. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | device: Introduce dma_offsetSascha Hauer2019-12-204-2/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For devices that do not have a 1:1 mapping between DMA and CPU we need a dma_offset. This adds dma_offset to struct device_d and starts honoring it in ARM dma_(un)map_single(). Also we add some comments to functions that would normally need a device argument to make the DMA <-> CPU translations device specific. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | of: Add of_bus_n_xxx_cells()Sascha Hauer2019-12-202-18/+40
| | | | | | | | | | | | | | | | | | Added straight from the Kernel. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | usb: Make timeout unit clearSascha Hauer2019-12-202-8/+8
| | | | | | | | | | | | | | | | | | | | | The usb_*_msg() functions take a timeout parameter. Make clear which unit is expected by adding a _ms suffix to the variable name. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | ARM: rpi: Do not warn when firmware doesn't pass a dtbSascha Hauer2019-12-192-5/+15
| |/ | | | | | | | | | | | | When there is no dtb placed in the boot partition then none is passed by the firmware to barebox. This may be intended, so do not warn about it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/misc'Sascha Hauer2020-01-1525-230/+285
|\ \
| * | MIPS: dts: rename tplink-mr3020.dts -> ar9331_tl_mr3020.dtsAntony Pavlov2020-01-143-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Linux MIPS uses <soc-name>_<board-name>.dts board dts-file naming scheme so use it in barebox too. Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | images: gitignore more filesSascha Hauer2020-01-101-0/+2
| | | | | | | | | | | | | | | | | | | | | Layerscape generates .image files and mvebu generates .mvebu1img files. git Ignore them. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | include/linux/amba/bus.h: drop unused declarationsAntony Pavlov2020-01-081-6/+0
| | | | | | | | | | | | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | MIPS: loongson: rename CPU_LOONGSON1 to CPU_GS232Du Huanpeng2020-01-064-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The CPU in the loongson 1b SoC is called GS232. Here is some active chips and it's core: NAME CPU Core(s) The loongson 3 series/server & desktop 3A3000/3B3000 GS464E 64bit x4 3A2000/3B2000 GS464E 64bit x4 3B1500 GS464 64bit x8 3A1000 GS464 64bit x4 The loongson 2 series/low power 2K1000 GS264 64bit x2 2F GS464 64bit x1 2H GS464 64bit x1 The loongson 1 series/embeded 1C101 GS132R 32bit ? 1D GS132 32bit ? 1C GS232 32bit x1 1B GS232 32bit x1 1A GS232 32bit x1 see: [1] http://www.loongson.cn/product/ Signed-off-by: Du Huanpeng <duhuanpeng@loongson.cn> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | commands: led: print actual error code when led_set failsAhmad Fatoum2019-12-131-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | If led_set fails, the error code is the return value, not errno. Fix this. While at replace the magic value in the command return code. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | led: pca955x: remove ineffectual assignmentAhmad Fatoum2019-12-131-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | the .num member of struct led is a 'private' member populated by led_register. Populating it has no effect because it's always overwritten. Remove the assignment. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | commands: miitool: handle powerdown-flagHubert Feurstein2019-12-131-1/+6
| | | | | | | | | | | | | | | Signed-off-by: Hubert Feurstein <h.feurstein@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | mci: imx-esdhc: fix termination of statementHubert Feurstein2019-12-111-1/+1
| | | | | | | | | | | | | | | | | | | | | Use semicolon instead of comma to terminate statement. Signed-off-by: Hubert Feurstein <h.feurstein@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | Allow usage of default environment without environment file storageAlbert Schwarzkopf2019-12-119-197/+250
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, the default environment is only used when the barebox environment on the persistent store is not valid or when ENVFS_FLAGS_FORCE_BUILT_IN is set in the super block. However, ENVFS_FLAGS_FORCE_BUILT_IN can be cleared and the environmnet variables in the persistent store will be used again. This may not be desirable. This patch allows building CONFIG_DEFAULT_ENVIRONMENT independent of CONFIG_ENV_HANDLING. This can be useful if you never want to load or write values from the persistent store and you only need to read environment variables from your default environment. If CONFIG_ENV_HANDLING is not set, a message will be printed to the user indicating that changes to non-volatile variables won't be persisted. Move envfs functions that are needed when CONFIG_DEFAULT_ENVIRONMENT and/or CONFIG_ENV_HANDLING is set to a new file common/envfs-core.c. Signed-off-by: Albert Schwarzkopf <a.schwarzkopf@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | of: demote most debug output to loglevel 8 (vdebug)Roland Hieber2019-12-111-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Loglevel 7 (debug) is often useful to get barebox running on new hardware; however, the heavy output of "OF:" messages makes most boards take several minutes to boot to a prompt, printing things which are probably interesting when debugging OF code itself, but not very helpful otherwise. Degrade most of the message to loglevel 8 (vdebug). Signed-off-by: Roland Hieber <rhi@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>