summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | ARM: OMAP: Move locally used definitions from emif4 header to am35xx_emif4Alexander Shiyan2022-06-072-53/+52
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Alexander Shiyan <eagle.alexander923@gmail.com> Link: https://lore.barebox.org/20220603112540.51644-4-eagle.alexander923@gmail.com Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | ARM: OMAP: Adopt am35xx_emif4_init() to use fixed offset definitionsAlexander Shiyan2022-06-072-44/+20
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Alexander Shiyan <eagle.alexander923@gmail.com> Link: https://lore.barebox.org/20220603112540.51644-3-eagle.alexander923@gmail.com Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | ARM: OMAP: Move EMIF4 definitions to appropriate headerAlexander Shiyan2022-06-074-21/+23
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Alexander Shiyan <eagle.alexander923@gmail.com> Link: https://lore.barebox.org/20220603112540.51644-2-eagle.alexander923@gmail.com Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | ARM: OMAP: Rearranging EMIF4 definitionsAlexander Shiyan2022-06-073-48/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently we have three different definitions for EMIF management: - Offsets - Offsets relative to the base address - Offsets in the structure The patch represents the first attempt to unify this. Signed-off-by: Alexander Shiyan <eagle.alexander923@gmail.com> Link: https://lore.barebox.org/20220603112540.51644-1-eagle.alexander923@gmail.com Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | Merge branch 'for-next/misc'Sascha Hauer3 days107-437/+697
|\ \ \ \
| * | | | ddr: imx8m: remove header including itselfAhmad Fatoum8 days1-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This line has noeffect because of the include guard, so just drop it. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20220623085741.3680767-1-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | state: don't report error for -ENOMEDIUMAhmad Fatoum11 days2-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit 863a2251393e ("state: make first boot less verbose"), state_load returns -ENOMEDIUM instead of -ENOENT if we detect a first load because all buckets are zero. This case is expected and shouldn't warrant an error message, so adjust callers appropriately. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20220620071936.1460295-1-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | treewide: Use pr_setenv() where appropriateSascha Hauer11 days7-40/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We now have pr_setenv() which is a setenv() variant that takes a format string. Use it where appropriate. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | env: Introduce pr_setenv()Sascha Hauer11 days2-2/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's a common pattern to (ba)sprintf to a string and then call setenv() with this string. Introduce pr_setenv() as a shortcut to simplify this pattern. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | bootchooser: rename pr_setenv() to bc_setenv()Sascha Hauer12 days1-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We are about to introduce a generic function names pr_setenv(), so rename the existent bootchooser specific function to bc_setenv(). For consistency, rename pr_getenv() accordingly. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | regulator: fixed: add off-on-delay-us device-tree parsing supportMarco Felsch2022-06-171-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The core already handles the off_on_delay if we set it. So parse the official device-tree property and set it if present. Signed-off-by: Marco Felsch <m.felsch@pengutronix.de> Link: https://lore.barebox.org/20220616140737.2294226-2-m.felsch@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | regulator: fixed: use local device_node referenceMarco Felsch2022-06-171-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Just a cosmetic commit, no functional changes. Use a local variable for the device_node instead of dereference the pointer multiple times. Signed-off-by: Marco Felsch <m.felsch@pengutronix.de> Link: https://lore.barebox.org/20220616140737.2294226-1-m.felsch@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | net: rtl8169: make it work on big-endian systemAntony Pavlov2022-06-171-17/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Link: https://lore.barebox.org/20220616090351.645589-1-antonynpavlov@gmail.com Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | lib: parameter: Free previous string value in param_string_setRobin van der Gracht2022-06-161-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the parameter has no set function the previous (saved_value) is not freed up on completion. Signed-off-by: Robin van der Gracht <robin@protonic.nl> Link: https://lore.barebox.org/20220616125040.212193-1-robin@protonic.nl Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | lib: parameter: Do not modify pointer returned from xstrdup()Sascha Hauer2022-06-161-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The sequence value_new = xstrdup(val); value_new = strim(value_new) is buggy because we not free the pointer we originally allocated. Fix this by skipping the leading whitespaces from the original string. The bug itself never triggered because the string is never freed. That will be fixed in the next patch. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | net: dns: Return error when nameserver not givenSascha Hauer2022-06-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When no nameserver is given then return an error instead of returning successfully with 0.0.0.0 as return IP. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | fastboot: always try barebox_update handler for bbu- partitionsAhmad Fatoum2022-06-151-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | So far, fastboot barebox_update code was only entered when filetype_is_barebox_image() returned true, a function exclusively used for fastboot. Align this with normal barebox_update from the command line by leaving the decision on whether the image is correctly to the barebox_update handler if the user explicitly targets a bbu- fastboot partition. We keep the old check OR-ed to maintain backwards-compatibility for invoking barebox_update for non bbu- fastboot partitions. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20220609130936.3616309-1-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | of: request reserved memory regions so other code can'tAhmad Fatoum2022-06-154-3/+99
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a new of_reserved_mem_walk that can be used to request reserved memory regions. This avoids e.g. bootm trying to place the kernel into a reserved region. Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20220609111810.2454588-3-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | of: remove unused and misleading #cells in /memreserveAhmad Fatoum2022-06-101-11/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | barebox creates a /memreserve node to hold FDT reservation entries inside its reg property for unflattened device trees that are copied back into the FDT reservation table on flattening. These reservation entries are pairs of big-endian 64-bit start+size pairs. To properly describe these in DT, we would need the (#address|#size)-cells properties at the root node, not in the same node having the reg property. As we don't read back these properties anyway, just drop them. No functional change. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20220609111810.2454588-2-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | nvmem: rmem: get, don't request, memory regionAhmad Fatoum2022-06-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | nvmem-rmem is a compatible for reserved memory entries, so the driver can't expect exclusive access to this region. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20220609111810.2454588-1-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | read_file: Pass NULL for the size parameter if the return value is not usedAlexander Shiyan2022-06-106-19/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Alexander Shiyan <eagle.alexander923@gmail.com> Link: https://lore.barebox.org/20220609072629.15723-1-eagle.alexander923@gmail.com Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | of: add of_get_reserve_map stub for !CONFIG_OFTREERouven Czerwinski2022-06-101-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows us to unconditionally include of.h in files which did not require CONFIG_OFTREE, required for the MMU code in later patches. Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20220609054342.661505-4-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | common: add help text for CONFIG_STATEAhmad Fatoum2022-06-101-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While we have extensive documentation for state, some sentences in the kconfig are a good thing. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20220609060923.670163-1-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | common: reset_source: Remove of_get_reset_source_priority()Alexander Shiyan2022-06-102-24/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | of_get_reset_source_priority() has no users, so it can be safely removed. Signed-off-by: Alexander Shiyan <eagle.alexander923@gmail.com> Link: https://lore.barebox.org/20220608051244.2318-1-eagle.alexander923@gmail.com Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | serial: ns16550: Remove empty line after returnJules Maselbas2022-06-101-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Jules Maselbas <jmaselbas@kalray.eu> Link: https://lore.barebox.org/20220608145010.12167-1-jmaselbas@kalray.eu Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | treewide: Remove duplicate incudesAlexander Shiyan2022-06-1039-50/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix warning fwterated by checkincludes.pl: ./net/nfs.c: libgen.h is included more than once. ./net/ifup.c: globalvar.h is included more than once. ./crypto/rsa.c: asm/types.h is included more than once. ./lib/decompress_unlz4.c: linux/decompress/mm.h is included more than once. ./scripts/stb_image.h: stdio.h is included more than once. ./scripts/kwbimage.c: unistd.h is included more than once. ./scripts/common.c: sys/types.h is included more than once. ./scripts/bareboximd.c: sys/types.h is included more than once. ./scripts/bareboximd.c: sys/mman.h is included more than once. ./fs/pstore/ram_core.c: linux/rslib.h is included more than once. ./fs/pstore/fs.c: fs.h is included more than once. ./fs/pstore/fs.c: linux/pstore.h is included more than once. ./fs/nfs.c: fs.h is included more than once. ./fs/uimagefs.c: fs.h is included more than once. ./fs/fs.c: command.h is included more than once. ./arch/sandbox/board/hostfile.c: linux/err.h is included more than once. ./arch/sandbox/board/devices.c: mach/linux.h is included more than once. ./arch/sandbox/os/common.c: signal.h is included more than once. ./arch/arm/boards/zii-imx51-rdu1/board.c: envfs.h is included more than once. ./arch/arm/boards/imx233-olinuxino/imx23-olinuxino.c: generated/mach-types.h is ./arch/arm/mach-stm32mp/ddrctrl.c: mach/stm32.h is included more than once. ./arch/arm/mach-imx/cpu_init.c: common.h is included more than once. ./arch/arm/mach-imx/imx8m.c: mach/imx8m-ccm-regs.h is included more than once. ./common/efi/payload/init.c: efi.h is included more than once. ./common/state/backend_format_raw.c: common.h is included more than once. ./common/state/backend_format_raw.c: crc.h is included more than once. ./common/hush.c: libbb.h is included more than once. ./drivers/spi/atmel-quadspi.c: linux/clk.h is included more than once. ./drivers/spi/atmel-quadspi.c: linux/err.h is included more than once. ./drivers/net/virtio.c: net.h is included more than once. ./drivers/net/phy/phy.c: linux/phy.h is included more than once. ./drivers/net/cpsw.c: net.h is included more than once. ./drivers/virtio/virtio_pci_common.h: linux/list.h is included more than once. ./drivers/usb/host/ohci-hcd.c: dma.h is included more than once. ./drivers/usb/gadget/fsl_udc.c: dma.h is included more than once. ./drivers/nvmem/eeprom_93xx46.c: spi/spi.h is included more than once. ./drivers/nvmem/eeprom_93xx46.c: of.h is included more than once. ./drivers/video/imx-ipu-v3/imx-ldb.c: linux/clk.h is included more than once. ./drivers/video/imx-ipu-v3/imx-hdmi.c: linux/clk.h is included more than once. ./drivers/video/omap.c: common.h is included more than once. ./drivers/mtd/nand/nand_s3c24xx.c: asm/sections.h is included more than once. ./drivers/clk/imx/clk-imx6sx.c: linux/clk.h is included more than once. ./drivers/clk/imx/clk-imx6sl.c: linux/clk.h is included more than once. ./commands/bootm.c: of.h is included more than once. Signed-off-by: Alexander Shiyan <eagle.alexander923@gmail.com> Link: https://lore.barebox.org/20220607051957.2497-1-eagle.alexander923@gmail.com Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | block: set S_IFBLK for block devices instead of S_IFCHRAhmad Fatoum2022-06-105-2/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In barebox, block devices are a special case of character devices. Nevertheless, differentiation can be useful to allow scripts iterating over all block devices without accounting for naming, e.g. for dev in /dev/*; do test -b $dev && echo $dev: blockdevice done Add the necessary support. This will break scripts that assume test -c blockdevice to be true, but that's a quite improbable check. Tested-by: Jules Maselbas <jmaselbas@kalray.eu> Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Link: https://lore.barebox.org/20220602195916.9061-2-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | commands: ls: explicitly check for directories with S_ISDIRAhmad Fatoum2022-06-101-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | S_ISDIR(mode) is implemented as (mode & S_IFMT) == S_IFDIR, which accounts for file modes setting multiple bits. So far, this was not the case, but upcoming S_IFBLK equals (S_IFCHR | S_IFDIR), which would fail the existing checks, so prepare for that by fixing them. No functional change. There are no other instances of this elsewhere in the code base. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20220602195916.9061-1-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | globalvar: Add missing empty prototype for globalvar_set()Alexander Shiyan2022-06-101-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | common/fastboot.c: In function 'cb_boot': common/fastboot.c:396:2: error: implicit declaration of function 'globalvar_set' globalvar_set("bootm.image", ""); Signed-off-by: Alexander Shiyan <eagle.alexander923@gmail.com> Link: https://lore.barebox.org/20220601060226.3756-5-eagle.alexander923@gmail.com Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | drivers: soc: Fix unconditional compilation of imx directoryAlexander Shiyan2022-06-101-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As a side change, this patch sorts entries alphabetically. Signed-off-by: Alexander Shiyan <eagle.alexander923@gmail.com> Link: https://lore.barebox.org/20220601060226.3756-4-eagle.alexander923@gmail.com Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | ARM: at91sam9n12ek: Use xz compressionAlexander Shiyan2022-06-101-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The binary created with at91sam9n12ek_defconfig got too big over time. Use xz compression to match the bounds. CHKFILESIZE images/start_pbl.pblb images/start_pbl.pblb size 270996 > maximum size 262144 Signed-off-by: Alexander Shiyan <eagle.alexander923@gmail.com> Link: https://lore.barebox.org/20220601060226.3756-2-eagle.alexander923@gmail.com Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | ARM: DTS: myir-x335x: Add GPIO aliasesAlexander Shiyan2022-06-101-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For the correct work of GPIO driver, we need to define aliases. Let's add them to the devicetree. Signed-off-by: Alexander Shiyan <eagle.alexander923@gmail.com> Reviewed-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20220524073048.18467-1-eagle.alexander923@gmail.com Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | ARM: myir-x335x: Fix memory size detectAlexander Shiyan2022-06-101-9/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unfortunately, the memory size detect does not work properly. Let's use the standard get_ram_size() function in the preloader and just reinitialize the memory if it returns 256MB. Signed-off-by: Alexander Shiyan <eagle.alexander923@gmail.com> Link: https://lore.barebox.org/20220524072135.18007-1-eagle.alexander923@gmail.com Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | .gitignore: Add directories generated by MAKEALL scriptAlexander Shiyan2022-06-101-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Alexander Shiyan <eagle.alexander923@gmail.com> Link: https://lore.barebox.org/20220525052632.3169-1-eagle.alexander923@gmail.com Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | ARM: clps711x: Switch to devicetree usageAlexander Shiyan2022-06-1022-223/+395
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a complex patch that switches the ARM CLPS711X architecture to work with the device tree. Includes changes to board initialization and any architecture drivers used. Signed-off-by: Alexander Shiyan <eagle.alexander923@gmail.com> Link: https://lore.barebox.org/20220524060411.7754-1-eagle.alexander923@gmail.com Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | mci: core: add device parameter for eMMC boot ackLucas Stach2022-06-102-6/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds an easy way to enable the boot acknowledge function of a eMMC device, without the need to frob the EXT_CSD setting via the mmc_extcsd command. A boot ack is required whenever the boot partitions are read via the fast initialization boot protocol. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Link: https://lore.barebox.org/20200513114636.811-1-l.stach@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | | Merge branch 'for-next/imx'Sascha Hauer3 days5-222/+46
|\ \ \ \ \
| * | | | | scripts: imx-usb-loader: simplify code flow for file size calculationsUwe Kleine-König10 days1-21/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change contains several changes that make the code flow easier to understand (in my eyes at least): - Rename max_length to firststage_len In some cases the image is loaded in two stages: First the PBL which is started after the PBL is loaded completely and then the whole image. So the size of the first stage isn't about some maximum. - Drop unintuitive total_size variable This variable used to be 0 in the one stage case and the filesize otherwise. Just use firststage_len for the first stage and use the filesize for the second stage (if needed). - Don't call the first stage size "fsize" in the debug output. - Add offset for second stage to debug output. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Link: https://lore.barebox.org/20220617082414.323238-1-u.kleine-koenig@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | ARM: i.MX8MM: increase off-on delay on the SD Vcc regulatorMarco Felsch10 days1-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit is ported from u-boot commit 247bbeb74c ("ARM: dts: imx8m: increase off-on delay on the SD Vcc regulator"). Currently barebox supports only SDR25/HS mode but it gets important as soon as barebox supports faster modes. 8<--------------------------------------------------------------------- ARM: dts: imx8m: increase off-on delay on the SD Vcc regulator Some SD Card controller and power circuitry has increased capacitance, which keeps the internal logic remains powered after regulator is switch off. This is generally the case when card is switched to SD104 mode, where a power cycle should be performed. In case if the card internal logic remains powered, it causes a subsequent failure of mode transition, effectively leading to failed enumeration. Introduce a delay of 20 msec in order to provide a possibility for internal card circuitry to drain voltages and perform a power cycle correctly. Similar fix is done in commit c49d0ac38a76 ("ARM: dts: rmobile: Increase off-on delay on the SD Vcc regulator") targeted Renesas SOCs. Signed-off-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com> Cc: Stefano Babic <sbabic@denx.de> 8<--------------------------------------------------------------------- Signed-off-by: Marco Felsch <m.felsch@pengutronix.de> Link: https://lore.barebox.org/20220616140246.2191569-2-m.felsch@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | ARM: i.MX8MM: fix phy-reset gpioMarco Felsch10 days1-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Drop the Barebox local property since the upstream/linux device-tree is handling it now within the phy and we get an error: ERROR: gpiolib: _gpio_request: gpio-118 (ethernet-phy@0) status -16 ERROR: miibus0: failed to request reset gpio for: ethernet-phy@0 Signed-off-by: Marco Felsch <m.felsch@pengutronix.de> Link: https://lore.barebox.org/20220616140246.2191569-1-m.felsch@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | ARM: i.MX: Make sure *_get_boot_source always assignes *srcUwe Kleine-König10 days1-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Callers of *_get_boot_source (e.g. start_atf() of nxp-imx8mm-evk or protonic-imx8m) expect src to hold the bootsource after return. So assign a value also for the "unknown" case. Fixes: ea55770308c0 ("ARM: i.MX: Add i.MX7 base architecture support") Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Link: https://lore.barebox.org/20220610165057.86722-1-u.kleine-koenig@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | ARM: i.MX7/8M: Fix boot source detection on i.MX8MPUwe Kleine-König10 days1-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On i.MX8MP the indicator for serial boot is 14, which is different from the value found for i.MX8MM. So consider 14 as serial boot, too and document the machines where the respective values are found. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Link: https://lore.barebox.org/20220610071143.2832473-1-u.kleine-koenig@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | ARM: mnt-reform: switch to upstream DTLucas Stach10 days1-163/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that all the necessary bits are upstream, we drop most of the Barebox DT for this board. Signed-off-by: Lucas Stach <dev@lynxeye.de> Link: https://lore.barebox.org/20220609214330.1443541-2-dev@lynxeye.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | imx-usb-loader: Drop nearly unused struct usb_idUwe Kleine-König10 days1-34/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Only one of the two members of struct usb_id is actually used. So replace struct usb_id by a struct mach_id. Signed-off-by: Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de> Tested-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20210813152245.15841-3-u.kleine-koenig@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | ARM: nxp-imx8mq-evk: install Barebox into eMMC boot partitionsLucas Stach10 days1-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Switch the Barebox update handler to install Barebox in the eMMC boot partitions, which is preferred due to the capability to do atomic updates. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Link: https://lore.barebox.org/20220530175051.507579-1-l.stach@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | | | Merge branch 'for-next/earlycon'Sascha Hauer3 days11-3/+93
|\ \ \ \ \ \
| * | | | | | video: efi_gop: add $global.bootm.earlycon fixup for framebuffer consoleAhmad Fatoum2022-06-091-3/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20220523092526.791716-8-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | | serial: lpuart: add $global.bootm.earlycon fixup supportAhmad Fatoum2022-06-091-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow barebox compute a suitable earlycon parameter. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20220523092526.791716-7-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | | serial: litex: add linux console/earlycon fixup supportAhmad Fatoum2022-06-091-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow barebox compute a suitable console= and earlycon parameter. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20220523092526.791716-6-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | | serial: imx: add $global.bootm.earlycon fixup supportAhmad Fatoum2022-06-091-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow barebox compute a suitable earlycon parameter. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20220523092526.791716-5-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>