diff options
-rw-r--r-- | Documentation/boards/rockchip.rst | 2 | ||||
-rw-r--r-- | Documentation/user/reboot-mode.rst | 8 | ||||
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | arch/arm/boards/nxp-imx8mn-evk/lowlevel.c | 5 | ||||
-rw-r--r-- | arch/arm/boards/terasic-de0-nano-soc/board.c | 2 | ||||
-rw-r--r-- | arch/arm/boards/terasic-sockit/board.c | 2 | ||||
-rw-r--r-- | arch/arm/configs/rpi_defconfig | 2 | ||||
-rw-r--r-- | arch/arm/cpu/psci-client.c | 2 | ||||
-rw-r--r-- | arch/arm/dts/socfpga_cyclone5_de0_nano_soc.dts | 3 | ||||
-rw-r--r-- | arch/arm/dts/socfpga_cyclone5_sockit.dts | 3 | ||||
-rw-r--r-- | arch/sandbox/Makefile | 7 | ||||
-rw-r--r-- | arch/sandbox/board/Makefile | 7 | ||||
-rw-r--r-- | common/Kconfig | 32 | ||||
-rw-r--r-- | common/console_simple.c | 2 | ||||
-rw-r--r-- | common/efi/efi-iomem.c | 40 | ||||
-rw-r--r-- | drivers/mci/dw_mmc.c | 2 | ||||
-rw-r--r-- | drivers/net/designware_eqos.c | 6 | ||||
-rw-r--r-- | drivers/pci/pci-efi.c | 9 |
18 files changed, 73 insertions, 63 deletions
diff --git a/Documentation/boards/rockchip.rst b/Documentation/boards/rockchip.rst index d03c4686df..55a3956dd4 100644 --- a/Documentation/boards/rockchip.rst +++ b/Documentation/boards/rockchip.rst @@ -59,7 +59,7 @@ The build process needs three binary files which have to be copied from the `rkbin https://github.com/rockchip-linux/rkbin` repository to the barebox source tree: .. code-block:: sh - cp $RKBIN/rk35/rk3568_bl31_v1.24.elf firmware/rk3568-bl31.bin + cp $RKBIN/bin/rk35/rk3568_bl31_v1.24.elf firmware/rk3568-bl31.bin cp $RKBIN/bin/rk35/rk3568_bl32_v1.05.bin firmware/rk3568-op-tee.bin cp $RKBIN/bin/rk35/rk3568_ddr_1560MHz_v1.08.bin arch/arm/boards/rockchip-rk3568-evb/sdram-init.bin diff --git a/Documentation/user/reboot-mode.rst b/Documentation/user/reboot-mode.rst index 507d6feb01..681438d944 100644 --- a/Documentation/user/reboot-mode.rst +++ b/Documentation/user/reboot-mode.rst @@ -10,7 +10,7 @@ that boot should happen from a different boot medium. Likewise, many bootloaders reuse such registers, or if unavailable, non-volatile memory to determine whether the OS requested a special -reboot mode, e.g. rebooting into an USB recovery mode. This is +reboot mode, e.g. rebooting into a USB recovery mode. This is common on Android systems. barebox implements the upstream device tree bindings for @@ -52,11 +52,11 @@ Reset ===== Reboot modes can be stored on a syscon wrapping general purpose registers -that survives warm resets. If the system instead did reset via an external +that survive warm resets. If the system instead did reset via an external power management IC, the registers may lose their value. If such reboot mode storage is used, users must take care to use the correct -reset provider. In barebox, multiple reset providers may co-exist. They +reset provider. In barebox, multiple reset providers may co-exist. The ``reset`` command allows listing and choosing a specific reboot mode. Disambiguation @@ -86,7 +86,7 @@ as the reboot mode. For cases, where the communication instead happens between barebox and an OS, they can be completely different, e.g. ``$bootsource`` may say barebox was booted from ``spi-nor``, while the reboot mode describes that barebox should -boot the Kernel off an USB flash drive. +boot the Kernel off a USB flash drive. Comparison to barebox state --------------------------- @@ -1,6 +1,6 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 2021 -PATCHLEVEL = 10 +PATCHLEVEL = 11 SUBLEVEL = 0 EXTRAVERSION = NAME = None diff --git a/arch/arm/boards/nxp-imx8mn-evk/lowlevel.c b/arch/arm/boards/nxp-imx8mn-evk/lowlevel.c index bac632aa43..de53213ebc 100644 --- a/arch/arm/boards/nxp-imx8mn-evk/lowlevel.c +++ b/arch/arm/boards/nxp-imx8mn-evk/lowlevel.c @@ -56,7 +56,7 @@ static void pmic_reg_write(void *i2c, int addr, int reg, uint8_t val) ret = i2c_fsl_xfer(i2c, msgs, ARRAY_SIZE(msgs)); if (ret != 1) - pr_err("Failed to write to pmic %d\n", ret); + pr_err("Failed to write to pmic@%x: %d\n", addr, ret); } static int power_init_board_pca9450(void *i2c, int addr) @@ -66,7 +66,8 @@ static int power_init_board_pca9450(void *i2c, int addr) { .addr = addr, .buf = buf, - .flags = I2C_M_RD + .flags = I2C_M_RD, + .len = 1, }, }; diff --git a/arch/arm/boards/terasic-de0-nano-soc/board.c b/arch/arm/boards/terasic-de0-nano-soc/board.c index 8e69319d17..c6036a41f9 100644 --- a/arch/arm/boards/terasic-de0-nano-soc/board.c +++ b/arch/arm/boards/terasic-de0-nano-soc/board.c @@ -24,7 +24,7 @@ static int phy_fixup(struct phy_device *dev) static int socfpga_init(void) { - if (!of_machine_is_compatible("terasic,de0-nano-soc")) + if (!of_machine_is_compatible("terasic,de0-atlas")) return 0; if (IS_ENABLED(CONFIG_PHYLIB)) diff --git a/arch/arm/boards/terasic-sockit/board.c b/arch/arm/boards/terasic-sockit/board.c index ec68315998..19e67ff933 100644 --- a/arch/arm/boards/terasic-sockit/board.c +++ b/arch/arm/boards/terasic-sockit/board.c @@ -25,7 +25,7 @@ static int phy_fixup(struct phy_device *dev) static int socfpga_console_init(void) { - if (!of_machine_is_compatible("terasic,sockit")) + if (!of_machine_is_compatible("terasic,socfpga-cyclone5-sockit")) return 0; if (IS_ENABLED(CONFIG_PHYLIB)) diff --git a/arch/arm/configs/rpi_defconfig b/arch/arm/configs/rpi_defconfig index f42b8819af..b823a9a3d0 100644 --- a/arch/arm/configs/rpi_defconfig +++ b/arch/arm/configs/rpi_defconfig @@ -96,6 +96,8 @@ CONFIG_WATCHDOG_BCM2835=y CONFIG_GPIO_RASPBERRYPI_EXP=y CONFIG_PINCTRL_BCM283X=y CONFIG_REGULATOR=y +CONFIG_GENERIC_PHY=y +CONFIG_USB_NOP_XCEIV=y CONFIG_FS_EXT4=y CONFIG_FS_TFTP=y CONFIG_FS_NFS=y diff --git a/arch/arm/cpu/psci-client.c b/arch/arm/cpu/psci-client.c index b5d0d37497..7d5b3768b5 100644 --- a/arch/arm/cpu/psci-client.c +++ b/arch/arm/cpu/psci-client.c @@ -15,7 +15,7 @@ static struct restart_handler restart; -static void __noreturn psci_invoke_noreturn(int function) +static void __noreturn psci_invoke_noreturn(ulong function) { int ret; diff --git a/arch/arm/dts/socfpga_cyclone5_de0_nano_soc.dts b/arch/arm/dts/socfpga_cyclone5_de0_nano_soc.dts index 427f150fb4..c737b091a7 100644 --- a/arch/arm/dts/socfpga_cyclone5_de0_nano_soc.dts +++ b/arch/arm/dts/socfpga_cyclone5_de0_nano_soc.dts @@ -19,9 +19,6 @@ #include "socfpga.dtsi" / { - model = "Terasic DE0-Nano-SoC/Atlas-SoC Kit"; - compatible = "terasic,de0-nano-soc","altr,socfpga-cyclone5", "altr,socfpga"; - chosen { stdout-path = &uart0; diff --git a/arch/arm/dts/socfpga_cyclone5_sockit.dts b/arch/arm/dts/socfpga_cyclone5_sockit.dts index 23e07c964c..27d2087a33 100644 --- a/arch/arm/dts/socfpga_cyclone5_sockit.dts +++ b/arch/arm/dts/socfpga_cyclone5_sockit.dts @@ -19,9 +19,6 @@ #include "socfpga.dtsi" / { - model = "Terasic SoCkit"; - compatible = "terasic,sockit", "altr,socfpga"; - chosen { stdout-path = &uart0; diff --git a/arch/sandbox/Makefile b/arch/sandbox/Makefile index ba2614ea5f..5fc7e227be 100644 --- a/arch/sandbox/Makefile +++ b/arch/sandbox/Makefile @@ -75,10 +75,3 @@ common-y += $(BOARD) arch/sandbox/os/ arch/sandbox/lib/ common-$(CONFIG_OFTREE) += arch/sandbox/dts/ CLEAN_FILES += $(BOARD)/barebox.lds - -OBJCOPYFLAGS_stickypage.bin = -O binary - -stickypage.bin: arch/sandbox/board/stickypage.o - $(call if_changed,objcopy) - -all: stickypage.bin diff --git a/arch/sandbox/board/Makefile b/arch/sandbox/board/Makefile index 59fece60ef..ed01cb9c3e 100644 --- a/arch/sandbox/board/Makefile +++ b/arch/sandbox/board/Makefile @@ -11,4 +11,9 @@ obj-$(CONFIG_LED) += led.o extra-y += barebox.lds -extra-y += stickypage.o +extra-y += stickypage.bin + +OBJCOPYFLAGS_stickypage.bin = -O binary + +%.bin: %.o + $(call if_changed,objcopy) diff --git a/common/Kconfig b/common/Kconfig index 4239ddfb19..f4120b2083 100644 --- a/common/Kconfig +++ b/common/Kconfig @@ -10,7 +10,7 @@ config HAS_MODULES config HAS_CACHE bool help - This allows you do run "make ARCH=sandbox allyesconfig". + This allows you to run "make ARCH=sandbox allyesconfig". Drivers that depend on a cache implementation can depend on this config, so that you don't get a compilation error. @@ -18,7 +18,7 @@ config HAS_CACHE config HAS_DMA bool help - This allows you do run "make ARCH=sandbox allyesconfig". + This allows you to run "make ARCH=sandbox allyesconfig". Drivers that depend on a DMA implementation can depend on this config, so that you don't get a compilation error. @@ -630,7 +630,7 @@ config BOOTM_FITIMAGE select FITIMAGE depends on BOOTM && ARM help - Support using Flattened Image Tree (FIT) Images. FIT is an image + Support using Flattened Image Tree (FIT) images. FIT is an image format introduced by U-Boot. A FIT image contains one or multiple kernels, device trees and initrds. The FIT image itself is a flattened device tree binary. Have a look at the u-boot source tree @@ -711,7 +711,7 @@ config MMCBLKDEV_ROOTARG variable is set or the used blspec entry contains 'linux-appendroot'. Note: It is crucial that the kernel device tree and the barebox device - tree uses the same mmc aliases. + tree use the same mmc aliases. [1] fa2d0aa96941 ("mmc: core: Allow setting slot index via device tree alias") @@ -968,7 +968,7 @@ config DEFAULT_ENVIRONMENT_GENERIC_NEW_IKCONFIG depends on DEFAULT_ENVIRONMENT_GENERIC_NEW help This option embeds the used barebox Kconfig .config file into the - environment as /env/data/config. This will increases barebox image + environment as /env/data/config. This will increase barebox' image size. If unsure, say n here. config DEFAULT_ENVIRONMENT_PATH @@ -992,9 +992,9 @@ config BTHREAD select HAS_SCHED depends on HAS_ARCH_SJLJ help - barebox threads are lightweight cooperative (green) threads that are - scheduled within delay loops and the console idle to asynchronously - execute actions, like checking for link up or feeding a watchdog. + barebox threads are lightweight cooperative (green) threads that are + scheduled within delay loops and the console idle to asynchronously + execute actions, like checking for link up or feeding a watchdog. config STATE bool "generic state infrastructure" @@ -1010,7 +1010,7 @@ config STATE_CRYPTO select DIGEST select DIGEST_HMAC_GENERIC help - This options enables HMAC based authentication support for + This option enables HMAC based authentication support for the state's header and data. This means the state framework can verify both the data integrity and the authentication of the state's header and data. @@ -1084,8 +1084,8 @@ config EXTERNAL_DTS_FRAGMENTS the dtc include search path. A preprocessor macro based on the name of the main dts will be - defined, which allows the dts fragments to based on which image of a - multi image build they are being used in. Given the dts filename + defined, which allows the dts fragments to be based on which image of + a multi image build they are being used in. Given the dts filename used for a board is "foo-board.dts" the external dts usage can be limited to that board with @@ -1093,9 +1093,9 @@ config EXTERNAL_DTS_FRAGMENTS ... #endif - It not intended that this be put into into Barebox defconfig files. - Instead, it's an external build system, like Yocto or buildroot, to - add dts fragments from outside the Barebox source tree into the + It is not intended that this is put into Barebox' defconfig files. + Instead, it's an external build system's job, like Yocto or buildroot, + to add dts fragments from outside the Barebox source tree into the Barebox build. menu "OP-TEE loading" @@ -1127,7 +1127,7 @@ config PBL_OPTEE depends on !THUMB2_BAREBOX help Allows starting OP-TEE during lowlevel initialization of the PBL. - Requires explicit support in the boards lowlevel file. + Requires explicit support in the board's lowlevel file. endmenu @@ -1510,7 +1510,7 @@ config PBL_BREAK bool "Execute software break on pbl start" depends on ARM && (!CPU_32v4T && !ARCH_TEGRA) help - If this enabled, barebox will be compiled with BKPT instruction + If enabled, barebox will be compiled with BKPT instruction on early pbl init. This option should be used only with JTAG debugger! source "lib/Kconfig.ubsan" diff --git a/common/console_simple.c b/common/console_simple.c index 3b95570e5e..8c404ad264 100644 --- a/common/console_simple.c +++ b/common/console_simple.c @@ -95,7 +95,7 @@ int console_register(struct console_device *newcdev) newcdev->f_active = CONSOLE_STDIOE; if (IS_ENABLED(CONFIG_CONSOLE_DISABLE_INPUT)) - newcdev->f_active = ~CONSOLE_STDIN; + newcdev->f_active &= ~CONSOLE_STDIN; barebox_banner(); diff --git a/common/efi/efi-iomem.c b/common/efi/efi-iomem.c index e223c595c4..4d34328a58 100644 --- a/common/efi/efi-iomem.c +++ b/common/efi/efi-iomem.c @@ -10,7 +10,7 @@ #include <memory.h> #include <linux/sizes.h> -static int efi_parse_mmap(struct efi_memory_desc *desc) +static int efi_parse_mmap(struct efi_memory_desc *desc, bool verbose) { struct resource *res; u32 flags; @@ -30,77 +30,81 @@ static int efi_parse_mmap(struct efi_memory_desc *desc) switch (desc->type) { case EFI_RESERVED_TYPE: - if (!IS_ENABLED(DEBUG)) + if (verbose) return 0; name = "reserved"; flags = IORESOURCE_MEM | IORESOURCE_DISABLED; break; case EFI_LOADER_CODE: - return barebox_add_memory_bank("loader code", va_base, va_size); + name = "loader code"; + flags = IORESOURCE_MEM | IORESOURCE_READONLY; + break; case EFI_LOADER_DATA: - return barebox_add_memory_bank("loader data", va_base, va_size); + name = "loader data"; + flags = IORESOURCE_MEM; + break; case EFI_BOOT_SERVICES_CODE: - if (!IS_ENABLED(DEBUG)) + if (!verbose) return 0; name = "boot services code"; flags = IORESOURCE_MEM | IORESOURCE_READONLY; break; case EFI_BOOT_SERVICES_DATA: - if (!IS_ENABLED(DEBUG)) + if (!verbose) return 0; name = "boot services data"; flags = IORESOURCE_MEM; break; case EFI_RUNTIME_SERVICES_CODE: - if (!IS_ENABLED(DEBUG)) + if (!verbose) return 0; name = "runtime services code"; flags = IORESOURCE_MEM | IORESOURCE_READONLY; break; case EFI_RUNTIME_SERVICES_DATA: - if (!IS_ENABLED(DEBUG)) + if (!verbose) return 0; name = "runtime services data"; flags = IORESOURCE_MEM; break; case EFI_CONVENTIONAL_MEMORY: - if (!IS_ENABLED(DEBUG)) + if (!verbose) return 0; name = "conventional memory"; flags = IORESOURCE_MEM | IORESOURCE_PREFETCH | IORESOURCE_CACHEABLE; break; case EFI_UNUSABLE_MEMORY: - if (!IS_ENABLED(DEBUG)) + if (!verbose) return 0; name = "unusable"; flags = IORESOURCE_MEM | IORESOURCE_DISABLED; break; case EFI_ACPI_RECLAIM_MEMORY: - if (!IS_ENABLED(DEBUG)) + if (!verbose) return 0; name = "ACPI reclaim memory"; flags = IORESOURCE_MEM | IORESOURCE_READONLY; break; case EFI_ACPI_MEMORY_NVS: - if (!IS_ENABLED(DEBUG)) + if (!verbose) return 0; name = "ACPI NVS memory"; flags = IORESOURCE_MEM | IORESOURCE_READONLY; break; case EFI_MEMORY_MAPPED_IO: - if (!IS_ENABLED(DEBUG)) + if (!verbose) return 0; name = "MMIO"; flags = IORESOURCE_MEM; break; case EFI_MEMORY_MAPPED_IO_PORT_SPACE: - if (!IS_ENABLED(DEBUG)) + if (!verbose) return 0; name = "MMIOPORT"; flags = IORESOURCE_IO; break; case EFI_PAL_CODE: - if (!IS_ENABLED(DEBUG)) + if (!verbose) return 0; name = "PAL code"; flags = IORESOURCE_MEM | IORESOURCE_ROM_BIOS_COPY; @@ -112,7 +116,7 @@ static int efi_parse_mmap(struct efi_memory_desc *desc) return -EINVAL; } - if (!IS_ENABLED(DEBUG)) + if (!verbose) return 0; name = "vendor reserved"; @@ -165,8 +169,8 @@ static int efi_barebox_populate_mmap(void) goto out; } - for (desc = mmap_buf; (u8 *)desc < &mmap_buf[mmap_size]; desc += descsz) - efi_parse_mmap(desc); + for (desc = mmap_buf; (u8 *)desc < mmap_buf + mmap_size; desc += descsz) + efi_parse_mmap(desc, __is_defined(DEBUG)); out: free(mmap_buf); diff --git a/drivers/mci/dw_mmc.c b/drivers/mci/dw_mmc.c index b402090ab3..86c4f43e88 100644 --- a/drivers/mci/dw_mmc.c +++ b/drivers/mci/dw_mmc.c @@ -572,7 +572,7 @@ static int dw_mmc_probe(struct device_d *dev) rst = reset_control_get(dev, "reset"); if (IS_ERR(rst)) { - return PTR_ERR(rst); + dev_warn(dev, "error claiming reset: %pe\n", rst); } else if (rst) { reset_control_assert(rst); udelay(10); diff --git a/drivers/net/designware_eqos.c b/drivers/net/designware_eqos.c index f83e5d6d9b..399b5fa9e7 100644 --- a/drivers/net/designware_eqos.c +++ b/drivers/net/designware_eqos.c @@ -828,6 +828,7 @@ static void eqos_probe_dt(struct device_d *dev, struct eqos *eqos) int eqos_probe(struct device_d *dev, const struct eqos_ops *ops, void *priv) { + struct device_node *np = dev->device_node; struct mii_bus *miibus; struct resource *iores; struct eqos *eqos; @@ -866,7 +867,10 @@ int eqos_probe(struct device_d *dev, const struct eqos_ops *ops, void *priv) miibus->read = eqos_mdio_read; miibus->write = eqos_mdio_write; miibus->priv = eqos; - miibus->dev.device_node = of_get_child_by_name(dev->device_node, "mdio"); + + miibus->dev.device_node = of_get_compatible_child(np, "snps,dwmac-mdio"); + if (!miibus->dev.device_node) + miibus->dev.device_node = of_get_child_by_name(np, "mdio"); ret = eqos_init(dev, eqos); if (ret) diff --git a/drivers/pci/pci-efi.c b/drivers/pci/pci-efi.c index e1fe11d070..846449c4b0 100644 --- a/drivers/pci/pci-efi.c +++ b/drivers/pci/pci-efi.c @@ -209,15 +209,22 @@ static u8 *acpi_parse_resource(u8 *next, struct resource *out) return next; } +static struct efi_driver efi_pci_driver; + /* EFI already enumerated the bus for us, match our new pci devices with the efi * handles */ static void efi_pci_fixup_dev_parent(struct pci_dev *dev) { - struct efi_pci_priv *priv = host_to_efi_pci(dev->bus->host); + struct efi_pci_priv *priv; struct pci_child *child; struct pci_child_id id; + if (dev->dev.driver != &efi_pci_driver.driver) + return; + + priv = host_to_efi_pci(dev->bus->host); + id.segmentno = priv->protocol->segmentno; id.busno = dev->bus->number; id.devno = PCI_SLOT(dev->devfn); |